diff options
author | 2014-09-10 20:50:40 +0000 | |
---|---|---|
committer | 2014-09-10 20:50:40 +0000 | |
commit | f7234e35c1594be140175b6382a9bb56639682f7 (patch) | |
tree | c6cfe2f2cae4224a3dfccf9e6bfff2bc5842b6bc /sys-boot | |
parent | Remove old (diff) | |
download | gentoo-2-f7234e35c1594be140175b6382a9bb56639682f7.tar.gz gentoo-2-f7234e35c1594be140175b6382a9bb56639682f7.tar.bz2 gentoo-2-f7234e35c1594be140175b6382a9bb56639682f7.zip |
More backports, bug 522428.
(Portage version: 2.2.12/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
Diffstat (limited to 'sys-boot')
-rw-r--r-- | sys-boot/grub/ChangeLog | 12 | ||||
-rw-r--r-- | sys-boot/grub/files/2.02_beta2/0006-change-stop-condition-to-avoid-infinite-loops.patch | 34 | ||||
-rw-r--r-- | sys-boot/grub/files/2.02_beta2/0007-Improve-LVM-logical_volumes-string-matching.patch | 34 | ||||
-rw-r--r-- | sys-boot/grub/files/2.02_beta2/0008-Fix-an-infinite-loop-in-grub-mkconfig.patch | 83 | ||||
-rw-r--r-- | sys-boot/grub/files/2.02_beta2/0009-Fix-incorrect-address-reference-in-btrfs.patch | 38 | ||||
-rw-r--r-- | sys-boot/grub/grub-2.02_beta2-r2.ebuild (renamed from sys-boot/grub/grub-2.02_beta2-r1.ebuild) | 2 |
6 files changed, 201 insertions, 2 deletions
diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog index 835c3452ba79..92697981fbe0 100644 --- a/sys-boot/grub/ChangeLog +++ b/sys-boot/grub/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for sys-boot/grub # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.316 2014/09/10 01:20:36 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.317 2014/09/10 20:50:40 floppym Exp $ + +*grub-2.02_beta2-r2 (10 Sep 2014) + + 10 Sep 2014; Mike Gilbert <floppym@gentoo.org> + +files/2.02_beta2/0006-change-stop-condition-to-avoid-infinite-loops.patch, + +files/2.02_beta2/0007-Improve-LVM-logical_volumes-string-matching.patch, + +files/2.02_beta2/0008-Fix-an-infinite-loop-in-grub-mkconfig.patch, + +files/2.02_beta2/0009-Fix-incorrect-address-reference-in-btrfs.patch, + +grub-2.02_beta2-r2.ebuild, -grub-2.02_beta2-r1.ebuild: + More backports, bug 522428. 10 Sep 2014; Mike Gilbert <floppym@gentoo.org> grub-2.02_beta2-r1.ebuild, grub-2.02_beta2.ebuild, grub-9999-r1.ebuild: diff --git a/sys-boot/grub/files/2.02_beta2/0006-change-stop-condition-to-avoid-infinite-loops.patch b/sys-boot/grub/files/2.02_beta2/0006-change-stop-condition-to-avoid-infinite-loops.patch new file mode 100644 index 000000000000..d61e3f934042 --- /dev/null +++ b/sys-boot/grub/files/2.02_beta2/0006-change-stop-condition-to-avoid-infinite-loops.patch @@ -0,0 +1,34 @@ +From 6b0b3e87bc4de54e97c698f7c381e7c13589b19c Mon Sep 17 00:00:00 2001 +From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com> +Date: Tue, 21 Jan 2014 10:49:39 -0200 +Subject: [PATCH 6/8] change stop condition to avoid infinite loops + +In net/net.c there is a while (1) that only exits if there is a stop +condition and more then 10 packages or if there is no package received. + +If GRUB is idle and enter in this loop, the only condition to leave is +if it doesn't have incoming packages. In a network with heavy traffic +this never happens. + +Conflicts: + ChangeLog +--- + grub-core/net/net.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/grub-core/net/net.c b/grub-core/net/net.c +index 0e57e93..56355f3 100644 +--- a/grub-core/net/net.c ++++ b/grub-core/net/net.c +@@ -1453,7 +1453,7 @@ receive_packets (struct grub_net_card *card, int *stop_condition) + } + card->opened = 1; + } +- while (1) ++ while (received < 100) + { + /* Maybe should be better have a fixed number of packets for each card + and just mark them as used and not used. */ +-- +2.1.0 + diff --git a/sys-boot/grub/files/2.02_beta2/0007-Improve-LVM-logical_volumes-string-matching.patch b/sys-boot/grub/files/2.02_beta2/0007-Improve-LVM-logical_volumes-string-matching.patch new file mode 100644 index 000000000000..86c07c2f060c --- /dev/null +++ b/sys-boot/grub/files/2.02_beta2/0007-Improve-LVM-logical_volumes-string-matching.patch @@ -0,0 +1,34 @@ +From da77623a6762c655ae47fc595eaa9251f5ce5d5d Mon Sep 17 00:00:00 2001 +From: Colin Watson <cjwatson@ubuntu.com> +Date: Thu, 10 Apr 2014 14:42:41 +0100 +Subject: [PATCH 7/8] Improve LVM "logical_volumes" string matching + +* grub-core/disk/lvm.c (grub_lvm_detect): Search for +"logical_volumes" block a little more accurately. + +Conflicts: + ChangeLog +--- + grub-core/disk/lvm.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c +index 483c17e..862a966 100644 +--- a/grub-core/disk/lvm.c ++++ b/grub-core/disk/lvm.c +@@ -333,10 +333,10 @@ grub_lvm_detect (grub_disk_t disk, + } + } + +- p = grub_strstr (p, "logical_volumes"); ++ p = grub_strstr (p, "logical_volumes {"); + if (p) + { +- p += sizeof ("logical_volumes = ") - 1; ++ p += sizeof ("logical_volumes {") - 1; + + /* And add all the lvs to the volume group. */ + while (1) +-- +2.1.0 + diff --git a/sys-boot/grub/files/2.02_beta2/0008-Fix-an-infinite-loop-in-grub-mkconfig.patch b/sys-boot/grub/files/2.02_beta2/0008-Fix-an-infinite-loop-in-grub-mkconfig.patch new file mode 100644 index 000000000000..ba0c029234bf --- /dev/null +++ b/sys-boot/grub/files/2.02_beta2/0008-Fix-an-infinite-loop-in-grub-mkconfig.patch @@ -0,0 +1,83 @@ +From 21a85381a1586a0989f2cf9d151b746231984c92 Mon Sep 17 00:00:00 2001 +From: Colin Watson <cjwatson@ubuntu.com> +Date: Tue, 8 Jul 2014 23:54:30 +0100 +Subject: [PATCH 8/8] Fix an infinite loop in grub-mkconfig + +* util/grub.d/10_hurd.in: Make kernel list progression not fail on +kernels whose paths contain regex metacharacters. +* util/grub.d/10_kfreebsd.in: Likewise. +* util/grub.d/10_linux.in: Likewise. +* util/grub.d/20_linux_xen.in: Likewise. + +Reported by: Heimo Stranner. + +Conflicts: + ChangeLog +--- + util/grub.d/10_hurd.in | 2 +- + util/grub.d/10_kfreebsd.in | 2 +- + util/grub.d/10_linux.in | 2 +- + util/grub.d/20_linux_xen.in | 4 ++-- + 4 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in +index 82dfe19..29b4554 100644 +--- a/util/grub.d/10_hurd.in ++++ b/util/grub.d/10_hurd.in +@@ -168,7 +168,7 @@ while [ "x$kernels" != "x" ] ; do + hurd_entry "$kernel" advanced + hurd_entry "$kernel" recovery + +- kernels=`echo $kernels | tr ' ' '\n' | grep -vx $kernel | tr '\n' ' '` ++ kernels=`echo $kernels | tr ' ' '\n' | fgrep -vx "$kernel" | tr '\n' ' '` + done + + # If at least one kernel was found, then we need to +diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in +index a524762..ba7175b 100644 +--- a/util/grub.d/10_kfreebsd.in ++++ b/util/grub.d/10_kfreebsd.in +@@ -228,7 +228,7 @@ while [ "x$list" != "x" ] ; do + kfreebsd_entry "${OS}" "${version}" recovery "-s" + fi + +- list=`echo $list | tr ' ' '\n' | grep -vx $kfreebsd | tr '\n' ' '` ++ list=`echo $list | tr ' ' '\n' | fgrep -vx "$kfreebsd" | tr '\n' ' '` + done + + # If at least one kernel was found, then we need to +diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in +index 00d1931..d2e2a8f 100644 +--- a/util/grub.d/10_linux.in ++++ b/util/grub.d/10_linux.in +@@ -241,7 +241,7 @@ while [ "x$list" != "x" ] ; do + "single ${GRUB_CMDLINE_LINUX}" + fi + +- list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '` ++ list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '` + done + + # If at least one kernel was found, then we need to +diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in +index a608435..2e77758 100644 +--- a/util/grub.d/20_linux_xen.in ++++ b/util/grub.d/20_linux_xen.in +@@ -255,12 +255,12 @@ while [ "x${xen_list}" != "x" ] ; do + "single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}" + fi + +- list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '` ++ list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '` + done + if [ x"$is_top_level" != xtrue ]; then + echo ' }' + fi +- xen_list=`echo $xen_list | tr ' ' '\n' | grep -vx $current_xen | tr '\n' ' '` ++ xen_list=`echo $xen_list | tr ' ' '\n' | fgrep -vx "$current_xen" | tr '\n' ' '` + done + + # If at least one kernel was found, then we need to +-- +2.1.0 + diff --git a/sys-boot/grub/files/2.02_beta2/0009-Fix-incorrect-address-reference-in-btrfs.patch b/sys-boot/grub/files/2.02_beta2/0009-Fix-incorrect-address-reference-in-btrfs.patch new file mode 100644 index 000000000000..bedf1f05b23e --- /dev/null +++ b/sys-boot/grub/files/2.02_beta2/0009-Fix-incorrect-address-reference-in-btrfs.patch @@ -0,0 +1,38 @@ +From c00568e2648bf7a9c4c517bf0acfbd0c62d48ef3 Mon Sep 17 00:00:00 2001 +From: Michael Chang <mchang@suse.com> +Date: Thu, 14 Aug 2014 18:17:45 +0800 +Subject: [PATCH 9/9] Fix incorrect address reference in btrfs + +We encountered a weird random kernel initrd unpacking error on btrfs +and finally found it was caused by incorrect address reference in range +check for type GRUB_BTRFS_EXTENT_REGULAR and the entire result is +unpredictable. + +This is a quick fix to make the address reference to the +grub_btrfs_extent_data structure correctly, not the pointer variable +to it. + +Any suggestions to this patch is welcome. + +Conflicts: + ChangeLog +--- + grub-core/fs/btrfs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c +index 89666b6..d1b930d 100644 +--- a/grub-core/fs/btrfs.c ++++ b/grub-core/fs/btrfs.c +@@ -1051,7 +1051,7 @@ grub_btrfs_extent_read (struct grub_btrfs_data *data, + + data->extend = data->extstart + grub_le_to_cpu64 (data->extent->size); + if (data->extent->type == GRUB_BTRFS_EXTENT_REGULAR +- && (char *) &data->extent + elemsize ++ && (char *) data->extent + elemsize + >= (char *) &data->extent->filled + sizeof (data->extent->filled)) + data->extend = + data->extstart + grub_le_to_cpu64 (data->extent->filled); +-- +2.1.0 + diff --git a/sys-boot/grub/grub-2.02_beta2-r1.ebuild b/sys-boot/grub/grub-2.02_beta2-r2.ebuild index e833283bf515..af88035e4618 100644 --- a/sys-boot/grub/grub-2.02_beta2-r1.ebuild +++ b/sys-boot/grub/grub-2.02_beta2-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.02_beta2-r1.ebuild,v 1.2 2014/09/10 01:20:36 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.02_beta2-r2.ebuild,v 1.1 2014/09/10 20:50:40 floppym Exp $ EAPI=5 |