From 2bc7869f555f8cbb8f1c247357646234d0793236 Mon Sep 17 00:00:00 2001 From: Matt Housh Date: Mon, 22 Jul 2019 15:37:54 -0500 Subject: [PATCH] grub2-efi: updated to version 2.04 --- grub2-efi/.footprint | 38 +++++++++++++++++-- grub2-efi/.signature | 10 ++--- grub2-efi/Pkgfile | 13 ++----- grub2-efi/grub2-relocation.patch | 65 -------------------------------- grub2-efi/grub2-xfs.patch | 60 ----------------------------- 5 files changed, 41 insertions(+), 145 deletions(-) delete mode 100644 grub2-efi/grub2-relocation.patch delete mode 100644 grub2-efi/grub2-xfs.patch diff --git a/grub2-efi/.footprint b/grub2-efi/.footprint index 6a99af599..c098149ed 100644 --- a/grub2-efi/.footprint +++ b/grub2-efi/.footprint @@ -127,8 +127,11 @@ drwxr-xr-x root/root usr/lib/grub/i386-efi/ -rwxr-xr-x root/root usr/lib/grub/i386-efi/ext2.module -rw-r--r-- root/root usr/lib/grub/i386-efi/extcmd.mod -rwxr-xr-x root/root usr/lib/grub/i386-efi/extcmd.module +-rw-r--r-- root/root usr/lib/grub/i386-efi/f2fs.mod +-rwxr-xr-x root/root usr/lib/grub/i386-efi/f2fs.module -rw-r--r-- root/root usr/lib/grub/i386-efi/fat.mod -rwxr-xr-x root/root usr/lib/grub/i386-efi/fat.module +-rw-r--r-- root/root usr/lib/grub/i386-efi/fdt.lst (EMPTY) -rw-r--r-- root/root usr/lib/grub/i386-efi/file.mod -rwxr-xr-x root/root usr/lib/grub/i386-efi/file.module -rw-r--r-- root/root usr/lib/grub/i386-efi/fixvideo.mod @@ -378,6 +381,8 @@ drwxr-xr-x root/root usr/lib/grub/i386-efi/ -rwxr-xr-x root/root usr/lib/grub/i386-efi/pbkdf2_test.module -rw-r--r-- root/root usr/lib/grub/i386-efi/pcidump.mod -rwxr-xr-x root/root usr/lib/grub/i386-efi/pcidump.module +-rw-r--r-- root/root usr/lib/grub/i386-efi/pgp.mod +-rwxr-xr-x root/root usr/lib/grub/i386-efi/pgp.module -rw-r--r-- root/root usr/lib/grub/i386-efi/play.mod -rwxr-xr-x root/root usr/lib/grub/i386-efi/play.module -rw-r--r-- root/root usr/lib/grub/i386-efi/png.mod @@ -396,6 +401,8 @@ drwxr-xr-x root/root usr/lib/grub/i386-efi/ -rwxr-xr-x root/root usr/lib/grub/i386-efi/raid6rec.module -rw-r--r-- root/root usr/lib/grub/i386-efi/random.mod -rwxr-xr-x root/root usr/lib/grub/i386-efi/random.module +-rw-r--r-- root/root usr/lib/grub/i386-efi/rdmsr.mod +-rwxr-xr-x root/root usr/lib/grub/i386-efi/rdmsr.module -rw-r--r-- root/root usr/lib/grub/i386-efi/read.mod -rwxr-xr-x root/root usr/lib/grub/i386-efi/read.module -rw-r--r-- root/root usr/lib/grub/i386-efi/reboot.mod @@ -440,6 +447,8 @@ drwxr-xr-x root/root usr/lib/grub/i386-efi/ -rwxr-xr-x root/root usr/lib/grub/i386-efi/spkmodem.module -rw-r--r-- root/root usr/lib/grub/i386-efi/squash4.mod -rwxr-xr-x root/root usr/lib/grub/i386-efi/squash4.module +-rw-r--r-- root/root usr/lib/grub/i386-efi/strtoull_test.mod +-rwxr-xr-x root/root usr/lib/grub/i386-efi/strtoull_test.module -rw-r--r-- root/root usr/lib/grub/i386-efi/syslinuxcfg.mod -rwxr-xr-x root/root usr/lib/grub/i386-efi/syslinuxcfg.module -rw-r--r-- root/root usr/lib/grub/i386-efi/tar.mod @@ -495,8 +504,8 @@ drwxr-xr-x root/root usr/lib/grub/i386-efi/ -rwxr-xr-x root/root usr/lib/grub/i386-efi/usbserial_usbdebug.module -rw-r--r-- root/root usr/lib/grub/i386-efi/usbtest.mod -rwxr-xr-x root/root usr/lib/grub/i386-efi/usbtest.module --rw-r--r-- root/root usr/lib/grub/i386-efi/verify.mod --rwxr-xr-x root/root usr/lib/grub/i386-efi/verify.module +-rw-r--r-- root/root usr/lib/grub/i386-efi/verifiers.mod +-rwxr-xr-x root/root usr/lib/grub/i386-efi/verifiers.module -rw-r--r-- root/root usr/lib/grub/i386-efi/video.lst -rw-r--r-- root/root usr/lib/grub/i386-efi/video.mod -rwxr-xr-x root/root usr/lib/grub/i386-efi/video.module @@ -514,6 +523,8 @@ drwxr-xr-x root/root usr/lib/grub/i386-efi/ -rwxr-xr-x root/root usr/lib/grub/i386-efi/videotest.module -rw-r--r-- root/root usr/lib/grub/i386-efi/videotest_checksum.mod -rwxr-xr-x root/root usr/lib/grub/i386-efi/videotest_checksum.module +-rw-r--r-- root/root usr/lib/grub/i386-efi/wrmsr.mod +-rwxr-xr-x root/root usr/lib/grub/i386-efi/wrmsr.module -rw-r--r-- root/root usr/lib/grub/i386-efi/xfs.mod -rwxr-xr-x root/root usr/lib/grub/i386-efi/xfs.module -rw-r--r-- root/root usr/lib/grub/i386-efi/xnu.mod @@ -530,6 +541,8 @@ drwxr-xr-x root/root usr/lib/grub/i386-efi/ -rwxr-xr-x root/root usr/lib/grub/i386-efi/zfscrypt.module -rw-r--r-- root/root usr/lib/grub/i386-efi/zfsinfo.mod -rwxr-xr-x root/root usr/lib/grub/i386-efi/zfsinfo.module +-rw-r--r-- root/root usr/lib/grub/i386-efi/zstd.mod +-rwxr-xr-x root/root usr/lib/grub/i386-efi/zstd.module drwxr-xr-x root/root usr/lib/grub/x86_64-efi/ -rw-r--r-- root/root usr/lib/grub/x86_64-efi/acpi.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/acpi.module @@ -654,8 +667,11 @@ drwxr-xr-x root/root usr/lib/grub/x86_64-efi/ -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/ext2.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/extcmd.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/extcmd.module +-rw-r--r-- root/root usr/lib/grub/x86_64-efi/f2fs.mod +-rwxr-xr-x root/root usr/lib/grub/x86_64-efi/f2fs.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/fat.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/fat.module +-rw-r--r-- root/root usr/lib/grub/x86_64-efi/fdt.lst (EMPTY) -rw-r--r-- root/root usr/lib/grub/x86_64-efi/file.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/file.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/fixvideo.mod @@ -903,6 +919,8 @@ drwxr-xr-x root/root usr/lib/grub/x86_64-efi/ -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/pbkdf2_test.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/pcidump.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/pcidump.module +-rw-r--r-- root/root usr/lib/grub/x86_64-efi/pgp.mod +-rwxr-xr-x root/root usr/lib/grub/x86_64-efi/pgp.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/play.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/play.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/png.mod @@ -921,6 +939,8 @@ drwxr-xr-x root/root usr/lib/grub/x86_64-efi/ -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/raid6rec.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/random.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/random.module +-rw-r--r-- root/root usr/lib/grub/x86_64-efi/rdmsr.mod +-rwxr-xr-x root/root usr/lib/grub/x86_64-efi/rdmsr.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/read.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/read.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/reboot.mod @@ -955,6 +975,8 @@ drwxr-xr-x root/root usr/lib/grub/x86_64-efi/ -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/sfs.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/shift_test.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/shift_test.module +-rw-r--r-- root/root usr/lib/grub/x86_64-efi/shim_lock.mod +-rwxr-xr-x root/root usr/lib/grub/x86_64-efi/shim_lock.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/signature_test.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/signature_test.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/sleep.mod @@ -965,6 +987,8 @@ drwxr-xr-x root/root usr/lib/grub/x86_64-efi/ -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/spkmodem.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/squash4.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/squash4.module +-rw-r--r-- root/root usr/lib/grub/x86_64-efi/strtoull_test.mod +-rwxr-xr-x root/root usr/lib/grub/x86_64-efi/strtoull_test.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/syslinuxcfg.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/syslinuxcfg.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/tar.mod @@ -988,6 +1012,8 @@ drwxr-xr-x root/root usr/lib/grub/x86_64-efi/ -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/tga.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/time.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/time.module +-rw-r--r-- root/root usr/lib/grub/x86_64-efi/tpm.mod +-rwxr-xr-x root/root usr/lib/grub/x86_64-efi/tpm.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/tr.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/tr.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/trig.mod @@ -1020,8 +1046,8 @@ drwxr-xr-x root/root usr/lib/grub/x86_64-efi/ -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/usbserial_usbdebug.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/usbtest.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/usbtest.module --rw-r--r-- root/root usr/lib/grub/x86_64-efi/verify.mod --rwxr-xr-x root/root usr/lib/grub/x86_64-efi/verify.module +-rw-r--r-- root/root usr/lib/grub/x86_64-efi/verifiers.mod +-rwxr-xr-x root/root usr/lib/grub/x86_64-efi/verifiers.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/video.lst -rw-r--r-- root/root usr/lib/grub/x86_64-efi/video.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/video.module @@ -1039,6 +1065,8 @@ drwxr-xr-x root/root usr/lib/grub/x86_64-efi/ -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/videotest.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/videotest_checksum.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/videotest_checksum.module +-rw-r--r-- root/root usr/lib/grub/x86_64-efi/wrmsr.mod +-rwxr-xr-x root/root usr/lib/grub/x86_64-efi/wrmsr.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/xfs.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/xfs.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/xnu.mod @@ -1055,3 +1083,5 @@ drwxr-xr-x root/root usr/lib/grub/x86_64-efi/ -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/zfscrypt.module -rw-r--r-- root/root usr/lib/grub/x86_64-efi/zfsinfo.mod -rwxr-xr-x root/root usr/lib/grub/x86_64-efi/zfsinfo.module +-rw-r--r-- root/root usr/lib/grub/x86_64-efi/zstd.mod +-rwxr-xr-x root/root usr/lib/grub/x86_64-efi/zstd.module diff --git a/grub2-efi/.signature b/grub2-efi/.signature index 821682e92..598ebc6a6 100644 --- a/grub2-efi/.signature +++ b/grub2-efi/.signature @@ -1,7 +1,5 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/X2tq0cWpU3rEWUldMlmlZTkyZr9yupYWrizjN/kOBzGIca/SY7moPRN7rX7CF/gPkNNUMIqTJYdbw7bLK3L0ws= -SHA256 (Pkgfile) = 7900779b7facbacfe58057c389f21d08f760ce0724bb065ff3dfad9e591f4814 -SHA256 (.footprint) = be3c0c176335de61fb03e01702968798c101216091640b618b61b467dcfd92d8 -SHA256 (grub-2.02.tar.xz) = 810b3798d316394f94096ec2797909dbf23c858e48f7b3830826b8daa06b7b0f -SHA256 (grub2-relocation.patch) = 51562fa1016c54567dbf42a86c0cfc902372ab579bbee17879a81aff09b76b99 -SHA256 (grub2-xfs.patch) = fcd5a626d4af33665d041ce42df813f1f198d8230ea186481b155a5b676f3b87 +RWSE3ohX2g5d/T3FHURcuUXfYAKPwJ21VhivRR475BL+UvYdlCLxCntmwUDowiK/AWv1V+a99lqoBk4V2HR2aKG0mwalnBGmzAs= +SHA256 (Pkgfile) = 5636023ae15b98a043da408a882c6968cbaf922be14bb573e2a72e3145fba533 +SHA256 (.footprint) = 4972c4c82273db53ef956ac0f7699d40a0810c9b4ca48ea681eec18b4ffbae89 +SHA256 (grub-2.04.tar.xz) = e5292496995ad42dabe843a0192cf2a2c502e7ffcc7479398232b10a472df77d diff --git a/grub2-efi/Pkgfile b/grub2-efi/Pkgfile index f97e83272..2610d6726 100644 --- a/grub2-efi/Pkgfile +++ b/grub2-efi/Pkgfile @@ -4,20 +4,13 @@ # Depends on: grub2 name=grub2-efi -version=2.02 -release=2 -source=(http://ftp.gnu.org/gnu/grub/grub-$version.tar.xz \ - grub2-relocation.patch grub2-xfs.patch) +version=2.04 +release=1 +source=(http://ftp.gnu.org/gnu/grub/grub-$version.tar.xz) build() { export CFLAGS="${CFLAGS} -Wno-error" - patch -d grub-$version -p1 -i $SRC/grub2-relocation.patch - patch -d grub-$version -p1 -i $SRC/grub2-xfs.patch - - # fix for glibc 'gets' removal - sed -i -e '/gets is a/d' grub-$version/grub-core/gnulib/stdio.in.h - MODLIST="boot chain configfile fat ext2 linux normal ntfs part_gpt part_msdos" for ARCH in i386 x86_64 diff --git a/grub2-efi/grub2-relocation.patch b/grub2-efi/grub2-relocation.patch deleted file mode 100644 index 1aeae6849..000000000 --- a/grub2-efi/grub2-relocation.patch +++ /dev/null @@ -1,65 +0,0 @@ -commit 842c390469e2c2e10b5aa36700324cd3bde25875 -Author: H.J. Lu -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 - Reviewed-by: Daniel Kiper - -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/grub2-efi/grub2-xfs.patch b/grub2-efi/grub2-xfs.patch deleted file mode 100644 index 6c6a750b4..000000000 --- a/grub2-efi/grub2-xfs.patch +++ /dev/null @@ -1,60 +0,0 @@ -From cda0a857dd7a27cd5d621747464bfe71e8727fff Mon Sep 17 00:00:00 2001 -From: Daniel Kiper -Date: Tue, 29 May 2018 16:16:02 +0200 -Subject: xfs: Accept filesystem with sparse inodes - -The sparse inode metadata format became a mkfs.xfs default in -xfsprogs-4.16.0, and such filesystems are now rejected by grub as -containing an incompatible feature. - -In essence, this feature allows xfs to allocate inodes into fragmented -freespace. (Without this feature, if xfs could not allocate contiguous -space for 64 new inodes, inode creation would fail.) - -In practice, the disk format change is restricted to the inode btree, -which as far as I can tell is not used by grub. If all you're doing -today is parsing a directory, reading an inode number, and converting -that inode number to a disk location, then ignoring this feature -should be fine, so I've added it to XFS_SB_FEAT_INCOMPAT_SUPPORTED - -I did some brief testing of this patch by hacking up the regression -tests to completely fragment freespace on the test xfs filesystem, and -then write a large-ish number of inodes to consume any existing -contiguous 64-inode chunk. This way any files the grub tests add and -traverse would be in such a fragmented inode allocation. Tests passed, -but I'm not sure how to cleanly integrate that into the test harness. - -Signed-off-by: Eric Sandeen -Reviewed-by: Daniel Kiper -Tested-by: Chris Murphy ---- - grub-core/fs/xfs.c | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c -index c6031bd..3b00c74 100644 ---- a/grub-core/fs/xfs.c -+++ b/grub-core/fs/xfs.c -@@ -79,9 +79,18 @@ GRUB_MOD_LICENSE ("GPLv3+"); - #define XFS_SB_FEAT_INCOMPAT_SPINODES (1 << 1) /* sparse inode chunks */ - #define XFS_SB_FEAT_INCOMPAT_META_UUID (1 << 2) /* metadata UUID */ - --/* We do not currently verify metadata UUID so it is safe to read such filesystem */ -+/* -+ * Directory entries with ftype are explicitly handled by GRUB code. -+ * -+ * We do not currently read the inode btrees, so it is safe to read filesystems -+ * with the XFS_SB_FEAT_INCOMPAT_SPINODES feature. -+ * -+ * We do not currently verify metadata UUID, so it is safe to read filesystems -+ * with the XFS_SB_FEAT_INCOMPAT_META_UUID feature. -+ */ - #define XFS_SB_FEAT_INCOMPAT_SUPPORTED \ - (XFS_SB_FEAT_INCOMPAT_FTYPE | \ -+ XFS_SB_FEAT_INCOMPAT_SPINODES | \ - XFS_SB_FEAT_INCOMPAT_META_UUID) - - struct grub_xfs_sblock --- -cgit v1.0-41-gc330 -