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

Resolves: #RHEL-61421
Signed-off-by: Leo Sandoval <lsandova@redhat.com>
This commit is contained in:
Leo Sandoval 2024-12-03 17:54:14 -06:00
parent f37ea2e5e1
commit 32cef9a90f
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

@ -1,6 +1,6 @@
Name: grubby Name: grubby
Version: 8.40 Version: 8.40
Release: 65%{?dist} Release: 66%{?dist}
Summary: Command line tool for updating bootloader configs Summary: Command line tool for updating bootloader configs
License: GPLv2+ License: GPLv2+
URL: https://github.com/rhinstaller/grubby URL: https://github.com/rhinstaller/grubby
@ -131,6 +131,10 @@ current boot environment.
%{_mandir}/man8/*.8* %{_mandir}/man8/*.8*
%changelog %changelog
* Fri Dec 06 2024 Leo Sandoval <lsandova@redhat.com> - 8.40-66
- grubby-bls: on PPC systems, remove petiboot's version checks
- Resolves: #RHEL-61421
* Thu Dec 05 2024 Leo Sandoval <lsandova@redhat.com> - 8.40-65 * Thu Dec 05 2024 Leo Sandoval <lsandova@redhat.com> - 8.40-65
- On grub cfg updates, run grub2-mkconfig for Xen systems - On grub cfg updates, run grub2-mkconfig for Xen systems
Resolves: #RHEL-50691 Resolves: #RHEL-50691