diff --git a/0353-grub-mkconfig-Remove-check-for-mount-point-for-grub-.patch b/0353-grub-mkconfig-Remove-check-for-mount-point-for-grub-.patch new file mode 100644 index 0000000..e503cef --- /dev/null +++ b/0353-grub-mkconfig-Remove-check-for-mount-point-for-grub-.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nicolas Frayer +Date: Thu, 1 Aug 2024 11:13:20 +0200 +Subject: [PATCH] grub/mkconfig: Remove check for mount point for grub cfg stub + +Remove mountpoint when checking whether or not the grub cfg stub +exists and add -s to the test. This should cover scenarios where +the ESP doesn't have a seperate partition but still uses a grub +cfg stub + +Signed-off-by: Nicolas Frayer +--- + util/grub-mkconfig.in | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in +index a4972039b751..3f131eea2b12 100644 +--- a/util/grub-mkconfig.in ++++ b/util/grub-mkconfig.in +@@ -115,8 +115,7 @@ do + done + + os_name=$(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/' -e 's/\"//g') +-if test "x${grub_cfg}" = "x/boot/efi/EFI/$os_name/grub.cfg" &&\ +- mountpoint -q /boot/efi; then ++if test -s "${grub_cfg}" && test "x${grub_cfg}" = "x/boot/efi/EFI/$os_name/grub.cfg"; then + gettext_printf "Running \`grub2-mkconfig -o %s' will overwrite the GRUB wrapper.\n" "$grub_cfg" 1>&2 + gettext_printf "Please run \`grub2-mkconfig -o /boot/grub2/grub.cfg' instead to update grub.cfg.\n" 1>&2 + gettext_printf "GRUB configuration file was not updated.\n" 1>&2 diff --git a/grub.patches b/grub.patches index c0f8e49..4ddd886 100644 --- a/grub.patches +++ b/grub.patches @@ -350,3 +350,4 @@ Patch0349: 0349-Ignore-warnings-for-incompatible-types.patch Patch0350: 0350-fs-xfs-Fix-XFS-directory-extent-parsing.patch Patch0351: 0351-grub2-mkconfig-Ensure-grub-cfg-stub-is-not-overwritt.patch Patch0352: 0352-grub2-mkconfig-Simplify-os_name-detection.patch +Patch0353: 0353-grub-mkconfig-Remove-check-for-mount-point-for-grub-.patch diff --git a/grub2.spec b/grub2.spec index 7eb1716..823f17b 100644 --- a/grub2.spec +++ b/grub2.spec @@ -17,7 +17,7 @@ Name: grub2 Epoch: 1 Version: 2.06 -Release: 123%{?dist} +Release: 124%{?dist} Summary: Bootloader with support for Linux, Multiboot and more License: GPL-3.0-or-later URL: http://www.gnu.org/software/grub/ @@ -573,6 +573,10 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg %endif %changelog +* Thu Aug 1 2024 Nicolas Frayer - 2.06-124 +- grub2-mkconfig: Remove mountpoint check +- Related: #RHEL-32099 + * Wed Jul 31 2024 Nicolas Frayer - 2.06-123 - Use the set of macros provided by system-sb-certs for signing - Resolves: #RHEL-51867