Accepting request 1247577 from Base:System

OBS-URL: https://build.opensuse.org/request/show/1247577
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=347
This commit is contained in:
Dominique Leuenberger 2025-02-21 20:35:23 +00:00 committed by Git OBS Bridge
commit 428d3cc775
3 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,44 @@
From e873743f4ed7841542dd7dc11a183cb136670382 Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com>
Date: Wed, 19 Feb 2025 14:52:52 +0800
Subject: [PATCH] bls: Accept .conf suffix in setting default entry
Signed-off-by: Michael Chang <mchang@suse.com>
---
grub-core/normal/menu.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
index b11b28e0d9..dfdf0c7268 100644
--- a/grub-core/normal/menu.c
+++ b/grub-core/normal/menu.c
@@ -557,6 +557,26 @@ get_entry_number (grub_menu_t menu, const char *name)
entry = i;
break;
}
+
+ if (e->bls)
+ {
+ char *v, *ext;
+
+ if ((v = grub_strdup (val)) &&
+ (ext = grub_strrchr (v, '.')) &&
+ grub_strcmp (ext, ".conf") == 0)
+ {
+ *ext = '\0';
+ if (menuentry_eq (e->id, v))
+ {
+ entry = i;
+ grub_free (v);
+ break;
+ }
+ }
+ grub_free (v);
+ }
+
e = e->next;
/* Skip hidden entries */
--
2.48.1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Feb 19 07:12:23 UTC 2025 - Michael Chang <mchang@suse.com>
- Fix grub-bls does not rollback via setting new default (bsc#1237198)
* 0001-bls-Accept-.conf-suffix-in-setting-default-entry.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Feb 14 03:49:09 UTC 2025 - Michael Chang <mchang@suse.com> Fri Feb 14 03:49:09 UTC 2025 - Michael Chang <mchang@suse.com>

View File

@ -437,6 +437,7 @@ Patch255: 0017-commands-minicmd-Block-the-dump-command-in-lockdown-.patch
Patch256: 0018-fs-bfs-Disable-under-lockdown.patch Patch256: 0018-fs-bfs-Disable-under-lockdown.patch
Patch257: 0019-fs-Disable-many-filesystems-under-lockdown.patch Patch257: 0019-fs-Disable-many-filesystems-under-lockdown.patch
Patch258: 0020-fs-Prevent-overflows-when-allocating-memory-for-arra.patch Patch258: 0020-fs-Prevent-overflows-when-allocating-memory-for-arra.patch
Patch259: 0001-bls-Accept-.conf-suffix-in-setting-default-entry.patch
%if 0%{?suse_version} <= 1600 %if 0%{?suse_version} <= 1600
Requires: gettext-runtime Requires: gettext-runtime