From ac6bc3ed8d6397973e6b511ba820b877dc520312 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Oct 10 2019 07:29:05 +0000 Subject: 99-grub-mkconfig: Fix script condition to exit and remove ppc64 BE check The ppc64 big endian support ended in F29 and only ppc64le is supported so there's no need to check for this architecture. Also the script wasn't properly tested and the check for Xen DomU machines isn't correct. Fix the test condition to exit the script. Related: rhbz#1703700 Signed-off-by: Javier Martinez Canillas --- diff --git a/99-grub-mkconfig.install b/99-grub-mkconfig.install index 5c5024c..d29de21 100755 --- a/99-grub-mkconfig.install +++ b/99-grub-mkconfig.install @@ -9,17 +9,20 @@ fi [[ -e /proc/xen/capabilities ]] && grep -q "control_d" /proc/xen/capabilities && XEN_DOM0=true if [[ $HV_TYPE = "xen" && $XEN_DOM0 != "true" ]]; then + RUN_MKCONFIG=true if grep -q '^GRUB_ENABLE_BLSCFG="*true"*\s*$' /etc/default/grub; then sed -i 's/^GRUB_ENABLE_BLSCFG=.*/GRUB_ENABLE_BLSCFG=false/' /etc/default/grub fi fi ARCH=$(uname -m) +if [[ $ARCH = "ppc64le" ]]; then + RUN_MKCONFIG=true +fi # A traditional grub configuration file needs to be generated only for ppc64le and # Xen DomU guests since we can't assume that bootloaders will be BLS capable there. -if [[ $ARCH != "ppc64" && $ARCH != "ppc64le" ]] || - [[ $HV_TYPE = "xen" && $XEN_DOM0 = "true" ]]; then +if [[ $RUN_MKCONFIG != "true" ]]; then exit 0 fi diff --git a/grub2.spec b/grub2.spec index 2210c39..9cc93fc 100644 --- a/grub2.spec +++ b/grub2.spec @@ -7,7 +7,7 @@ Name: grub2 Epoch: 1 Version: 2.02 -Release: 82%{?dist} +Release: 83%{?dist} Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -476,6 +476,10 @@ rm -r /boot/grub2.tmp/ || : %endif %changelog +* Thu Oct 10 2019 Javier Martinez Canillas - 2.02-83 +- 99-grub-mkconfig: Fix script condition to exit and remove ppc64 BE check + Related: rhbz#1703700 + * Wed Oct 09 2019 Javier Martinez Canillas - 2.02-82 - 99-grub-mkconfig: Disable BLS usage for Xen DomU guests Resolves: rhbz#1703700