]> TLD Linux GIT Repositories - packages/grub2.git/commitdiff
- merged 2.12 from PLD master
authorMarcin Krol <hawk@tld-linux.org>
Tue, 9 Jan 2024 20:45:00 +0000 (21:45 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Tue, 9 Jan 2024 20:45:00 +0000 (21:45 +0100)
0193-fs-xfs-Fix-unreadable-filesystem-with-v4-superblock.patch [deleted file]
0268-grub_fs_probe-dprint-errors-from-filesystems.patch [deleted file]
efi-net-fix.patch [deleted file]
grub-mkconfig-diagnostics.patch
grub2-fonts_path.patch
grub2.spec
ignore-ext4-metadata_csum_seed.patch [deleted file]
initrd-search.patch
posix.patch

diff --git a/0193-fs-xfs-Fix-unreadable-filesystem-with-v4-superblock.patch b/0193-fs-xfs-Fix-unreadable-filesystem-with-v4-superblock.patch
deleted file mode 100644 (file)
index 7fc40f1..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Erwan Velu <erwanaliasr1@gmail.com>
-Date: Wed, 25 Aug 2021 15:31:52 +0200
-Subject: [PATCH] fs/xfs: Fix unreadable filesystem with v4 superblock
-
-The commit 8b1e5d193 (fs/xfs: Add bigtime incompat feature support)
-introduced the bigtime support by adding some features in v3 inodes.
-This change extended grub_xfs_inode struct by 76 bytes but also changed
-the computation of XFS_V2_INODE_SIZE and XFS_V3_INODE_SIZE. Prior this
-commit, XFS_V2_INODE_SIZE was 100 bytes. After the commit it's 84 bytes
-XFS_V2_INODE_SIZE becomes 16 bytes too small.
-
-As a result, the data structures aren't properly aligned and the GRUB
-generates "attempt to read or write outside of partition" errors when
-trying to read the XFS filesystem:
-
-                             GNU GRUB  version 2.11
-       ....
-       grub> set debug=efi,gpt,xfs
-       grub> insmod part_gpt
-       grub> ls (hd0,gpt1)/
-       partmap/gpt.c:93: Read a valid GPT header
-       partmap/gpt.c:115: GPT entry 0: start=4096, length=1953125
-       fs/xfs.c:931: Reading sb
-       fs/xfs.c:270: Validating superblock
-       fs/xfs.c:295: XFS v4 superblock detected
-       fs/xfs.c:962: Reading root ino 128
-       fs/xfs.c:515: Reading inode (128) - 64, 0
-       fs/xfs.c:515: Reading inode (739521961424144223) - 344365866970255880, 3840
-       error: attempt to read or write outside of partition.
-
-This commit change the XFS_V2_INODE_SIZE computation by subtracting 76
-bytes instead of 92 bytes from the actual size of grub_xfs_inode struct.
-This 76 bytes value comes from added members:
-       20 grub_uint8_t   unused5
-        1 grub_uint64_t  flags2
-        48 grub_uint8_t   unused6
-
-This patch explicitly splits the v2 and v3 parts of the structure.
-The unused4 is still ending of the v2 structures and the v3 starts
-at unused5. Thanks to this we will avoid future corruptions of v2
-or v3 inodes.
-
-The XFS_V2_INODE_SIZE is returning to its expected size and the
-filesystem is back to a readable state:
-
-                      GNU GRUB  version 2.11
-       ....
-       grub> set debug=efi,gpt,xfs
-       grub> insmod part_gpt
-       grub> ls (hd0,gpt1)/
-       partmap/gpt.c:93: Read a valid GPT header
-       partmap/gpt.c:115: GPT entry 0: start=4096, length=1953125
-       fs/xfs.c:931: Reading sb
-       fs/xfs.c:270: Validating superblock
-       fs/xfs.c:295: XFS v4 superblock detected
-       fs/xfs.c:962: Reading root ino 128
-       fs/xfs.c:515: Reading inode (128) - 64, 0
-       fs/xfs.c:515: Reading inode (128) - 64, 0
-       fs/xfs.c:931: Reading sb
-       fs/xfs.c:270: Validating superblock
-       fs/xfs.c:295: XFS v4 superblock detected
-       fs/xfs.c:962: Reading root ino 128
-       fs/xfs.c:515: Reading inode (128) - 64, 0
-       fs/xfs.c:515: Reading inode (128) - 64, 0
-       fs/xfs.c:515: Reading inode (128) - 64, 0
-       fs/xfs.c:515: Reading inode (131) - 64, 768
-       efi/ fs/xfs.c:515: Reading inode (3145856) - 1464904, 0
-       grub2/ fs/xfs.c:515: Reading inode (132) - 64, 1024
-       grub/ fs/xfs.c:515: Reading inode (139) - 64, 2816
-       grub>
-
-Fixes: 8b1e5d193 (fs/xfs: Add bigtime incompat feature support)
-
-Signed-off-by: Erwan Velu <e.velu@criteo.com>
-Tested-by: Carlos Maiolino <cmaiolino@redhat.com>
-Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
-(cherry picked from commit a4b495520e4dc41a896a8b916a64eda9970c50ea)
----
- grub-core/fs/xfs.c | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c
-index 0f524c3a8a..e3816d1ec4 100644
---- a/grub-core/fs/xfs.c
-+++ b/grub-core/fs/xfs.c
-@@ -192,6 +192,11 @@ struct grub_xfs_time_legacy
-   grub_uint32_t nanosec;
- } GRUB_PACKED;
-+/*
-+ * The struct grub_xfs_inode layout was taken from the
-+ * struct xfs_dinode_core which is described here:
-+ * https://mirrors.edge.kernel.org/pub/linux/utils/fs/xfs/docs/xfs_filesystem_structure.pdf
-+ */
- struct grub_xfs_inode
- {
-   grub_uint8_t magic[2];
-@@ -208,14 +213,15 @@ struct grub_xfs_inode
-   grub_uint32_t nextents;
-   grub_uint16_t unused3;
-   grub_uint8_t fork_offset;
--  grub_uint8_t unused4[37];
-+  grub_uint8_t unused4[17]; /* Last member of inode v2. */
-+  grub_uint8_t unused5[20]; /* First member of inode v3. */
-   grub_uint64_t flags2;
--  grub_uint8_t unused5[48];
-+  grub_uint8_t unused6[48]; /* Last member of inode v3. */
- } GRUB_PACKED;
- #define XFS_V3_INODE_SIZE     sizeof(struct grub_xfs_inode)
--/* Size of struct grub_xfs_inode until fork_offset (included). */
--#define XFS_V2_INODE_SIZE     (XFS_V3_INODE_SIZE - 92)
-+/* Size of struct grub_xfs_inode v2, up to unused4 member included. */
-+#define XFS_V2_INODE_SIZE     (XFS_V3_INODE_SIZE - 76)
- struct grub_xfs_dirblock_tail
- {
diff --git a/0268-grub_fs_probe-dprint-errors-from-filesystems.patch b/0268-grub_fs_probe-dprint-errors-from-filesystems.patch
deleted file mode 100644 (file)
index 1455ae4..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Robbie Harwood <rharwood@redhat.com>
-Date: Fri, 15 Jul 2022 15:39:41 -0400
-Subject: [PATCH] grub_fs_probe(): dprint errors from filesystems
-
-When filesystem detection fails, all that's currently debug-logged is a
-series of messages like:
-
-    grub-core/kern/fs.c:56:fs: Detecting ntfs...
-    grub-core/kern/fs.c:76:fs: ntfs detection failed.
-
-repeated for each filesystem.  Any messages provided to grub_error() by
-the filesystem are lost, and one has to break out gdb to figure out what
-went wrong.
-
-With this change, one instead sees:
-
-    grub-core/kern/fs.c:56:fs: Detecting fat...
-    grub-core/osdep/hostdisk.c:357:hostdisk: reusing open device
-    `/path/to/device'
-    grub-core/kern/fs.c:77:fs: error: invalid modification timestamp for /.
-    grub-core/kern/fs.c:79:fs: fat detection failed.
-
-in the debug prints.
-
-Signed-off-by: Robbie Harwood <rharwood@redhat.com>
-(cherry picked from commit 838c79d658797d0662ee7f9e033e38ee88059e02)
----
- grub-core/kern/fs.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/grub-core/kern/fs.c b/grub-core/kern/fs.c
-index c698295bcb..b58e2ae1d2 100644
---- a/grub-core/kern/fs.c
-+++ b/grub-core/kern/fs.c
-@@ -74,6 +74,7 @@ grub_fs_probe (grub_device_t device)
-         if (grub_errno == GRUB_ERR_NONE)
-           return p;
-+        grub_dprintf ("fs", _("error: %s.\n"), grub_errmsg);
-         grub_error_push ();
-         grub_dprintf ("fs", "%s detection failed.\n", p->name);
-         grub_error_pop ();
diff --git a/efi-net-fix.patch b/efi-net-fix.patch
deleted file mode 100644 (file)
index 41872c0..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-From 886d93184b894a29b0bef1f2467230a20c7a33ce Mon Sep 17 00:00:00 2001
-From: Mark Salter <msalter@redhat.com>
-Date: Tue, 8 Apr 2014 10:58:11 -0400
-Subject: [PATCH] reopen SNP protocol for exclusive use by grub
-
-While working with pxeboot of grub on an ARM platform, I noticed
-very poor network performance while grub was loading a kernel
-and initramfs. The performance during the loading of grub itself
-seemed reasonable. Digging into the issue, I found that the UEFI
-firmware was periodically polling for network packets while grub
-was downloading files. This was causing timeouts and retries in
-the grub network stack.
-
-The solution I found was to reopen the SNP protocol for exclusive
-use. This forces UEFI to shutdown its use of SNP so that grub is
-not competing for incoming packets.
-
-Signed-off-by: Mark Salter <msalter@redhat.com>
----
- grub-core/net/drivers/efi/efinet.c | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
-index 2b344d6..a6e4c79 100644
---- a/grub-core/net/drivers/efi/efinet.c
-+++ b/grub-core/net/drivers/efi/efinet.c
-@@ -223,6 +223,7 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
- {
-   struct grub_net_card *card;
-   grub_efi_device_path_t *dp;
-+  grub_efi_simple_network_t *net;
-   dp = grub_efi_get_device_path (hnd);
-   if (! dp)
-@@ -250,6 +251,21 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
-                                   &pxe_mode->dhcp_ack,
-                                   sizeof (pxe_mode->dhcp_ack),
-                                   1, device, path);
-+    net = grub_efi_open_protocol (card->efi_handle, &net_io_guid,
-+                                GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE);
-+    if (net) {
-+      if (net->mode->state == GRUB_EFI_NETWORK_STOPPED
-+        && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS)
-+      continue;
-+
-+      if (net->mode->state == GRUB_EFI_NETWORK_STOPPED)
-+      continue;
-+
-+      if (net->mode->state == GRUB_EFI_NETWORK_STARTED
-+        && efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS)
-+      continue;
-+      card->efi_net = net;
-+    }
-     return;
-   }
- }
--- 
-1.8.5.3
-
index a10124ab4be7c299c64efc233f4fadb2f9907c11..36edb0bc34137bda245a7f9e5ecba458d84214af 100644 (file)
@@ -107,9 +107,9 @@ diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/10_kfreebsd.in gr
 --- grub-2.02~beta2.orig/util/grub.d/10_kfreebsd.in    2013-12-17 18:25:57.000000000 +0100
 +++ grub-2.02~beta2/util/grub.d/10_kfreebsd.in 2014-01-04 11:34:50.135240649 +0100
 @@ -158,7 +158,7 @@
 --- grub-2.02~beta2.orig/util/grub.d/10_kfreebsd.in    2013-12-17 18:25:57.000000000 +0100
 +++ grub-2.02~beta2/util/grub.d/10_kfreebsd.in 2014-01-04 11:34:50.135240649 +0100
 @@ -158,7 +158,7 @@
+ is_top_level=true
  
  
- while [ "x$list" != "x" ] ; do
-   kfreebsd=`version_find_latest $list`
+ for kfreebsd in ${reverse_sorted_list}; do
 -  gettext_printf "Found kernel of FreeBSD: %s\n" "$kfreebsd" >&2
 +  gettext_printf "Found kernel of FreeBSD: %s\n" "$kfreebsd" >&3
    basename=`basename $kfreebsd`
 -  gettext_printf "Found kernel of FreeBSD: %s\n" "$kfreebsd" >&2
 +  gettext_printf "Found kernel of FreeBSD: %s\n" "$kfreebsd" >&3
    basename=`basename $kfreebsd`
@@ -127,9 +127,9 @@ diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/10_kfreebsd.in gr
 --- grub-2.04/util/grub.d/10_linux.in.orig     2018-11-24 18:13:02.000000000 +0100
 +++ grub-2.04/util/grub.d/10_linux.in  2019-07-05 13:53:33.737370014 +0200
 @@ -194,7 +194,7 @@
 --- grub-2.04/util/grub.d/10_linux.in.orig     2018-11-24 18:13:02.000000000 +0100
 +++ grub-2.04/util/grub.d/10_linux.in  2019-07-05 13:53:33.737370014 +0200
 @@ -194,7 +194,7 @@
  is_top_level=true
  is_top_level=true
- while [ "x$list" != "x" ] ; do
-   linux=`version_find_latest $list`
+ for linux in ${reverse_sorted_list}; do
 -  gettext_printf "Found linux image: %s\n" "$linux" >&2
 +  gettext_printf "Found linux image: %s\n" "$linux" >&3
    basename=`basename $linux`
 -  gettext_printf "Found linux image: %s\n" "$linux" >&2
 +  gettext_printf "Found linux image: %s\n" "$linux" >&3
    basename=`basename $linux`
@@ -171,9 +171,9 @@ diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/10_windows.in gru
 --- grub-2.04/util/grub.d/20_linux_xen.in.orig 2019-04-23 10:54:47.000000000 +0200
 +++ grub-2.04/util/grub.d/20_linux_xen.in      2019-07-05 13:55:11.220267798 +0200
 @@ -243,7 +243,7 @@
 --- grub-2.04/util/grub.d/20_linux_xen.in.orig 2019-04-23 10:54:47.000000000 +0200
 +++ grub-2.04/util/grub.d/20_linux_xen.in      2019-07-05 13:55:11.220267798 +0200
 @@ -243,7 +243,7 @@
+     done
  
  
-     while [ "x$list" != "x" ] ; do
-       linux=`version_find_latest $list`
+     for linux in ${reverse_sorted_linux_list}; do
 -      gettext_printf "Found linux image: %s\n" "$linux" >&2
 +      gettext_printf "Found linux image: %s\n" "$linux" >&3
        basename=`basename $linux`
 -      gettext_printf "Found linux image: %s\n" "$linux" >&2
 +      gettext_printf "Found linux image: %s\n" "$linux" >&3
        basename=`basename $linux`
index d9fd2ad784a6123f31cade2275b60951bf08097c..e5f5300937c3a448a34e295a1e67410c7d09a962 100644 (file)
@@ -1,12 +1,11 @@
-diff -dur -x '*~' grub-2.00.orig/configure.ac grub-2.00/configure.ac
---- grub-2.00.orig/configure.ac        2012-10-28 09:47:24.000000000 +0100
-+++ grub-2.00/configure.ac     2012-10-28 09:48:06.438240771 +0100
-@@ -940,7 +940,7 @@
- if test x"$starfield_excuse" = x; then
-    for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
--     for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do
-+     for dir in . /usr/share/fonts/TTF /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do
-         if test -f "$dir/DejaVuSans.$ext"; then
-           DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext"
-           break 2
+--- grub-2.12/configure.ac.orig        2023-12-20 18:27:11.057068695 +0100
++++ grub-2.12/configure.ac     2023-12-20 18:28:25.454952491 +0100
+@@ -1847,7 +1847,7 @@
+   # search in well-known directories
+   if test x"$starfield_excuse" = x; then
+      for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
+-       for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype /usr/pkg/share/fonts/X11/TTF /usr/local/share/fonts/dejavu /usr/X11R6/lib/X11/fonts/TTF; do
++       for dir in . /usr/share/fonts/TTF /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype /usr/pkg/share/fonts/X11/TTF /usr/local/share/fonts/dejavu /usr/X11R6/lib/X11/fonts/TTF; do
+           if test -f "$dir/DejaVuSans.$ext"; then
+             DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext"
+             break 2
index bb2ae3179b92e60feef0f3db901b1babeaec754b..4b4f121e6305eba10d20d829e4236a41e23ba921 100644 (file)
@@ -73,7 +73,7 @@
 %define                platforms %{?with_coreboot:coreboot} %{?with_ieee1275:ieee1275} %{?with_multiboot:multiboot} %{?with_qemu:qemu} %{?with_xen:xen} %{?with_xen_pvh:xen_pvh} %{?with_efi:efi} %{?with_pc:pc}
 %endif
 %ifarch %{arm}
 %define                platforms %{?with_coreboot:coreboot} %{?with_ieee1275:ieee1275} %{?with_multiboot:multiboot} %{?with_qemu:qemu} %{?with_xen:xen} %{?with_xen_pvh:xen_pvh} %{?with_efi:efi} %{?with_pc:pc}
 %endif
 %ifarch %{arm}
-%define                platforms %{?with_efi:efi} %{?with_uboot:uboot}
+%define                platforms %{?with_coreboot:coreboot} %{?with_efi:efi} %{?with_uboot:uboot}
 %endif
 %ifarch aarch64 ia64 riscv32 riscv64
 %define                platforms efi
 %endif
 %ifarch aarch64 ia64 riscv32 riscv64
 %define                platforms efi
@@ -143,12 +143,12 @@ Summary(hu.UTF-8):        GRUB2 - rendszerbetöltő x86 és ppc gépekhez
 Summary(pl.UTF-8):     GRUB2 - bootloader dla x86 i ppc
 Summary(pt_BR.UTF-8):  Gerenciador de inicialização GRUB2
 Name:          grub2
 Summary(pl.UTF-8):     GRUB2 - bootloader dla x86 i ppc
 Summary(pt_BR.UTF-8):  Gerenciador de inicialização GRUB2
 Name:          grub2
-Version:       2.06
-Release:       4
+Version:       2.12
+Release:       1
 License:       GPL v2
 Group:         Base
 Source0:       https://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz
 License:       GPL v2
 Group:         Base
 Source0:       https://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz
-# Source0-md5: cf0fd928b1e5479c8108ee52cb114363
+# Source0-md5: 60c564b1bdc39d8e43b3aab4bc0fb140
 Source1:       update-grub
 Source2:       update-grub.8
 Source3:       grub.sysconfig
 Source1:       update-grub
 Source2:       update-grub.8
 Source3:       grub.sysconfig
@@ -164,14 +164,10 @@ Patch9:           just-say-linux.patch
 Patch10:       ignore-kernel-symlinks.patch
 Patch11:       initrd-search.patch
 Patch12:       %{name}-cfg.patch
 Patch10:       ignore-kernel-symlinks.patch
 Patch11:       initrd-search.patch
 Patch12:       %{name}-cfg.patch
-Patch13:       efi-net-fix.patch
 Patch14:       blscfg.patch
 Patch15:       restricted.patch
 Patch14:       blscfg.patch
 Patch15:       restricted.patch
-Patch16:        0193-fs-xfs-Fix-unreadable-filesystem-with-v4-superblock.patch
-Patch17:        0268-grub_fs_probe-dprint-errors-from-filesystems.patch
-Patch18:       ignore-ext4-metadata_csum_seed.patch
 URL:           http://www.gnu.org/software/grub/
 URL:           http://www.gnu.org/software/grub/
-BuildRequires: autoconf >= 2.63
+BuildRequires: autoconf >= 2.64
 BuildRequires: automake >= 1:1.11.1-1
 BuildRequires: bison >= 2.3
 BuildRequires: device-mapper-devel >= 1.02.34
 BuildRequires: automake >= 1:1.11.1-1
 BuildRequires: bison >= 2.3
 BuildRequires: device-mapper-devel >= 1.02.34
@@ -197,13 +193,14 @@ BuildRequires:    gettext-tools >= 0.18.3
 BuildRequires: glibc-localedb-all
 BuildRequires: glibc-static
 BuildRequires: help2man
 BuildRequires: glibc-localedb-all
 BuildRequires: glibc-static
 BuildRequires: help2man
-BuildRequires: libfuse-devel
+BuildRequires: libfuse3-devel
 BuildRequires: libtool
 BuildRequires: ncurses-devel
 BuildRequires: pkgconfig
 BuildRequires: python3
 BuildRequires: python3-modules
 BuildRequires: rpm >= 4.4.9-56
 BuildRequires: libtool
 BuildRequires: ncurses-devel
 BuildRequires: pkgconfig
 BuildRequires: python3
 BuildRequires: python3-modules
 BuildRequires: rpm >= 4.4.9-56
+BuildRequires: rpm-build >= 4.6
 BuildRequires: rpmbuild(macros) >= 1.213
 BuildRequires: sed >= 4.0
 BuildRequires: tar >= 1:1.22
 BuildRequires: rpmbuild(macros) >= 1.213
 BuildRequires: sed >= 4.0
 BuildRequires: tar >= 1:1.22
@@ -535,16 +532,17 @@ Motyw starfield dla GRUB-a.
 %patch10 -p1
 %patch11 -p1
 %patch12 -p0
 %patch10 -p1
 %patch11 -p1
 %patch12 -p0
-%patch13 -p1
 %patch14 -p1
 %patch15 -p1
 %patch14 -p1
 %patch15 -p1
-%patch16 -p1
-%patch17 -p1
-%patch18 -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*
 
 
 # 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*
 
+# missing in tarball
+cat > grub-core/extra_deps.lst <<EOF
+depends bli part_gpt
+EOF
+
 %build
 # if gold is used then grub doesn't even boot
 # https://savannah.gnu.org/bugs/?34539
 %build
 # if gold is used then grub doesn't even boot
 # https://savannah.gnu.org/bugs/?34539
@@ -568,15 +566,16 @@ for platform in %{platforms} ; do
 
        platform_opts=""
        case platform in
 
        platform_opts=""
        case platform in
-         coreboot|ieee1275|multiboot|pc|qemu|xen_pvh)
-               platform_opts="--enable-efiemu%{!?with_efiemu:=no}"
-               ;;
+               coreboot|ieee1275|multiboot|pc|qemu|xen_pvh)
+                       platform_opts="--enable-efiemu%{!?with_efiemu:=no}"
+                       ;;
        esac
 
        ln -f -s ../configure .
        # mawk stalls at ./genmoddep.awk, so force gawk
        AWK=gawk \
        %configure \
        esac
 
        ln -f -s ../configure .
        # mawk stalls at ./genmoddep.awk, so force gawk
        AWK=gawk \
        %configure \
+               PYTHON="%{__python3}" \
                --with-platform=${platform} \
                --disable-werror \
                --enable-grub-themes \
                --with-platform=${platform} \
                --disable-werror \
                --enable-grub-themes \
@@ -666,7 +665,7 @@ fi
 echo "Grub was upgraded, trying to setup it to boot sector"
 /sbin/grub-install '(hd0)' || :
 
 echo "Grub was upgraded, trying to setup it to boot sector"
 /sbin/grub-install '(hd0)' || :
 
-%triggerpostun -- %{name} < 1.99-7.3
+# -- %{name} < 1.99-7.3
 # migrate /etc/grub.d/custom.cfg.rpmsave  -> /boot/grub/custom.cfg
 if [ -f %{_sysconfdir}/grub.d/custom.cfg.rpmsave ]; then
        cp -f %{_grubdir}/custom.cfg{,.rpmnew}
 # migrate /etc/grub.d/custom.cfg.rpmsave  -> /boot/grub/custom.cfg
 if [ -f %{_sysconfdir}/grub.d/custom.cfg.rpmsave ]; then
        cp -f %{_grubdir}/custom.cfg{,.rpmnew}
@@ -704,13 +703,10 @@ fi
 %attr(755,root,root) %{_sbindir}/grub-bios-setup
 %{_mandir}/man8/grub-bios-setup.8*
 %endif
 %attr(755,root,root) %{_sbindir}/grub-bios-setup
 %{_mandir}/man8/grub-bios-setup.8*
 %endif
-%ifarch %{ix86} %{x8664} x32
 %attr(755,root,root) %{_sbindir}/grub-mkimage
 %{_mandir}/man1/grub-mkimage.1*
 %attr(755,root,root) %{_sbindir}/grub-mkimage
 %{_mandir}/man1/grub-mkimage.1*
-%else
 %attr(755,root,root) %{_sbindir}/grub-probe
 %{_mandir}/man8/grub-probe.8*
 %attr(755,root,root) %{_sbindir}/grub-probe
 %{_mandir}/man8/grub-probe.8*
-%endif
 %ifarch sparc64
 %attr(755,root,root) %{_sbindir}/grub-sparc64-setup
 %{_mandir}/man8/grub-sparc64-setup.8*
 %ifarch sparc64
 %attr(755,root,root) %{_sbindir}/grub-sparc64-setup
 %{_mandir}/man8/grub-sparc64-setup.8*
@@ -749,8 +745,8 @@ fi
 # XXX: check this locale dir location and if it is neccesaary to exist on /boot
 
 %dir %{_libexecdir}/locale
 # XXX: check this locale dir location and if it is neccesaary to exist on /boot
 
 %dir %{_libexecdir}/locale
-%config(noreplace) %verify(not md5 mtime size) %{_grubdir}/grub.cfg
-%config(noreplace) %verify(not md5 mtime size) %{_grubdir}/custom.cfg
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_grubdir}/grub.cfg
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_grubdir}/custom.cfg
 
 # generated by grub at runtime
 %ghost %{_grubdir}/device.map
 
 # generated by grub at runtime
 %ghost %{_grubdir}/device.map
@@ -762,14 +758,10 @@ fi
 %attr(755,root,root) /lib/grub.d/00_header
 %attr(755,root,root) /lib/grub.d/10_linux
 %attr(755,root,root) /lib/grub.d/20_linux_xen
 %attr(755,root,root) /lib/grub.d/00_header
 %attr(755,root,root) /lib/grub.d/10_linux
 %attr(755,root,root) /lib/grub.d/20_linux_xen
+%attr(755,root,root) /lib/grub.d/25_bli
 %attr(755,root,root) /lib/grub.d/30_os-prober
 %attr(755,root,root) /lib/grub.d/41_custom
 
 %attr(755,root,root) /lib/grub.d/30_os-prober
 %attr(755,root,root) /lib/grub.d/41_custom
 
-%ifarch %{ix86} %{x8664} x32
-%attr(755,root,root) %{_sbindir}/grub-probe
-%{_mandir}/man8/grub-probe.8*
-%endif
-
 %{_infodir}/grub*.info*
 
 %dir %{_datadir}/grub/themes
 %{_infodir}/grub*.info*
 
 %dir %{_datadir}/grub/themes
@@ -798,7 +790,7 @@ fi
 %{_libexecdir}/%{arc_arch}-arc/*.module
 %{_libexecdir}/%{arc_arch}-arc/config.h
 %{_libexecdir}/%{arc_arch}-arc/gdb_grub
 %{_libexecdir}/%{arc_arch}-arc/*.module
 %{_libexecdir}/%{arc_arch}-arc/config.h
 %{_libexecdir}/%{arc_arch}-arc/gdb_grub
-%{_libexecdir}/%{arc_arch}-arc/gmodule.pl
+%{_libexecdir}/%{arc_arch}-arc/gdb_helper.py
 %{_libexecdir}/%{arc_arch}-arc/kernel.exec
 %{_libexecdir}/%{arc_arch}-arc/kernel.img
 %endif
 %{_libexecdir}/%{arc_arch}-arc/kernel.exec
 %{_libexecdir}/%{arc_arch}-arc/kernel.img
 %endif
@@ -813,7 +805,7 @@ fi
 %{_libexecdir}/%{coreboot_arch}-coreboot/*.module
 %{_libexecdir}/%{coreboot_arch}-coreboot/config.h
 %{_libexecdir}/%{coreboot_arch}-coreboot/gdb_grub
 %{_libexecdir}/%{coreboot_arch}-coreboot/*.module
 %{_libexecdir}/%{coreboot_arch}-coreboot/config.h
 %{_libexecdir}/%{coreboot_arch}-coreboot/gdb_grub
-%{_libexecdir}/%{coreboot_arch}-coreboot/gmodule.pl
+%{_libexecdir}/%{coreboot_arch}-coreboot/gdb_helper.py
 %{_libexecdir}/%{coreboot_arch}-coreboot/kernel.exec
 %{_libexecdir}/%{coreboot_arch}-coreboot/kernel.img
 %if %{with efiemu}
 %{_libexecdir}/%{coreboot_arch}-coreboot/kernel.exec
 %{_libexecdir}/%{coreboot_arch}-coreboot/kernel.img
 %if %{with efiemu}
@@ -832,7 +824,7 @@ fi
 %{_libexecdir}/%{efi_arch}-efi/*.module
 %{_libexecdir}/%{efi_arch}-efi/config.h
 %{_libexecdir}/%{efi_arch}-efi/gdb_grub
 %{_libexecdir}/%{efi_arch}-efi/*.module
 %{_libexecdir}/%{efi_arch}-efi/config.h
 %{_libexecdir}/%{efi_arch}-efi/gdb_grub
-%{_libexecdir}/%{efi_arch}-efi/gmodule.pl
+%{_libexecdir}/%{efi_arch}-efi/gdb_helper.py
 %{_libexecdir}/%{efi_arch}-efi/kernel.exec
 %{_libexecdir}/%{efi_arch}-efi/kernel.img
 %endif
 %{_libexecdir}/%{efi_arch}-efi/kernel.exec
 %{_libexecdir}/%{efi_arch}-efi/kernel.img
 %endif
@@ -847,7 +839,7 @@ fi
 %{_libexecdir}/%{ieee1275_arch}-ieee1275/*.module
 %{_libexecdir}/%{ieee1275_arch}-ieee1275/config.h
 %{_libexecdir}/%{ieee1275_arch}-ieee1275/gdb_grub
 %{_libexecdir}/%{ieee1275_arch}-ieee1275/*.module
 %{_libexecdir}/%{ieee1275_arch}-ieee1275/config.h
 %{_libexecdir}/%{ieee1275_arch}-ieee1275/gdb_grub
-%{_libexecdir}/%{ieee1275_arch}-ieee1275/gmodule.pl
+%{_libexecdir}/%{ieee1275_arch}-ieee1275/gdb_helper.py
 %{_libexecdir}/%{ieee1275_arch}-ieee1275/kernel.exec
 %{_libexecdir}/%{ieee1275_arch}-ieee1275/kernel.img
 %if %{with efiemu}
 %{_libexecdir}/%{ieee1275_arch}-ieee1275/kernel.exec
 %{_libexecdir}/%{ieee1275_arch}-ieee1275/kernel.img
 %if %{with efiemu}
@@ -865,7 +857,7 @@ fi
 %{_libexecdir}/i386-multiboot/*.module
 %{_libexecdir}/i386-multiboot/config.h
 %{_libexecdir}/i386-multiboot/gdb_grub
 %{_libexecdir}/i386-multiboot/*.module
 %{_libexecdir}/i386-multiboot/config.h
 %{_libexecdir}/i386-multiboot/gdb_grub
-%{_libexecdir}/i386-multiboot/gmodule.pl
+%{_libexecdir}/i386-multiboot/gdb_helper.py
 %{_libexecdir}/i386-multiboot/kernel.exec
 %{_libexecdir}/i386-multiboot/kernel.img
 %if %{with efiemu}
 %{_libexecdir}/i386-multiboot/kernel.exec
 %{_libexecdir}/i386-multiboot/kernel.img
 %if %{with efiemu}
@@ -883,7 +875,7 @@ fi
 %{_libexecdir}/i386-pc/*.module
 %{_libexecdir}/i386-pc/config.h
 %{_libexecdir}/i386-pc/gdb_grub
 %{_libexecdir}/i386-pc/*.module
 %{_libexecdir}/i386-pc/config.h
 %{_libexecdir}/i386-pc/gdb_grub
-%{_libexecdir}/i386-pc/gmodule.pl
+%{_libexecdir}/i386-pc/gdb_helper.py
 %{_libexecdir}/i386-pc/boot.image
 %{_libexecdir}/i386-pc/boot.img
 %{_libexecdir}/i386-pc/boot_hybrid.image
 %{_libexecdir}/i386-pc/boot.image
 %{_libexecdir}/i386-pc/boot.img
 %{_libexecdir}/i386-pc/boot_hybrid.image
@@ -915,7 +907,7 @@ fi
 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/*.module
 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/config.h
 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/gdb_grub
 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/*.module
 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/config.h
 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/gdb_grub
-%{_libexecdir}/%{qemu_arch}-%{qemu_plat}/gmodule.pl
+%{_libexecdir}/%{qemu_arch}-%{qemu_plat}/gdb_helper.py
 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/boot.image
 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/boot.img
 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/kernel.exec
 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/boot.image
 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/boot.img
 %{_libexecdir}/%{qemu_arch}-%{qemu_plat}/kernel.exec
@@ -932,7 +924,7 @@ fi
 %{_libexecdir}/arm-uboot/*.module
 %{_libexecdir}/arm-uboot/config.h
 %{_libexecdir}/arm-uboot/gdb_grub
 %{_libexecdir}/arm-uboot/*.module
 %{_libexecdir}/arm-uboot/config.h
 %{_libexecdir}/arm-uboot/gdb_grub
-%{_libexecdir}/arm-uboot/gmodule.pl
+%{_libexecdir}/arm-uboot/gdb_helper.py
 %{_libexecdir}/arm-uboot/kernel.exec
 %{_libexecdir}/arm-uboot/kernel.img
 %endif
 %{_libexecdir}/arm-uboot/kernel.exec
 %{_libexecdir}/arm-uboot/kernel.img
 %endif
@@ -947,7 +939,7 @@ fi
 %{_libexecdir}/%{xen_arch}-xen/*.module
 %{_libexecdir}/%{xen_arch}-xen/config.h
 %{_libexecdir}/%{xen_arch}-xen/gdb_grub
 %{_libexecdir}/%{xen_arch}-xen/*.module
 %{_libexecdir}/%{xen_arch}-xen/config.h
 %{_libexecdir}/%{xen_arch}-xen/gdb_grub
-%{_libexecdir}/%{xen_arch}-xen/gmodule.pl
+%{_libexecdir}/%{xen_arch}-xen/gdb_helper.py
 %{_libexecdir}/%{xen_arch}-xen/kernel.exec
 %{_libexecdir}/%{xen_arch}-xen/kernel.img
 %endif
 %{_libexecdir}/%{xen_arch}-xen/kernel.exec
 %{_libexecdir}/%{xen_arch}-xen/kernel.img
 %endif
@@ -962,7 +954,7 @@ fi
 %{_libexecdir}/i386-xen_pvh/*.module
 %{_libexecdir}/i386-xen_pvh/config.h
 %{_libexecdir}/i386-xen_pvh/gdb_grub
 %{_libexecdir}/i386-xen_pvh/*.module
 %{_libexecdir}/i386-xen_pvh/config.h
 %{_libexecdir}/i386-xen_pvh/gdb_grub
-%{_libexecdir}/i386-xen_pvh/gmodule.pl
+%{_libexecdir}/i386-xen_pvh/gdb_helper.py
 %{_libexecdir}/i386-xen_pvh/kernel.exec
 %{_libexecdir}/i386-xen_pvh/kernel.img
 %if %{with efiemu}
 %{_libexecdir}/i386-xen_pvh/kernel.exec
 %{_libexecdir}/i386-xen_pvh/kernel.img
 %if %{with efiemu}
diff --git a/ignore-ext4-metadata_csum_seed.patch b/ignore-ext4-metadata_csum_seed.patch
deleted file mode 100644 (file)
index 27b2277..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-From 7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763 Mon Sep 17 00:00:00 2001
-From: Javier Martinez Canillas <javierm@redhat.com>
-Date: Fri, 11 Jun 2021 21:36:16 +0200
-Subject: fs/ext2: Ignore checksum seed incompat feature
-
-This incompat feature is used to denote that the filesystem stored its
-metadata checksum seed in the superblock. This is used to allow tune2fs
-changing the UUID on a mounted metdata_csum filesystem without having
-to rewrite all the disk metadata. However, the GRUB doesn't use the
-metadata checksum at all. So, it can just ignore this feature if it
-is enabled. This is consistent with the GRUB filesystem code in general
-which just does a best effort to access the filesystem's data.
-
-The checksum seed incompat feature has to be removed from the ignore
-list if the support for metadata checksum verification is added to the
-GRUB ext2 driver later.
-
-Suggested-by: Eric Sandeen <esandeen@redhat.com>
-Suggested-by: Lukas Czerner <lczerner@redhat.com>
-Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
-Reviewed-by: Lukas Czerner <lczerner@redhat.com>
-Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
----
- grub-core/fs/ext2.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
-index e7dd78e..4953a15 100644
---- a/grub-core/fs/ext2.c
-+++ b/grub-core/fs/ext2.c
-@@ -103,6 +103,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_CSUM_SEED               0x2000
- #define EXT4_FEATURE_INCOMPAT_ENCRYPT          0x10000
- /* The set of back-incompatible features this driver DOES support. Add (OR)
-@@ -123,10 +124,15 @@ GRUB_MOD_LICENSE ("GPLv3+");
-  * mmp:            Not really back-incompatible - was added as such to
-  *                 avoid multiple read-write mounts. Safe to ignore for this
-  *                 RO driver.
-+ * checksum seed:  Not really back-incompatible - was added to allow tools
-+ *                 such as tune2fs to change the UUID on a mounted metadata
-+ *                 checksummed filesystem. Safe to ignore for now since the
-+ *                 driver doesn't support checksum verification. However, it
-+ *                 has to be removed from this list if the support is added later.
-  */
- #define EXT2_DRIVER_IGNORED_INCOMPAT ( EXT3_FEATURE_INCOMPAT_RECOVER \
--                                   | EXT4_FEATURE_INCOMPAT_MMP)
--
-+                                   | EXT4_FEATURE_INCOMPAT_MMP \
-+                                   | EXT4_FEATURE_INCOMPAT_CSUM_SEED)
- #define EXT3_JOURNAL_MAGIC_NUMBER     0xc03b3998U
--- 
-cgit v1.1
-
index fc22efc7b4da532e10ce71ceb8b8f573165bc940..66f8e58fb4f13e21570370fd856aac71478b1556 100644 (file)
@@ -1,30 +1,34 @@
-diff -ur grub-2.04.orig/util/grub.d/10_linux.in grub-2.04/util/grub.d/10_linux.in
---- grub-2.04.orig/util/grub.d/10_linux.in     2019-08-18 15:53:40.493000000 +0200
-+++ grub-2.04/util/grub.d/10_linux.in  2019-08-18 15:55:25.547000000 +0200
-@@ -211,10 +211,7 @@
+diff -ur grub-2.12.orig/util/grub.d/10_linux.in grub-2.12/util/grub.d/10_linux.in
+--- grub-2.12.orig/util/grub.d/10_linux.in     2024-01-09 00:18:44.453971622 +0100
++++ grub-2.12/util/grub.d/10_linux.in  2024-01-09 00:25:52.553521455 +0100
+@@ -223,12 +223,7 @@
    done
  
    initrd_real=
    done
  
    initrd_real=
--  for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
--         "initrd-${version}" "initramfs-${version}.img" \
+-  for i in "initrd.img-${version}" "initrd-${version}.img" \
+-         "initrd-${alt_version}.img.old" "initrd-${version}.gz" \
+-         "initrd-${alt_version}.gz.old" "initrd-${version}" \
+-         "initramfs-${version}.img" "initramfs-${alt_version}.img.old" \
 -         "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
 -         "initrd-${alt_version}" "initramfs-${alt_version}.img" \
 +  for i in "initramfs-${version}.img" "initramfs-${alt_version}.img" \
           "initramfs-genkernel-${version}" \
           "initramfs-genkernel-${alt_version}" \
           "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
 -         "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
 -         "initrd-${alt_version}" "initramfs-${alt_version}.img" \
 +  for i in "initramfs-${version}.img" "initramfs-${alt_version}.img" \
           "initramfs-genkernel-${version}" \
           "initramfs-genkernel-${alt_version}" \
           "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
-diff -ur grub-2.04.orig/util/grub.d/20_linux_xen.in grub-2.04/util/grub.d/20_linux_xen.in
---- grub-2.04.orig/util/grub.d/20_linux_xen.in 2019-08-18 15:53:40.493000000 +0200
-+++ grub-2.04/util/grub.d/20_linux_xen.in      2019-08-18 15:55:58.507000000 +0200
-@@ -252,10 +252,7 @@
+diff -ur grub-2.12.orig/util/grub.d/20_linux_xen.in grub-2.12/util/grub.d/20_linux_xen.in
+--- grub-2.12.orig/util/grub.d/20_linux_xen.in 2024-01-09 00:18:44.453971622 +0100
++++ grub-2.12/util/grub.d/20_linux_xen.in      2024-01-09 00:26:19.353868889 +0100
+@@ -295,12 +295,7 @@
        linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
  
        initrd_real=
        linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
  
        initrd_real=
--      for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
--         "initrd-${version}" "initramfs-${version}.img" \
+-      for i in "initrd.img-${version}" "initrd-${version}.img" \
+-         "initrd-${alt_version}.img.old" "initrd-${version}.gz" \
+-         "initrd-${alt_version}.gz.old" "initrd-${version}" \
+-         "initramfs-${version}.img" "initramfs-${alt_version}.img.old" \
 -         "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
 -         "initrd-${alt_version}" "initramfs-${alt_version}.img" \
 -         "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
 -         "initrd-${alt_version}" "initramfs-${alt_version}.img" \
-+      for i in "initramfs-${version}.img" "initramfs-${alt_version}.img" \
++        for i in "initramfs-${version}.img" "initramfs-${alt_version}.img" \
           "initramfs-genkernel-${version}" \
           "initramfs-genkernel-${alt_version}" \
           "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
           "initramfs-genkernel-${version}" \
           "initramfs-genkernel-${alt_version}" \
           "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
index 72a7197a7970ef071f0d1a3b103faabb49ff32bd..18ab55ac716f5c61544181f40f4bf465ddc070ce 100644 (file)
@@ -1,6 +1,5 @@
-diff -ur grub-2.04.orig/util/grub-mkconfig.in grub-2.04/util/grub-mkconfig.in
---- grub-2.04.orig/util/grub-mkconfig.in       2019-08-18 15:49:45.245000000 +0200
-+++ grub-2.04/util/grub-mkconfig.in    2019-08-18 15:49:57.907000000 +0200
+--- grub-1.99/util/grub-mkconfig.in.wiget      2011-10-13 17:43:32.333505299 +0200
++++ grub-1.99/util/grub-mkconfig.in    2011-10-13 17:43:45.513070998 +0200
 @@ -1,5 +1,6 @@
  #! /bin/sh
  set -e
 @@ -1,5 +1,6 @@
  #! /bin/sh
  set -e