From: Marcin Krol Date: Sun, 27 Apr 2025 15:52:24 +0000 (+0200) Subject: - don't force unrestricted boot in OS prober X-Git-Url: https://git.tld-linux.org/?p=packages%2Fgrub2.git;a=commitdiff_plain;h=HEAD;hp=f95a1ca1ec8ddd7b01b033fd552bc7619faed11e - don't force unrestricted boot in OS prober --- diff --git a/add-vlan-tag-support.patch b/add-vlan-tag-support.patch deleted file mode 100644 index 42fde72..0000000 --- a/add-vlan-tag-support.patch +++ /dev/null @@ -1,157 +0,0 @@ -diff -urNp grub-2.02-rc1.orig/grub-core/kern/ieee1275/init.c grub-2.02-rc1/grub-core/kern/ieee1275/init.c ---- grub-2.02-rc1.orig/grub-core/kern/ieee1275/init.c 2017-02-08 15:06:05.420317447 +0000 -+++ grub-2.02-rc1/grub-core/kern/ieee1275/init.c 2017-02-08 15:06:17.784317308 +0000 -@@ -125,6 +125,7 @@ grub_machine_get_bootlocation (char **de - char *dev, *canon; - char *ptr; - dev = grub_ieee1275_get_aliasdevname (bootpath); -+ grub_ieee1275_parse_net_options (bootpath); - canon = grub_ieee1275_canonicalise_devname (dev); - ptr = canon + grub_strlen (canon) - 1; - while (ptr > canon && (*ptr == ',' || *ptr == ':')) -diff -urNp grub-2.02-rc1.orig/grub-core/kern/ieee1275/openfw.c grub-2.02-rc1/grub-core/kern/ieee1275/openfw.c ---- grub-2.02-rc1.orig/grub-core/kern/ieee1275/openfw.c 2017-02-08 15:06:05.420317447 +0000 -+++ grub-2.02-rc1/grub-core/kern/ieee1275/openfw.c 2017-02-08 15:06:17.785317308 +0000 -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - - enum grub_ieee1275_parse_type - { -@@ -451,6 +452,35 @@ fail: - return ret; - } - -+int -+grub_ieee1275_parse_net_options (const char *path) -+{ -+ char *comma; -+ char *args; -+ char *option = 0; -+ -+ args = grub_ieee1275_get_devargs (path); -+ if (!args) -+ /* There is no option. */ -+ return -1; -+ -+ do -+ { -+ comma = grub_strchr (args, ','); -+ if (! comma) -+ option = grub_strdup (args); -+ else -+ option = grub_strndup (args, (grub_size_t)(comma - args)); -+ args = comma + 1; -+ -+ if (! grub_strncmp(option, "vtag", 4)) -+ grub_env_set ("vlan-tag", option + grub_strlen("vtag=")); -+ -+ } while (comma); -+ -+ return 0; -+} -+ - char * - grub_ieee1275_get_device_type (const char *path) - { -diff -urNp grub-2.02-rc1.orig/grub-core/net/ethernet.c grub-2.02-rc1/grub-core/net/ethernet.c ---- grub-2.02-rc1.orig/grub-core/net/ethernet.c 2017-02-08 15:06:05.433317447 +0000 -+++ grub-2.02-rc1/grub-core/net/ethernet.c 2017-02-08 15:06:17.785317308 +0000 -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -56,10 +57,19 @@ send_ethernet_packet (struct grub_net_ne - { - struct etherhdr *eth; - grub_err_t err; -+ grub_uint32_t vlantag = 0; -+ grub_uint8_t etherhdr_size; - -- COMPILE_TIME_ASSERT (sizeof (*eth) < GRUB_NET_MAX_LINK_HEADER_SIZE); -+ etherhdr_size = sizeof (*eth); -+ COMPILE_TIME_ASSERT (sizeof (*eth) + 4 < GRUB_NET_MAX_LINK_HEADER_SIZE); - -- err = grub_netbuff_push (nb, sizeof (*eth)); -+ const char *vlantag_text = grub_env_get ("vlan-tag"); -+ if (vlantag_text != 0) { -+ etherhdr_size += 4; -+ vlantag = grub_strtoul (vlantag_text, 0, 16); -+ } -+ -+ err = grub_netbuff_push (nb, etherhdr_size); - if (err) - return err; - eth = (struct etherhdr *) nb->data; -@@ -76,6 +86,19 @@ send_ethernet_packet (struct grub_net_ne - return err; - inf->card->opened = 1; - } -+ -+ /* Check if a vlan-tag is needed. */ -+ if (vlantag != 0) -+ { -+ /* Move eth type to the right */ -+ grub_memcpy((char *) nb->data + etherhdr_size - 2, -+ (char *) nb->data + etherhdr_size - 6, 2); -+ -+ /* Add the tag in the middle */ -+ grub_memcpy((char *) nb->data + etherhdr_size - 6, -+ &vlantag, 4); -+ } -+ - return inf->card->driver->send (inf->card, nb); - } - -@@ -90,10 +113,23 @@ grub_net_recv_ethernet_packet (struct gr - grub_net_link_level_address_t hwaddress; - grub_net_link_level_address_t src_hwaddress; - grub_err_t err; -+ grub_uint8_t etherhdr_size = sizeof (*eth); -+ -+ grub_uint16_t vlantag_identifier = 0; -+ grub_memcpy (&vlantag_identifier, nb->data + etherhdr_size - 2, 2); -+ -+ /* Check if a vlan-tag is present. */ -+ if (vlantag_identifier == VLANTAG_IDENTIFIER) -+ { -+ etherhdr_size += 4; -+ /* Move eth type to the original position */ -+ grub_memcpy((char *) nb->data + etherhdr_size - 6, -+ (char *) nb->data + etherhdr_size - 2, 2); -+ } - - eth = (struct etherhdr *) nb->data; - type = grub_be_to_cpu16 (eth->type); -- err = grub_netbuff_pull (nb, sizeof (*eth)); -+ err = grub_netbuff_pull (nb, etherhdr_size); - if (err) - return err; - -diff -urNp grub-2.02-rc1.orig/include/grub/ieee1275/ieee1275.h grub-2.02-rc1/include/grub/ieee1275/ieee1275.h ---- grub-2.02-rc1.orig/include/grub/ieee1275/ieee1275.h 2017-02-08 15:06:05.445317447 +0000 -+++ grub-2.02-rc1/include/grub/ieee1275/ieee1275.h 2017-02-08 15:06:17.787317308 +0000 -@@ -227,6 +227,7 @@ char *EXPORT_FUNC(grub_ieee1275_get_alia - char *EXPORT_FUNC(grub_ieee1275_canonicalise_devname) (const char *path); - char *EXPORT_FUNC(grub_ieee1275_get_device_type) (const char *path); - char *EXPORT_FUNC(grub_ieee1275_get_devname) (const char *path); -+int EXPORT_FUNC(grub_ieee1275_parse_net_options) (const char *path); - - void EXPORT_FUNC(grub_ieee1275_devalias_init_iterator) (struct grub_ieee1275_devalias *alias); - void EXPORT_FUNC(grub_ieee1275_devalias_free) (struct grub_ieee1275_devalias *alias); -diff -urNp grub-2.02-rc1.orig/include/grub/net.h grub-2.02-rc1/include/grub/net.h ---- grub-2.02-rc1.orig/include/grub/net.h 2017-02-08 15:06:05.446317447 +0000 -+++ grub-2.02-rc1/include/grub/net.h 2017-02-08 15:06:17.788317308 +0000 -@@ -561,4 +561,6 @@ extern char *grub_net_default_server; - #define GRUB_NET_INTERVAL 400 - #define GRUB_NET_INTERVAL_ADDITION 20 - -+#define VLANTAG_IDENTIFIER 0x8100 -+ - #endif /* ! GRUB_NET_HEADER */ diff --git a/blscfg.patch b/blscfg.patch index 356661a..d7749a6 100644 --- a/blscfg.patch +++ b/blscfg.patch @@ -1,7 +1,67 @@ -diff -urNp grub-2.02-rc1.orig/grub-core/commands/blscfg.c grub-2.02-rc1/grub-core/commands/blscfg.c ---- grub-2.02-rc1.orig/grub-core/commands/blscfg.c 1970-01-01 00:00:00.000000000 +0000 -+++ grub-2.02-rc1/grub-core/commands/blscfg.c 2017-02-08 15:09:21.548315239 +0000 -@@ -0,0 +1,201 @@ +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 -*-*/ + +/* bls.c - implementation of the boot loader spec */ @@ -23,6 +83,7 @@ diff -urNp grub-2.02-rc1.orig/grub-core/commands/blscfg.c grub-2.02-rc1/grub-cor + * along with GRUB. If not, see . + */ + ++#include +#include +#include +#include @@ -34,143 +95,936 @@ diff -urNp grub-2.02-rc1.orig/grub-core/commands/blscfg.c grub-2.02-rc1/grub-cor +#include +#include +#include ++#include ++ ++#include + +GRUB_MOD_LICENSE ("GPLv3+"); + -+#ifdef GRUB_MACHINE_EFI -+#define GRUB_LINUX_CMD "linuxefi" -+#define GRUB_INITRD_CMD "initrdefi" -+#define GRUB_BLS_CONFIG_PATH "/EFI/fedora/loader/entries/" -+#define GRUB_BOOT_DEVICE "($boot)" -+#else -+#define GRUB_LINUX_CMD "linux" -+#define GRUB_INITRD_CMD "initrd" ++#include "loadenv.h" ++ +#define GRUB_BLS_CONFIG_PATH "/loader/entries/" ++#ifdef GRUB_MACHINE_EMU ++#define GRUB_BOOT_DEVICE "/boot" ++#else +#define GRUB_BOOT_DEVICE "($root)" +#endif + -+static int parse_entry ( ++struct keyval ++{ ++ const char *key; ++ char *val; ++}; ++ ++static struct bls_entry *entries = NULL; ++ ++#define FOR_BLS_ENTRIES(var) FOR_LIST_ELEMENTS (var, entries) ++ ++static int bls_add_keyval(struct bls_entry *entry, char *key, char *val) ++{ ++ char *k, *v; ++ struct keyval **kvs, *kv; ++ int new_n = entry->nkeyvals + 1; ++ ++ kvs = grub_realloc (entry->keyvals, new_n * sizeof (struct keyval *)); ++ if (!kvs) ++ return grub_error (GRUB_ERR_OUT_OF_MEMORY, ++ "couldn't find space for BLS entry"); ++ entry->keyvals = kvs; ++ ++ kv = grub_malloc (sizeof (struct keyval)); ++ if (!kv) ++ return grub_error (GRUB_ERR_OUT_OF_MEMORY, ++ "couldn't find space for BLS entry"); ++ ++ k = grub_strdup (key); ++ if (!k) ++ { ++ grub_free (kv); ++ return grub_error (GRUB_ERR_OUT_OF_MEMORY, ++ "couldn't find space for BLS entry"); ++ } ++ ++ v = grub_strdup (val); ++ if (!v) ++ { ++ grub_free (k); ++ grub_free (kv); ++ return grub_error (GRUB_ERR_OUT_OF_MEMORY, ++ "couldn't find space for BLS entry"); ++ } ++ ++ kv->key = k; ++ kv->val = v; ++ ++ entry->keyvals[entry->nkeyvals] = kv; ++ grub_dprintf("blscfg", "new keyval at %p:%s:%s\n", entry->keyvals[entry->nkeyvals], k, v); ++ entry->nkeyvals = new_n; ++ ++ return 0; ++} ++ ++/* Find they value of the key named by keyname. If there are allowed to be ++ * more than one, pass a pointer to an int set to -1 the first time, and pass ++ * the same pointer through each time after, and it'll return them in sorted ++ * order as defined in the BLS fragment file */ ++static char *bls_get_val(struct bls_entry *entry, const char *keyname, int *last) ++{ ++ int idx, start = 0; ++ struct keyval *kv = NULL; ++ ++ if (last) ++ start = *last + 1; ++ ++ for (idx = start; idx < entry->nkeyvals; idx++) { ++ kv = entry->keyvals[idx]; ++ ++ if (!grub_strcmp (keyname, kv->key)) ++ break; ++ } ++ ++ if (idx == entry->nkeyvals) { ++ if (last) ++ *last = -1; ++ return NULL; ++ } ++ ++ if (last) ++ *last = idx; ++ ++ return kv->val; ++} ++ ++#define goto_return(x) ({ ret = (x); goto finish; }) ++ ++/* compare alpha and numeric segments of two versions */ ++/* return 1: a is newer than b */ ++/* 0: a and b are the same version */ ++/* -1: b is newer than a */ ++static int vercmp(const char * a, const char * b) ++{ ++ char oldch1, oldch2; ++ char *abuf, *bbuf; ++ char *str1, *str2; ++ char * one, * two; ++ int rc; ++ int isnum; ++ int ret = 0; ++ ++ grub_dprintf("blscfg", "%s comparing %s and %s\n", __func__, a, b); ++ if (!grub_strcmp(a, b)) ++ return 0; ++ ++ abuf = grub_malloc(grub_strlen(a) + 1); ++ bbuf = grub_malloc(grub_strlen(b) + 1); ++ str1 = abuf; ++ str2 = bbuf; ++ grub_strcpy(str1, a); ++ grub_strcpy(str2, b); ++ ++ one = str1; ++ two = str2; ++ ++ /* loop through each version segment of str1 and str2 and compare them */ ++ while (*one || *two) { ++ while (*one && !grub_isalnum(*one) && *one != '~') one++; ++ while (*two && !grub_isalnum(*two) && *two != '~') two++; ++ ++ /* handle the tilde separator, it sorts before everything else */ ++ if (*one == '~' || *two == '~') { ++ if (*one != '~') goto_return (1); ++ if (*two != '~') goto_return (-1); ++ one++; ++ two++; ++ continue; ++ } ++ ++ /* If we ran to the end of either, we are finished with the loop */ ++ if (!(*one && *two)) break; ++ ++ str1 = one; ++ str2 = two; ++ ++ /* grab first completely alpha or completely numeric segment */ ++ /* leave one and two pointing to the start of the alpha or numeric */ ++ /* segment and walk str1 and str2 to end of segment */ ++ if (grub_isdigit(*str1)) { ++ while (*str1 && grub_isdigit(*str1)) str1++; ++ while (*str2 && grub_isdigit(*str2)) str2++; ++ isnum = 1; ++ } else { ++ while (*str1 && grub_isalpha(*str1)) str1++; ++ while (*str2 && grub_isalpha(*str2)) str2++; ++ isnum = 0; ++ } ++ ++ /* save character at the end of the alpha or numeric segment */ ++ /* so that they can be restored after the comparison */ ++ oldch1 = *str1; ++ *str1 = '\0'; ++ oldch2 = *str2; ++ *str2 = '\0'; ++ ++ /* this cannot happen, as we previously tested to make sure that */ ++ /* the first string has a non-null segment */ ++ if (one == str1) goto_return(-1); /* arbitrary */ ++ ++ /* take care of the case where the two version segments are */ ++ /* different types: one numeric, the other alpha (i.e. empty) */ ++ /* numeric segments are always newer than alpha segments */ ++ /* XXX See patch #60884 (and details) from bugzilla #50977. */ ++ if (two == str2) goto_return (isnum ? 1 : -1); ++ ++ if (isnum) { ++ grub_size_t onelen, twolen; ++ /* this used to be done by converting the digit segments */ ++ /* to ints using atoi() - it's changed because long */ ++ /* digit segments can overflow an int - this should fix that. */ ++ ++ /* throw away any leading zeros - it's a number, right? */ ++ while (*one == '0') one++; ++ while (*two == '0') two++; ++ ++ /* whichever number has more digits wins */ ++ onelen = grub_strlen(one); ++ twolen = grub_strlen(two); ++ if (onelen > twolen) goto_return (1); ++ if (twolen > onelen) goto_return (-1); ++ } ++ ++ /* grub_strcmp will return which one is greater - even if the two */ ++ /* segments are alpha or if they are numeric. don't return */ ++ /* if they are equal because there might be more segments to */ ++ /* compare */ ++ rc = grub_strcmp(one, two); ++ if (rc) goto_return (rc < 1 ? -1 : 1); ++ ++ /* restore character that was replaced by null above */ ++ *str1 = oldch1; ++ one = str1; ++ *str2 = oldch2; ++ two = str2; ++ } ++ ++ /* this catches the case where all numeric and alpha segments have */ ++ /* compared identically but the segment sepparating characters were */ ++ /* different */ ++ if ((!*one) && (!*two)) goto_return (0); ++ ++ /* whichever version still has characters left over wins */ ++ if (!*one) goto_return (-1); else goto_return (1); ++ ++finish: ++ grub_free (abuf); ++ grub_free (bbuf); ++ return ret; ++} ++ ++/* returns name/version/release */ ++/* NULL string pointer returned if nothing found */ ++static void ++split_package_string (char *package_string, char **name, ++ char **version, char **release) ++{ ++ char *package_version, *package_release; ++ ++ /* Release */ ++ package_release = grub_strrchr (package_string, '-'); ++ ++ if (package_release != NULL) ++ *package_release++ = '\0'; ++ ++ *release = package_release; ++ ++ if (name == NULL) ++ { ++ *version = package_string; ++ } ++ else ++ { ++ /* Version */ ++ package_version = grub_strrchr(package_string, '-'); ++ ++ if (package_version != NULL) ++ *package_version++ = '\0'; ++ ++ *version = package_version; ++ /* Name */ ++ *name = package_string; ++ } ++ ++ /* Bubble up non-null values from release to name */ ++ if (name != NULL && *name == NULL) ++ { ++ *name = (*version == NULL ? *release : *version); ++ *version = *release; ++ *release = NULL; ++ } ++ if (*version == NULL) ++ { ++ *version = *release; ++ *release = NULL; ++ } ++} ++ ++static int ++split_cmp(char *nvr0, char *nvr1, int has_name) ++{ ++ int ret = 0; ++ char *name0, *version0, *release0; ++ char *name1, *version1, *release1; ++ ++ split_package_string(nvr0, has_name ? &name0 : NULL, &version0, &release0); ++ split_package_string(nvr1, has_name ? &name1 : NULL, &version1, &release1); ++ ++ if (has_name) ++ { ++ ret = vercmp(name0 == NULL ? "" : name0, ++ name1 == NULL ? "" : name1); ++ if (ret != 0) ++ return ret; ++ } ++ ++ ret = vercmp(version0 == NULL ? "" : version0, ++ version1 == NULL ? "" : version1); ++ if (ret != 0) ++ return ret; ++ ++ ret = vercmp(release0 == NULL ? "" : release0, ++ release1 == NULL ? "" : release1); ++ return ret; ++} ++ ++/* return 1: e0 is newer than e1 */ ++/* 0: e0 and e1 are the same version */ ++/* -1: e1 is newer than e0 */ ++static int bls_cmp(const struct bls_entry *e0, const struct bls_entry *e1) ++{ ++ char *id0, *id1; ++ int r; ++ ++ id0 = grub_strdup(e0->filename); ++ id1 = grub_strdup(e1->filename); ++ ++ r = split_cmp(id0, id1, 1); ++ ++ grub_free(id0); ++ grub_free(id1); ++ ++ return r; ++} ++ ++static void list_add_tail(struct bls_entry *head, struct bls_entry *item) ++{ ++ item->next = head; ++ if (head->prev) ++ head->prev->next = item; ++ item->prev = head->prev; ++ head->prev = item; ++} ++ ++static int bls_add_entry(struct bls_entry *entry) ++{ ++ struct bls_entry *e, *last = NULL; ++ int rc; ++ ++ if (!entries) { ++ grub_dprintf ("blscfg", "Add entry with id \"%s\"\n", entry->filename); ++ entries = entry; ++ return 0; ++ } ++ ++ FOR_BLS_ENTRIES(e) { ++ rc = bls_cmp(entry, e); ++ ++ if (!rc) ++ return GRUB_ERR_BAD_ARGUMENT; ++ ++ if (rc == 1) { ++ grub_dprintf ("blscfg", "Add entry with id \"%s\"\n", entry->filename); ++ list_add_tail (e, entry); ++ if (e == entries) { ++ entries = entry; ++ entry->prev = NULL; ++ } ++ return 0; ++ } ++ last = e; ++ } ++ ++ if (last) { ++ grub_dprintf ("blscfg", "Add entry with id \"%s\"\n", entry->filename); ++ last->next = entry; ++ entry->prev = last; ++ } ++ ++ return 0; ++} ++ ++struct read_entry_info { ++ const char *devid; ++ const char *dirname; ++ grub_file_t file; ++}; ++ ++static int read_entry ( + const char *filename, -+ const struct grub_dirhook_info *info __attribute__ ((unused)), -+ void *data __attribute__ ((unused))) ++ const struct grub_dirhook_info *dirhook_info UNUSED, ++ void *data) +{ -+ grub_size_t n; -+ char *p; ++ grub_size_t m = 0, n, clip = 0; ++ int rc = 0; ++ char *p = NULL; + grub_file_t f = NULL; -+ grub_off_t sz; -+ char *title = NULL, *options = NULL, *clinux = NULL, *initrd = NULL, *src = NULL; -+ const char *args[2] = { NULL, NULL }; ++ struct bls_entry *entry; ++ struct read_entry_info *info = (struct read_entry_info *)data; + -+ if (filename[0] == '.') -+ return 0; ++ grub_dprintf ("blscfg", "filename: \"%s\"\n", filename); + + n = grub_strlen (filename); -+ if (n <= 5) -+ return 0; + -+ if (grub_strcmp (filename + n - 5, ".conf") != 0) -+ return 0; ++ if (info->file) ++ { ++ f = info->file; ++ } ++ else ++ { ++ if (filename[0] == '.') ++ return 0; ++ ++ if (n <= 5) ++ return 0; + -+ p = grub_xasprintf (GRUB_BLS_CONFIG_PATH "%s", filename); ++ if (grub_strcmp (filename + n - 5, ".conf") != 0) ++ return 0; + -+ f = grub_file_open (p); -+ if (!f) ++ p = grub_xasprintf ("(%s)%s/%s", info->devid, info->dirname, filename); ++ ++ f = grub_file_open (p, GRUB_FILE_TYPE_CONFIG); ++ if (!f) ++ goto finish; ++ } ++ ++ entry = grub_zalloc (sizeof (*entry)); ++ if (!entry) + goto finish; + -+ sz = grub_file_size (f); -+ if (sz == GRUB_FILE_SIZE_UNKNOWN || sz > 1024*1024) ++ if (info->file) ++ { ++ char *slash; ++ ++ if (n > 5 && !grub_strcmp (filename + n - 5, ".conf") == 0) ++ clip = 5; ++ ++ slash = grub_strrchr (filename, '/'); ++ if (!slash) ++ slash = grub_strrchr (filename, '\\'); ++ ++ while (*slash == '/' || *slash == '\\') ++ slash++; ++ ++ m = slash ? slash - filename : 0; ++ } ++ else ++ { ++ m = 0; ++ clip = 5; ++ } ++ n -= m; ++ ++ entry->filename = grub_strndup(filename + m, n - clip); ++ if (!entry->filename) + goto finish; + ++ entry->filename[n - 5] = '\0'; ++ + for (;;) + { + char *buf; ++ char *separator; + + buf = grub_file_getline (f); + if (!buf) + break; + -+ if (grub_strncmp (buf, "title ", 6) == 0) ++ while (buf && buf[0] && (buf[0] == ' ' || buf[0] == '\t')) ++ buf++; ++ if (buf[0] == '#') ++ continue; ++ ++ separator = grub_strchr (buf, ' '); ++ ++ if (!separator) ++ separator = grub_strchr (buf, '\t'); ++ ++ if (!separator || separator[1] == '\0') + { -+ grub_free (title); -+ title = grub_strdup (buf + 6); -+ if (!title) -+ goto finish; ++ grub_free (buf); ++ break; + } -+ else if (grub_strncmp (buf, "options ", 8) == 0) ++ ++ separator[0] = '\0'; ++ ++ do { ++ separator++; ++ } while (*separator == ' ' || *separator == '\t'); ++ ++ rc = bls_add_keyval (entry, buf, separator); ++ grub_free (buf); ++ if (rc < 0) ++ break; ++ } ++ ++ if (!rc) ++ bls_add_entry(entry); ++ ++finish: ++ if (p) ++ grub_free (p); ++ ++ if (f) ++ grub_file_close (f); ++ ++ return 0; ++} ++ ++static grub_envblk_t saved_env = NULL; ++ ++static int UNUSED ++save_var (const char *name, const char *value, void *whitelist UNUSED) ++{ ++ const char *val = grub_env_get (name); ++ grub_dprintf("blscfg", "saving \"%s\"\n", name); ++ ++ if (val) ++ grub_envblk_set (saved_env, name, value); ++ ++ return 0; ++} ++ ++static int UNUSED ++unset_var (const char *name, const char *value UNUSED, void *whitelist) ++{ ++ grub_dprintf("blscfg", "restoring \"%s\"\n", name); ++ if (! whitelist) ++ { ++ grub_env_unset (name); ++ return 0; ++ } ++ ++ if (test_whitelist_membership (name, ++ (const grub_env_whitelist_t *) whitelist)) ++ grub_env_unset (name); ++ ++ return 0; ++} ++ ++static char **bls_make_list (struct bls_entry *entry, const char *key, int *num) ++{ ++ int last = -1; ++ char *val; ++ ++ int nlist = 0; ++ char **list = NULL; ++ ++ list = grub_malloc (sizeof (char *)); ++ if (!list) ++ return NULL; ++ list[0] = NULL; ++ ++ while (1) ++ { ++ char **new; ++ ++ val = bls_get_val (entry, key, &last); ++ if (!val) ++ break; ++ ++ new = grub_realloc (list, (nlist + 2) * sizeof (char *)); ++ if (!new) ++ break; ++ ++ list = new; ++ list[nlist++] = val; ++ list[nlist] = NULL; ++ } ++ ++ if (num) ++ *num = nlist; ++ ++ return list; ++} ++ ++static char *field_append(bool is_var, char *buffer, char *start, char *end) ++{ ++ char *temp = grub_strndup(start, end - start + 1); ++ const char *field = temp; ++ ++ if (is_var) { ++ field = grub_env_get (temp); ++ if (!field) ++ return buffer; ++ } ++ ++ if (!buffer) { ++ buffer = grub_strdup(field); ++ if (!buffer) ++ return NULL; ++ } else { ++ buffer = grub_realloc (buffer, grub_strlen(buffer) + grub_strlen(field)); ++ if (!buffer) ++ return NULL; ++ ++ grub_stpcpy (buffer + grub_strlen(buffer), field); ++ } ++ ++ return buffer; ++} ++ ++static char *expand_val(char *value) ++{ ++ char *buffer = NULL; ++ char *start = value; ++ char *end = value; ++ bool is_var = false; ++ ++ if (!value) ++ return NULL; ++ ++ while (*value) { ++ if (*value == '$') { ++ if (start != end) { ++ buffer = field_append(is_var, buffer, start, end); ++ if (!buffer) ++ return NULL; ++ } ++ ++ is_var = true; ++ start = value + 1; ++ } else if (is_var) { ++ if (!grub_isalnum(*value) && *value != '_') { ++ buffer = field_append(is_var, buffer, start, end); ++ is_var = false; ++ start = value; ++ } ++ } ++ ++ end = value; ++ value++; ++ } ++ ++ if (start != end) { ++ buffer = field_append(is_var, buffer, start, end); ++ if (!buffer) ++ return NULL; ++ } ++ ++ return buffer; ++} ++ ++static char **early_initrd_list (const char *initrd) ++{ ++ int nlist = 0; ++ char **list = NULL; ++ char *separator; ++ ++ while ((separator = grub_strchr (initrd, ' '))) ++ { ++ list = grub_realloc (list, (nlist + 2) * sizeof (char *)); ++ if (!list) ++ return NULL; ++ ++ list[nlist++] = grub_strndup(initrd, separator - initrd); ++ list[nlist] = NULL; ++ initrd = separator + 1; ++ } ++ ++ list = grub_realloc (list, (nlist + 2) * sizeof (char *)); ++ if (!list) ++ return NULL; ++ ++ list[nlist++] = grub_strndup(initrd, grub_strlen(initrd)); ++ list[nlist] = NULL; ++ ++ return list; ++} ++ ++static void create_entry (struct bls_entry *entry) ++{ ++ int argc = 0; ++ const char **argv = NULL; ++ ++ char *title = NULL; ++ char *clinux = NULL; ++ char *options = NULL; ++ char **initrds = NULL; ++ char *initrd = NULL; ++ const char *early_initrd = NULL; ++ char **early_initrds = NULL; ++ char *initrd_prefix = NULL; ++ char *id = entry->filename; ++ char *dotconf = id; ++ char *hotkey = NULL; ++ ++ char *users = NULL; ++ char **classes = NULL; ++ ++ char **args = NULL; ++ ++ char *src = NULL; ++ int i, index; ++ ++ grub_dprintf("blscfg", "%s got here\n", __func__); ++ clinux = bls_get_val (entry, "linux", NULL); ++ if (!clinux) ++ { ++ grub_dprintf ("blscfg", "Skipping file %s with no 'linux' key.\n", entry->filename); ++ goto finish; ++ } ++ ++ /* ++ * strip the ".conf" off the end before we make it our "id" field. ++ */ ++ do ++ { ++ dotconf = grub_strstr(dotconf, ".conf"); ++ } while (dotconf != NULL && dotconf[5] != '\0'); ++ if (dotconf) ++ dotconf[0] = '\0'; ++ ++ title = bls_get_val (entry, "title", NULL); ++ options = expand_val (bls_get_val (entry, "options", NULL)); ++ ++ if (!options) ++ options = expand_val (grub_env_get("default_kernelopts")); ++ ++ initrds = bls_make_list (entry, "initrd", NULL); ++ ++ hotkey = bls_get_val (entry, "grub_hotkey", NULL); ++ users = expand_val (bls_get_val (entry, "grub_users", NULL)); ++ classes = bls_make_list (entry, "grub_class", NULL); ++ args = bls_make_list (entry, "grub_arg", &argc); ++ ++ argc += 1; ++ argv = grub_malloc ((argc + 1) * sizeof (char *)); ++ argv[0] = title ? title : clinux; ++ for (i = 1; i < argc; i++) ++ argv[i] = args[i-1]; ++ argv[argc] = NULL; ++ ++ early_initrd = grub_env_get("early_initrd"); ++ ++ grub_dprintf ("blscfg", "adding menu entry for \"%s\" with id \"%s\"\n", ++ title, id); ++ if (early_initrd) ++ { ++ early_initrds = early_initrd_list(early_initrd); ++ if (!early_initrds) ++ { ++ grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory")); ++ goto finish; ++ } ++ ++ if (initrds != NULL && initrds[0] != NULL) + { -+ grub_free (options); -+ options = grub_strdup (buf + 8); -+ if (!options) -+ goto finish; ++ initrd_prefix = grub_strrchr (initrds[0], '/'); ++ initrd_prefix = grub_strndup(initrds[0], initrd_prefix - initrds[0] + 1); + } -+ else if (grub_strncmp (buf, "linux ", 6) == 0) ++ else + { -+ grub_free (clinux); -+ clinux = grub_strdup (buf + 6); -+ if (!clinux) -+ goto finish; ++ initrd_prefix = grub_strrchr (clinux, '/'); ++ initrd_prefix = grub_strndup(clinux, initrd_prefix - clinux + 1); + } -+ else if (grub_strncmp (buf, "initrd ", 7) == 0) ++ ++ if (!initrd_prefix) + { -+ grub_free (initrd); -+ initrd = grub_strdup (buf + 7); -+ if (!initrd) -+ goto finish; ++ grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory")); ++ goto finish; + } -+ -+ grub_free(buf); + } + -+ if (!linux) ++ if (early_initrds || initrds) + { -+ grub_printf ("Skipping file %s with no 'linux' key.", p); -+ goto finish; -+ } ++ int initrd_size = sizeof ("initrd"); ++ char *tmp; ++ ++ for (i = 0; early_initrds != NULL && early_initrds[i] != NULL; i++) ++ initrd_size += sizeof (" " GRUB_BOOT_DEVICE) \ ++ + grub_strlen(initrd_prefix) \ ++ + grub_strlen (early_initrds[i]) + 1; ++ ++ for (i = 0; initrds != NULL && initrds[i] != NULL; i++) ++ initrd_size += sizeof (" " GRUB_BOOT_DEVICE) \ ++ + grub_strlen (initrds[i]) + 1; ++ initrd_size += 1; ++ ++ initrd = grub_malloc (initrd_size); ++ if (!initrd) ++ { ++ grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory")); ++ goto finish; ++ } ++ + -+ args[0] = title ? title : filename; ++ tmp = grub_stpcpy(initrd, "initrd"); ++ for (i = 0; early_initrds != NULL && early_initrds[i] != NULL; i++) ++ { ++ grub_dprintf ("blscfg", "adding early initrd %s\n", early_initrds[i]); ++ tmp = grub_stpcpy (tmp, " " GRUB_BOOT_DEVICE); ++ tmp = grub_stpcpy (tmp, initrd_prefix); ++ tmp = grub_stpcpy (tmp, early_initrds[i]); ++ grub_free(early_initrds[i]); ++ } ++ ++ for (i = 0; initrds != NULL && initrds[i] != NULL; i++) ++ { ++ grub_dprintf ("blscfg", "adding initrd %s\n", initrds[i]); ++ tmp = grub_stpcpy (tmp, " " GRUB_BOOT_DEVICE); ++ tmp = grub_stpcpy (tmp, initrds[i]); ++ } ++ tmp = grub_stpcpy (tmp, "\n"); ++ } + + src = grub_xasprintf ("load_video\n" -+ "set gfx_payload=keep\n" ++ "set gfxpayload=keep\n" + "insmod gzio\n" -+ GRUB_LINUX_CMD " %s%s%s%s\n" -+ "%s%s%s%s", ++ "linux %s%s%s%s\n" ++ "%s", + GRUB_BOOT_DEVICE, clinux, options ? " " : "", options ? options : "", -+ initrd ? GRUB_INITRD_CMD " " : "", initrd ? GRUB_BOOT_DEVICE : "", initrd ? initrd : "", initrd ? "\n" : ""); ++ initrd ? initrd : ""); + -+ grub_normal_add_menu_entry (1, args, NULL, NULL, "bls", NULL, NULL, src, 0); ++ grub_normal_add_menu_entry (argc, argv, classes, id, users, hotkey, NULL, src, 0, &index, entry); ++ grub_dprintf ("blscfg", "Added entry %d id:\"%s\"\n", index, id); + +finish: -+ grub_free (p); -+ grub_free (title); -+ grub_free (options); -+ grub_free (clinux); + grub_free (initrd); ++ grub_free (initrd_prefix); ++ grub_free (early_initrds); ++ grub_free (initrds); ++ grub_free (options); ++ grub_free (classes); ++ grub_free (args); ++ grub_free (argv); + grub_free (src); ++} + -+ if (f) -+ grub_file_close (f); ++struct find_entry_info { ++ const char *dirname; ++ const char *devid; ++ grub_device_t dev; ++ grub_fs_t fs; ++}; ++ ++/* ++ * info: the filesystem object the file is on. ++ */ ++static int find_entry (struct find_entry_info *info) ++{ ++ struct read_entry_info read_entry_info; ++ grub_fs_t blsdir_fs = NULL; ++ grub_device_t blsdir_dev = NULL; ++ const char *blsdir = info->dirname; ++ int fallback = 0; ++ int r = 0; ++ ++ if (!blsdir) { ++ blsdir = grub_env_get ("blsdir"); ++ if (!blsdir) ++ blsdir = GRUB_BLS_CONFIG_PATH; ++ } ++ ++ read_entry_info.file = NULL; ++ read_entry_info.dirname = blsdir; ++ ++ grub_dprintf ("blscfg", "scanning blsdir: %s\n", blsdir); ++ ++ blsdir_dev = info->dev; ++ blsdir_fs = info->fs; ++ read_entry_info.devid = info->devid; ++ ++read_fallback: ++ r = blsdir_fs->fs_dir (blsdir_dev, read_entry_info.dirname, read_entry, ++ &read_entry_info); ++ if (r != 0) { ++ grub_dprintf ("blscfg", "read_entry returned error\n"); ++ grub_err_t e; ++ do ++ { ++ e = grub_error_pop(); ++ } while (e); ++ } ++ ++ if (r && !info->dirname && !fallback) { ++ read_entry_info.dirname = "/boot" GRUB_BLS_CONFIG_PATH; ++ grub_dprintf ("blscfg", "Entries weren't found in %s, fallback to %s\n", ++ blsdir, read_entry_info.dirname); ++ fallback = 1; ++ goto read_fallback; ++ } + + return 0; +} + +static grub_err_t -+grub_cmd_bls_import (grub_extcmd_context_t ctxt __attribute__ ((unused)), -+ int argc __attribute__ ((unused)), -+ char **args __attribute__ ((unused))) ++bls_load_entries (const char *path) +{ ++ grub_size_t len; + grub_fs_t fs; + grub_device_t dev; + static grub_err_t r; -+ const char *devid; ++ const char *devid = NULL; ++ char *blsdir = NULL; ++ struct find_entry_info info = { ++ .dev = NULL, ++ .fs = NULL, ++ .dirname = NULL, ++ }; ++ struct read_entry_info rei = { ++ .devid = NULL, ++ .dirname = NULL, ++ }; + -+ devid = grub_env_get ("root"); -+ if (!devid) -+ return grub_error (GRUB_ERR_FILE_NOT_FOUND, N_("variable `%s' isn't set"), "root"); ++ if (path) { ++ len = grub_strlen (path); ++ if (grub_strcmp (path + len - 5, ".conf") == 0) { ++ rei.file = grub_file_open (path, GRUB_FILE_TYPE_CONFIG); ++ if (!rei.file) ++ return grub_errno; ++ /* ++ * read_entry() closes the file ++ */ ++ return read_entry(path, NULL, &rei); ++ } else if (path[0] == '(') { ++ devid = path + 1; ++ ++ blsdir = grub_strchr (path, ')'); ++ if (!blsdir) ++ return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("Filepath isn't correct")); ++ ++ *blsdir = '\0'; ++ blsdir = blsdir + 1; ++ } ++ } ++ ++ if (!devid) { ++#ifdef GRUB_MACHINE_EMU ++ devid = "host"; ++#elif defined(GRUB_MACHINE_EFI) ++ devid = grub_env_get ("root"); ++#else ++ devid = grub_env_get ("boot"); ++#endif ++ if (!devid) ++ return grub_error (GRUB_ERR_FILE_NOT_FOUND, ++ N_("variable `%s' isn't set"), "boot"); ++ } + ++ grub_dprintf ("blscfg", "opening %s\n", devid); + dev = grub_device_open (devid); + if (!dev) + return grub_errno; + ++ grub_dprintf ("blscfg", "probing fs\n"); + fs = grub_fs_probe (dev); + if (!fs) + { @@ -178,7 +1032,11 @@ diff -urNp grub-2.02-rc1.orig/grub-core/commands/blscfg.c grub-2.02-rc1/grub-cor + goto finish; + } + -+ r = fs->dir (dev, GRUB_BLS_CONFIG_PATH, parse_entry, NULL); ++ info.dirname = blsdir; ++ info.devid = devid; ++ info.dev = dev; ++ info.fs = fs; ++ find_entry(&info); + +finish: + if (dev) @@ -187,37 +1045,484 @@ diff -urNp grub-2.02-rc1.orig/grub-core/commands/blscfg.c grub-2.02-rc1/grub-cor + return r; +} + ++static bool ++is_default_entry(const char *def_entry, struct bls_entry *entry, int idx) ++{ ++ const char *title; ++ int def_idx; ++ ++ if (!def_entry) ++ return false; ++ ++ if (grub_strcmp(def_entry, entry->filename) == 0) ++ return true; ++ ++ title = bls_get_val(entry, "title", NULL); ++ ++ if (title && grub_strcmp(def_entry, title) == 0) ++ return true; ++ ++ def_idx = (int)grub_strtol(def_entry, NULL, 0); ++ if (grub_errno == GRUB_ERR_BAD_NUMBER) { ++ grub_errno = GRUB_ERR_NONE; ++ return false; ++ } ++ ++ if (def_idx == idx) ++ return true; ++ ++ return false; ++} ++ ++static grub_err_t ++bls_create_entries (bool show_default, bool show_non_default, char *entry_id) ++{ ++ const char *def_entry = NULL; ++ struct bls_entry *entry = NULL; ++ int idx = 0; ++ ++ def_entry = grub_env_get("default"); ++ ++ grub_dprintf ("blscfg", "%s Creating entries from bls\n", __func__); ++ FOR_BLS_ENTRIES(entry) { ++ if (entry->visible) { ++ idx++; ++ continue; ++ } ++ ++ if ((show_default && is_default_entry(def_entry, entry, idx)) || ++ (show_non_default && !is_default_entry(def_entry, entry, idx)) || ++ (entry_id && grub_strcmp(entry_id, entry->filename) == 0)) { ++ create_entry(entry); ++ entry->visible = 1; ++ } ++ idx++; ++ } ++ ++ return GRUB_ERR_NONE; ++} ++ ++static grub_err_t ++grub_cmd_blscfg (grub_extcmd_context_t ctxt UNUSED, ++ int argc, char **args) ++{ ++ grub_err_t r; ++ char *path = NULL; ++ char *entry_id = NULL; ++ bool show_default = true; ++ bool show_non_default = true; ++ ++ if (argc == 1) { ++ if (grub_strcmp (args[0], "default") == 0) { ++ show_non_default = false; ++ } else if (grub_strcmp (args[0], "non-default") == 0) { ++ show_default = false; ++ } else if (args[0][0] == '(') { ++ path = args[0]; ++ } else { ++ entry_id = args[0]; ++ show_default = false; ++ show_non_default = false; ++ } ++ } ++ ++ r = bls_load_entries(path); ++ if (r) ++ return r; ++ ++ return bls_create_entries(show_default, show_non_default, entry_id); ++} ++ +static grub_extcmd_t cmd; ++static grub_extcmd_t oldcmd; + -+GRUB_MOD_INIT(bls) ++GRUB_MOD_INIT(blscfg) +{ -+ cmd = grub_register_extcmd ("bls_import", -+ grub_cmd_bls_import, ++ grub_dprintf("blscfg", "%s got here\n", __func__); ++ cmd = grub_register_extcmd ("blscfg", ++ grub_cmd_blscfg, + 0, + NULL, + N_("Import Boot Loader Specification snippets."), + NULL); ++ oldcmd = grub_register_extcmd ("bls_import", ++ grub_cmd_blscfg, ++ 0, ++ NULL, ++ N_("Import Boot Loader Specification snippets."), ++ NULL); +} + -+GRUB_MOD_FINI(bls) ++GRUB_MOD_FINI(blscfg) +{ + grub_unregister_extcmd (cmd); ++ grub_unregister_extcmd (oldcmd); +} -diff -urNp grub-2.02-rc1.orig/grub-core/Makefile.core.def grub-2.02-rc1/grub-core/Makefile.core.def ---- grub-2.02-rc1.orig/grub-core/Makefile.core.def 2017-02-08 15:09:05.594315418 +0000 -+++ grub-2.02-rc1/grub-core/Makefile.core.def 2017-02-08 15:09:21.549315239 +0000 -@@ -742,6 +742,14 @@ module = { - }; +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, +- entrysrc, 0); ++ entrysrc, 0, NULL, NULL); + grub_free (args); + entrysrc[0] = 0; + grub_free (oldname); +@@ -186,7 +186,8 @@ legacy_file (const char *filename) + } + args[0] = entryname; + grub_normal_add_menu_entry (1, args, NULL, NULL, NULL, +- NULL, NULL, entrysrc, 0); ++ NULL, NULL, entrysrc, 0, NULL, ++ NULL); + grub_free (args); + } - module = { -+ name = blscfg; -+ common = commands/blscfg.c; -+ enable = i386_efi; -+ enable = x86_64_efi; -+ enable = i386_pc; +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 + ++#include "loadenv.h" ++ + GRUB_MOD_LICENSE ("GPLv3+"); + + static const struct grub_arg_option options[] = +@@ -79,81 +81,6 @@ open_envblk_file (char *filename, + return file; + } + +-static grub_envblk_t +-read_envblk_file (grub_file_t file) +-{ +- grub_off_t offset = 0; +- char *buf; +- grub_size_t size = grub_file_size (file); +- grub_envblk_t envblk; +- +- buf = grub_malloc (size); +- if (! buf) +- return 0; +- +- while (size > 0) +- { +- grub_ssize_t ret; +- +- ret = grub_file_read (file, buf + offset, size); +- if (ret <= 0) +- { +- grub_free (buf); +- return 0; +- } +- +- size -= ret; +- offset += ret; +- } +- +- envblk = grub_envblk_open (buf, offset); +- if (! envblk) +- { +- grub_free (buf); +- grub_error (GRUB_ERR_BAD_FILE_TYPE, "invalid environment block"); +- return 0; +- } +- +- return envblk; +-} +- +-struct grub_env_whitelist +-{ +- grub_size_t len; +- char **list; +-}; +-typedef struct grub_env_whitelist grub_env_whitelist_t; +- +-static int +-test_whitelist_membership (const char* name, +- const grub_env_whitelist_t* whitelist) +-{ +- grub_size_t i; +- +- for (i = 0; i < whitelist->len; i++) +- if (grub_strcmp (name, whitelist->list[i]) == 0) +- return 1; /* found it */ +- +- return 0; /* not found */ +-} +- +-/* Helper for grub_cmd_load_env. */ +-static int +-set_var (const char *name, const char *value, void *whitelist) +-{ +- if (! whitelist) +- { +- grub_env_set (name, value); +- return 0; +- } +- +- if (test_whitelist_membership (name, +- (const grub_env_whitelist_t *) whitelist)) +- grub_env_set (name, value); +- +- return 0; +-} +- + static grub_err_t + grub_cmd_load_env (grub_extcmd_context_t ctxt, int argc, char **args) + { +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. */ ++/* ++ * GRUB -- GRand Unified Bootloader ++ * Copyright (C) 2008,2009,2010 Free Software Foundation, Inc. ++ * ++ * GRUB is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * GRUB is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with GRUB. If not, see . ++ */ ++ ++static grub_envblk_t UNUSED ++read_envblk_file (grub_file_t file) ++{ ++ grub_off_t offset = 0; ++ char *buf; ++ grub_size_t size = grub_file_size (file); ++ grub_envblk_t envblk; ++ ++ buf = grub_malloc (size); ++ if (! buf) ++ return 0; ++ ++ while (size > 0) ++ { ++ grub_ssize_t ret; ++ ++ ret = grub_file_read (file, buf + offset, size); ++ if (ret <= 0) ++ { ++ grub_free (buf); ++ return 0; ++ } ++ ++ size -= ret; ++ offset += ret; ++ } ++ ++ envblk = grub_envblk_open (buf, offset); ++ if (! envblk) ++ { ++ grub_free (buf); ++ grub_error (GRUB_ERR_BAD_FILE_TYPE, "invalid environment block"); ++ return 0; ++ } ++ ++ return envblk; ++} ++ ++struct grub_env_whitelist ++{ ++ grub_size_t len; ++ char **list; +}; ++typedef struct grub_env_whitelist grub_env_whitelist_t; + -+module = { - name = boot; - common = commands/boot.c; - i386_pc = lib/i386/pc/biosnum.c; ++static int UNUSED ++test_whitelist_membership (const char* name, ++ const grub_env_whitelist_t* whitelist) ++{ ++ grub_size_t i; ++ ++ for (i = 0; i < whitelist->len; i++) ++ if (grub_strcmp (name, whitelist->list[i]) == 0) ++ return 1; /* found it */ ++ ++ return 0; /* not found */ ++} ++ ++/* Helper for grub_cmd_load_env. */ ++static int UNUSED ++set_var (const char *name, const char *value, void *whitelist) ++{ ++ if (! whitelist) ++ { ++ grub_env_set (name, value); ++ return 0; ++ } ++ ++ if (test_whitelist_membership (name, ++ (const grub_env_whitelist_t *) whitelist)) ++ grub_env_set (name, value); ++ ++ return 0; ++} +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 CLANG_PREREQ(maj,min) 0 + #endif + ++#define UNUSED __attribute__((__unused__)) ++ + #endif /* ! GRUB_COMPILER_HEADER */ +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 + ++struct bls_entry ++{ ++ struct bls_entry *next; ++ struct bls_entry *prev; ++ struct keyval **keyvals; ++ int nkeyvals; ++ char *filename; ++ int visible; ++}; ++ + struct grub_menu_entry_class + { + char *name; +@@ -60,6 +70,9 @@ struct grub_menu_entry + + /* The next element. */ + struct grub_menu_entry *next; ++ ++ /* BLS used to populate the entry */ ++ struct bls_entry *bls; + }; + typedef struct grub_menu_entry *grub_menu_entry_t; + +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, +- int submenu); ++ int submenu, int *index, struct bls_entry *bls); + + grub_err_t + grub_normal_set_password (const char *user, const char *password); diff --git a/choose-preferred-initrd.patch b/choose-preferred-initrd.patch new file mode 100644 index 0000000..66f8e58 --- /dev/null +++ b/choose-preferred-initrd.patch @@ -0,0 +1,34 @@ +diff -ur grub-2.12.orig/util/grub.d/10_linux.in grub-2.12/util/grub.d/10_linux.in +--- grub-2.12.orig/util/grub.d/10_linux.in 2024-01-09 00:18:44.453971622 +0100 ++++ grub-2.12/util/grub.d/10_linux.in 2024-01-09 00:25:52.553521455 +0100 +@@ -223,12 +223,7 @@ + done + + initrd_real= +- for i in "initrd.img-${version}" "initrd-${version}.img" \ +- "initrd-${alt_version}.img.old" "initrd-${version}.gz" \ +- "initrd-${alt_version}.gz.old" "initrd-${version}" \ +- "initramfs-${version}.img" "initramfs-${alt_version}.img.old" \ +- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ +- "initrd-${alt_version}" "initramfs-${alt_version}.img" \ ++ for i in "initramfs-${version}.img" "initramfs-${alt_version}.img" \ + "initramfs-genkernel-${version}" \ + "initramfs-genkernel-${alt_version}" \ + "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ +diff -ur grub-2.12.orig/util/grub.d/20_linux_xen.in grub-2.12/util/grub.d/20_linux_xen.in +--- grub-2.12.orig/util/grub.d/20_linux_xen.in 2024-01-09 00:18:44.453971622 +0100 ++++ grub-2.12/util/grub.d/20_linux_xen.in 2024-01-09 00:26:19.353868889 +0100 +@@ -295,12 +295,7 @@ + linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" + + initrd_real= +- for i in "initrd.img-${version}" "initrd-${version}.img" \ +- "initrd-${alt_version}.img.old" "initrd-${version}.gz" \ +- "initrd-${alt_version}.gz.old" "initrd-${version}" \ +- "initramfs-${version}.img" "initramfs-${alt_version}.img.old" \ +- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ +- "initrd-${alt_version}" "initramfs-${alt_version}.img" \ ++ for i in "initramfs-${version}.img" "initramfs-${alt_version}.img" \ + "initramfs-genkernel-${version}" \ + "initramfs-genkernel-${alt_version}" \ + "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ diff --git a/efi-net-fix.patch b/efi-net-fix.patch deleted file mode 100644 index 4cc5e13..0000000 --- a/efi-net-fix.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -urNp grub-2.02-rc1.orig/grub-core/net/drivers/efi/efinet.c grub-2.02-rc1/grub-core/net/drivers/efi/efinet.c ---- grub-2.02-rc1.orig/grub-core/net/drivers/efi/efinet.c 2017-02-08 15:08:35.748315754 +0000 -+++ grub-2.02-rc1/grub-core/net/drivers/efi/efinet.c 2017-02-08 15:08:53.837315551 +0000 -@@ -330,6 +330,7 @@ grub_efi_net_config_real (grub_efi_handl - { - struct grub_net_card *card; - grub_efi_device_path_t *dp; -+ grub_efi_simple_network_t *net; - - dp = grub_efi_get_device_path (hnd); - if (! dp) -@@ -383,6 +384,21 @@ grub_efi_net_config_real (grub_efi_handl - &pxe_mode->dhcp_ack, - sizeof (pxe_mode->dhcp_ack), - 1, device, path); -+ net = grub_efi_open_protocol (card->efi_handle, &net_io_guid, -+ GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE); -+ if (net) { -+ if (net->mode->state == GRUB_EFI_NETWORK_STOPPED -+ && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS) -+ continue; -+ -+ if (net->mode->state == GRUB_EFI_NETWORK_STOPPED) -+ continue; -+ -+ if (net->mode->state == GRUB_EFI_NETWORK_STARTED -+ && efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS) -+ continue; -+ card->efi_net = net; -+ } - return; - } - } diff --git a/gcc8.patch b/gcc8.patch deleted file mode 100644 index a3915c8..0000000 --- a/gcc8.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -ur grub-2.02.orig/grub-core/fs/btrfs.c grub-2.02/grub-core/fs/btrfs.c ---- grub-2.02.orig/grub-core/fs/btrfs.c 2017-04-24 09:16:00.000000000 +0000 -+++ grub-2.02/grub-core/fs/btrfs.c 2018-09-04 11:11:43.199082290 +0000 -@@ -175,7 +175,7 @@ - { - grub_int64_t sec; - grub_uint32_t nanosec; --} __attribute__ ((aligned (4))); -+} GRUB_PACKED; - - struct grub_btrfs_inode - { -diff -ur grub-2.02.orig/include/grub/efiemu/runtime.h grub-2.02/include/grub/efiemu/runtime.h ---- grub-2.02.orig/include/grub/efiemu/runtime.h 2015-05-21 15:50:29.000000000 +0000 -+++ grub-2.02/include/grub/efiemu/runtime.h 2018-09-04 11:13:30.211081085 +0000 -@@ -29,7 +29,7 @@ - - struct efi_variable - { -- grub_efi_guid_t guid; -+ grub_efi_packed_guid_t guid; - grub_uint32_t namelen; - grub_uint32_t size; - grub_efi_uint32_t attributes; -diff -ur grub-2.02.orig/include/grub/gpt_partition.h grub-2.02/include/grub/gpt_partition.h ---- grub-2.02.orig/include/grub/gpt_partition.h 2015-05-21 15:50:29.000000000 +0000 -+++ grub-2.02/include/grub/gpt_partition.h 2018-09-04 11:14:00.554080743 +0000 -@@ -28,7 +28,7 @@ - grub_uint16_t data2; - grub_uint16_t data3; - grub_uint8_t data4[8]; --} __attribute__ ((aligned(8))); -+} GRUB_PACKED; - typedef struct grub_gpt_part_type grub_gpt_part_type_t; - - #define GRUB_GPT_PARTITION_TYPE_EMPTY \ diff --git a/grub-garbage.patch b/grub-garbage.patch index 57eb6d4..7c6b794 100644 --- a/grub-garbage.patch +++ b/grub-garbage.patch @@ -1,11 +1,11 @@ -diff -urNp grub-2.02-rc1.orig/util/grub-mkconfig_lib.in grub-2.02-rc1/util/grub-mkconfig_lib.in ---- grub-2.02-rc1.orig/util/grub-mkconfig_lib.in 2017-02-08 15:01:40.196320433 +0000 -+++ grub-2.02-rc1/util/grub-mkconfig_lib.in 2017-02-08 15:01:59.899320211 +0000 -@@ -187,6 +187,7 @@ grub_file_is_not_garbage () +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 ;; + *.bak|*~|.*.swp) return 1 ;; # backup and swap files from editors README*|*/README*) return 1 ;; # documentation + *.sig) return 1 ;; # signatures esac - else diff --git a/grub-lvmdevice.patch b/grub-lvmdevice.patch index e28add5..85ae596 100644 --- a/grub-lvmdevice.patch +++ b/grub-lvmdevice.patch @@ -1,7 +1,6 @@ -diff -urNp grub-2.02-rc1.orig/util/grub-mkconfig.in grub-2.02-rc1/util/grub-mkconfig.in ---- grub-2.02-rc1.orig/util/grub-mkconfig.in 2017-02-08 15:00:50.000000000 +0000 -+++ grub-2.02-rc1/util/grub-mkconfig.in 2017-02-08 15:02:35.564319810 +0000 -@@ -133,6 +133,21 @@ fi +--- 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 /`" @@ -21,5 +20,5 @@ diff -urNp grub-2.02-rc1.orig/util/grub-mkconfig.in grub-2.02-rc1/util/grub-mkco +esac + GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true + GRUB_DEVICE_PARTUUID="`${grub_probe} --device ${GRUB_DEVICE} --target=partuuid 2> /dev/null`" || true - # Device containing our /boot partition. Usually the same as GRUB_DEVICE. diff --git a/grub-mkconfig-diagnostics.patch b/grub-mkconfig-diagnostics.patch index 58c3cad..36edb0b 100644 --- a/grub-mkconfig-diagnostics.patch +++ b/grub-mkconfig-diagnostics.patch @@ -1,7 +1,49 @@ -diff -urNp grub-2.02-rc1.orig/util/grub.d/00_header.in grub-2.02-rc1/util/grub.d/00_header.in ---- grub-2.02-rc1.orig/util/grub.d/00_header.in 2017-02-08 15:03:12.814319390 +0000 -+++ grub-2.02-rc1/util/grub.d/00_header.in 2017-02-08 15:03:25.069319252 +0000 -@@ -229,7 +229,7 @@ esac +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" ] \ && is_path_readable_by_grub "$GRUB_THEME"; then @@ -10,7 +52,7 @@ diff -urNp grub-2.02-rc1.orig/util/grub.d/00_header.in grub-2.02-rc1/util/grub.d prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"` cat << EOF -@@ -265,12 +265,12 @@ export theme +@@ -265,12 +265,12 @@ EOF elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \ && is_path_readable_by_grub "$GRUB_BACKGROUND"; then @@ -25,10 +67,10 @@ diff -urNp grub-2.02-rc1.orig/util/grub.d/00_header.in grub-2.02-rc1/util/grub.d esac prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"` cat << EOF -diff -urNp grub-2.02-rc1.orig/util/grub.d/10_hurd.in grub-2.02-rc1/util/grub.d/10_hurd.in ---- grub-2.02-rc1.orig/util/grub.d/10_hurd.in 2017-02-08 15:03:12.814319390 +0000 -+++ grub-2.02-rc1/util/grub.d/10_hurd.in 2017-02-08 15:03:25.069319252 +0000 -@@ -45,8 +45,8 @@ for i in /boot/gnumach* ; do +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` rel_dirname=`make_system_path_relative_to_its_root $dirname` @@ -39,7 +81,7 @@ diff -urNp grub-2.02-rc1.orig/util/grub.d/10_hurd.in grub-2.02-rc1/util/grub.d/1 kernels="${kernels} ${rel_dirname}/${basename}" at_least_one=true fi -@@ -60,8 +60,8 @@ esac +@@ -60,8 +60,8 @@ for i in /hurd/${hurd_fs}.static /hurd/exec ; do if test -e "$i" ; then @@ -50,7 +92,7 @@ diff -urNp grub-2.02-rc1.orig/util/grub.d/10_hurd.in grub-2.02-rc1/util/grub.d/1 at_least_one=true else all_of_them=false -@@ -74,8 +74,8 @@ if ${at_least_one} ; then : ; else +@@ -74,8 +74,8 @@ fi if ${all_of_them} && test -e /lib/ld.so.1 ; then : ; else @@ -61,19 +103,19 @@ diff -urNp grub-2.02-rc1.orig/util/grub.d/10_hurd.in grub-2.02-rc1/util/grub.d/1 exit 1 fi -diff -urNp grub-2.02-rc1.orig/util/grub.d/10_kfreebsd.in grub-2.02-rc1/util/grub.d/10_kfreebsd.in ---- grub-2.02-rc1.orig/util/grub.d/10_kfreebsd.in 2017-02-08 15:03:12.814319390 +0000 -+++ grub-2.02-rc1/util/grub.d/10_kfreebsd.in 2017-02-08 15:03:25.069319252 +0000 -@@ -161,7 +161,7 @@ is_top_level=true +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 @@ + is_top_level=true - while [ "x$list" != "x" ] ; do - kfreebsd=`version_find_latest $list` + for kfreebsd in ${reverse_sorted_list}; do - gettext_printf "Found kernel of FreeBSD: %s\n" "$kfreebsd" >&2 + gettext_printf "Found kernel of FreeBSD: %s\n" "$kfreebsd" >&3 basename=`basename $kfreebsd` dirname=`dirname $kfreebsd` rel_dirname=`make_system_path_relative_to_its_root $dirname` -@@ -210,7 +210,7 @@ while [ "x$list" != "x" ] ; do +@@ -207,7 +207,7 @@ fi done if test -n "${module_dir}" ; then @@ -82,43 +124,42 @@ diff -urNp grub-2.02-rc1.orig/util/grub.d/10_kfreebsd.in grub-2.02-rc1/util/grub module_dir_rel=$(make_system_path_relative_to_its_root $module_dir) fi -diff -urNp grub-2.02-rc1.orig/util/grub.d/10_linux.in grub-2.02-rc1/util/grub.d/10_linux.in ---- grub-2.02-rc1.orig/util/grub.d/10_linux.in 2017-02-08 15:03:12.814319390 +0000 -+++ grub-2.02-rc1/util/grub.d/10_linux.in 2017-02-08 15:03:25.070319252 +0000 -@@ -180,7 +180,7 @@ submenu_indentation="" +--- 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 - linux=`version_find_latest $list` + for linux in ${reverse_sorted_list}; do - gettext_printf "Found linux image: %s\n" "$linux" >&2 + gettext_printf "Found linux image: %s\n" "$linux" >&3 basename=`basename $linux` dirname=`dirname $linux` rel_dirname=`make_system_path_relative_to_its_root $dirname` -@@ -217,7 +217,7 @@ while [ "x$list" != "x" ] ; do +@@ -233,7 +233,7 @@ + for i in ${initrd}; do + initrd_display="${initrd_display} ${dirname}/${i}" + done +- gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2 ++ gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&3 fi - if test -n "${initrd}" ; then -- gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2 -+ gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&3 - elif test -z "${initramfs}" ; then - # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's - # no initrd or builtin initramfs, it can't work here. -diff -urNp grub-2.02-rc1.orig/util/grub.d/10_netbsd.in grub-2.02-rc1/util/grub.d/10_netbsd.in ---- grub-2.02-rc1.orig/util/grub.d/10_netbsd.in 2017-02-08 15:03:12.814319390 +0000 -+++ grub-2.02-rc1/util/grub.d/10_netbsd.in 2017-02-08 15:03:25.070319252 +0000 -@@ -155,7 +155,7 @@ for k in /netbsd $(ls -t /netbsd?* 2>/de + config= +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 - 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 -urNp grub-2.02-rc1.orig/util/grub.d/10_windows.in grub-2.02-rc1/util/grub.d/10_windows.in ---- grub-2.02-rc1.orig/util/grub.d/10_windows.in 2017-02-08 15:03:12.814319390 +0000 -+++ grub-2.02-rc1/util/grub.d/10_windows.in 2017-02-08 15:03:25.070319252 +0000 -@@ -82,7 +82,7 @@ for drv in $drives ; do + # 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,31 +168,30 @@ diff -urNp grub-2.02-rc1.orig/util/grub.d/10_windows.in grub-2.02-rc1/util/grub. cat << EOF menuentry '$(echo "$OS" | grub_quote)' \$menuentry_id_option '$osid-$(grub_get_device_id "${dev}")' { EOF -diff -urNp grub-2.02-rc1.orig/util/grub.d/20_linux_xen.in grub-2.02-rc1/util/grub.d/20_linux_xen.in ---- grub-2.02-rc1.orig/util/grub.d/20_linux_xen.in 2017-02-08 15:03:12.814319390 +0000 -+++ grub-2.02-rc1/util/grub.d/20_linux_xen.in 2017-02-08 15:03:25.070319252 +0000 -@@ -208,7 +208,7 @@ while [ "x${xen_list}" != "x" ] ; do - fi - while [ "x$list" != "x" ] ; do - linux=`version_find_latest $list` +--- 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 @@ + done + + for linux in ${reverse_sorted_linux_list}; do - gettext_printf "Found linux image: %s\n" "$linux" >&2 + gettext_printf "Found linux image: %s\n" "$linux" >&3 basename=`basename $linux` dirname=`dirname $linux` rel_dirname=`make_system_path_relative_to_its_root $dirname` -@@ -231,7 +231,7 @@ while [ "x${xen_list}" != "x" ] ; do - fi - done - if test -n "${initrd}" ; then -- gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2 -+ gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&3 - else - # "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here. - linux_root_device_thisversion=${GRUB_DEVICE} -diff -urNp grub-2.02-rc1.orig/util/grub.d/30_os-prober.in grub-2.02-rc1/util/grub.d/30_os-prober.in ---- grub-2.02-rc1.orig/util/grub.d/30_os-prober.in 2017-02-08 15:03:12.814319390 +0000 -+++ grub-2.02-rc1/util/grub.d/30_os-prober.in 2017-02-08 15:03:25.070319252 +0000 -@@ -141,7 +141,7 @@ for OS in ${OSPROBED} ; do +@@ -274,7 +274,7 @@ + for i in ${initrd}; do + initrd_display="${initrd_display} ${dirname}/${i}" + done +- gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2 ++ gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&3 + fi + + if test -z "${initrd_real}"; then +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')" @@ -160,7 +200,7 @@ diff -urNp grub-2.02-rc1.orig/util/grub.d/30_os-prober.in grub-2.02-rc1/util/gru case ${BOOT} in chain) -@@ -329,7 +329,7 @@ EOF +@@ -329,7 +329,7 @@ ;; *) # TRANSLATORS: %s is replaced by OS name. @@ -169,47 +209,3 @@ diff -urNp grub-2.02-rc1.orig/util/grub.d/30_os-prober.in grub-2.02-rc1/util/gru ;; esac done -diff -urNp grub-2.02-rc1.orig/util/grub-mkconfig.in grub-2.02-rc1/util/grub-mkconfig.in ---- grub-2.02-rc1.orig/util/grub-mkconfig.in 2017-02-08 15:03:12.813319390 +0000 -+++ grub-2.02-rc1/util/grub-mkconfig.in 2017-02-08 15:04:41.230318395 +0000 -@@ -247,11 +247,16 @@ export GRUB_DEFAULT \ - 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,8 +291,8 @@ if test "x${grub_cfg}" != "x" ; then - 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 -@@ -295,5 +300,8 @@ and /etc/grub.d/* files or please file a - fi - fi - --gettext "done" >&2 --echo >&2 -+gettext "done" >&3 -+echo >&3 -+ -+# close diagnostic stream -+exec 3>&- diff --git a/grub.sysconfig b/grub.sysconfig index ba0af18..6d4a356 100644 --- a/grub.sysconfig +++ b/grub.sysconfig @@ -1,56 +1,50 @@ -# Configuration file for grub. +# Configuration file for GRUB. # -# If you change this file, run 'update-grub' afterwards to update /boot/grub/grub.cfg. -# -# To disable auto generation of /boot/grub/grub.conf on kernel package -# install/upgrade, UPDATE_GRUB must be set to "no". -#UPDATE_GRUB=no +# After editing this file, run update-grub to update /boot/grub/grub.cfg. + +GRUB_DISTRIBUTOR="TLD" + +# To disable automatic generation of /boot/grub/grub.conf on kernel package +# install/upgrade, set UPDATE_GRUB to "no". +#UPDATE_GRUB="no" -# Default entry to boot. Numeric value starting with 0. -# Use special value 'saved' to stick with last booted entry. used with GRUB_SAVEDEFAULT +# Default entry to boot (numeric value starting with 0). Use the special value +# "saved" to make the last booted entry the default (requires GRUB_SAVEDEFAULT +# to be set to true). GRUB_DEFAULT=0 -# save_default_entry -#GRUB_SAVEDEFAULT=true +# If this option is set to true, when an entry is selected, it will be saved as +# a new default entry for use by future runs of GRUB. +#GRUB_SAVEDEFAULT="true" -# Boot the default entry this many seconds after the menu is displayed, unless a key -# is pressed. Set to 0 to boot immediately without displaying the menu, or to -1 to -# wait indefinitely. +# Boot the default entry this many seconds after the menu is displayed, unless +# a key is pressed. Set to 0 to boot immediately without displaying the menu, +# or to -1 to wait indefinitely. GRUB_TIMEOUT=15 -# Wait this many seconds for a key to be pressed before displaying the menu. +# Wait this many seconds for a key to be pressed before the menu is displayed. #GRUB_HIDDEN_TIMEOUT=15 -# Unless `GRUB_DISABLE_RECOVERY' is set to `true', two menu entries -# will be generated for each Linux kernel: one default entry and one -# entry for recovery mode. This option lists command-line arguments -# to add only to the default menu entry, after those listed in -# `GRUB_CMDLINE_LINUX'. -# To disable IPv6 in kernel, append: ipv6.disable=1 -GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 biosdevname=0 panic=300 quiet" +# Command line arguments to add to menu entries for the Linux kernel. +GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 panic=300 quiet" -# Command-line arguments to add to menu entries for the Linux kernel. -GRUB_CMDLINE_LINUX="" +# Set the terminal to the platform's native console and disable the graphical +# terminal (grub-pc only). +#GRUB_TERMINAL="console" -# Set to 'console' to disable graphical terminal (grub-pc only) -#GRUB_TERMINAL=console +# Set the resolution used on the graphical terminal (WidthxHeight or +# WidthxHeightxDepth), or set to "auto", which selects a platform-specific +# default that should look reasonable. +#GRUB_GFXMODE="640x480" -# The resolution used on graphical terminal -# note that you can use only modes which your graphic card supports via VBE -# you can see them in real GRUB with the command `vbeinfo' -#GRUB_GFXMODE=640x480 +# Prevent GRUB from passing the "root=UUID=xxx" parameter to the Linux kernel. +#GRUB_DISABLE_LINUX_UUID="true" -# Disable GRUB to pass "root=UUID=xxx" parameter to Linux -#GRUB_DISABLE_LINUX_UUID=true - -# Disable generation of recovery mode menu entries +# Disable the creation of recovery mode menu entries. GRUB_DISABLE_RECOVERY="true" -# Disable creating "advanced" submenus, just use flat list -GRUB_DISABLE_SUBMENU="y" - -# Uncomment to get a beep at grub start -#GRUB_INIT_TUNE="480 440 1" +# Disable the creation of submenus, just use the flat menu with all entries. +GRUB_DISABLE_SUBMENU="true" -# Disable restricted boot +# Set to "true" to remove the "--unrestricted" option from the boot entries. GRUB_RESTRICTED="false" diff --git a/grub2-cfg.patch b/grub2-cfg.patch index 4547116..23ce97b 100644 --- a/grub2-cfg.patch +++ b/grub2-cfg.patch @@ -1,7 +1,6 @@ -diff -urNp grub-2.02-rc1.orig/docs/grub.cfg grub-2.02-rc1/docs/grub.cfg ---- grub-2.02-rc1.orig/docs/grub.cfg 2017-02-08 15:07:55.114316212 +0000 -+++ grub-2.02-rc1/docs/grub.cfg 2017-02-08 15:08:12.255316019 +0000 -@@ -14,8 +14,8 @@ set fallback=gnuhurd +--- 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 { set root=(hd0,msdos1) diff --git a/grub2-fonts_path.patch b/grub2-fonts_path.patch index 0acce4f..e5f5300 100644 --- a/grub2-fonts_path.patch +++ b/grub2-fonts_path.patch @@ -1,21 +1,11 @@ -diff -urNp grub-2.02-rc1.orig/configure.ac grub-2.02-rc1/configure.ac ---- grub-2.02-rc1.orig/configure.ac 2017-02-08 15:05:29.599317850 +0000 -+++ grub-2.02-rc1/configure.ac 2017-02-08 15:05:43.268317696 +0000 -@@ -1622,7 +1622,7 @@ fi - - if test x"$starfield_excuse" = x; then - 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/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do -+ for dir in . /usr/share/fonts/TTF /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do - if test -f "$dir/DejaVuSans.$ext"; then - DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext" - break 2 -@@ -1644,7 +1644,7 @@ AC_SUBST([DJVU_FONT_SOURCE]) - 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. +--- grub-2.12/configure.ac.orig 2023-12-20 18:27:11.057068695 +0100 ++++ grub-2.12/configure.ac 2023-12-20 18:28:25.454952491 +0100 +@@ -1847,7 +1847,7 @@ + # search in well-known directories + if test x"$starfield_excuse" = x; then + 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/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype /usr/pkg/share/fonts/X11/TTF /usr/local/share/fonts/dejavu /usr/X11R6/lib/X11/fonts/TTF; do ++ for dir in . /usr/share/fonts/TTF /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype /usr/pkg/share/fonts/X11/TTF /usr/local/share/fonts/dejavu /usr/X11R6/lib/X11/fonts/TTF; do + if test -f "$dir/DejaVuSans.$ext"; then + DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext" + break 2 diff --git a/grub2.spec b/grub2.spec index 851a630..d49a72e 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_without 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_coreboot:coreboot} %{?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.02 +Version: 2.12 Release: 3 License: GPL v2 Group: Base -Source0: ftp://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz -# Source0-md5: 8a4a2a95aac551fb0fba860ceabfa1d3 +Source0: https://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz +# Source0-md5: 60c564b1bdc39d8e43b3aab4bc0fb140 Source1: update-grub Source2: update-grub.8 Source3: grub.sysconfig @@ -54,56 +160,67 @@ Patch4: tld-mkconfigdir.patch Patch5: grub-mkconfig-diagnostics.patch Patch6: posix.patch Patch7: %{name}-fonts_path.patch -Patch8: add-vlan-tag-support.patch +Patch8: initrd-max-address.patch Patch9: just-say-linux.patch Patch10: ignore-kernel-symlinks.patch -Patch11: initrd-search.patch +Patch11: choose-preferred-initrd.patch Patch12: %{name}-cfg.patch -Patch13: efi-net-fix.patch Patch14: blscfg.patch Patch15: restricted.patch -Patch16: gcc8.patch +Patch16: x32.patch URL: http://www.gnu.org/software/grub/ -BuildRequires: autoconf >= 2.53 +BuildRequires: autoconf >= 2.64 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: libfuse3-devel BuildRequires: libtool BuildRequires: ncurses-devel -BuildRequires: python -BuildRequires: python-modules +BuildRequires: pkgconfig +BuildRequires: python3 +BuildRequires: python3-modules BuildRequires: rpm >= 4.4.9-56 +BuildRequires: rpm-build >= 4.6 BuildRequires: rpmbuild(macros) >= 1.213 BuildRequires: sed >= 4.0 BuildRequires: tar >= 1:1.22 BuildRequires: texinfo BuildRequires: xz BuildRequires: xz-devel -%ifarch %{x8664} -BuildRequires: /usr/lib/libc.so -BuildRequires: gcc-multilib -%endif +BuildRequires: zfs-devel 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 @@ -113,6 +230,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _libexecdir %{_libdir}/grub %define _grubdir /boot/grub %define _localedir /usr/share/locale +%define _docdir /usr/share/doc # part of grub code is not relocable (these are not Linux libs) # stack protector also breaks non-Linux binaries @@ -213,7 +331,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. @@ -221,22 +341,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} @@ -246,6 +394,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 @@ -260,6 +514,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 @@ -270,26 +525,30 @@ Motyw starfield dla GRUB-a. %prep %setup -q -n grub-%{version} -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 +%patch -P1 -p1 +%patch -P2 -p1 +%patch -P3 -p1 +%patch -P4 -p1 +%patch -P5 -p1 +%patch -P6 -p1 +%patch -P7 -p1 +%patch -P8 -p1 +%patch -P9 -p1 +%patch -P10 -p1 +%patch -P11 -p1 +%patch -P12 -p0 +%patch -P14 -p1 +%patch -P15 -p1 +%patch -P16 -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* +# missing in tarball +cat > grub-core/extra_deps.lst < /boot/grub/custom.cfg if [ -f %{_sysconfdir}/grub.d/custom.cfg.rpmsave ]; then cp -f %{_grubdir}/custom.cfg{,.rpmnew} @@ -416,7 +681,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 @@ -441,16 +706,17 @@ 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} %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* +%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* @@ -486,8 +752,8 @@ fi # XXX: check this locale dir location and if it is neccesaary to exist on /boot %dir %{_libexecdir}/locale -%config(noreplace) %verify(not md5 mtime size) %{_grubdir}/grub.cfg -%config(noreplace) %verify(not md5 mtime size) %{_grubdir}/custom.cfg +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_grubdir}/grub.cfg +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_grubdir}/custom.cfg # generated by grub at runtime %ghost %{_grubdir}/device.map @@ -499,66 +765,208 @@ fi %attr(755,root,root) /lib/grub.d/00_header %attr(755,root,root) /lib/grub.d/10_linux %attr(755,root,root) /lib/grub.d/20_linux_xen +%attr(755,root,root) /lib/grub.d/25_bli %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 +%{_infodir}/grub*.info* -%ifarch %{ix86} %{x8664} -%attr(755,root,root) %{_sbindir}/grub-probe -%{_mandir}/man8/grub-probe.8* +%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 -%{_infodir}/grub*.info* +%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/gdb_helper.py +%{_libexecdir}/%{arc_arch}-arc/kernel.exec +%{_libexecdir}/%{arc_arch}-arc/kernel.img +%endif -%dir %{_datadir}/grub/themes +%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/gdb_helper.py +%{_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/gdb_helper.py +%{_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/gdb_helper.py +%{_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/gdb_helper.py +%{_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/gdb_helper.py +%{_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}/gdb_helper.py +%{_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/gdb_helper.py +%{_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/gdb_helper.py +%{_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/gdb_helper.py +%{_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 @@ -569,7 +977,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 2c3776d..f854139 100644 --- a/ignore-kernel-symlinks.patch +++ b/ignore-kernel-symlinks.patch @@ -1,7 +1,6 @@ -diff -urNp grub-2.02-rc1.orig/util/grub-mkconfig_lib.in grub-2.02-rc1/util/grub-mkconfig_lib.in ---- grub-2.02-rc1.orig/util/grub-mkconfig_lib.in 2017-02-08 15:06:56.145316876 +0000 -+++ grub-2.02-rc1/util/grub-mkconfig_lib.in 2017-02-08 15:07:12.391316693 +0000 -@@ -183,6 +183,9 @@ grub_get_device_id () +--- 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/initrd-max-address.patch b/initrd-max-address.patch new file mode 100644 index 0000000..3c0d550 --- /dev/null +++ b/initrd-max-address.patch @@ -0,0 +1,13 @@ +; https://help-grub.gnu.narkive.com/8RcDkxFC/grub-and-linux-s-initrd-addr-max +; https://git.rthoni.com/robin.thoni/ipxe/commit/4cc786de810a74659b6266d04188c78b5b202103?lang=pl-PL +--- grub-2.12/include/grub/i386/linux.h~ 2023-10-03 14:21:48.000000000 +0200 ++++ grub-2.12/include/grub/i386/linux.h 2024-11-04 14:15:17.553066287 +0100 +@@ -23,7 +23,7 @@ + + #define GRUB_LINUX_I386_MAGIC_SIGNATURE 0x53726448 /* "HdrS" */ + #define GRUB_LINUX_DEFAULT_SETUP_SECTS 4 +-#define GRUB_LINUX_INITRD_MAX_ADDRESS 0x37FFFFFF ++#define GRUB_LINUX_INITRD_MAX_ADDRESS 0x7FFFFFFF + #define GRUB_LINUX_MAX_SETUP_SECTS 64 + #define GRUB_LINUX_BOOT_LOADER_TYPE 0x72 + #define GRUB_LINUX_HEAP_END_OFFSET (0x9000 - 0x200) diff --git a/initrd-search.patch b/initrd-search.patch deleted file mode 100644 index 2f56cbf..0000000 --- a/initrd-search.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -urNp grub-2.02-rc1.orig/util/grub.d/10_linux.in grub-2.02-rc1/util/grub.d/10_linux.in ---- grub-2.02-rc1.orig/util/grub.d/10_linux.in 2017-02-08 15:07:23.361316569 +0000 -+++ grub-2.02-rc1/util/grub.d/10_linux.in 2017-02-08 15:07:45.006316326 +0000 -@@ -189,10 +189,7 @@ while [ "x$list" != "x" ] ; do - linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" - - initrd= -- for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \ -- "initrd-${version}" "initramfs-${version}.img" \ -- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ -- "initrd-${alt_version}" "initramfs-${alt_version}.img" \ -+ for i in "initramfs-${version}.img" "initramfs-${alt_version}.img" \ - "initramfs-genkernel-${version}" \ - "initramfs-genkernel-${alt_version}" \ - "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ -diff -urNp grub-2.02-rc1.orig/util/grub.d/20_linux_xen.in grub-2.02-rc1/util/grub.d/20_linux_xen.in ---- grub-2.02-rc1.orig/util/grub.d/20_linux_xen.in 2017-02-08 15:07:23.361316569 +0000 -+++ grub-2.02-rc1/util/grub.d/20_linux_xen.in 2017-02-08 15:07:45.007316326 +0000 -@@ -217,10 +217,7 @@ while [ "x${xen_list}" != "x" ] ; do - linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" - - initrd= -- for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \ -- "initrd-${version}" "initramfs-${version}.img" \ -- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ -- "initrd-${alt_version}" "initramfs-${alt_version}.img" \ -+ for i in "initramfs-${version}.img" "initramfs-${alt_version}.img" \ - "initramfs-genkernel-${version}" \ - "initramfs-genkernel-${alt_version}" \ - "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ diff --git a/just-say-linux.patch b/just-say-linux.patch index 15321c8..9793d33 100644 --- a/just-say-linux.patch +++ b/just-say-linux.patch @@ -1,30 +1,56 @@ -diff -urNp grub-2.02-rc1.orig/util/grub.d/10_linux.in grub-2.02-rc1/util/grub.d/10_linux.in ---- grub-2.02-rc1.orig/util/grub.d/10_linux.in 2017-02-08 15:06:29.571317175 +0000 -+++ grub-2.02-rc1/util/grub.d/10_linux.in 2017-02-08 15:06:42.287317032 +0000 -@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@" +diff -ur grub-2.12.orig/util/grub.d/10_linux.in grub-2.12/util/grub.d/10_linux.in +--- grub-2.12.orig/util/grub.d/10_linux.in 2025-04-27 17:41:45.421813711 +0200 ++++ grub-2.12/util/grub.d/10_linux.in 2025-04-27 17:45:01.802391063 +0200 +@@ -28,10 +28,10 @@ + CLASS="--class gnu-linux --class gnu --class os" ++OS="$(eval $(grep PRETTY_NAME /etc/os-release) ; echo ${PRETTY_NAME})" if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then - OS=GNU/Linux -+ OS="$(. /etc/os-release ; echo "$NAME $VERSION")" ++ CLASS="--class $(eval $(grep ^ID= /etc/os-release) ; echo ${ID}) ${CLASS}" else - OS="${GRUB_DISTRIBUTOR} GNU/Linux" -+ OS="${GRUB_DISTRIBUTOR}" CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}" fi -diff -urNp grub-2.02-rc1.orig/util/grub.d/20_linux_xen.in grub-2.02-rc1/util/grub.d/20_linux_xen.in ---- grub-2.02-rc1.orig/util/grub.d/20_linux_xen.in 2017-02-08 15:06:29.571317175 +0000 -+++ grub-2.02-rc1/util/grub.d/20_linux_xen.in 2017-02-08 15:06:42.288317032 +0000 -@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@" +@@ -94,9 +94,9 @@ + if [ x$type != xsimple ] ; then + case $type in + recovery) +- title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;; ++ title="$(gettext_printf "%s, %s (recovery mode)" "${os}" "${version}")" ;; + *) +- title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;; ++ title="$(gettext_printf "%s, %s" "${os}" "${version}")" ;; + esac + if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then + replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')" +diff -ur grub-2.12.orig/util/grub.d/20_linux_xen.in grub-2.12/util/grub.d/20_linux_xen.in +--- grub-2.12.orig/util/grub.d/20_linux_xen.in 2025-04-27 17:41:45.421813711 +0200 ++++ grub-2.12/util/grub.d/20_linux_xen.in 2025-04-27 17:45:27.034466223 +0200 +@@ -28,10 +28,10 @@ + CLASS="--class gnu-linux --class gnu --class os --class xen" ++OS="$(eval $(grep PRETTY_NAME /etc/os-release) ; echo ${PRETTY_NAME})" if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then - OS=GNU/Linux -+ OS="$(. /etc/os-release ; echo "$NAME $VERSION")" ++ CLASS="--class $(eval $(grep ^ID= /etc/os-release) ; echo ${ID}) ${CLASS}" else - OS="${GRUB_DISTRIBUTOR} GNU/Linux" -+ OS="${GRUB_DISTRIBUTOR}" CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}" fi +@@ -120,9 +120,9 @@ + fi + if [ x$type != xsimple ] ; then + if [ x$type = xrecovery ] ; then +- title="$(gettext_printf "%s, with Xen %s and Linux %s (recovery mode)" "${os}" "${entry_xen_version}" "${version}")" ++ title="$(gettext_printf "%s, %s, Xen %s (recovery mode)" "${os}" "${version}" "${entry_xen_version}")" + else +- title="$(gettext_printf "%s, with Xen %s and Linux %s" "${os}" "${entry_xen_version}" "${version}")" ++ title="$(gettext_printf "%s, %s, Xen %s" "${os}" "${version}" "${entry_xen_version}")" + fi + replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')" + if [ x"Xen ${entry_xen_version}>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then diff --git a/posix.patch b/posix.patch index 4ef9c50..18ab55a 100644 --- a/posix.patch +++ b/posix.patch @@ -1,6 +1,5 @@ -diff -urNp grub-2.02-rc1.orig/util/grub-mkconfig.in grub-2.02-rc1/util/grub-mkconfig.in ---- grub-2.02-rc1.orig/util/grub-mkconfig.in 2017-02-08 15:05:01.428318167 +0000 -+++ grub-2.02-rc1/util/grub-mkconfig.in 2017-02-08 15:05:13.547318031 +0000 +--- grub-1.99/util/grub-mkconfig.in.wiget 2011-10-13 17:43:32.333505299 +0200 ++++ grub-1.99/util/grub-mkconfig.in 2011-10-13 17:43:45.513070998 +0200 @@ -1,5 +1,6 @@ #! /bin/sh set -e diff --git a/restricted.patch b/restricted.patch index f5324df..ff496a5 100644 --- a/restricted.patch +++ b/restricted.patch @@ -1,105 +1,35 @@ -diff -ur grub-2.02.orig/util/grub.d/10_linux.in grub-2.02/util/grub.d/10_linux.in ---- grub-2.02.orig/util/grub.d/10_linux.in 2018-09-04 10:42:04.656102314 +0000 -+++ grub-2.02/util/grub.d/10_linux.in 2018-09-04 11:00:55.728089580 +0000 -@@ -28,6 +28,12 @@ - - CLASS="--class gnu-linux --class gnu --class os" +diff -ur grub-2.12.orig/util/grub.d/10_linux.in grub-2.12/util/grub.d/10_linux.in +--- grub-2.12.orig/util/grub.d/10_linux.in 2025-04-27 17:47:18.122797143 +0200 ++++ grub-2.12/util/grub.d/10_linux.in 2025-04-27 17:47:43.810873653 +0200 +@@ -35,6 +35,10 @@ + CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}" + fi -+if [ "x${GRUB_RESTRICTED}" = "xtrue" ] ; then -+ GRUB_UNRESTRICTED_OPTION="" -+else -+ GRUB_UNRESTRICTED_OPTION="--unrestricted" ++if [ "x${GRUB_RESTRICTED}" != "xtrue" ] ; then ++ CLASS="${CLASS} --unrestricted" +fi + - if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then - OS="$(. /etc/os-release ; echo "$NAME $VERSION")" - else -@@ -92,9 +98,9 @@ - title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;" - grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")" - fi -- echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/" -+ echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} ${GRUB_UNRESTRICTED_OPTION} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/" - else -- echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/" -+ echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} ${GRUB_UNRESTRICTED_OPTION} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/" - fi - if [ x$type != xrecovery ] ; then - save_default_entry | grub_add_tab -diff -ur grub-2.02.orig/util/grub.d/30_os-prober.in grub-2.02/util/grub.d/30_os-prober.in ---- grub-2.02.orig/util/grub.d/30_os-prober.in 2018-09-04 10:42:04.649102314 +0000 -+++ grub-2.02/util/grub.d/30_os-prober.in 2018-09-04 11:01:57.024088889 +0000 -@@ -30,6 +30,12 @@ - exit 0 + # loop-AES arranges things so that /dev/loop/X can be our root device, but + # the initrds that Linux uses don't like that. + case ${GRUB_DEVICE} in +diff -ur grub-2.12.orig/util/grub.d/20_linux_xen.in grub-2.12/util/grub.d/20_linux_xen.in +--- grub-2.12.orig/util/grub.d/20_linux_xen.in 2025-04-27 17:47:18.122797143 +0200 ++++ grub-2.12/util/grub.d/20_linux_xen.in 2025-04-27 17:51:45.263592919 +0200 +@@ -35,6 +35,10 @@ + CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}" fi -+if [ "x${GRUB_RESTRICTED}" = "xtrue" ] ; then -+ GRUB_UNRESTRICTED_OPTION="" -+else -+ GRUB_UNRESTRICTED_OPTION="--unrestricted" ++if [ "x${GRUB_RESTRICTED}" != "xtrue" ] ; then ++ CLASS="${CLASS} --unrestricted" +fi + - if [ -z "`which os-prober 2> /dev/null`" ] || [ -z "`which linux-boot-prober 2> /dev/null`" ] ; then - # missing os-prober and/or linux-boot-prober - exit 0 -@@ -52,7 +58,7 @@ - # TRANSLATORS: it refers on the OS residing on device %s - onstr="$(gettext_printf "(on %s)" "${DEVICE}")" - cat << EOF --menuentry '$(echo "${LONGNAME} $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${DEVICE}")' { -+menuentry '$(echo "${LONGNAME} $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os ${GRUB_UNRESTRICTED_OPTION} \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${DEVICE}")' { - EOF - save_default_entry | grub_add_tab - prepare_grub_to_access_device ${DEVICE} | grub_add_tab -@@ -148,7 +154,7 @@ - - onstr="$(gettext_printf "(on %s)" "${DEVICE}")" - cat << EOF --menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' $CLASS --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' { -+menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' $CLASS --class os ${GRUB_UNRESTRICTED_OPTION} \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' { - EOF - save_default_entry | grub_add_tab - prepare_grub_to_access_device ${DEVICE} | grub_add_tab -@@ -180,7 +186,7 @@ - DEVICE=${DEVICE%@*} - onstr="$(gettext_printf "(on %s)" "${DEVICE}")" - cat << EOF --menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' $CLASS --class os \$menuentry_id_option 'osprober-efi-$(grub_get_device_id "${DEVICE}")' { -+menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' $CLASS --class os ${GRUB_UNRESTRICTED_OPTION} \$menuentry_id_option 'osprober-efi-$(grub_get_device_id "${DEVICE}")' { - EOF - save_default_entry | sed -e "s/^/\t/" - prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/" -@@ -236,7 +242,7 @@ - - if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; 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 @@ - fi - title="${LLABEL} $onstr" - cat << EOF -- menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-$LKERNEL-${recovery_params}-$boot_device_id' { -+ menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os ${GRUB_UNRESTRICTED_OPTION} \$menuentry_id_option 'osprober-gnulinux-$LKERNEL-${recovery_params}-$boot_device_id' { - EOF - save_default_entry | sed -e "s/^/$grub_tab$grub_tab/" - printf '%s\n' "${prepare_boot_cache}" | grub_add_tab -@@ -293,7 +299,7 @@ - hurd) - onstr="$(gettext_printf "(on %s)" "${DEVICE}")" - cat << EOF --menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class hurd --class gnu --class os \$menuentry_id_option 'osprober-gnuhurd-/boot/gnumach.gz-false-$(grub_get_device_id "${DEVICE}")' { -+menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class hurd --class gnu --class os ${GRUB_UNRESTRICTED_OPTION} \$menuentry_id_option 'osprober-gnuhurd-/boot/gnumach.gz-false-$(grub_get_device_id "${DEVICE}")' { - EOF - save_default_entry | grub_add_tab - prepare_grub_to_access_device ${DEVICE} | grub_add_tab -diff -ur grub-2.02.orig/util/grub-mkconfig.in grub-2.02/util/grub-mkconfig.in ---- grub-2.02.orig/util/grub-mkconfig.in 2018-09-04 10:42:04.650102314 +0000 -+++ grub-2.02/util/grub-mkconfig.in 2018-09-04 10:50:40.159096510 +0000 -@@ -243,7 +243,8 @@ + # loop-AES arranges things so that /dev/loop/X can be our root device, but + # the initrds that Linux uses don't like that. + case ${GRUB_DEVICE} in +diff -ur grub-2.12.orig/util/grub-mkconfig.in grub-2.12/util/grub-mkconfig.in +--- grub-2.12.orig/util/grub-mkconfig.in 2025-04-27 17:47:18.118797131 +0200 ++++ grub-2.12/util/grub-mkconfig.in 2025-04-27 17:47:43.810873653 +0200 +@@ -271,7 +271,8 @@ GRUB_ENABLE_CRYPTODISK \ GRUB_BADRAM \ GRUB_OS_PROBER_SKIP_LIST \ diff --git a/tld-mkconfigdir.patch b/tld-mkconfigdir.patch index 9363459..3ab26d7 100644 --- a/tld-mkconfigdir.patch +++ b/tld-mkconfigdir.patch @@ -1,7 +1,7 @@ -diff -urNp grub-2.02-rc1.orig/conf/Makefile.common grub-2.02-rc1/conf/Makefile.common ---- grub-2.02-rc1.orig/conf/Makefile.common 2017-02-08 15:02:48.901319660 +0000 -+++ grub-2.02-rc1/conf/Makefile.common 2017-02-08 15:03:00.772319526 +0000 -@@ -61,7 +61,7 @@ CCASFLAGS_LIBRARY = +diff -ur grub-2.04.orig/conf/Makefile.common grub-2.04/conf/Makefile.common +--- grub-2.04.orig/conf/Makefile.common 2019-08-18 15:43:56.021000000 +0200 ++++ grub-2.04/conf/Makefile.common 2019-08-18 15:44:44.088000000 +0200 +@@ -61,7 +61,7 @@ # Other variables @@ -10,10 +10,10 @@ diff -urNp grub-2.02-rc1.orig/conf/Makefile.common grub-2.02-rc1/conf/Makefile.c platformdir = $(pkglibdir)/$(target_cpu)-$(platform) starfielddir = $(pkgdatadir)/themes/starfield -diff -urNp grub-2.02-rc1.orig/util/grub-mkconfig.in grub-2.02-rc1/util/grub-mkconfig.in ---- grub-2.02-rc1.orig/util/grub-mkconfig.in 2017-02-08 15:02:48.949319659 +0000 -+++ grub-2.02-rc1/util/grub-mkconfig.in 2017-02-08 15:03:00.772319526 +0000 -@@ -37,7 +37,7 @@ fi +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:56.080000000 +0200 ++++ grub-2.04/util/grub-mkconfig.in 2019-08-18 15:44:44.089000000 +0200 +@@ -37,7 +37,7 @@ export pkgdatadir grub_cfg="" diff --git a/tld-sysconfdir.patch b/tld-sysconfdir.patch index f5f0809..0c0c7e7 100644 --- a/tld-sysconfdir.patch +++ b/tld-sysconfdir.patch @@ -1,17 +1,1266 @@ -diff -urNp grub-2.02-rc1.orig/util/grub.d/README grub-2.02-rc1/util/grub.d/README ---- grub-2.02-rc1.orig/util/grub.d/README 2017-02-03 19:17:48.000000000 +0000 -+++ grub-2.02-rc1/util/grub.d/README 2017-02-08 15:00:50.481320993 +0000 -@@ -8,4 +8,4 @@ All executable files in this directory a +diff -ur grub-2.12.orig/docs/grub.info-1 grub-2.12/docs/grub.info-1 +--- grub-2.12.orig/docs/grub.info-1 2023-12-20 17:03:44.000000000 +0100 ++++ grub-2.12/docs/grub.info-1 2025-04-26 21:20:04.270885832 +0200 +@@ -1204,7 +1204,7 @@ + Booting::, and *note Shell-like scripting::), and to disable any system + provided by their distribution to automatically run 'grub-mkconfig'. + +- The file '/etc/default/grub' controls the operation of ++ The file '/etc/sysconfig/grub' controls the operation of + 'grub-mkconfig'. It is sourced by a shell script, and so must be valid + POSIX shell input; normally, it will just be a sequence of 'KEY=value' + lines, but if the value contains spaces or other special characters then +@@ -1212,7 +1212,7 @@ + + GRUB_TERMINAL_INPUT="console serial" + +- Valid keys in '/etc/default/grub' are as follows: ++ Valid keys in '/etc/sysconfig/grub' are as follows: + + 'GRUB_DEFAULT' + The default menu entry. This may be a number, in which case it +@@ -1841,7 +1841,7 @@ + + 'GRUB_DISABLE_OS_PROBER=true' + +- in /etc/default/grub ++ in /etc/sysconfig/grub + + Then write a grub.cfg (/mnt/boot/grub/grub.cfg): + +@@ -2681,7 +2681,7 @@ + Some laptop vendors provide an additional power-on button which boots + another OS. GRUB supports such buttons with the 'GRUB_TIMEOUT_BUTTON', + 'GRUB_TIMEOUT_STYLE_BUTTON', 'GRUB_DEFAULT_BUTTON', and +-'GRUB_BUTTON_CMOS_ADDRESS' variables in default/grub (*note Simple ++'GRUB_BUTTON_CMOS_ADDRESS' variables in sysconfig/grub (*note Simple + configuration::). 'GRUB_TIMEOUT_BUTTON', 'GRUB_TIMEOUT_STYLE_BUTTON', + and 'GRUB_DEFAULT_BUTTON' are used instead of the corresponding + variables without the '_BUTTON' suffix when powered on using the special +diff -ur grub-2.12.orig/docs/grub.texi grub-2.12/docs/grub.texi +--- grub-2.12.orig/docs/grub.texi 2023-12-05 15:25:33.000000000 +0100 ++++ grub-2.12/docs/grub.texi 2025-04-26 21:20:10.962904809 +0200 +@@ -1284,7 +1284,7 @@ + (@pxref{Booting}, and @ref{Shell-like scripting}), and to disable any system + provided by their distribution to automatically run @command{grub-mkconfig}. + +-The file @file{/etc/default/grub} controls the operation of ++The file @file{/etc/sysconfig/grub} controls the operation of + @command{grub-mkconfig}. It is sourced by a shell script, and so must be + valid POSIX shell input; normally, it will just be a sequence of + @samp{KEY=value} lines, but if the value contains spaces or other special +@@ -1294,7 +1294,7 @@ + GRUB_TERMINAL_INPUT="console serial" + @end example + +-Valid keys in @file{/etc/default/grub} are as follows: ++Valid keys in @file{/etc/sysconfig/grub} are as follows: + + @table @samp + @item GRUB_DEFAULT +@@ -1908,7 +1908,7 @@ + + @code{GRUB_DISABLE_OS_PROBER=true} + +-in /etc/default/grub ++in /etc/sysconfig/grub + + Then write a grub.cfg (/mnt/boot/grub/grub.cfg): + +@@ -2740,7 +2740,7 @@ + Some laptop vendors provide an additional power-on button which boots + another OS. GRUB supports such buttons with the @samp{GRUB_TIMEOUT_BUTTON}, + @samp{GRUB_TIMEOUT_STYLE_BUTTON}, @samp{GRUB_DEFAULT_BUTTON}, and +-@samp{GRUB_BUTTON_CMOS_ADDRESS} variables in default/grub (@pxref{Simple ++@samp{GRUB_BUTTON_CMOS_ADDRESS} variables in sysconfig/grub (@pxref{Simple + configuration}). @samp{GRUB_TIMEOUT_BUTTON}, + @samp{GRUB_TIMEOUT_STYLE_BUTTON}, and @samp{GRUB_DEFAULT_BUTTON} are used + instead of the corresponding variables without the @samp{_BUTTON} suffix +diff -ur grub-2.12.orig/grub-core/osdep/aros/config.c grub-2.12/grub-core/osdep/aros/config.c +--- grub-2.12.orig/grub-core/osdep/aros/config.c 2022-03-21 18:47:00.000000000 +0100 ++++ grub-2.12/grub-core/osdep/aros/config.c 2025-04-26 21:51:11.459833102 +0200 +@@ -36,7 +36,7 @@ + static char *value = NULL; + if (!value) + value = grub_util_path_concat (3, GRUB_SYSCONFDIR, +- "default", "grub"); ++ "sysconfig", "grub"); + return value; + } + +diff -ur grub-2.12.orig/grub-core/osdep/unix/config.c grub-2.12/grub-core/osdep/unix/config.c +--- grub-2.12.orig/grub-core/osdep/unix/config.c 2022-03-21 18:47:00.000000000 +0100 ++++ grub-2.12/grub-core/osdep/unix/config.c 2025-04-26 21:51:02.807812014 +0200 +@@ -36,7 +36,7 @@ + static char *value = NULL; + if (!value) + value = grub_util_path_concat (3, GRUB_SYSCONFDIR, +- "default", "grub"); ++ "sysconfig", "grub"); + return value; + } + +diff -ur grub-2.12.orig/po/ast.po grub-2.12/po/ast.po +--- grub-2.12.orig/po/ast.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/ast.po 2025-04-26 21:20:44.418999686 +0200 +@@ -7428,13 +7428,13 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Deteutáronse fallos de sintaxis nel ficheru xeneráu de la\n" + " configuración de GRUB. Asegúrate que nun heba fallos\n" +-" nos ficheros /etc/default/grub y /etc/grub.d/*, sinón\n" ++" nos ficheros /etc/sysconfig/grub y /etc/grub.d/*, sinón\n" + " rellena un informe de fallos col ficheru de darréu axuntáu\n" + "%s ." + +@@ -7511,8 +7511,8 @@ + msgstr "Afita la entrada predeterminada del menú d'arranque de GRUB." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Esto rique l'axuste GRUB_DEFAULT=saved en %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Esto rique l'axuste GRUB_DEFAULT=saved en %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/ca.po grub-2.12/po/ca.po +--- grub-2.12.orig/po/ca.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/ca.po 2025-04-26 21:21:36.791148224 +0200 +@@ -7474,13 +7474,13 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "S'han detectat errors de sintaxi al fitxer de configuració del GRUB " + "generat.\n" +-"Assegureu-vos que no hi ha errors a /etc/default/grub o als fitxers\n" ++"Assegureu-vos que no hi ha errors a /etc/sysconfig/grub o als fitxers\n" + " /etc/grub.d/* o bé envieu un informe d'error adjuntant el fitxer %s " + + #: util/grub-mkconfig.in:315 +@@ -7553,8 +7553,8 @@ + msgstr "Estableix l'entrada del menú d'arrencada per defecte del GRUB." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Necessita configurar GRUB_DEFAULT=saved a %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Necessita configurar GRUB_DEFAULT=saved a %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/da.po grub-2.12/po/da.po +--- grub-2.12.orig/po/da.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/da.po 2025-04-26 21:22:52.575363166 +0200 +@@ -7439,13 +7439,13 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Der blev fundet syntaksfejl i den genererede GRUB-\n" + "konfigurationsfil. Sikr dig at der ikke er nogen fejl\n" +-"i filerne /etc/default/grub eller /etc/grub.d/*, eller\n" ++"i filerne /etc/sysconfig/grub eller /etc/grub.d/*, eller\n" + "indsend venligst en fejlrapport med filen %s vedhæftet." + + #: util/grub-mkconfig.in:315 +@@ -7514,8 +7514,8 @@ + msgstr "Sæt standardmenuindgangen for opstart i GRUB." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Dette kræver at GRUB_DEFAULT=saved angives i %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Dette kræver at GRUB_DEFAULT=saved angives i %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/de_CH.po grub-2.12/po/de_CH.po +--- grub-2.12.orig/po/de_CH.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/de_CH.po 2025-04-26 21:21:13.035080850 +0200 +@@ -7433,12 +7433,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "In der erzeugten GRUB-Konfigurationsdatei wurden Syntaxfehler\n" +-"erkannt. Stellen Sie sicher, dass die Dateien etc/default/grub\n" ++"erkannt. Stellen Sie sicher, dass die Dateien etc/sysconfig/grub\n" + "und /etc/grub.d/* fehlerfrei sind oder melden Sie einen Fehler\n" + "und hängen die Datei %s an." + +@@ -7514,8 +7514,8 @@ + msgstr "Den Standardeintrag im GRUB-Bootmenü festlegen." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Dazu muss GRUB_DEFAULT=saved in %s/default/grub gesetzt werden.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Dazu muss GRUB_DEFAULT=saved in %s/sysconfig/grub gesetzt werden.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/de@hebrew.po grub-2.12/po/de@hebrew.po +--- grub-2.12.orig/po/de@hebrew.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/de@hebrew.po 2025-04-26 21:21:55.659201739 +0200 +@@ -7426,7 +7426,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7507,7 +7507,7 @@ + msgstr "דענ שתאנדארדעִינתראג ִימ גרוּבּ-בּוֹוֹתמענֻ פֿעשתלעגענ." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "דאזוּ מוּשש גרוּבּ_דעפֿאוּלת=שאבֿעד ִינ %s/דעפֿאוּלת/גרוּבּ געשעתזת וערדענ.\\נ" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/de.po grub-2.12/po/de.po +--- grub-2.12.orig/po/de.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/de.po 2025-04-26 21:23:22.459447930 +0200 +@@ -7432,12 +7432,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "In der erzeugten GRUB-Konfigurationsdatei wurden Syntaxfehler\n" +-"erkannt. Stellen Sie sicher, dass die Dateien etc/default/grub\n" ++"erkannt. Stellen Sie sicher, dass die Dateien etc/sysconfig/grub\n" + "und /etc/grub.d/* fehlerfrei sind oder melden Sie einen Fehler\n" + "und hängen die Datei %s an." + +@@ -7513,8 +7513,8 @@ + msgstr "Den Standardeintrag im GRUB-Bootmenü festlegen." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Dazu muss GRUB_DEFAULT=saved in %s/default/grub gesetzt werden.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Dazu muss GRUB_DEFAULT=saved in %s/sysconfig/grub gesetzt werden.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/en@arabic.po grub-2.12/po/en@arabic.po +--- grub-2.12.orig/po/en@arabic.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/en@arabic.po 2025-04-26 21:21:21.175103936 +0200 +@@ -7336,7 +7336,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7414,7 +7414,7 @@ + msgstr "سعت تهع دعفاولت بووت معنو عنتري فور غروب." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "تهִيس رعقوִيرعس سعتتִينغ غروب_دعفاولت=ساوعد ִين %s/دعفاولت/غروب.\\ن" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/en@cyrillic.po grub-2.12/po/en@cyrillic.po +--- grub-2.12.orig/po/en@cyrillic.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/en@cyrillic.po 2025-04-26 21:22:22.807278737 +0200 +@@ -7335,7 +7335,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7413,7 +7413,7 @@ + msgstr "Сет тхе дефаулт боот мену ентрѝ фор ГРУБ." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "Тхис реќуирес сеттинг ГРУБ_ДЕФАУЛТ=савед ин %s/дефаулт/груб.\\н" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/en@greek.po grub-2.12/po/en@greek.po +--- grub-2.12.orig/po/en@greek.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/en@greek.po 2025-04-26 21:24:32.647647004 +0200 +@@ -7335,7 +7335,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7413,7 +7413,7 @@ + msgstr "Σετ τχε δεφαυλτ ϭοοτ μενυ εντρϋ φορ ΓΡΥϬ." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "Τχισ ρεϗυιρεσ σεττινγ ΓΡΥϬ_ΔΕΦΑΥΛΤ=σαβεδ ιν %s/δεφαυλτ/γρυϭ.\\ν" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/en@hebrew.po grub-2.12/po/en@hebrew.po +--- grub-2.12.orig/po/en@hebrew.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/en@hebrew.po 2025-04-26 21:22:34.515311944 +0200 +@@ -7336,7 +7336,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7414,7 +7414,7 @@ + msgstr "שעת תהע דעפֿאוּלת בּוֹוֹת מענוּ ענתריִ פֿוֹר גרוּבּ." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "תהִיש רעקוִּירעש שעתתִינג גרוּבּ_דעפֿאוּלת=שאבֿעד ִינ %s/דעפֿאוּלת/גרוּבּ.\\נ" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/en@piglatin.po grub-2.12/po/en@piglatin.po +--- grub-2.12.orig/po/en@piglatin.po 2023-12-20 17:09:22.000000000 +0100 ++++ grub-2.12/po/en@piglatin.po 2025-04-26 21:23:14.723425987 +0200 +@@ -7510,7 +7510,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7600,7 +7600,7 @@ + msgstr "etSay ethay efaultday ootbay enumay entryway orfay UBGRay." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" + "isThay equiresray ettingsay UBGRay_EFAULTDay=avedsay inway %s/efaultday/" + "ubgray.\\n" +diff -ur grub-2.12.orig/po/en@quot.po grub-2.12/po/en@quot.po +--- grub-2.12.orig/po/en@quot.po 2023-12-20 17:09:21.000000000 +0100 ++++ grub-2.12/po/en@quot.po 2025-04-26 21:24:17.183603147 +0200 +@@ -7357,12 +7357,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + +@@ -7435,8 +7435,8 @@ + msgstr "Set the default boot menu entry for GRUB." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/eo.po grub-2.12/po/eo.po +--- grub-2.12.orig/po/eo.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/eo.po 2025-04-26 21:24:22.123617156 +0200 +@@ -7304,7 +7304,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7366,7 +7366,7 @@ + msgstr "" + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/es.po grub-2.12/po/es.po +--- grub-2.12.orig/po/es.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/es.po 2025-04-26 21:21:42.587164664 +0200 +@@ -7562,13 +7562,13 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Se han detectado errores de sintaxis en el fichero de\n" + "configuración de GRUB generado.\n" +-"Asegurese de que no hay errores en /etc/default/grub\n" ++"Asegurese de que no hay errores en /etc/sysconfig/grub\n" + "en los ficheros /etc/grub.d/* o, por favor, abra una\n" + "notificación de errores con el fichero %s adjunto." + +@@ -7641,8 +7641,8 @@ + msgstr "Establece la entrada del menú predeterminada para GRUB." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Esto requere establecer GRUB_DEFAULT=saved en %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Esto requere establecer GRUB_DEFAULT=saved en %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/fi.po grub-2.12/po/fi.po +--- grub-2.12.orig/po/fi.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/fi.po 2025-04-26 21:22:18.151265528 +0200 +@@ -7416,12 +7416,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Syntaksivirheitä havaittu luodussa GRUB-määritystiedostossa.\n" +-"Varmista, että /etc/default/grub- ja /etc/grub.d/* -tiedostoi\n" ++"Varmista, että /etc/sysconfig/grub- ja /etc/grub.d/* -tiedostoi\n" + "ei ole virheitä, tai tee vikailmoitus liittäen\n" + "%s mukaan ilmoitukseen." + +@@ -7503,9 +7503,9 @@ + msgstr "Aseta GRUBin käynnistysvalikon oletuskohta." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" +-"Tämä vaatii asetuksen GRUB_DEFAULT=saved tiedostoon %s/default/grub.\\n" ++"Tämä vaatii asetuksen GRUB_DEFAULT=saved tiedostoon %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/fr.po grub-2.12/po/fr.po +--- grub-2.12.orig/po/fr.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/fr.po 2025-04-26 21:23:05.015398450 +0200 +@@ -7516,13 +7516,13 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Des erreurs de syntaxe sont détectées dans le fichier de configuration\n" + "de GRUB. Veuillez vérifier qu'il n'y a pas d'erreur dans les fichiers\n" +-"/etc/default/grub et /etc/grub.d/*. Sinon veuillez signaler un bogue\n" ++"/etc/sysconfig/grub et /etc/grub.d/*. Sinon veuillez signaler un bogue\n" + "en joignant le fichier %s." + + #: util/grub-mkconfig.in:315 +@@ -7602,9 +7602,9 @@ + msgstr "Configurer l'entrée de menu par défaut pour GRUB." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" +-"Cela nécessite de configurer GRUB_DEFAULT=saved dans %s/default/grub.\\n" ++"Cela nécessite de configurer GRUB_DEFAULT=saved dans %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/gl.po grub-2.12/po/gl.po +--- grub-2.12.orig/po/gl.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/gl.po 2025-04-26 21:24:11.171586092 +0200 +@@ -7490,12 +7490,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Detectáronse erros sintácticos no ficheiro de configuración do GRUB xerado.\n" +-"Asegúrese de que non hai erros en /etc/default/grub\n" ++"Asegúrese de que non hai erros en /etc/sysconfig/grub\n" + "e nos ficheiros /etc/grub.d/* ou escriba un informe de erro co\n" + "%s ficheiro anexado." + +@@ -7560,9 +7560,9 @@ + msgstr "Estabelecer a entrada predeterminada do menú de arranque no GRUB." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" +-"Isto require a opción GRUB_PREDETERMINADO=gardada en %s/default/grub.\\n" ++"Isto require a opción GRUB_PREDETERMINADO=gardada en %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/grub.pot grub-2.12/po/grub.pot +--- grub-2.12.orig/po/grub.pot 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/grub.pot 2025-04-26 21:22:01.503218314 +0200 +@@ -7155,7 +7155,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7217,7 +7217,7 @@ + msgstr "" + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/he.po grub-2.12/po/he.po +--- grub-2.12.orig/po/he.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/he.po 2025-04-26 21:23:26.147458390 +0200 +@@ -7193,7 +7193,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7255,8 +7255,8 @@ + msgstr "הגדרת רשומת ברירת המחדל בתפריט הטעינה ל־GRUB." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "דורש את ההגדרה GRUB_DEFAULT=saved תחת %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "דורש את ההגדרה GRUB_DEFAULT=saved תחת %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/hr.po grub-2.12/po/hr.po +--- grub-2.12.orig/po/hr.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/hr.po 2025-04-26 21:23:57.651547748 +0200 +@@ -7397,12 +7397,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Greške sintakse su otkrivene u stvorenoj GRUB datoteci podešavanja.\n" +-"Pobrinite se da ne postoje greške u /etc/default/grub\n" ++"Pobrinite se da ne postoje greške u /etc/sysconfig/grub\n" + "i /etc/grub.d/* datotekama ili pošaljite izvješće greške s\n" + "%s priloženoj datoteci." + +@@ -7475,8 +7475,8 @@ + msgstr "Postavi zadanu stavku izbornika pokretanja za GRUB." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Ovo zahtijeva postavku GRUB_DEFAULT=spremljenju u %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Ovo zahtijeva postavku GRUB_DEFAULT=spremljenju u %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/hu.po grub-2.12/po/hu.po +--- grub-2.12.orig/po/hu.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/hu.po 2025-04-26 21:20:54.963029591 +0200 +@@ -7431,12 +7431,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Szintaktikai hibák találhatók az előállított GRUB beállítófájlban.\n" +-"Győződjön meg arról, hogy nincsenek hibák a /etc/default/grub\n" ++"Győződjön meg arról, hogy nincsenek hibák a /etc/sysconfig/grub\n" + "és a /etc/grub.d/* fájlokban, vagy küldjön egy hibajelentést a(z)\n" + "%s fájllal mellékelve." + +@@ -7513,9 +7513,9 @@ + msgstr "A GRUB alapértelmezett rendszerindítási menübejegyzésének beállítása." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" +-"Ez a GRUB_DEFAULT=saved beállítást igényli a(z) %s/default/grub fájlban.\\n" ++"Ez a GRUB_DEFAULT=saved beállítást igényli a(z) %s/sysconfig/grub fájlban.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/id.po grub-2.12/po/id.po +--- grub-2.12.orig/po/id.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/id.po 2025-04-26 21:23:40.283498490 +0200 +@@ -7470,7 +7470,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7533,7 +7533,7 @@ + msgstr "" + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/it.po grub-2.12/po/it.po +--- grub-2.12.orig/po/it.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/it.po 2025-04-26 21:24:28.815636136 +0200 +@@ -7482,7 +7482,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7548,7 +7548,7 @@ + msgstr "" + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/ja.po grub-2.12/po/ja.po +--- grub-2.12.orig/po/ja.po 2023-12-20 17:09:18.000000000 +0100 ++++ grub-2.12/po/ja.po 2025-04-26 21:20:18.178925273 +0200 +@@ -7318,7 +7318,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7380,7 +7380,7 @@ + msgstr "" + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/ka.po grub-2.12/po/ka.po +--- grub-2.12.orig/po/ka.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/ka.po 2025-04-26 21:20:48.571011463 +0200 +@@ -7215,7 +7215,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7277,7 +7277,7 @@ + msgstr "GRUB-ის მენიუს ნაგულისხმები პუნქტის დაყენება." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/ko.po grub-2.12/po/ko.po +--- grub-2.12.orig/po/ko.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/ko.po 2025-04-26 21:49:54.163644672 +0200 +@@ -7342,12 +7342,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "생성한 GRUB 설정 파일에 문법 오류가 있습니다.\n" +-"/etc/default/grub 파일과 and /etc/grub.d/* 파일에 오류가 없는지\n" ++"/etc/sysconfig/grub 파일과 and /etc/grub.d/* 파일에 오류가 없는지\n" + "확인하시고 %s 파일을 첨부하여 버그 보고서를 제출하십시오." + + #: util/grub-mkconfig.in:315 +@@ -7416,8 +7416,8 @@ + msgstr "GRUB 기본 부팅 메뉴 항목을 설정합니다." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "%s/default/grub에 GRUB_DEFAULT=saved 값을 설정해야합니다.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "%s/sysconfig/grub에 GRUB_DEFAULT=saved 값을 설정해야합니다.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/lg.po grub-2.12/po/lg.po +--- grub-2.12.orig/po/lg.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/lg.po 2025-04-26 21:24:42.071673736 +0200 +@@ -7185,7 +7185,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7247,7 +7247,7 @@ + msgstr "" + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/lt.po grub-2.12/po/lt.po +--- grub-2.12.orig/po/lt.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/lt.po 2025-04-26 21:23:36.715488368 +0200 +@@ -7365,12 +7365,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Sukurtame GRUB konfigūracijos faile aptikta klaidų.\n" +-"Įsitikinkite, ar nėra klaidų /etc/default/grub\n" ++"Įsitikinkite, ar nėra klaidų /etc/sysconfig/grub\n" + "ir /etc/grub.d/* failuose arba praneškite apie klaidą\n" + "prisegdami %s failą." + +@@ -7433,8 +7433,8 @@ + msgstr "Nurodyti numatytąjį numatytąjį paleidimo GRUB meniu įrašą." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Tam reikia įrašyti GRUB_DEFAULT=saved faile %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Tam reikia įrašyti GRUB_DEFAULT=saved faile %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/nb.po grub-2.12/po/nb.po +--- grub-2.12.orig/po/nb.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/nb.po 2025-04-26 21:23:44.367510074 +0200 +@@ -7399,12 +7399,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Generert GRUB-oppsettsfil inneholder syntaksfeil.\n" +-"Kontroller at grunnlaget i /etc/default/grub og /etc/grub.d/*\n" ++"Kontroller at grunnlaget i /etc/sysconfig/grub og /etc/grub.d/*\n" + "ikke innheholder feil, og send inn en feilrapport\n" + "med %s vedlagt hvis du fremdeles har problemer." + +@@ -7479,9 +7479,9 @@ + msgstr "Velg standardoppføring på GRUB-oppstartsmenyen." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" +-"Dette krever at du gir en verdi til «GRUB_DEFAULT=» i fila %s/default/grub." ++"Dette krever at du gir en verdi til «GRUB_DEFAULT=» i fila %s/sysconfig/grub." + "\\n" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/nl.po grub-2.12/po/nl.po +--- grub-2.12.orig/po/nl.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/nl.po 2025-04-26 21:21:01.231047371 +0200 +@@ -7458,12 +7458,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Er zijn syntaxfouten gevonden in het aangemaakte GRUB-configuratiebestand.\n" +-"Verzeker u ervan dat er geen fouten zitten in het bestand /etc/default/grub\n" ++"Verzeker u ervan dat er geen fouten zitten in het bestand /etc/sysconfig/grub\n" + "noch in de bestanden in /etc/grub.d/. Rapporteer anders een fout, met het\n" + "bestand %s als bijlage." + +@@ -7533,9 +7533,9 @@ + msgstr "Het standaardmenu-item voor GRUB instellen." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" +-"Dit vereist het instellen van GRUB_DEFAULT=saved in %s/default/grub.\\n" ++"Dit vereist het instellen van GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/pa.po grub-2.12/po/pa.po +--- grub-2.12.orig/po/pa.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/pa.po 2025-04-26 21:22:29.351297297 +0200 +@@ -7251,7 +7251,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7313,7 +7313,7 @@ + msgstr "ਗਰਬ ਲਈ ਮੂਲ ਬੂਟ ਮੇਨੂ ਐਂਟਰੀ ਸੈੱਟ ਕਰੋ।" + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/pl.po grub-2.12/po/pl.po +--- grub-2.12.orig/po/pl.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/pl.po 2025-04-26 21:20:35.298973828 +0200 +@@ -7411,12 +7411,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "W wygenerowanym pliku konfiguracyjnym GRUB-a wykryto błędy składni.\n" +-"Proszę się upewnić, że nie ma błędów w plikach /etc/default/grub\n" ++"Proszę się upewnić, że nie ma błędów w plikach /etc/sysconfig/grub\n" + "oraz /etc/grub.d/* albo wypełnić raport błędu z załączonym plikiem\n" + "%s." + +@@ -7492,8 +7492,8 @@ + msgstr "Ustawia domyślny wpis menu dla GRUB-a." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Wymaga to ustawienia GRUB_DEFAULT=saved w %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Wymaga to ustawienia GRUB_DEFAULT=saved w %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/pt_BR.po grub-2.12/po/pt_BR.po +--- grub-2.12.orig/po/pt_BR.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/pt_BR.po 2025-04-26 21:22:48.039350302 +0200 +@@ -7438,7 +7438,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7502,7 +7502,7 @@ + msgstr "Definir a entrada do menu padrão para o GRUB." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/pt.po grub-2.12/po/pt.po +--- grub-2.12.orig/po/pt.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/pt.po 2025-04-26 21:21:47.527178676 +0200 +@@ -7414,12 +7414,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Erros de sintaxe são detectados no ficheiro de configuração GRUB.\n" +-"gerado. Assegure-se de que não há erros em /etc/default/grub\n" ++"gerado. Assegure-se de que não há erros em /etc/sysconfig/grub\n" + "e /etc/grub.d/* files ou, por favor, envie um relatório com\n" + "o ficheiro %s anexado." + +@@ -7493,8 +7493,8 @@ + msgstr "Predefinir a entrada GRUB de arranque." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Isto requer definir GRUB_DEFAULT= gravado em %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Isto requer definir GRUB_DEFAULT= gravado em %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/ro.po grub-2.12/po/ro.po +--- grub-2.12.orig/po/ro.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/ro.po 2025-04-26 21:24:47.755689857 +0200 +@@ -7611,13 +7611,13 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "S-au detectat erori de sintaxă în fișierul de configurare\n" + "generat pentru GRUB.\n" +-"Asigurați-vă că nu există erori în fișierele „/etc/default/grub”\n" ++"Asigurați-vă că nu există erori în fișierele „/etc/sysconfig/grub”\n" + "și „/etc/grub.d/*” sau trimiteți un raport de eroare cu fișierul\n" + "„%s” atașat." + +@@ -7700,9 +7700,9 @@ + msgstr "Stabilește intrarea implicită din meniul de pornire pentru GRUB." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" +-"Aceasta necesită configurarea «GRUB_DEFAULT=saved» în „%s/default/grub”.\\n" ++"Aceasta necesită configurarea «GRUB_DEFAULT=saved» în „%s/sysconfig/grub”.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/ru.po grub-2.12/po/ru.po +--- grub-2.12.orig/po/ru.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/ru.po 2025-04-26 21:22:59.727383451 +0200 +@@ -7426,12 +7426,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "В сгенерированном файле настроек GRUB обнаружены синтаксические ошибки.\n" +-"Убедитесь, что в файлах /etc/default/grub\n" ++"Убедитесь, что в файлах /etc/sysconfig/grub\n" + "и /etc/grub.d/* ошибки отсутствуют или пошлите сообщение об ошибке\n" + "в прикреплённым файлом %s." + +@@ -7506,8 +7506,8 @@ + msgstr "Назначает пункт меню GRUB для загрузки по умолчанию." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Для этого требуется строка GRUB_DEFAULT=saved в %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Для этого требуется строка GRUB_DEFAULT=saved в %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/sl.po grub-2.12/po/sl.po +--- grub-2.12.orig/po/sl.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/sl.po 2025-04-26 21:20:40.110987471 +0200 +@@ -7448,12 +7448,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "V ustvarjeni nastavitveni datoteki GRUB so zaznane napake\n" +-" skladnje. Prepričajte se, da v datotekah /etc/default/grub in\n" ++" skladnje. Prepričajte se, da v datotekah /etc/sysconfig/grub in\n" + "/etc/grub.d/* ni napak ali pa pošljite poročilo o hrošču s pripeto\n" + "datoteko %s." + +@@ -7514,7 +7514,7 @@ + msgstr "Nastavi privzeti vnos menija zagona za GRUB." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/po/sr.po grub-2.12/po/sr.po +--- grub-2.12.orig/po/sr.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/sr.po 2025-04-26 21:24:36.903659075 +0200 +@@ -7386,12 +7386,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Откривене су грешке синтаксе у створеној датотеци подешавања ГРУБ-а.\n" +-"Проверите да ли има грешака у датотекама „/etc/default/grub“\n" ++"Проверите да ли има грешака у датотекама „/etc/sysconfig/grub“\n" + "и „/etc/grub.d/*“ или попуните извештај о грешкама\n" + "и приложите датотеку „%s“." + +@@ -7468,8 +7468,8 @@ + msgstr "Подешава основни унос изборника подизања за ГРУБ." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Ово захтева подешавање „GRUB_DEFAULT=saved“ у „%s/default/grub“.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Ово захтева подешавање „GRUB_DEFAULT=saved“ у „%s/sysconfig/grub“.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/sv.po grub-2.12/po/sv.po +--- grub-2.12.orig/po/sv.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/sv.po 2025-04-26 21:21:25.623116552 +0200 +@@ -7391,12 +7391,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Syntaxfel upptäcktes i den genererade GRUB-konfigurationsfilen.\n" +-"Kontrollera att det inte finns några fel i /etc/default/grub-\n" ++"Kontrollera att det inte finns några fel i /etc/sysconfig/grub-\n" + "och /etc/grub.d/*-filerna eller skicka in en felrapport med\n" + "bifogad %s-fil." + +@@ -7469,8 +7469,8 @@ + msgstr "Ange standardpost för GRUBs startmeny." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Detta kräver inställningen GRUB_DEFAULT=saved i %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Detta kräver inställningen GRUB_DEFAULT=saved i %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/tr.po grub-2.12/po/tr.po +--- grub-2.12.orig/po/tr.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/tr.po 2025-04-26 21:21:07.087063979 +0200 +@@ -7299,7 +7299,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7363,8 +7363,8 @@ + msgstr "GRUB için öntanımlı önyükleme menü girdisini ayarla." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Bu, %s/default/grub içinde GRUB_DEFAULT=saved olmasını gerektirir.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Bu, %s/sysconfig/grub içinde GRUB_DEFAULT=saved olmasını gerektirir.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/uk.po grub-2.12/po/uk.po +--- grub-2.12.orig/po/uk.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/uk.po 2025-04-26 21:23:49.691525172 +0200 +@@ -7469,12 +7469,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Виявлено синтаксичні помилки у файлі налаштувань GRUB.\n" +-"Переконайтеся, що у файлах /etc/default/grub і /etc/grub.d/*\n" ++"Переконайтеся, що у файлах /etc/sysconfig/grub і /etc/grub.d/*\n" + "немає помилок, будь ласка, створіть звіт щодо вади з\n" + "долученням файла %s." + +@@ -7552,8 +7552,8 @@ + msgstr "Встановити типовий пункт меню завантаження для GRUB." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Потребує встановлення GRUB_DEFAULT=saved у %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Потребує встановлення GRUB_DEFAULT=saved у %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/vi.po grub-2.12/po/vi.po +--- grub-2.12.orig/po/vi.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/vi.po 2025-04-26 21:22:38.555323401 +0200 +@@ -7399,12 +7399,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "Các lỗi cú pháp đã được phát hiện trong tập tin cấu hình GRUB đã tạo.\n" +-"Hãy chắc chắn rằng không có lỗi nào trong tập tin /etc/default/grub\n" ++"Hãy chắc chắn rằng không có lỗi nào trong tập tin /etc/sysconfig/grub\n" + "và /etc/grub.d/* hoặc báo cáo tập tin lỗi này bằng cách đính\n" + "kèm tập tin %s." + +@@ -7481,8 +7481,8 @@ + msgstr "Đặt mục menu khởi động mặc định cho GRUB." + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "Cái này yêu cầu cài đặt GRUB_DEFAULT=saved trong %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "Cái này yêu cầu cài đặt GRUB_DEFAULT=saved trong %s/sysconfig/grub.\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/zh_CN.po grub-2.12/po/zh_CN.po +--- grub-2.12.orig/po/zh_CN.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/zh_CN.po 2025-04-26 21:24:04.391566862 +0200 +@@ -7273,12 +7273,12 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" + "生成的 GRUB 配置文件中检测到了语法错误。\n" +-"请确保 /etc/default/grub 和 /etc/grub/*\n" ++"请确保 /etc/sysconfig/grub 和 /etc/grub/*\n" + "文件中没有错误,或者请提交一个缺陷报告并\n" + "将 %s 文件作为附件。" + +@@ -7348,8 +7348,8 @@ + msgstr "设置 GRUB 默认引导菜单项。" + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" +-msgstr "这需要在 %s/default/grub 中设置 GRUB_DEFAULT=saved 才能实现。\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" ++msgstr "这需要在 %s/sysconfig/grub 中设置 GRUB_DEFAULT=saved 才能实现。\\n" + + #: util/grub-set-default.in:56 + msgid "MENU_ENTRY is a number, a menu item title or a menu item identifier." +diff -ur grub-2.12.orig/po/zh_TW.po grub-2.12/po/zh_TW.po +--- grub-2.12.orig/po/zh_TW.po 2023-12-20 17:09:19.000000000 +0100 ++++ grub-2.12/po/zh_TW.po 2025-04-26 21:21:31.799134069 +0200 +@@ -7383,7 +7383,7 @@ + #: util/grub-mkconfig.in:299 + msgid "" + "Syntax errors are detected in generated GRUB config file.\n" +-"Ensure that there are no errors in /etc/default/grub\n" ++"Ensure that there are no errors in /etc/sysconfig/grub\n" + "and /etc/grub.d/* files or please file a bug report with\n" + "%s file attached." + msgstr "" +@@ -7446,7 +7446,7 @@ + msgstr "" + + #: util/grub-set-default.in:49 +-msgid "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\\n" ++msgid "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\\n" + msgstr "" + + #: util/grub-set-default.in:56 +diff -ur grub-2.12.orig/util/grub.d/README grub-2.12/util/grub.d/README +--- grub-2.12.orig/util/grub.d/README 2018-11-24 18:13:02.000000000 +0100 ++++ grub-2.12/util/grub.d/README 2025-04-26 21:19:00.010701410 +0200 +@@ -8,4 +8,4 @@ The number namespace in-between is configurable by system installer and/or administrator. For example, you can add an entry to boot another OS as 01_otheros, 11_otheros, etc, depending on the position you want it to occupy in -the menu; and then adjust the default setting via /etc/default/grub. +the menu; and then adjust the default setting via /etc/sysconfig/grub. -diff -urNp grub-2.02-rc1.orig/util/grub-mkconfig.in grub-2.02-rc1/util/grub-mkconfig.in ---- grub-2.02-rc1.orig/util/grub-mkconfig.in 2017-02-03 19:17:48.000000000 +0000 -+++ grub-2.02-rc1/util/grub-mkconfig.in 2017-02-08 15:00:50.481320993 +0000 -@@ -147,8 +147,8 @@ if [ x"$GRUB_FS" = xunknown ]; then - GRUB_FS="$(stat -f --printf=%T / || echo unknown)" +diff -ur grub-2.12.orig/util/grub-mkconfig.in grub-2.12/util/grub-mkconfig.in +--- grub-2.12.orig/util/grub-mkconfig.in 2022-11-14 16:52:54.000000000 +0100 ++++ grub-2.12/util/grub-mkconfig.in 2025-04-26 21:19:00.010701410 +0200 +@@ -157,8 +157,8 @@ + GRUB_EARLY_INITRD_LINUX_STOCK="intel-uc.img intel-ucode.img amd-uc.img amd-ucode.img early_ucode.cpio microcode.cpio" fi -if test -f ${sysconfdir}/default/grub ; then @@ -20,8 +1269,8 @@ diff -urNp grub-2.02-rc1.orig/util/grub-mkconfig.in grub-2.02-rc1/util/grub-mkco + . ${sysconfdir}/sysconfig/grub fi - # XXX: should this be deprecated at some point? -@@ -243,7 +243,7 @@ cat << EOF + if [ "x${GRUB_DISABLE_UUID}" = "xtrue" ]; then +@@ -271,7 +271,7 @@ # DO NOT EDIT THIS FILE # # It is automatically generated by $self using templates @@ -30,7 +1279,7 @@ diff -urNp grub-2.02-rc1.orig/util/grub-mkconfig.in grub-2.02-rc1/util/grub-mkco # EOF -@@ -269,7 +269,7 @@ if test "x${grub_cfg}" != "x" ; then +@@ -297,7 +297,7 @@ if ! ${grub_script_check} ${grub_cfg}.new; then # TRANSLATORS: %s is replaced by filename gettext_printf "Syntax errors are detected in generated GRUB config file. @@ -39,3 +1288,15 @@ diff -urNp grub-2.02-rc1.orig/util/grub-mkconfig.in grub-2.02-rc1/util/grub-mkco and /etc/grub.d/* files or please file a bug report with %s file attached." "${grub_cfg}.new" >&2 echo >&2 +diff -ur grub-2.12.orig/util/grub-set-default.in grub-2.12/util/grub-set-default.in +--- grub-2.12.orig/util/grub-set-default.in 2018-11-24 18:13:02.000000000 +0100 ++++ grub-2.12/util/grub-set-default.in 2025-04-26 21:24:54.539709100 +0200 +@@ -46,7 +46,7 @@ + usage () { + gettext_printf "Usage: %s [OPTION] MENU_ENTRY\n" "$self" + gettext "Set the default boot menu entry for GRUB."; echo +- gettext_printf "This requires setting GRUB_DEFAULT=saved in %s/default/grub.\n" "$sysconfdir" ++ gettext_printf "This requires setting GRUB_DEFAULT=saved in %s/sysconfig/grub.\n" "$sysconfdir" + echo + print_option_help "-h, --help" "$(gettext "print this message and exit")" + print_option_help "-V, --version" "$(gettext "print the version information and exit")" diff --git a/x32.patch b/x32.patch new file mode 100644 index 0000000..8f526ec --- /dev/null +++ b/x32.patch @@ -0,0 +1,11 @@ +--- grub-2.12/include/grub/efi/api.h.orig 2023-11-22 18:52:44.000000000 +0100 ++++ grub-2.12/include/grub/efi/api.h 2024-06-06 19:27:51.082911968 +0200 +@@ -587,7 +587,7 @@ + */ + #if defined(__i386__) + #define __grub_efi_api __attribute__((regparm(0))) +-#elif defined(__x86_64__) ++#elif defined(__x86_64__) && !defined(__ILP32__) + #define __grub_efi_api __attribute__((ms_abi)) + #else + #define __grub_efi_api