Hello community, here is the log from the commit of package grub2 for openSUSE:Factory checked in at 2015-03-16 06:56:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/grub2 (Old) and /work/SRC/openSUSE:Factory/.grub2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "grub2" Changes: -------- --- /work/SRC/openSUSE:Factory/grub2/grub2.changes 2015-02-20 13:50:51.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.grub2.new/grub2.changes 2015-03-16 06:56:42.000000000 +0100 @@ -1,0 +2,7 @@ +Wed Mar 4 04:03:37 UTC 2015 - mch...@suse.com + +- grub2-efi-HP-workaround.patch: + * try to read config from all-uppercase prefix as last resort. + (bnc#872503) (boo#902982) + +------------------------------------------------------------------- New: ---- grub2-efi-HP-workaround.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ grub2.spec ++++++ --- /var/tmp/diff_new_pack.SODuRa/_old 2015-03-16 06:56:45.000000000 +0100 +++ /var/tmp/diff_new_pack.SODuRa/_new 2015-03-16 06:56:45.000000000 +0100 @@ -178,6 +178,7 @@ Patch47: grub2-Initialized-initrd_ctx-so-we-don-t-free-a-random-poi.patch Patch48: grub2-btrfs-fix-get_root-key-comparison-failures-due-to-en.patch Patch49: grub2-setup-try-fs-embed-if-mbr-gap-too-small.patch +Patch50: grub2-efi-HP-workaround.patch # Btrfs snapshot booting related patches Patch101: grub2-btrfs-01-add-ability-to-boot-from-subvolumes.patch Patch102: grub2-btrfs-02-export-subvolume-envvars.patch @@ -393,6 +394,7 @@ %patch47 -p1 %patch48 -p1 %patch49 -p1 +%patch50 -p1 %patch101 -p1 %patch102 -p1 %patch103 -p1 ++++++ grub2-efi-HP-workaround.patch ++++++ Index: grub-2.02~beta2/grub-core/kern/efi/init.c =================================================================== --- grub-2.02~beta2.orig/grub-core/kern/efi/init.c +++ grub-2.02~beta2/grub-core/kern/efi/init.c @@ -25,6 +25,7 @@ #include <grub/env.h> #include <grub/mm.h> #include <grub/kernel.h> +#include <grub/file.h> grub_addr_t grub_modbase; @@ -48,6 +49,67 @@ grub_efi_init (void) void (*grub_efi_net_config) (grub_efi_handle_t hnd, char **device, char **path); +static char * +workaround_efi_firmware_path (const char *device, const char *path) +{ + char *config = NULL;; + char *config_upper = NULL; + char *path_upper = NULL; + char *ret_path = NULL; + grub_file_t config_fd = NULL; + char *s; + + if (!device || !path) + return NULL; + + /* only workaround if booting off from cd device */ + if (grub_strncmp (device, "cd", 2) != 0) + goto quit; + + config = grub_xasprintf ("(%s)%s/grub.cfg", device, path); + config_fd = grub_file_open (config); + + /* everything's fine, so quit the workaround */ + if (config_fd) + goto quit; + + /* reset grub error state because noone else does... */ + grub_errno = GRUB_ERR_NONE; + + /* try again, this time upper case path */ + path_upper = grub_strdup (path); + if (! path_upper) + goto quit; + + s = path_upper; + for (; *s; s++) *s = grub_toupper(*s); + + config_upper = grub_xasprintf ("(%s)%s/grub.cfg", device, path_upper); + if (! config_upper) + goto quit; + + config_fd = grub_file_open (config_upper); + + /* if config can be found by the upper case path, return it */ + if (config_fd) + ret_path = grub_strdup (path_upper); + +quit: + + if (config_fd) + grub_file_close (config_fd); + + if (grub_errno) + grub_errno = GRUB_ERR_NONE; + + if (config) + grub_free (config); + + if (config_upper) + grub_free (config_upper); + + return ret_path; +} void grub_machine_get_bootlocation (char **device, char **path) @@ -67,6 +129,12 @@ grub_machine_get_bootlocation (char **de p = grub_strrchr (*path, '/'); if (p) *p = '\0'; + + if ((p = workaround_efi_firmware_path (*device, *path))) + { + grub_free (*path); + *path = p; + } } void -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org