commit: c13a3c43d0e579b5439cdd447e4e4c232abfb52b
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 13 23:47:39 2025 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Dec 14 00:01:00 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c13a3c43
sys-boot/grub: add 2.12-r9, 2.14_rc1-r3 with default branding, no patches needed
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
.../grub/{grub-9999.ebuild => grub-2.12-r9.ebuild} | 90 +++++++++++-----------
.../{grub-9999.ebuild => grub-2.14_rc1-r3.ebuild} | 28 ++++---
sys-boot/grub/grub-9999.ebuild | 7 +-
3 files changed, 70 insertions(+), 55 deletions(-)
diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-2.12-r9.ebuild
similarity index 84%
copy from sys-boot/grub/grub-9999.ebuild
copy to sys-boot/grub/grub-2.12-r9.ebuild
index 308c002858b0..6df1bcb2a6c4 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-2.12-r9.ebuild
@@ -1,12 +1,12 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=8
+EAPI=7
# This ebuild uses 3 special global variables:
-# GRUB_BOOTSTRAP: Invoke bootstrap (gnulib)
-# GRUB_AUTOGEN: Invoke autogen.sh
-# GRUB_AUTORECONF: Inherit autotools and invoke eautoreconf
+# GRUB_BOOTSTRAP: Depend on python and invoke bootstrap (gnulib).
+# GRUB_AUTOGEN: Depend on python and invoke autogen.sh.
+# GRUB_AUTORECONF: Inherit autotools and invoke eautoreconf.
#
# When applying patches:
# If gnulib is updated, set GRUB_BOOTSTRAP=1
@@ -16,26 +16,26 @@ EAPI=8
# If any of the above applies to a user patch, the user should set the
# corresponding variable in make.conf or the environment.
-if [[ ${PV} == 9999 ]]; then
- GRUB_AUTORECONF=1
- GRUB_BOOTSTRAP=1
-fi
-
-PYTHON_COMPAT=( python3_{11..14} )
+GRUB_AUTOGEN=1
+GRUB_AUTORECONF=1
+PYTHON_COMPAT=( python3_{10..13} )
WANT_LIBTOOL=none
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/grub.asc
if [[ -n ${GRUB_AUTORECONF} ]]; then
inherit autotools
fi
inherit bash-completion-r1 eapi9-ver flag-o-matic multibuild optfeature
-inherit python-any-r1 secureboot toolchain-funcs verify-sig
+inherit python-any-r1 secureboot toolchain-funcs
DESCRIPTION="GNU GRUB boot loader"
HOMEPAGE="https://www.gnu.org/software/grub/"
MY_P=${P}
if [[ ${PV} != 9999 ]]; then
+ inherit verify-sig
+
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/_/'~'}
@@ -47,37 +47,36 @@ if [[ ${PV} != 9999 ]]; then
else
SRC_URI="
mirror://gnu/${PN}/${P}.tar.xz
+
https://dev.gentoo.org/~floppym/dist/${P}-bash-completion.patch.gz
verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )
"
S=${WORKDIR}/${P%_*}
fi
- BDEPEND="
- verify-sig? (
- sec-keys/openpgp-keys-grub
- sec-keys/openpgp-keys-unifont
- )
- "
+ BDEPEND="verify-sig? ( sec-keys/openpgp-keys-grub )"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
else
inherit git-r3
EGIT_REPO_URI="https://git.savannah.gnu.org/git/grub.git"
fi
-DEJAVU_VER=2.37
-DEJAVU=dejavu-fonts-ttf-${DEJAVU_VER}
-UNIFONT=unifont-17.0.02
-SRC_URI+="
- fonts? (
- mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz
- verify-sig? (
mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz.sig )
- )
- themes? (
https://downloads.sourceforge.net/project/dejavu/dejavu/${DEJAVU_VER}/${DEJAVU}.tar.bz2
)
-"
+PATCHES=(
+ "${FILESDIR}"/gfxpayload.patch
+ "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch
+ "${FILESDIR}"/grub-2.06-test-words.patch
+ "${FILESDIR}"/grub-2.12-fwsetup.patch
+ "${WORKDIR}"/grub-2.12-bash-completion.patch
+ "${FILESDIR}"/grub-2.12-zfs-zstd-compression-support.patch
+)
+
+DEJAVU=dejavu-sans-ttf-2.37
+UNIFONT=unifont-15.0.06
+SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz )
+ themes? ( https://downloads.sourceforge.net/dejavu/${DEJAVU}.zip )"
# 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 protect sdl test +themes
truetype libzfs"
+IUSE="+branding +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 )
@@ -111,6 +110,7 @@ BDEPEND+="
sys-fs/squashfs-tools
)
themes? (
+ app-arch/unzip
media-libs/freetype:2
virtual/pkgconfig
)
@@ -128,9 +128,9 @@ DEPEND="
truetype? ( media-libs/freetype:2= )
ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 )
ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 )
- protect? ( dev-libs/libtasn1:= )
"
RDEPEND="${DEPEND}
+ branding? ( >=sys-boot/grub-themes-gentoo-1.0-r1 )
kernel_linux? (
grub_platforms_efi-32? ( sys-boot/efibootmgr )
grub_platforms_efi-64? ( sys-boot/efibootmgr )
@@ -158,15 +158,9 @@ src_unpack() {
local GNULIB_REVISION=$(source bootstrap.conf >/dev/null; echo
"${GNULIB_REVISION}")
git-r3_fetch "${GNULIB_URI}" "${GNULIB_REVISION}"
git-r3_checkout "${GNULIB_URI}" gnulib
- sh linguas.sh || die
popd >/dev/null || die
elif use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sig} \
- "${BROOT}"/usr/share/openpgp-keys/grub.asc
- fi
- if use fonts && use verify-sig; then
- verify-sig_verify_detached
"${DISTDIR}"/${UNIFONT}.pcf.gz{,.sig} \
- "${BROOT}"/usr/share/openpgp-keys/unifont.asc
+ verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sig}
fi
default
}
@@ -186,6 +180,10 @@ src_prepare() {
if [[ -n ${GRUB_AUTORECONF} ]]; then
eautoreconf
fi
+
+ # Avoid error due to extra_deps.lst missing from source tarball:
+ # make[3]: *** No rule to make target 'grub-core/extra_deps.lst',
needed by 'syminfo.lst'. Stop.
+ echo "depends bli part_gpt" > grub-core/extra_deps.lst || die
}
grub_do() {
@@ -227,7 +225,6 @@ grub_configure() {
$(use_enable device-mapper)
$(use_enable mount grub-mount)
$(use_enable nls)
- $(use_enable protect grub-protect)
$(use_enable themes grub-themes)
$(use_enable truetype grub-mkfont)
$(use_enable libzfs)
@@ -240,11 +237,11 @@ grub_configure() {
)
if use fonts; then
- cp "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
+ ln -rs "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
fi
if use themes; then
- cp "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf ||
die
+ ln -rs "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf
|| die
fi
local ECONF_SOURCE="${S}"
@@ -374,6 +371,10 @@ src_install() {
insinto /etc/default
newins "${FILESDIR}"/grub.default-4 grub
+ if use branding && use themes ; then
+ sed -e
's:^#GRUB_THEME=.*$:GRUB_THEME="/boot/grub/themes/gentoo_glass/theme.txt":g' -i
"${D}/etc/default/grub" || die
+ fi
+
# https://bugs.gentoo.org/231935
dostrip -x /usr/lib/grub
@@ -406,17 +407,16 @@ pkg_postinst() {
ewarn
fi
+ 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 has_version sys-boot/os-prober; then
ewarn "Due to security concerns, os-prober is disabled by
default."
ewarn "Set GRUB_DISABLE_OS_PROBER=false in /etc/default/grub to
enable it."
fi
- if grep -q GRUB_LINUX_KERNEL_GLOBS "${EROOT}"/etc/default/grub; then
- ewarn "Support for GRUB_LINUX_KERNEL_GLOBS has been dropped."
- ewarn "Ensure that your kernels are named appropriately or edit"
- ewarn "/etc/grub.d/10_linux to compensate."
- fi
-
if use secureboot; then
elog
elog "The signed standalone grub EFI executable(s) are
available in:"
diff --git a/sys-boot/grub/grub-9999.ebuild
b/sys-boot/grub/grub-2.14_rc1-r3.ebuild
similarity index 94%
copy from sys-boot/grub/grub-9999.ebuild
copy to sys-boot/grub/grub-2.14_rc1-r3.ebuild
index 308c002858b0..763a0f6d43e5 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-2.14_rc1-r3.ebuild
@@ -16,8 +16,8 @@ EAPI=8
# If any of the above applies to a user patch, the user should set the
# corresponding variable in make.conf or the environment.
+GRUB_AUTORECONF=1
if [[ ${PV} == 9999 ]]; then
- GRUB_AUTORECONF=1
GRUB_BOOTSTRAP=1
fi
@@ -63,6 +63,13 @@ else
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}"/grub-2.06-test-words.patch
+ "${FILESDIR}"/grub-2.14_rc1-configure.ac-avoid-bashisms.patch
+)
+
DEJAVU_VER=2.37
DEJAVU=dejavu-fonts-ttf-${DEJAVU_VER}
UNIFONT=unifont-17.0.02
@@ -77,7 +84,7 @@ SRC_URI+="
# 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 protect sdl test +themes
truetype libzfs"
+IUSE="+branding +device-mapper doc efiemu +fonts mount nls protect 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 )
@@ -131,6 +138,7 @@ DEPEND="
protect? ( dev-libs/libtasn1:= )
"
RDEPEND="${DEPEND}
+ branding? ( >=sys-boot/grub-themes-gentoo-1.0-r1 )
kernel_linux? (
grub_platforms_efi-32? ( sys-boot/efibootmgr )
grub_platforms_efi-64? ( sys-boot/efibootmgr )
@@ -158,7 +166,6 @@ src_unpack() {
local GNULIB_REVISION=$(source bootstrap.conf >/dev/null; echo
"${GNULIB_REVISION}")
git-r3_fetch "${GNULIB_URI}" "${GNULIB_REVISION}"
git-r3_checkout "${GNULIB_URI}" gnulib
- sh linguas.sh || die
popd >/dev/null || die
elif use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sig} \
@@ -374,6 +381,10 @@ src_install() {
insinto /etc/default
newins "${FILESDIR}"/grub.default-4 grub
+ if use branding && use themes ; then
+ sed -e
's:^#GRUB_THEME=.*$:GRUB_THEME="/boot/grub/themes/gentoo_glass/theme.txt":g' -i
"${D}/etc/default/grub" || die
+ fi
+
# https://bugs.gentoo.org/231935
dostrip -x /usr/lib/grub
@@ -406,17 +417,16 @@ pkg_postinst() {
ewarn
fi
+ 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 has_version sys-boot/os-prober; then
ewarn "Due to security concerns, os-prober is disabled by
default."
ewarn "Set GRUB_DISABLE_OS_PROBER=false in /etc/default/grub to
enable it."
fi
- if grep -q GRUB_LINUX_KERNEL_GLOBS "${EROOT}"/etc/default/grub; then
- ewarn "Support for GRUB_LINUX_KERNEL_GLOBS has been dropped."
- ewarn "Ensure that your kernels are named appropriately or edit"
- ewarn "/etc/grub.d/10_linux to compensate."
- fi
-
if use secureboot; then
elog
elog "The signed standalone grub EFI executable(s) are
available in:"
diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebuild
index 308c002858b0..e13cf7fd9d24 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-9999.ebuild
@@ -77,7 +77,7 @@ SRC_URI+="
# 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 protect sdl test +themes
truetype libzfs"
+IUSE="+branding +device-mapper doc efiemu +fonts mount nls protect 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 )
@@ -131,6 +131,7 @@ DEPEND="
protect? ( dev-libs/libtasn1:= )
"
RDEPEND="${DEPEND}
+ branding? ( >=sys-boot/grub-themes-gentoo-1.0-r1 )
kernel_linux? (
grub_platforms_efi-32? ( sys-boot/efibootmgr )
grub_platforms_efi-64? ( sys-boot/efibootmgr )
@@ -374,6 +375,10 @@ src_install() {
insinto /etc/default
newins "${FILESDIR}"/grub.default-4 grub
+ if use branding && use themes ; then
+ sed -e
's:^#GRUB_THEME=.*$:GRUB_THEME="/boot/grub/themes/gentoo_glass/theme.txt":g' -i
"${D}/etc/default/grub" || die
+ fi
+
# https://bugs.gentoo.org/231935
dostrip -x /usr/lib/grub