From 115e0f60fa4345ae39cf4bbcbb320a180e8467be Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Mar 28 2019 16:24:52 +0000 Subject: 10_linux_bls: don't add --users option to generated menu entries The generated menu entries have a --users $grub_users option but this will fail on old versions of GRUB, since it expects the --users option argument to either be a constant or a variable that has been set. The latest GRUB version fix this but the GRUB core isn't updated on a GRUB package update, so this will cause the entries to not be shown in the menu after a system upgrade. Since can cause issues and because the entries that weren't generated from the BLS snippets didn't have the --users option either, just don't add it. Resolves: rhbz#1693515 Signed-off-by: Javier Martinez Canillas --- diff --git a/0288-10_linux_bls-don-t-add-users-option-to-generated-men.patch b/0288-10_linux_bls-don-t-add-users-option-to-generated-men.patch new file mode 100644 index 0000000..86955ac --- /dev/null +++ b/0288-10_linux_bls-don-t-add-users-option-to-generated-men.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Javier Martinez Canillas +Date: Thu, 28 Mar 2019 16:34:42 +0100 +Subject: [PATCH] 10_linux_bls: don't add --users option to generated menu + entries + +The generated menu entries have a --users $grub_users option but this will +fail on old versions of GRUB, since it expects the --users option argument +to either be a constant or a variable that has been set. + +The latest GRUB version fix this but the GRUB core isn't updated on a GRUB +package update, so this will cause the entries to not be shown in the menu +after a system upgrade. + +Since can cause issues and because the entries that weren't generated from +the BLS snippets didn't have the --users option either, just don't add it. + +Resolves: rhbz#1693515 + +Signed-off-by: Javier Martinez Canillas +--- + util/grub.d/10_linux_bls.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/util/grub.d/10_linux_bls.in b/util/grub.d/10_linux_bls.in +index 1707e86f2d3..b8ee9916329 100644 +--- a/util/grub.d/10_linux_bls.in ++++ b/util/grub.d/10_linux_bls.in +@@ -180,7 +180,7 @@ populate_menu() + for bls in "${files[@]}" ; do + read_config "${blsdir}/${bls}.conf" + +- menu="${menu}menuentry '${title}' --class ${grub_class} ${grub_arg} --users ${grub_users} --id ${bls} {\n" ++ menu="${menu}menuentry '${title}' --class ${grub_class} ${grub_arg} --id ${bls} {\n" + menu="${menu}\t linux ${linux} ${options}\n" + if [ -n "${initrd}" ] ; then + menu="${menu}\t initrd ${boot_prefix}${initrd}\n" diff --git a/grub.patches b/grub.patches index f0e81f2..1c08408 100644 --- a/grub.patches +++ b/grub.patches @@ -285,3 +285,4 @@ Patch0284: 0284-blscfg-fallback-to-default_kernelopts-if-BLS-option-.patch Patch0285: 0285-grub-switch-to-blscfg-copy-increment.mod-for-legacy-.patch Patch0286: 0286-Only-set-blsdir-if-boot-loader-entries-is-in-a-btrfs.patch Patch0287: 0287-blscfg-don-t-use-grub_list_t-and-the-GRUB_AS_LIST-ma.patch +Patch0288: 0288-10_linux_bls-don-t-add-users-option-to-generated-men.patch diff --git a/grub2.spec b/grub2.spec index 61cbf82..d3665e5 100644 --- a/grub2.spec +++ b/grub2.spec @@ -7,7 +7,7 @@ Name: grub2 Epoch: 1 Version: 2.02 -Release: 74%{?dist} +Release: 75%{?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 Mar 28 2019 Javier Martinez Canillas - 2.02-75 +- 10_linux_bls: don't add --users option to generated menu entries + Resolves: rhbz#1693515 + * Fri Mar 22 2019 Javier Martinez Canillas 2.02-74 - Only set blsdir if /boot/loader/entries is in a btrfs or zfs partition Related: rhbz#1688453