mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-27 17:36:30 +00:00
Don't install fallback to removable media
It only causes problems. Closes: #1016737
This commit is contained in:
parent
036c38093b
commit
d6be13a9e7
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -13,6 +13,8 @@ grub2 (2.06-8) UNRELEASED; urgency=medium
|
|||||||
devices.
|
devices.
|
||||||
* /etc/default/grub: Fix comment about text-mode console.
|
* /etc/default/grub: Fix comment about text-mode console.
|
||||||
Fixes #845683
|
Fixes #845683
|
||||||
|
* grub-install: Don't install the shim fallback program when called
|
||||||
|
with --removable. Closes: #1016737
|
||||||
|
|
||||||
-- Steve McIntyre <93sam@debian.org> Thu, 29 Dec 2022 13:36:22 +0000
|
-- Steve McIntyre <93sam@debian.org> Thu, 29 Dec 2022 13:36:22 +0000
|
||||||
|
|
||||||
|
12
debian/patches/grub-install-removable-shim.patch
vendored
12
debian/patches/grub-install-removable-shim.patch
vendored
@ -21,10 +21,10 @@ Patch-Name: grub-install-removable-shim.patch
|
|||||||
util/grub-install.c | 83 +++++++++++++++++++++++++++++++++++----------
|
util/grub-install.c | 83 +++++++++++++++++++++++++++++++++++----------
|
||||||
1 file changed, 66 insertions(+), 17 deletions(-)
|
1 file changed, 66 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
diff --git a/util/grub-install.c b/util/grub-install.c
|
Index: grub.git/util/grub-install.c
|
||||||
index 05b695226..43fc27c55 100644
|
===================================================================
|
||||||
--- a/util/grub-install.c
|
--- grub.git.orig/util/grub-install.c
|
||||||
+++ b/util/grub-install.c
|
+++ grub.git/util/grub-install.c
|
||||||
@@ -891,17 +891,13 @@ check_component_exists(const char *dir,
|
@@ -891,17 +891,13 @@ check_component_exists(const char *dir,
|
||||||
static void
|
static void
|
||||||
also_install_removable(const char *src,
|
also_install_removable(const char *src,
|
||||||
@ -107,8 +107,8 @@ index 05b695226..43fc27c55 100644
|
|||||||
|
|
||||||
fb_src = grub_util_path_concat (2, "/usr/lib/shim/",
|
fb_src = grub_util_path_concat (2, "/usr/lib/shim/",
|
||||||
fb_signed);
|
fb_signed);
|
||||||
@@ -2153,30 +2151,81 @@ main (int argc, char *argv[])
|
@@ -2154,30 +2152,81 @@ main (int argc, char *argv[])
|
||||||
fb_file);
|
if (!removable)
|
||||||
grub_install_copy_file (fb_src,
|
grub_install_copy_file (fb_src,
|
||||||
fb_dst, 0);
|
fb_dst, 0);
|
||||||
+
|
+
|
||||||
|
29
debian/patches/install-signed.patch
vendored
29
debian/patches/install-signed.patch
vendored
@ -11,18 +11,18 @@ Author: Steve Langasek <steve.langasek@ubuntu.com>
|
|||||||
Author: Linn Crosetto <linn@hpe.com>
|
Author: Linn Crosetto <linn@hpe.com>
|
||||||
Author: Mathieu Trudel-Lapierre <cyphermox@ubuntu.com>
|
Author: Mathieu Trudel-Lapierre <cyphermox@ubuntu.com>
|
||||||
Forwarded: no
|
Forwarded: no
|
||||||
Last-Update: 2021-09-24
|
Last-Update: 2023-01-15
|
||||||
|
|
||||||
Patch-Name: install-signed.patch
|
Patch-Name: install-signed.patch
|
||||||
---
|
---
|
||||||
util/grub-install.c | 212 ++++++++++++++++++++++++++++++++------------
|
util/grub-install.c | 212 ++++++++++++++++++++++++++++++++------------
|
||||||
1 file changed, 153 insertions(+), 59 deletions(-)
|
1 file changed, 153 insertions(+), 59 deletions(-)
|
||||||
|
|
||||||
diff --git a/util/grub-install.c b/util/grub-install.c
|
Index: grub.git/util/grub-install.c
|
||||||
index 48e2d3779..f49c78d0b 100644
|
===================================================================
|
||||||
--- a/util/grub-install.c
|
--- grub.git.orig/util/grub-install.c
|
||||||
+++ b/util/grub-install.c
|
+++ grub.git/util/grub-install.c
|
||||||
@@ -80,6 +80,7 @@ static char *label_color;
|
@@ -79,6 +79,7 @@ static char *label_color;
|
||||||
static char *label_bgcolor;
|
static char *label_bgcolor;
|
||||||
static char *product_version;
|
static char *product_version;
|
||||||
static int add_rs_codes = 1;
|
static int add_rs_codes = 1;
|
||||||
@ -30,7 +30,7 @@ index 48e2d3779..f49c78d0b 100644
|
|||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@@ -110,7 +111,9 @@ enum
|
@@ -109,7 +110,9 @@ enum
|
||||||
OPTION_LABEL_FONT,
|
OPTION_LABEL_FONT,
|
||||||
OPTION_LABEL_COLOR,
|
OPTION_LABEL_COLOR,
|
||||||
OPTION_LABEL_BGCOLOR,
|
OPTION_LABEL_BGCOLOR,
|
||||||
@ -41,7 +41,7 @@ index 48e2d3779..f49c78d0b 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int fs_probe = 1;
|
static int fs_probe = 1;
|
||||||
@@ -234,6 +237,14 @@ argp_parser (int key, char *arg, struct argp_state *state)
|
@@ -233,6 +236,14 @@ argp_parser (int key, char *arg, struct
|
||||||
bootloader_id = xstrdup (arg);
|
bootloader_id = xstrdup (arg);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ index 48e2d3779..f49c78d0b 100644
|
|||||||
case ARGP_KEY_ARG:
|
case ARGP_KEY_ARG:
|
||||||
if (install_device)
|
if (install_device)
|
||||||
grub_util_error ("%s", _("More than one install device?"));
|
grub_util_error ("%s", _("More than one install device?"));
|
||||||
@@ -303,6 +314,14 @@ static struct argp_option options[] = {
|
@@ -302,6 +313,14 @@ static struct argp_option options[] = {
|
||||||
{"label-color", OPTION_LABEL_COLOR, N_("COLOR"), 0, N_("use COLOR for label"), 2},
|
{"label-color", OPTION_LABEL_COLOR, N_("COLOR"), 0, N_("use COLOR for label"), 2},
|
||||||
{"label-bgcolor", OPTION_LABEL_BGCOLOR, N_("COLOR"), 0, N_("use COLOR for label background"), 2},
|
{"label-bgcolor", OPTION_LABEL_BGCOLOR, N_("COLOR"), 0, N_("use COLOR for label background"), 2},
|
||||||
{"product-version", OPTION_PRODUCT_VERSION, N_("STRING"), 0, N_("use STRING as product version"), 2},
|
{"product-version", OPTION_PRODUCT_VERSION, N_("STRING"), 0, N_("use STRING as product version"), 2},
|
||||||
@ -71,7 +71,7 @@ index 48e2d3779..f49c78d0b 100644
|
|||||||
{0, 0, 0, 0, 0, 0}
|
{0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -833,7 +852,8 @@ main (int argc, char *argv[])
|
@@ -832,7 +851,8 @@ main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int is_efi = 0;
|
int is_efi = 0;
|
||||||
const char *efi_distributor = NULL;
|
const char *efi_distributor = NULL;
|
||||||
@ -81,7 +81,7 @@ index 48e2d3779..f49c78d0b 100644
|
|||||||
char **grub_devices;
|
char **grub_devices;
|
||||||
grub_fs_t grub_fs;
|
grub_fs_t grub_fs;
|
||||||
grub_device_t grub_dev = NULL;
|
grub_device_t grub_dev = NULL;
|
||||||
@@ -1103,6 +1123,39 @@ main (int argc, char *argv[])
|
@@ -1102,6 +1122,39 @@ main (int argc, char *argv[])
|
||||||
*/
|
*/
|
||||||
char *t;
|
char *t;
|
||||||
efi_distributor = bootloader_id;
|
efi_distributor = bootloader_id;
|
||||||
@ -121,7 +121,7 @@ index 48e2d3779..f49c78d0b 100644
|
|||||||
if (removable)
|
if (removable)
|
||||||
{
|
{
|
||||||
/* The specification makes stricter requirements of removable
|
/* The specification makes stricter requirements of removable
|
||||||
@@ -1111,66 +1164,16 @@ main (int argc, char *argv[])
|
@@ -1110,66 +1163,16 @@ main (int argc, char *argv[])
|
||||||
must have a specific file name depending on the architecture.
|
must have a specific file name depending on the architecture.
|
||||||
*/
|
*/
|
||||||
efi_distributor = "BOOT";
|
efi_distributor = "BOOT";
|
||||||
@ -192,7 +192,7 @@ index 48e2d3779..f49c78d0b 100644
|
|||||||
}
|
}
|
||||||
t = grub_util_path_concat (3, efidir, "EFI", efi_distributor);
|
t = grub_util_path_concat (3, efidir, "EFI", efi_distributor);
|
||||||
free (efidir);
|
free (efidir);
|
||||||
@@ -1376,14 +1379,41 @@ main (int argc, char *argv[])
|
@@ -1375,14 +1378,41 @@ main (int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ index 48e2d3779..f49c78d0b 100644
|
|||||||
{
|
{
|
||||||
char *uuid = NULL;
|
char *uuid = NULL;
|
||||||
/* generic method (used on coreboot and ata mod). */
|
/* generic method (used on coreboot and ata mod). */
|
||||||
@@ -1941,7 +1971,71 @@ main (int argc, char *argv[])
|
@@ -1927,7 +1957,72 @@ main (int argc, char *argv[])
|
||||||
case GRUB_INSTALL_PLATFORM_IA64_EFI:
|
case GRUB_INSTALL_PLATFORM_IA64_EFI:
|
||||||
{
|
{
|
||||||
char *dst = grub_util_path_concat (2, efidir, efi_file);
|
char *dst = grub_util_path_concat (2, efidir, efi_file);
|
||||||
@ -289,6 +289,7 @@ index 48e2d3779..f49c78d0b 100644
|
|||||||
+ fb_signed);
|
+ fb_signed);
|
||||||
+ fb_dst = grub_util_path_concat (2, efidir,
|
+ fb_dst = grub_util_path_concat (2, efidir,
|
||||||
+ fb_file);
|
+ fb_file);
|
||||||
|
+ if (!removable)
|
||||||
+ grub_install_copy_file (fb_src,
|
+ grub_install_copy_file (fb_src,
|
||||||
+ fb_dst, 0);
|
+ fb_dst, 0);
|
||||||
+ free (fb_src);
|
+ free (fb_src);
|
||||||
|
Loading…
Reference in New Issue
Block a user