diff --git a/0278-squish-don-t-dup-rhgb-quiet-check-mtimes.patch b/0278-squish-don-t-dup-rhgb-quiet-check-mtimes.patch new file mode 100644 index 0000000..013b915 --- /dev/null +++ b/0278-squish-don-t-dup-rhgb-quiet-check-mtimes.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Robbie Harwood +Date: Wed, 17 Aug 2022 10:26:07 -0400 +Subject: [PATCH] squish: don't dup rhgb quiet, check mtimes + +Signed-off-by: Robbie Harwood +--- + util/grub.d/10_linux.in | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in +index 950a92f5e8..03f091a4dc 100644 +--- a/util/grub.d/10_linux.in ++++ b/util/grub.d/10_linux.in +@@ -161,10 +161,16 @@ update_bls_cmdline() + local cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" + local -a files=($(get_sorted_bls)) + +- if [[ ! -f /etc/kernel/cmdline ]]; then +- # anaconda has the correct information to do this during install; +- # afterward, grubby will take care of syncing on updates. +- echo "$cmdline rhgb quiet" > /etc/kernel/cmdline ++ if [[ ! -f /etc/kernel/cmdline ]] || ++ [[ /etc/kernel/cmdline -ot /etc/default/grub ]]; then ++ # anaconda has the correct information to create this during install; ++ # afterward, grubby will take care of syncing on updates. If the user ++ # has modified /etc/default/grub, try to cope. ++ if [[ ! "$cmdline" =~ "rhgb quiet" ]]; then ++ # ensure these only show up once ++ cmdline="$cmdline rhgb quiet" ++ fi ++ echo "$cmdline" > /etc/kernel/cmdline + fi + + for bls in "${files[@]}"; do diff --git a/20-grub.install b/20-grub.install index 2a0ac32..bc55a14 100755 --- a/20-grub.install +++ b/20-grub.install @@ -87,6 +87,10 @@ case "$COMMAND" in if [[ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]] || [[ ! -f /sbin/new-kernel-pkg ]]; then if [[ -f /etc/kernel/cmdline ]]; then + if [[ /etc/kernel/cmdline -ot /etc/default/grub ]]; then + # user modified /etc/default/grub manually; sync + grub2-mkconfig -o /etc/grub2.cfg + fi read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline elif [[ -f /usr/lib/kernel/cmdline ]]; then read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline diff --git a/grub.patches b/grub.patches index 58ef358..4edcd52 100644 --- a/grub.patches +++ b/grub.patches @@ -275,3 +275,4 @@ Patch0274: 0274-efi-allocate-the-initrd-within-the-bounds-expressed-.patch Patch0275: 0275-efi-use-EFI_LOADER_-CODE-DATA-for-kernel-and-initrd-.patch Patch0276: 0276-BLS-create-etc-kernel-cmdline-during-mkconfig.patch Patch0277: 0277-Try-reserving-less-ram.patch +Patch0278: 0278-squish-don-t-dup-rhgb-quiet-check-mtimes.patch diff --git a/grub2.spec b/grub2.spec index 805648a..f3bd0e8 100644 --- a/grub2.spec +++ b/grub2.spec @@ -17,7 +17,7 @@ Name: grub2 Epoch: 1 Version: 2.06 -Release: 49%{?dist} +Release: 50%{?dist} Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -530,6 +530,9 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg %endif %changelog +* Wed Aug 17 2022 Robbie Harwood - 2.06-50 +- Fix duplicated args and cope with /etc/default/grub modification + * Mon Aug 15 2022 Robbie Harwood - 2.06-49 - Skip rpm mtime verification on likely-vfat filesystems