* [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2015-12-18 20:45 Ian Stakenvicius
0 siblings, 0 replies; 12+ messages in thread
From: Ian Stakenvicius @ 2015-12-18 20:45 UTC (permalink / raw
To: gentoo-commits
commit: bd30d0f89ca44bffd2b7d9c09bee4821f6ebee93
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 17 17:13:57 2015 +0000
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Fri Dec 18 20:42:31 2015 +0000
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 0000000..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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2024-03-01 16:58 Andrew Ammerlaan
0 siblings, 0 replies; 12+ messages in thread
From: Andrew Ammerlaan @ 2024-03-01 16:58 UTC (permalink / raw
To: gentoo-commits
commit: f879895488b938b704ebbde3f444df3d3cce8a0a
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 1 15:32:13 2024 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Fri Mar 1 16:58:09 2024 +0000
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 <andrewammerlaan <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/35588
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> 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-9999.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 000000000000..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-9999.ebuild b/sys-boot/grub/grub-9999.ebuild
index 0ba8261571a5..44bb51e767ee 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-9999.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} )
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2023-09-11 1:49 Mike Gilbert
0 siblings, 0 replies; 12+ messages in thread
From: Mike Gilbert @ 2023-09-11 1:49 UTC (permalink / raw
To: gentoo-commits
commit: 070361537d8ace58dd617b3520c0e2751e1f5574
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 11 01:48:19 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Sep 11 01:48:19 2023 +0000
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 <floppym <AT> 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 000000000000..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 <ardb@kernel.org>
+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 <ardb@kernel.org>
+Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
+---
+ 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 & 0xffff) != 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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2023-07-09 22:42 Mike Gilbert
0 siblings, 0 replies; 12+ messages in thread
From: Mike Gilbert @ 2023-07-09 22:42 UTC (permalink / raw
To: gentoo-commits
commit: d69213cd70673f5fb9460ef89215fe04f8b31653
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 9 22:41:33 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Jul 9 22:41:33 2023 +0000
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 <floppym <AT> 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 000000000000..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 <mchang@suse.com>
+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 <mchang@suse.com>
+Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
+---
+ 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 <mail@eworm.de>
+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 <mail@eworm.de>
+Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
+---
+ 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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2021-09-23 18:49 Mike Gilbert
0 siblings, 0 replies; 12+ messages in thread
From: Mike Gilbert @ 2021-09-23 18:49 UTC (permalink / raw
To: gentoo-commits
commit: abe655fe66964de0a45e8d0c158bdf3958cdfd1c
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 23 18:47:53 2021 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Sep 23 18:47:53 2021 +0000
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 <floppym <AT> 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 00000000000..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 <mchang@suse.com>
+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 [0000000000400158,0000000000400187] overlaps section .bss VMA [000000000000f000,000000000041e1af]
+
+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 <mchang@suse.com>
+---
+ 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} == 9999 ]]; 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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2021-04-21 15:43 Mike Gilbert
0 siblings, 0 replies; 12+ messages in thread
From: Mike Gilbert @ 2021-04-21 15:43 UTC (permalink / raw
To: gentoo-commits
commit: 6daa5197e9a530c71e1e78d25c1ffb356f78c972
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 21 15:41:38 2021 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Apr 21 15:41:38 2021 +0000
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 <floppym <AT> 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..00000000000
--- 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 <jrtc27@jrtc27.com>
-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 <jrtc27@jrtc27.com>
-Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
-Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
-Reviewed-by: Eric Snowberg <eric.snowberg@oracle.com>
-
----
- 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..00000000000
--- 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} == 9999 ]]; 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 pax-utils toolchain-funcs
-
-if [[ ${PV} != 9999 ]]; then
- if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then
- # The quote style is to work with <=bash-4.2 and >=bash-4.3 #503860
- MY_P=${P/_/'~'}
- SRC_URI="https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz"
- S=${WORKDIR}/${MY_P}
- else
- SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
- S=${WORKDIR}/${P%_*}
- fi
- KEYWORDS="amd64 ~arm arm64 ~ia64 ppc ppc64 x86"
-else
- inherit git-r3
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/grub.git"
-fi
-
-PATCHES=(
- "${FILESDIR}"/gfxpayload.patch
- "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch
- "${FILESDIR}"/2.04-sparc64-bios-boot.patch
-)
-
-DEJAVU=dejavu-sans-ttf-2.37
-UNIFONT=unifont-12.1.02
-SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz )
- themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )"
-
-DESCRIPTION="GNU GRUB boot loader"
-HOMEPAGE="https://www.gnu.org/software/grub/"
-
-# Includes licenses for dejavu and unifont
-LICENSE="GPL-3+ BSD MIT fonts? ( GPL-2-with-font-exception ) themes? ( CC-BY-SA-3.0 BitstreamVera )"
-SLOT="2/${PVR}"
-IUSE="device-mapper doc efiemu +fonts mount nls sdl test +themes truetype libzfs"
-
-GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot qemu qemu-mips pc uboot xen xen-32 xen-pvh )
-IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
-
-REQUIRED_USE="
- grub_platforms_coreboot? ( fonts )
- grub_platforms_qemu? ( fonts )
- grub_platforms_ieee1275? ( fonts )
- grub_platforms_loongson? ( fonts )
-"
-
-BDEPEND="
- ${PYTHON_DEPS}
- app-misc/pax-utils
- sys-devel/flex
- sys-devel/bison
- sys-apps/help2man
- sys-apps/texinfo
- fonts? (
- media-libs/freetype:2
- virtual/pkgconfig
- )
- test? (
- app-admin/genromfs
- app-arch/cpio
- app-arch/lzop
- app-emulation/qemu
- dev-libs/libisoburn
- sys-apps/miscfiles
- sys-block/parted
- sys-fs/squashfs-tools
- )
- themes? (
- app-arch/unzip
- media-libs/freetype:2
- virtual/pkgconfig
- )
- truetype? ( virtual/pkgconfig )
-"
-DEPEND="
- app-arch/xz-utils
- >=sys-libs/ncurses-5.2-r5:0=
- grub_platforms_emu? (
- sdl? ( media-libs/libsdl )
- )
- device-mapper? ( >=sys-fs/lvm2-2.02.45 )
- libzfs? ( sys-fs/zfs:= )
- mount? ( sys-fs/fuse:0 )
- truetype? ( media-libs/freetype:2= )
- ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 )
- ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 )
-"
-RDEPEND="${DEPEND}
- kernel_linux? (
- grub_platforms_efi-32? ( sys-boot/efibootmgr )
- grub_platforms_efi-64? ( sys-boot/efibootmgr )
- )
- !sys-boot/grub:0 !sys-boot/grub-static
- nls? ( sys-devel/gettext )
-"
-
-RESTRICT="!test? ( test )"
-
-QA_EXECSTACK="usr/bin/grub-emu* usr/lib/grub/*"
-QA_PRESTRIPPED="usr/lib/grub/.*"
-QA_MULTILIB_PATHS="usr/lib/grub/.*"
-QA_WX_LOAD="usr/lib/grub/*"
-
-src_unpack() {
- if [[ ${PV} == 9999 ]]; then
- git-r3_src_unpack
- pushd "${P}" >/dev/null || die
- local GNULIB_URI="https://git.savannah.gnu.org/git/gnulib.git"
- local GNULIB_REVISION=$(source bootstrap.conf >/dev/null; echo "${GNULIB_REVISION}")
- git-r3_fetch "${GNULIB_URI}" "${GNULIB_REVISION}"
- git-r3_checkout "${GNULIB_URI}" gnulib
- popd >/dev/null || die
- fi
- default
-}
-
-src_prepare() {
- default
-
- sed -i -e /autoreconf/d autogen.sh || die
-
- # Nothing in Gentoo packages 'american-english' in the exact path
- # wanted for the test, but all that is needed is a compressible text
- # file, and we do have 'words' from miscfiles in the same path.
- sed -i \
- -e '/CFILESSRC.*=/s,american-english,words,' \
- tests/util/grub-fs-tester.in \
- || die
-
- if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then
- python_setup
- fi
-
- if [[ -n ${GRUB_BOOTSTRAP} ]]; then
- eautopoint --force
- AUTOPOINT=: AUTORECONF=: ./bootstrap || die
- elif [[ -n ${GRUB_AUTOGEN} ]]; then
- ./autogen.sh || die
- fi
-
- if [[ -n ${GRUB_AUTORECONF} ]]; then
- eautoreconf
- fi
-}
-
-grub_do() {
- multibuild_foreach_variant run_in_build_dir "$@"
-}
-
-grub_do_once() {
- multibuild_for_best_variant run_in_build_dir "$@"
-}
-
-grub_configure() {
- local platform
-
- case ${MULTIBUILD_VARIANT} in
- efi*) platform=efi ;;
- xen-pvh) platform=xen_pvh ;;
- xen*) platform=xen ;;
- guessed) ;;
- *) platform=${MULTIBUILD_VARIANT} ;;
- esac
-
- case ${MULTIBUILD_VARIANT} in
- *-32)
- if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then
- local CTARGET=i386
- fi ;;
- *-64)
- if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then
- local CTARGET=x86_64
- local -x TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
- local -x TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
- fi ;;
- esac
-
- local myeconfargs=(
- --disable-werror
- --program-prefix=
- --libdir="${EPREFIX}"/usr/lib
- $(use_enable device-mapper)
- $(use_enable mount grub-mount)
- $(use_enable nls)
- $(use_enable themes grub-themes)
- $(use_enable truetype grub-mkfont)
- $(use_enable libzfs)
- $(use_enable sdl grub-emu-sdl)
- ${platform:+--with-platform=}${platform}
-
- # Let configure detect this where supported
- $(usex efiemu '' '--disable-efiemu')
- )
-
- if use fonts; then
- ln -rs "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
- fi
-
- if use themes; then
- ln -rs "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
- fi
-
- local ECONF_SOURCE="${S}"
- econf "${myeconfargs[@]}"
-}
-
-src_configure() {
- # Bug 508758.
- replace-flags -O3 -O2
-
- # We don't want to leak flags onto boot code.
- export HOST_CCASFLAGS=${CCASFLAGS}
- export HOST_CFLAGS=${CFLAGS}
- export HOST_CPPFLAGS=${CPPFLAGS}
- export HOST_LDFLAGS=${LDFLAGS}
- unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
-
- tc-ld-disable-gold #439082 #466536 #526348
- export TARGET_LDFLAGS="${TARGET_LDFLAGS} ${LDFLAGS}"
- unset LDFLAGS
-
- tc-export CC NM OBJCOPY RANLIB STRIP
- tc-export BUILD_CC # Bug 485592
-
- MULTIBUILD_VARIANTS=()
- local p
- for p in "${GRUB_ALL_PLATFORMS[@]}"; do
- use "grub_platforms_${p}" && MULTIBUILD_VARIANTS+=( "${p}" )
- done
- [[ ${#MULTIBUILD_VARIANTS[@]} -eq 0 ]] && MULTIBUILD_VARIANTS=( guessed )
- grub_do grub_configure
-}
-
-src_compile() {
- # Sandbox bug 404013.
- use libzfs && addpredict /etc/dfs:/dev/zfs
-
- grub_do emake
- use doc && grub_do_once emake -C docs html
-}
-
-src_test() {
- # The qemu dependency is a bit complex.
- # You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform.
- grub_do emake check
-}
-
-src_install() {
- grub_do emake install DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)"
- use doc && grub_do_once emake -C docs install-html DESTDIR="${D}"
-
- einstalldocs
-
- insinto /etc/default
- newins "${FILESDIR}"/grub.default-3 grub
-
- # https://bugs.gentoo.org/231935
- dostrip -x /usr/lib/grub
-}
-
-pkg_postinst() {
- elog "For information on how to configure GRUB2 please refer to the guide:"
- elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
-
- if has_version 'sys-boot/grub:0'; then
- elog "A migration guide for GRUB Legacy users is available:"
- elog " https://wiki.gentoo.org/wiki/GRUB2_Migration"
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog
- optfeature "detecting other operating systems (grub-mkconfig)" sys-boot/os-prober
- optfeature "creating rescue media (grub-mkrescue)" dev-libs/libisoburn
- optfeature "enabling RAID device detection" sys-fs/mdadm
- fi
-}
diff --git a/sys-boot/grub/grub-2.05_alpha20200310-r1.ebuild b/sys-boot/grub/grub-2.05_alpha20200310-r1.ebuild
deleted file mode 100644
index a11de124e27..00000000000
--- a/sys-boot/grub/grub-2.05_alpha20200310-r1.ebuild
+++ /dev/null
@@ -1,288 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-if [[ ${PV} == 9999 ]]; 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 pax-utils toolchain-funcs
-
-if [[ ${PV} != 9999 ]]; then
- SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.xz"
- KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 sparc ~x86"
-else
- inherit git-r3
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/grub.git"
-fi
-
-PATCHES=(
- "${FILESDIR}"/gfxpayload.patch
- "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch
-)
-
-DEJAVU=dejavu-sans-ttf-2.37
-UNIFONT=unifont-12.1.02
-SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz )
- themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )"
-
-DESCRIPTION="GNU GRUB boot loader"
-HOMEPAGE="https://www.gnu.org/software/grub/"
-
-# Includes licenses for dejavu and unifont
-LICENSE="GPL-3+ BSD MIT fonts? ( GPL-2-with-font-exception ) themes? ( CC-BY-SA-3.0 BitstreamVera )"
-SLOT="2/${PVR}"
-IUSE="device-mapper doc efiemu +fonts mount nls sdl test +themes truetype libzfs"
-
-GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot qemu qemu-mips pc uboot xen xen-32 xen-pvh )
-IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
-
-REQUIRED_USE="
- grub_platforms_coreboot? ( fonts )
- grub_platforms_qemu? ( fonts )
- grub_platforms_ieee1275? ( fonts )
- grub_platforms_loongson? ( fonts )
-"
-
-BDEPEND="
- ${PYTHON_DEPS}
- app-misc/pax-utils
- sys-devel/flex
- sys-devel/bison
- sys-apps/help2man
- sys-apps/texinfo
- fonts? (
- media-libs/freetype:2
- virtual/pkgconfig
- )
- test? (
- app-admin/genromfs
- app-arch/cpio
- app-arch/lzop
- app-emulation/qemu
- dev-libs/libisoburn
- sys-apps/miscfiles
- sys-block/parted
- sys-fs/squashfs-tools
- )
- themes? (
- app-arch/unzip
- media-libs/freetype:2
- virtual/pkgconfig
- )
- truetype? ( virtual/pkgconfig )
-"
-DEPEND="
- app-arch/xz-utils
- >=sys-libs/ncurses-5.2-r5:0=
- grub_platforms_emu? (
- sdl? ( media-libs/libsdl )
- )
- device-mapper? ( >=sys-fs/lvm2-2.02.45 )
- libzfs? ( sys-fs/zfs:= )
- mount? ( sys-fs/fuse:0 )
- truetype? ( media-libs/freetype:2= )
- ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 )
- ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 )
-"
-RDEPEND="${DEPEND}
- kernel_linux? (
- grub_platforms_efi-32? ( sys-boot/efibootmgr )
- grub_platforms_efi-64? ( sys-boot/efibootmgr )
- )
- !sys-boot/grub:0 !sys-boot/grub-static
- nls? ( sys-devel/gettext )
-"
-
-RESTRICT="!test? ( test )"
-
-QA_EXECSTACK="usr/bin/grub-emu* usr/lib/grub/*"
-QA_PRESTRIPPED="usr/lib/grub/.*"
-QA_MULTILIB_PATHS="usr/lib/grub/.*"
-QA_WX_LOAD="usr/lib/grub/*"
-
-src_unpack() {
- if [[ ${PV} == 9999 ]]; then
- git-r3_src_unpack
- pushd "${P}" >/dev/null || die
- local GNULIB_URI="https://git.savannah.gnu.org/git/gnulib.git"
- local GNULIB_REVISION=$(source bootstrap.conf >/dev/null; echo "${GNULIB_REVISION}")
- git-r3_fetch "${GNULIB_URI}" "${GNULIB_REVISION}"
- git-r3_checkout "${GNULIB_URI}" gnulib
- popd >/dev/null || die
- fi
- default
-}
-
-src_prepare() {
- default
-
- sed -i -e /autoreconf/d autogen.sh || die
-
- # Nothing in Gentoo packages 'american-english' in the exact path
- # wanted for the test, but all that is needed is a compressible text
- # file, and we do have 'words' from miscfiles in the same path.
- sed -i \
- -e '/CFILESSRC.*=/s,american-english,words,' \
- tests/util/grub-fs-tester.in \
- || die
-
- if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then
- python_setup
- fi
-
- if [[ -n ${GRUB_BOOTSTRAP} ]]; then
- eautopoint --force
- AUTOPOINT=: AUTORECONF=: ./bootstrap || die
- elif [[ -n ${GRUB_AUTOGEN} ]]; then
- ./autogen.sh || die
- fi
-
- if [[ -n ${GRUB_AUTORECONF} ]]; then
- eautoreconf
- fi
-}
-
-grub_do() {
- multibuild_foreach_variant run_in_build_dir "$@"
-}
-
-grub_do_once() {
- multibuild_for_best_variant run_in_build_dir "$@"
-}
-
-grub_configure() {
- local platform
-
- case ${MULTIBUILD_VARIANT} in
- efi*) platform=efi ;;
- xen-pvh) platform=xen_pvh ;;
- xen*) platform=xen ;;
- guessed) ;;
- *) platform=${MULTIBUILD_VARIANT} ;;
- esac
-
- case ${MULTIBUILD_VARIANT} in
- *-32)
- if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then
- local CTARGET=i386
- fi ;;
- *-64)
- if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then
- local CTARGET=x86_64
- local -x TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
- local -x TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
- fi ;;
- esac
-
- local myeconfargs=(
- --disable-werror
- --program-prefix=
- --libdir="${EPREFIX}"/usr/lib
- $(use_enable device-mapper)
- $(use_enable mount grub-mount)
- $(use_enable nls)
- $(use_enable themes grub-themes)
- $(use_enable truetype grub-mkfont)
- $(use_enable libzfs)
- $(use_enable sdl grub-emu-sdl)
- ${platform:+--with-platform=}${platform}
-
- # Let configure detect this where supported
- $(usex efiemu '' '--disable-efiemu')
- )
-
- if use fonts; then
- ln -rs "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
- fi
-
- if use themes; then
- ln -rs "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
- fi
-
- local ECONF_SOURCE="${S}"
- econf "${myeconfargs[@]}"
-}
-
-src_configure() {
- # Bug 508758.
- replace-flags -O3 -O2
-
- # We don't want to leak flags onto boot code.
- export HOST_CCASFLAGS=${CCASFLAGS}
- export HOST_CFLAGS=${CFLAGS}
- export HOST_CPPFLAGS=${CPPFLAGS}
- export HOST_LDFLAGS=${LDFLAGS}
- unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
-
- tc-ld-disable-gold #439082 #466536 #526348
- export TARGET_LDFLAGS="${TARGET_LDFLAGS} ${LDFLAGS}"
- unset LDFLAGS
-
- tc-export CC NM OBJCOPY RANLIB STRIP
- tc-export BUILD_CC # Bug 485592
-
- MULTIBUILD_VARIANTS=()
- local p
- for p in "${GRUB_ALL_PLATFORMS[@]}"; do
- use "grub_platforms_${p}" && MULTIBUILD_VARIANTS+=( "${p}" )
- done
- [[ ${#MULTIBUILD_VARIANTS[@]} -eq 0 ]] && MULTIBUILD_VARIANTS=( guessed )
- grub_do grub_configure
-}
-
-src_compile() {
- # Sandbox bug 404013.
- use libzfs && addpredict /etc/dfs:/dev/zfs
-
- grub_do emake
- use doc && grub_do_once emake -C docs html
-}
-
-src_test() {
- # The qemu dependency is a bit complex.
- # You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform.
- grub_do emake check
-}
-
-src_install() {
- grub_do emake install DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)"
- use doc && grub_do_once emake -C docs install-html DESTDIR="${D}"
-
- einstalldocs
-
- insinto /etc/default
- newins "${FILESDIR}"/grub.default-3 grub
-
- # https://bugs.gentoo.org/231935
- dostrip -x /usr/lib/grub
-}
-
-pkg_postinst() {
- elog "For information on how to configure GRUB2 please refer to the guide:"
- elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
-
- if has_version 'sys-boot/grub:0'; then
- elog "A migration guide for GRUB Legacy users is available:"
- elog " https://wiki.gentoo.org/wiki/GRUB2_Migration"
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog
- optfeature "detecting other operating systems (grub-mkconfig)" sys-boot/os-prober
- optfeature "creating rescue media (grub-mkrescue)" dev-libs/libisoburn
- optfeature "enabling RAID device detection" sys-fs/mdadm
- fi
-}
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2019-02-08 15:20 Mikle Kolyada
0 siblings, 0 replies; 12+ messages in thread
From: Mikle Kolyada @ 2019-02-08 15:20 UTC (permalink / raw
To: gentoo-commits
commit: 65be92768fab88a84a8cc05eea53fc9b67384c8b
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 8 15:19:27 2019 +0000
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Fri Feb 8 15:19:27 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65be9276
sys-boot/grub: Drop grub:0
Signed-off-by: Mikle Kolyada <zlogene <AT> 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..00000000000
--- 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 <slyfox@gentoo.org>
-Date: Mon, 14 Dec 2015 23:59:17 +0000
-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"
- : "=&r" (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 <slyfox@gentoo.org>
----
- 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"
-- : "=&r" (realstack) : "r" (simstack));
-+ : "=&r" (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/files/grub-0.97-ncurses-pkgconfig.patch b/sys-boot/grub/files/grub-0.97-ncurses-pkgconfig.patch
deleted file mode 100644
index d62e4346c33..00000000000
--- a/sys-boot/grub/files/grub-0.97-ncurses-pkgconfig.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- 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-r16.ebuild b/sys-boot/grub/grub-0.97-r16.ebuild
deleted file mode 100644
index 22793c03ab0..00000000000
--- a/sys-boot/grub/grub-0.97-r16.ebuild
+++ /dev/null
@@ -1,293 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# 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 <robbat2@gentoo.org> - 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
-
-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(+),/=[} )"
-DEPEND="${RDEPEND}
- static? ( ${LIB_DEPEND} )"
-RDEPEND+=" !sys-boot/grub:2[-multislot]"
-
-pkg_setup() {
- case $(tc-arch) in
- amd64) CONFIG_CHECK='~IA32_EMULATION' check_extra_config ;;
- esac
-}
-
-src_prepare() {
- # Grub will not handle a kernel larger than EXTENDED_MEMSIZE Mb as
- # discovered in bug 160801. We can change this, however, using larger values
- # for this variable means that Grub needs more memory to run and boot. For a
- # kernel of size N, Grub needs (N+1)*2. Advanced users should set a custom
- # value in make.conf, it is possible to make kernels ~16Mb in size, but it
- # needs the kitchen sink built-in.
- local t="custom"
- if [[ -z ${GRUB_MAX_KERNEL_SIZE} ]] ; then
- case $(tc-arch) in
- amd64) GRUB_MAX_KERNEL_SIZE=9 ;;
- x86) GRUB_MAX_KERNEL_SIZE=5 ;;
- esac
- t="default"
- fi
- einfo "Grub will support the ${t} maximum kernel size of ${GRUB_MAX_KERNEL_SIZE} Mb (GRUB_MAX_KERNEL_SIZE)"
-
- sed -i \
- -e "/^#define.*EXTENDED_MEMSIZE/s,3,${GRUB_MAX_KERNEL_SIZE},g" \
- "${S}"/grub/asmstub.c \
- || die
-
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
-
- # Work around issue where the default CFLAGS fail with gcc-4.9.3 (possibly newer), force -O0 instead
- # bug 564890, 566638
- if [[ $(gcc-major-version) -ge 5 || $(gcc-major-version) -eq 4 && $(gcc-minor-version) -ge 9 ]]; then
- if use custom-cflags; then
- ewarn "You are using custom cflags with gcc-4.9 or newer."
- ewarn "Be aware the result may segfault at runtime due to unknown optimization"
- ewarn "incompatibilities."
- else
- einfo "Forcing -O0 to get around optimization issue caused by gcc-4.9 and newer with -O2"
- sed -i -e "/CFLAGS/s/-O2/-O0/" \
- "${S}"/configure.ac || die
- fi
- fi
-
- rm -f "${S}"/aclocal.m4 # seems to keep bug 418287 away
- eautoreconf
-}
-
-src_configure() {
- filter-flags -fPIE #168834
-
- use amd64 && multilib_toolchain_setup x86
-
- unset BLOCK_SIZE #73499
-
- ### i686-specific code in the boot loader is a bad idea; disabling to ensure
- ### at least some compatibility if the hard drive is moved to an older or
- ### incompatible system.
-
- # grub-0.95 added -fno-stack-protector detection, to disable ssp for stage2,
- # but the objcopy's (faulty) test fails if -fstack-protector is default.
- # create a cache telling configure that objcopy is ok, and add -C to econf
- # to make use of the cache.
- #
- # CFLAGS has to be undefined running econf, else -fno-stack-protector detection fails.
- # STAGE2_CFLAGS is not allowed to be used on emake command-line, it overwrites
- # -fno-stack-protector detected by configure, removed from netboot's emake.
- use custom-cflags || unset CFLAGS
-
- tc-ld-disable-gold #439082 #466536 #526348
-
- export grub_cv_prog_objcopy_absolute=yes #79734
- use static && append-ldflags -static
-
- if use amd64 && use static ; then
- if [[ -n ${GRUB_STATIC_PACKAGE_BUILDING} ]] ; then
- eerror "You have set GRUB_STATIC_PACKAGE_BUILDING. This"
- eerror "is specifically intended for building the tarballs for the"
- eerror "grub-static package via USE='static -ncurses'."
- eerror "All bets are now off."
- fi
- fi
-
- # build the net-bootable grub first, but only if "netboot" is set
- if use netboot ; then
- mkdir -p "${WORKDIR}"/netboot
- pushd "${WORKDIR}"/netboot >/dev/null
- ECONF_SOURCE=${S} \
- econf \
- --libdir=/lib \
- --datadir=/usr/lib/grub \
- --exec-prefix=/ \
- --disable-auto-linux-mem-opt \
- --enable-diskless \
- --enable-{3c{5{03,07,09,29,95},90x},cs89x0,davicom,depca,eepro{,100}} \
- --enable-{epic100,exos205,ni5210,lance,ne2100,ni{50,65}10,natsemi} \
- --enable-{ne,ns8390,wd,otulip,rtl8139,sis900,sk-g16,smc9000,tiara} \
- --enable-{tulip,via-rhine,w89c840}
- popd >/dev/null
- fi
-
- # Now build the regular grub
- # Note that FFS and UFS2 support are broken for now - stage1_5 files too big
- econf \
- --libdir=/lib \
- --datadir=/usr/lib/grub \
- --exec-prefix=/ \
- --disable-auto-linux-mem-opt \
- $(use_with ncurses curses)
-
- # sanity check due to common failure
- use ncurses && ! grep -qs "HAVE_LIBCURSES.*1" config.h && die "USE=ncurses but curses not found"
-}
-
-src_compile() {
- use netboot && emake -C "${WORKDIR}"/netboot w89c840_o_CFLAGS="-O"
- emake
-}
-
-src_test() {
- # non-default block size also give false pass/fails.
- unset BLOCK_SIZE
- emake -j1 check
-}
-
-src_install() {
- default
- if use netboot ; then
- exeinto /usr/lib/grub/${CHOST}
- doexe "${WORKDIR}"/netboot/stage2/{nbgrub,pxegrub}
- newexe "${WORKDIR}"/netboot/stage2/stage2 stage2.netboot
- fi
-
- pax-mark -m "${D}"/sbin/grub #330745
-
- newdoc docs/menu.lst grub.conf.sample
- dodoc "${FILESDIR}"/grub.conf.gentoo
-
- [[ -n ${GRUB_STATIC_PACKAGE_BUILDING} ]] && \
- mv "${D}"/usr/share/doc/{${PF},grub-static-${PF/grub-}}
-
- insinto /usr/share/grub
- doins "${DISTDIR}"/splash.xpm.gz
-}
-
-setup_boot_dir() {
- local boot_dir=$1
- local dir=${boot_dir}
-
- mkdir -p "${dir}"
- [[ ! -L ${dir}/boot ]] && ln -s . "${dir}/boot"
- dir="${dir}/grub"
- if [[ ! -e ${dir} ]] ; then
- mkdir "${dir}" || die
- fi
-
- # change menu.lst to grub.conf
- if [[ ! -e ${dir}/grub.conf ]] && [[ -e ${dir}/menu.lst ]] ; then
- mv -f "${dir}"/menu.lst "${dir}"/grub.conf
- ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf"
- echo
- fi
-
- if [[ ! -e ${dir}/menu.lst ]]; then
- einfo "Linking from new grub.conf name to menu.lst"
- ln -snf grub.conf "${dir}"/menu.lst
- fi
-
- if [[ -e ${dir}/stage2 ]] ; then
- mv "${dir}"/stage2{,.old}
- ewarn "*** IMPORTANT NOTE: you must run grub and install"
- ewarn "the new version's stage1 to your MBR. Until you do,"
- ewarn "stage1 and stage2 will still be the old version, but"
- ewarn "later stages will be the new version, which could"
- ewarn "cause problems such as an unbootable system."
- ewarn
- ewarn "This means you must use either grub-install or perform"
- ewarn "root/setup manually."
- ewarn
- ewarn "For more help, see the wiki:"
- ewarn "https://wiki.gentoo.org/wiki/GRUB"
- echo
- fi
-
- einfo "Copying files from /lib/grub and /usr/share/grub to ${dir}"
- for x in \
- "${ROOT}"/lib*/grub/*/* \
- "${ROOT}"/usr/share/grub/* ; do
- [[ -f ${x} ]] && cp -p "${x}" "${dir}"/
- done
-
- if [[ ! -e ${dir}/grub.conf ]] ; then
- s="${ROOT}/usr/share/doc/${PF}/grub.conf.gentoo"
- [[ -e "${s}" ]] && cat "${s}" >${dir}/grub.conf
- [[ -e "${s}.gz" ]] && zcat "${s}.gz" >${dir}/grub.conf
- [[ -e "${s}.bz2" ]] && bzcat "${s}.bz2" >${dir}/grub.conf
- fi
-
- # Per bug 218599, we support grub.conf.install for users that want to run a
- # specific set of Grub setup commands rather than the default ones.
- grub_config=${dir}/grub.conf.install
- [[ -e ${grub_config} ]] || grub_config=${dir}/grub.conf
- if [[ -e ${grub_config} ]] ; then
- egrep \
- -v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \
- "${grub_config}" | \
- /sbin/grub --batch \
- --device-map="${dir}"/device.map \
- > /dev/null
- fi
-
- # the grub default commands silently piss themselves if
- # the default file does not exist ahead of time
- if [[ ! -e ${dir}/default ]] ; then
- grub-set-default --root-directory="${boot_dir}" default
- fi
- einfo "Grub has been installed to ${boot_dir} successfully."
-}
-
-pkg_postinst() {
- mount-boot_mount_boot_partition
-
- if [[ -n ${DONT_MOUNT_BOOT} ]]; then
- elog "WARNING: you have DONT_MOUNT_BOOT in effect, so you must apply"
- elog "the following instructions for your /boot!"
- elog "Neglecting to do so may cause your system to fail to boot!"
- elog
- else
- setup_boot_dir "${ROOT}"/boot
- # Trailing output because if this is run from pkg_postinst, it gets mixed into
- # the other output.
- einfo ""
- fi
- elog "To interactively install grub files to another device such as a USB"
- elog "stick, just run the following and specify the directory as prompted:"
- elog " emerge --config =${PF}"
- elog "Alternately, you can export GRUB_ALT_INSTALLDIR=/path/to/use to tell"
- elog "grub where to install in a non-interactive way."
-
- # needs to be after we call setup_boot_dir
- mount-boot_pkg_postinst
-}
-
-pkg_config() {
- local dir
- if [ ! -d "${GRUB_ALT_INSTALLDIR}" ]; then
- einfo "Enter the directory where you want to setup grub:"
- read dir
- else
- dir="${GRUB_ALT_INSTALLDIR}"
- fi
- setup_boot_dir "${dir}"
-}
diff --git a/sys-boot/grub/grub-0.97-r18.ebuild b/sys-boot/grub/grub-0.97-r18.ebuild
deleted file mode 100644
index 695b074e304..00000000000
--- a/sys-boot/grub/grub-0.97-r18.ebuild
+++ /dev/null
@@ -1,309 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# 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 <robbat2@gentoo.org> - 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="6"
-
-inherit eutils mount-boot toolchain-funcs linux-info flag-o-matic autotools pax-utils
-
-PATCHVER="1.15" # 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
- https://dev.gentoo.org/~whissi/dist/${PN}/${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(+),/=[} )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- static? ( ${LIB_DEPEND} )"
-RDEPEND+=" !sys-boot/grub:2[-multislot]"
-
-pkg_setup() {
- case $(tc-arch) in
- amd64) CONFIG_CHECK='~IA32_EMULATION' check_extra_config ;;
- esac
-}
-
-src_prepare() {
- # Grub will not handle a kernel larger than EXTENDED_MEMSIZE Mb as
- # discovered in bug 160801. We can change this, however, using larger values
- # for this variable means that Grub needs more memory to run and boot. For a
- # kernel of size N, Grub needs (N+1)*2. Advanced users should set a custom
- # value in make.conf, it is possible to make kernels ~16Mb in size, but it
- # needs the kitchen sink built-in.
- local t="custom"
- if [[ -z ${GRUB_MAX_KERNEL_SIZE} ]] ; then
- case $(tc-arch) in
- amd64) GRUB_MAX_KERNEL_SIZE=9 ;;
- x86) GRUB_MAX_KERNEL_SIZE=5 ;;
- esac
- t="default"
- fi
- einfo "Grub will support the ${t} maximum kernel size of ${GRUB_MAX_KERNEL_SIZE} Mb (GRUB_MAX_KERNEL_SIZE)"
-
- sed -i \
- -e "/^#define.*EXTENDED_MEMSIZE/s,3,${GRUB_MAX_KERNEL_SIZE},g" \
- "${S}"/grub/asmstub.c \
- || die
-
- # gcc-6 and above doesnt have a '-nopie' option patched in, use upstream's -fno-pie
- if [[ tc-is-gcc && $(gcc-major-version) -gt 5 ]]; then
- sed -i 's/-nopie/-fno-pie/' \
- "${WORKDIR}"/patch/860_all_grub-0.97-pie-r1.patch \
- || die
- fi
-
- 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
-
- eapply_user
-
- rm -f "${S}"/aclocal.m4 # seems to keep bug 418287 away
- eautoreconf
-}
-
-src_configure() {
- filter-flags -fPIE #168834
-
- use amd64 && multilib_toolchain_setup x86
-
- unset BLOCK_SIZE #73499
-
- ### i686-specific code in the boot loader is a bad idea; disabling to ensure
- ### at least some compatibility if the hard drive is moved to an older or
- ### incompatible system.
-
- # grub-0.95 added -fno-stack-protector detection, to disable ssp for stage2,
- # but the objcopy's (faulty) test fails if -fstack-protector is default.
- # create a cache telling configure that objcopy is ok, and add -C to econf
- # to make use of the cache.
- #
- # CFLAGS has to be undefined running econf, else -fno-stack-protector detection fails.
- # STAGE2_CFLAGS is not allowed to be used on emake command-line, it overwrites
- # -fno-stack-protector detected by configure, removed from netboot's emake.
- use custom-cflags || unset CFLAGS
-
- tc-ld-disable-gold #439082 #466536 #526348
-
- export grub_cv_prog_objcopy_absolute=yes #79734
- use static && append-ldflags -static
-
- if use amd64 && use static ; then
- if [[ -n ${GRUB_STATIC_PACKAGE_BUILDING} ]] ; then
- eerror "You have set GRUB_STATIC_PACKAGE_BUILDING. This"
- eerror "is specifically intended for building the tarballs for the"
- eerror "grub-static package via USE='static -ncurses'."
- eerror "All bets are now off."
- fi
- fi
-
- # build the net-bootable grub first, but only if "netboot" is set
- if use netboot ; then
- mkdir -p "${WORKDIR}"/netboot
- pushd "${WORKDIR}"/netboot >/dev/null
- ECONF_SOURCE=${S} \
- econf \
- --libdir=/lib \
- --datadir=/usr/lib/grub \
- --exec-prefix=/ \
- --disable-auto-linux-mem-opt \
- --enable-diskless \
- --enable-{3c{5{03,07,09,29,95},90x},cs89x0,davicom,depca,eepro{,100}} \
- --enable-{epic100,exos205,ni5210,lance,ne2100,ni{50,65}10,natsemi} \
- --enable-{ne,ns8390,wd,otulip,rtl8139,sis900,sk-g16,smc9000,tiara} \
- --enable-{tulip,via-rhine,w89c840}
- popd >/dev/null
- fi
-
- # Now build the regular grub
- # Note that FFS and UFS2 support are broken for now - stage1_5 files too big
- econf \
- --libdir=/lib \
- --datadir=/usr/lib/grub \
- --exec-prefix=/ \
- --disable-auto-linux-mem-opt \
- $(use_with ncurses curses)
-
- # sanity check due to common failure
- use ncurses && ! grep -qs "HAVE_LIBCURSES.*1" config.h && die "USE=ncurses but curses not found"
-}
-
-src_compile() {
- use netboot && emake -C "${WORKDIR}"/netboot w89c840_o_CFLAGS="-O"
- emake
-}
-
-src_test() {
- # non-default block size also give false pass/fails.
- unset BLOCK_SIZE
- emake -j1 check
-}
-
-src_install() {
- local _stage2_file="${S}/stage2/stage2"
- if [[ -f "${_stage2_file}" ]]; then
- local _stage2_filesize=$(stat -c '%s' "${_stage2_file}" 2>/dev/null)
- if [[ -z "${_stage2_filesize}" ]]; then
- ewarn "Sanity check skipped -- 'stat' returned nothing"
- elif [[ "${_stage2_filesize}" -gt 1000000 ]]; then
- eerror "Sanity check failed: stage2 (${_stage2_file}) is larger than 1MB (${_stage2_filesize} bytes)!"
- eerror "Please check your CFLAGS and/or file a bug report at https://bugs.gentoo.org."
- die "stage2 sanity check failed"
- else
- einfo "stage2 sanity check passed"
- fi
- else
- ewarn "Sanity check skipped -- no stage2 found"
- fi
-
- default
- if use netboot ; then
- exeinto /usr/lib/grub/${CHOST}
- doexe "${WORKDIR}"/netboot/stage2/{nbgrub,pxegrub}
- newexe "${WORKDIR}"/netboot/stage2/stage2 stage2.netboot
- fi
-
- pax-mark -m "${D}"/sbin/grub #330745
-
- newdoc docs/menu.lst grub.conf.sample
- dodoc "${FILESDIR}"/grub.conf.gentoo
-
- [[ -n ${GRUB_STATIC_PACKAGE_BUILDING} ]] && \
- mv "${D}"/usr/share/doc/{${PF},grub-static-${PF/grub-}}
-
- insinto /usr/share/grub
- doins "${DISTDIR}"/splash.xpm.gz
-}
-
-setup_boot_dir() {
- local boot_dir=$1
- local dir=${boot_dir}
-
- mkdir -p "${dir}"
- [[ ! -L ${dir}/boot ]] && ln -s . "${dir}/boot"
- dir="${dir}/grub"
- if [[ ! -e ${dir} ]] ; then
- mkdir "${dir}" || die
- fi
-
- # change menu.lst to grub.conf
- if [[ ! -e ${dir}/grub.conf ]] && [[ -e ${dir}/menu.lst ]] ; then
- mv -f "${dir}"/menu.lst "${dir}"/grub.conf
- ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf"
- echo
- fi
-
- if [[ ! -e ${dir}/menu.lst ]]; then
- einfo "Linking from new grub.conf name to menu.lst"
- ln -snf grub.conf "${dir}"/menu.lst
- fi
-
- if [[ -e ${dir}/stage2 ]] ; then
- mv "${dir}"/stage2{,.old}
- ewarn "*** IMPORTANT NOTE: you must run grub and install"
- ewarn "the new version's stage1 to your MBR. Until you do,"
- ewarn "stage1 and stage2 will still be the old version, but"
- ewarn "later stages will be the new version, which could"
- ewarn "cause problems such as an unbootable system."
- ewarn
- ewarn "This means you must use either grub-install or perform"
- ewarn "root/setup manually."
- ewarn
- ewarn "For more help, see the wiki:"
- ewarn "https://wiki.gentoo.org/wiki/GRUB"
- echo
- fi
-
- einfo "Copying files from /lib/grub and /usr/share/grub to ${dir}"
- for x in \
- "${ROOT}"/lib*/grub/*/* \
- "${ROOT}"/usr/share/grub/* ; do
- [[ -f ${x} ]] && cp -p "${x}" "${dir}"/
- done
-
- if [[ ! -e ${dir}/grub.conf ]] ; then
- s="${ROOT}/usr/share/doc/${PF}/grub.conf.gentoo"
- [[ -e "${s}" ]] && cat "${s}" >${dir}/grub.conf
- [[ -e "${s}.gz" ]] && zcat "${s}.gz" >${dir}/grub.conf
- [[ -e "${s}.bz2" ]] && bzcat "${s}.bz2" >${dir}/grub.conf
- fi
-
- # Per bug 218599, we support grub.conf.install for users that want to run a
- # specific set of Grub setup commands rather than the default ones.
- grub_config=${dir}/grub.conf.install
- [[ -e ${grub_config} ]] || grub_config=${dir}/grub.conf
- if [[ -e ${grub_config} ]] ; then
- egrep \
- -v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \
- "${grub_config}" | \
- /sbin/grub --batch \
- --device-map="${dir}"/device.map \
- > /dev/null
- fi
-
- # the grub default commands silently piss themselves if
- # the default file does not exist ahead of time
- if [[ ! -e ${dir}/default ]] ; then
- grub-set-default --root-directory="${boot_dir}" default
- fi
- einfo "Grub has been installed to ${boot_dir} successfully."
-}
-
-pkg_postinst() {
- mount-boot_mount_boot_partition
-
- if [[ -n ${DONT_MOUNT_BOOT} ]]; then
- elog "WARNING: you have DONT_MOUNT_BOOT in effect, so you must apply"
- elog "the following instructions for your /boot!"
- elog "Neglecting to do so may cause your system to fail to boot!"
- elog
- else
- setup_boot_dir "${ROOT}"/boot
- # Trailing output because if this is run from pkg_postinst, it gets mixed into
- # the other output.
- einfo ""
- fi
- elog "To interactively install grub files to another device such as a USB"
- elog "stick, just run the following and specify the directory as prompted:"
- elog " emerge --config =${PF}"
- elog "Alternately, you can export GRUB_ALT_INSTALLDIR=/path/to/use to tell"
- elog "grub where to install in a non-interactive way."
-
- # needs to be after we call setup_boot_dir
- mount-boot_pkg_postinst
-}
-
-pkg_config() {
- local dir
- if [ ! -d "${GRUB_ALT_INSTALLDIR}" ]; then
- einfo "Enter the directory where you want to setup grub:"
- read dir
- else
- dir="${GRUB_ALT_INSTALLDIR}"
- fi
- setup_boot_dir "${dir}"
-}
diff --git a/sys-boot/grub/metadata.xml b/sys-boot/grub/metadata.xml
index b6247282548..9070bcc5502 100644
--- a/sys-boot/grub/metadata.xml
+++ b/sys-boot/grub/metadata.xml
@@ -33,7 +33,6 @@
Allow concurrent installation of <pkg>sys-boot/grub</pkg> SLOT 0 and
<pkg>sys-boot/grub</pkg> SLOT 2 by renaming all programs.
</flag>
- <flag name="netboot">Enable network booting</flag>
<flag name="themes">Build and install GRUB themes (starfield)</flag>
<flag name="truetype">Build and install grub-mkfont conversion utility</flag>
</use>
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2018-09-06 3:38 Mike Gilbert
0 siblings, 0 replies; 12+ messages in thread
From: Mike Gilbert @ 2018-09-06 3:38 UTC (permalink / raw
To: gentoo-commits
commit: bab479f78d08aaab25917e51f90b85e0ca5f42b4
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 6 03:38:26 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Sep 6 03:38:26 2018 +0000
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 00000000000..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 <mchang@suse.com>
+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 <mchang@suse.com>
+Tested-by: Michael Chang <mchang@suse.com>
+Tested-by: Paul Menzel <paulepanter@users.sourceforge.net>
+Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
+---
+ 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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2018-05-04 15:50 Mike Gilbert
0 siblings, 0 replies; 12+ messages in thread
From: Mike Gilbert @ 2018-05-04 15:50 UTC (permalink / raw
To: gentoo-commits
commit: b6db5c287b3e0a43f2254376e32ea6ffe8a45dcf
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri May 4 15:46:06 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri May 4 15:50:03 2018 +0000
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-9999.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 00000000000..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 <floppym@gentoo.org>
+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 <polynomial-c@gentoo.org>.
+---
+ 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} == 9999 ]]; 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-9999.ebuild b/sys-boot/grub/grub-9999.ebuild
index cc6db989c6e..d5bfc5ad9ac 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-9999.ebuild
@@ -1,16 +1,21 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
if [[ ${PV} == 9999 ]]; then
GRUB_AUTOGEN=1
+ GRUB_AUTORECONF=1
fi
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
@@ -153,6 +158,9 @@ src_prepare() {
if [[ -n ${GRUB_AUTOGEN} ]]; then
python_setup
bash autogen.sh || die
+ fi
+
+ if [[ -n ${GRUB_AUTORECONF} ]]; then
autopoint() { :; }
eautoreconf
fi
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2016-03-04 22:33 Mike Gilbert
0 siblings, 0 replies; 12+ messages in thread
From: Mike Gilbert @ 2016-03-04 22:33 UTC (permalink / raw
To: gentoo-commits
commit: fa02d3700e674800a25426dff1ee832ace2dfc72
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 4 22:31:55 2016 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Mar 4 22:32:57 2016 +0000
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-9999-r1.ebuild => grub-2.02_beta3.ebuild} | 9 ++++---
sys-boot/grub/grub-9999-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 0000000..6c63ef8
--- /dev/null
+++ b/sys-boot/grub/files/gfxpayload.patch
@@ -0,0 +1,29 @@
+From e2d5bf1bc6aaaabeba538c1ca94ea8601e4e1474 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Thu, 16 Oct 2014 23:43:51 -0400
+Subject: [PATCH] 10_linux: Default gfxpayload=keep only when booting using efi
+
+vesafb seems to be unreliable when using BIOS compat mode.
+
+---
+ util/grub.d/10_linux.in | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
+index d2e2a8f..a54b888 100644
+--- a/util/grub.d/10_linux.in
++++ b/util/grub.d/10_linux.in
+@@ -104,7 +104,9 @@ linux_entry ()
+ echo " load_video" | sed "s/^/$submenu_indentation/"
+ if grep -qx "CONFIG_FB_EFI=y" "${config}" 2> /dev/null \
+ && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" "${config}" 2> /dev/null; then
+- echo " set gfxpayload=keep" | sed "s/^/$submenu_indentation/"
++ echo ' if [ "x$grub_platform" = xefi ]; then' | sed "s/^/$submenu_indentation/"
++ echo " set gfxpayload=keep" | sed "s/^/$submenu_indentation/"
++ echo ' fi' | sed "s/^/$submenu_indentation/"
+ fi
+ else
+ if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then
+--
+2.7.2
+
diff --git a/sys-boot/grub/grub-9999-r1.ebuild b/sys-boot/grub/grub-2.02_beta3.ebuild
similarity index 97%
copy from sys-boot/grub/grub-9999-r1.ebuild
copy to sys-boot/grub/grub-2.02_beta3.ebuild
index 9941709..350857b 100644
--- a/sys-boot/grub/grub-9999-r1.ebuild
+++ b/sys-boot/grub/grub-2.02_beta3.ebuild
@@ -30,10 +30,13 @@ else
http://git.savannah.gnu.org/r/grub.git"
fi
-PATCHES=( "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch )
+PATCHES=(
+ "${FILESDIR}"/gfxpayload.patch
+ "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch
+)
-DEJAVU=dejavu-sans-ttf-2.34
-UNIFONT=unifont-7.0.06
+DEJAVU=dejavu-sans-ttf-2.35
+UNIFONT=unifont-8.0.01
SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz )
themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )"
diff --git a/sys-boot/grub/grub-9999-r1.ebuild b/sys-boot/grub/grub-9999-r1.ebuild
index 9941709..350857b 100644
--- a/sys-boot/grub/grub-9999-r1.ebuild
+++ b/sys-boot/grub/grub-9999-r1.ebuild
@@ -30,10 +30,13 @@ else
http://git.savannah.gnu.org/r/grub.git"
fi
-PATCHES=( "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch )
+PATCHES=(
+ "${FILESDIR}"/gfxpayload.patch
+ "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch
+)
-DEJAVU=dejavu-sans-ttf-2.34
-UNIFONT=unifont-7.0.06
+DEJAVU=dejavu-sans-ttf-2.35
+UNIFONT=unifont-8.0.01
SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz )
themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )"
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2016-01-01 0:49 Robin H. Johnson
0 siblings, 0 replies; 12+ messages in thread
From: Robin H. Johnson @ 2016-01-01 0:49 UTC (permalink / raw
To: gentoo-commits
commit: d05d046b70a1f469c42ad26ce35140d6a4bbd800
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 1 00:47:39 2016 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Fri Jan 1 00:47:39 2016 +0000
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 0000000..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" <robbat2@gentoo.org>
+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 <robbat2@gentoo.org>
+---
+ 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 0000000..76c72a6
--- /dev/null
+++ b/sys-boot/grub/files/grub-2.02_beta2-lvm2-raid1.patch
@@ -0,0 +1,68 @@
+From: Andrei Borzenkov <arvidjaar@gmail.com>
+Date: Thu, 19 Mar 2015 18:30:27 +0000 (+0300)
+Subject: core: add LVM RAID1 support
+X-Git-Url: http://git.savannah.gnu.org/gitweb/?p=grub.git;a=commitdiff_plain;h=527eeeeee6c8d3d8e3bb1fac408d47bb1dcbec95;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':
+ seg->type = GRUB_DISKFILTER_RAID4;
+ seg->layout = GRUB_RAID_LAYOUT_LEFT_ASYMMETRIC;
+@@ -608,16 +612,18 @@ grub_lvm_detect (grub_disk_t disk,
+ goto lvs_segment_fail;
+ }
+
+- seg->stripe_size = grub_lvm_getvalue (&p, "stripe_size = ");
+- if (p == NULL)
++ if (seg->type != GRUB_DISKFILTER_MIRROR)
+ {
++ seg->stripe_size = grub_lvm_getvalue (&p, "stripe_size = ");
++ if (p == NULL)
++ {
+ #ifdef GRUB_UTIL
+- grub_util_info ("unknown stripe_size\n");
++ grub_util_info ("unknown stripe_size\n");
+ #endif
+- goto lvs_segment_fail;
++ goto lvs_segment_fail;
++ }
+ }
+
+-
+ seg->nodes = grub_zalloc (sizeof (seg->nodes[0])
+ * seg->node_count);
+
+@@ -625,7 +631,7 @@ grub_lvm_detect (grub_disk_t disk,
+ if (p == NULL)
+ {
+ #ifdef GRUB_UTIL
+- grub_util_info ("unknown mirrors\n");
++ grub_util_info ("unknown raids\n");
+ #endif
+ goto lvs_segment_fail2;
+ }
diff --git a/sys-boot/grub/grub-2.02_beta2-r9.ebuild b/sys-boot/grub/grub-2.02_beta2-r9.ebuild
new file mode 100644
index 0000000..4c43465
--- /dev/null
+++ b/sys-boot/grub/grub-2.02_beta2-r9.ebuild
@@ -0,0 +1,324 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+GRUB_AUTOGEN=1
+
+if [[ -n ${GRUB_AUTOGEN} ]]; then
+ PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+ inherit python-any-r1
+fi
+
+inherit autotools-utils bash-completion-r1 eutils flag-o-matic mount-boot multibuild pax-utils toolchain-funcs versionator
+
+if [[ ${PV} != 9999 ]]; then
+ if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then
+ # The quote style is to work with <=bash-4.2 and >=bash-4.3 #503860
+ MY_P=${P/_/'~'}
+ SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~floppym/dist/${P}-gentoo-r3.tar.xz"
+ S=${WORKDIR}/${MY_P}
+ else
+ SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
+ https://dev.gentoo.org/~floppym/dist/${P}.tar.xz"
+ S=${WORKDIR}/${P%_*}
+ fi
+ KEYWORDS="~amd64 ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="git://git.sv.gnu.org/grub.git
+ http://git.savannah.gnu.org/r/grub.git"
+fi
+
+DEJAVU=dejavu-sans-ttf-2.34
+UNIFONT=unifont-7.0.06
+SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz )
+ themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )"
+
+DESCRIPTION="GNU GRUB boot loader"
+HOMEPAGE="https://www.gnu.org/software/grub/"
+
+# Includes licenses for dejavu and unifont
+LICENSE="GPL-3 fonts? ( GPL-2-with-font-exception ) themes? ( BitstreamVera )"
+SLOT="2"
+IUSE="debug device-mapper doc efiemu +fonts mount +multislot nls static sdl test +themes truetype libzfs"
+
+GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot qemu qemu-mips pc uboot xen )
+IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
+
+REQUIRED_USE="
+ grub_platforms_coreboot? ( fonts )
+ grub_platforms_qemu? ( fonts )
+ grub_platforms_ieee1275? ( fonts )
+ grub_platforms_loongson? ( fonts )
+"
+
+# os-prober: Used on runtime to detect other OSes
+# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
+RDEPEND="
+ app-arch/xz-utils
+ >=sys-libs/ncurses-5.2-r5:0=
+ debug? (
+ sdl? ( media-libs/libsdl )
+ )
+ device-mapper? ( >=sys-fs/lvm2-2.02.45 )
+ libzfs? ( sys-fs/zfs )
+ mount? ( sys-fs/fuse )
+ truetype? ( media-libs/freetype:2= )
+ ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
+ ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ app-misc/pax-utils
+ sys-devel/flex
+ sys-devel/bison
+ sys-apps/help2man
+ sys-apps/texinfo
+ fonts? ( media-libs/freetype:2 )
+ grub_platforms_xen? ( app-emulation/xen-tools:= )
+ static? (
+ app-arch/xz-utils[static-libs(+)]
+ truetype? (
+ app-arch/bzip2[static-libs(+)]
+ media-libs/freetype[static-libs(+)]
+ sys-libs/zlib[static-libs(+)]
+ )
+ )
+ test? (
+ dev-libs/libisoburn
+ app-emulation/qemu
+ )
+ themes? (
+ app-arch/unzip
+ media-libs/freetype:2
+ )
+"
+RDEPEND+="
+ kernel_linux? (
+ grub_platforms_efi-32? ( sys-boot/efibootmgr )
+ grub_platforms_efi-64? ( sys-boot/efibootmgr )
+ )
+ !multislot? ( !sys-boot/grub:0 )
+ nls? ( sys-devel/gettext )
+"
+
+DEPEND+=" !!=media-libs/freetype-2.5.4"
+
+STRIP_MASK="*/grub/*/*.{mod,img}"
+RESTRICT="test"
+
+QA_EXECSTACK="
+ usr/bin/grub*-emu*
+ usr/lib*/grub/*/*.mod
+ usr/lib*/grub/*/*.module
+ usr/lib*/grub/*/kernel.exec
+ usr/lib*/grub/*/kernel.img
+"
+
+QA_WX_LOAD="
+ usr/lib*/grub/*/kernel.exec
+ usr/lib*/grub/*/kernel.img
+ usr/lib*/grub/*/*.image
+"
+
+QA_PRESTRIPPED="
+ usr/lib.*/grub/.*/kernel.img
+"
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ fi
+ default_src_unpack
+}
+
+src_prepare() {
+ EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch
+
+ epatch "${FILESDIR}"/CVE-2015-8370.patch
+ epatch "${FILESDIR}"/${P}-lvm2-raid1.patch
+ epatch "${FILESDIR}"/${P}-KERNEL_GLOBS.patch
+
+ sed -i -e /autoreconf/d autogen.sh || die
+
+ if use multislot; then
+ # fix texinfo file name, bug 416035
+ sed -i -e 's/^\* GRUB:/* GRUB2:/' -e 's/(grub)/(grub2)/' docs/grub.texi || die
+ fi
+
+ epatch_user
+
+ if [[ -n ${GRUB_AUTOGEN} ]]; then
+ python_setup
+ bash autogen.sh || die
+ fi
+
+ if [[ -n ${AUTOTOOLS_AUTORECONF} ]]; then
+ autopoint() { return 0; }
+ eautoreconf
+ fi
+}
+
+setup_fonts() {
+ ln -s "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
+ if use themes; then
+ ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
+ fi
+}
+
+grub_configure() {
+ local platform
+
+ case ${MULTIBUILD_VARIANT} in
+ efi-32)
+ platform=efi
+ if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then
+ local CTARGET=${CTARGET:-i386}
+ fi ;;
+ efi-64)
+ platform=efi
+ if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then
+ local CTARGET=${CTARGET:-x86_64}
+ local TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
+ local TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
+ export TARGET_CFLAGS TARGET_CPPFLAGS
+ fi ;;
+ guessed) ;;
+ *) platform=${MULTIBUILD_VARIANT} ;;
+ esac
+
+ local myeconfargs=(
+ --disable-werror
+ --program-prefix=
+ --libdir="${EPREFIX}"/usr/lib
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
+ $(use_enable debug mm-debug)
+ $(use_enable debug grub-emu-usb)
+ $(use_enable device-mapper)
+ $(use_enable mount grub-mount)
+ $(use_enable nls)
+ $(use_enable themes grub-themes)
+ $(use_enable truetype grub-mkfont)
+ $(use_enable libzfs)
+ $(use sdl && use_enable debug grub-emu-sdl)
+ ${platform:+--with-platform=}${platform}
+
+ # Let configure detect this where supported
+ $(usex efiemu '' '--disable-efiemu')
+ )
+
+ if use multislot; then
+ myeconfargs+=( --program-transform-name="s,grub,grub2," )
+ fi
+
+ mkdir -p "${BUILD_DIR}" || die
+ run_in_build_dir setup_fonts
+
+ autotools-utils_src_configure
+}
+
+src_configure() {
+ # Bug 508758.
+ replace-flags -O3 -O2
+
+ # We don't want to leak flags onto boot code.
+ export HOST_CCASFLAGS=${CCASFLAGS}
+ export HOST_CFLAGS=${CFLAGS}
+ export HOST_CPPFLAGS=${CPPFLAGS}
+ export HOST_LDFLAGS=${LDFLAGS}
+ unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
+
+ use static && HOST_LDFLAGS+=" -static"
+
+ tc-ld-disable-gold #439082 #466536 #526348
+ export TARGET_LDFLAGS="${TARGET_LDFLAGS} ${LDFLAGS}"
+ unset LDFLAGS
+
+ tc-export CC NM OBJCOPY RANLIB STRIP
+ tc-export BUILD_CC # Bug 485592
+
+ # Portage will take care of cleaning up GRUB_PLATFORMS
+ MULTIBUILD_VARIANTS=( ${GRUB_PLATFORMS:-guessed} )
+ multibuild_parallel_foreach_variant grub_configure
+}
+
+src_compile() {
+ # Sandbox bug 404013.
+ use libzfs && addpredict /etc/dfs:/dev/zfs
+
+ multibuild_foreach_variant autotools-utils_src_compile
+
+ use doc && multibuild_for_best_variant \
+ autotools-utils_src_compile -C docs html
+}
+
+src_test() {
+ # The qemu dependency is a bit complex.
+ # You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform.
+ multibuild_foreach_variant autotools-utils_src_test
+}
+
+src_install() {
+ multibuild_foreach_variant autotools-utils_src_install \
+ bashcompletiondir="$(get_bashcompdir)"
+
+ local grub=grub
+ if use multislot; then
+ grub=grub2
+ mv "${ED%/}"/usr/share/info/grub{,2}.info || die
+ mv "${ED%/}"/$(get_bashcompdir)/grub{,2} || die
+ fi
+
+ bashcomp_alias ${grub} ${grub}-{install,set-default,mkrescue,reboot,script-check,editenv,sparc64-setup,mkfont,mkpasswd-pbkdf2,mkimage,bios-setup,mkconfig,probe}
+
+ use doc && multibuild_for_best_variant run_in_build_dir \
+ emake -C docs DESTDIR="${D}" install-html
+
+ insinto /etc/default
+ newins "${FILESDIR}"/grub.default-3 grub
+}
+
+pkg_postinst() {
+ mount-boot_mount_boot_partition
+
+ if [[ -e "${ROOT%/}/boot/grub2/grub.cfg" ]]; then
+ ewarn "The grub directory has changed from /boot/grub2 to /boot/grub."
+ ewarn "Please run grub2-install and grub2-mkconfig -o /boot/grub/grub.cfg."
+
+ if [[ ! -e "${ROOT%/}/boot/grub/grub.cfg" ]]; then
+ mkdir -p "${ROOT%/}/boot/grub"
+ ln -s ../grub2/grub.cfg "${ROOT%/}/boot/grub/grub.cfg"
+ fi
+ fi
+
+ mount-boot_pkg_postinst
+
+ elog "For information on how to configure GRUB2 please refer to the guide:"
+ elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
+
+ if has_version 'sys-boot/grub:0'; then
+ elog "A migration guide for GRUB Legacy users is available:"
+ elog " https://wiki.gentoo.org/wiki/GRUB2_Migration"
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog
+ elog "You may consider installing the following optional packages:"
+ optfeature "Detect other operating systems (grub-mkconfig)" sys-boot/os-prober
+ optfeature "Create rescue media (grub-mkrescue)" dev-libs/libisoburn
+ optfeature "Enable RAID device detection" sys-fs/mdadm
+ else
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.02_beta2-r8 ${v}; then
+ ewarn "Please re-run grub2-install to address a security flaw when using"
+ ewarn "username/password authentication in grub."
+ ewarn "See bug 568326 for more information."
+ fi
+ done
+ fi
+}
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2015-12-15 17:05 Ian Stakenvicius
0 siblings, 0 replies; 12+ messages in thread
From: Ian Stakenvicius @ 2015-12-15 17:05 UTC (permalink / raw
To: gentoo-commits
commit: 9236cac3ad29a31f428157026801827d58c3b8a3
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 15 17:05:11 2015 +0000
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 17:05:36 2015 +0000
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"
: "=&r" (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 0000000..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 <slyfox@gentoo.org>
+Date: Mon, 14 Dec 2015 23:59:17 +0000
+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"
+ : "=&r" (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 <slyfox@gentoo.org>
+---
+ 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"
+- : "=&r" (realstack) : "r" (simstack));
++ : "=&r" (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 0000000..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 <robbat2@gentoo.org> - 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(+),/=[} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+pkg_setup() {
+ case $(tc-arch) in
+ amd64) CONFIG_CHECK='~IA32_EMULATION' check_extra_config ;;
+ esac
+}
+
+src_prepare() {
+ # Grub will not handle a kernel larger than EXTENDED_MEMSIZE Mb as
+ # discovered in bug 160801. We can change this, however, using larger values
+ # for this variable means that Grub needs more memory to run and boot. For a
+ # kernel of size N, Grub needs (N+1)*2. Advanced users should set a custom
+ # value in make.conf, it is possible to make kernels ~16Mb in size, but it
+ # needs the kitchen sink built-in.
+ local t="custom"
+ if [[ -z ${GRUB_MAX_KERNEL_SIZE} ]] ; then
+ case $(tc-arch) in
+ amd64) GRUB_MAX_KERNEL_SIZE=9 ;;
+ x86) GRUB_MAX_KERNEL_SIZE=5 ;;
+ esac
+ t="default"
+ fi
+ einfo "Grub will support the ${t} maximum kernel size of ${GRUB_MAX_KERNEL_SIZE} Mb (GRUB_MAX_KERNEL_SIZE)"
+
+ sed -i \
+ -e "/^#define.*EXTENDED_MEMSIZE/s,3,${GRUB_MAX_KERNEL_SIZE},g" \
+ "${S}"/grub/asmstub.c \
+ || die
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ # bug 564890, 566638
+ epatch "${FILESDIR}"/grub-0.97-Add-esp-to-list-of-clobbered-registers.patch
+
+ rm -f "${S}"/aclocal.m4 # seems to keep bug 418287 away
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags -fPIE #168834
+
+ use amd64 && multilib_toolchain_setup x86
+
+ unset BLOCK_SIZE #73499
+
+ ### i686-specific code in the boot loader is a bad idea; disabling to ensure
+ ### at least some compatibility if the hard drive is moved to an older or
+ ### incompatible system.
+
+ # grub-0.95 added -fno-stack-protector detection, to disable ssp for stage2,
+ # but the objcopy's (faulty) test fails if -fstack-protector is default.
+ # create a cache telling configure that objcopy is ok, and add -C to econf
+ # to make use of the cache.
+ #
+ # CFLAGS has to be undefined running econf, else -fno-stack-protector detection fails.
+ # STAGE2_CFLAGS is not allowed to be used on emake command-line, it overwrites
+ # -fno-stack-protector detected by configure, removed from netboot's emake.
+ use custom-cflags || unset CFLAGS
+
+ tc-ld-disable-gold #439082 #466536 #526348
+
+ export grub_cv_prog_objcopy_absolute=yes #79734
+ use static && append-ldflags -static
+
+ if use amd64 && use static ; then
+ if [[ -n ${GRUB_STATIC_PACKAGE_BUILDING} ]] ; then
+ eerror "You have set GRUB_STATIC_PACKAGE_BUILDING. This"
+ eerror "is specifically intended for building the tarballs for the"
+ eerror "grub-static package via USE='static -ncurses'."
+ eerror "All bets are now off."
+ fi
+ fi
+
+ multijob_init
+
+ # build the net-bootable grub first, but only if "netboot" is set
+ if use netboot ; then
+ (
+ multijob_child_init
+ mkdir -p "${WORKDIR}"/netboot
+ pushd "${WORKDIR}"/netboot >/dev/null
+ ECONF_SOURCE=${S} \
+ econf \
+ --libdir=/lib \
+ --datadir=/usr/lib/grub \
+ --exec-prefix=/ \
+ --disable-auto-linux-mem-opt \
+ --enable-diskless \
+ --enable-{3c{5{03,07,09,29,95},90x},cs89x0,davicom,depca,eepro{,100}} \
+ --enable-{epic100,exos205,ni5210,lance,ne2100,ni{50,65}10,natsemi} \
+ --enable-{ne,ns8390,wd,otulip,rtl8139,sis900,sk-g16,smc9000,tiara} \
+ --enable-{tulip,via-rhine,w89c840}
+ popd >/dev/null
+ ) &
+ multijob_post_fork
+ fi
+
+ # Now build the regular grub
+ # Note that FFS and UFS2 support are broken for now - stage1_5 files too big
+ econf \
+ --libdir=/lib \
+ --datadir=/usr/lib/grub \
+ --exec-prefix=/ \
+ --disable-auto-linux-mem-opt \
+ $(use_with ncurses curses)
+
+ # sanity check due to common failure
+ use ncurses && ! grep -qs "HAVE_LIBCURSES.*1" config.h && die "USE=ncurses but curses not found"
+
+ multijob_finish
+}
+
+src_compile() {
+ use netboot && emake -C "${WORKDIR}"/netboot w89c840_o_CFLAGS="-O"
+ emake
+}
+
+src_test() {
+ # non-default block size also give false pass/fails.
+ unset BLOCK_SIZE
+ emake -j1 check
+}
+
+src_install() {
+ default
+ if use netboot ; then
+ exeinto /usr/lib/grub/${CHOST}
+ doexe "${WORKDIR}"/netboot/stage2/{nbgrub,pxegrub}
+ newexe "${WORKDIR}"/netboot/stage2/stage2 stage2.netboot
+ fi
+
+ pax-mark -m "${D}"/sbin/grub #330745
+
+ newdoc docs/menu.lst grub.conf.sample
+ dodoc "${FILESDIR}"/grub.conf.gentoo
+
+ [[ -n ${GRUB_STATIC_PACKAGE_BUILDING} ]] && \
+ mv "${D}"/usr/share/doc/{${PF},grub-static-${PF/grub-}}
+
+ insinto /usr/share/grub
+ doins "${DISTDIR}"/splash.xpm.gz
+}
+
+setup_boot_dir() {
+ local boot_dir=$1
+ local dir=${boot_dir}
+
+ mkdir -p "${dir}"
+ [[ ! -L ${dir}/boot ]] && ln -s . "${dir}/boot"
+ dir="${dir}/grub"
+ if [[ ! -e ${dir} ]] ; then
+ mkdir "${dir}" || die
+ fi
+
+ # change menu.lst to grub.conf
+ if [[ ! -e ${dir}/grub.conf ]] && [[ -e ${dir}/menu.lst ]] ; then
+ mv -f "${dir}"/menu.lst "${dir}"/grub.conf
+ ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf"
+ echo
+ fi
+
+ if [[ ! -e ${dir}/menu.lst ]]; then
+ einfo "Linking from new grub.conf name to menu.lst"
+ ln -snf grub.conf "${dir}"/menu.lst
+ fi
+
+ if [[ -e ${dir}/stage2 ]] ; then
+ mv "${dir}"/stage2{,.old}
+ ewarn "*** IMPORTANT NOTE: you must run grub and install"
+ ewarn "the new version's stage1 to your MBR. Until you do,"
+ ewarn "stage1 and stage2 will still be the old version, but"
+ ewarn "later stages will be the new version, which could"
+ ewarn "cause problems such as an unbootable system."
+ ewarn
+ ewarn "This means you must use either grub-install or perform"
+ ewarn "root/setup manually."
+ ewarn
+ ewarn "For more help, see the handbook:"
+ ewarn "https://www.gentoo.org/doc/en/handbook/handbook-${ARCH}.xml?part=1&chap=10#grub-install-auto"
+ echo
+ fi
+
+ einfo "Copying files from /lib/grub and /usr/share/grub to ${dir}"
+ for x in \
+ "${ROOT}"/lib*/grub/*/* \
+ "${ROOT}"/usr/share/grub/* ; do
+ [[ -f ${x} ]] && cp -p "${x}" "${dir}"/
+ done
+
+ if [[ ! -e ${dir}/grub.conf ]] ; then
+ s="${ROOT}/usr/share/doc/${PF}/grub.conf.gentoo"
+ [[ -e "${s}" ]] && cat "${s}" >${dir}/grub.conf
+ [[ -e "${s}.gz" ]] && zcat "${s}.gz" >${dir}/grub.conf
+ [[ -e "${s}.bz2" ]] && bzcat "${s}.bz2" >${dir}/grub.conf
+ fi
+
+ # Per bug 218599, we support grub.conf.install for users that want to run a
+ # specific set of Grub setup commands rather than the default ones.
+ grub_config=${dir}/grub.conf.install
+ [[ -e ${grub_config} ]] || grub_config=${dir}/grub.conf
+ if [[ -e ${grub_config} ]] ; then
+ egrep \
+ -v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \
+ "${grub_config}" | \
+ /sbin/grub --batch \
+ --device-map="${dir}"/device.map \
+ > /dev/null
+ fi
+
+ # the grub default commands silently piss themselves if
+ # the default file does not exist ahead of time
+ if [[ ! -e ${dir}/default ]] ; then
+ grub-set-default --root-directory="${boot_dir}" default
+ fi
+ einfo "Grub has been installed to ${boot_dir} successfully."
+}
+
+pkg_postinst() {
+ mount-boot_mount_boot_partition
+
+ if [[ -n ${DONT_MOUNT_BOOT} ]]; then
+ elog "WARNING: you have DONT_MOUNT_BOOT in effect, so you must apply"
+ elog "the following instructions for your /boot!"
+ elog "Neglecting to do so may cause your system to fail to boot!"
+ elog
+ else
+ setup_boot_dir "${ROOT}"/boot
+ # Trailing output because if this is run from pkg_postinst, it gets mixed into
+ # the other output.
+ einfo ""
+ fi
+ elog "To interactively install grub files to another device such as a USB"
+ elog "stick, just run the following and specify the directory as prompted:"
+ elog " emerge --config =${PF}"
+ elog "Alternately, you can export GRUB_ALT_INSTALLDIR=/path/to/use to tell"
+ elog "grub where to install in a non-interactive way."
+
+ # needs to be after we call setup_boot_dir
+ mount-boot_pkg_postinst
+}
+
+pkg_config() {
+ local dir
+ if [ ! -d "${GRUB_ALT_INSTALLDIR}" ]; then
+ einfo "Enter the directory where you want to setup grub:"
+ read dir
+ else
+ dir="${GRUB_ALT_INSTALLDIR}"
+ fi
+ setup_boot_dir "${dir}"
+}
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2024-03-01 16:58 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-18 20:45 [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/files/, sys-boot/grub/ Ian Stakenvicius
-- strict thread matches above, loose matches on Subject: below --
2024-03-01 16:58 Andrew Ammerlaan
2023-09-11 1:49 Mike Gilbert
2023-07-09 22:42 Mike Gilbert
2021-09-23 18:49 Mike Gilbert
2021-04-21 15:43 Mike Gilbert
2019-02-08 15:20 Mikle Kolyada
2018-09-06 3:38 Mike Gilbert
2018-05-04 15:50 Mike Gilbert
2016-03-04 22:33 Mike Gilbert
2016-01-01 0:49 Robin H. Johnson
2015-12-15 17:05 Ian Stakenvicius
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox