diff --git a/0678-Strip-correctly-BLS-files-with-conf-extension.patch b/0678-Strip-correctly-BLS-files-with-conf-extension.patch new file mode 100644 index 0000000000000000000000000000000000000000..4273d5730da3b50ee22eab1c174705fa7a59f19b --- /dev/null +++ b/0678-Strip-correctly-BLS-files-with-conf-extension.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Leo Sandoval +Date: Wed, 3 Sep 2025 11:51:38 -0600 +Subject: [PATCH] Strip correctly BLS files with conf extension +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Renaud Métrich +Signed-off-by: Leo Sandoval +--- + grub-core/commands/blscfg.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c +index 795a9f9f17..5e2302c4e8 100644 +--- a/grub-core/commands/blscfg.c ++++ b/grub-core/commands/blscfg.c +@@ -417,12 +417,14 @@ static int bls_cmp(const void *p0, const void *p1, void *state) + id1 = grub_strdup(e1->filename); + + l = grub_strlen(id0); +- if (l > 5 && grub_strcmp(id0 + l - 5, ".conf")) +- id0[l-5] = '\0'; ++ if (l > 5) ++ if (!grub_strcmp(id0 + l - 5, ".conf")) ++ id0[l-5] = '\0'; + + l = grub_strlen(id1); +- if (l > 5 && grub_strcmp(id1 + l - 5, ".conf")) +- id1[l-5] = '\0'; ++ if (l > 5) ++ if(!grub_strcmp(id1 + l - 5, ".conf")) ++ id1[l-5] = '\0'; + + r = split_cmp(id0, id1, 1); + diff --git a/99-grub-mkconfig.install b/99-grub-mkconfig.install index 473636763720b1583220e8c3f3c38b97f65716dd..408cf0c52ebc543b3cd05255afe08318ed8b591f 100755 --- a/99-grub-mkconfig.install +++ b/99-grub-mkconfig.install @@ -16,6 +16,8 @@ if [[ x$GRUB_ENABLE_BLSCFG != xfalse ]]; then if [[ $ARCH = "ppc64" || $ARCH = "ppc64le" ]]; then RUN_MKCONFIG="true" fi +else + RUN_MKCONFIG="true" fi # A traditional grub configuration file needs to be generated only in the case when diff --git a/grub.patches b/grub.patches index 9911382d66ae17a14c528cdf05dff93450d54fc9..25a61ae415c304a195efe0c7f8d2056cc395a073 100644 --- a/grub.patches +++ b/grub.patches @@ -674,6 +674,7 @@ Patch0674: 0674-fs-xfs-Add-large-extent-counters-incompat-feature-su.patch Patch0675: 0675-fs-xfs-Handle-non-continuous-data-blocks-in-director.patch Patch0676: 0676-fs-xfs-fix-large-extent-counters-incompat-feature-su.patch Patch0677: 0677-fs-ext2-Rework-out-of-bounds-read-for-inline-and-ext.patch +Patch0678: 0678-Strip-correctly-BLS-files-with-conf-extension.patch # Support loongarch64 #Patch1000: 1000-loongarch64-add-support.patch Patch1001: 1001-bls-make-list.patch diff --git a/grub2.spec b/grub2.spec index a0c8baec75e424061dc1014726171816dd2d05d4..5e826b6aeff85d6543477281b364ca8e73fee7a0 100644 --- a/grub2.spec +++ b/grub2.spec @@ -12,7 +12,7 @@ Name: grub2 Epoch: 1 Version: 2.02 -Release: 167%{anolis_release}%{?dist} +Release: 169%{anolis_release}%{?dist} Summary: Bootloader with support for Linux, Multiboot and more Group: System Environment/Base License: GPLv3+ @@ -539,7 +539,7 @@ fi %endif %changelog -* Mon Sep 15 2025 Bo Ren - 2.02-167.0.1 +* Tue Oct 28 2025 Bo Ren - 2.02-169.0.1 - Build pc-modules package on x86_64 (geliwei@openanolis.org) - Add loongarch64 base support (zhangwenlong@loongson.cn)(chenguoqi@loongson.cn) - Fix a bug in bls_make_list, blscfg. (zhonglingh@linux.alibaba.com) @@ -551,6 +551,14 @@ fi - Update for loongarch64 in sync with latest v2.04(liuxue@loongson.cn) - fix the tdx error in grub2 +* Wed Sep 10 2025 Leo Sandoval - 2.02-169 +- Run mkconfig when GRUB_ENABLE_BLSCFG is false +- Resolves: #RHEL-113830 + +* Wed Sep 3 2025 Leo Sandoval - 2.02-168 +- Strip correctly BLS files with conf extension +- Resolves: #RHEL-112099 + * Thu Apr 24 2025 Leo Sandoval - 2.02-167 - 99-grub-mkconfig.install: fix condition allowing correct checks if GRUB_ENABLE_BLSCFG is not present - Resolves: #RHEL-80168