diff --git a/0001-grub-install-bailout-root-device-probing.patch b/0001-grub-install-bailout-root-device-probing.patch index b288ca9..4e7fffc 100644 --- a/0001-grub-install-bailout-root-device-probing.patch +++ b/0001-grub-install-bailout-root-device-probing.patch @@ -36,11 +36,9 @@ Signed-off-by: Michael Chang util/grub-install.c | 45 +++++++++++++++---- 7 files changed, 154 insertions(+), 9 deletions(-) -diff --git a/grub-core/osdep/basic/no_platform.c b/grub-core/osdep/basic/no_platform.c -index a173dafe9..dfbdd58e4 100644 --- a/grub-core/osdep/basic/no_platform.c +++ b/grub-core/osdep/basic/no_platform.c -@@ -51,3 +51,8 @@ grub_install_zipl (const char *d, int i, int f) +@@ -51,3 +51,8 @@ grub_util_error ("%s", _("no zIPL routines are available for your platform")); } @@ -49,11 +47,9 @@ index a173dafe9..dfbdd58e4 100644 +{ + return NULL; +} -diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.c -index c7aa202ab..f4658b27c 100644 --- a/grub-core/osdep/unix/getroot.c +++ b/grub-core/osdep/unix/getroot.c -@@ -489,6 +489,73 @@ grub_find_device (const char *dir, dev_t dev) +@@ -489,6 +489,73 @@ return 0; } @@ -93,7 +89,7 @@ index c7aa202ab..f4658b27c 100644 + char *tmp = grub_canonicalize_file_name (*cur); + if (tmp == NULL) + break; -+ ++ + if (strncmp (tmp, "/dev/dm-", sizeof ("/dev/dm-") - 1) == 0) + continue; + @@ -127,11 +123,9 @@ index c7aa202ab..f4658b27c 100644 char ** grub_guess_root_devices (const char *dir_in) { -diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c -index 90ac93725..01a1114cd 100644 --- a/grub-core/osdep/unix/platform.c +++ b/grub-core/osdep/unix/platform.c -@@ -250,3 +250,37 @@ grub_install_zipl (const char *dest, int install, int force) +@@ -250,3 +250,37 @@ "-z", dest, NULL })) grub_util_error (_("`%s' failed.\n"), PACKAGE"-zipl-setup"); } @@ -169,11 +163,9 @@ index 90ac93725..01a1114cd 100644 + + return buf; +} -diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c -index d352d5abd..0ecc0afa7 100644 --- a/grub-core/osdep/windows/platform.c +++ b/grub-core/osdep/windows/platform.c -@@ -440,3 +440,9 @@ grub_install_zipl (const char *d, int i, int f) +@@ -440,3 +440,9 @@ { grub_util_error ("%s", _("no zIPL routines are available for your platform")); } @@ -183,11 +175,9 @@ index d352d5abd..0ecc0afa7 100644 +{ + return NULL; +} -diff --git a/include/grub/emu/getroot.h b/include/grub/emu/getroot.h -index 9c642ae3f..d7e9928bf 100644 --- a/include/grub/emu/getroot.h +++ b/include/grub/emu/getroot.h -@@ -35,6 +35,9 @@ enum grub_dev_abstraction_types { +@@ -35,6 +35,9 @@ char *grub_find_device (const char *dir, dev_t dev); void grub_util_pull_device (const char *osname); @@ -197,11 +187,9 @@ index 9c642ae3f..d7e9928bf 100644 char **grub_guess_root_devices (const char *dir); int grub_util_get_dev_abstraction (const char *os_dev); char *grub_make_system_path_relative_to_its_root (const char *path); -diff --git a/include/grub/util/install.h b/include/grub/util/install.h -index 65f3a9c52..7d83e1c0b 100644 --- a/include/grub/util/install.h +++ b/include/grub/util/install.h -@@ -251,6 +251,9 @@ grub_install_sgi_setup (const char *install_device, +@@ -251,6 +251,9 @@ void grub_install_zipl (const char *d, int i, int f); @@ -211,11 +199,9 @@ index 65f3a9c52..7d83e1c0b 100644 int grub_install_compress_gzip (const char *src, const char *dest); int -diff --git a/util/grub-install.c b/util/grub-install.c -index 5c178ade1..c12772b05 100644 --- a/util/grub-install.c +++ b/util/grub-install.c -@@ -922,7 +922,6 @@ main (int argc, char *argv[]) +@@ -922,7 +922,6 @@ const char *efi_file = NULL; char **grub_devices; grub_fs_t grub_fs; @@ -223,7 +209,7 @@ index 5c178ade1..c12772b05 100644 grub_device_t grub_dev = NULL; enum grub_install_plat platform; char *grubdir, *device_map; -@@ -1102,10 +1101,22 @@ main (int argc, char *argv[]) +@@ -1102,10 +1101,22 @@ grub_host_init (); { @@ -248,7 +234,7 @@ index 5c178ade1..c12772b05 100644 rootdir_path = grub_canonicalize_file_name (t); if (!rootdir_path) grub_util_error (_("failed to get canonical path of `%s'"), t); -@@ -1124,22 +1135,38 @@ main (int argc, char *argv[]) +@@ -1124,22 +1135,38 @@ rootdir_devices[0]); rootdir_grub_dev = grub_device_open (rootdir_grub_devname); @@ -293,6 +279,3 @@ index 5c178ade1..c12772b05 100644 switch (platform) { case GRUB_INSTALL_PLATFORM_I386_EFI: --- -2.45.2 - diff --git a/grub2.changes b/grub2.changes index f7d22b1..add8e79 100644 --- a/grub2.changes +++ b/grub2.changes @@ -2,7 +2,7 @@ Fri Jul 19 09:59:15 UTC 2024 - Michael Chang - Fix error in grub-install when root is on tmpfs (bsc#1226100) - * 0001-grub-install-bailout-root-device-probing.patch + * 0001-grub-install-bailout-root-device-probing.patch - Fix incorrect Platform tag in rpm header (bsc#1217967) -------------------------------------------------------------------