core/grub to 2.06-1

This commit is contained in:
Kevin Mihelich 2021-06-14 14:00:46 +00:00
parent caeb040925
commit f0680b80ae
6 changed files with 80 additions and 6035 deletions

View file

@ -1,18 +1,27 @@
From 21e5bcf22ab1a9f08c63e2a0212219d7482f77c1 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Wed, 10 Mar 2021 18:42:25 +0100
Subject: [PATCH] 00_header: add GRUB_COLOR_* variables
---
util/grub-mkconfig.in | 2 ++
util/grub.d/00_header.in | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 3390ba9..c416489 100644 index f8cbb8d7a..1189d95f9 100644
--- a/util/grub-mkconfig.in --- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in
@@ -218,6 +218,8 @@ export GRUB_DEFAULT \ @@ -246,6 +246,8 @@ export GRUB_DEFAULT \
GRUB_BACKGROUND \
GRUB_THEME \ GRUB_THEME \
GRUB_GFXPAYLOAD_LINUX \ GRUB_GFXPAYLOAD_LINUX \
GRUB_DISABLE_OS_PROBER \
+ GRUB_COLOR_NORMAL \ + GRUB_COLOR_NORMAL \
+ GRUB_COLOR_HIGHLIGHT \ + GRUB_COLOR_HIGHLIGHT \
GRUB_INIT_TUNE \ GRUB_INIT_TUNE \
GRUB_SAVEDEFAULT \ GRUB_SAVEDEFAULT \
GRUB_ENABLE_CRYPTODISK \ GRUB_ENABLE_CRYPTODISK \
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
index d2e7252..8259f45 100644 index 93a90233e..c5955df00 100644
--- a/util/grub.d/00_header.in --- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in +++ b/util/grub.d/00_header.in
@@ -125,6 +125,14 @@ cat <<EOF @@ -125,6 +125,14 @@ cat <<EOF

View file

