grubby-bls: on PPC systems, remove petiboot's version checks

Resolves: #RHEL-70194
Signed-off-by: Leo Sandoval <lsandova@redhat.com>
This commit is contained in:
Leo Sandoval 2024-12-03 17:54:14 -06:00
parent 855ff97323
commit b16dacf88a
2 changed files with 7 additions and 22 deletions

View File

@ -595,29 +595,10 @@ remove_var_prefix() {
update_grubcfg() update_grubcfg()
{ {
# Older ppc64le OPAL firmware (petitboot version < 1.8.0) don't have BLS support # Older ppc64le OPAL firmware don't have BLS support so grub2-mkconfig has to be run
# so grub2-mkconfig has to be run to generate a config with menuentry commands. # to generate a config with menuentry commands.
if [ "${arch}" = "ppc64le" ] && [ -d /sys/firmware/opal ]; then if [ "${arch}" = "ppc64le" ] && [ -d /sys/firmware/opal ]; then
RUN_MKCONFIG="true" RUN_MKCONFIG="true"
petitboot_path="/sys/firmware/devicetree/base/ibm,firmware-versions/petitboot"
if test -e ${petitboot_path}; then
read -r -d '' petitboot_version < ${petitboot_path}
petitboot_version="$(echo ${petitboot_version//v})"
if test -n ${petitboot_version}; then
major_version="$(echo ${petitboot_version} | cut -d . -f1)"
minor_version="$(echo ${petitboot_version} | cut -d . -f2)"
re='^[0-9]+$'
if [[ $major_version =~ $re ]] && [[ $minor_version =~ $re ]] &&
([[ ${major_version} -gt 1 ]] ||
[[ ${major_version} -eq 1 &&
${minor_version} -ge 8 ]]); then
RUN_MKCONFIG="false"
fi
fi
fi
fi fi
# PV and PVH Xen DomU guests boot with pygrub that doesn't have BLS support, # PV and PVH Xen DomU guests boot with pygrub that doesn't have BLS support,

View File

@ -3,7 +3,7 @@
Name: grubby Name: grubby
Version: 8.40 Version: 8.40
Release: 79%{?dist} Release: 80%{?dist}
Summary: Command line tool for updating bootloader configs Summary: Command line tool for updating bootloader configs
License: GPL-2.0-or-later License: GPL-2.0-or-later
Source1: grubby-bls Source1: grubby-bls
@ -74,6 +74,10 @@ fi
%{_mandir}/man8/grubby.8* %{_mandir}/man8/grubby.8*
%changelog %changelog
* Fri Dec 06 2024 Leo Sandoval <lsandova@redhat.com> - 8.40-80
- grubby-bls: on PPC systems, remove petiboot's version checks
Resolves: #RHEL-70194
* Fri Dec 06 2024 Leo Sandoval <lsandova@redhat.com> - 8.40-79 * Fri Dec 06 2024 Leo Sandoval <lsandova@redhat.com> - 8.40-79
- grubby-bls: in s390* systems, run zipl on grub cfg update event - grubby-bls: in s390* systems, run zipl on grub cfg update event
Resolves: #RHEL-36092 Resolves: #RHEL-36092