summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorvenomega2020-04-03 14:27:23 -0400
committervenomega2020-04-03 14:27:23 -0400
commit189033f5fa5dac2b54b9afac485c70aa3e4ebad7 (patch)
treeb25bbad92757934189da9663043df1ccbd10b393
parentca8392d94d0ec1b17b7c4d4ccc48622aee84f749 (diff)
downloadaur-189033f5fa5dac2b54b9afac485c70aa3e4ebad7.tar.gz
Updated to grub 2.04, Reworked patches, Deleted unifont nonsense
-rwxr-xr-x[-rw-r--r--].SRCINFO56
-rw-r--r--01-intel-ucode.patch35
-rw-r--r--02-10_linux-detect-archlinux-initramfs.patch11
-rw-r--r--03-add-GRUB_COLOR_variables.patch6
-rw-r--r--04-ext4_feature_encrypt.patch143
-rw-r--r--04-gettext_quiet.patch (renamed from 05-gettext_quiet.patch)0
-rw-r--r--05-sleep_shift.patch (renamed from 06-sleep_shift.patch)0
-rw-r--r--06-maybe_quiet.patch (renamed from 07-maybe_quiet.patch)0
-rw-r--r--07-quick_boot.patch (renamed from 08-quick_boot.patch)0
-rw-r--r--09-Fix-packed-not-aligned-error-on-GCC-8.patch72
-rw-r--r--10-relocation.patch65
-rw-r--r--PKGBUILD81
-rw-r--r--grub.install1
-rw-r--r--grub.silent4
14 files changed, 78 insertions, 396 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 576a710707f9..ad4273ff2fac 100644..100755
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,32 +1,26 @@
pkgbase = grub-silent
pkgdesc = GNU GRand Unified Bootloader (2) [without welcome and kernel messages]
- pkgver = 2.02
+ pkgver = 2.04
pkgrel = 1
url = https://www.gnu.org/software/grub/
install = grub.install
arch = x86_64
arch = i686
license = GPL3
+ makedepends = autogen
+ makedepends = bdf-unifont
makedepends = git
- makedepends = rsync
- makedepends = xz
- makedepends = freetype2
- makedepends = ttf-dejavu
+ makedepends = help2man
makedepends = python
- makedepends = autogen
+ makedepends = rsync
makedepends = texinfo
- makedepends = help2man
- makedepends = gettext
- makedepends = device-mapper
- makedepends = fuse2
- depends = sh
- depends = xz
- depends = gettext
+ makedepends = ttf-dejavu
depends = device-mapper
+ depends = gettext
optdepends = freetype2: For grub-mkfont usage
optdepends = fuse2: For grub-mount usage
- optdepends = dosfstools: For grub-mkrescue FAT FS and EFI support
optdepends = efibootmgr: For grub-install EFI support
+ optdepends = dosfstools: For grub-mkrescue FAT FS and EFI support
optdepends = libisoburn: Provides xorriso for generating grub rescue iso using grub-mkrescue
optdepends = os-prober: To detect other OSes when generating grub.cfg in BIOS systems
optdepends = mtools: For grub-mkrescue FAT FS support
@@ -48,35 +42,27 @@ pkgbase = grub-silent
replaces = grub-emu
replaces = grub-efi-x86_64
options = !makeflags
- backup = etc/grub.d/40_custom
- source = https://ftp.gnu.org/gnu/grub/grub-2.02.tar.xz
- source = https://git.savannah.nongnu.org/cgit/grub-extras.git/snapshot/grub-extras-f2a079441939eee7251bf141986cdd78946e1d20.tar.gz
- source = https://ftp.gnu.org/gnu/unifont/unifont-10.0.06/unifont-10.0.06.bdf.gz
+ backup = etc/default/grub
+ source = https://ftp.gnu.org/gnu/grub/grub-2.04.tar.xz
+ source = https://git.savannah.nongnu.org/cgit/grub-extras.git/snapshot/grub-extras-8a245d5c1800627af4cefa99162a89c7a46d8842.tar.gz
source = 01-intel-ucode.patch
source = 02-10_linux-detect-archlinux-initramfs.patch
source = 03-add-GRUB_COLOR_variables.patch
- source = 04-ext4_feature_encrypt.patch
- source = 05-gettext_quiet.patch
- source = 06-sleep_shift.patch
- source = 07-maybe_quiet.patch
- source = 08-quick_boot.patch
- source = 09-Fix-packed-not-aligned-error-on-GCC-8.patch
- source = 10-relocation.patch
+ source = 04-gettext_quiet.patch
+ source = 05-sleep_shift.patch
+ source = 06-maybe_quiet.patch
+ source = 07-quick_boot.patch
source = grub.silent
- sha256sums = 810b3798d316394f94096ec2797909dbf23c858e48f7b3830826b8daa06b7b0f
- sha256sums = 2844601914cea6b1231eca0104853a93c4d67a5209933a0766f1475953300646
- sha256sums = 0d81571fc519573057b7641d26a31ead55cc0b02a931589fb346a3a534c3dcc1
- sha256sums = 37adb95049f6cdcbdbf60ed6b6440c5be99a4cd307a0f96c3c3837b6c2e07f3c
- sha256sums = b41e4438319136b5e74e0abdfcb64ae115393e4e15207490272c425f54026dd3
- sha256sums = a5198267ceb04dceb6d2ea7800281a42b3f91fd02da55d2cc9ea20d47273ca29
- sha256sums = 82b9e3fc8547c496cd28f39e75d8224d83c40481df3bfa33ae8169f7c7861362
+ sha256sums = e5292496995ad42dabe843a0192cf2a2c502e7ffcc7479398232b10a472df77d
+ sha256sums = 4fb9b26a597a88d94f2ffbfec53a44041c302fdc452bc6d88575bacf6ef97f70
+ sha256sums = 53d2f7ce9c704704e354ee2374a782764fcfd0c29a89e5e70923eb8c4681df6f
+ sha256sums = 43c8efaaa0860286a12a600088b567a70a20eb36005f0cabbe7cf7379e992f3e
+ sha256sums = f77417646a5480623f61006304bf68e3a733e77642978af949d4452f36e3203a
sha256sums = 39d7843dfe1e10ead912a81be370813b8621794a7967b3cc5e4d4188b5bf7264
sha256sums = 4b189e00a8c97ec09903e9588e02fc78b4bb114ee4822fcce13811aca00c8884
sha256sums = b7489c7facc4fb3dad4426c9c00079b64908640a2bec2409e22194daa3f72af4
sha256sums = 057f076ddca241d92a094bc05828e3eb18d3439bf4d2f3d8ca8fa1c51b5b1b2b
- sha256sums = e84b8de569c7e6b73263758c35cf95c6516fde85d4ed451991427864f6a4e5a8
- sha256sums = 51562fa1016c54567dbf42a86c0cfc902372ab579bbee17879a81aff09b76b99
- sha256sums = 764844ca8ee0869761cc1a7ed76b5c729ea560664ba26afc339ba4c5d5c7b2e3
+ sha256sums = 4f2e9d585b7b0ef8ce0d09e88391d1397b50883c7cb1516dc99785934abe15a2
pkgname = grub-silent
diff --git a/01-intel-ucode.patch b/01-intel-ucode.patch
index 98d8de82d0c0..2e2b25591176 100644
--- a/01-intel-ucode.patch
+++ b/01-intel-ucode.patch
@@ -1,8 +1,8 @@
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
-index de9044c..f5d3e78 100644
+index 4532266..66662a0 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
-@@ -133,13 +133,15 @@ linux_entry ()
+@@ -143,17 +143,14 @@ linux_entry ()
echo '$(echo "$message" | grub_quote)'
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
@@ -10,43 +10,44 @@ index de9044c..f5d3e78 100644
+ if test -n "${initrd}" -o -n "${initrd_extra}" ; then
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
message="$(gettext_printf "Loading initial ramdisk ...")"
+- initrd_path=
+- for i in ${initrd}; do
+- initrd_path="${initrd_path} ${rel_dirname}/${i}"
+- done
- sed "s/^/$submenu_indentation/" << EOF
- echo '$(echo "$message" | grub_quote)'
-- initrd ${rel_dirname}/${initrd}
+- initrd $(echo $initrd_path)
-EOF
+ printf ' %s\n' "echo '$(echo "$message" | grub_quote)'" | sed "s/^/$submenu_indentation/"
+ printf ' %s ' 'initrd' | sed "s/^/$submenu_indentation/"
+ for i in ${initrd_extra} ${initrd}; do
+ printf ' %s/%s' "${rel_dirname}" "${i}"
-+ done
-+ printf '\n'
++ done
fi
sed "s/^/$submenu_indentation/" << EOF
}
-@@ -202,6 +204,12 @@ while [ "x$list" != "x" ] ; do
- break
- fi
- done
+@@ -236,6 +233,13 @@ while [ "x$list" != "x" ] ; do
+ gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
+ fi
+
+ initrd_extra=
+ for i in intel-ucode.img; do
+ if test -e "${dirname}/${i}" ; then
+ initrd_extra="${initrd_extra} ${i}"
+ fi
+ done
-
++
config=
for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
-@@ -216,8 +224,8 @@ while [ "x$list" != "x" ] ; do
+ if test -e "${i}" ; then
+@@ -249,7 +253,9 @@ while [ "x$list" != "x" ] ; do
initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"`
fi
-- if test -n "${initrd}" ; then
-- gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
+- if test -z "${initramfs}" && test -z "${initrd_real}" ; then
+ if test -n "${initrd}" -o -n "${initrd_extra}" ; then
+ gettext_printf "Found initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd}" >&2
- elif test -z "${initramfs}" ; then
++ elif test -z "${initramfs}" && test -z "${initrd_real}" ; then
# "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's
# no initrd or builtin initramfs, it can't work here.
---
-2.9.2
-
+ if [ "x${GRUB_DEVICE_PARTUUID}" = "x" ] \
diff --git a/02-10_linux-detect-archlinux-initramfs.patch b/02-10_linux-detect-archlinux-initramfs.patch
index 5cbd19f51ca9..fbdef61b889c 100644
--- a/02-10_linux-detect-archlinux-initramfs.patch
+++ b/02-10_linux-detect-archlinux-initramfs.patch
@@ -1,8 +1,8 @@
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
-index f5d3e78..ef59c8c 100644
+index 66662a0..abbfc9e 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
-@@ -83,6 +83,8 @@ linux_entry ()
+@@ -93,6 +93,8 @@ linux_entry ()
case $type in
recovery)
title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
@@ -11,7 +11,7 @@ index f5d3e78..ef59c8c 100644
*)
title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
esac
-@@ -186,7 +188,7 @@ while [ "x$list" != "x" ] ; do
+@@ -195,7 +197,7 @@ while [ "x$list" != "x" ] ; do
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
@@ -20,7 +20,7 @@ index f5d3e78..ef59c8c 100644
alt_version=`echo $version | sed -e "s,\.old$,,g"`
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
-@@ -248,6 +250,18 @@ while [ "x$list" != "x" ] ; do
+@@ -283,6 +285,18 @@ while [ "x$list" != "x" ] ; do
linux_entry "${OS}" "${version}" advanced \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
@@ -39,6 +39,3 @@ index f5d3e78..ef59c8c 100644
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" recovery \
"single ${GRUB_CMDLINE_LINUX}"
---
-2.9.2
-
diff --git a/03-add-GRUB_COLOR_variables.patch b/03-add-GRUB_COLOR_variables.patch
index c113a81d5754..dad0ff925270 100644
--- a/03-add-GRUB_COLOR_variables.patch
+++ b/03-add-GRUB_COLOR_variables.patch
@@ -1,8 +1,8 @@
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
-index 3390ba9..c416489 100644
+index 9f477ff..b0e6d45 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
-@@ -218,6 +218,8 @@ export GRUB_DEFAULT \
+@@ -233,6 +233,8 @@ export GRUB_DEFAULT \
GRUB_THEME \
GRUB_GFXPAYLOAD_LINUX \
GRUB_DISABLE_OS_PROBER \
@@ -12,7 +12,7 @@ index 3390ba9..c416489 100644
GRUB_SAVEDEFAULT \
GRUB_ENABLE_CRYPTODISK \
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
-index d2e7252..8259f45 100644
+index 93a9023..c5955df 100644
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
@@ -125,6 +125,14 @@ cat <<EOF
diff --git a/04-ext4_feature_encrypt.patch b/04-ext4_feature_encrypt.patch
deleted file mode 100644
index 65b9b9f69a16..000000000000
--- a/04-ext4_feature_encrypt.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From 47a39db1b92abd0030b6be6c3a809bd9e4f39def Mon Sep 17 00:00:00 2001
-From: Eric Biggers <ebiggers@google.com>
-Date: Thu, 29 Jun 2017 13:27:49 +0000
-Subject: Allow GRUB to mount ext2/3/4 filesystems that have the encryption
- feature.
-
-On such a filesystem, inodes may have EXT4_ENCRYPT_FLAG set.
-For a regular file, this means its contents are encrypted; for a
-directory, this means the filenames in its directory entries are
-encrypted; and for a symlink, this means its target is encrypted. Since
-GRUB cannot decrypt encrypted contents or filenames, just issue an error
-if it would need to do so. This is sufficient to allow unencrypted boot
-files to co-exist with encrypted files elsewhere on the filesystem.
-
-(Note that encrypted regular files and symlinks will not normally be
-encountered outside an encrypted directory; however, it's possible via
-hard links, so they still need to be handled.)
-
-Tested by booting from an ext4 /boot partition on which I had run
-'tune2fs -O encrypt'. I also verified that the expected error messages
-are printed when trying to access encrypted directories, files, and
-symlinks from the GRUB command line. Also ran 'sudo ./grub-fs-tester
-ext4_encrypt'; note that this requires e2fsprogs v1.43+ and Linux v4.1+.
-
-Signed-off-by: Eric Biggers <ebiggers@google.com>
-
-Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=734668238fcc0ef691a080839e04f33854fa133a
-Bug-Debian: https://bugs.debian.org/840204
-Last-Update: 2017-07-06
-
-Patch-Name: ext4_feature_encrypt.patch
----
- grub-core/fs/ext2.c | 23 ++++++++++++++++++++++-
- tests/ext234_test.in | 1 +
- tests/util/grub-fs-tester.in | 10 ++++++++++
- 3 files changed, 33 insertions(+), 1 deletion(-)
-
-diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
-index cdce63bcc..b8ad75a0f 100644
---- a/grub-core/fs/ext2.c
-+++ b/grub-core/fs/ext2.c
-@@ -102,6 +102,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
- #define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
- #define EXT4_FEATURE_INCOMPAT_MMP 0x0100
- #define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
-+#define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000
-
- /* The set of back-incompatible features this driver DOES support. Add (OR)
- * flags here as the related features are implemented into the driver. */
-@@ -109,7 +110,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
- | EXT4_FEATURE_INCOMPAT_EXTENTS \
- | EXT4_FEATURE_INCOMPAT_FLEX_BG \
- | EXT2_FEATURE_INCOMPAT_META_BG \
-- | EXT4_FEATURE_INCOMPAT_64BIT)
-+ | EXT4_FEATURE_INCOMPAT_64BIT \
-+ | EXT4_FEATURE_INCOMPAT_ENCRYPT)
- /* List of rationales for the ignored "incompatible" features:
- * needs_recovery: Not really back-incompatible - was added as such to forbid
- * ext2 drivers from mounting an ext3 volume with a dirty
-@@ -138,6 +140,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
- #define EXT3_JOURNAL_FLAG_DELETED 4
- #define EXT3_JOURNAL_FLAG_LAST_TAG 8
-
-+#define EXT4_ENCRYPT_FLAG 0x800
- #define EXT4_EXTENTS_FLAG 0x80000
-
- /* The ext2 superblock. */
-@@ -706,6 +709,12 @@ grub_ext2_read_symlink (grub_fshelp_node_t node)
- grub_ext2_read_inode (diro->data, diro->ino, &diro->inode);
- if (grub_errno)
- return 0;
-+
-+ if (diro->inode.flags & grub_cpu_to_le32_compile_time (EXT4_ENCRYPT_FLAG))
-+ {
-+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "symlink is encrypted");
-+ return 0;
-+ }
- }
-
- symlink = grub_malloc (grub_le_to_cpu32 (diro->inode.size) + 1);
-@@ -749,6 +758,12 @@ grub_ext2_iterate_dir (grub_fshelp_node_t dir,
- return 0;
- }
-
-+ if (diro->inode.flags & grub_cpu_to_le32_compile_time (EXT4_ENCRYPT_FLAG))
-+ {
-+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "directory is encrypted");
-+ return 0;
-+ }
-+
- /* Search the file. */
- while (fpos < grub_le_to_cpu32 (diro->inode.size))
- {
-@@ -859,6 +874,12 @@ grub_ext2_open (struct grub_file *file, const char *name)
- goto fail;
- }
-
-+ if (fdiro->inode.flags & grub_cpu_to_le32_compile_time (EXT4_ENCRYPT_FLAG))
-+ {
-+ err = grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "file is encrypted");
-+ goto fail;
-+ }
-+
- grub_memcpy (data->inode, &fdiro->inode, sizeof (struct grub_ext2_inode));
- grub_free (fdiro);
-
-diff --git a/tests/ext234_test.in b/tests/ext234_test.in
-index c986960a8..5f4553607 100644
---- a/tests/ext234_test.in
-+++ b/tests/ext234_test.in
-@@ -30,3 +30,4 @@ fi
- "@builddir@/grub-fs-tester" ext3
- "@builddir@/grub-fs-tester" ext4
- "@builddir@/grub-fs-tester" ext4_metabg
-+"@builddir@/grub-fs-tester" ext4_encrypt
-diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
-index 2337771a1..5219aa8b4 100644
---- a/tests/util/grub-fs-tester.in
-+++ b/tests/util/grub-fs-tester.in
-@@ -135,6 +135,12 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
- # Could go further but what's the point?
- MAXBLKSIZE=$((65536*1024))
- ;;
-+ xext4_encrypt)
-+ # OS LIMITATION: Linux currently only allows the 'encrypt' feature
-+ # in combination with block_size = PAGE_SIZE (4096 bytes on x86).
-+ MINBLKSIZE=$(getconf PAGE_SIZE)
-+ MAXBLKSIZE=$MINBLKSIZE
-+ ;;
- xext*)
- MINBLKSIZE=1024
- if [ $MINBLKSIZE -lt $SECSIZE ]; then
-@@ -766,6 +772,10 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
- MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext4" -O meta_bg,^resize_inode -b $BLKSIZE -L "$FSLABEL" -q "${LODEVICES[0]}"
- MOUNTFS=ext4
- ;;
-+ xext4_encrypt)
-+ MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext4" -O encrypt -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}"
-+ MOUNTFS=ext4
-+ ;;
- xext*)
- MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.$fs" -b $BLKSIZE -L "$FSLABEL" -q "${LODEVICES[0]}" ;;
- xxfs)
diff --git a/05-gettext_quiet.patch b/04-gettext_quiet.patch
index 162b01afd439..162b01afd439 100644
--- a/05-gettext_quiet.patch
+++ b/04-gettext_quiet.patch
diff --git a/06-sleep_shift.patch b/05-sleep_shift.patch
index 973cb8702207..973cb8702207 100644
--- a/06-sleep_shift.patch
+++ b/05-sleep_shift.patch
diff --git a/07-maybe_quiet.patch b/06-maybe_quiet.patch
index 59bd82237f93..59bd82237f93 100644
--- a/07-maybe_quiet.patch
+++ b/06-maybe_quiet.patch
diff --git a/08-quick_boot.patch b/07-quick_boot.patch
index 075f9ea9bcde..075f9ea9bcde 100644
--- a/08-quick_boot.patch
+++ b/07-quick_boot.patch
diff --git a/09-Fix-packed-not-aligned-error-on-GCC-8.patch b/09-Fix-packed-not-aligned-error-on-GCC-8.patch
deleted file mode 100644
index 2d09149f72d4..000000000000
--- a/09-Fix-packed-not-aligned-error-on-GCC-8.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-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 4849c1ceb..be195448d 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 9b6b729f4..36d2dedf4 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 1b32f6725..9668a68c3 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.1-33-g03f6
-
diff --git a/10-relocation.patch b/10-relocation.patch
deleted file mode 100644
index 1aeae68493f7..000000000000
--- a/10-relocation.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-commit 842c390469e2c2e10b5aa36700324cd3bde25875
-Author: H.J. Lu <hjl.tools@gmail.com>
-Date: Sat Feb 17 06:47:28 2018 -0800
-
- x86-64: Treat R_X86_64_PLT32 as R_X86_64_PC32
-
- Starting from binutils commit bd7ab16b4537788ad53521c45469a1bdae84ad4a:
-
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bd7ab16b4537788ad53521c45469a1bdae84ad4a
-
- x86-64 assembler generates R_X86_64_PLT32, instead of R_X86_64_PC32, for
- 32-bit PC-relative branches. Grub2 should treat R_X86_64_PLT32 as
- R_X86_64_PC32.
-
- Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
- Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
-
-diff --git a/grub-core/efiemu/i386/loadcore64.c b/grub-core/efiemu/i386/loadcore64.c
-index e49d0b6ff..18facf47f 100644
---- a/grub-core/efiemu/i386/loadcore64.c
-+++ b/grub-core/efiemu/i386/loadcore64.c
-@@ -98,6 +98,7 @@ grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs,
- break;
-
- case R_X86_64_PC32:
-+ case R_X86_64_PLT32:
- err = grub_efiemu_write_value (addr,
- *addr32 + rel->r_addend
- + sym.off
-diff --git a/grub-core/kern/x86_64/dl.c b/grub-core/kern/x86_64/dl.c
-index 440690673..3a73e6e6c 100644
---- a/grub-core/kern/x86_64/dl.c
-+++ b/grub-core/kern/x86_64/dl.c
-@@ -70,6 +70,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
- break;
-
- case R_X86_64_PC32:
-+ case R_X86_64_PLT32:
- {
- grub_int64_t value;
- value = ((grub_int32_t) *addr32) + rel->r_addend + sym->st_value -
-diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
-index a2bb05439..39d7efb91 100644
---- a/util/grub-mkimagexx.c
-+++ b/util/grub-mkimagexx.c
-@@ -841,6 +841,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
- break;
-
- case R_X86_64_PC32:
-+ case R_X86_64_PLT32:
- {
- grub_uint32_t *t32 = (grub_uint32_t *) target;
- *t32 = grub_host_to_target64 (grub_target_to_host32 (*t32)
-diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c
-index 9179285a5..a79271f66 100644
---- a/util/grub-module-verifier.c
-+++ b/util/grub-module-verifier.c
-@@ -19,6 +19,7 @@ struct grub_module_verifier_arch archs[] = {
- -1
- }, (int[]){
- R_X86_64_PC32,
-+ R_X86_64_PLT32,
- -1
- }
- },
diff --git a/PKGBUILD b/PKGBUILD
index 3d4255e3ae1c..80c10c409ac0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,7 @@
+# Derived from official Arch Linux grub package
+# Maintainer : Angel Perez <near1297@nauta.cu>
# Maintainer : Martin Villagra <possum@archlinux.org>
-# Contributor : Özgür Sarıer <echo b3pndXJzYXJpZXIxMDExNjAxMTE1QGdtYWlsLmNvbQo= | base64 -d>
-# Derived from official Arch Lnux grub package
+# Contributor: Özgür Sarıer <echo b3pndXJzYXJpZXIxMDExNjAxMTE1QGdtYWlsLmNvbQo= | base64 -d>
# Maintainer : Christian Hesse <mail@eworm.de>
# Maintainer : Ronald van Haren <ronald.archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
@@ -12,9 +13,7 @@ _IA32_EFI_IN_ARCH_X64="1"
## "1" to enable EMU build, "0" to disable
_GRUB_EMU_BUILD="0"
-_GRUB_EXTRAS_COMMIT="f2a079441939eee7251bf141986cdd78946e1d20"
-
-_UNIFONT_VER="10.0.06"
+_GRUB_EXTRAS_COMMIT="8a245d5c1800627af4cefa99162a89c7a46d8842"
[[ "${CARCH}" == "x86_64" ]] && _EFI_ARCH="x86_64"
[[ "${CARCH}" == "i686" ]] && _EFI_ARCH="i386"
@@ -24,12 +23,13 @@ _UNIFONT_VER="10.0.06"
pkgname="grub-silent"
pkgdesc="GNU GRand Unified Bootloader (2) [without welcome and kernel messages]"
-pkgver=2.02
+pkgver=2.04
pkgrel=1
url="https://www.gnu.org/software/grub/"
arch=('x86_64' 'i686')
license=('GPL3')
backup=('etc/grub.d/40_custom')
+backup=('etc/default/grub')
install="${pkgname%-*}.install"
options=('!makeflags')
@@ -37,13 +37,13 @@ conflicts=('grub' 'grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}" '
replaces=('grub' 'grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}")
provides=('grub' 'grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}")
-makedepends=('git' 'rsync' 'xz' 'freetype2' 'ttf-dejavu' 'python' 'autogen'
- 'texinfo' 'help2man' 'gettext' 'device-mapper' 'fuse2')
-depends=('sh' 'xz' 'gettext' 'device-mapper')
+makedepends=('autogen' 'bdf-unifont' 'git' 'help2man'
+ 'python' 'rsync' 'texinfo' 'ttf-dejavu')
+depends=('device-mapper' 'gettext')
optdepends=('freetype2: For grub-mkfont usage'
'fuse2: For grub-mount usage'
- 'dosfstools: For grub-mkrescue FAT FS and EFI support'
'efibootmgr: For grub-install EFI support'
+ 'dosfstools: For grub-mkrescue FAT FS and EFI support'
'libisoburn: Provides xorriso for generating grub rescue iso using grub-mkrescue'
'os-prober: To detect other OSes when generating grub.cfg in BIOS systems'
'mtools: For grub-mkrescue FAT FS support')
@@ -56,33 +56,25 @@ fi
source=("https://ftp.gnu.org/gnu/${pkgname%-*}/${pkgname%-*}-${pkgver}.tar.xz"
"https://git.savannah.nongnu.org/cgit/grub-extras.git/snapshot/grub-extras-${_GRUB_EXTRAS_COMMIT}.tar.gz"
- "https://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz"
'01-intel-ucode.patch'
'02-10_linux-detect-archlinux-initramfs.patch'
'03-add-GRUB_COLOR_variables.patch'
- '04-ext4_feature_encrypt.patch'
- '05-gettext_quiet.patch'
- '06-sleep_shift.patch'
- '07-maybe_quiet.patch'
- '08-quick_boot.patch'
- '09-Fix-packed-not-aligned-error-on-GCC-8.patch'
- '10-relocation.patch'
+ '04-gettext_quiet.patch'
+ '05-sleep_shift.patch'
+ '06-maybe_quiet.patch'
+ '07-quick_boot.patch'
'grub.silent')
-sha256sums=('810b3798d316394f94096ec2797909dbf23c858e48f7b3830826b8daa06b7b0f'
- '2844601914cea6b1231eca0104853a93c4d67a5209933a0766f1475953300646'
- '0d81571fc519573057b7641d26a31ead55cc0b02a931589fb346a3a534c3dcc1'
- '37adb95049f6cdcbdbf60ed6b6440c5be99a4cd307a0f96c3c3837b6c2e07f3c'
- 'b41e4438319136b5e74e0abdfcb64ae115393e4e15207490272c425f54026dd3'
- 'a5198267ceb04dceb6d2ea7800281a42b3f91fd02da55d2cc9ea20d47273ca29'
- '82b9e3fc8547c496cd28f39e75d8224d83c40481df3bfa33ae8169f7c7861362'
+sha256sums=('e5292496995ad42dabe843a0192cf2a2c502e7ffcc7479398232b10a472df77d'
+ '4fb9b26a597a88d94f2ffbfec53a44041c302fdc452bc6d88575bacf6ef97f70'
+ '53d2f7ce9c704704e354ee2374a782764fcfd0c29a89e5e70923eb8c4681df6f'
+ '43c8efaaa0860286a12a600088b567a70a20eb36005f0cabbe7cf7379e992f3e'
+ 'f77417646a5480623f61006304bf68e3a733e77642978af949d4452f36e3203a'
'39d7843dfe1e10ead912a81be370813b8621794a7967b3cc5e4d4188b5bf7264'
'4b189e00a8c97ec09903e9588e02fc78b4bb114ee4822fcce13811aca00c8884'
'b7489c7facc4fb3dad4426c9c00079b64908640a2bec2409e22194daa3f72af4'
'057f076ddca241d92a094bc05828e3eb18d3439bf4d2f3d8ca8fa1c51b5b1b2b'
- 'e84b8de569c7e6b73263758c35cf95c6516fde85d4ed451991427864f6a4e5a8'
- '51562fa1016c54567dbf42a86c0cfc902372ab579bbee17879a81aff09b76b99'
- '764844ca8ee0869761cc1a7ed76b5c729ea560664ba26afc339ba4c5d5c7b2e3')
+ '4f2e9d585b7b0ef8ce0d09e88391d1397b50883c7cb1516dc99785934abe15a2')
prepare() {
cd "${srcdir}/grub-${pkgver}/"
@@ -100,10 +92,6 @@ prepare() {
patch -Np1 -i "${srcdir}/03-add-GRUB_COLOR_variables.patch"
echo
- msg "Patch to allow GRUB to mount ext2/3/4 filesystems that have the encryption feature"
- patch -Np1 -i "${srcdir}/04-ext4_feature_encrypt.patch"
- echo
-
msg "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"
@@ -114,30 +102,19 @@ prepare() {
sed 's|GNU/Linux|Linux|' -i "util/grub.d/10_linux.in"
msg "Appling Ubuntu patches for making GRUB silent"
- patch -Np1 -i "${srcdir}/05-gettext_quiet.patch"
- patch -Np1 -i "${srcdir}/06-sleep_shift.patch"
- patch -Np1 -i "${srcdir}/07-maybe_quiet.patch"
- patch -Np1 -i "${srcdir}/08-quick_boot.patch"
- echo
-
- msg "Appling fix for packed not aligned error on GCC-8"
- patch -Np1 -i "${srcdir}/09-Fix-packed-not-aligned-error-on-GCC-8.patch"
- echo
-
- msg "Applying fix for relocation error 0x4"
- patch -Np1 -i "${srcdir}/10-relocation.patch"
+ patch -Np1 -i "${srcdir}/04-gettext_quiet.patch"
+ patch -Np1 -i "${srcdir}/05-sleep_shift.patch"
+ patch -Np1 -i "${srcdir}/06-maybe_quiet.patch"
+ patch -Np1 -i "${srcdir}/07-quick_boot.patch"
echo
msg "Pull in latest language files"
./linguas.sh
echo
- msg "Remove not working langs which need LC_ALL=C.UTF-8"
- sed -e 's#en@cyrillic en@greek##g' -i "po/LINGUAS"
-
- msg "Avoid problem with unifont during compile of grub"
- # http://savannah.gnu.org/bugs/?40330 and https://bugs.archlinux.org/task/37847
- cp "${srcdir}/unifont-${_UNIFONT_VER}.bdf.gz" "unifont.bdf.gz"
+ # Remove lua module from grub-extras as it is incompatible with changes to grub_file_open
+ # http://git.savannah.gnu.org/cgit/grub.git/commit/?id=ca0a4f689a02c2c5a5e385f874aaaa38e151564e
+ rm -rf "$srcdir"/grub-extras/lua
}
_build_grub-common_and_bios() {
@@ -334,8 +311,8 @@ _package_grub-common_and_bios() {
rm -f "${pkgdir}/usr/lib/grub/i386-pc"/*.image || true
rm -f "${pkgdir}/usr/lib/grub/i386-pc"/{kernel.exec,gdb_grub,gmodule.pl} || true
-# msg "Install a sample file for /etc/default/grub "
- install -D -m0644 "${srcdir}/grub.silent" "${pkgdir}/etc/default/grub.silent"
+# msg "Install config file for /etc/default/grub "
+ install -D -m0644 "${srcdir}/grub.silent" "${pkgdir}/etc/default/grub"
}
_package_grub-efi() {
diff --git a/grub.install b/grub.install
index d8b4d7930aa6..f88164dd068b 100644
--- a/grub.install
+++ b/grub.install
@@ -1,4 +1,5 @@
post_install() {
+ setterm -cursor on >> /etc/issue
printf "\e[37;1m\e[44;1m%s\e[0m\n" "\
- Please reinstall GRUB first:
# grub-install --target=i386-pc --boot-directory=/your/boot/partition --bootloader-id=GRUB /dev/sdx
diff --git a/grub.silent b/grub.silent
index 041071a79f46..61529f8cb8f1 100644
--- a/grub.silent
+++ b/grub.silent
@@ -4,14 +4,14 @@ GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_RECORDFAIL_TIMEOUT=$GRUB_TIMEOUT
GRUB_DISTRIBUTOR="Arch"
-GRUB_CMDLINE_LINUX_DEFAULT="quiet vt.global_cursor_default=0 loglevel=3 vga=current rd.systemd.show_status=false rd.udev.log-priority=3"
+GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vt.global_cursor_default=0 loglevel=2 rd.systemd.show_status=false rd.udev.log-priority=3 sysrq_always_enabled=1"
GRUB_CMDLINE_LINUX=""
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# Uncomment to enable booting from LUKS encrypted devices
-#GRUB_ENABLE_CRYPTODISK=y
+#GRUB_ENABLE_CRYPTODISK=true
# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=0