@ -1,17 +1,27 @@
From dbc289f59a2b204af19ef7212f3b6b07d3060452 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Mon, 26 Apr 2021 11:10:01 +0200
Subject: [PATCH 1/1] 10_linux: detect archlinux initramfs
---
util/grub.d/10_linux.in | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index f5d3e78..ef59c8c 100644 index e8b01c0d0..9b60af944 100644
--- a/util/grub.d/10_linux.in --- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in
@@ -83,6 +83,8 @@ linux_entry () @@ -91,6 +91,10 @@ linux_entry ()
fi
if [ x$type != xsimple ] ; then
case $type in case $type in
recovery) + booster)
title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;; + title="$(gettext_printf "%s, with Linux %s (booster initramfs)" "${os}" "${version}")" ;;
+ fallback) + fallback)
+ title="$(gettext_printf "%s, with Linux %s (fallback initramfs)" "${os}" "${version}")" ;; + title="$(gettext_printf "%s, with Linux %s (fallback initramfs)" "${os}" "${version}")" ;;
recovery)
title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
*) *)
title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;; @@ -198,7 +202,7 @@ while [ "x$list" != "x" ] ; do
esac
@@ -186,7 +188,7 @@ while [ "x$list" != "x" ] ; do
basename=`basename $linux` basename=`basename $linux`
dirname=`dirname $linux` dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname` rel_dirname=`make_system_path_relative_to_its_root $dirname`
@ -20,13 +30,13 @@ index f5d3e78..ef59c8c 100644
alt_version=`echo $version | sed -e "s,\.old$,,g"` alt_version=`echo $version | sed -e "s,\.old$,,g"`
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
@@ -248,6 +250,18 @@ while [ "x$list" != "x" ] ; do @@ -285,6 +289,29 @@ while [ "x$list" != "x" ] ; do
linux_entry "${OS}" "${version}" advanced \ linux_entry "${OS}" "${version}" advanced \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+ +
+ if test -e "${dirname}/initramfs-${version}-fallback.img" ; then + if test -e "${dirname}/initramfs-${version}-fallback.img" ; then
+ initrd="initramfs-${version}-fallback.img" + initrd="${initrd_early} initramfs-${version}-fallback.img"
+ +
+ if test -n "${initrd}" ; then + if test -n "${initrd}" ; then
+ gettext_printf "Found fallback initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd}" >&2 + gettext_printf "Found fallback initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd}" >&2
@ -35,6 +45,17 @@ index f5d3e78..ef59c8c 100644
+ linux_entry "${OS}" "${version}" fallback \ + linux_entry "${OS}" "${version}" fallback \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+ fi + fi
+
+ if test -e "${dirname}/booster-${version}.img" ; then
+ initrd="${initrd_early} booster-${version}.img"
+
+ if test -n "${initrd}" ; then
+ gettext_printf "Found booster initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd}" >&2
+ fi
+
+ linux_entry "${OS}" "${version}" booster \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+ fi
+ +
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" recovery \ linux_entry "${OS}" "${version}" recovery \

View file

@ -1,36 +0,0 @@
From ee855b15ff185bad3b0495500ab234b9cab7436c Mon Sep 17 00:00:00 2001
From: Martin Whitaker <fsf@martin-whitaker.me.uk>
Date: Mon, 24 Feb 2020 22:11:29 +0000
Subject: [PATCH] grub-install: fix inverted test for NLS enabled when copying
locales.
Commit 3d8439da8c9a4acf9bc1c41b364ec6e1680ef052 attempted to avoid
copying locale files to the target directory when NLS was disabled.
However the test is inverted, and it does the opposite.
Signed-off-by: Martin Whitaker <fsf@martin-whitaker.me.uk>
diff --git a/util/grub-install-common.c b/util/grub-install-common.c
index ca0ac612a..f53bf0694 100644
--- a/util/grub-install-common.c
+++ b/util/grub-install-common.c
@@ -598,7 +598,7 @@ copy_all (const char *srcd,
grub_util_fd_closedir (d);
}
-#if !(defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS)
+#if (defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS)
static const char *
get_localedir (void)
{
@@ -659,7 +659,7 @@ static void
grub_install_copy_nls(const char *src __attribute__ ((unused)),
const char *dst __attribute__ ((unused)))
{
-#if !(defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS)
+#if (defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS)
char *dst_locale;
dst_locale = grub_util_path_concat (2, dst, "locale");
--
2.21.1

File diff suppressed because it is too large Load diff

View file

@ -17,24 +17,23 @@ _IA32_EFI_IN_ARCH_X64="1"
## "1" to enable EMU build, "0" to disable ## "1" to enable EMU build, "0" to disable
_GRUB_EMU_BUILD="0" _GRUB_EMU_BUILD="0"
_GRUB_EXTRAS_COMMIT="8a245d5c1800627af4cefa99162a89c7a46d8842" [[ "${CARCH}" == 'x86_64' ]] && _EFI_ARCH='x86_64'
_GNULIB_COMMIT="be584c56eb1311606e5ea1a36363b97bddb6eed3" [[ "${CARCH}" == 'i686' ]] && _EFI_ARCH='i386'
_UNIFONT_VER="13.0.05" [[ "${CARCH}" == 'aarch64' ]] && _EFI_ARCH='aarch64'
[[ "${CARCH}" == "x86_64" ]] && _EFI_ARCH="x86_64" [[ "${CARCH}" == 'x86_64' ]] && _EMU_ARCH='x86_64'
[[ "${CARCH}" == "i686" ]] && _EFI_ARCH="i386" [[ "${CARCH}" == 'i686' ]] && _EMU_ARCH='i386'
[[ "${CARCH}" == "aarch64" ]] && _EFI_ARCH="aarch64" [[ "${CARCH}" == 'aarch64' ]] && _EMU_ARCH='aarch64'
[[ "${CARCH}" == "x86_64" ]] && _EMU_ARCH="x86_64"
[[ "${CARCH}" == "i686" ]] && _EMU_ARCH="i386"
[[ "${CARCH}" == "aarch64" ]] && _EMU_ARCH="aarch64"
pkgname='grub' pkgname='grub'
pkgdesc='GNU GRand Unified Bootloader (2)' pkgdesc='GNU GRand Unified Bootloader (2)'
epoch=2 epoch=2
_pkgver=2.04 _tag='53c5000739db114c229fe69ec3d4b76b92441098' # git rev-parse grub-${_pkgver}
_gnulib_commit='be584c56eb1311606e5ea1a36363b97bddb6eed3'
_unifont_ver='13.0.06'
_pkgver=2.06
pkgver=${_pkgver/-/} pkgver=${_pkgver/-/}
pkgrel=10 pkgrel=1
url='https://www.gnu.org/software/grub/' url='https://www.gnu.org/software/grub/'
arch=('x86_64') arch=('x86_64')
license=('GPL3') license=('GPL3')
@ -68,33 +67,22 @@ validpgpkeys=('E53D497F3FA42AD8C9B4D1E835A93B74E82E4209' # Vladimir 'phcoder' S
'BE5C23209ACDDACEB20DB0A28C8189F1988C2166' # Daniel Kiper <dkiper@net-space.pl> 'BE5C23209ACDDACEB20DB0A28C8189F1988C2166' # Daniel Kiper <dkiper@net-space.pl>
'95D2E9AB8740D8046387FD151A09227B1F435A33') # Paul Hardy <unifoundry@unifoundry.com> '95D2E9AB8740D8046387FD151A09227B1F435A33') # Paul Hardy <unifoundry@unifoundry.com>
source=("git+https://git.savannah.gnu.org/git/grub.git#tag=grub-${_pkgver}?signed" source=("git+https://git.savannah.gnu.org/git/grub.git#tag=${_tag}?signed"
"git+https://git.savannah.gnu.org/git/grub-extras.git#commit=${_GRUB_EXTRAS_COMMIT}" "git+https://git.savannah.gnu.org/git/gnulib.git#commit=${_gnulib_commit}"
"git+https://git.savannah.gnu.org/git/gnulib.git#commit=${_GNULIB_COMMIT}" "https://ftp.gnu.org/gnu/unifont/unifont-${_unifont_ver}/unifont-${_unifont_ver}.bdf.gz"{,.sig}
"https://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz"{,.sig} '0001-00_header-add-GRUB_COLOR_-variables.patch'
'0003-10_linux-detect-archlinux-initramfs.patch' '0002-10_linux-detect-archlinux-initramfs.patch'
'0004-add-GRUB_COLOR_variables.patch'
'0005-grub-install-fix-inverted-test-for-NLS-enabled-when-.patch'
'0006-BootHole.patch'
'grub.default') 'grub.default')
sha256sums=('SKIP' sha256sums=('SKIP'
'SKIP' 'SKIP'
'b7668a5d498972dc4981250c49f83601babce797be19b4fdd0f2f1c6cfbd0fc5'
'SKIP' 'SKIP'
'c4e61e9336d8d024479ea72616722c6c47c93f76dc173e8ad3edf9f9e07c3115' '5dee6628c48eef79812bb9e86ee772068d85e7fcebbd2b2b8d1e19d24eda9dab'
'SKIP' '8488aec30a93e8fe66c23ef8c23aefda39c38389530e9e73ba3fbcc8315d244d'
'171415ab075d1ac806f36c454feeb060f870416f24279b70104bba94bd6076d4'
'a5198267ceb04dceb6d2ea7800281a42b3f91fd02da55d2cc9ea20d47273ca29'
'06820004912a3db195a76e68b376fce1ba6507ac740129f0b99257ef07aba1ea'
'55c559b6d8c4a832a43cc35c7635de37402ec9e3e3bfd8b2b7761a06f0bfda02'
'791fadf182edf8d5bee4b45c008b08adce9689a9624971136527891a8f67d206') '791fadf182edf8d5bee4b45c008b08adce9689a9624971136527891a8f67d206')
_backports=( _backports=(
# grub-mkconfig: Use portable "command -v" to detect installed programs
'28a7e597de0d5584f65e36f9588ff9041936e617'
# build: Fix GRUB i386-pc build with Ubuntu gcc
'6643507ce30f775008e093580f0c9499dfb2c485'
) )
_configure_options=( _configure_options=(
@ -130,18 +118,12 @@ prepare() {
git cherry-pick -n "${_c}" git cherry-pick -n "${_c}"
done done
echo "Patch to detect of Arch Linux initramfs images by grub-mkconfig..."
patch -Np1 -i "${srcdir}/0003-10_linux-detect-archlinux-initramfs.patch"
echo "Patch to enable GRUB_COLOR_* variables in grub-mkconfig..." echo "Patch to enable GRUB_COLOR_* variables in grub-mkconfig..."
## Based on http://lists.gnu.org/archive/html/grub-devel/2012-02/msg00021.html ## Based on http://lists.gnu.org/archive/html/grub-devel/2012-02/msg00021.html
patch -Np1 -i "${srcdir}/0004-add-GRUB_COLOR_variables.patch" patch -Np1 -i "${srcdir}/0001-00_header-add-GRUB_COLOR_-variables.patch"
echo "Patch to NLS installation..." echo "Patch to detect of Arch Linux initramfs images by grub-mkconfig..."
patch -Np1 -i "${srcdir}/0005-grub-install-fix-inverted-test-for-NLS-enabled-when-.patch" patch -Np1 -i "${srcdir}/0002-10_linux-detect-archlinux-initramfs.patch"
echo "Patch BootHole..."
patch -Np1 -i "${srcdir}/0006-BootHole.patch"
echo "Fix DejaVuSans.ttf location so that grub-mkfont can create *.pf2 files for starfield theme..." echo "Fix DejaVuSans.ttf location so that grub-mkfont can create *.pf2 files for starfield theme..."
sed 's|/usr/share/fonts/dejavu|/usr/share/fonts/dejavu /usr/share/fonts/TTF|g' -i "configure.ac" sed 's|/usr/share/fonts/dejavu|/usr/share/fonts/dejavu /usr/share/fonts/TTF|g' -i "configure.ac"
@ -157,7 +139,7 @@ prepare() {
echo "Avoid problem with unifont during compile of grub..." echo "Avoid problem with unifont during compile of grub..."
# http://savannah.gnu.org/bugs/?40330 and https://bugs.archlinux.org/task/37847 # http://savannah.gnu.org/bugs/?40330 and https://bugs.archlinux.org/task/37847
gzip -cd "${srcdir}/unifont-${_UNIFONT_VER}.bdf.gz" > "unifont.bdf" gzip -cd "${srcdir}/unifont-${_unifont_ver}.bdf.gz" > "unifont.bdf"
echo "Run bootstrap..." echo "Run bootstrap..."
./bootstrap \ ./bootstrap \
@ -180,12 +162,6 @@ _build_grub-common_and_bios() {
cp -r "${srcdir}/grub/" "${srcdir}/grub-bios/" cp -r "${srcdir}/grub/" "${srcdir}/grub-bios/"
cd "${srcdir}/grub-bios/" cd "${srcdir}/grub-bios/"
echo "Add the grub-extra sources for bios build..."
install -d "${srcdir}/grub-bios/grub-extras"
cp -r "${srcdir}/grub-extras/915resolution" \
"${srcdir}/grub-bios/grub-extras/915resolution"
export GRUB_CONTRIB="${srcdir}/grub-bios/grub-extras/"
echo "Unset all compiler FLAGS for bios build..." echo "Unset all compiler FLAGS for bios build..."
unset CFLAGS unset CFLAGS
unset CPPFLAGS unset CPPFLAGS

View file

@ -6,12 +6,23 @@ post_upgrade() {
if [ ! -f /boot/grub/grub.cfg -a -f /boot/grub/grub.cfg.pacsave ]; then if [ ! -f /boot/grub/grub.cfg -a -f /boot/grub/grub.cfg.pacsave ]; then
mv /boot/grub/grub.cfg.pacsave /boot/grub/grub.cfg mv /boot/grub/grub.cfg.pacsave /boot/grub/grub.cfg
fi fi
# return if old package version greater 2:2.06-0...
(( $(vercmp $2 '2:2.06-0') > 0 )) && return
if [[ -e /sys/firmware/efi/efivars ]]; then
cat <<EOM
:: Grub does no longer support side-loading modules when secure boot is
enabled. Thus booting will fail, unless you have an efi executable
'grubx64.efi' with bundled modules.
EOM
fi
} }
post_install() { post_install() {
cat << 'EOM' cat <<EOM
Generate your bootloader configuration with: :: Generate your bootloader configuration with:
grub-mkconfig -o /boot/grub/grub.cfg grub-mkconfig -o /boot/grub/grub.cfg
EOM EOM
} }