Accepting request 845585 from Base:System

OBS-URL: https://build.opensuse.org/request/show/845585
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=231
This commit is contained in:
Dominique Leuenberger 2020-11-05 20:53:08 +00:00 committed by Git OBS Bridge
parent f56927348b
commit 63032bdaeb
2 changed files with 45 additions and 0 deletions

View File

@ -18,6 +18,11 @@ V1:
This fixed "failed to get canonical path of `/boot/grub2/i386-pc`"
error during grub-install.
V2: Do not clean up core.img and boot.img in i386-pc platform directory.
The core.img is required by blocklist install that will load it from
platform directory. Both files can be used by grub2-bios-setup to
reinstall images to disk made by previous grub2-install.
Signed-off-by: Michael Chang <mchang@suse.com>
---
util/grub-install.c | 7 +++++--
@ -56,3 +61,37 @@ Index: grub-2.04/util/grub-install.c
break;
}
case GRUB_INSTALL_PLATFORM_SPARC64_IEEE1275:
Index: grub-2.04/util/grub-install-common.c
===================================================================
--- grub-2.04.orig/util/grub-install-common.c
+++ grub-2.04/util/grub-install-common.c
@@ -190,18 +190,28 @@ clean_grub_dir (const char *di)
{
grub_util_fd_dir_t d;
grub_util_fd_dirent_t de;
+ int skip_img = 0;
d = grub_util_fd_opendir (di);
if (!d)
grub_util_error (_("cannot open directory `%s': %s"),
di, grub_util_fd_strerror ());
+ {
+ char *plat_i386_pc = grub_install_get_platform_name (GRUB_INSTALL_PLATFORM_I386_PC);
+ const char *plat = strrchr (di, '/');
+
+ if (plat && strcmp (plat + 1, plat_i386_pc) == 0)
+ skip_img = 1;
+ free (plat_i386_pc);
+ }
+
while ((de = grub_util_fd_readdir (d)))
{
const char *ext = strrchr (de->d_name, '.');
if ((ext && (strcmp (ext, ".mod") == 0
|| strcmp (ext, ".lst") == 0
- || strcmp (ext, ".img") == 0
+ || (!skip_img && strcmp (ext, ".img") == 0)
|| strcmp (ext, ".mo") == 0)
&& strcmp (de->d_name, "menu.lst") != 0)
|| strcmp (de->d_name, "efiemu32.o") == 0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Nov 2 06:42:04 UTC 2020 - Michael Chang <mchang@suse.com>
- Fix boot failure in blocklist installation (bsc#1178278)
* Modified 0002-grub-install-Avoid-incompleted-install-on-i386-pc.patch
-------------------------------------------------------------------
Thu Oct 22 06:19:13 UTC 2020 - Michael Chang <mchang@suse.com>