[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
commit: f879895488b938b704ebbde3f444df3d3cce8a0a Author: Andrew Ammerlaan gentoo org> AuthorDate: Fri Mar 1 15:32:13 2024 + Commit: Andrew Ammerlaan gentoo org> CommitDate: Fri Mar 1 16:58:09 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8798954 sys-boot/grub: install an sbat for grub-install --sbat ... Booting with sys-boot/shim requires that an sbat section is present in the EFI executable. Add an sbat.csv file that can optionally be included when building the grub EFI executable. Closes: https://bugs.gentoo.org/925902 Signed-off-by: Andrew Ammerlaan gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/35588 Signed-off-by: Andrew Ammerlaan gentoo.org> sys-boot/grub/files/sbat.csv | 3 +++ sys-boot/grub/{grub-2.12-r1.ebuild => grub-2.12-r2.ebuild} | 4 sys-boot/grub/grub-.ebuild | 4 3 files changed, 11 insertions(+) diff --git a/sys-boot/grub/files/sbat.csv b/sys-boot/grub/files/sbat.csv new file mode 100644 index ..2b87b532556c --- /dev/null +++ b/sys-boot/grub/files/sbat.csv @@ -0,0 +1,3 @@ +sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md +grub,3,Free Software Foundation,grub,%PV%,https//www.gnu.org/software/grub/ +grub.gentoo,1,Gentoo,grub,%PV%,https://bugs.gentoo.org/ diff --git a/sys-boot/grub/grub-2.12-r1.ebuild b/sys-boot/grub/grub-2.12-r2.ebuild similarity index 98% rename from sys-boot/grub/grub-2.12-r1.ebuild rename to sys-boot/grub/grub-2.12-r2.ebuild index c6cb75fc4b02..e156b1b4754a 100644 --- a/sys-boot/grub/grub-2.12-r1.ebuild +++ b/sys-boot/grub/grub-2.12-r2.ebuild @@ -315,6 +315,10 @@ src_install() { # https://bugs.gentoo.org/231935 dostrip -x /usr/lib/grub + sed -e "s/%PV%/${PV}/" "${FILESDIR}/sbat.csv" > "${T}/sbat.csv" || die + insinto /usr/share/grub + doins "${T}/sbat.csv" + if use elibc_musl; then # https://bugs.gentoo.org/900348 QA_CONFIG_IMPL_DECL_SKIP=( re_{compile_pattern,match,search,set_syntax} ) diff --git a/sys-boot/grub/grub-.ebuild b/sys-boot/grub/grub-.ebuild index 0ba8261571a5..44bb51e767ee 100644 --- a/sys-boot/grub/grub-.ebuild +++ b/sys-boot/grub/grub-.ebuild @@ -311,6 +311,10 @@ src_install() { # https://bugs.gentoo.org/231935 dostrip -x /usr/lib/grub + sed -e "s/%PV%/${PV}/" "${FILESDIR}/sbat.csv" > "${T}/sbat.csv" || die + insinto /usr/share/grub + doins "${T}/sbat.csv" + if use elibc_musl; then # https://bugs.gentoo.org/900348 QA_CONFIG_IMPL_DECL_SKIP=( re_{compile_pattern,match,search,set_syntax} )
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/
commit: d3c252b3084f40c4d840283cfb448263afbf9ed2 Author: Michael Mair-Keimberger levelnine at> AuthorDate: Sat Jan 20 08:20:40 2024 + Commit: Conrad Kostecki gentoo org> CommitDate: Sat Jan 20 21:21:46 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3c252b3 sys-boot/grub: remove unused patches Signed-off-by: Michael Mair-Keimberger levelnine.at> Signed-off-by: Conrad Kostecki gentoo.org> ...grub-2.06-arm64-linux-Remove-magic-number.patch | 45 -- .../grub-2.06-fs-ext2-ignore-checksum-seed.patch | 62 ...py-Remove-.interp-section-from-.img-files.patch | 31 -- .../grub-2.06-grub-mkconfig-restore-umask.patch| 41 - sys-boot/grub/files/grub-2.06-locale.patch | 68 -- sys-boot/grub/files/grub-2.06-riscv.patch | 49 ...b.d-25_bli.in-fix-shebang-on-unmerged-usr.patch | 31 -- 7 files changed, 327 deletions(-) diff --git a/sys-boot/grub/files/grub-2.06-arm64-linux-Remove-magic-number.patch b/sys-boot/grub/files/grub-2.06-arm64-linux-Remove-magic-number.patch deleted file mode 100644 index eed3bf0ca93d.. --- a/sys-boot/grub/files/grub-2.06-arm64-linux-Remove-magic-number.patch +++ /dev/null @@ -1,45 +0,0 @@ -https://git.savannah.gnu.org/cgit/grub.git/patch/?id=69edb31205602c29293a8c6e67363bba2a4a1e66 -https://bugs.gentoo.org/913935 - -From 69edb31205602c29293a8c6e67363bba2a4a1e66 Mon Sep 17 00:00:00 2001 -From: Ard Biesheuvel -Date: Thu, 11 Aug 2022 16:51:57 +0200 -Subject: loader/arm64/linux: Remove magic number header field check - -The "ARM\x64" magic number in the file header identifies an image as one -that implements the bare metal boot protocol, allowing the loader to -simply move the file to a suitably aligned address in memory, with -sufficient headroom for the trailing .bss segment (the required memory -size is described in the header as well). - -Note of this matters for GRUB, as it only supports EFI boot. EFI does -not care about this magic number, and nor should GRUB: this prevents us -from booting other PE linux images, such as the generic EFI zboot -decompressor, which is a pure PE/COFF image, and does not implement the -bare metal boot protocol. - -So drop the magic number check. - -Signed-off-by: Ard Biesheuvel -Reviewed-by: Daniel Kiper - grub-core/loader/arm64/linux.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c -index ef3e9f9..4c92e48 100644 a/grub-core/loader/arm64/linux.c -+++ b/grub-core/loader/arm64/linux.c -@@ -51,9 +51,6 @@ static grub_addr_t initrd_end; - grub_err_t - grub_arch_efi_linux_check_image (struct linux_arch_kernel_header * lh) - { -- if (lh->magic != GRUB_LINUX_ARMXX_MAGIC_SIGNATURE) --return grub_error(GRUB_ERR_BAD_OS, "invalid magic number"); -- - if ((lh->code0 & 0x) != GRUB_PE32_MAGIC) - return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, - N_("plain image kernel not supported - rebuild with CONFIG_(U)EFI_STUB enabled")); --- -cgit v1.1 - diff --git a/sys-boot/grub/files/grub-2.06-fs-ext2-ignore-checksum-seed.patch b/sys-boot/grub/files/grub-2.06-fs-ext2-ignore-checksum-seed.patch deleted file mode 100644 index 9024b479a878.. --- a/sys-boot/grub/files/grub-2.06-fs-ext2-ignore-checksum-seed.patch +++ /dev/null @@ -1,62 +0,0 @@ -https://bugs.gentoo.org/894200 -https://git.savannah.gnu.org/cgit/grub.git/patch/?id=7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763 - -From 7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763 Mon Sep 17 00:00:00 2001 -From: Javier Martinez Canillas -Date: Fri, 11 Jun 2021 21:36:16 +0200 -Subject: fs/ext2: Ignore checksum seed incompat feature - -This incompat feature is used to denote that the filesystem stored its -metadata checksum seed in the superblock. This is used to allow tune2fs -changing the UUID on a mounted metdata_csum filesystem without having -to rewrite all the disk metadata. However, the GRUB doesn't use the -metadata checksum at all. So, it can just ignore this feature if it -is enabled. This is consistent with the GRUB filesystem code in general -which just does a best effort to access the filesystem's data. - -The checksum seed incompat feature has to be removed from the ignore -list if the support for metadata checksum verification is added to the -GRUB ext2 driver later. - -Suggested-by: Eric Sandeen -Suggested-by: Lukas Czerner -Signed-off-by: Javier Martinez Canillas -Reviewed-by: Lukas Czerner -Reviewed-by: Daniel Kiper - grub-core/fs/ext2.c | 10 -- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c -index e7dd78e..4953a15 100644 a/grub-core/fs/ext2.c -+++ b/grub-core/fs/ext2.c -@@ -103,6 +103,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); - #define EXT4_FEATURE_INCOMPAT_64BIT 0x0080 - #define EXT4_FEATURE_INCOMPAT_MMP 0x0100 -
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
commit: 070361537d8ace58dd617b3520c0e2751e1f5574 Author: Mike Gilbert gentoo org> AuthorDate: Mon Sep 11 01:48:19 2023 + Commit: Mike Gilbert gentoo org> CommitDate: Mon Sep 11 01:48:19 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07036153 sys-boot/grub: backport fix for arm64 Closes: https://bugs.gentoo.org/913935 Signed-off-by: Mike Gilbert gentoo.org> ...grub-2.06-arm64-linux-Remove-magic-number.patch | 45 ++ .../{grub-2.06-r7.ebuild => grub-2.06-r8.ebuild} | 1 + 2 files changed, 46 insertions(+) diff --git a/sys-boot/grub/files/grub-2.06-arm64-linux-Remove-magic-number.patch b/sys-boot/grub/files/grub-2.06-arm64-linux-Remove-magic-number.patch new file mode 100644 index ..eed3bf0ca93d --- /dev/null +++ b/sys-boot/grub/files/grub-2.06-arm64-linux-Remove-magic-number.patch @@ -0,0 +1,45 @@ +https://git.savannah.gnu.org/cgit/grub.git/patch/?id=69edb31205602c29293a8c6e67363bba2a4a1e66 +https://bugs.gentoo.org/913935 + +From 69edb31205602c29293a8c6e67363bba2a4a1e66 Mon Sep 17 00:00:00 2001 +From: Ard Biesheuvel +Date: Thu, 11 Aug 2022 16:51:57 +0200 +Subject: loader/arm64/linux: Remove magic number header field check + +The "ARM\x64" magic number in the file header identifies an image as one +that implements the bare metal boot protocol, allowing the loader to +simply move the file to a suitably aligned address in memory, with +sufficient headroom for the trailing .bss segment (the required memory +size is described in the header as well). + +Note of this matters for GRUB, as it only supports EFI boot. EFI does +not care about this magic number, and nor should GRUB: this prevents us +from booting other PE linux images, such as the generic EFI zboot +decompressor, which is a pure PE/COFF image, and does not implement the +bare metal boot protocol. + +So drop the magic number check. + +Signed-off-by: Ard Biesheuvel +Reviewed-by: Daniel Kiper +--- + grub-core/loader/arm64/linux.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c +index ef3e9f9..4c92e48 100644 +--- a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c +@@ -51,9 +51,6 @@ static grub_addr_t initrd_end; + grub_err_t + grub_arch_efi_linux_check_image (struct linux_arch_kernel_header * lh) + { +- if (lh->magic != GRUB_LINUX_ARMXX_MAGIC_SIGNATURE) +-return grub_error(GRUB_ERR_BAD_OS, "invalid magic number"); +- + if ((lh->code0 & 0x) != GRUB_PE32_MAGIC) + return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, + N_("plain image kernel not supported - rebuild with CONFIG_(U)EFI_STUB enabled")); +-- +cgit v1.1 + diff --git a/sys-boot/grub/grub-2.06-r7.ebuild b/sys-boot/grub/grub-2.06-r8.ebuild similarity index 99% rename from sys-boot/grub/grub-2.06-r7.ebuild rename to sys-boot/grub/grub-2.06-r8.ebuild index c56c06edbcba..98de90a6d4a3 100644 --- a/sys-boot/grub/grub-2.06-r7.ebuild +++ b/sys-boot/grub/grub-2.06-r8.ebuild @@ -72,6 +72,7 @@ PATCHES=( "${FILESDIR}"/grub-2.06-fs-ext2-ignore-checksum-seed.patch "${FILESDIR}"/grub-2.06-riscv.patch "${FILESDIR}"/grub-2.06-locale.patch + "${FILESDIR}"/grub-2.06-arm64-linux-Remove-magic-number.patch ) DEJAVU=dejavu-sans-ttf-2.37
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
commit: d69213cd70673f5fb9460ef89215fe04f8b31653 Author: Mike Gilbert gentoo org> AuthorDate: Sun Jul 9 22:41:33 2023 + Commit: Mike Gilbert gentoo org> CommitDate: Sun Jul 9 22:41:33 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d69213cd sys-boot/grub: backport locale fixes Closes: https://bugs.gentoo.org/910170 Signed-off-by: Mike Gilbert gentoo.org> sys-boot/grub/files/grub-2.06-locale.patch | 68 ++ .../{grub-2.06-r6.ebuild => grub-2.06-r7.ebuild} | 1 + 2 files changed, 69 insertions(+) diff --git a/sys-boot/grub/files/grub-2.06-locale.patch b/sys-boot/grub/files/grub-2.06-locale.patch new file mode 100644 index ..14706cbca3a2 --- /dev/null +++ b/sys-boot/grub/files/grub-2.06-locale.patch @@ -0,0 +1,68 @@ +From 5983c2c6adf1c1bbb3ecd751253d1e898bdfd8a3 Mon Sep 17 00:00:00 2001 +From: Michael Chang +Date: Tue, 26 Oct 2021 15:11:00 +0800 +Subject: templates: Filter out POSIX locale for translation + +The POSIX locale is default or native operating system's locale +identical to the C locale, so no translation to human speaking languages +are provided. For this reason we should filter out LANG=POSIX as well as +LANG=C upon generating grub.cfg to avoid looking up for it's gettext's +message catalogs that will consequently result in an unpleasant message: + + error: file `/boot/grub/locale/POSIX.gmo' not found + +Signed-off-by: Michael Chang +Reviewed-by: Daniel Kiper +--- + util/grub.d/00_header.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in +index 93a9023..f74c2a4 100644 +--- a/util/grub.d/00_header.in b/util/grub.d/00_header.in +@@ -191,7 +191,7 @@ EOF + EOF + + # Gettext variables and module +-if [ "x${LANG}" != "xC" ] && [ "x${LANG}" != "x" ]; then ++if [ "x${LANG}" != "xC" ] && [ "x${LANG}" != "xPOSIX" ] && [ "x${LANG}" != "x" ]; then + cat << EOF + set locale_dir=\$prefix/locale + set lang=${grub_lang} +-- +cgit v1.1 + +From f42266a8a2a4215e4ffe419b8092bdf9ced33e8e Mon Sep 17 00:00:00 2001 +From: Christian Hesse +Date: Mon, 19 Sep 2022 15:31:28 +0200 +Subject: templates: Filter C.UTF-8 locale for translation + +In addition to C locale there is also C.UTF-8 locale now. Filter that as +well, by using ${grub_lang}, which contains a stripped value. +This fixes the following message and resulting boot failure: + +error: file `/boot/grub/locale/C.gmo' not found. + +Signed-off-by: Christian Hesse +Reviewed-by: Daniel Kiper +--- + util/grub.d/00_header.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in +index f74c2a4..6a316a5 100644 +--- a/util/grub.d/00_header.in b/util/grub.d/00_header.in +@@ -191,7 +191,7 @@ EOF + EOF + + # Gettext variables and module +-if [ "x${LANG}" != "xC" ] && [ "x${LANG}" != "xPOSIX" ] && [ "x${LANG}" != "x" ]; then ++if [ "x${grub_lang}" != "xC" ] && [ "x${LANG}" != "xPOSIX" ] && [ "x${LANG}" != "x" ]; then + cat << EOF + set locale_dir=\$prefix/locale + set lang=${grub_lang} +-- +cgit v1.1 + diff --git a/sys-boot/grub/grub-2.06-r6.ebuild b/sys-boot/grub/grub-2.06-r7.ebuild similarity index 99% rename from sys-boot/grub/grub-2.06-r6.ebuild rename to sys-boot/grub/grub-2.06-r7.ebuild index 707acec900be..15a8221a1c13 100644 --- a/sys-boot/grub/grub-2.06-r6.ebuild +++ b/sys-boot/grub/grub-2.06-r7.ebuild @@ -63,6 +63,7 @@ PATCHES=( "${FILESDIR}"/grub-2.06-gentpl.py-Remove-.interp-section-from-.img-files.patch "${FILESDIR}"/grub-2.06-fs-ext2-ignore-checksum-seed.patch "${FILESDIR}"/grub-2.06-riscv.patch + "${FILESDIR}"/grub-2.06-locale.patch ) DEJAVU=dejavu-sans-ttf-2.37
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/
commit: 47dc11ae5fb1b6ca03f8bbe50b1dd6da29182eca Author: Michael Mair-Keimberger levelnine at> AuthorDate: Wed May 10 18:18:37 2023 + Commit: Conrad Kostecki gentoo org> CommitDate: Thu May 11 20:28:05 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47dc11ae sys-boot/grub: remove unused file Signed-off-by: Michael Mair-Keimberger levelnine.at> Closes: https://github.com/gentoo/gentoo/pull/30978 Signed-off-by: Conrad Kostecki gentoo.org> sys-boot/grub/files/grub.default-3 | 73 -- 1 file changed, 73 deletions(-) diff --git a/sys-boot/grub/files/grub.default-3 b/sys-boot/grub/files/grub.default-3 deleted file mode 100644 index 3faabf9c6ea9.. --- a/sys-boot/grub/files/grub.default-3 +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 -# -# To populate all changes in this file you need to regenerate your -# grub configuration file afterwards: -# 'grub-mkconfig -o /boot/grub/grub.cfg' -# -# See the grub info page for documentation on possible variables and -# their associated values. - -GRUB_DISTRIBUTOR="Gentoo" - -# Default menu entry -#GRUB_DEFAULT=0 - -# Boot the default entry this many seconds after the menu is displayed -#GRUB_TIMEOUT=5 -#GRUB_TIMEOUT_STYLE=menu - -# Append parameters to the linux kernel command line -#GRUB_CMDLINE_LINUX="" -# -# Examples: -# -# Boot with network interface renaming disabled -# GRUB_CMDLINE_LINUX="net.ifnames=0" -# -# Boot with systemd instead of sysvinit (openrc) -# GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd" - -# Append parameters to the linux kernel command line for non-recovery entries -#GRUB_CMDLINE_LINUX_DEFAULT="" - -# Uncomment to disable graphical terminal (grub-pc only) -#GRUB_TERMINAL=console - -# The resolution used on graphical terminal. -# Note that you can use only modes which your graphic card supports via VBE. -# You can see them in real GRUB with the command `vbeinfo'. -#GRUB_GFXMODE=640x480 - -# Set to 'text' to force the Linux kernel to boot in normal text -# mode, 'keep' to preserve the graphics mode set using -# 'GRUB_GFXMODE', 'WIDTHxHEIGHT'['xDEPTH'] to set a particular -# graphics mode, or a sequence of these separated by commas or -# semicolons to try several modes in sequence. -#GRUB_GFXPAYLOAD_LINUX= - -# Path to theme spec txt file. -# The starfield is by default provided with use truetype. -# NOTE: when enabling custom theme, ensure you have required font/etc. -#GRUB_THEME="/boot/grub/themes/starfield/theme.txt" - -# Background image used on graphical terminal. -# Can be in various bitmap formats. -#GRUB_BACKGROUND="/boot/grub/mybackground.png" - -# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel -#GRUB_DISABLE_LINUX_UUID=true - -# Uncomment to disable generation of recovery mode menu entries -#GRUB_DISABLE_RECOVERY=true - -# Uncomment to disable generation of the submenu and put all choices on -# the top-level menu. -# Besides the visual affect of no sub menu, this makes navigation of the -# menu easier for a user who can't see the screen. -#GRUB_DISABLE_SUBMENU=y - -# Uncomment to play a tone when the main menu is displayed. -# This is useful, for example, to allow users who can't see the screen -# to know when they can make a choice on the menu. -#GRUB_INIT_TUNE="60 800 1"
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/
commit: 7719b94e9a4bf646322889da6eafc121fdfeb1a9 Author: Michael Mair-Keimberger levelnine at> AuthorDate: Wed Sep 28 16:53:38 2022 + Commit: Mike Gilbert gentoo org> CommitDate: Wed Sep 28 19:31:52 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7719b94e sys-boot/grub: remove unused patches Signed-off-by: Michael Mair-Keimberger levelnine.at> Closes: https://github.com/gentoo/gentoo/pull/27516 Signed-off-by: Mike Gilbert gentoo.org> sys-boot/grub/files/grub-2.06-binutils-2.36.patch | 44 sys-boot/grub/files/grub-2.06-xfs-v4.patch| 120 -- 2 files changed, 164 deletions(-) diff --git a/sys-boot/grub/files/grub-2.06-binutils-2.36.patch b/sys-boot/grub/files/grub-2.06-binutils-2.36.patch deleted file mode 100644 index 5cb327003adb.. --- a/sys-boot/grub/files/grub-2.06-binutils-2.36.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 5cea201f288246488e2189c49d969d00ebec2898 Mon Sep 17 00:00:00 2001 -From: Michael Chang -Date: Fri, 19 Feb 2021 17:40:43 +0800 -Subject: [PATCH] Fix build error in binutils 2.36 - -The build fails in binutils 2.36 - -[ 520s] cat kernel_syms.lst > syminfo.lst.new -[ 520s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: section .note.gnu.property VMA [00400158,00400187] overlaps section .bss VMA [f000,0041e1af] - -It is caused by assembler now generates the GNU property notes section -by default. Use the assmbler option -mx86-used-note=no to disable the -section from being generated to workaround the ensuing linker issue. - -Signed-off-by: Michael Chang - configure.ac | 14 ++ - 1 file changed, 14 insertions(+) - -diff --git a/configure.ac b/configure.ac -index fa8f74bb9..38ee5f579 100644 a/configure.ac -+++ b/configure.ac -@@ -836,6 +836,20 @@ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$p - TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow" - fi - -+if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ); then -+ AC_CACHE_CHECK([whether -Wa,-mx86-used-note works], [grub_cv_cc_mx86_used_note], [ -+CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no -Werror" -+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], -+ [grub_cv_cc_mx86_used_note=yes], -+ [grub_cv_cc_mx86_used_note=no]) -+ ]) -+ -+ if test "x$grub_cv_cc_mx86_used_note" = xyes; then -+TARGET_CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no" -+TARGET_CCASFLAGS="$TARGET_CCASFLAGS -Wa,-mx86-used-note=no" -+ fi -+fi -+ - # GRUB doesn't use float or doubles at all. Yet some toolchains may decide - # that floats are a good fit to run instead of what's written in the code. - # Given that floating point unit is disabled (if present to begin with) diff --git a/sys-boot/grub/files/grub-2.06-xfs-v4.patch b/sys-boot/grub/files/grub-2.06-xfs-v4.patch deleted file mode 100644 index fe8223780384.. --- a/sys-boot/grub/files/grub-2.06-xfs-v4.patch +++ /dev/null @@ -1,120 +0,0 @@ -From a4b495520e4dc41a896a8b916a64eda9970c50ea Mon Sep 17 00:00:00 2001 -From: Erwan Velu -Date: Wed, 25 Aug 2021 15:31:52 +0200 -Subject: fs/xfs: Fix unreadable filesystem with v4 superblock - -The commit 8b1e5d193 (fs/xfs: Add bigtime incompat feature support) -introduced the bigtime support by adding some features in v3 inodes. -This change extended grub_xfs_inode struct by 76 bytes but also changed -the computation of XFS_V2_INODE_SIZE and XFS_V3_INODE_SIZE. Prior this -commit, XFS_V2_INODE_SIZE was 100 bytes. After the commit it's 84 bytes -XFS_V2_INODE_SIZE becomes 16 bytes too small. - -As a result, the data structures aren't properly aligned and the GRUB -generates "attempt to read or write outside of partition" errors when -trying to read the XFS filesystem: - - GNU GRUB version 2.11 - - grub> set debug=efi,gpt,xfs - grub> insmod part_gpt - grub> ls (hd0,gpt1)/ - partmap/gpt.c:93: Read a valid GPT header - partmap/gpt.c:115: GPT entry 0: start=4096, length=1953125 - fs/xfs.c:931: Reading sb - fs/xfs.c:270: Validating superblock - fs/xfs.c:295: XFS v4 superblock detected - fs/xfs.c:962: Reading root ino 128 - fs/xfs.c:515: Reading inode (128) - 64, 0 - fs/xfs.c:515: Reading inode (739521961424144223) - 344365866970255880, 3840 - error: attempt to read or write outside of partition. - -This commit change the XFS_V2_INODE_SIZE computation by subtracting 76 -bytes instead of 92 bytes from the actual size of grub_xfs_inode struct. -This 76 bytes value comes from added members: - 20 grub_uint8_t unused5 -1 grub_uint64_t flags2 -48 grub_uint8_t unused6 - -This patch explicitly splits the v2 and v3 parts of the structure. -The unused4 is still ending of the v2 structures and the v3 starts -at unused5. Thanks to this we will avoid
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
commit: abe655fe66964de0a45e8d0c158bdf3958cdfd1c Author: Mike Gilbert gentoo org> AuthorDate: Thu Sep 23 18:47:53 2021 + Commit: Mike Gilbert gentoo org> CommitDate: Thu Sep 23 18:47:53 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abe655fe sys-boot/grub: fix xen build with binutils-2.36 Closes: https://bugs.gentoo.org/787221 Signed-off-by: Mike Gilbert gentoo.org> sys-boot/grub/files/grub-2.06-binutils-2.36.patch | 44 +++ sys-boot/grub/grub-2.06-r1.ebuild | 3 +- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/sys-boot/grub/files/grub-2.06-binutils-2.36.patch b/sys-boot/grub/files/grub-2.06-binutils-2.36.patch new file mode 100644 index 000..5cb327003ad --- /dev/null +++ b/sys-boot/grub/files/grub-2.06-binutils-2.36.patch @@ -0,0 +1,44 @@ +From 5cea201f288246488e2189c49d969d00ebec2898 Mon Sep 17 00:00:00 2001 +From: Michael Chang +Date: Fri, 19 Feb 2021 17:40:43 +0800 +Subject: [PATCH] Fix build error in binutils 2.36 + +The build fails in binutils 2.36 + +[ 520s] cat kernel_syms.lst > syminfo.lst.new +[ 520s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: section .note.gnu.property VMA [00400158,00400187] overlaps section .bss VMA [f000,0041e1af] + +It is caused by assembler now generates the GNU property notes section +by default. Use the assmbler option -mx86-used-note=no to disable the +section from being generated to workaround the ensuing linker issue. + +Signed-off-by: Michael Chang +--- + configure.ac | 14 ++ + 1 file changed, 14 insertions(+) + +diff --git a/configure.ac b/configure.ac +index fa8f74bb9..38ee5f579 100644 +--- a/configure.ac b/configure.ac +@@ -836,6 +836,20 @@ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$p + TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow" + fi + ++if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ); then ++ AC_CACHE_CHECK([whether -Wa,-mx86-used-note works], [grub_cv_cc_mx86_used_note], [ ++CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no -Werror" ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], ++ [grub_cv_cc_mx86_used_note=yes], ++ [grub_cv_cc_mx86_used_note=no]) ++ ]) ++ ++ if test "x$grub_cv_cc_mx86_used_note" = xyes; then ++TARGET_CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no" ++TARGET_CCASFLAGS="$TARGET_CCASFLAGS -Wa,-mx86-used-note=no" ++ fi ++fi ++ + # GRUB doesn't use float or doubles at all. Yet some toolchains may decide + # that floats are a good fit to run instead of what's written in the code. + # Given that floating point unit is disabled (if present to begin with) diff --git a/sys-boot/grub/grub-2.06-r1.ebuild b/sys-boot/grub/grub-2.06-r1.ebuild index d80b215cc47..4224c4f643f 100644 --- a/sys-boot/grub/grub-2.06-r1.ebuild +++ b/sys-boot/grub/grub-2.06-r1.ebuild @@ -17,10 +17,10 @@ EAPI=7 # corresponding variable in make.conf or the environment. if [[ ${PV} == ]]; then - GRUB_AUTORECONF=1 GRUB_BOOTSTRAP=1 fi +GRUB_AUTORECONF=1 PYTHON_COMPAT=( python{2_7,3_{6,7,8,9}} ) WANT_LIBTOOL=none @@ -55,6 +55,7 @@ PATCHES=( "${FILESDIR}"/gfxpayload.patch "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch "${FILESDIR}"/grub-2.06-test-words.patch + "${FILESDIR}"/grub-2.06-binutils-2.36.patch ) DEJAVU=dejavu-sans-ttf-2.37
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/
commit: 5f689c2332fa0e6f89ffaf85fb17ae745e84d737 Author: Mike Frysinger gentoo org> AuthorDate: Mon Sep 6 02:57:51 2021 + Commit: Mike Frysinger gentoo org> CommitDate: Mon Sep 6 02:59:00 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f689c23 sys-boot/grub: fix custom kernel glob patch The variable export was missing which caused it to always be blank. Setting it in /etc/default/grub wouldn't work as /etc/grub.d/10_linux still wouldn't see it. Signed-off-by: Mike Frysinger gentoo.org> sys-boot/grub/files/grub-2.02_beta2-KERNEL_GLOBS.patch | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sys-boot/grub/files/grub-2.02_beta2-KERNEL_GLOBS.patch b/sys-boot/grub/files/grub-2.02_beta2-KERNEL_GLOBS.patch index c66ee68dc8d..0d2b96d76c1 100644 --- a/sys-boot/grub/files/grub-2.02_beta2-KERNEL_GLOBS.patch +++ b/sys-boot/grub/files/grub-2.02_beta2-KERNEL_GLOBS.patch @@ -62,6 +62,13 @@ index 859b608..e5ac11d 100644 case "$machine" in i?86) GENKERNEL_ARCH="x86" ;; --- -2.3.0 - +--- a/util/grub-mkconfig.in b/util/grub-mkconfig.in +@@ -252,6 +252,7 @@ + GRUB_BADRAM \ + GRUB_OS_PROBER_SKIP_LIST \ + GRUB_DISABLE_SUBMENU ++export GRUB_LINUX_KERNEL_GLOBS + + if test "x${grub_cfg}" != "x"; then + rm -f "${grub_cfg}.new"
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
commit: 6daa5197e9a530c71e1e78d25c1ffb356f78c972 Author: Mike Gilbert gentoo org> AuthorDate: Wed Apr 21 15:41:38 2021 + Commit: Mike Gilbert gentoo org> CommitDate: Wed Apr 21 15:41:38 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6daa5197 sys-boot/grub: drop 2.04-r2, 2.05_alpha20200310-r1 Bug: https://bugs.gentoo.org/773991 Signed-off-by: Mike Gilbert gentoo.org> sys-boot/grub/Manifest | 2 - sys-boot/grub/files/2.04-sparc64-bios-boot.patch | 50 sys-boot/grub/grub-2.04-r2.ebuild| 297 --- sys-boot/grub/grub-2.05_alpha20200310-r1.ebuild | 288 -- 4 files changed, 637 deletions(-) diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest index 34314f59641..aeb888abbb9 100644 --- a/sys-boot/grub/Manifest +++ b/sys-boot/grub/Manifest @@ -1,5 +1,3 @@ DIST dejavu-sans-ttf-2.37.zip 417746 BLAKE2B c8904f3cd5a49370a7dc10e456684c88aeae998a99090bf4d0a5baa4f36cc8fb8f70586cf6d610a5ffeee97261d28c80f55bbe9dcfc3ed796d5c2d60e79adb58 SHA512 ede5899daa1984c5aa8cacb1c850eb53f189dddef3d9bb78bf9774d8976b7c0d6eb0bcf86237cd7d11f5b36cf5b5058d42cd94d3bd76f2bd0931c7ceb1271fae -DIST grub-2.04.tar.xz 6393864 BLAKE2B 413ffb9aaeae1ee3128032914ca426a1a5adb3737895dfe563fdde5a7e0386ac2dbc2f7ddfc4e0a67b3ad90494985d6886c20054b038701feb743e67e2eed9d0 SHA512 9c15c42d0cf5d61446b752194e3b628bb04be0fe6ea0240ab62b3d753784712744846e1f7c3651d8e0968d22012e6d713c38c44936d4004ded3ca4d4007babbb -DIST grub-2.05_alpha20200310.tar.xz 6671372 BLAKE2B 2b9006fe486bb3195f34a3e5d34eaa923e1f295fbb7b815b0adf70ca3000531ff0c250c300f21103cf24144f9e51b96cefc860b7a46c6e31b96d4566db08b027 SHA512 7ddcb7524a4fa60754e3053aae4b033b17ffd740f220d3cbc1e25167ce823c42b1795b4767dabb8920027134769de8cacdafc9a6fe26b4d242590809e3db8725 DIST grub-2.06~rc1.tar.xz 6543784 BLAKE2B 2cd322db808e09533aa91db3e03147896f3f8a2fb6bcc932161aace2f1bab9fd1ceb8b56eddf2e531413932c1ef407cdaf5aae49c0b26e7c6c308dbf7916685d SHA512 093890b0af71b0d346afb415dec106681fd9e3f2f5bda14093c060b861d55ee1b50c8fb24afd072d24968ebebedde290f8220b0374cbd2b2e4508dfb00924122 DIST unifont-12.1.02.pcf.gz 1335424 BLAKE2B 97080312468e3f3c8aa6f49cef08f5622641e8c9c035f3ede1e09d8d98de4e78d3b23c8aba2e8070eb46cbebd2d55e8568e467d7f15f35aa8fc8db792b7e5f14 SHA512 b280b2db7cf5f480b0668c331130dede2c0cc87d5e02e44566b77787113d0f6604d0105522858288f2ac6b8e77df7a2d9878725013a6c778dc5bfb183156e2f0 diff --git a/sys-boot/grub/files/2.04-sparc64-bios-boot.patch b/sys-boot/grub/files/2.04-sparc64-bios-boot.patch deleted file mode 100644 index 8fd00d497ad..000 --- a/sys-boot/grub/files/2.04-sparc64-bios-boot.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 4e75b2ae313b13b5bfb54cc5e5c53368d6eb2a08 Mon Sep 17 00:00:00 2001 -From: James Clarke -Date: Thu, 18 Jul 2019 14:31:55 +0200 -Subject: [PATCH] sparc64: Fix BIOS Boot Partition support - -Currently, gpt_offset is uninitialised when using a BIOS Boot Partition -but is used unconditionally inside save_blocklists. Instead, ensure it -is always initialised to 0 (note that there is already separate code to -do the equivalent adjustment after we call save_blocklists on this code -path). - -This patch has been tested on a T5-2 LDOM. - -Signed-off-by: James Clarke -Tested-by: John Paul Adrian Glaubitz -Reviewed-by: Vladimir Serbinenko -Reviewed-by: Eric Snowberg - - util/setup.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - util/setup.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/util/setup.c b/util/setup.c -index 6f88f3c..3be88aa 100644 a/util/setup.c -+++ b/util/setup.c -@@ -271,6 +271,9 @@ SETUP (const char *dir, - bl.current_segment = - GRUB_BOOT_I386_PC_KERNEL_SEG + (GRUB_DISK_SECTOR_SIZE >> 4); - #endif -+#ifdef GRUB_SETUP_SPARC64 -+ bl.gpt_offset = 0; -+#endif - bl.last_length = 0; - - /* Read the boot image by the OS service. */ -@@ -730,7 +733,6 @@ unable_to_embed: - #ifdef GRUB_SETUP_SPARC64 - { - grub_partition_t container = root_dev->disk->partition; --bl.gpt_offset = 0; - - if (grub_strstr (container->partmap->name, "gpt")) - bl.gpt_offset = grub_partition_get_start (container); --- -cgit v1.0-41-gc330 - diff --git a/sys-boot/grub/grub-2.04-r2.ebuild b/sys-boot/grub/grub-2.04-r2.ebuild deleted file mode 100644 index 04aa2e74e31..000 --- a/sys-boot/grub/grub-2.04-r2.ebuild +++ /dev/null @@ -1,297 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -if [[ ${PV} == ]]; then - GRUB_AUTORECONF=1 - GRUB_BOOTSTRAP=1 -fi - -if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then - PYTHON_COMPAT=( python{2_7,3_{6,7,8}} ) - inherit python-any-r1 -fi - -if [[ -n ${GRUB_AUTORECONF} ]]; then - WANT_LIBTOOL=none - inherit autotools -fi - -inherit bash-completion-r1 flag-o-matic multibuild optfeature
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/
commit: 4fd8145747493f79d1393be5a4468d9c701e1144 Author: Mikle Kolyada gentoo org> AuthorDate: Fri Feb 14 10:59:21 2020 + Commit: Mikle Kolyada gentoo org> CommitDate: Fri Feb 14 11:02:02 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fd81457 sys-boot/grub: Do not reference grub2 in default file Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Mikle Kolyada gentoo.org> sys-boot/grub/files/grub.default-3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys-boot/grub/files/grub.default-3 b/sys-boot/grub/files/grub.default-3 index 593b019db7d..3faabf9c6ea 100644 --- a/sys-boot/grub/files/grub.default-3 +++ b/sys-boot/grub/files/grub.default-3 @@ -1,9 +1,9 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # # To populate all changes in this file you need to regenerate your # grub configuration file afterwards: -# 'grub2-mkconfig -o /boot/grub/grub.cfg' +# 'grub-mkconfig -o /boot/grub/grub.cfg' # # See the grub info page for documentation on possible variables and # their associated values.
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/
commit: 2926b4e0b39e90965d9d024fca535a94be94f6f4 Author: Michael Mair-Keimberger gmail com> AuthorDate: Tue Feb 12 16:21:22 2019 + Commit: Lars Wendler gentoo org> CommitDate: Sat Feb 16 21:05:31 2019 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2926b4e0 sys-boot/grub: remove unused file Signed-off-by: Michael Mair-Keimberger gmail.com> Signed-off-by: Lars Wendler gentoo.org> sys-boot/grub/files/grub.conf.gentoo | 16 1 file changed, 16 deletions(-) diff --git a/sys-boot/grub/files/grub.conf.gentoo b/sys-boot/grub/files/grub.conf.gentoo deleted file mode 100644 index 984470b3860..000 --- a/sys-boot/grub/files/grub.conf.gentoo +++ /dev/null @@ -1,16 +0,0 @@ -# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook -# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1=10#doc_chap2 -# If you are not using Genkernel and you need help creating this file, you -# should consult the handbook. Alternatively, consult the grub.conf.sample that -# is included with the Grub documentation. - -default 0 -timeout 30 -#splashimage=(hd0,0)/boot/grub/splash.xpm.gz - -#title Gentoo Linux 3.8.13 -#root (hd0,0) -#kernel /boot/kernel-genkernel-x86-3.8.13-gentoo root=/dev/sda3 -#initrd /boot/initramfs-genkernel-x86-3.8.13 - -# vim:ft=conf:
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
commit: 65be92768fab88a84a8cc05eea53fc9b67384c8b Author: Mikle Kolyada gentoo org> AuthorDate: Fri Feb 8 15:19:27 2019 + Commit: Mikle Kolyada gentoo org> CommitDate: Fri Feb 8 15:19:27 2019 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65be9276 sys-boot/grub: Drop grub:0 Signed-off-by: Mikle Kolyada gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 sys-boot/grub/Manifest | 4 - ...97-Add-esp-to-list-of-clobbered-registers.patch | 53 .../grub/files/grub-0.97-ncurses-pkgconfig.patch | 18 -- sys-boot/grub/grub-0.97-r16.ebuild | 293 --- sys-boot/grub/grub-0.97-r18.ebuild | 309 - sys-boot/grub/metadata.xml | 1 - 6 files changed, 678 deletions(-) diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest index 23837461cb9..106fa33c0a5 100644 --- a/sys-boot/grub/Manifest +++ b/sys-boot/grub/Manifest @@ -1,7 +1,3 @@ DIST dejavu-sans-ttf-2.37.zip 417746 BLAKE2B c8904f3cd5a49370a7dc10e456684c88aeae998a99090bf4d0a5baa4f36cc8fb8f70586cf6d610a5ffeee97261d28c80f55bbe9dcfc3ed796d5c2d60e79adb58 SHA512 ede5899daa1984c5aa8cacb1c850eb53f189dddef3d9bb78bf9774d8976b7c0d6eb0bcf86237cd7d11f5b36cf5b5058d42cd94d3bd76f2bd0931c7ceb1271fae -DIST grub-0.97-patches-1.14.tar.bz2 52916 BLAKE2B 49000402cbdc52bf2bfe31ccc36d0ebc8ba53a58e17bc3a798d3afe5ecec3cc79fb0bb7e786667b96993a7632484b3162e035c358e0fade20ddc2a1ec8e1b073 SHA512 d9a8d420fd5a36f181ca608f9b70be90f9d82cee66c8484636fda5085290586071b5d9379d917e8141b993ffc4777859cd02971c916d6167dca6f50d83282c26 -DIST grub-0.97-patches-1.15.tar.bz2 52887 BLAKE2B a571fe3b918cad590880a277df6ef1bdf094fbc11fd25b2dfb0d790a6b1b37839460475aebc3d6e4f09f59f969ab42dfd8e2b7472aba31c296ed5e03ba3f1030 SHA512 729a4b62bd04aca5b15b83e87b799e1c7e592a5a0265ec6b7a4f4d4ebde05e3e57b62fb6eed6ee1b7692d5dc43dd9ad65898332ff806557b62a7174a797c251a -DIST grub-0.97.tar.gz 971783 BLAKE2B a7b6feb6dddb6eeb20e027071091b2d37930e5b40687f8c8ff860839db208f832713db61389014d21842e1e152cad0466dc9722a79cbb81bfa1566a30b6b82cc SHA512 c2bc9ffc8583aeae71cee9ddcc4418969768d4e3764d47307da54f93981c0109fb07d84b061b3a3628bd00ba4d14a54742bc04848110eb3ae8ca25dbfbaabadb DIST grub-2.02.tar.xz 6113260 BLAKE2B 7c5ec61a8dc5a00e9cdc91c489f0d2ee37cd7e673eef8e8e26bbc18c5ec28829f563b9298874fb96d45a5d523ce366e936649c21ebda7462afda0cc328b970ce SHA512 cc6eb0a42b5c8df2f671cc128ff725afb3ff1f8832a196022e433cf0d3b75decfca2316d0aa5fabea75747d55e88f3d021dd93508563f8ca80fd7b9e7fe1f088 -DIST splash.xpm.gz 33856 BLAKE2B e8d0ee91a87ed45f47fa58b07a6476b19ddb3f98ffee41adce46fe9bc4926bbefcac5cd01efc41794049b1c905502b18e69b5f0546bcf3cea79bf351e1817574 SHA512 5ae1f786f7d46a95a7061068d5b2b3ad64607c7b190d6f28379508c5dce67e26308325bfd637542a84855dfcf1ea3d143947326fdb189a6a8972208d3ead23da DIST unifont-9.0.06.pcf.gz 1360354 BLAKE2B 09b96e1711c729ef159d62e3ea7b289ca2d01dc0ea417e35a18b73dc02a23f62ce7821d9761bceee4002d9eeaabd91cfb69bbacc6fbdfdfa00445d18fe8f1d66 SHA512 dd0a1afa72f5204c62055d83f22750c74af38ffafdb8eda8e1f1cf7292e572a14969b8a9a6a2cb336d5bed4ab633f6b5a962c59117a590e4238788959cb82774 diff --git a/sys-boot/grub/files/grub-0.97-Add-esp-to-list-of-clobbered-registers.patch b/sys-boot/grub/files/grub-0.97-Add-esp-to-list-of-clobbered-registers.patch deleted file mode 100644 index c550aabd616..000 --- a/sys-boot/grub/files/grub-0.97-Add-esp-to-list-of-clobbered-registers.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 5a52ee4b5cd152fa4ccd1c1f938ce2eba652af52 Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich -Date: Mon, 14 Dec 2015 23:59:17 + -Subject: [PATCH] Add %esp to list of clobbered registers - -GCC assumes that it can combine stacks from -outer -grub_stage2() -and inner -trampoline doit() -functions (optimisation -fcombine-stack-adjustments). - -But doit() function clobbers %esp in inline -assebly statement as: - - asm volatile ("movl %%esp, %0\n\tmovl %1, %%esp\n" - : "=" (realstack) : "r" (simstack)); - -which tricks gcc into computing invalid local variable -offsets from current %esp value. - -Fix by hinting gcc about %esp change in clobber list. - -Signed-off-by: Sergei Trofimovich - grub/asmstub.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/grub/asmstub.c b/grub/asmstub.c -index 6354806..44b056f 100644 a/grub/asmstub.c -+++ b/grub/asmstub.c -@@ -174,7 +174,7 @@ grub_stage2 (void) - { - /* Make sure our stack lives in the simulated memory area. */ - asm volatile ("movl %%esp, %0\n\tmovl %1, %%esp\n" -- : "=" (realstack) : "r" (simstack)); -+ : "=" (realstack) : "r" (simstack) : "%esp"); - - /* Do a setjmp here for the stop command. */ - if (! setjmp (env_for_exit)) -@@ -191,7 +191,7 @@ grub_stage2 (void) - } - - /* Replace our stack before we use any local variables. */ --
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
commit: bab479f78d08aaab25917e51f90b85e0ca5f42b4 Author: Mike Gilbert gentoo org> AuthorDate: Thu Sep 6 03:38:26 2018 + Commit: Mike Gilbert gentoo org> CommitDate: Thu Sep 6 03:38:26 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bab479f7 sys-boot/grub: fix build with gcc8 Closes: https://bugs.gentoo.org/662408 Package-Manager: Portage-2.3.49_p2, Repoman-2.3.10_p48 sys-boot/grub/files/2.02-gcc8.patch | 72 + sys-boot/grub/grub-2.02-r3.ebuild | 1 + 2 files changed, 73 insertions(+) diff --git a/sys-boot/grub/files/2.02-gcc8.patch b/sys-boot/grub/files/2.02-gcc8.patch new file mode 100644 index 000..51ee7dc86c2 --- /dev/null +++ b/sys-boot/grub/files/2.02-gcc8.patch @@ -0,0 +1,72 @@ +From 563b1da6e6ae7af46cc8354cadb5dab416989f0a Mon Sep 17 00:00:00 2001 +From: Michael Chang +Date: Mon, 26 Mar 2018 16:52:34 +0800 +Subject: Fix packed-not-aligned error on GCC 8 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When building with GCC 8, there are several errors regarding packed-not-aligned. + +./include/grub/gpt_partition.h:79:1: error: alignment 1 of ‘struct grub_gpt_partentry’ is less than 8 [-Werror=packed-not-aligned] + +This patch fixes the build error by cleaning up the ambiguity of placing +aligned structure in a packed one. In "struct grub_btrfs_time" and "struct +grub_gpt_part_type", the aligned attribute seems to be superfluous, and also +has to be packed, to ensure the structure is bit-to-bit mapped to the format +laid on disk. I think we could blame to copy and paste error here for the +mistake. In "struct efi_variable", we have to use grub_efi_packed_guid_t, as +the name suggests. :) + +Signed-off-by: Michael Chang +Tested-by: Michael Chang +Tested-by: Paul Menzel +Reviewed-by: Daniel Kiper +--- + grub-core/fs/btrfs.c | 2 +- + include/grub/efiemu/runtime.h | 2 +- + include/grub/gpt_partition.h | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c +index 4849c1c..be19544 100644 +--- a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c +@@ -175,7 +175,7 @@ struct grub_btrfs_time + { + grub_int64_t sec; + grub_uint32_t nanosec; +-} __attribute__ ((aligned (4))); ++} GRUB_PACKED; + + struct grub_btrfs_inode + { +diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h +index 9b6b729..36d2ded 100644 +--- a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h +@@ -29,7 +29,7 @@ struct grub_efiemu_ptv_rel + + struct efi_variable + { +- grub_efi_guid_t guid; ++ grub_efi_packed_guid_t guid; + grub_uint32_t namelen; + grub_uint32_t size; + grub_efi_uint32_t attributes; +diff --git a/include/grub/gpt_partition.h b/include/grub/gpt_partition.h +index 1b32f67..9668a68 100644 +--- a/include/grub/gpt_partition.h b/include/grub/gpt_partition.h +@@ -28,7 +28,7 @@ struct grub_gpt_part_type + grub_uint16_t data2; + grub_uint16_t data3; + grub_uint8_t data4[8]; +-} __attribute__ ((aligned(8))); ++} GRUB_PACKED; + typedef struct grub_gpt_part_type grub_gpt_part_type_t; + + #define GRUB_GPT_PARTITION_TYPE_EMPTY \ +-- +cgit v1.0-41-gc330 + diff --git a/sys-boot/grub/grub-2.02-r3.ebuild b/sys-boot/grub/grub-2.02-r3.ebuild index d4640dd767b..a2712785195 100644 --- a/sys-boot/grub/grub-2.02-r3.ebuild +++ b/sys-boot/grub/grub-2.02-r3.ebuild @@ -43,6 +43,7 @@ PATCHES=( "${FILESDIR}"/2.02-freetype-pkg-config.patch "${FILESDIR}"/2.02-xfs-sparse-inodes.patch "${FILESDIR}"/2.02-X86_64_PLT32.patch + "${FILESDIR}"/2.02-gcc8.patch ) DEJAVU=dejavu-sans-ttf-2.37
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
commit: b6db5c287b3e0a43f2254376e32ea6ffe8a45dcf Author: Mike Gilbert gentoo org> AuthorDate: Fri May 4 15:46:06 2018 + Commit: Mike Gilbert gentoo org> CommitDate: Fri May 4 15:50:03 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6db5c28 sys-boot/grub: use pkg-config to find freetype2 Bug: https://bugs.gentoo.org/654788 Package-Manager: Portage-2.3.31_p60, Repoman-2.3.9_p116 sys-boot/grub/files/2.02-freetype-pkg-config.patch | 73 ++ sys-boot/grub/grub-2.02-r1.ebuild | 14 - sys-boot/grub/grub-.ebuild | 12 +++- 3 files changed, 96 insertions(+), 3 deletions(-) diff --git a/sys-boot/grub/files/2.02-freetype-pkg-config.patch b/sys-boot/grub/files/2.02-freetype-pkg-config.patch new file mode 100644 index 000..bc2f91759be --- /dev/null +++ b/sys-boot/grub/files/2.02-freetype-pkg-config.patch @@ -0,0 +1,73 @@ +From 3b0a266dead87906bcf440fd9ef12e1a514320ab Mon Sep 17 00:00:00 2001 +From: Mike Gilbert+Date: Fri, 4 May 2018 13:43:59 +0200 +Subject: [PATCH] Use pkg-config to find freetype + +As of freetype-2.9.1 the freetype-config script has been deprecated and +is no longer shipped by default. + +Based on a patch by Lars Wendler . +--- + configure.ac | 27 +++ + 1 file changed, 19 insertions(+), 8 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c7888e40f..220f5ffc1 100644 +--- a/configure.ac b/configure.ac +@@ -1510,7 +1510,8 @@ fi + + if test x"$grub_mkfont_excuse" = x ; then + # Check for freetype libraries. +- AC_CHECK_TOOLS([FREETYPE], [freetype-config]) ++ PKG_PROG_PKG_CONFIG ++ PKG_CHECK_MODULES(FREETYPE2, freetype2, FREETYPE=yes) + if test "x$FREETYPE" = x ; then + grub_mkfont_excuse=["need freetype2 library"] + fi +@@ -1520,8 +1521,8 @@ unset ac_cv_header_ft2build_h + + if test x"$grub_mkfont_excuse" = x ; then + # Check for freetype libraries. +- freetype_cflags=`$FREETYPE --cflags` +- freetype_libs=`$FREETYPE --libs` ++ freetype_cflags="$FREETYPE2_CFLAGS" ++ freetype_libs="$FREETYPE2_LIBS" + SAVED_CPPFLAGS="$CPPFLAGS" + SAVED_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $freetype_cflags" +@@ -1573,16 +1574,26 @@ AC_SUBST([BUILD_WORDS_BIGENDIAN]) + + if test x"$grub_build_mkfont_excuse" = x ; then + # Check for freetype libraries. +- AC_CHECK_PROGS([BUILD_FREETYPE], [freetype-config]) +- if test "x$BUILD_FREETYPE" = x ; then +-grub_build_mkfont_excuse=["need freetype2 library"] ++ if test -z "$BUILD_FREETYPE2_CFLAGS" || test -z "$BUILD_FREETYPE2_LIBS" ; then ++AC_CHECK_PROGS([BUILD_PKGCONFIG], [pkg-config]) ++if test -z "$BUILD_PKGCONFIG" ; then ++ grub_build_mkfont_excuse=["need pkg-config"] ++elif ! "$BUILD_PKGCONFIG" --exists freetype2 ; then ++ grub_build_mkfont_excuse=["need freetype2 library"] ++fi + fi + fi + + if test x"$grub_build_mkfont_excuse" = x ; then + # Check for freetype libraries. +- build_freetype_cflags=`$BUILD_FREETYPE --cflags` +- build_freetype_libs=`$BUILD_FREETYPE --libs` ++ if test -z "$BUILD_FREETYPE2_CFLAGS" ; then ++BUILD_FREETYPE2_CFLAGS=`$BUILD_PKGCONFIG --cflags freetype2` ++ fi ++ if test -z "$BUILD_FREETYPE2_LIBS" ; then ++BUILD_FREETYPE2_LIBS=`$BUILD_PKGCONFIG --libs freetype2` ++ fi ++ build_freetype_cflags="$BUILD_FREETYPE2_CFLAGS" ++ build_freetype_libs="$BUILD_FREETYPE2_LIBS" + SAVED_CPPFLAGS_2="$CPPFLAGS" + SAVED_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $build_freetype_cflags" +-- +2.17.0 + diff --git a/sys-boot/grub/grub-2.02-r1.ebuild b/sys-boot/grub/grub-2.02-r1.ebuild index 7b3b5251bc1..a82ceccfbd2 100644 --- a/sys-boot/grub/grub-2.02-r1.ebuild +++ b/sys-boot/grub/grub-2.02-r1.ebuild @@ -5,12 +5,20 @@ EAPI=6 if [[ ${PV} == ]]; then GRUB_AUTOGEN=1 + GRUB_AUTORECONF=1 fi +# 2.02-grub-pkg-config.patch modifies configure.ac +GRUB_AUTORECONF=1 + if [[ -n ${GRUB_AUTOGEN} ]]; then PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} ) + inherit python-any-r1 +fi + +if [[ -n ${GRUB_AUTORECONF} ]]; then WANT_LIBTOOL=none - inherit autotools python-any-r1 + inherit autotools fi inherit autotools bash-completion-r1 flag-o-matic multibuild pax-utils toolchain-funcs versionator @@ -36,6 +44,7 @@ PATCHES=( "${FILESDIR}"/gfxpayload.patch "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch "${FILESDIR}"/2.02-multiple-early-initrd.patch + "${FILESDIR}"/2.02-freetype-pkg-config.patch ) DEJAVU=dejavu-sans-ttf-2.37 @@ -154,6 +163,9 @@ src_prepare() { if [[ -n ${GRUB_AUTOGEN} ]]; then python_setup bash autogen.sh || die + fi + + if [[ -n ${GRUB_AUTORECONF} ]]; then autopoint() { :; } eautoreconf fi diff --git a/sys-boot/grub/grub-.ebuild b/sys-boot/grub/grub-.ebuild index cc6db989c6e..d5bfc5ad9ac 100644
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/
commit: 208609c7322de4de86dd2e580dc92e842589493c Author: Michael Mair-Keimberger (asterix) gmail com> AuthorDate: Fri Aug 11 14:55:48 2017 + Commit: David Seifert gentoo org> CommitDate: Sun Aug 13 11:28:45 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=208609c7 sys-boot/grub: remove unused patches/files Closes: https://github.com/gentoo/gentoo/pull/5390 sys-boot/grub/files/2.02_beta3-10_linux-UUID.patch | 27 -- .../grub/files/2.02_beta3-gcc6-ld-no-pie.patch | 57 --- sys-boot/grub/files/2.02_beta3-sysmacros.patch | 107 - sys-boot/grub/files/CVE-2015-8370.patch| 54 --- .../grub/files/grub-2.02_beta2-lvm2-raid1.patch| 68 - sys-boot/grub/files/grub.cfg.example | 72 -- 6 files changed, 385 deletions(-) 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 deleted file mode 100644 index 1dcf3b5b781..000 --- a/sys-boot/grub/files/2.02_beta3-10_linux-UUID.patch +++ /dev/null @@ -1,27 +0,0 @@ -From ea8de5d2ee58178381e5809e4d5fe79861e61b04 Mon Sep 17 00:00:00 2001 -From: Mike Gilbert-Date: Sat, 5 Mar 2016 17:21:15 -0500 -Subject: [PATCH] [2.02] 10_linux: Fix grouping of tests for GRUB_DEVICE - -Commit 7290bb562 causes GRUB_DISABLE_LINUX_UUID to be ignored due to -mixing of || and && operators. Add some parens to help with that. - util/grub.d/10_linux.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 5a78513..de9044c 100644 a/util/grub.d/10_linux.in -+++ b/util/grub.d/10_linux.in -@@ -47,7 +47,7 @@ esac - # and mounting btrfs requires user space scanning, so force UUID in this case. - if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \ - || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \ --|| test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm; then -+|| ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then - LINUX_ROOT_DEVICE=${GRUB_DEVICE} - else - LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID} --- -2.7.2 - 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 deleted file mode 100644 index 0d814154478..000 --- a/sys-boot/grub/files/2.02_beta3-gcc6-ld-no-pie.patch +++ /dev/null @@ -1,57 +0,0 @@ -2016-05-21 Magnus Granberg - - #583042 sys-boot/grub-2.02_beta3-r1: building w/gcc-6[pie]: error: - x86_64-pc-linux-gnu/bin/ld: -r and -shared may not be used together - - * acinclude.m4: Add -no-pie check. - * configure.ac: Add -no-pie to TARGET_LDFLAGS if needed. - a/acinclude.m4 2015-11-11 20:56:52.0 +0100 -+++ b/acinclude.m4 2016-05-17 00:08:22.0 +0200 -@@ -390,6 +390,24 @@ else - [fi] - ]) - -+dnl Check if the Linker supports `-no-pie'. -+AC_DEFUN([grub_CHECK_NO_PIE], -+[AC_MSG_CHECKING([whether linker accepts -no-pie]) -+AC_CACHE_VAL(grub_cv_cc_ld_nopie, -+[save_LDFLAGS="$LDFLAGS" -+LDFLAGS="$LDFLAGS -no-pie" -+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])], -+ [grub_cv_cc_ld_no_pie=yes], -+ [grub_cv_cc_ld_no_pie=no]) -+LDFLAGS="$save_LDFLAGS" -+]) -+AC_MSG_RESULT([$grub_cv_cc_ld_no_pie]) -+nopie_possible=no -+if test "x$grub_cv_cc_ld_no_pie" = xyes ; then -+ nopie_possible=yes -+fi -+]) -+ - dnl Check if the C compiler supports `-fPIC'. - AC_DEFUN([grub_CHECK_PIC],[ - [# Position independent executable. a/configure.ac 2016-02-27 13:40:56.0 +0100 -+++ b/configure.ac 2016-05-17 00:57:29.47100 +0200 -@@ -1184,13 +1184,18 @@ CFLAGS="$TARGET_CFLAGS" - - # Position independent executable. - grub_CHECK_PIE -+grub_CHECK_NO_PIE - [# Need that, because some distributions ship compilers that include --# `-fPIE' in the default specs. -+# `-fPIE' and '-pie' in the default specs. - if [ x"$pie_possible" = xyes ]; then - TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE" -+fi -+if [ x"$nopie_possible" = xyes ] && [ x"$pie_possible" = xyes ]; then -+ TARGET_LDFLAGS="$TARGET_LDFLAGS -no-pie" - fi] - - CFLAGS="$TARGET_CFLAGS" -+LDFLAGS="$TARGET_LDFLAGS" - - # Position independent executable. - grub_CHECK_PIC diff --git a/sys-boot/grub/files/2.02_beta3-sysmacros.patch b/sys-boot/grub/files/2.02_beta3-sysmacros.patch deleted file mode 100644 index 8610f3a1a57..000 --- a/sys-boot/grub/files/2.02_beta3-sysmacros.patch +++ /dev/null @@ -1,107 +0,0 @@ -From 7a5b301e3adb8e054288518a325135a1883c1c6c Mon Sep 17 00:00:00 2001 -From: Mike Gilbert -Date: Tue, 19 Apr 2016 14:27:22 -0400 -Subject: [PATCH] build: Use AC_HEADER_MAJOR to find device macros - -Depending on the OS/libc, device macros are defined in different -headers. This change ensures we include the right one. - -sys/types.h -
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/
commit: c6647c7fa1140556799804693b013900bb57a5e1 Author: Michael Mair-Keimberger (asterix) gmail com> AuthorDate: Fri Feb 3 15:19:47 2017 + Commit: David Seifert gentoo org> CommitDate: Sat Feb 4 21:20:27 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6647c7f sys-boot/grub: remove unused patches/file Closes: https://github.com/gentoo/gentoo/pull/3791 sys-boot/grub/files/grub-2.00-freetype-2.5.1.patch | 24 --- sys-boot/grub/files/grub-2.02_beta2-libzfs.patch | 19 - sys-boot/grub/files/grub.default-2 | 46 -- 3 files changed, 89 deletions(-) diff --git a/sys-boot/grub/files/grub-2.00-freetype-2.5.1.patch b/sys-boot/grub/files/grub-2.00-freetype-2.5.1.patch deleted file mode 100644 index 286830c.. --- a/sys-boot/grub/files/grub-2.00-freetype-2.5.1.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit fd0df6d098b1e6a4f60275c48a3ec88d15ba1fbb -Author: Colin Watson-Date: Fri Nov 29 12:19:36 2013 + - -Fix build with FreeType 2.5.1 - -* util/grub-gen-asciih.c: Include FT_SYNTHESIS_H rather than -, fixing build with FreeType 2.5.1. -* util/grub-gen-widthspec.c: Likewise. -* util/grub-mkfont.c: Likewise. - -diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c -index 0d8eb78..242dd01 100644 a/util/grub-mkfont.c -+++ b/util/grub-mkfont.c -@@ -43,7 +43,7 @@ - #include FT_FREETYPE_H - #include FT_TRUETYPE_TAGS_H - #include FT_TRUETYPE_TABLES_H --#include -+#include FT_SYNTHESIS_H - - #undef __FTERRORS_H__ - #define FT_ERROR_START_LIST const char *ft_errmsgs[] = { diff --git a/sys-boot/grub/files/grub-2.02_beta2-libzfs.patch b/sys-boot/grub/files/grub-2.02_beta2-libzfs.patch deleted file mode 100644 index d76a903.. --- a/sys-boot/grub/files/grub-2.02_beta2-libzfs.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 6ba983559dcffa0fa69c7fc861b5a16b4877a92c -Author: Mike Gilbert -Date: Sat Jan 18 19:41:15 2014 +0100 - - * Makefile.util.def: Link grub-ofpathname with zfs libs. - -diff --git a/Makefile.util.def b/Makefile.util.def -index 83df212..a286a89 100644 a/Makefile.util.def -+++ b/Makefile.util.def -@@ -384,7 +384,7 @@ program = { - ldadd = libgrubgcry.a; - ldadd = libgrubkern.a; - ldadd = grub-core/gnulib/libgnu.a; -- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBGEOM)'; -+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)'; - }; - - program = { diff --git a/sys-boot/grub/files/grub.default-2 b/sys-boot/grub/files/grub.default-2 deleted file mode 100644 index 87594d2.. --- a/sys-boot/grub/files/grub.default-2 +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ -# -# To populate all changes in this file you need to regenerate your -# grub configuration file afterwards: -# 'grub2-mkconfig -o /boot/grub/grub.cfg' -# -# See the grub info page for documentation on possible variables and -# their associated values. - -GRUB_DISTRIBUTOR="Gentoo" - -GRUB_DEFAULT=0 -GRUB_HIDDEN_TIMEOUT=0 -GRUB_HIDDEN_TIMEOUT_QUIET=true -GRUB_TIMEOUT=10 - -# Append parameters to the linux kernel command line -# GRUB_CMDLINE_LINUX="" - -# Append parameters to the linux kernel command line for non-recovery entries -#GRUB_CMDLINE_LINUX_DEFAULT="" - -# Uncomment to disable graphical terminal (grub-pc only) -#GRUB_TERMINAL=console - -# The resolution used on graphical terminal. -# Note that you can use only modes which your graphic card supports via VBE. -# You can see them in real GRUB with the command `vbeinfo'. -#GRUB_GFXMODE=640x480 - -# Path to theme spec txt file. -# The starfield is by default provided with use truetype. -# NOTE: when enabling custom theme, ensure you have required font/etc. -#GRUB_THEME="/boot/grub/themes/starfield/theme.txt" - -# Background image used on graphical terminal. -# Can be in various bitmap formats. -#GRUB_BACKGROUND="/boot/grub/mybackground.png" - -# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel -#GRUB_DISABLE_LINUX_UUID=true - -# Uncomment to disable generation of recovery mode menu entries -#GRUB_DISABLE_RECOVERY=true
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/
commit: fcd0a7641b420e154d6075b203d51e74c268c0ff Author: Mike Gilbert gentoo org> AuthorDate: Wed Oct 5 19:34:34 2016 + Commit: Mike Gilbert gentoo org> CommitDate: Wed Oct 5 19:35:06 2016 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fcd0a764 sys-boot/grub: prune the more obscure examples sys-boot/grub/files/grub.cfg.example | 18 -- 1 file changed, 18 deletions(-) diff --git a/sys-boot/grub/files/grub.cfg.example b/sys-boot/grub/files/grub.cfg.example index 1a19929..583e1df 100644 --- a/sys-boot/grub/files/grub.cfg.example +++ b/sys-boot/grub/files/grub.cfg.example @@ -70,21 +70,3 @@ menuentry "FreeBSD" { set kFreeBSD.vfs.root.mountfrom=zfs:freepool/freebsd set kFreeBSD.hw.psm.synaptics_support=1 } - -menuentry "Fedora 16 installer" { - search --set=root --label GRUB --hint hd0,msdos5 - linux /fedora/vmlinuz lang=en_US keymap=sg resolution=1280x800 - initrd /fedora/initrd.img -} - -menuentry "Fedora rawhide installer" { - search --set=root --label GRUB --hint hd0,msdos5 - linux /fedora/vmlinuz repo=ftp://mirror.switch.ch/mirror/fedora/linux/development/rawhide/x86_64 lang=en_US keymap=sg resolution=1280x800 - initrd /fedora/initrd.img -} - -menuentry "Debian sid installer" { - search --set=root --label GRUB --hint hd0,msdos5 - linux /debian/dists/sid/main/installer-amd64/current/images/hd-media/vmlinuz - initrd /debian/dists/sid/main/installer-amd64/current/images/hd-media/initrd.gz -}
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/
commit: e201362dcb90bc23918d638bd0309ce7acc7fcbb Author: Mike Gilbert gentoo org> AuthorDate: Wed Oct 5 15:48:25 2016 + Commit: Mike Gilbert gentoo org> CommitDate: Wed Oct 5 15:48:47 2016 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e201362d sys-boot/grub: typo sys-boot/grub/files/grub.cfg.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-boot/grub/files/grub.cfg.example b/sys-boot/grub/files/grub.cfg.example index 4c6e464..1a19929 100644 --- a/sys-boot/grub/files/grub.cfg.example +++ b/sys-boot/grub/files/grub.cfg.example @@ -35,7 +35,7 @@ menuentry "Gentoo Linux 4.7.2" { #insmod btrfs insmod ext2 #insmod xfs - #inmod zfs + #insmod zfs # Search all block devices for a matching UUID (for /boot) search --set=root --fs-uuid 33d4013a-ec25-4462-a540-8078aeb8ed17
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
commit: fa02d3700e674800a25426dff1ee832ace2dfc72 Author: Mike Gilbert gentoo org> AuthorDate: Fri Mar 4 22:31:55 2016 + Commit: Mike Gilbert gentoo org> CommitDate: Fri Mar 4 22:32:57 2016 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa02d370 sys-boot/grub: Bump to 2.02_beta3 Package-Manager: portage-2.2.27_p64 sys-boot/grub/Manifest | 3 +++ sys-boot/grub/files/gfxpayload.patch | 29 ++ ...{grub--r1.ebuild => grub-2.02_beta3.ebuild} | 9 --- sys-boot/grub/grub--r1.ebuild | 9 --- 4 files changed, 44 insertions(+), 6 deletions(-) diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest index ae1a4a2..a3561c1 100644 --- a/sys-boot/grub/Manifest +++ b/sys-boot/grub/Manifest @@ -1,7 +1,10 @@ DIST dejavu-sans-ttf-2.34.zip 406977 SHA256 242e8c1cb2bdc7458bece02cca898f962c2bc919dcf67d97428149228290184d SHA512 dcd802b9c83cfa749b7542d0855eb1facb665a035af8c05f58830fce3ce37ba8d4a6f0353c07ae924c7fc25460d330b7312cbaffd34a2cb314a8e222de385c1b WHIRLPOOL d8b3289997cc39aca1c909ac1cae79727a19932f07b116a4a0bcc83e4a2f136d05d18c8ef2b05504a2f1f65eba85f93d61d52b0c913be7bb3e23f6a403eb6a82 +DIST dejavu-sans-ttf-2.35.zip 415463 SHA256 c629bce270e75b6234d5285a739cd186bebc27319993f4b1ea6beb3631810799 SHA512 23c24218da70b3a93fa8c72e8db972b2b881bf3f76056a9315e29162743a8edaf5b699e0a527de121ca5f9efe07243eaf15811db355dba8cca1b92bdd1210732 WHIRLPOOL e3436818e11dab0330bff1a129d1e6fbf670b06a362b353f7bd00388cf46790bde202f1f7dd67b03ad7f9ae7d76098a5a72bc5321f359c2138c4d42c0cebc2aa DIST grub-0.97-patches-1.14.tar.bz2 52916 SHA256 5c7ca31fd9b2123471daf2e46a1936c4044ad0c12e353d9d3d8c3f83a1c7a0e5 SHA512 d9a8d420fd5a36f181ca608f9b70be90f9d82cee66c8484636fda5085290586071b5d9379d917e8141b993ffc4777859cd02971c916d6167dca6f50d83282c26 WHIRLPOOL 60abd5087e85d9969784b9f5a100934606a76da03b665533d9d4d1d13f4e2d15de233a71e67a32d18a5fbfe128c2c8bf04c0d4451de24e6ca4fbd8dd862e23ea DIST grub-0.97.tar.gz 971783 SHA256 4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b SHA512 c2bc9ffc8583aeae71cee9ddcc4418969768d4e3764d47307da54f93981c0109fb07d84b061b3a3628bd00ba4d14a54742bc04848110eb3ae8ca25dbfbaabadb WHIRLPOOL 0ad7f5dc035e2a3ad5fd29b6388f06fd12a8cc694117b4cbd42b5302433aa522db23566222d35219fe17fb95edb5090553156198507f70208eda5d858fd52dd5 DIST grub-2.02_beta2-gentoo-r3.tar.xz 14532 SHA256 78d14f27ed60458601021d13c247387dad324d4141ed46721e2e14f4a4fda990 SHA512 b46390c217e9a1f9fccbefbc5aab062c228919b9b7b6f16effd9d292534c516a28747376d85d5db8b7f883cf7e8c2aa0ca6573e8ed2913aadabbc1cd795fc861 WHIRLPOOL acb6d2e39e1670a4342e21e6d35ab390e36557512784a8ee0b5bda051ec5fb633061a28d2a2deab8c3d1961052db6c3870742ff866e292d8e4c0fd3c7a0acf45 DIST grub-2.02~beta2.tar.xz 5798740 SHA256 f6c702b2a8ea58f27a2b02928bb77973cb5a827af08f63db38c471c0a01b418d SHA512 359903928febce1df53b3bd38aab701b4ea010dfad0dee434e853c865af4bbc60d115e61eac100c79f18d89aa78b2216ef20123f4ef04cc948ecbe226ea1a58c WHIRLPOOL f92e94f43888648484a972a0c82b0a2ac4dc7fbdd6e35ca8b11a6ee92168ac8cf7ee68987b84697ec46ad18189e5c5c9aee8105b91bb131cd7f6f499f45cd58f +DIST grub-2.02~beta3.tar.xz 6030784 SHA256 30ec3d555e52a702c3eef449872ef874eff28b320f40b55ffc47f70db8e5ada1 SHA512 4a530efef4dae45f4046cf3550563f14acb24d25cb88d5e06c93953ca5b1eec115118c6860233a9f627edcddae2571e5d6b867b70ff9dd5c184c9fef83ef7e11 WHIRLPOOL b1042c24060e35ea5a492b7258b147fde80c949c2e81dcff3a31750966b7d31cdb62e1492274843f313226d70b202a8edbf08d11c5e79e4173a4c373879e4aad DIST splash.xpm.gz 33856 SHA256 b95600f777331b0dd31d51c68f60f0e846e4c8b628857a41165f4e6b30e6acaf SHA512 5ae1f786f7d46a95a7061068d5b2b3ad64607c7b190d6f28379508c5dce67e26308325bfd637542a84855dfcf1ea3d143947326fdb189a6a8972208d3ead23da WHIRLPOOL d95b7b588ea8ac7c2c8c53eb8057aef21c825da6411afe3b7e864c606aeffaaebce8ae41ce3e979f277bd6b48a9e82a1f2ea8afc836213b56523d8a854227d7b DIST unifont-7.0.06.pcf.gz 1359006 SHA256 acf516b464928244c25dd1afddd02f6f459686b5135685694d875d7eca8bf4f2 SHA512 a62f21366b51a582d2b5a66710c8a6183bc869407867da78e59ecec9dabcff7a2522a8bc454cf511592d336befea812d36622589ef119160fe3014d927fa11b3 WHIRLPOOL 9f431f9b6af23a87e3291e5c66d6f1e56f8c8ce23222821dbf41aa03edac4d80e8e6c5895c024951cf199d41904e6c9f830103427568a9b0386f68adc0a959d7 +DIST unifont-8.0.01.pcf.gz 1359487 SHA256 28c3f7ffe986e611a42f3d209e1f7730669e2e317b6913510746a77fa6f0ed56 SHA512 8a2872a389bb6e1bb4badf8bbe717c4fff632fed53baaea018b7b277c2b88678df485bcd0663a8b1ec76a344e04a3a1cd9de24b7f953ffd9d58844eef029bbc8 WHIRLPOOL 33433d9cfc2fedc9969fa438be4ceaaf2ebc3801424ca247f5dd448607f45e7b9cb503a11ba72e76cf4608142161268c0b078ea65bfa970595f571c807ad6ae8 diff --git a/sys-boot/grub/files/gfxpayload.patch b/sys-boot/grub/files/gfxpayload.patch new file mode 100644 index 000..6c63ef8 --- /dev/null +++ b/sys-boot/grub/files/gfxpayload.patch @@ -0,0 +1,29 @@ +From e2d5bf1bc6beba538c1ca94ea8601e4e1474 Mon Sep 17
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
commit: d05d046b70a1f469c42ad26ce35140d6a4bbd800 Author: Robin H. Johnson gentoo org> AuthorDate: Fri Jan 1 00:47:39 2016 + Commit: Robin H. Johnson gentoo org> CommitDate: Fri Jan 1 00:47:39 2016 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d05d046b sys-boot/grub: backport LVM fix & configurable kernel globs - Backport upstream LVM RAID1 fix - GRUB_LINUX_KERNEL_GLOBS to tweak globs for finding kernels Package-Manager: portage-2.2.24 .../grub/files/grub-2.02_beta2-KERNEL_GLOBS.patch | 67 + .../grub/files/grub-2.02_beta2-lvm2-raid1.patch| 68 + sys-boot/grub/grub-2.02_beta2-r9.ebuild| 324 + 3 files changed, 459 insertions(+) diff --git a/sys-boot/grub/files/grub-2.02_beta2-KERNEL_GLOBS.patch b/sys-boot/grub/files/grub-2.02_beta2-KERNEL_GLOBS.patch new file mode 100644 index 000..c66ee68 --- /dev/null +++ b/sys-boot/grub/files/grub-2.02_beta2-KERNEL_GLOBS.patch @@ -0,0 +1,67 @@ +From 43e3295aaad5278a1e53c5282e2660b72cd76d28 Mon Sep 17 00:00:00 2001 +From: "Robin H. Johnson"+Date: Tue, 29 Dec 2015 15:29:14 -0800 +Subject: [PATCH] GRUB_LINUX_KERNEL_GLOBS: configurable kernel selection + +* util/grub.d/10_linux.in: Implement GRUB_LINUX_KERNEL_GLOBS +* docs/grub.texi: Document GRUB_LINUX_KERNEL_GLOBS + +Signed-off-by: Robin H. Johnson +--- + docs/grub.texi | 5 + + util/grub.d/10_linux.in | 21 +++-- + 2 files changed, 16 insertions(+), 10 deletions(-) + +diff --git a/docs/grub.texi b/docs/grub.texi +index 9a25a0b..d1129ec 100644 +--- a/docs/grub.texi b/docs/grub.texi +@@ -1490,6 +1490,11 @@ This option may be set to a list of GRUB module names separated by spaces. + Each module will be loaded as early as possible, at the start of + @file{grub.cfg}. + ++@item GRUB_LINUX_KERNEL_GLOBS ++This option may be set to override the list of path globs used to find Linux ++kernels. The defaults vary by architecture, and generally include both ++@file{/boot} and @file{/}. ++ + @end table + + The following options are still accepted for compatibility with existing +diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in +index 859b608..e5ac11d 100644 +--- a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in +@@ -145,18 +145,19 @@ EOF + } + + machine=`uname -m` +-case "x$machine" in ++globs="$GRUB_LINUX_KERNEL_GLOBS" ++[ -z "$globs" ] && case "x$machine" in + xi?86 | xx86_64) +- list= +- for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do +- if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi +- done ;; +-*) +- list= +- for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do +- if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi +- done ;; ++ globs="/boot/vmlinuz-* /vmlinuz-* /boot/kernel-*" ++ ;; ++*) ++ globs="/boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-*" ++ ;; + esac ++list= ++for i in ${globs} ; do ++if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi ++done + + case "$machine" in + i?86) GENKERNEL_ARCH="x86" ;; +-- +2.3.0 + 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 new file mode 100644 index 000..76c72a6 --- /dev/null +++ b/sys-boot/grub/files/grub-2.02_beta2-lvm2-raid1.patch @@ -0,0 +1,68 @@ +From: Andrei Borzenkov +Date: Thu, 19 Mar 2015 18:30:27 + (+0300) +Subject: core: add LVM RAID1 support +X-Git-Url: http://git.savannah.gnu.org/gitweb/?p=grub.git;a=commitdiff_plain;h=527ee6c8d3d8e3bb1fac408d47bb1dcbec95;hp=7c9309e50a124817e67de38b30c6291acecad560 + +core: add LVM RAID1 support + +Closes 44534. +--- + +diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c +index 1e7f197..9b97004 100644 +--- a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c +@@ -577,13 +577,17 @@ grub_lvm_detect (grub_disk_t disk, + if (is_pvmove) + seg->node_count = 1; + } +-else if (grub_memcmp (p, "raid", sizeof ("raid") - 1) +- == 0 && (p[sizeof ("raid") - 1] >= '4' +- && p[sizeof ("raid") - 1] <= '6') ++else if (grub_memcmp (p, "raid", sizeof ("raid") - 1) == 0 ++ && ((p[sizeof ("raid") - 1] >= '4' ++ && p[sizeof ("raid") - 1] <= '6') ++ || p[sizeof ("raid") - 1] == '1') + && p[sizeof ("raidX") - 1] == '"') + { + switch (p[sizeof ("raid") - 1]) + { ++ case '1': ++seg->type = GRUB_DISKFILTER_MIRROR; ++break; + case '4': +
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/
commit: 27cb6e8ce5f9c2faea0b4a39887d5d937b6107ef Author: Mike Gilbert gentoo org> AuthorDate: Fri Dec 18 17:00:47 2015 + Commit: Mike Gilbert gentoo org> CommitDate: Fri Dec 18 17:00:47 2015 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27cb6e8c sys-boot/grub: Replace patch for CVE-2015-8370 Use what actually got accepted upstream. Package-Manager: portage-2.2.26_p32 sys-boot/grub/files/CVE-2015-8370.patch | 57 +++-- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/sys-boot/grub/files/CVE-2015-8370.patch b/sys-boot/grub/files/CVE-2015-8370.patch index 5701b54..69e419e 100644 --- a/sys-boot/grub/files/CVE-2015-8370.patch +++ b/sys-boot/grub/files/CVE-2015-8370.patch @@ -1,45 +1,54 @@ -From 88c9657960a6c5d3673a25c266781e876c181add Mon Sep 17 00:00:00 2001 +From 451d80e52d851432e109771bb8febafca7a5f1f2 Mon Sep 17 00:00:00 2001 From: Hector Marco-Gisbert-Date: Fri, 13 Nov 2015 16:21:09 +0100 +Date: Wed, 16 Dec 2015 07:57:18 +0300 Subject: [PATCH] Fix security issue when reading username and password - This patch fixes two integer underflows at: -* grub-core/lib/crypto.c -* grub-core/normal/auth.c +This patch fixes two integer underflows at: + * grub-core/lib/crypto.c + * grub-core/normal/auth.c + +CVE-2015-8370 Signed-off-by: Hector Marco-Gisbert Signed-off-by: Ismael Ripoll-Ripoll +Also-By: Andrey Borzenkov --- - grub-core/lib/crypto.c | 2 +- - grub-core/normal/auth.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + grub-core/lib/crypto.c | 3 ++- + grub-core/normal/auth.c | 7 +-- + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c -index 010e550..524a3d8 100644 +index 010e550..683a8aa 100644 --- a/grub-core/lib/crypto.c +++ b/grub-core/lib/crypto.c -@@ -468,7 +468,7 @@ grub_password_get (char buf[], unsigned buf_size) - break; - } +@@ -470,7 +470,8 @@ grub_password_get (char buf[], unsigned buf_size) -- if (key == '\b') -+ if (key == '\b' && cur_len) + if (key == '\b') { - cur_len--; +-cur_len--; ++if (cur_len) ++ cur_len--; continue; + } + diff --git a/grub-core/normal/auth.c b/grub-core/normal/auth.c -index c6bd96e..5782ec5 100644 +index c6bd96e..8615c48 100644 --- a/grub-core/normal/auth.c +++ b/grub-core/normal/auth.c -@@ -172,7 +172,7 @@ grub_username_get (char buf[], unsigned buf_size) - break; - } +@@ -174,8 +174,11 @@ grub_username_get (char buf[], unsigned buf_size) -- if (key == '\b') -+ if (key == '\b' && cur_len) + if (key == '\b') { - cur_len--; - grub_printf ("\b"); +-cur_len--; +-grub_printf ("\b"); ++if (cur_len) ++ { ++cur_len--; ++grub_printf ("\b"); ++ } + continue; + } + -- -1.9.1 +2.6.4
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
commit: bd30d0f89ca44bffd2b7d9c09bee4821f6ebee93 Author: Ian Stakenvicius gentoo org> AuthorDate: Thu Dec 17 17:13:57 2015 + Commit: Ian Stakenvicius gentoo org> CommitDate: Fri Dec 18 20:42:31 2015 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd30d0f8 sys-boot/grub:0 - use pkg-config to determine ncurses libs, bug 550132 When ncurses is built with USE=tinfo, additional libs are needed due to --as-needed linking that are not included in the current AC_CHECK_LIB based config, nor would be easily detectable without pkg-config. Package-Manager: portage-2.2.24 sys-boot/grub/files/grub-0.97-ncurses-pkgconfig.patch | 18 ++ sys-boot/grub/grub-0.97-r17.ebuild| 2 ++ 2 files changed, 20 insertions(+) diff --git a/sys-boot/grub/files/grub-0.97-ncurses-pkgconfig.patch b/sys-boot/grub/files/grub-0.97-ncurses-pkgconfig.patch new file mode 100644 index 000..d62e434 --- /dev/null +++ b/sys-boot/grub/files/grub-0.97-ncurses-pkgconfig.patch @@ -0,0 +1,18 @@ +--- a/configure.ac 2015-12-17 11:09:56.807893315 -0500 b/configure.ac 2015-12-17 11:11:06.697570856 -0500 +@@ -234,10 +234,14 @@ + + # Unless the user specify --without-curses, check for curses. + if test "x$with_curses" != "xno"; then ++ PKG_CHECK_MODULES([NCURSES],[ncurses],[ ++AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library]) ++GRUB_LIBS="$GRUB_LIBS $NCURSES_LIBS" ++ ],[ + AC_CHECK_LIB(ncurses, wgetch, [GRUB_LIBS="$GRUB_LIBS -lncurses" + AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])], + [AC_CHECK_LIB(curses, wgetch, [GRUB_LIBS="$GRUB_LIBS -lcurses" +- AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])])]) ++ AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])])])]) + fi + + AC_SUBST(GRUB_LIBS) diff --git a/sys-boot/grub/grub-0.97-r17.ebuild b/sys-boot/grub/grub-0.97-r17.ebuild index 3b19b8e..790e6b2 100644 --- a/sys-boot/grub/grub-0.97-r17.ebuild +++ b/sys-boot/grub/grub-0.97-r17.ebuild @@ -36,6 +36,7 @@ IUSE="custom-cflags ncurses netboot static" LIB_DEPEND="ncurses? ( >=sys-libs/ncurses-5.9-r3:0[static-libs(+),abi_x86_32(-)] )" RDEPEND="!static? ( ${LIB_DEPEND//[static-libs(+),/=[} )" DEPEND="${RDEPEND} + virtual/pkgconfig static? ( ${LIB_DEPEND} )" pkg_setup() { @@ -69,6 +70,7 @@ src_prepare() { EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch # bug 564890, 566638 epatch "${FILESDIR}"/grub-0.97-Add-esp-to-list-of-clobbered-registers.patch + epatch "${FILESDIR}"/grub-0.97-ncurses-pkgconfig.patch rm -f "${S}"/aclocal.m4 # seems to keep bug 418287 away eautoreconf
[gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
commit: 9236cac3ad29a31f428157026801827d58c3b8a3 Author: Ian Stakenvicius gentoo org> AuthorDate: Tue Dec 15 17:05:11 2015 + Commit: Ian Stakenvicius gentoo org> CommitDate: Tue Dec 15 17:05:36 2015 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9236cac3 sys-boot/grub:0 - Properly fix misoptimization by -fcombine-stack-adjustmemts (gcc-4.9+) GCC assumes that it can combine stacks from outer "grub_stage2()" and inner trampoline "doit()" functions (optimisation -fcombine-stack-adjustments). But doit() function clobbers %esp in inline assebly statement as: asm volatile ("movl %%esp, %0\n\tmovl %1, %%esp\n" : "=" (realstack) : "r" (simstack)); which tricks gcc into computing invalid local variable offsets from current %esp value. Fix by hinting gcc about %esp change in clobber list. Thanks to slyfox for his debugging and patch! This properly fixes bug 564890, allowing for the -O0 hack to be removed. Package-Manager: portage-2.2.24 ...97-Add-esp-to-list-of-clobbered-registers.patch | 53 sys-boot/grub/grub-0.97-r17.ebuild | 289 + 2 files changed, 342 insertions(+) diff --git a/sys-boot/grub/files/grub-0.97-Add-esp-to-list-of-clobbered-registers.patch b/sys-boot/grub/files/grub-0.97-Add-esp-to-list-of-clobbered-registers.patch new file mode 100644 index 000..c550aab --- /dev/null +++ b/sys-boot/grub/files/grub-0.97-Add-esp-to-list-of-clobbered-registers.patch @@ -0,0 +1,53 @@ +From 5a52ee4b5cd152fa4ccd1c1f938ce2eba652af52 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich+Date: Mon, 14 Dec 2015 23:59:17 + +Subject: [PATCH] Add %esp to list of clobbered registers + +GCC assumes that it can combine stacks from +outer +grub_stage2() +and inner +trampoline doit() +functions (optimisation -fcombine-stack-adjustments). + +But doit() function clobbers %esp in inline +assebly statement as: + + asm volatile ("movl %%esp, %0\n\tmovl %1, %%esp\n" + : "=" (realstack) : "r" (simstack)); + +which tricks gcc into computing invalid local variable +offsets from current %esp value. + +Fix by hinting gcc about %esp change in clobber list. + +Signed-off-by: Sergei Trofimovich +--- + grub/asmstub.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/grub/asmstub.c b/grub/asmstub.c +index 6354806..44b056f 100644 +--- a/grub/asmstub.c b/grub/asmstub.c +@@ -174,7 +174,7 @@ grub_stage2 (void) + { + /* Make sure our stack lives in the simulated memory area. */ + asm volatile ("movl %%esp, %0\n\tmovl %1, %%esp\n" +- : "=" (realstack) : "r" (simstack)); ++ : "=" (realstack) : "r" (simstack) : "%esp"); + + /* Do a setjmp here for the stop command. */ + if (! setjmp (env_for_exit)) +@@ -191,7 +191,7 @@ grub_stage2 (void) + } + + /* Replace our stack before we use any local variables. */ +- asm volatile ("movl %0, %%esp\n" : : "r" (realstack)); ++ asm volatile ("movl %0, %%esp\n" : : "r" (realstack) : "%esp"); + } + + assert (grub_scratch_mem == 0); +-- +2.6.3 + diff --git a/sys-boot/grub/grub-0.97-r17.ebuild b/sys-boot/grub/grub-0.97-r17.ebuild new file mode 100644 index 000..3b19b8e --- /dev/null +++ b/sys-boot/grub/grub-0.97-r17.ebuild @@ -0,0 +1,289 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# XXX: we need to review menu.lst vs grub.conf handling. We've been converting +# all systems to grub.conf (and symlinking menu.lst to grub.conf), but +# we never updated any of the source code (it still all wants menu.lst), +# and there is no indication that upstream is making the transition. + +# If you need to roll a new grub-static distfile, here is how. +# - Robin H. Johnson - 29 Nov 2010 +# FEATURES='-noauto -noinfo -nodoc -noman -splitdebug nostrip' \ +# USE='static -ncurses -netboot -custom-cflags' \ +# PORTAGE_COMPRESS=true GRUB_STATIC_PACKAGE_BUILDING=1 ebuild \ +# grub-${PVR}.ebuild clean package && \ +# qtbz2 -s -j ${PKGDIR}/${CAT}/${PF}.tbz2 && \ +# mv ${PF}.tar.bz2 ${DISTDIR}/grub-static-${PVR}.tar.bz2 + +EAPI="5" + +inherit eutils mount-boot toolchain-funcs linux-info flag-o-matic autotools pax-utils multiprocessing + +PATCHVER="1.14" # Should match the revision ideally +DESCRIPTION="GNU GRUB Legacy boot loader" +HOMEPAGE="https://www.gnu.org/software/grub/; +SRC_URI="mirror://gentoo/${P}.tar.gz + mirror://gnu-alpha/${PN}/${P}.tar.gz + mirror://gentoo/splash.xpm.gz + mirror://gentoo/${P}-patches-${PATCHVER}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~x86-fbsd" +IUSE="custom-cflags ncurses netboot static" + +LIB_DEPEND="ncurses? ( >=sys-libs/ncurses-5.9-r3:0[static-libs(+),abi_x86_32(-)] )" +RDEPEND="!static? ( ${LIB_DEPEND//[static-libs(+),/=[} )"