From: Marcin Krol Date: Tue, 30 Aug 2022 00:33:08 +0000 (+0200) Subject: - merged 2.06 from PLD X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=8ab80f53099e357a531b30a27c15db861083d6b2;p=packages%2Fgrub2.git - merged 2.06 from PLD --- diff --git a/blscfg.patch b/blscfg.patch index f25dd28..d7749a6 100644 --- a/blscfg.patch +++ b/blscfg.patch @@ -1,6 +1,66 @@ -diff -urN grub-2.04.orig/grub-core/commands/blscfg.c grub-2.04/grub-core/commands/blscfg.c ---- grub-2.04.orig/grub-core/commands/blscfg.c 1970-01-01 01:00:00.000000000 +0100 -+++ grub-2.04/grub-core/commands/blscfg.c 2019-08-18 16:14:44.723000000 +0200 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Tue, 22 Jan 2013 06:31:38 +0100 +Subject: [PATCH] blscfg: add blscfg module to parse Boot Loader Specification + snippets + +The BootLoaderSpec (BLS) defines a scheme where different bootloaders can +share a format for boot items and a configuration directory that accepts +these common configurations as drop-in files. + +Signed-off-by: Peter Jones +Signed-off-by: Javier Martinez Canillas +[wjt: some cleanups and fixes] +Signed-off-by: Will Thompson +--- + grub-core/Makefile.core.def | 11 + + grub-core/commands/blscfg.c | 1096 ++++++++++++++++++++++++++++++++++++++++ + grub-core/commands/legacycfg.c | 5 +- + grub-core/commands/loadenv.c | 77 +-- + grub-core/commands/menuentry.c | 20 +- + grub-core/normal/main.c | 6 + + grub-core/commands/loadenv.h | 93 ++++ + include/grub/compiler.h | 2 + + include/grub/menu.h | 13 + + include/grub/normal.h | 2 +- + 10 files changed, 1243 insertions(+), 82 deletions(-) + create mode 100644 grub-core/commands/blscfg.c + create mode 100644 grub-core/commands/loadenv.h + +diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def +index 41b5e16a3ce..57e253ab1a1 100644 +--- a/grub-core/Makefile.core.def ++++ b/grub-core/Makefile.core.def +@@ -811,6 +811,16 @@ module = { + common = commands/blocklist.c; + }; + ++module = { ++ name = blscfg; ++ common = commands/blscfg.c; ++ common = commands/loadenv.h; ++ enable = powerpc_ieee1275; ++ enable = efi; ++ enable = i386_pc; ++ enable = emu; ++}; ++ + module = { + name = boot; + common = commands/boot.c; +@@ -988,6 +998,7 @@ module = { + module = { + name = loadenv; + common = commands/loadenv.c; ++ common = commands/loadenv.h; + common = lib/envblk.c; + }; + +diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c +new file mode 100644 +index 00000000000..54458b14518 +--- /dev/null ++++ b/grub-core/commands/blscfg.c @@ -0,0 +1,1096 @@ +/*-*- Mode: C; c-basic-offset: 2; indent-tabs-mode: t -*-*/ + @@ -1098,10 +1158,11 @@ diff -urN grub-2.04.orig/grub-core/commands/blscfg.c grub-2.04/grub-core/command + grub_unregister_extcmd (cmd); + grub_unregister_extcmd (oldcmd); +} -diff -urN grub-2.04.orig/grub-core/commands/legacycfg.c grub-2.04/grub-core/commands/legacycfg.c ---- grub-2.04.orig/grub-core/commands/legacycfg.c 2018-11-24 18:13:02.000000000 +0100 -+++ grub-2.04/grub-core/commands/legacycfg.c 2019-08-18 16:14:44.723000000 +0200 -@@ -133,7 +133,7 @@ +diff --git a/grub-core/commands/legacycfg.c b/grub-core/commands/legacycfg.c +index db7a8f00273..891eac5a33f 100644 +--- a/grub-core/commands/legacycfg.c ++++ b/grub-core/commands/legacycfg.c +@@ -133,7 +133,7 @@ legacy_file (const char *filename) args[0] = oldname; grub_normal_add_menu_entry (1, args, NULL, NULL, "legacy", NULL, NULL, @@ -1110,7 +1171,7 @@ diff -urN grub-2.04.orig/grub-core/commands/legacycfg.c grub-2.04/grub-core/comm grub_free (args); entrysrc[0] = 0; grub_free (oldname); -@@ -186,7 +186,8 @@ +@@ -186,7 +186,8 @@ legacy_file (const char *filename) } args[0] = entryname; grub_normal_add_menu_entry (1, args, NULL, NULL, NULL, @@ -1120,9 +1181,10 @@ diff -urN grub-2.04.orig/grub-core/commands/legacycfg.c grub-2.04/grub-core/comm grub_free (args); } -diff -urN grub-2.04.orig/grub-core/commands/loadenv.c grub-2.04/grub-core/commands/loadenv.c ---- grub-2.04.orig/grub-core/commands/loadenv.c 2018-11-24 18:13:02.000000000 +0100 -+++ grub-2.04/grub-core/commands/loadenv.c 2019-08-18 16:14:44.723000000 +0200 +diff --git a/grub-core/commands/loadenv.c b/grub-core/commands/loadenv.c +index 3fd664aac33..163b9a09042 100644 +--- a/grub-core/commands/loadenv.c ++++ b/grub-core/commands/loadenv.c @@ -28,6 +28,8 @@ #include #include @@ -1132,7 +1194,7 @@ diff -urN grub-2.04.orig/grub-core/commands/loadenv.c grub-2.04/grub-core/comman GRUB_MOD_LICENSE ("GPLv3+"); static const struct grub_arg_option options[] = -@@ -79,81 +81,6 @@ +@@ -79,81 +81,6 @@ open_envblk_file (char *filename, return file; } @@ -1214,9 +1276,107 @@ diff -urN grub-2.04.orig/grub-core/commands/loadenv.c grub-2.04/grub-core/comman static grub_err_t grub_cmd_load_env (grub_extcmd_context_t ctxt, int argc, char **args) { -diff -urN grub-2.04.orig/grub-core/commands/loadenv.h grub-2.04/grub-core/commands/loadenv.h ---- grub-2.04.orig/grub-core/commands/loadenv.h 1970-01-01 01:00:00.000000000 +0100 -+++ grub-2.04/grub-core/commands/loadenv.h 2019-08-18 16:14:44.724000000 +0200 +diff --git a/grub-core/commands/menuentry.c b/grub-core/commands/menuentry.c +index 2c5363da7f5..9faf2be0f64 100644 +--- a/grub-core/commands/menuentry.c ++++ b/grub-core/commands/menuentry.c +@@ -78,7 +78,7 @@ grub_normal_add_menu_entry (int argc, const char **args, + char **classes, const char *id, + const char *users, const char *hotkey, + const char *prefix, const char *sourcecode, +- int submenu) ++ int submenu, int *index, struct bls_entry *bls) + { + int menu_hotkey = 0; + char **menu_args = NULL; +@@ -149,9 +149,12 @@ grub_normal_add_menu_entry (int argc, const char **args, + if (! menu_title) + goto fail; + ++ grub_dprintf ("menu", "id:\"%s\"\n", id); ++ grub_dprintf ("menu", "title:\"%s\"\n", menu_title); + menu_id = grub_strdup (id ? : menu_title); + if (! menu_id) + goto fail; ++ grub_dprintf ("menu", "menu_id:\"%s\"\n", menu_id); + + /* Save argc, args to pass as parameters to block arg later. */ + menu_args = grub_calloc (argc + 1, sizeof (char *)); +@@ -170,8 +173,12 @@ grub_normal_add_menu_entry (int argc, const char **args, + } + + /* Add the menu entry at the end of the list. */ ++ int ind=0; + while (*last) +- last = &(*last)->next; ++ { ++ ind++; ++ last = &(*last)->next; ++ } + + *last = grub_zalloc (sizeof (**last)); + if (! *last) +@@ -188,8 +195,11 @@ grub_normal_add_menu_entry (int argc, const char **args, + (*last)->args = menu_args; + (*last)->sourcecode = menu_sourcecode; + (*last)->submenu = submenu; ++ (*last)->bls = bls; + + menu->size++; ++ if (index) ++ *index = ind; + return GRUB_ERR_NONE; + + fail: +@@ -286,7 +296,8 @@ grub_cmd_menuentry (grub_extcmd_context_t ctxt, int argc, char **args) + users, + ctxt->state[2].arg, 0, + ctxt->state[3].arg, +- ctxt->extcmd->cmd->name[0] == 's'); ++ ctxt->extcmd->cmd->name[0] == 's', ++ NULL, NULL); + + src = args[argc - 1]; + args[argc - 1] = NULL; +@@ -303,7 +314,8 @@ grub_cmd_menuentry (grub_extcmd_context_t ctxt, int argc, char **args) + ctxt->state[0].args, ctxt->state[4].arg, + users, + ctxt->state[2].arg, prefix, src + 1, +- ctxt->extcmd->cmd->name[0] == 's'); ++ ctxt->extcmd->cmd->name[0] == 's', NULL, ++ NULL); + + src[len - 1] = ch; + args[argc - 1] = src; +diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c +index 9ef98481f70..a326b192c89 100644 +--- a/grub-core/normal/main.c ++++ b/grub-core/normal/main.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -70,6 +71,11 @@ grub_normal_free_menu (grub_menu_t menu) + grub_free (entry->args); + } + ++ if (entry->bls) ++ { ++ entry->bls->visible = 0; ++ } ++ + grub_free ((void *) entry->id); + grub_free ((void *) entry->users); + grub_free ((void *) entry->title); +diff --git a/grub-core/commands/loadenv.h b/grub-core/commands/loadenv.h +new file mode 100644 +index 00000000000..952f46121bd +--- /dev/null ++++ b/grub-core/commands/loadenv.h @@ -0,0 +1,93 @@ +/* loadenv.c - command to load/save environment variable. */ +/* @@ -1311,141 +1471,21 @@ diff -urN grub-2.04.orig/grub-core/commands/loadenv.h grub-2.04/grub-core/comman + + return 0; +} -diff -urN grub-2.04.orig/grub-core/commands/menuentry.c grub-2.04/grub-core/commands/menuentry.c ---- grub-2.04.orig/grub-core/commands/menuentry.c 2018-11-24 18:13:02.000000000 +0100 -+++ grub-2.04/grub-core/commands/menuentry.c 2019-08-18 16:14:44.723000000 +0200 -@@ -78,7 +78,7 @@ - char **classes, const char *id, - const char *users, const char *hotkey, - const char *prefix, const char *sourcecode, -- int submenu) -+ int submenu, int *index, struct bls_entry *bls) - { - int menu_hotkey = 0; - char **menu_args = NULL; -@@ -149,9 +149,12 @@ - if (! menu_title) - goto fail; - -+ grub_dprintf ("menu", "id:\"%s\"\n", id); -+ grub_dprintf ("menu", "title:\"%s\"\n", menu_title); - menu_id = grub_strdup (id ? : menu_title); - if (! menu_id) - goto fail; -+ grub_dprintf ("menu", "menu_id:\"%s\"\n", menu_id); - - /* Save argc, args to pass as parameters to block arg later. */ - menu_args = grub_malloc (sizeof (char*) * (argc + 1)); -@@ -170,8 +173,12 @@ - } - - /* Add the menu entry at the end of the list. */ -+ int ind=0; - while (*last) -- last = &(*last)->next; -+ { -+ ind++; -+ last = &(*last)->next; -+ } - - *last = grub_zalloc (sizeof (**last)); - if (! *last) -@@ -188,8 +195,11 @@ - (*last)->args = menu_args; - (*last)->sourcecode = menu_sourcecode; - (*last)->submenu = submenu; -+ (*last)->bls = bls; - - menu->size++; -+ if (index) -+ *index = ind; - return GRUB_ERR_NONE; - - fail: -@@ -286,7 +296,8 @@ - users, - ctxt->state[2].arg, 0, - ctxt->state[3].arg, -- ctxt->extcmd->cmd->name[0] == 's'); -+ ctxt->extcmd->cmd->name[0] == 's', -+ NULL, NULL); - - src = args[argc - 1]; - args[argc - 1] = NULL; -@@ -303,7 +314,8 @@ - ctxt->state[0].args, ctxt->state[4].arg, - users, - ctxt->state[2].arg, prefix, src + 1, -- ctxt->extcmd->cmd->name[0] == 's'); -+ ctxt->extcmd->cmd->name[0] == 's', NULL, -+ NULL); - - src[len - 1] = ch; - args[argc - 1] = src; -diff -urN grub-2.04.orig/grub-core/Makefile.core.def grub-2.04/grub-core/Makefile.core.def ---- grub-2.04.orig/grub-core/Makefile.core.def 2019-04-23 10:54:47.000000000 +0200 -+++ grub-2.04/grub-core/Makefile.core.def 2019-08-18 16:14:44.723000000 +0200 -@@ -810,6 +810,16 @@ - }; - - module = { -+ name = blscfg; -+ common = commands/blscfg.c; -+ common = commands/loadenv.h; -+ enable = powerpc_ieee1275; -+ enable = efi; -+ enable = i386_pc; -+ enable = emu; -+}; -+ -+module = { - name = boot; - common = commands/boot.c; - i386_pc = lib/i386/pc/biosnum.c; -@@ -986,6 +996,7 @@ - module = { - name = loadenv; - common = commands/loadenv.c; -+ common = commands/loadenv.h; - common = lib/envblk.c; - }; - -diff -urN grub-2.04.orig/grub-core/normal/main.c grub-2.04/grub-core/normal/main.c ---- grub-2.04.orig/grub-core/normal/main.c 2018-11-24 18:13:02.000000000 +0100 -+++ grub-2.04/grub-core/normal/main.c 2019-08-18 16:14:44.724000000 +0200 -@@ -20,6 +20,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -66,6 +67,11 @@ - grub_free (entry->args); - } - -+ if (entry->bls) -+ { -+ entry->bls->visible = 0; -+ } -+ - grub_free ((void *) entry->id); - grub_free ((void *) entry->users); - grub_free ((void *) entry->title); -diff -urN grub-2.04.orig/include/grub/compiler.h grub-2.04/include/grub/compiler.h ---- grub-2.04.orig/include/grub/compiler.h 2018-11-24 18:13:02.000000000 +0100 -+++ grub-2.04/include/grub/compiler.h 2019-08-18 16:14:44.724000000 +0200 +diff --git a/include/grub/compiler.h b/include/grub/compiler.h +index c9e1d7a73dc..9859ff4cc79 100644 +--- a/include/grub/compiler.h ++++ b/include/grub/compiler.h @@ -48,4 +48,6 @@ - # define WARN_UNUSED_RESULT + # define CLANG_PREREQ(maj,min) 0 #endif +#define UNUSED __attribute__((__unused__)) + #endif /* ! GRUB_COMPILER_HEADER */ -diff -urN grub-2.04.orig/include/grub/menu.h grub-2.04/include/grub/menu.h ---- grub-2.04.orig/include/grub/menu.h 2018-11-24 18:13:02.000000000 +0100 -+++ grub-2.04/include/grub/menu.h 2019-08-18 16:14:44.724000000 +0200 +diff --git a/include/grub/menu.h b/include/grub/menu.h +index ee2b5e91045..0acdc2aa6bf 100644 +--- a/include/grub/menu.h ++++ b/include/grub/menu.h @@ -20,6 +20,16 @@ #ifndef GRUB_MENU_HEADER #define GRUB_MENU_HEADER 1 @@ -1463,7 +1503,7 @@ diff -urN grub-2.04.orig/include/grub/menu.h grub-2.04/include/grub/menu.h struct grub_menu_entry_class { char *name; -@@ -60,6 +70,9 @@ +@@ -60,6 +70,9 @@ struct grub_menu_entry /* The next element. */ struct grub_menu_entry *next; @@ -1473,10 +1513,11 @@ diff -urN grub-2.04.orig/include/grub/menu.h grub-2.04/include/grub/menu.h }; typedef struct grub_menu_entry *grub_menu_entry_t; -diff -urN grub-2.04.orig/include/grub/normal.h grub-2.04/include/grub/normal.h ---- grub-2.04.orig/include/grub/normal.h 2018-11-24 18:13:02.000000000 +0100 -+++ grub-2.04/include/grub/normal.h 2019-08-18 16:14:44.724000000 +0200 -@@ -145,7 +145,7 @@ +diff --git a/include/grub/normal.h b/include/grub/normal.h +index 218cbabccaf..8839ad85a19 100644 +--- a/include/grub/normal.h ++++ b/include/grub/normal.h +@@ -145,7 +145,7 @@ grub_normal_add_menu_entry (int argc, const char **args, char **classes, const char *id, const char *users, const char *hotkey, const char *prefix, const char *sourcecode, diff --git a/efi-net-fix.patch b/efi-net-fix.patch index aec2324..41872c0 100644 --- a/efi-net-fix.patch +++ b/efi-net-fix.patch @@ -1,7 +1,30 @@ -diff -ur grub-2.04.orig/grub-core/net/drivers/efi/efinet.c grub-2.04/grub-core/net/drivers/efi/efinet.c ---- grub-2.04.orig/grub-core/net/drivers/efi/efinet.c 2019-08-18 15:57:09.662000000 +0200 -+++ grub-2.04/grub-core/net/drivers/efi/efinet.c 2019-08-18 15:57:25.366000000 +0200 -@@ -330,6 +330,7 @@ +From 886d93184b894a29b0bef1f2467230a20c7a33ce Mon Sep 17 00:00:00 2001 +From: Mark Salter +Date: Tue, 8 Apr 2014 10:58:11 -0400 +Subject: [PATCH] reopen SNP protocol for exclusive use by grub + +While working with pxeboot of grub on an ARM platform, I noticed +very poor network performance while grub was loading a kernel +and initramfs. The performance during the loading of grub itself +seemed reasonable. Digging into the issue, I found that the UEFI +firmware was periodically polling for network packets while grub +was downloading files. This was causing timeouts and retries in +the grub network stack. + +The solution I found was to reopen the SNP protocol for exclusive +use. This forces UEFI to shutdown its use of SNP so that grub is +not competing for incoming packets. + +Signed-off-by: Mark Salter +--- + grub-core/net/drivers/efi/efinet.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c +index 2b344d6..a6e4c79 100644 +--- a/grub-core/net/drivers/efi/efinet.c ++++ b/grub-core/net/drivers/efi/efinet.c +@@ -223,6 +223,7 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, { struct grub_net_card *card; grub_efi_device_path_t *dp; @@ -9,7 +32,7 @@ diff -ur grub-2.04.orig/grub-core/net/drivers/efi/efinet.c grub-2.04/grub-core/n dp = grub_efi_get_device_path (hnd); if (! dp) -@@ -383,6 +384,21 @@ +@@ -250,6 +251,21 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, &pxe_mode->dhcp_ack, sizeof (pxe_mode->dhcp_ack), 1, device, path); @@ -31,3 +54,6 @@ diff -ur grub-2.04.orig/grub-core/net/drivers/efi/efinet.c grub-2.04/grub-core/n return; } } +-- +1.8.5.3 + diff --git a/grub-garbage.patch b/grub-garbage.patch index 9fd9737..7c6b794 100644 --- a/grub-garbage.patch +++ b/grub-garbage.patch @@ -1,7 +1,7 @@ -diff -ur grub-2.04.orig/util/grub-mkconfig_lib.in grub-2.04/util/grub-mkconfig_lib.in ---- grub-2.04.orig/util/grub-mkconfig_lib.in 2019-08-18 15:42:13.463000000 +0200 -+++ grub-2.04/util/grub-mkconfig_lib.in 2019-08-18 15:42:40.188000000 +0200 -@@ -187,6 +187,7 @@ +diff -dur grub-2.00.orig/util/grub-mkconfig_lib.in grub-2.00/util/grub-mkconfig_lib.in +--- grub-2.00.orig/util/grub-mkconfig_lib.in 2012-06-27 17:27:53.000000000 +0200 ++++ grub-2.00/util/grub-mkconfig_lib.in 2012-10-27 14:55:58.226216374 +0200 +@@ -178,6 +178,7 @@ case "$1" in *.dpkg-*) return 1 ;; # debian dpkg *.rpmsave|*.rpmnew) return 1 ;; diff --git a/grub-lvmdevice.patch b/grub-lvmdevice.patch index d9b6be7..85ae596 100644 --- a/grub-lvmdevice.patch +++ b/grub-lvmdevice.patch @@ -1,7 +1,6 @@ -diff -ur grub-2.04.orig/util/grub-mkconfig.in grub-2.04/util/grub-mkconfig.in ---- grub-2.04.orig/util/grub-mkconfig.in 2019-08-18 15:43:15.196000000 +0200 -+++ grub-2.04/util/grub-mkconfig.in 2019-08-18 15:43:33.498000000 +0200 -@@ -133,6 +133,21 @@ +--- grub-2.02~beta2/util/grub-mkconfig.in~ 2014-01-13 16:12:41.020705075 +0200 ++++ grub-2.02~beta2/util/grub-mkconfig.in 2014-01-13 16:10:42.000000000 +0200 +@@ -131,6 +131,21 @@ # Device containing our userland. Typically used for root= parameter. GRUB_DEVICE="`${grub_probe} --target=device /`" diff --git a/grub-mkconfig-diagnostics.patch b/grub-mkconfig-diagnostics.patch index afc95b4..a10124a 100644 --- a/grub-mkconfig-diagnostics.patch +++ b/grub-mkconfig-diagnostics.patch @@ -1,6 +1,48 @@ -diff -ur grub-2.04.orig/util/grub.d/00_header.in grub-2.04/util/grub.d/00_header.in ---- grub-2.04.orig/util/grub.d/00_header.in 2019-08-18 15:45:01.994000000 +0200 -+++ grub-2.04/util/grub.d/00_header.in 2019-08-18 15:45:18.507000000 +0200 +diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub-mkconfig.in grub-2.02~beta2/util/grub-mkconfig.in +--- grub-2.02~beta2.orig/util/grub-mkconfig.in 2014-01-04 11:34:32.715240491 +0100 ++++ grub-2.02~beta2/util/grub-mkconfig.in 2014-01-04 11:34:50.135240649 +0100 +@@ -250,11 +250,16 @@ + if test "x${grub_cfg}" != "x"; then + rm -f "${grub_cfg}.new" + oldumask=$(umask); umask 077 ++ # open fd &3 for diagnostic messages ++ exec 3>&1 + exec > "${grub_cfg}.new" + umask $oldumask ++else ++ # open fd &3 for diagnostic messages ++ exec 3>&2 + fi +-gettext "Generating grub configuration file ..." >&2 +-echo >&2 ++gettext "Generating grub configuration file ..." >&3 ++echo >&3 + + cat << EOF + # +@@ -286,7 +291,7 @@ + gettext_printf "Syntax errors are detected in generated GRUB config file. + Ensure that there are no errors in /etc/sysconfig/grub + and /etc/grub.d/* files or please file a bug report with +-%s file attached." "${grub_cfg}.new" >&2 ++%s file attached." "${grub_cfg}.new" >&3 + echo >&2 + exit 1 + else +@@ -295,5 +300,8 @@ + fi + fi + +-gettext "done" >&2 +-echo >&2 ++gettext "done" >&3 ++echo >&3 ++ ++# close diagnostic stream ++exec 3>&- +diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/00_header.in grub-2.02~beta2/util/grub.d/00_header.in +--- grub-2.02~beta2.orig/util/grub.d/00_header.in 2014-01-04 10:50:51.000000000 +0100 ++++ grub-2.02~beta2/util/grub.d/00_header.in 2014-01-04 11:34:50.135240649 +0100 @@ -229,7 +229,7 @@ if [ "x$gfxterm" = x1 ]; then if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \ @@ -25,9 +67,9 @@ diff -ur grub-2.04.orig/util/grub.d/00_header.in grub-2.04/util/grub.d/00_header esac prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"` cat << EOF -diff -ur grub-2.04.orig/util/grub.d/10_hurd.in grub-2.04/util/grub.d/10_hurd.in ---- grub-2.04.orig/util/grub.d/10_hurd.in 2019-08-18 15:45:01.994000000 +0200 -+++ grub-2.04/util/grub.d/10_hurd.in 2019-08-18 15:45:18.508000000 +0200 +diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/10_hurd.in grub-2.02~beta2/util/grub.d/10_hurd.in +--- grub-2.02~beta2.orig/util/grub.d/10_hurd.in 2013-12-17 18:25:57.000000000 +0100 ++++ grub-2.02~beta2/util/grub.d/10_hurd.in 2014-01-04 11:35:59.171907965 +0100 @@ -45,8 +45,8 @@ basename=`basename $i` dirname=`dirname $i` @@ -61,10 +103,10 @@ diff -ur grub-2.04.orig/util/grub.d/10_hurd.in grub-2.04/util/grub.d/10_hurd.in exit 1 fi -diff -ur grub-2.04.orig/util/grub.d/10_kfreebsd.in grub-2.04/util/grub.d/10_kfreebsd.in ---- grub-2.04.orig/util/grub.d/10_kfreebsd.in 2019-08-18 15:45:01.994000000 +0200 -+++ grub-2.04/util/grub.d/10_kfreebsd.in 2019-08-18 15:45:18.508000000 +0200 -@@ -161,7 +161,7 @@ +diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/10_kfreebsd.in grub-2.02~beta2/util/grub.d/10_kfreebsd.in +--- grub-2.02~beta2.orig/util/grub.d/10_kfreebsd.in 2013-12-17 18:25:57.000000000 +0100 ++++ grub-2.02~beta2/util/grub.d/10_kfreebsd.in 2014-01-04 11:34:50.135240649 +0100 +@@ -158,7 +158,7 @@ while [ "x$list" != "x" ] ; do kfreebsd=`version_find_latest $list` @@ -73,7 +115,7 @@ diff -ur grub-2.04.orig/util/grub.d/10_kfreebsd.in grub-2.04/util/grub.d/10_kfre basename=`basename $kfreebsd` dirname=`dirname $kfreebsd` rel_dirname=`make_system_path_relative_to_its_root $dirname` -@@ -210,7 +210,7 @@ +@@ -207,7 +207,7 @@ fi done if test -n "${module_dir}" ; then @@ -82,9 +124,8 @@ diff -ur grub-2.04.orig/util/grub.d/10_kfreebsd.in grub-2.04/util/grub.d/10_kfre module_dir_rel=$(make_system_path_relative_to_its_root $module_dir) fi -diff -ur grub-2.04.orig/util/grub.d/10_linux.in grub-2.04/util/grub.d/10_linux.in ---- grub-2.04.orig/util/grub.d/10_linux.in 2019-08-18 15:45:01.994000000 +0200 -+++ grub-2.04/util/grub.d/10_linux.in 2019-08-18 15:46:11.888000000 +0200 +--- grub-2.04/util/grub.d/10_linux.in.orig 2018-11-24 18:13:02.000000000 +0100 ++++ grub-2.04/util/grub.d/10_linux.in 2019-07-05 13:53:33.737370014 +0200 @@ -194,7 +194,7 @@ is_top_level=true while [ "x$list" != "x" ] ; do @@ -103,9 +144,9 @@ diff -ur grub-2.04.orig/util/grub.d/10_linux.in grub-2.04/util/grub.d/10_linux.i fi config= -diff -ur grub-2.04.orig/util/grub.d/10_netbsd.in grub-2.04/util/grub.d/10_netbsd.in ---- grub-2.04.orig/util/grub.d/10_netbsd.in 2019-08-18 15:45:01.994000000 +0200 -+++ grub-2.04/util/grub.d/10_netbsd.in 2019-08-18 15:45:18.508000000 +0200 +diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/10_netbsd.in grub-2.02~beta2/util/grub.d/10_netbsd.in +--- grub-2.02~beta2.orig/util/grub.d/10_netbsd.in 2013-12-17 18:25:57.000000000 +0100 ++++ grub-2.02~beta2/util/grub.d/10_netbsd.in 2014-01-04 11:34:50.135240649 +0100 @@ -155,7 +155,7 @@ continue fi @@ -113,11 +154,11 @@ diff -ur grub-2.04.orig/util/grub.d/10_netbsd.in grub-2.04/util/grub.d/10_netbsd - gettext_printf "Found NetBSD kernel: %s\n" "$k" >&2 + gettext_printf "Found NetBSD kernel: %s\n" "$k" >&3 - if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then - netbsd_entry "knetbsd" "$k" simple "${GRUB_CMDLINE_NETBSD_DEFAULT}" -diff -ur grub-2.04.orig/util/grub.d/10_windows.in grub-2.04/util/grub.d/10_windows.in ---- grub-2.04.orig/util/grub.d/10_windows.in 2019-08-18 15:45:01.994000000 +0200 -+++ grub-2.04/util/grub.d/10_windows.in 2019-08-18 15:45:18.508000000 +0200 + # The GRUB_DISABLE_SUBMENU option used to be different than others since it was + # mentioned in the documentation that has to be set to 'y' instead of 'true' to +diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/10_windows.in grub-2.02~beta2/util/grub.d/10_windows.in +--- grub-2.02~beta2.orig/util/grub.d/10_windows.in 2013-12-17 18:25:57.000000000 +0100 ++++ grub-2.02~beta2/util/grub.d/10_windows.in 2014-01-04 11:34:50.135240649 +0100 @@ -82,7 +82,7 @@ # Get boot device. dev=`${grub_probe} -t device "$dir" 2>/dev/null` || continue @@ -127,9 +168,8 @@ diff -ur grub-2.04.orig/util/grub.d/10_windows.in grub-2.04/util/grub.d/10_windo cat << EOF menuentry '$(echo "$OS" | grub_quote)' \$menuentry_id_option '$osid-$(grub_get_device_id "${dev}")' { EOF -diff -ur grub-2.04.orig/util/grub.d/20_linux_xen.in grub-2.04/util/grub.d/20_linux_xen.in ---- grub-2.04.orig/util/grub.d/20_linux_xen.in 2019-08-18 15:45:01.994000000 +0200 -+++ grub-2.04/util/grub.d/20_linux_xen.in 2019-08-18 15:46:22.468000000 +0200 +--- grub-2.04/util/grub.d/20_linux_xen.in.orig 2019-04-23 10:54:47.000000000 +0200 ++++ grub-2.04/util/grub.d/20_linux_xen.in 2019-07-05 13:55:11.220267798 +0200 @@ -243,7 +243,7 @@ while [ "x$list" != "x" ] ; do @@ -148,19 +188,10 @@ diff -ur grub-2.04.orig/util/grub.d/20_linux_xen.in grub-2.04/util/grub.d/20_lin fi if test -z "${initrd_real}"; then -diff -ur grub-2.04.orig/util/grub.d/30_os-prober.in grub-2.04/util/grub.d/30_os-prober.in ---- grub-2.04.orig/util/grub.d/30_os-prober.in 2019-08-18 15:45:01.994000000 +0200 -+++ grub-2.04/util/grub.d/30_os-prober.in 2019-08-18 15:47:18.536000000 +0200 -@@ -123,7 +123,7 @@ - fi - - if [ "x${GRUB_OS_PROBER_SKIP_LIST}" != "x" ] && [ "x`echo ${GRUB_OS_PROBER_SKIP_LIST} | grep -i -e '\b'${EXPUUID}'\b'`" != "x" ] ; then -- echo "Skipped ${LONGNAME} on ${DEVICE} by user request." >&2 -+ echo "Skipped ${LONGNAME} on ${DEVICE} by user request." >&3 - continue - fi - fi -@@ -141,7 +141,7 @@ +diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/30_os-prober.in grub-2.02~beta2/util/grub.d/30_os-prober.in +--- grub-2.02~beta2.orig/util/grub.d/30_os-prober.in 2014-01-04 10:50:51.000000000 +0100 ++++ grub-2.02~beta2/util/grub.d/30_os-prober.in 2014-01-04 11:34:50.135240649 +0100 +@@ -134,7 +134,7 @@ # os-prober returns text string followed by optional counter CLASS="--class $(echo "${LABEL}" | LC_ALL=C sed 's,[[:digit:]]*$,,' | cut -d' ' -f1 | tr 'A-Z' 'a-z' | LC_ALL=C sed 's,[^[:alnum:]_],_,g')" @@ -178,47 +209,3 @@ diff -ur grub-2.04.orig/util/grub.d/30_os-prober.in grub-2.04/util/grub.d/30_os- ;; esac done -diff -ur grub-2.04.orig/util/grub-mkconfig.in grub-2.04/util/grub-mkconfig.in ---- grub-2.04.orig/util/grub-mkconfig.in 2019-08-18 15:45:01.994000000 +0200 -+++ grub-2.04/util/grub-mkconfig.in 2019-08-18 15:45:18.509000000 +0200 -@@ -258,11 +258,16 @@ - if test "x${grub_cfg}" != "x"; then - rm -f "${grub_cfg}.new" - oldumask=$(umask); umask 077 -+ # open fd &3 for diagnostic messages -+ exec 3>&1 - exec > "${grub_cfg}.new" - umask $oldumask -+else -+ # open fd &3 for diagnostic messages -+ exec 3>&2 - fi --gettext "Generating grub configuration file ..." >&2 --echo >&2 -+gettext "Generating grub configuration file ..." >&3 -+echo >&3 - - cat << EOF - # -@@ -297,8 +302,8 @@ - gettext_printf "Syntax errors are detected in generated GRUB config file. - Ensure that there are no errors in /etc/sysconfig/grub - and /etc/grub.d/* files or please file a bug report with --%s file attached." "${grub_cfg}.new" >&2 -- echo >&2 -+%s file attached." "${grub_cfg}.new" >&3 -+ echo >&3 - exit 1 - else - # none of the children aborted with error, install the new grub.cfg -@@ -306,5 +311,8 @@ - fi - fi - --gettext "done" >&2 --echo >&2 -+gettext "done" >&3 -+echo >&3 -+ -+# close diagnostic stream -+exec 3>&- diff --git a/grub2-cfg.patch b/grub2-cfg.patch index 5d5ba9c..23ce97b 100644 --- a/grub2-cfg.patch +++ b/grub2-cfg.patch @@ -1,6 +1,5 @@ -diff -ur grub-2.04.orig/docs/grub.cfg grub-2.04/docs/grub.cfg ---- grub-2.04.orig/docs/grub.cfg 2019-08-18 15:56:16.561000000 +0200 -+++ grub-2.04/docs/grub.cfg 2019-08-18 15:56:54.745000000 +0200 +--- docs/grub.cfg.orig 2013-11-10 19:25:04.959888566 +0000 ++++ docs/grub.cfg 2013-11-10 19:25:10.260104712 +0000 @@ -14,8 +14,8 @@ # For booting GNU/Linux menuentry "GNU/Linux" --id gnulinux { diff --git a/grub2-fonts_path.patch b/grub2-fonts_path.patch index f5dbe8c..d9fd2ad 100644 --- a/grub2-fonts_path.patch +++ b/grub2-fonts_path.patch @@ -1,7 +1,7 @@ -diff -ur grub-2.04.orig/configure.ac grub-2.04/configure.ac ---- grub-2.04.orig/configure.ac 2019-08-18 15:50:10.737000000 +0200 -+++ grub-2.04/configure.ac 2019-08-18 15:50:22.087000000 +0200 -@@ -1649,7 +1649,7 @@ +diff -dur -x '*~' grub-2.00.orig/configure.ac grub-2.00/configure.ac +--- grub-2.00.orig/configure.ac 2012-10-28 09:47:24.000000000 +0100 ++++ grub-2.00/configure.ac 2012-10-28 09:48:06.438240771 +0100 +@@ -940,7 +940,7 @@ if test x"$starfield_excuse" = x; then for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do @@ -10,12 +10,3 @@ diff -ur grub-2.04.orig/configure.ac grub-2.04/configure.ac if test -f "$dir/DejaVuSans.$ext"; then DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext" break 2 -@@ -1671,7 +1671,7 @@ - FONT_SOURCE= - - for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do -- for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont /usr/share/fonts/uni /usr/share/fonts/truetype/unifont /usr/share/fonts/misc; do -+ for dir in . /usr/share/fonts/TTF /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont /usr/share/fonts/uni /usr/share/fonts/truetype/unifont /usr/share/fonts/misc; do - if test -f "$dir/unifont.$ext"; then - md5="$(md5sum "$dir/unifont.$ext"|awk '{ print $1; }')" - # PCF and BDF from version 6.3 isn't hanled properly by libfreetype. diff --git a/grub2.spec b/grub2.spec index 59388fb..c158e44 100644 --- a/grub2.spec +++ b/grub2.spec @@ -8,41 +8,147 @@ # - put grub-emu to subpackage if it is fixed # # Conditional build: -%bcond_with grubemu # build grub-emu debugging utility -%bcond_without efiemu # build efiemu runtimes -%bcond_without pc # do not build for PC BIOS platform -%bcond_without efi # do not build for EFI platform - -%ifnarch %{ix86} %{x8664} -%undefine with_pc +%bcond_with grubemu # grub-emu debugging utility +%bcond_without efiemu # efiemu runtimes (64-bit efiemu on 32-bit boot platform) +%bcond_with unifont # unifont based fonts +%bcond_without arc # MIPS ARC platform support +%bcond_without coreboot # coreboot/linuxbios platform support (x86/arm specific) +%bcond_without efi # EFI platform support +%bcond_without ieee1275 # ieee1275 platform support (x86/ppc/sparc specific) +%bcond_without loongson # MIPS loongson platform support (mipsel specific) +%bcond_without multiboot # multiboot platform support (x86/arm specific) +%bcond_without pc # PC BIOS platform support (x86 specific) +%bcond_without qemu # qemu platform support (x86/mips specific) +%bcond_without uboot # ARM uBoot platform support +%bcond_without xen # Xen platform support (x86 specific) +%bcond_without xen_pvh # Xen PVH platform support (x86 specific) + +%ifnarch mips mipsel mips64 mips64el +%undefine with_arc +%endif +%ifnarch %{ix86} %{x8664} x32 %{arm} +%undefine with_coreboot %endif -%ifnarch %{ix86} %{x8664} +%ifnarch %{ix86} %{x8664} x32 %{arm} aarch64 ia64 %undefine with_efi %endif +%ifnarch %{ix86} %{x8664} x32 ppc ppc64 sparc64 +%undefine with_ieee1275 +%endif +%ifnarch mipsel mips64el +%undefine with_loongson +%endif +%ifnarch %{ix86} %{x8664} x32 +%undefine with_multiboot +%undefine with_pc +%undefine with_xen +%undefine with_xen_pvh +%endif +%ifnarch %{ix86} mips mipsel mips64 mips64el +%undefine with_qemu +%endif +%ifnarch %{arm} +%undefine with_uboot +%endif -%ifnarch %{x8664} +# FIXME: x86_64-xen build is broken (as of 2.06) +%ifarch %{x8664} x32 +%undefine with_xen +%endif + +# these require unifont +%if %{without unifont} +%undefine with_coreboot +%undefine with_loongson +%undefine with_qemu +%endif + +%ifnarch %{x8664} x32 # non-x86_64 arch doesn't support this %undefine with_efiemu %endif # the 'most natural' platform should go last -%ifarch %{ix86} %{x8664} -%define platforms %{?with_efi:efi} %{?with_pc:pc} +%ifarch %{ix86} %{x8664} x32 +%define platforms %{?with_coreboot:coreboot} %{?with_ieee1275:ieee1275} %{?with_multiboot:multiboot} %{?with_qemu:qemu} %{?with_xen:xen} %{?with_xen_pvh:xen_pvh} %{?with_efi:efi} %{?with_pc:pc} +%endif +%ifarch %{arm} +%define platforms %{?with_efi:efi} %{?with_uboot:uboot} +%endif +%ifarch aarch64 ia64 riscv32 riscv64 +%define platforms efi +%endif +%ifarch mips mips64 +%define platforms arc +%endif +%ifarch mipsel mips64el +%define platforms %{?with_arc:arc} %{?with_loongson:loongson} +%endif +%ifarch ppc ppc64 sparc64 +%define platforms ieee1275 +%endif + +%ifarch %{ix86} +%define coreboot_arch i386 +%define efi_arch i386 +%define ieee1275_arch i386 +%define qemu_arch i386 +%define qemu_plat qemu +%define xen_arch i386 +%endif +%ifarch %{x8664} x32 +%define coreboot_arch i386 +%define efi_arch x86_64 +%define ieee1275_arch i386 +%define qemu_arch i386 +%define qemu_plat qemu +%define xen_arch x86_64 +%endif +%ifarch %{arm} +%define coreboot_arch arm +%define efi_arch arm +%endif +%ifarch aarch64 +%define efi_arch arm64 +%endif +%ifarch ia64 +%define efi_arch ia64 +%endif +%ifarch mips mips64 +%define arc_arch mips +%define qemu_arch mips +%define qemu_plat qemu_mips +%endif +%ifarch mipsel mips64el +%define arc_arch mipsel +%define qemu_arch mipsel +%define qemu_plat qemu_mips +%endif +%ifarch ppc ppc64 +%define ieee1275_arch powerpc +%endif +%ifarch riscv32 +%define efi_arch riscv32 +%endif +%ifarch riscv64 +%define efi_arch riscv64 +%endif +%ifarch sparc64 +%define ieee1275_arch sparc64 %endif -%define rel 1 Summary: GRand Unified Bootloader -Summary(de.UTF-8): GRUB2 - ein Bootloader für x86 -Summary(hu.UTF-8): GRUB2 - rendszerbetöltő x86 gépekhez -Summary(pl.UTF-8): GRUB2 - bootloader dla x86 +Summary(de.UTF-8): GRUB2 - ein Bootloader für x86 und ppc +Summary(hu.UTF-8): GRUB2 - rendszerbetöltő x86 és ppc gépekhez +Summary(pl.UTF-8): GRUB2 - bootloader dla x86 i ppc Summary(pt_BR.UTF-8): Gerenciador de inicialização GRUB2 Name: grub2 -Version: 2.04 -Release: 1 +Version: 2.06 +Release: 3 License: GPL v2 Group: Base -Source0: ftp://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz -# Source0-md5: 5aaca6713b47ca2456d8324a58755ac7 +Source0: https://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz +# Source0-md5: cf0fd928b1e5479c8108ee52cb114363 Source1: update-grub Source2: update-grub.8 Source3: grub.sysconfig @@ -54,32 +160,48 @@ Patch4: tld-mkconfigdir.patch Patch5: grub-mkconfig-diagnostics.patch Patch6: posix.patch Patch7: %{name}-fonts_path.patch -Patch8: just-say-linux.patch -Patch9: ignore-kernel-symlinks.patch -Patch10: initrd-search.patch -Patch11: %{name}-cfg.patch -Patch12: efi-net-fix.patch -Patch13: blscfg.patch -Patch14: restricted.patch +Patch9: just-say-linux.patch +Patch10: ignore-kernel-symlinks.patch +Patch11: initrd-search.patch +Patch12: %{name}-cfg.patch +Patch13: efi-net-fix.patch +Patch14: blscfg.patch +Patch15: restricted.patch +Patch16: 0193-fs-xfs-Fix-unreadable-filesystem-with-v4-superblock.patch +Patch17: 0268-grub_fs_probe-dprint-errors-from-filesystems.patch URL: http://www.gnu.org/software/grub/ -BuildRequires: autoconf >= 2.53 +BuildRequires: autoconf >= 2.63 BuildRequires: automake >= 1:1.11.1-1 -BuildRequires: bison -BuildRequires: device-mapper-devel +BuildRequires: bison >= 2.3 +BuildRequires: device-mapper-devel >= 1.02.34 BuildRequires: flex >= 2.5.35 BuildRequires: fonts-TTF-DejaVu -BuildRequires: freetype-devel >= 2 +%if %{with unifont} +BuildRequires: fonts-misc-unifont +%endif +BuildRequires: freetype-devel >= 2.1.5 BuildRequires: gawk -BuildRequires: gcc >= 5:3.4 -BuildRequires: gettext-tools +BuildRequires: gcc >= 6:5.1 +%ifarch %{x8664} x32 +%if %{with efiemu} || %{with coreboot} || %{with ieee1275} || %{with multiboot} || %{with pc} || %{with xen_pvh} +BuildRequires: gcc-multilib-32 >= 6:5.1 +%endif +%endif +%ifarch x32 +%if %{with efiemu} || %{with efi} +BuildRequires: gcc-multilib-64 >= 6:5.1 +%endif +%endif +BuildRequires: gettext-tools >= 0.18.3 BuildRequires: glibc-localedb-all BuildRequires: glibc-static BuildRequires: help2man BuildRequires: libfuse-devel BuildRequires: libtool BuildRequires: ncurses-devel -BuildRequires: python -BuildRequires: python-modules +BuildRequires: pkgconfig +BuildRequires: python >= 1:2.6 +BuildRequires: python-modules >= 1:2.6 BuildRequires: rpm >= 4.4.9-56 BuildRequires: rpmbuild(macros) >= 1.213 BuildRequires: sed >= 4.0 @@ -87,21 +209,17 @@ BuildRequires: tar >= 1:1.22 BuildRequires: texinfo BuildRequires: xz BuildRequires: xz-devel -%ifarch %{x8664} -BuildRequires: /usr/lib/libc.so -BuildRequires: gcc-multilib -%endif Requires: %{name}-platform = %{version}-%{release} Requires: issue Requires: which -%ifarch %{ix86} %{x8664} +%ifarch %{ix86} %{x8664} x32 Suggests: %{name}-platform-pc %endif Suggests: cdrkit-mkisofs Suggests: os-prober Provides: bootloader Conflicts: grub -ExclusiveArch: %{ix86} %{x8664} +ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 ia64 mips mipsel mips64 mips64el ppc ppc64 riscv32 riscv64 sparc64 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _sbindir /sbin @@ -211,7 +329,9 @@ avançados e que querem mais recursos de seu boot loader. Summary: bash-completion for GRUB Summary(pl.UTF-8): Bashowe uzupełnianie nazw dla GRUB-a Group: Applications/Shells +Requires: %{name} = %{version}-%{release} Requires: bash-completion +BuildArch: noarch %description -n bash-completion-%{name} This package provides bash-completion for GRUB. @@ -219,22 +339,50 @@ This package provides bash-completion for GRUB. %description -n bash-completion-%{name} -l pl.UTF-8 Pakiet ten dostarcza bashowe uzupełnianie nazw dla GRUB-a. -%package platform-pc -Summary: PC BIOS platform support for GRUB -Summary(pl.UTF-8): Obsługa platformy PC BIOS dla GRUB-a +%package fonts +Summary: Fonts for GRUB +Summary(pl.UTF-8): Fonty dla GRUB-a +Group: Base +Requires: %{name} = %{version}-%{release} + +%description fonts +Fonts for GRUB. + +%description fonts -l pl.UTF-8 +Fonty dla GRUB-a. + +%package platform-arc +Summary: MIPS ARC platform support for GRUB +Summary(pl.UTF-8): Obsługa platformy MIPS ARC dla GRUB-a Group: Base +Requires: %{name} = %{version}-%{release} Provides: %{name}-platform = %{version}-%{release} -%description platform-pc -PC BIOS platform support for GRUB. +%description platform-arc +MIPS ARC platform support for GRUB. -%description platform-pc -l pl.UTF-8 -Obsługa platformy PC BIOS dla GRUB-a. +%description platform-arc -l pl.UTF-8 +Obsługa platformy MIPS ARC dla GRUB-a. + +%package platform-coreboot +Summary: Coreboot (LinuxBIOS) platform support for GRUB +Summary(pl.UTF-8): Obsługa platformy Coreboot (LinuxBIOS) dla GRUB-a +Group: Base +Requires: %{name} = %{version}-%{release} +Requires: %{name}-fonts = %{version}-%{release} +Provides: %{name}-platform = %{version}-%{release} + +%description platform-coreboot +Coreboot (LinuxBIOS) platform support for GRUB. + +%description platform-coreboot -l pl.UTF-8 +Obsługa platformy Coreboot (LinuxBIOS) dla GRUB-a. %package platform-efi Summary: (U)EFI platform support for GRUB Summary(pl.UTF-8): Obsługa platformy (U)EFI dla GRUB-a Group: Base +Requires: %{name} = %{version}-%{release} Suggests: efibootmgr Provides: %{name}-platform = %{version}-%{release} @@ -244,6 +392,112 @@ Provides: %{name}-platform = %{version}-%{release} %description platform-efi -l pl.UTF-8 Obsługa platformy (U)EFI dla GRUB-a. +%package platform-ieee1275 +Summary: IEEE 1275 (OpenFirmware) platform support for GRUB +Summary(pl.UTF-8): Obsługa platformy IEEE 1275 (OpenFirmware) dla GRUB-a +Group: Base +Requires: %{name} = %{version}-%{release} +Provides: %{name}-platform = %{version}-%{release} + +%description platform-ieee1275 +IEEE 1275 (OpenFirmware) platform support for GRUB. + +%description platform-ieee1275 -l pl.UTF-8 +Obsługa platformy IEEE 1275 (OpenFirmware) dla GRUB-a. + +%package platform-loongson +Summary: MIPS Loongson platform support for GRUB +Summary(pl.UTF-8): Obsługa platformy MIPS Loongson dla GRUB-a +Group: Base +Requires: %{name} = %{version}-%{release} +Requires: %{name}-fonts = %{version}-%{release} +Provides: %{name}-platform = %{version}-%{release} + +%description platform-loongson +MIPS Loongson (yeelong, fuloong) platform support for GRUB. + +%description platform-loongson -l pl.UTF-8 +Obsługa platformy MIPS Loongson (yeelong, fuloong) dla GRUB-a. + +%package platform-multiboot +Summary: Multiboot platform support for GRUB +Summary(pl.UTF-8): Obsługa platformy Multiboot dla GRUB-a +Group: Base +Requires: %{name} = %{version}-%{release} +Provides: %{name}-platform = %{version}-%{release} + +%description platform-multiboot +Multiboot platform support for GRUB. + +%description platform-multiboot -l pl.UTF-8 +Obsługa platformy Multiboot dla GRUB-a. + +%package platform-pc +Summary: PC BIOS platform support for GRUB +Summary(pl.UTF-8): Obsługa platformy PC BIOS dla GRUB-a +Group: Base +Requires: %{name} = %{version}-%{release} +Provides: %{name}-platform = %{version}-%{release} + +%description platform-pc +PC BIOS platform support for GRUB. + +%description platform-pc -l pl.UTF-8 +Obsługa platformy PC BIOS dla GRUB-a. + +%package platform-qemu +Summary: Qemu platform support for GRUB +Summary(pl.UTF-8): Obsługa platformy Qemu dla GRUB-a +Group: Base +Requires: %{name} = %{version}-%{release} +Requires: %{name}-fonts = %{version}-%{release} +Provides: %{name}-platform = %{version}-%{release} + +%description platform-qemu +Qemu platform support for GRUB. + +%description platform-qemu -l pl.UTF-8 +Obsługa platformy Qemu dla GRUB-a. + +%package platform-uboot +Summary: ARM uBoot platform support for GRUB +Summary(pl.UTF-8): Obsługa platformy ARM uBoot dla GRUB-a +Group: Base +Requires: %{name} = %{version}-%{release} +Provides: %{name}-platform = %{version}-%{release} + +%description platform-uboot +ARM uBoot platform support for GRUB. + +%description platform-uboot -l pl.UTF-8 +Obsługa platformy ARM uBoot dla GRUB-a. + +%package platform-xen +Summary: Xen platform support for GRUB +Summary(pl.UTF-8): Obsługa platformy Xen dla GRUB-a +Group: Base +Requires: %{name} = %{version}-%{release} +Provides: %{name}-platform = %{version}-%{release} + +%description platform-xen +Xen platform support for GRUB. + +%description platform-xen -l pl.UTF-8 +Obsługa platformy Xen dla GRUB-a. + +%package platform-xen_pvh +Summary: Xen PVH platform support for GRUB +Summary(pl.UTF-8): Obsługa platformy Xen PVH dla GRUB-a +Group: Base +Requires: %{name} = %{version}-%{release} +Provides: %{name}-platform = %{version}-%{release} + +%description platform-xen_pvh +Xen PVH platform support for GRUB. + +%description platform-xen_pvh -l pl.UTF-8 +Obsługa platformy Xen PVH dla GRUB-a. + %package mkfont Summary: GRUB font files converter Summary(pl.UTF-8): Konwerter plików fontów GRUB-a @@ -258,6 +512,7 @@ Program do konwersji popularnych formatów plików fontów do PF2. %package theme-starfield Summary: starfield theme for GRUB Summary(pl.UTF-8): Motyw starfield dla GRUB-a +Requires: %{name} = %{version}-%{release} Group: Base %description theme-starfield @@ -275,13 +530,15 @@ Motyw starfield dla GRUB-a. %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 -%patch12 -p1 +%patch12 -p0 %patch13 -p1 %patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 # we don't have C.utf-8 and need an UTF-8 locale for build sed -i -e 's/LC_ALL=C.UTF-8/LC_ALL=en_US.utf-8/g' po/Makefile* po/Rules* @@ -294,7 +551,7 @@ install -d our-ld ln -f -s /usr/bin/ld.bfd our-ld/ld export PATH=$(pwd)/our-ld:$PATH -## not only the typicall autotools stuff +## not only the typical autotools stuff #./autogen.sh #{__gettextize} @@ -307,11 +564,12 @@ for platform in %{platforms} ; do install -d build-${platform} cd build-${platform} - if [ "$platform" != "efi" ] ; then + platform_opts="" + case platform in + coreboot|ieee1275|multiboot|pc|qemu|xen_pvh) platform_opts="--enable-efiemu%{!?with_efiemu:=no}" - else - platform_opts="" - fi + ;; + esac ln -f -s ../configure . # mawk stalls at ./genmoddep.awk, so force gawk @@ -319,6 +577,7 @@ for platform in %{platforms} ; do %configure \ --with-platform=${platform} \ --disable-werror \ + --enable-grub-themes \ %if %{with grubemu} --enable-grub-emu-usb \ --enable-grub-emu-sdl \ @@ -370,10 +629,12 @@ cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/grub rm -f $RPM_BUILD_ROOT%{_infodir}/dir # platform specific, unnecessarily always installed -%ifnarch %{ix86} %{x8664} +%ifnarch %{ix86} %{x8664} x32 %{__rm} $RPM_BUILD_ROOT{%{_sbindir}/grub-bios-setup,%{_mandir}/man8/grub-bios-setup.8} %endif +%ifnarch sparc64 %{__rm} $RPM_BUILD_ROOT{%{_sbindir}/grub-sparc64-setup,%{_mandir}/man8/grub-sparc64-setup.8} +%endif # core.img - bootable image generated by grub-mkimage(1) via grub-install(1) touch $RPM_BUILD_ROOT%{_grubdir}/core.img @@ -395,8 +656,8 @@ rm -rf $RPM_BUILD_ROOT %triggerpostun -- %{name} < 2.00-2 # Note this trigger on version upgrade needed only for upgrade from # old grub2 packages which contained modules in /boot/grub -# or were built with optimizations enabled -# don't do anything on --downgrade +# or were built with optimizations enabled. +# Don't do anything on --downgrade. if [ $1 -le 1 ]; then exit 0 fi @@ -412,7 +673,7 @@ fi %files -f grub.lang %defattr(644,root,root,755) -%doc AUTHORS NEWS README THANKS TODO +%doc AUTHORS ChangeLog NEWS README THANKS TODO %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/grub %attr(755,root,root) %{_sbindir}/grub-editenv %attr(755,root,root) %{_sbindir}/grub-fstest @@ -437,17 +698,21 @@ fi %attr(755,root,root) %{_sbindir}/grub-set-default %attr(755,root,root) %{_sbindir}/grub-syslinux2cfg %attr(755,root,root) %{_sbindir}/update-grub -%ifarch %{ix86} %{x8664} +%ifarch %{ix86} %{x8664} x32 %attr(755,root,root) %{_sbindir}/grub-bios-setup %{_mandir}/man8/grub-bios-setup.8* %endif -%ifarch %{ix86} %{x8664} +%ifarch %{ix86} %{x8664} x32 %attr(755,root,root) %{_sbindir}/grub-mkimage %{_mandir}/man1/grub-mkimage.1* %else %attr(755,root,root) %{_sbindir}/grub-probe %{_mandir}/man8/grub-probe.8* %endif +%ifarch sparc64 +%attr(755,root,root) %{_sbindir}/grub-sparc64-setup +%{_mandir}/man8/grub-sparc64-setup.8* +%endif %{_mandir}/man1/grub-editenv.1* %{_mandir}/man1/grub-file.1* %{_mandir}/man1/grub-fstest.1* @@ -498,14 +763,7 @@ fi %attr(755,root,root) /lib/grub.d/30_os-prober %attr(755,root,root) /lib/grub.d/41_custom -# these are now installed only on matching hosts -#%attr(755,root,root) /lib/grub.d/10_hurd -#%attr(755,root,root) /lib/grub.d/10_illumos -#%attr(755,root,root) /lib/grub.d/10_kfreebsd -#%attr(755,root,root) /lib/grub.d/10_netbsd -#%attr(755,root,root) /lib/grub.d/10_xnu - -%ifarch %{ix86} %{x8664} +%ifarch %{ix86} %{x8664} x32 %attr(755,root,root) %{_sbindir}/grub-probe %{_mandir}/man8/grub-probe.8* %endif @@ -514,47 +772,200 @@ fi %dir %{_datadir}/grub/themes +%files -n bash-completion-%{name} +%defattr(644,root,root,755) +/etc/bash_completion.d/grub + +%if %{with unifont} +%files fonts +%defattr(644,root,root,755) +%{_libexecdir}/ascii.h +%{_libexecdir}/ascii.pf2 +%{_libexecdir}/euro.pf2 +%{_libexecdir}/unicode.pf2 +%{_libexecdir}/widthspec.h +%endif + +%if %{with arc} +%files platform-arc +%defattr(644,root,root,755) +%dir %{_libexecdir}/%{arc_arch}-arc +%{_libexecdir}/%{arc_arch}-arc/modinfo.sh +%{_libexecdir}/%{arc_arch}-arc/*.lst +%{_libexecdir}/%{arc_arch}-arc/*.mod +%{_libexecdir}/%{arc_arch}-arc/*.module +%{_libexecdir}/%{arc_arch}-arc/config.h +%{_libexecdir}/%{arc_arch}-arc/gdb_grub +%{_libexecdir}/%{arc_arch}-arc/gmodule.pl +%{_libexecdir}/%{arc_arch}-arc/kernel.exec +%{_libexecdir}/%{arc_arch}-arc/kernel.img +%endif + +%if %{with coreboot} +%files platform-coreboot +%defattr(644,root,root,755) +%dir %{_libexecdir}/%{coreboot_arch}-coreboot +%{_libexecdir}/%{coreboot_arch}-coreboot/modinfo.sh +%{_libexecdir}/%{coreboot_arch}-coreboot/*.lst +%{_libexecdir}/%{coreboot_arch}-coreboot/*.mod +%{_libexecdir}/%{coreboot_arch}-coreboot/*.module +%{_libexecdir}/%{coreboot_arch}-coreboot/config.h +%{_libexecdir}/%{coreboot_arch}-coreboot/gdb_grub +%{_libexecdir}/%{coreboot_arch}-coreboot/gmodule.pl +%{_libexecdir}/%{coreboot_arch}-coreboot/kernel.exec +%{_libexecdir}/%{coreboot_arch}-coreboot/kernel.img +%if %{with efiemu} +%{_libexecdir}/%{coreboot_arch}-coreboot/efiemu*.o +%endif +%endif + +%if %{with efi} +%files platform-efi +%defattr(644,root,root,755) +%attr(755,root,root) /lib/grub.d/30_uefi-firmware +%dir %{_libexecdir}/%{efi_arch}-efi +%{_libexecdir}/%{efi_arch}-efi/modinfo.sh +%{_libexecdir}/%{efi_arch}-efi/*.lst +%{_libexecdir}/%{efi_arch}-efi/*.mod +%{_libexecdir}/%{efi_arch}-efi/*.module +%{_libexecdir}/%{efi_arch}-efi/config.h +%{_libexecdir}/%{efi_arch}-efi/gdb_grub +%{_libexecdir}/%{efi_arch}-efi/gmodule.pl +%{_libexecdir}/%{efi_arch}-efi/kernel.exec +%{_libexecdir}/%{efi_arch}-efi/kernel.img +%endif + +%if %{with ieee1275} +%files platform-ieee1275 +%defattr(644,root,root,755) +%dir %{_libexecdir}/%{ieee1275_arch}-ieee1275 +%{_libexecdir}/%{ieee1275_arch}-ieee1275/modinfo.sh +%{_libexecdir}/%{ieee1275_arch}-ieee1275/*.lst +%{_libexecdir}/%{ieee1275_arch}-ieee1275/*.mod +%{_libexecdir}/%{ieee1275_arch}-ieee1275/*.module +%{_libexecdir}/%{ieee1275_arch}-ieee1275/config.h +%{_libexecdir}/%{ieee1275_arch}-ieee1275/gdb_grub +%{_libexecdir}/%{ieee1275_arch}-ieee1275/gmodule.pl +%{_libexecdir}/%{ieee1275_arch}-ieee1275/kernel.exec +%{_libexecdir}/%{ieee1275_arch}-ieee1275/kernel.img +%if %{with efiemu} +%{_libexecdir}/%{ieee1275_arch}-ieee1275/efiemu*.o +%endif +%endif + +%if %{with multiboot} +%files platform-multiboot +%defattr(644,root,root,755) +%dir %{_libexecdir}/i386-multiboot +%{_libexecdir}/i386-multiboot/modinfo.sh +%{_libexecdir}/i386-multiboot/*.lst +%{_libexecdir}/i386-multiboot/*.mod +%{_libexecdir}/i386-multiboot/*.module +%{_libexecdir}/i386-multiboot/config.h +%{_libexecdir}/i386-multiboot/gdb_grub +%{_libexecdir}/i386-multiboot/gmodule.pl +%{_libexecdir}/i386-multiboot/kernel.exec +%{_libexecdir}/i386-multiboot/kernel.img +%if %{with efiemu} +%{_libexecdir}/i386-multiboot/efiemu*.o +%endif +%endif + %if %{with pc} %files platform-pc %defattr(644,root,root,755) -%dir %{_libexecdir}/*-pc -%{_libexecdir}/*-pc/modinfo.sh -%{_libexecdir}/*-pc/*.exec -%{_libexecdir}/*-pc/*.image -%{_libexecdir}/*-pc/*.lst -%{_libexecdir}/*-pc/*.mod -%{_libexecdir}/*-pc/*.module -%{_libexecdir}/*-pc/lzma_decompress.img -%{_libexecdir}/*-pc/config.h -%{_libexecdir}/*-pc/gdb_grub -%{_libexecdir}/*-pc/gmodule.pl +%dir %{_libexecdir}/i386-pc +%{_libexecdir}/i386-pc/modinfo.sh +%{_libexecdir}/i386-pc/*.lst +%{_libexecdir}/i386-pc/*.mod +%{_libexecdir}/i386-pc/*.module +%{_libexecdir}/i386-pc/config.h +%{_libexecdir}/i386-pc/gdb_grub +%{_libexecdir}/i386-pc/gmodule.pl +%{_libexecdir}/i386-pc/boot.image +%{_libexecdir}/i386-pc/boot.img +%{_libexecdir}/i386-pc/boot_hybrid.image +%{_libexecdir}/i386-pc/boot_hybrid.img +%{_libexecdir}/i386-pc/cdboot.image +%{_libexecdir}/i386-pc/cdboot.img +%{_libexecdir}/i386-pc/diskboot.image +%{_libexecdir}/i386-pc/diskboot.img +%{_libexecdir}/i386-pc/kernel.exec +%{_libexecdir}/i386-pc/kernel.img +%{_libexecdir}/i386-pc/lnxboot.image +%{_libexecdir}/i386-pc/lnxboot.img +%{_libexecdir}/i386-pc/lzma_decompress.image +%{_libexecdir}/i386-pc/lzma_decompress.img +%{_libexecdir}/i386-pc/pxeboot.image +%{_libexecdir}/i386-pc/pxeboot.img %if %{with efiemu} -%{_libexecdir}/*-pc/efiemu*.o +%{_libexecdir}/i386-pc/efiemu*.o %endif -%{_libexecdir}/*-pc/kernel.img -%ifarch %{ix86} %{x8664} -%{_libexecdir}/*-pc/boot.img -%{_libexecdir}/*-pc/boot_hybrid.img -%{_libexecdir}/*-pc/cdboot.img -%{_libexecdir}/*-pc/diskboot.img -%{_libexecdir}/*-pc/lnxboot.img -%{_libexecdir}/*-pc/pxeboot.img %endif + +%if %{with qemu} +%files platform-qemu +%defattr(644,root,root,755) +%dir %{_libexecdir}/%{qemu_arch}-%{qemu_plat} +%{_libexecdir}/%{qemu_arch}-%{qemu_plat}/modinfo.sh +%{_libexecdir}/%{qemu_arch}-%{qemu_plat}/*.lst +%{_libexecdir}/%{qemu_arch}-%{qemu_plat}/*.mod +%{_libexecdir}/%{qemu_arch}-%{qemu_plat}/*.module +%{_libexecdir}/%{qemu_arch}-%{qemu_plat}/config.h +%{_libexecdir}/%{qemu_arch}-%{qemu_plat}/gdb_grub +%{_libexecdir}/%{qemu_arch}-%{qemu_plat}/gmodule.pl +%{_libexecdir}/%{qemu_arch}-%{qemu_plat}/boot.image +%{_libexecdir}/%{qemu_arch}-%{qemu_plat}/boot.img +%{_libexecdir}/%{qemu_arch}-%{qemu_plat}/kernel.exec +%{_libexecdir}/%{qemu_arch}-%{qemu_plat}/kernel.img %endif -%if %{with efi} -%files platform-efi +%if %{with uboot} +%files platform-uboot +%defattr(644,root,root,755) +%dir %{_libexecdir}/arm-uboot +%{_libexecdir}/arm-uboot/modinfo.sh +%{_libexecdir}/arm-uboot/*.lst +%{_libexecdir}/arm-uboot/*.mod +%{_libexecdir}/arm-uboot/*.module +%{_libexecdir}/arm-uboot/config.h +%{_libexecdir}/arm-uboot/gdb_grub +%{_libexecdir}/arm-uboot/gmodule.pl +%{_libexecdir}/arm-uboot/kernel.exec +%{_libexecdir}/arm-uboot/kernel.img +%endif + +%if %{with xen} +%files platform-xen %defattr(644,root,root,755) -%dir %{_libexecdir}/*-efi -%{_libexecdir}/*-efi/modinfo.sh -%{_libexecdir}/*-efi/*.exec -%{_libexecdir}/*-efi/*.lst -%{_libexecdir}/*-efi/*.mod -%{_libexecdir}/*-efi/*.module -%{_libexecdir}/*-efi/config.h -%{_libexecdir}/*-efi/gdb_grub -%{_libexecdir}/*-efi/gmodule.pl -%{_libexecdir}/*-efi/kernel.img +%dir %{_libexecdir}/%{xen_arch}-xen +%{_libexecdir}/%{xen_arch}-xen/modinfo.sh +%{_libexecdir}/%{xen_arch}-xen/*.lst +%{_libexecdir}/%{xen_arch}-xen/*.mod +%{_libexecdir}/%{xen_arch}-xen/*.module +%{_libexecdir}/%{xen_arch}-xen/config.h +%{_libexecdir}/%{xen_arch}-xen/gdb_grub +%{_libexecdir}/%{xen_arch}-xen/gmodule.pl +%{_libexecdir}/%{xen_arch}-xen/kernel.exec +%{_libexecdir}/%{xen_arch}-xen/kernel.img +%endif + +%if %{with xen_pvh} +%files platform-xen_pvh +%defattr(644,root,root,755) +%dir %{_libexecdir}/i386-xen_pvh +%{_libexecdir}/i386-xen_pvh/modinfo.sh +%{_libexecdir}/i386-xen_pvh/*.lst +%{_libexecdir}/i386-xen_pvh/*.mod +%{_libexecdir}/i386-xen_pvh/*.module +%{_libexecdir}/i386-xen_pvh/config.h +%{_libexecdir}/i386-xen_pvh/gdb_grub +%{_libexecdir}/i386-xen_pvh/gmodule.pl +%{_libexecdir}/i386-xen_pvh/kernel.exec +%{_libexecdir}/i386-xen_pvh/kernel.img +%if %{with efiemu} +%{_libexecdir}/i386-xen_pvh/efiemu*.o +%endif %endif %files mkfont @@ -565,7 +976,3 @@ fi %files theme-starfield %defattr(644,root,root,755) %{_datadir}/grub/themes/starfield - -%files -n bash-completion-%{name} -%defattr(644,root,root,755) -/etc/bash_completion.d/grub diff --git a/ignore-kernel-symlinks.patch b/ignore-kernel-symlinks.patch index 23f3adc..f854139 100644 --- a/ignore-kernel-symlinks.patch +++ b/ignore-kernel-symlinks.patch @@ -1,7 +1,6 @@ -diff -ur grub-2.04.orig/util/grub-mkconfig_lib.in grub-2.04/util/grub-mkconfig_lib.in ---- grub-2.04.orig/util/grub-mkconfig_lib.in 2019-08-18 15:53:18.700000000 +0200 -+++ grub-2.04/util/grub-mkconfig_lib.in 2019-08-18 15:53:29.906000000 +0200 -@@ -183,6 +183,9 @@ +--- grub-2.00/util/grub-mkconfig_lib.in~ 2013-04-15 00:03:09.102253190 +0200 ++++ grub-2.00/util/grub-mkconfig_lib.in 2013-04-15 00:54:39.189605003 +0200 +@@ -174,6 +174,9 @@ grub_file_is_not_garbage () { diff --git a/just-say-linux.patch b/just-say-linux.patch index 21eeed9..97cecbc 100644 --- a/just-say-linux.patch +++ b/just-say-linux.patch @@ -1,7 +1,7 @@ -diff -ur grub-2.04.orig/util/grub.d/10_linux.in grub-2.04/util/grub.d/10_linux.in ---- grub-2.04.orig/util/grub.d/10_linux.in 2019-08-18 15:50:55.155000000 +0200 -+++ grub-2.04/util/grub.d/10_linux.in 2019-08-18 15:53:05.494000000 +0200 -@@ -29,9 +29,9 @@ +diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/10_linux.in grub-2.00.git20131218/util/grub.d/10_linux.in +--- grub-2.00.git20131218.orig/util/grub.d/10_linux.in 2013-12-18 14:41:17.000000000 +0100 ++++ grub-2.00.git20131218/util/grub.d/10_linux.in 2013-12-18 14:42:46.000000000 +0100 +@@ -54,9 +54,9 @@ CLASS="--class gnu-linux --class gnu --class os" if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then @@ -13,10 +13,10 @@ diff -ur grub-2.04.orig/util/grub.d/10_linux.in grub-2.04/util/grub.d/10_linux.i CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}" fi -diff -ur grub-2.04.orig/util/grub.d/20_linux_xen.in grub-2.04/util/grub.d/20_linux_xen.in ---- grub-2.04.orig/util/grub.d/20_linux_xen.in 2019-08-18 15:50:55.155000000 +0200 -+++ grub-2.04/util/grub.d/20_linux_xen.in 2019-08-18 15:53:05.494000000 +0200 -@@ -29,9 +29,9 @@ +diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/20_linux_xen.in grub-2.00.git20131218/util/grub.d/20_linux_xen.in +--- grub-2.00.git20131218.orig/util/grub.d/20_linux_xen.in 2013-12-18 14:41:17.000000000 +0100 ++++ grub-2.00.git20131218/util/grub.d/20_linux_xen.in 2013-12-18 14:43:11.000000000 +0100 +@@ -33,9 +33,9 @@ CLASS="--class gnu-linux --class gnu --class os --class xen" if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then diff --git a/restricted.patch b/restricted.patch index 53c1e42..9f5b20a 100644 --- a/restricted.patch +++ b/restricted.patch @@ -1,6 +1,6 @@ -diff -ur grub-2.04.orig/util/grub.d/10_linux.in grub-2.04/util/grub.d/10_linux.in ---- grub-2.04.orig/util/grub.d/10_linux.in 2019-08-18 15:58:15.105000000 +0200 -+++ grub-2.04/util/grub.d/10_linux.in 2019-08-18 15:58:28.665000000 +0200 +diff -ur grub-2.06.orig/util/grub.d/10_linux.in grub-2.06/util/grub.d/10_linux.in +--- grub-2.06.orig/util/grub.d/10_linux.in 2022-08-30 02:18:01.042920967 +0200 ++++ grub-2.06/util/grub.d/10_linux.in 2022-08-30 02:18:53.263002735 +0200 @@ -28,6 +28,12 @@ CLASS="--class gnu-linux --class gnu --class os" @@ -26,10 +26,10 @@ diff -ur grub-2.04.orig/util/grub.d/10_linux.in grub-2.04/util/grub.d/10_linux.i fi if [ x$type != xrecovery ] ; then save_default_entry | grub_add_tab -diff -ur grub-2.04.orig/util/grub.d/30_os-prober.in grub-2.04/util/grub.d/30_os-prober.in ---- grub-2.04.orig/util/grub.d/30_os-prober.in 2019-08-18 15:58:15.105000000 +0200 -+++ grub-2.04/util/grub.d/30_os-prober.in 2019-08-18 15:58:28.665000000 +0200 -@@ -30,6 +30,12 @@ +diff -ur grub-2.06.orig/util/grub.d/30_os-prober.in grub-2.06/util/grub.d/30_os-prober.in +--- grub-2.06.orig/util/grub.d/30_os-prober.in 2022-08-30 02:18:01.035920956 +0200 ++++ grub-2.06/util/grub.d/30_os-prober.in 2022-08-30 02:20:26.805149188 +0200 +@@ -31,6 +31,12 @@ exit 0 fi @@ -39,10 +39,10 @@ diff -ur grub-2.04.orig/util/grub.d/30_os-prober.in grub-2.04/util/grub.d/30_os- + GRUB_UNRESTRICTED_OPTION="--unrestricted" +fi + - if [ -z "`which os-prober 2> /dev/null`" ] || [ -z "`which linux-boot-prober 2> /dev/null`" ] ; then + if ! command -v os-prober > /dev/null || ! command -v linux-boot-prober > /dev/null ; then # missing os-prober and/or linux-boot-prober exit 0 -@@ -52,7 +58,7 @@ +@@ -55,7 +61,7 @@ # TRANSLATORS: it refers on the OS residing on device %s onstr="$(gettext_printf "(on %s)" "${DEVICE}")" cat << EOF @@ -51,7 +51,7 @@ diff -ur grub-2.04.orig/util/grub.d/30_os-prober.in grub-2.04/util/grub.d/30_os- EOF save_default_entry | grub_add_tab prepare_grub_to_access_device ${DEVICE} | grub_add_tab -@@ -148,7 +154,7 @@ +@@ -151,7 +157,7 @@ onstr="$(gettext_printf "(on %s)" "${DEVICE}")" cat << EOF @@ -60,7 +60,7 @@ diff -ur grub-2.04.orig/util/grub.d/30_os-prober.in grub-2.04/util/grub.d/30_os- EOF save_default_entry | grub_add_tab prepare_grub_to_access_device ${DEVICE} | grub_add_tab -@@ -180,7 +186,7 @@ +@@ -183,7 +189,7 @@ DEVICE=${DEVICE%@*} onstr="$(gettext_printf "(on %s)" "${DEVICE}")" cat << EOF @@ -69,16 +69,16 @@ diff -ur grub-2.04.orig/util/grub.d/30_os-prober.in grub-2.04/util/grub.d/30_os- EOF save_default_entry | sed -e "s/^/\t/" prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/" -@@ -236,7 +242,7 @@ +@@ -247,7 +253,7 @@ - if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then + if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then cat << EOF -menuentry '$(echo "$OS $onstr" | grub_quote)' $CLASS --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' { +menuentry '$(echo "$OS $onstr" | grub_quote)' $CLASS --class gnu-linux --class gnu --class os ${GRUB_UNRESTRICTED_OPTION} \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' { EOF save_default_entry | grub_add_tab printf '%s\n' "${prepare_boot_cache}" -@@ -256,7 +262,7 @@ +@@ -267,7 +273,7 @@ fi title="${LLABEL} $onstr" cat << EOF @@ -87,7 +87,7 @@ diff -ur grub-2.04.orig/util/grub.d/30_os-prober.in grub-2.04/util/grub.d/30_os- EOF save_default_entry | sed -e "s/^/$grub_tab$grub_tab/" printf '%s\n' "${prepare_boot_cache}" | grub_add_tab -@@ -293,7 +299,7 @@ +@@ -304,7 +310,7 @@ hurd) onstr="$(gettext_printf "(on %s)" "${DEVICE}")" cat << EOF @@ -96,10 +96,10 @@ diff -ur grub-2.04.orig/util/grub.d/30_os-prober.in grub-2.04/util/grub.d/30_os- EOF save_default_entry | grub_add_tab prepare_grub_to_access_device ${DEVICE} | grub_add_tab -diff -ur grub-2.04.orig/util/grub-mkconfig.in grub-2.04/util/grub-mkconfig.in ---- grub-2.04.orig/util/grub-mkconfig.in 2019-08-18 15:58:15.106000000 +0200 -+++ grub-2.04/util/grub-mkconfig.in 2019-08-18 15:58:28.666000000 +0200 -@@ -254,7 +254,8 @@ +diff -ur grub-2.06.orig/util/grub-mkconfig.in grub-2.06/util/grub-mkconfig.in +--- grub-2.06.orig/util/grub-mkconfig.in 2022-08-30 02:18:01.036920957 +0200 ++++ grub-2.06/util/grub-mkconfig.in 2022-08-30 02:18:53.264002736 +0200 +@@ -267,7 +267,8 @@ GRUB_ENABLE_CRYPTODISK \ GRUB_BADRAM \ GRUB_OS_PROBER_SKIP_LIST \