~ubuntu-branches/debian/experimental/grub2/experimental

« back to all changes in this revision

Viewing changes to debian/patches/install_signed.patch

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-01-16 15:18:04 UTC
  • Revision ID: package-import@ubuntu.com-20140116151804-f9dju3x3y3s6o6o9
Tags: 2.02~beta2-2
* Convert patch handling to git-dpm.
* Add bi-endian support to ELF parser (Tomohiro B Berry).
* Adjust restore_mkdevicemap.patch to mark get_kfreebsd_version as static,
  to appease "gcc -Werror=missing-prototypes".
* Cherry-pick from upstream:
  - Change grub-macbless' manual page section to 8.
* Install grub-glue-efi, grub-macbless, grub-render-label, and
  grub-syslinux2cfg.
* grub-shell: Pass -no-pad to xorriso when building floppy images.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Install signed images if UEFI Secure Boot is enabled
2
 
Author: Colin Watson <cjwatson@ubuntu.com>
 
1
From cda8796cced47111322c9a7333760d97b33fb9c4 Mon Sep 17 00:00:00 2001
 
2
From: Colin Watson <cjwatson@ubuntu.com>
 
3
Date: Mon, 13 Jan 2014 12:13:22 +0000
 
4
Subject: Install signed images if UEFI Secure Boot is enabled
 
5
MIME-Version: 1.0
 
6
Content-Type: text/plain; charset=UTF-8
 
7
Content-Transfer-Encoding: 8bit
 
8
 
3
9
Author: Stéphane Graber <stgraber@ubuntu.com>
4
10
Author: Steve Langasek <steve.langasek@ubuntu.com>
5
11
Forwarded: no
6
12
Last-Update: 2013-12-25
7
13
 
8
 
Index: b/util/grub-install.c
9
 
===================================================================
 
14
Patch-Name: install_signed.patch
 
15
---
 
16
 util/grub-install.c | 165 +++++++++++++++++++++++++++++++++++++---------------
 
17
 1 file changed, 119 insertions(+), 46 deletions(-)
 
18
 
 
19
diff --git a/util/grub-install.c b/util/grub-install.c
 
20
index 3275209..6a956d4 100644
10
21
--- a/util/grub-install.c
11
22
+++ b/util/grub-install.c
12
 
@@ -80,6 +80,7 @@
 
23
@@ -80,6 +80,7 @@ static char *label_color;
13
24
 static char *label_bgcolor;
14
25
 static char *product_version;
15
26
 static int add_rs_codes = 1;
17
28
 
18
29
 enum
19
30
   {
20
 
@@ -111,7 +112,9 @@
 
31
@@ -111,7 +112,9 @@ enum
21
32
     OPTION_LABEL_FONT,
22
33
     OPTION_LABEL_COLOR,
23
34
     OPTION_LABEL_BGCOLOR,
28
39
   };
29
40
 
30
41
 static int fs_probe = 1;
31
 
@@ -235,6 +238,14 @@
 
42
@@ -235,6 +238,14 @@ argp_parser (int key, char *arg, struct argp_state *state)
32
43
       bootloader_id = xstrdup (arg);
33
44
       return 0;
34
45
 
43
54
     case ARGP_KEY_ARG:
44
55
       if (install_device)
45
56
        grub_util_error ("%s", _("More than one install device?"));
46
 
@@ -304,6 +315,14 @@
 
57
@@ -304,6 +315,14 @@ static struct argp_option options[] = {
47
58
   {"label-color", OPTION_LABEL_COLOR, N_("COLOR"), 0, N_("use COLOR for label"), 2},
48
59
   {"label-bgcolor", OPTION_LABEL_BGCOLOR, N_("COLOR"), 0, N_("use COLOR for label background"), 2},
49
60
   {"product-version", OPTION_PRODUCT_VERSION, N_("STRING"), 0, N_("use STRING as product version"), 2},
58
69
   {0, 0, 0, 0, 0, 0}
59
70
 };
60
71
 
61
 
@@ -809,7 +828,8 @@
 
72
@@ -809,7 +828,8 @@ main (int argc, char *argv[])
62
73
 {
63
74
   int is_efi = 0;
64
75
   const char *efi_distributor = NULL;
68
79
   char **grub_devices;
69
80
   grub_fs_t grub_fs;
70
81
   grub_device_t grub_dev = NULL;
71
 
@@ -1069,6 +1089,31 @@
 
82
@@ -1069,6 +1089,31 @@ main (int argc, char *argv[])
72
83
       */
73
84
       char *t;
74
85
       efi_distributor = bootloader_id;
100
111
       if (removable)
101
112
        {
102
113
          /* The specification makes stricter requirements of removable
103
 
@@ -1077,54 +1122,16 @@
 
114
@@ -1077,54 +1122,16 @@ main (int argc, char *argv[])
104
115
             must have a specific file name depending on the architecture.
105
116
          */
106
117
          efi_distributor = "BOOT";
159
170
        }
160
171
       t = grub_util_path_concat (3, efidir, "EFI", efi_distributor);
161
172
       free (efidir);
162
 
@@ -1329,6 +1336,31 @@
 
173
@@ -1329,6 +1336,31 @@ main (int argc, char *argv[])
163
174
        }
164
175
     }
165
176
 
191
202
   if (!have_abstractions)
192
203
     {
193
204
       if ((disk_module && grub_strcmp (disk_module, "biosdisk") != 0)
194
 
@@ -1336,7 +1368,8 @@
 
205
@@ -1336,7 +1368,8 @@ main (int argc, char *argv[])
195
206
          || (!install_drive
196
207
              && platform != GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275)
197
208
          || (install_drive && !is_same_disk (grub_drives[0], install_drive))
201
212
        {
202
213
          char *uuid = NULL;
203
214
          /*  generic method (used on coreboot and ata mod).  */
204
 
@@ -1857,7 +1890,47 @@
 
215
@@ -1857,7 +1890,47 @@ main (int argc, char *argv[])
205
216
     case GRUB_INSTALL_PLATFORM_IA64_EFI:
206
217
       {
207
218
        char *dst = grub_util_path_concat (2, efidir, efi_file);