Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/
Date: Sun, 13 Aug 2017 11:31:46
Message-Id: 1502623725.208609c7322de4de86dd2e580dc92e842589493c.soap@gentoo
1 commit: 208609c7322de4de86dd2e580dc92e842589493c
2 Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Fri Aug 11 14:55:48 2017 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 13 11:28:45 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=208609c7
7
8 sys-boot/grub: remove unused patches/files
9
10 Closes: https://github.com/gentoo/gentoo/pull/5390
11
12 sys-boot/grub/files/2.02_beta3-10_linux-UUID.patch | 27 ------
13 .../grub/files/2.02_beta3-gcc6-ld-no-pie.patch | 57 -----------
14 sys-boot/grub/files/2.02_beta3-sysmacros.patch | 107 ---------------------
15 sys-boot/grub/files/CVE-2015-8370.patch | 54 -----------
16 .../grub/files/grub-2.02_beta2-lvm2-raid1.patch | 68 -------------
17 sys-boot/grub/files/grub.cfg.example | 72 --------------
18 6 files changed, 385 deletions(-)
19
20 diff --git a/sys-boot/grub/files/2.02_beta3-10_linux-UUID.patch b/sys-boot/grub/files/2.02_beta3-10_linux-UUID.patch
21 deleted file mode 100644
22 index 1dcf3b5b781..00000000000
23 --- a/sys-boot/grub/files/2.02_beta3-10_linux-UUID.patch
24 +++ /dev/null
25 @@ -1,27 +0,0 @@
26 -From ea8de5d2ee58178381e5809e4d5fe79861e61b04 Mon Sep 17 00:00:00 2001
27 -From: Mike Gilbert <floppym@g.o>
28 -Date: Sat, 5 Mar 2016 17:21:15 -0500
29 -Subject: [PATCH] [2.02] 10_linux: Fix grouping of tests for GRUB_DEVICE
30 -
31 -Commit 7290bb562 causes GRUB_DISABLE_LINUX_UUID to be ignored due to
32 -mixing of || and && operators. Add some parens to help with that.
33 ----
34 - util/grub.d/10_linux.in | 2 +-
35 - 1 file changed, 1 insertion(+), 1 deletion(-)
36 -
37 -diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
38 -index 5a78513..de9044c 100644
39 ---- a/util/grub.d/10_linux.in
40 -+++ b/util/grub.d/10_linux.in
41 -@@ -47,7 +47,7 @@ esac
42 - # and mounting btrfs requires user space scanning, so force UUID in this case.
43 - if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
44 - || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
45 -- || test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm; then
46 -+ || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then
47 - LINUX_ROOT_DEVICE=${GRUB_DEVICE}
48 - else
49 - LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
50 ---
51 -2.7.2
52 -
53
54 diff --git a/sys-boot/grub/files/2.02_beta3-gcc6-ld-no-pie.patch b/sys-boot/grub/files/2.02_beta3-gcc6-ld-no-pie.patch
55 deleted file mode 100644
56 index 0d814154478..00000000000
57 --- a/sys-boot/grub/files/2.02_beta3-gcc6-ld-no-pie.patch
58 +++ /dev/null
59 @@ -1,57 +0,0 @@
60 -2016-05-21 Magnus Granberg <zorry@g.o>
61 -
62 - #583042 sys-boot/grub-2.02_beta3-r1: building w/gcc-6[pie]: error:
63 - x86_64-pc-linux-gnu/bin/ld: -r and -shared may not be used together
64 -
65 - * acinclude.m4: Add -no-pie check.
66 - * configure.ac: Add -no-pie to TARGET_LDFLAGS if needed.
67 -
68 ---- a/acinclude.m4 2015-11-11 20:56:52.000000000 +0100
69 -+++ b/acinclude.m4 2016-05-17 00:08:22.000000000 +0200
70 -@@ -390,6 +390,24 @@ else
71 - [fi]
72 - ])
73 -
74 -+dnl Check if the Linker supports `-no-pie'.
75 -+AC_DEFUN([grub_CHECK_NO_PIE],
76 -+[AC_MSG_CHECKING([whether linker accepts -no-pie])
77 -+AC_CACHE_VAL(grub_cv_cc_ld_nopie,
78 -+[save_LDFLAGS="$LDFLAGS"
79 -+LDFLAGS="$LDFLAGS -no-pie"
80 -+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
81 -+ [grub_cv_cc_ld_no_pie=yes],
82 -+ [grub_cv_cc_ld_no_pie=no])
83 -+LDFLAGS="$save_LDFLAGS"
84 -+])
85 -+AC_MSG_RESULT([$grub_cv_cc_ld_no_pie])
86 -+nopie_possible=no
87 -+if test "x$grub_cv_cc_ld_no_pie" = xyes ; then
88 -+ nopie_possible=yes
89 -+fi
90 -+])
91 -+
92 - dnl Check if the C compiler supports `-fPIC'.
93 - AC_DEFUN([grub_CHECK_PIC],[
94 - [# Position independent executable.
95 ---- a/configure.ac 2016-02-27 13:40:56.000000000 +0100
96 -+++ b/configure.ac 2016-05-17 00:57:29.471000000 +0200
97 -@@ -1184,13 +1184,18 @@ CFLAGS="$TARGET_CFLAGS"
98 -
99 - # Position independent executable.
100 - grub_CHECK_PIE
101 -+grub_CHECK_NO_PIE
102 - [# Need that, because some distributions ship compilers that include
103 --# `-fPIE' in the default specs.
104 -+# `-fPIE' and '-pie' in the default specs.
105 - if [ x"$pie_possible" = xyes ]; then
106 - TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE"
107 -+fi
108 -+if [ x"$nopie_possible" = xyes ] && [ x"$pie_possible" = xyes ]; then
109 -+ TARGET_LDFLAGS="$TARGET_LDFLAGS -no-pie"
110 - fi]
111 -
112 - CFLAGS="$TARGET_CFLAGS"
113 -+LDFLAGS="$TARGET_LDFLAGS"
114 -
115 - # Position independent executable.
116 - grub_CHECK_PIC
117
118 diff --git a/sys-boot/grub/files/2.02_beta3-sysmacros.patch b/sys-boot/grub/files/2.02_beta3-sysmacros.patch
119 deleted file mode 100644
120 index 8610f3a1a57..00000000000
121 --- a/sys-boot/grub/files/2.02_beta3-sysmacros.patch
122 +++ /dev/null
123 @@ -1,107 +0,0 @@
124 -From 7a5b301e3adb8e054288518a325135a1883c1c6c Mon Sep 17 00:00:00 2001
125 -From: Mike Gilbert <floppym@g.o>
126 -Date: Tue, 19 Apr 2016 14:27:22 -0400
127 -Subject: [PATCH] build: Use AC_HEADER_MAJOR to find device macros
128 -
129 -Depending on the OS/libc, device macros are defined in different
130 -headers. This change ensures we include the right one.
131 -
132 -sys/types.h - BSD
133 -sys/mkdev.h - Sun
134 -sys/sysmacros.h - glibc (Linux)
135 -
136 -glibc currently pulls sys/sysmacros.h into sys/types.h, but this may
137 -change in a future release.
138 -
139 -https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html
140 ----
141 - configure.ac | 3 ++-
142 - grub-core/osdep/devmapper/getroot.c | 6 ++++++
143 - grub-core/osdep/devmapper/hostdisk.c | 5 +++++
144 - grub-core/osdep/linux/getroot.c | 6 ++++++
145 - grub-core/osdep/unix/getroot.c | 4 +++-
146 - 5 files changed, 22 insertions(+), 2 deletions(-)
147 -
148 -diff --git a/configure.ac b/configure.ac
149 -index 57e1713..9ddfc53 100644
150 ---- a/configure.ac
151 -+++ b/configure.ac
152 -@@ -388,7 +388,8 @@ fi
153 -
154 - # Check for functions and headers.
155 - AC_CHECK_FUNCS(posix_memalign memalign getextmntent)
156 --AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h sys/mkdev.h limits.h)
157 -+AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h limits.h)
158 -+AC_HEADER_MAJOR
159 -
160 - AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$ac_includes_default
161 - #include <sys/param.h>
162 -diff --git a/grub-core/osdep/devmapper/getroot.c b/grub-core/osdep/devmapper/getroot.c
163 -index 05eda50..72e5582 100644
164 ---- a/grub-core/osdep/devmapper/getroot.c
165 -+++ b/grub-core/osdep/devmapper/getroot.c
166 -@@ -40,6 +40,12 @@
167 - #include <limits.h>
168 - #endif
169 -
170 -+#if defined(MAJOR_IN_MKDEV)
171 -+#include <sys/mkdev.h>
172 -+#elif defined(MAJOR_IN_SYSMACROS)
173 -+#include <sys/sysmacros.h>
174 -+#endif
175 -+
176 - #include <libdevmapper.h>
177 -
178 - #include <grub/types.h>
179 -diff --git a/grub-core/osdep/devmapper/hostdisk.c b/grub-core/osdep/devmapper/hostdisk.c
180 -index 19c1101..a697bcb 100644
181 ---- a/grub-core/osdep/devmapper/hostdisk.c
182 -+++ b/grub-core/osdep/devmapper/hostdisk.c
183 -@@ -24,6 +24,11 @@
184 - #include <errno.h>
185 - #include <limits.h>
186 -
187 -+#if defined(MAJOR_IN_MKDEV)
188 -+#include <sys/mkdev.h>
189 -+#elif defined(MAJOR_IN_SYSMACROS)
190 -+#include <sys/sysmacros.h>
191 -+#endif
192 -
193 - #ifdef HAVE_DEVICE_MAPPER
194 - # include <libdevmapper.h>
195 -diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
196 -index 10480b6..09e7e6e 100644
197 ---- a/grub-core/osdep/linux/getroot.c
198 -+++ b/grub-core/osdep/linux/getroot.c
199 -@@ -35,6 +35,12 @@
200 - #include <limits.h>
201 - #endif
202 -
203 -+#if defined(MAJOR_IN_MKDEV)
204 -+#include <sys/mkdev.h>
205 -+#elif defined(MAJOR_IN_SYSMACROS)
206 -+#include <sys/sysmacros.h>
207 -+#endif
208 -+
209 - #include <grub/types.h>
210 - #include <sys/ioctl.h> /* ioctl */
211 - #include <sys/mount.h>
212 -diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.c
213 -index 1079a91..4bf37b0 100644
214 ---- a/grub-core/osdep/unix/getroot.c
215 -+++ b/grub-core/osdep/unix/getroot.c
216 -@@ -51,8 +51,10 @@
217 - #endif
218 -
219 - #include <sys/types.h>
220 --#if defined(HAVE_SYS_MKDEV_H)
221 -+#if defined(MAJOR_IN_MKDEV)
222 - #include <sys/mkdev.h>
223 -+#elif defined(MAJOR_IN_SYSMACROS)
224 -+#include <sys/sysmacros.h>
225 - #endif
226 -
227 - #if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
228 ---
229 -2.8.1
230 -
231
232 diff --git a/sys-boot/grub/files/CVE-2015-8370.patch b/sys-boot/grub/files/CVE-2015-8370.patch
233 deleted file mode 100644
234 index 69e419ee0c3..00000000000
235 --- a/sys-boot/grub/files/CVE-2015-8370.patch
236 +++ /dev/null
237 @@ -1,54 +0,0 @@
238 -From 451d80e52d851432e109771bb8febafca7a5f1f2 Mon Sep 17 00:00:00 2001
239 -From: Hector Marco-Gisbert <hecmargi@×××.es>
240 -Date: Wed, 16 Dec 2015 07:57:18 +0300
241 -Subject: [PATCH] Fix security issue when reading username and password
242 -
243 -This patch fixes two integer underflows at:
244 - * grub-core/lib/crypto.c
245 - * grub-core/normal/auth.c
246 -
247 -CVE-2015-8370
248 -
249 -Signed-off-by: Hector Marco-Gisbert <hecmargi@×××.es>
250 -Signed-off-by: Ismael Ripoll-Ripoll <iripoll@×××××××××.es>
251 -Also-By: Andrey Borzenkov <arvidjaar@×××××.com>
252 ----
253 - grub-core/lib/crypto.c | 3 ++-
254 - grub-core/normal/auth.c | 7 +++++--
255 - 2 files changed, 7 insertions(+), 3 deletions(-)
256 -
257 -diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c
258 -index 010e550..683a8aa 100644
259 ---- a/grub-core/lib/crypto.c
260 -+++ b/grub-core/lib/crypto.c
261 -@@ -470,7 +470,8 @@ grub_password_get (char buf[], unsigned buf_size)
262 -
263 - if (key == '\b')
264 - {
265 -- cur_len--;
266 -+ if (cur_len)
267 -+ cur_len--;
268 - continue;
269 - }
270 -
271 -diff --git a/grub-core/normal/auth.c b/grub-core/normal/auth.c
272 -index c6bd96e..8615c48 100644
273 ---- a/grub-core/normal/auth.c
274 -+++ b/grub-core/normal/auth.c
275 -@@ -174,8 +174,11 @@ grub_username_get (char buf[], unsigned buf_size)
276 -
277 - if (key == '\b')
278 - {
279 -- cur_len--;
280 -- grub_printf ("\b");
281 -+ if (cur_len)
282 -+ {
283 -+ cur_len--;
284 -+ grub_printf ("\b");
285 -+ }
286 - continue;
287 - }
288 -
289 ---
290 -2.6.4
291 -
292
293 diff --git a/sys-boot/grub/files/grub-2.02_beta2-lvm2-raid1.patch b/sys-boot/grub/files/grub-2.02_beta2-lvm2-raid1.patch
294 deleted file mode 100644
295 index 76c72a62632..00000000000
296 --- a/sys-boot/grub/files/grub-2.02_beta2-lvm2-raid1.patch
297 +++ /dev/null
298 @@ -1,68 +0,0 @@
299 -From: Andrei Borzenkov <arvidjaar@×××××.com>
300 -Date: Thu, 19 Mar 2015 18:30:27 +0000 (+0300)
301 -Subject: core: add LVM RAID1 support
302 -X-Git-Url: http://git.savannah.gnu.org/gitweb/?p=grub.git;a=commitdiff_plain;h=527eeeeee6c8d3d8e3bb1fac408d47bb1dcbec95;hp=7c9309e50a124817e67de38b30c6291acecad560
303 -
304 -core: add LVM RAID1 support
305 -
306 -Closes 44534.
307 ----
308 -
309 -diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c
310 -index 1e7f197..9b97004 100644
311 ---- a/grub-core/disk/lvm.c
312 -+++ b/grub-core/disk/lvm.c
313 -@@ -577,13 +577,17 @@ grub_lvm_detect (grub_disk_t disk,
314 - if (is_pvmove)
315 - seg->node_count = 1;
316 - }
317 -- else if (grub_memcmp (p, "raid", sizeof ("raid") - 1)
318 -- == 0 && (p[sizeof ("raid") - 1] >= '4'
319 -- && p[sizeof ("raid") - 1] <= '6')
320 -+ else if (grub_memcmp (p, "raid", sizeof ("raid") - 1) == 0
321 -+ && ((p[sizeof ("raid") - 1] >= '4'
322 -+ && p[sizeof ("raid") - 1] <= '6')
323 -+ || p[sizeof ("raid") - 1] == '1')
324 - && p[sizeof ("raidX") - 1] == '"')
325 - {
326 - switch (p[sizeof ("raid") - 1])
327 - {
328 -+ case '1':
329 -+ seg->type = GRUB_DISKFILTER_MIRROR;
330 -+ break;
331 - case '4':
332 - seg->type = GRUB_DISKFILTER_RAID4;
333 - seg->layout = GRUB_RAID_LAYOUT_LEFT_ASYMMETRIC;
334 -@@ -608,16 +612,18 @@ grub_lvm_detect (grub_disk_t disk,
335 - goto lvs_segment_fail;
336 - }
337 -
338 -- seg->stripe_size = grub_lvm_getvalue (&p, "stripe_size = ");
339 -- if (p == NULL)
340 -+ if (seg->type != GRUB_DISKFILTER_MIRROR)
341 - {
342 -+ seg->stripe_size = grub_lvm_getvalue (&p, "stripe_size = ");
343 -+ if (p == NULL)
344 -+ {
345 - #ifdef GRUB_UTIL
346 -- grub_util_info ("unknown stripe_size\n");
347 -+ grub_util_info ("unknown stripe_size\n");
348 - #endif
349 -- goto lvs_segment_fail;
350 -+ goto lvs_segment_fail;
351 -+ }
352 - }
353 -
354 --
355 - seg->nodes = grub_zalloc (sizeof (seg->nodes[0])
356 - * seg->node_count);
357 -
358 -@@ -625,7 +631,7 @@ grub_lvm_detect (grub_disk_t disk,
359 - if (p == NULL)
360 - {
361 - #ifdef GRUB_UTIL
362 -- grub_util_info ("unknown mirrors\n");
363 -+ grub_util_info ("unknown raids\n");
364 - #endif
365 - goto lvs_segment_fail2;
366 - }
367
368 diff --git a/sys-boot/grub/files/grub.cfg.example b/sys-boot/grub/files/grub.cfg.example
369 deleted file mode 100644
370 index 583e1df0023..00000000000
371 --- a/sys-boot/grub/files/grub.cfg.example
372 +++ /dev/null
373 @@ -1,72 +0,0 @@
374 -# Example configuration for GRUB
375 -# Much of this example configuration was taken from the GRUB manual.
376 -
377 -# Menu timeout
378 -timeout=5
379 -
380 -# Default menu entry
381 -default=0
382 -
383 -# If we have a font available, start graphical output.
384 -if loadfont unifont; then
385 - # Output resolution for GRUB (eg. 1024x768 or 'auto').
386 - gfxmode=auto
387 -
388 - # Output resolution for Linux (VESAFB only).
389 - # 'keep' means use the same resolution as GRUB.
390 - # For other framebuffer drivers, pass a resolution using the video= kernel param.
391 - gfxpayload=keep
392 -
393 - # Load all video drivers.
394 - insmod all_video
395 -
396 - # Switch to graphical output.
397 - terminal_output gfxterm
398 -fi
399 -
400 -# Load modules necessary to find any boot files (/boot).
401 -
402 -# Partition table(s).
403 -insmod part_msdos
404 -#insmod part_gpt
405 -
406 -menuentry "Gentoo Linux 4.7.2" {
407 - # Filesystem for /boot
408 - #insmod btrfs
409 - insmod ext2
410 - #insmod xfs
411 - #insmod zfs
412 -
413 - # Search all block devices for a matching UUID (for /boot)
414 - search --set=root --fs-uuid 33d4013a-ec25-4462-a540-8078aeb8ed17
415 -
416 - # Load a linux kernel, passing the root filesystem and init process as parameters
417 - echo "Loading kernel..."
418 - linux /vmlinuz-4.7.2 root=UUID=e1fce3ad-d7e4-4e2f-a1f5-537642bbccd5 rootfstype=btrfs init=/usr/lib/systemd/systemd
419 -
420 - echo "Loading initramfs..."
421 - initrd /initramfs-4.7.2.img
422 -}
423 -
424 -menuentry "Windows XP" {
425 - insmod ntfs
426 - search --set=root --label WINDOWS_XP --hint hd0,msdos1
427 - ntldr /ntldr
428 -}
429 -
430 -menuentry "Windows 7" {
431 - insmod ntfs
432 - search --set=root --label WINDOWS_7 --hint hd0,msdos2
433 - ntldr /bootmgr
434 -}
435 -
436 -menuentry "FreeBSD" {
437 - insmod zfs
438 - search --set=root --label freepool --hint hd0,msdos7
439 - kfreebsd /freebsd@/boot/kernel/kernel
440 - kfreebsd_module_elf /freebsd@/boot/kernel/opensolaris.ko
441 - kfreebsd_module_elf /freebsd@/boot/kernel/zfs.ko
442 - kfreebsd_module /freebsd@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
443 - set kFreeBSD.vfs.root.mountfrom=zfs:freepool/freebsd
444 - set kFreeBSD.hw.psm.synaptics_support=1
445 -}