diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-11-17 11:44:18 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-11-17 11:44:18 +0000 |
commit | 9b37fc9b74a481ed5dd025777b563c6e26fe8b5f (patch) | |
tree | 27d0020af3de06d6ad9d0e5fdebd11420c90708e | |
parent | 4790046ecda0f4adcdfbd0a4b1df6d0785c57886 (diff) |
sys-boot/grub : version bump
-rw-r--r-- | sys-boot/grub/Manifest | 4 | ||||
-rw-r--r-- | sys-boot/grub/files/01-gfxpayload.patch (renamed from sys-boot/grub/files/05-gfxpayload.patch) | 0 | ||||
-rw-r--r-- | sys-boot/grub/files/01-xfs-accept-filesystem-with-sparse-inodes.patch | 63 | ||||
-rw-r--r-- | sys-boot/grub/files/02-KERNEL_GLOBS.patch (renamed from sys-boot/grub/files/06-KERNEL_GLOBS.patch) | 0 | ||||
-rw-r--r-- | sys-boot/grub/files/02-support-multiple-early-initrd-images.patch | 180 | ||||
-rw-r--r-- | sys-boot/grub/files/03-relocation.patch | 65 | ||||
-rw-r--r-- | sys-boot/grub/files/03-sparc64-bios-boot.patch | 50 | ||||
-rw-r--r-- | sys-boot/grub/files/04-Fix-packed-not-aligned-error-on-GCC-8.patch | 72 | ||||
-rw-r--r-- | sys-boot/grub/files/07-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch | 140 | ||||
-rw-r--r-- | sys-boot/grub/files/08-find-freetype.patch | 114 | ||||
-rw-r--r-- | sys-boot/grub/grub-2.04-r314.ebuild (renamed from sys-boot/grub/grub-2.02-r1337.ebuild) | 152 |
11 files changed, 121 insertions, 719 deletions
diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest index 106fa33c..322f5de6 100644 --- a/sys-boot/grub/Manifest +++ b/sys-boot/grub/Manifest @@ -1,3 +1,3 @@ DIST dejavu-sans-ttf-2.37.zip 417746 BLAKE2B c8904f3cd5a49370a7dc10e456684c88aeae998a99090bf4d0a5baa4f36cc8fb8f70586cf6d610a5ffeee97261d28c80f55bbe9dcfc3ed796d5c2d60e79adb58 SHA512 ede5899daa1984c5aa8cacb1c850eb53f189dddef3d9bb78bf9774d8976b7c0d6eb0bcf86237cd7d11f5b36cf5b5058d42cd94d3bd76f2bd0931c7ceb1271fae -DIST grub-2.02.tar.xz 6113260 BLAKE2B 7c5ec61a8dc5a00e9cdc91c489f0d2ee37cd7e673eef8e8e26bbc18c5ec28829f563b9298874fb96d45a5d523ce366e936649c21ebda7462afda0cc328b970ce SHA512 cc6eb0a42b5c8df2f671cc128ff725afb3ff1f8832a196022e433cf0d3b75decfca2316d0aa5fabea75747d55e88f3d021dd93508563f8ca80fd7b9e7fe1f088 -DIST unifont-9.0.06.pcf.gz 1360354 BLAKE2B 09b96e1711c729ef159d62e3ea7b289ca2d01dc0ea417e35a18b73dc02a23f62ce7821d9761bceee4002d9eeaabd91cfb69bbacc6fbdfdfa00445d18fe8f1d66 SHA512 dd0a1afa72f5204c62055d83f22750c74af38ffafdb8eda8e1f1cf7292e572a14969b8a9a6a2cb336d5bed4ab633f6b5a962c59117a590e4238788959cb82774 +DIST grub-2.04.tar.xz 6393864 BLAKE2B 413ffb9aaeae1ee3128032914ca426a1a5adb3737895dfe563fdde5a7e0386ac2dbc2f7ddfc4e0a67b3ad90494985d6886c20054b038701feb743e67e2eed9d0 SHA512 9c15c42d0cf5d61446b752194e3b628bb04be0fe6ea0240ab62b3d753784712744846e1f7c3651d8e0968d22012e6d713c38c44936d4004ded3ca4d4007babbb +DIST unifont-12.1.02.pcf.gz 1335424 BLAKE2B 97080312468e3f3c8aa6f49cef08f5622641e8c9c035f3ede1e09d8d98de4e78d3b23c8aba2e8070eb46cbebd2d55e8568e467d7f15f35aa8fc8db792b7e5f14 SHA512 b280b2db7cf5f480b0668c331130dede2c0cc87d5e02e44566b77787113d0f6604d0105522858288f2ac6b8e77df7a2d9878725013a6c778dc5bfb183156e2f0 diff --git a/sys-boot/grub/files/05-gfxpayload.patch b/sys-boot/grub/files/01-gfxpayload.patch index 6c63ef88..6c63ef88 100644 --- a/sys-boot/grub/files/05-gfxpayload.patch +++ b/sys-boot/grub/files/01-gfxpayload.patch diff --git a/sys-boot/grub/files/01-xfs-accept-filesystem-with-sparse-inodes.patch b/sys-boot/grub/files/01-xfs-accept-filesystem-with-sparse-inodes.patch deleted file mode 100644 index f18553dc..00000000 --- a/sys-boot/grub/files/01-xfs-accept-filesystem-with-sparse-inodes.patch +++ /dev/null @@ -1,63 +0,0 @@ -Source/Upstream: Yes, fixed in git master -Reason: xfs: Accept filesystem with sparse inodes - -From cda0a857dd7a27cd5d621747464bfe71e8727fff Mon Sep 17 00:00:00 2001 -From: Daniel Kiper <daniel.kiper@oracle.com> -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 <sandeen@redhat.com> -Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> -Tested-by: Chris Murphy <lists@colorremedies.com> ---- - 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 - diff --git a/sys-boot/grub/files/06-KERNEL_GLOBS.patch b/sys-boot/grub/files/02-KERNEL_GLOBS.patch index c66ee68d..c66ee68d 100644 --- a/sys-boot/grub/files/06-KERNEL_GLOBS.patch +++ b/sys-boot/grub/files/02-KERNEL_GLOBS.patch diff --git a/sys-boot/grub/files/02-support-multiple-early-initrd-images.patch b/sys-boot/grub/files/02-support-multiple-early-initrd-images.patch deleted file mode 100644 index 4e17549c..00000000 --- a/sys-boot/grub/files/02-support-multiple-early-initrd-images.patch +++ /dev/null @@ -1,180 +0,0 @@ -Source/Upstream: Yes, fixed in git master -Reason: Support multiple early initrd images - -From a698240df0c43278b2d1d7259c8e7a6926c63112 Mon Sep 17 00:00:00 2001 -From: "Matthew S. Turnbull" <sparky@bluefang-logic.com> -Date: Sat, 24 Feb 2018 17:44:58 -0500 -Subject: grub-mkconfig/10_linux: Support multiple early initrd images - -Add support for multiple, shared, early initrd images. These early -images will be loaded in the order declared, and all will be loaded -before the initrd image. - -While many classes of data can be provided by early images, the -immediate use case would be for distributions to provide CPU -microcode to mitigate the Meltdown and Spectre vulnerabilities. - -There are two environment variables provided for declaring the early -images. - -* GRUB_EARLY_INITRD_LINUX_STOCK is for the distribution declare - images that are provided by the distribution or installed packages. - If undeclared, this will default to a set of common microcode image - names. - -* GRUB_EARLY_INITRD_LINUX_CUSTOM is for user created images. User - images will be loaded after the stock images. - -These separate configurations allow the distribution and user to -declare different image sets without clobbering each other. - -This also makes a minor update to ensure that UUID partition labels -stay disabled when no initrd image is found, even if early images are -present. - -This is a continuation of a previous patch published by Christian -Hesse in 2016: -http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00025.html - -Down stream Gentoo bug: -https://bugs.gentoo.org/645088 - -Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> -Signed-off-by: Matthew S. Turnbull <sparky@bluefang-logic.com> -Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> ---- - docs/grub.texi | 19 +++++++++++++++++++ - util/grub-mkconfig.in | 8 ++++++++ - util/grub.d/10_linux.in | 33 +++++++++++++++++++++++++++------ - 3 files changed, 54 insertions(+), 6 deletions(-) - -diff --git a/docs/grub.texi b/docs/grub.texi -index 137b894..65b4bbe 100644 ---- a/docs/grub.texi -+++ b/docs/grub.texi -@@ -1398,6 +1398,25 @@ for all respectively normal entries. - The values of these options replace the values of @samp{GRUB_CMDLINE_LINUX} - and @samp{GRUB_CMDLINE_LINUX_DEFAULT} for Linux and Xen menu entries. - -+@item GRUB_EARLY_INITRD_LINUX_CUSTOM -+@itemx GRUB_EARLY_INITRD_LINUX_STOCK -+List of space-separated early initrd images to be loaded from @samp{/boot}. -+This is for loading things like CPU microcode, firmware, ACPI tables, crypto -+keys, and so on. These early images will be loaded in the order declared, -+and all will be loaded before the actual functional initrd image. -+ -+@samp{GRUB_EARLY_INITRD_LINUX_STOCK} is for your distribution to declare -+images that are provided by the distribution. It should not be modified -+without understanding the consequences. They will be loaded first. -+ -+@samp{GRUB_EARLY_INITRD_LINUX_CUSTOM} is for your custom created images. -+ -+The default stock images are as follows, though they may be overridden by -+your distribution: -+@example -+intel-uc.img intel-ucode.img amd-uc.img amd-ucode.img early_ucode.cpio microcode.cpio -+@end example -+ - @item GRUB_DISABLE_LINUX_UUID - Normally, @command{grub-mkconfig} will generate menu entries that use - universally-unique identifiers (UUIDs) to identify the root filesystem to -diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in -index f8496d2..35ef583 100644 ---- a/util/grub-mkconfig.in -+++ b/util/grub-mkconfig.in -@@ -147,6 +147,12 @@ if [ x"$GRUB_FS" = xunknown ]; then - GRUB_FS="$(stat -f --printf=%T / || echo unknown)" - fi - -+# Provide a default set of stock linux early initrd images. -+# Define here so the list can be modified in the sourced config file. -+if [ "x${GRUB_EARLY_INITRD_LINUX_STOCK}" = "x" ]; then -+ GRUB_EARLY_INITRD_LINUX_STOCK="intel-uc.img intel-ucode.img amd-uc.img amd-ucode.img early_ucode.cpio microcode.cpio" -+fi -+ - if test -f ${sysconfdir}/default/grub ; then - . ${sysconfdir}/default/grub - fi -@@ -211,6 +217,8 @@ export GRUB_DEFAULT \ - GRUB_CMDLINE_NETBSD \ - GRUB_CMDLINE_NETBSD_DEFAULT \ - GRUB_CMDLINE_GNUMACH \ -+ GRUB_EARLY_INITRD_LINUX_CUSTOM \ -+ GRUB_EARLY_INITRD_LINUX_STOCK \ - GRUB_TERMINAL_INPUT \ - GRUB_TERMINAL_OUTPUT \ - GRUB_SERIAL_COMMAND \ -diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index de9044c..faedf74 100644 ---- a/util/grub.d/10_linux.in -+++ b/util/grub.d/10_linux.in -@@ -136,9 +136,13 @@ EOF - if test -n "${initrd}" ; 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 - fi - sed "s/^/$submenu_indentation/" << EOF -@@ -188,7 +192,15 @@ while [ "x$list" != "x" ] ; do - alt_version=`echo $version | sed -e "s,\.old$,,g"` - linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" - -- initrd= -+ initrd_early= -+ for i in ${GRUB_EARLY_INITRD_LINUX_STOCK} \ -+ ${GRUB_EARLY_INITRD_LINUX_CUSTOM}; do -+ if test -e "${dirname}/${i}" ; then -+ initrd_early="${initrd_early} ${i}" -+ fi -+ done -+ -+ initrd_real= - for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \ - "initrd-${version}" "initramfs-${version}.img" \ - "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ -@@ -198,11 +210,22 @@ while [ "x$list" != "x" ] ; do - "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ - "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do - if test -e "${dirname}/${i}" ; then -- initrd="$i" -+ initrd_real="${i}" - break - fi - done - -+ initrd= -+ if test -n "${initrd_early}" || test -n "${initrd_real}"; then -+ initrd="${initrd_early} ${initrd_real}" -+ -+ initrd_display= -+ for i in ${initrd}; do -+ initrd_display="${initrd_display} ${dirname}/${i}" -+ done -+ gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2 -+ fi -+ - config= - for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do - if test -e "${i}" ; then -@@ -216,9 +239,7 @@ 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 -- elif test -z "${initramfs}" ; then -+ if 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. - linux_root_device_thisversion=${GRUB_DEVICE} --- -cgit v1.0-41-gc330 - diff --git a/sys-boot/grub/files/03-relocation.patch b/sys-boot/grub/files/03-relocation.patch deleted file mode 100644 index 1aeae684..00000000 --- a/sys-boot/grub/files/03-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/sys-boot/grub/files/03-sparc64-bios-boot.patch b/sys-boot/grub/files/03-sparc64-bios-boot.patch new file mode 100644 index 00000000..8fd00d49 --- /dev/null +++ b/sys-boot/grub/files/03-sparc64-bios-boot.patch @@ -0,0 +1,50 @@ +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/files/04-Fix-packed-not-aligned-error-on-GCC-8.patch b/sys-boot/grub/files/04-Fix-packed-not-aligned-error-on-GCC-8.patch deleted file mode 100644 index 2d09149f..00000000 --- a/sys-boot/grub/files/04-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/sys-boot/grub/files/07-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch b/sys-boot/grub/files/07-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch deleted file mode 100644 index 22d62926..00000000 --- a/sys-boot/grub/files/07-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch +++ /dev/null @@ -1,140 +0,0 @@ -From 734668238fcc0ef691a080839e04f33854fa133a 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> ---- - 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 cdce63b..b8ad75a 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 892b99c..4f1eb52 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 88cbe73..fd7e0f1 100644 ---- a/tests/util/grub-fs-tester.in -+++ b/tests/util/grub-fs-tester.in -@@ -156,6 +156,12 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do - # 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 -@@ -796,6 +802,10 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do - MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext4" -O meta_bg,^resize_inode -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}" - 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 "${MOUNTDEVICE}" ;; - xxfs) --- -cgit v1.0-41-gc330 - diff --git a/sys-boot/grub/files/08-find-freetype.patch b/sys-boot/grub/files/08-find-freetype.patch deleted file mode 100644 index 83b55449..00000000 --- a/sys-boot/grub/files/08-find-freetype.patch +++ /dev/null @@ -1,114 +0,0 @@ -diff -Nur a/configure.ac b/configure.ac ---- a/configure.ac 2017-04-24 12:30:15.000000000 +0100 -+++ b/configure.ac 2019-11-17 10:48:41.595490019 +0000 -@@ -50,6 +50,8 @@ - AC_CONFIG_SRCDIR([include/grub/dl.h]) - AC_CONFIG_HEADER([config-util.h]) - -+PKG_PROG_PKG_CONFIG -+ - # Program name transformations - AC_ARG_PROGRAM - grub_TRANSFORM([grub-bios-setup]) -@@ -1493,29 +1495,22 @@ - grub_mkfont_excuse="explicitly disabled" - fi - --if test x"$grub_mkfont_excuse" = x ; then -- # Check for freetype libraries. -- AC_CHECK_TOOLS([FREETYPE], [freetype-config]) -- if test "x$FREETYPE" = x ; then -- grub_mkfont_excuse=["need freetype2 library"] -- fi --fi -- - 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` -- SAVED_CPPFLAGS="$CPPFLAGS" -- SAVED_LIBS="$LIBS" -- CPPFLAGS="$CPPFLAGS $freetype_cflags" -- LIBS="$LIBS $freetype_libs" -- AC_CHECK_HEADERS([ft2build.h], [], -- [grub_mkfont_excuse=["need freetype2 headers"]]) -- AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Load_Glyph])], [], [grub_mkfont_excuse=["freetype2 library unusable"]]) -- CPPFLAGS="$SAVED_CPPFLAGS" -- LIBS="$SAVED_LIBS" -+ PKG_CHECK_MODULES([FREETYPE], [freetype2], [ -+ SAVED_CPPFLAGS="$CPPFLAGS" -+ SAVED_LIBS="$LIBS" -+ CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" -+ LIBS="$LIBS $FREETYPE_LIBS" -+ AC_CHECK_HEADERS([ft2build.h], [], -+ [grub_mkfont_excuse=["need freetype2 headers"]]) -+ AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Load_Glyph])], [], -+ [grub_mkfont_excuse=["freetype2 library unusable"]]) -+ CPPFLAGS="$SAVED_CPPFLAGS" -+ LIBS="$SAVED_LIBS" -+ ], [grub_mkfont_excuse=["need freetype2 library"]]) - fi - - if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then -@@ -1527,8 +1522,6 @@ - enable_grub_mkfont=no - fi - AC_SUBST([enable_grub_mkfont]) --AC_SUBST([freetype_cflags]) --AC_SUBST([freetype_libs]) - - SAVED_CC="$CC" - SAVED_CPP="$CPP" -@@ -1558,25 +1551,21 @@ - - 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"] -- 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` -- SAVED_CPPFLAGS_2="$CPPFLAGS" -- SAVED_LIBS="$LIBS" -- CPPFLAGS="$CPPFLAGS $build_freetype_cflags" -- LIBS="$LIBS $build_freetype_libs" -- AC_CHECK_HEADERS([ft2build.h], [], -- [grub_build_mkfont_excuse=["need freetype2 headers"]]) -- AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Load_Glyph])], [], [grub_build_mkfont_excuse=["freetype2 library unusable"]]) -- LIBS="$SAVED_LIBS" -- CPPFLAGS="$SAVED_CPPFLAGS_2" -+ SAVED_PKG_CONFIG="$PKG_CONFIG" -+ test -z "$BUILD_PKG_CONFIG" || PKG_CONFIG="$BUILD_PKG_CONFIG" -+ PKG_CHECK_MODULES([BUILD_FREETYPE], [freetype2], [ -+ SAVED_CPPFLAGS_2="$CPPFLAGS" -+ SAVED_LIBS="$LIBS" -+ CPPFLAGS="$CPPFLAGS $BUILD_FREETYPE_CFLAGS" -+ LIBS="$LIBS $BUILD_FREETYPE_LIBS" -+ AC_CHECK_HEADERS([ft2build.h], [], -+ [grub_build_mkfont_excuse=["need freetype2 headers"]]) -+ AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Load_Glyph])], [], -+ [grub_build_mkfont_excuse=["freetype2 library unusable"]]) -+ LIBS="$SAVED_LIBS" -+ CPPFLAGS="$SAVED_CPPFLAGS_2" -+ ], [grub_build_mkfont_excuse=["need freetype2 library"]]) -+ PKG_CONFIG="$SAVED_PKG_CONFIG" - fi - - if test x"$enable_build_grub_mkfont" = xyes && test x"$grub_build_mkfont_excuse" != x ; then -@@ -1595,9 +1584,6 @@ - fi - fi - --AC_SUBST([build_freetype_cflags]) --AC_SUBST([build_freetype_libs]) -- - CC="$SAVED_CC" - CPP="$SAVED_CPP" - CFLAGS="$SAVED_CFLAGS" diff --git a/sys-boot/grub/grub-2.02-r1337.ebuild b/sys-boot/grub/grub-2.04-r314.ebuild index b95decf8..1d6f6944 100644 --- a/sys-boot/grub/grub-2.02-r1337.ebuild +++ b/sys-boot/grub/grub-2.04-r314.ebuild @@ -1,19 +1,24 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 if [[ ${PV} == 9999 ]]; then - GRUB_AUTOGEN=1 + GRUB_AUTORECONF=1 + GRUB_BOOTSTRAP=1 fi -if [[ -n ${GRUB_AUTOGEN} ]]; then - PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} ) +if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then + PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) + 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 +inherit bash-completion-r1 flag-o-matic multibuild pax-utils toolchain-funcs if [[ ${PV} != 9999 ]]; then if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then @@ -25,26 +30,20 @@ if [[ ${PV} != 9999 ]]; then SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" S=${WORKDIR}/${P%_*} fi - KEYWORDS="amd64 ~arm64 x86" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" else inherit git-r3 - EGIT_REPO_URI="git://git.sv.gnu.org/grub.git - http://git.savannah.gnu.org/r/grub.git" + EGIT_REPO_URI="https://git.savannah.gnu.org/git/grub.git" fi PATCHES=( - "${FILESDIR}"/01-xfs-accept-filesystem-with-sparse-inodes.patch - "${FILESDIR}"/02-support-multiple-early-initrd-images.patch - "${FILESDIR}"/03-relocation.patch - "${FILESDIR}"/04-Fix-packed-not-aligned-error-on-GCC-8.patch - "${FILESDIR}"/05-gfxpayload.patch - "${FILESDIR}"/06-KERNEL_GLOBS.patch - "${FILESDIR}"/07-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch - "${FILESDIR}"/08-find-freetype.patch + "${FILESDIR}"/01-gfxpayload.patch + "${FILESDIR}"/02-KERNEL_GLOBS.patch + "${FILESDIR}"/03-sparc64-bios-boot.patch ) DEJAVU=dejavu-sans-ttf-2.37 -UNIFONT=unifont-9.0.06 +UNIFONT=unifont-12.1.02 SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz ) themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )" @@ -54,9 +53,9 @@ 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/${PVR}" -IUSE="debug device-mapper doc efiemu +fonts mount multislot nls static sdl test +themes truetype libzfs" +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 ) +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=" @@ -66,45 +65,17 @@ REQUIRED_USE=" 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} +BDEPEND=" ${PYTHON_DEPS} app-misc/pax-utils sys-devel/flex sys-devel/bison sys-apps/help2man sys-apps/texinfo - sys-boot/grub-config-redcore - sys-devel/automake:1.15 fonts? ( media-libs/freetype:2 virtual/pkgconfig ) - grub_platforms_xen? ( app-emulation/xen-tools:= ) - grub_platforms_xen-32? ( 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(+)] - virtual/pkgconfig - ) - ) test? ( app-admin/genromfs app-arch/cpio @@ -118,28 +89,49 @@ DEPEND="${RDEPEND} themes? ( app-arch/unzip media-libs/freetype:2 + virtual/pkgconfig ) + truetype? ( virtual/pkgconfig ) " -RDEPEND+=" +DEPEND=" + app-arch/xz-utils + >=sys-libs/ncurses-5.2-r5:0= + sys-boot/grub-config-redcore + sdl? ( media-libs/libsdl ) + device-mapper? ( >=sys-fs/lvm2-2.02.45 ) + 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 ) + grub_platforms_xen? ( app-emulation/xen-tools:= ) + grub_platforms_xen-32? ( app-emulation/xen-tools:= ) + grub_platforms_xen-pvh? ( app-emulation/xen-tools:= ) +" +RDEPEND="${DEPEND} kernel_linux? ( grub_platforms_efi-32? ( sys-boot/efibootmgr ) grub_platforms_efi-64? ( sys-boot/efibootmgr ) ) - !multislot? ( !sys-boot/grub:0 !sys-boot/grub-static ) + !sys-boot/grub:0 !sys-boot/grub-static nls? ( sys-devel/gettext ) " -DEPEND+=" !!=media-libs/freetype-2.5.4" +RESTRICT="!test? ( test )" -RESTRICT="strip !test? ( test )" - -QA_EXECSTACK="usr/bin/grub*-emu* usr/lib/grub/*" -QA_WX_LOAD="usr/lib/grub/*" +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 } @@ -149,11 +141,6 @@ src_prepare() { 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 - # 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. @@ -162,10 +149,18 @@ src_prepare() { tests/util/grub-fs-tester.in \ || die - if [[ -n ${GRUB_AUTOGEN} ]]; then + if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then python_setup - bash autogen.sh || die - autopoint() { :; } + 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 } @@ -183,6 +178,7 @@ grub_configure() { case ${MULTIBUILD_VARIANT} in efi*) platform=efi ;; + xen-pvh) platform=xen_pvh ;; xen*) platform=xen ;; guessed) ;; *) platform=${MULTIBUILD_VARIANT} ;; @@ -202,34 +198,30 @@ grub_configure() { esac local myeconfargs=( - FREETYPE="pkg-config freetype2" - BUILD_FREETYPE="pkg-config freetype2" --disable-werror --program-prefix= --libdir="${EPREFIX}"/usr/lib --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html - $(use_enable debug mm-debug) + --disable-libzfs + --program-transform-name="s,grub,grub2," $(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) + $(use_enable sdl 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," ) + if use fonts; then + ln -rs "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die fi - # Set up font symlinks - ln -s "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die if use themes; then - ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die + ln -rs "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die fi local ECONF_SOURCE="${S}" @@ -247,8 +239,6 @@ src_configure() { 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 @@ -266,9 +256,6 @@ src_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 } @@ -285,9 +272,8 @@ src_install() { einstalldocs - if use multislot; then - mv "${ED%/}"/usr/share/info/grub{,2}.info || die - fi + # https://bugs.gentoo.org/231935 + dostrip -x /usr/lib/grub } pkg_postinst() { |