From 490f527bcac60756d38f51025df228b44e016e03 Mon Sep 17 00:00:00 2001 From: Nicolas Frayer Date: Thu, 4 Jan 2024 16:55:36 +0100 Subject: [PATCH] normal: Remove grub_env_set prefix in grub_try_normal_prefix Resolves: #RHEL-1601 Signed-off-by: Nicolas Frayer --- ...ub_env_set-prefix-in-grub_try_normal.patch | 27 +++++++++++++++++++ grub.patches | 1 + grub2.spec | 6 ++++- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0330-normal-Remove-grub_env_set-prefix-in-grub_try_normal.patch diff --git a/0330-normal-Remove-grub_env_set-prefix-in-grub_try_normal.patch b/0330-normal-Remove-grub_env_set-prefix-in-grub_try_normal.patch new file mode 100644 index 0000000..900c59a --- /dev/null +++ b/0330-normal-Remove-grub_env_set-prefix-in-grub_try_normal.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nicolas Frayer +Date: Tue, 19 Dec 2023 16:52:05 +0100 +Subject: [PATCH] normal: Remove grub_env_set prefix in grub_try_normal_prefix + +Commit de735a453aa35 added a grub_env_set where the prefix contains +the arch name in the pathname. This create issues when trying to +load modules using this prefix as the pathname contains a "doubled" +arch name in it (ie .../powerpc-ieee1275/powerpc-ieee1275/). + +Signed-off-by: Nicolas Frayer +--- + grub-core/normal/main.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c +index d59145f861d5..bac7b8a0e1d8 100644 +--- a/grub-core/normal/main.c ++++ b/grub-core/normal/main.c +@@ -372,7 +372,6 @@ grub_try_normal_prefix (const char *prefix) + file = grub_file_open (config, GRUB_FILE_TYPE_CONFIG); + if (file) + { +- grub_env_set ("prefix", prefix); + grub_file_close (file); + err = GRUB_ERR_NONE; + } diff --git a/grub.patches b/grub.patches index a42eff1..387d8d7 100644 --- a/grub.patches +++ b/grub.patches @@ -327,3 +327,4 @@ Patch0326: 0326-efi-http-change-uint32_t-to-uintn_t.patch Patch0327: 0327-grub-mkconfig-dont-overwrite-BLS-cmdline-if-BLSCFG.patch Patch0328: 0328-grub2-mkconfig-Pass-all-boot-params-when-used-by-ana.patch Patch0329: 0329-kern-ieee1275-init-ppc64-Restrict-high-memory-in-pre.patch +Patch0330: 0330-normal-Remove-grub_env_set-prefix-in-grub_try_normal.patch diff --git a/grub2.spec b/grub2.spec index ab77da8..e77d9fd 100644 --- a/grub2.spec +++ b/grub2.spec @@ -16,7 +16,7 @@ Name: grub2 Epoch: 1 Version: 2.06 -Release: 71%{?dist} +Release: 72%{?dist} Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -533,6 +533,10 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg %endif %changelog +* Thu Jan 4 2024 Nicolas Frayer - 2.06-72 +- normal: Remove grub_env_set prefix in grub_try_normal_prefix +- Resolves: #RHEL-1601 + * Thu Oct 19 2023 Nicolas Frayer - 2.06-71 - kern/ieee1275/init: ppc64: Restrict high memory in presence of fadump