From: Marcin Krol Date: Fri, 18 Apr 2025 19:41:52 +0000 (+0200) Subject: - merged changes from PLD X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;ds=inline;p=packages%2Fgrub2.git - merged changes from PLD --- diff --git a/initrd-search.patch b/choose-preferred-initrd.patch similarity index 100% rename from initrd-search.patch rename to choose-preferred-initrd.patch diff --git a/grub2.spec b/grub2.spec index 4b4f121..dd42e23 100644 --- a/grub2.spec +++ b/grub2.spec @@ -10,7 +10,7 @@ # Conditional build: %bcond_with grubemu # grub-emu debugging utility %bcond_without efiemu # efiemu runtimes (64-bit efiemu on 32-bit boot platform) -%bcond_with unifont # unifont based fonts +%bcond_without unifont # unifont based fonts %bcond_without arc # MIPS ARC platform support %bcond_without coreboot # coreboot/linuxbios platform support (x86/arm specific) %bcond_without efi # EFI platform support @@ -144,7 +144,7 @@ Summary(pl.UTF-8): GRUB2 - bootloader dla x86 i ppc Summary(pt_BR.UTF-8): Gerenciador de inicialização GRUB2 Name: grub2 Version: 2.12 -Release: 1 +Release: 2 License: GPL v2 Group: Base Source0: https://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz @@ -160,12 +160,14 @@ Patch4: tld-mkconfigdir.patch Patch5: grub-mkconfig-diagnostics.patch Patch6: posix.patch Patch7: %{name}-fonts_path.patch +Patch8: initrd-max-address.patch Patch9: just-say-linux.patch Patch10: ignore-kernel-symlinks.patch -Patch11: initrd-search.patch +Patch11: choose-preferred-initrd.patch Patch12: %{name}-cfg.patch Patch14: blscfg.patch Patch15: restricted.patch +Patch16: x32.patch URL: http://www.gnu.org/software/grub/ BuildRequires: autoconf >= 2.64 BuildRequires: automake >= 1:1.11.1-1 @@ -207,6 +209,7 @@ BuildRequires: tar >= 1:1.22 BuildRequires: texinfo BuildRequires: xz BuildRequires: xz-devel +BuildRequires: zfs-devel Requires: %{name}-platform = %{version}-%{release} Requires: issue Requires: which @@ -521,19 +524,21 @@ Motyw starfield dla GRUB-a. %prep %setup -q -n grub-%{version} -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p0 -%patch14 -p1 -%patch15 -p1 +%patch -P1 -p1 +%patch -P2 -p1 +%patch -P3 -p1 +%patch -P4 -p1 +%patch -P5 -p1 +%patch -P6 -p1 +%patch -P7 -p1 +%patch -P8 -p1 +%patch -P9 -p1 +%patch -P10 -p1 +%patch -P11 -p1 +%patch -P12 -p0 +%patch -P14 -p1 +%patch -P15 -p1 +%patch -P16 -p1 # we don't have C.utf-8 and need an UTF-8 locale for build sed -i -e 's/LC_ALL=C.UTF-8/LC_ALL=en_US.utf-8/g' po/Makefile* po/Rules* @@ -573,8 +578,9 @@ for platform in %{platforms} ; do ln -f -s ../configure . # mawk stalls at ./genmoddep.awk, so force gawk - AWK=gawk \ %configure \ + AWK=gawk \ + CPP="%{__cc} -E" \ PYTHON="%{__python3}" \ --with-platform=${platform} \ --disable-werror \ diff --git a/initrd-max-address.patch b/initrd-max-address.patch new file mode 100644 index 0000000..3c0d550 --- /dev/null +++ b/initrd-max-address.patch @@ -0,0 +1,13 @@ +; https://help-grub.gnu.narkive.com/8RcDkxFC/grub-and-linux-s-initrd-addr-max +; https://git.rthoni.com/robin.thoni/ipxe/commit/4cc786de810a74659b6266d04188c78b5b202103?lang=pl-PL +--- grub-2.12/include/grub/i386/linux.h~ 2023-10-03 14:21:48.000000000 +0200 ++++ grub-2.12/include/grub/i386/linux.h 2024-11-04 14:15:17.553066287 +0100 +@@ -23,7 +23,7 @@ + + #define GRUB_LINUX_I386_MAGIC_SIGNATURE 0x53726448 /* "HdrS" */ + #define GRUB_LINUX_DEFAULT_SETUP_SECTS 4 +-#define GRUB_LINUX_INITRD_MAX_ADDRESS 0x37FFFFFF ++#define GRUB_LINUX_INITRD_MAX_ADDRESS 0x7FFFFFFF + #define GRUB_LINUX_MAX_SETUP_SECTS 64 + #define GRUB_LINUX_BOOT_LOADER_TYPE 0x72 + #define GRUB_LINUX_HEAP_END_OFFSET (0x9000 - 0x200) diff --git a/x32.patch b/x32.patch new file mode 100644 index 0000000..8f526ec --- /dev/null +++ b/x32.patch @@ -0,0 +1,11 @@ +--- grub-2.12/include/grub/efi/api.h.orig 2023-11-22 18:52:44.000000000 +0100 ++++ grub-2.12/include/grub/efi/api.h 2024-06-06 19:27:51.082911968 +0200 +@@ -587,7 +587,7 @@ + */ + #if defined(__i386__) + #define __grub_efi_api __attribute__((regparm(0))) +-#elif defined(__x86_64__) ++#elif defined(__x86_64__) && !defined(__ILP32__) + #define __grub_efi_api __attribute__((ms_abi)) + #else + #define __grub_efi_api