diff options
author | Mike Gilbert <floppym@gentoo.org> | 2013-01-07 03:40:12 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2013-01-07 03:40:12 +0000 |
commit | 63248d4ed180c3e9b7c2db43ef11c5708c117d0c (patch) | |
tree | 439ee23704e9a4371dae7e3cbb53c9dde287f283 /sys-boot | |
parent | A couple more FreeBSD changes. (diff) | |
download | gentoo-2-63248d4ed180c3e9b7c2db43ef11c5708c117d0c.tar.gz gentoo-2-63248d4ed180c3e9b7c2db43ef11c5708c117d0c.tar.bz2 gentoo-2-63248d4ed180c3e9b7c2db43ef11c5708c117d0c.zip |
Include patch to fix module decompression, #424527 by Maxim Kammerer.
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
Diffstat (limited to 'sys-boot')
-rw-r--r-- | sys-boot/grub/ChangeLog | 6 | ||||
-rw-r--r-- | sys-boot/grub/files/grub-2.00-compression.patch | 84 | ||||
-rw-r--r-- | sys-boot/grub/grub-2.00-r1.ebuild | 3 |
3 files changed, 91 insertions, 2 deletions
diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog index 604d77199e8b..2cb07e915721 100644 --- a/sys-boot/grub/ChangeLog +++ b/sys-boot/grub/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-boot/grub # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.244 2013/01/07 03:26:31 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.245 2013/01/07 03:40:12 floppym Exp $ + + 07 Jan 2013; Mike Gilbert <floppym@gentoo.org> + +files/grub-2.00-compression.patch, grub-2.00-r1.ebuild: + Include patch to fix module decompression, #424527 by Maxim Kammerer. 07 Jan 2013; Mike Gilbert <floppym@gentoo.org> grub-2.00-r1.ebuild: A couple more FreeBSD changes. diff --git a/sys-boot/grub/files/grub-2.00-compression.patch b/sys-boot/grub/files/grub-2.00-compression.patch new file mode 100644 index 000000000000..58bc1f9327e6 --- /dev/null +++ b/sys-boot/grub/files/grub-2.00-compression.patch @@ -0,0 +1,84 @@ +https://bugs.gentoo.org/show_bug.cgi?id=424527 +https://savannah.gnu.org/bugs/index.php?36770 + +=== modified file 'grub-core/lib/xzembed/xz_dec_stream.c' +--- grub-core/lib/xzembed/xz_dec_stream.c 2012-02-29 13:56:51 +0000 ++++ grub-core/lib/xzembed/xz_dec_stream.c 2012-07-22 14:27:03 +0000 +@@ -403,18 +403,25 @@ + } + #endif + +- do { ++ if (b->in_pos == b->in_size) ++ return XZ_OK; ++ ++ if (!crc32 && s->hash_size == 0) ++ s->pos += 8; ++ ++ while (s->pos < (crc32 ? 32 : s->hash_size * 8)) { + if (b->in_pos == b->in_size) + return XZ_OK; + + #ifndef GRUB_EMBED_DECOMPRESSOR +- if (hash && s->hash_value[s->pos / 8] != b->in[b->in_pos++]) ++ if (hash && s->hash_value[s->pos / 8] != b->in[b->in_pos]) + return XZ_DATA_ERROR; + #endif ++ b->in_pos++; + + s->pos += 8; + +- } while (s->pos < (crc32 ? 32 : s->hash_size * 8)); ++ } + + #ifndef GRUB_EMBED_DECOMPRESSOR + if (s->hash) +@@ -529,8 +536,6 @@ + s->hash->init(s->index.hash.hash_context); + s->hash->init(s->block.hash.hash_context); + } +- if (!s->hash) +- return XZ_OPTIONS_ERROR; + #endif + } + else + +=== modified file 'grub-core/normal/autofs.c' +--- grub-core/normal/autofs.c 2012-05-01 13:26:36 +0000 ++++ grub-core/normal/autofs.c 2012-07-22 14:23:46 +0000 +@@ -32,11 +32,21 @@ + autoload_fs_module (void) + { + grub_named_list_t p; ++ int ret = 0; ++ grub_file_filter_t grub_file_filters_was[GRUB_FILE_FILTER_MAX]; ++ ++ grub_memcpy (grub_file_filters_was, grub_file_filters_enabled, ++ sizeof (grub_file_filters_enabled)); ++ grub_memcpy (grub_file_filters_enabled, grub_file_filters_all, ++ sizeof (grub_file_filters_enabled)); + + while ((p = fs_module_list) != NULL) + { + if (! grub_dl_get (p->name) && grub_dl_load (p->name)) +- return 1; ++ { ++ ret = 1; ++ break; ++ } + + if (grub_errno) + grub_print_error (); +@@ -46,7 +56,10 @@ + grub_free (p); + } + +- return 0; ++ grub_memcpy (grub_file_filters_enabled, grub_file_filters_was, ++ sizeof (grub_file_filters_enabled)); ++ ++ return ret; + } + + /* Read the file fs.lst for auto-loading. */ + diff --git a/sys-boot/grub/grub-2.00-r1.ebuild b/sys-boot/grub/grub-2.00-r1.ebuild index e83da468e778..fd459d8a4774 100644 --- a/sys-boot/grub/grub-2.00-r1.ebuild +++ b/sys-boot/grub/grub-2.00-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.00-r1.ebuild,v 1.5 2013/01/07 03:26:31 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.00-r1.ebuild,v 1.6 2013/01/07 03:40:12 floppym Exp $ EAPI=4 @@ -237,6 +237,7 @@ src_prepare() { epatch "${FILESDIR}/${P}-tftp-endian.patch" # 438612 epatch "${FILESDIR}/${P}-hardcoded-awk.patch" #424137 epatch "${FILESDIR}/${P}-freebsd.patch" #442050 + epatch "${FILESDIR}/${P}-compression.patch" #424527 fi # fix texinfo file name, bug 416035 |