[openwrt/openwrt] tools: e2fsprogs: Update to version 1.47.3
LEDE Commits
lede-commits at lists.infradead.org
Sat Nov 8 12:22:14 PST 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1a71840512bce1d2ff09118094594fed7675b261
commit 1a71840512bce1d2ff09118094594fed7675b261
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat Oct 25 17:00:18 2025 +0200
tools: e2fsprogs: Update to version 1.47.3
Changelog:
https://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.47.3
Add patch to fix build on older Linux systems like Debian oldstable.
Link: https://github.com/openwrt/openwrt/pull/20541
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
tools/e2fsprogs/Makefile | 4 +-
...e_inode-Fix-compilation-again-kernel-5.12.patch | 72 ++++++++++++++++++++++
2 files changed, 74 insertions(+), 2 deletions(-)
diff --git a/tools/e2fsprogs/Makefile b/tools/e2fsprogs/Makefile
index 5deee08160..6b105ed9a8 100644
--- a/tools/e2fsprogs/Makefile
+++ b/tools/e2fsprogs/Makefile
@@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=e2fsprogs
PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs
-PKG_VERSION:=1.47.2
-PKG_HASH:=08242e64ca0e8194d9c1caad49762b19209a06318199b63ce74ae4ef2d74e63c
+PKG_VERSION:=1.47.3
+PKG_HASH:=857e6ef800feaa2bb4578fbc810214be5d3c88b072ea53c5384733a965737329
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/
diff --git a/tools/e2fsprogs/patches/001-create_inode-Fix-compilation-again-kernel-5.12.patch b/tools/e2fsprogs/patches/001-create_inode-Fix-compilation-again-kernel-5.12.patch
new file mode 100644
index 0000000000..0f504d5cb4
--- /dev/null
+++ b/tools/e2fsprogs/patches/001-create_inode-Fix-compilation-again-kernel-5.12.patch
@@ -0,0 +1,72 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke at hauke-m.de>
+Date: Sat, 25 Oct 2025 19:59:58 +0200
+Subject: create_inode: Fix compilation again kernel < 5.12
+
+Copy the header definition from Linux kernel v5.12 to allow compilation
+against kernel headers from an kernel older than v5.12.
+
+struct fsverity_descriptor was already added in kernel 5.11, compiling
+against kernel 5.11 kernel headers could cause problems.
+
+Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
+---
+ misc/create_inode.c | 47 +++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 47 insertions(+)
+
+--- a/misc/create_inode.c
++++ b/misc/create_inode.c
+@@ -575,6 +575,53 @@ static inline off_t round_up(off_t n, of
+ return ((n - bias + (blksz - 1)) & ~(blksz - 1)) + bias;
+ }
+
++#ifndef FS_IOC_READ_VERITY_METADATA
++
++/*
++ * Struct containing a file's Merkle tree properties. The fs-verity file digest
++ * is the hash of this struct. A userspace program needs this struct only if it
++ * needs to compute fs-verity file digests itself, e.g. in order to sign files.
++ * It isn't needed just to enable fs-verity on a file.
++ *
++ * Note: when computing the file digest, 'sig_size' and 'signature' must be left
++ * zero and empty, respectively. These fields are present only because some
++ * filesystems reuse this struct as part of their on-disk format.
++ */
++struct fsverity_descriptor {
++ __u8 version; /* must be 1 */
++ __u8 hash_algorithm; /* Merkle tree hash algorithm */
++ __u8 log_blocksize; /* log2 of size of data and tree blocks */
++ __u8 salt_size; /* size of salt in bytes; 0 if none */
++#ifdef __KERNEL__
++ __le32 sig_size;
++#else
++ __le32 __reserved_0x04; /* must be 0 */
++#endif
++ __le64 data_size; /* size of file the Merkle tree is built over */
++ __u8 root_hash[64]; /* Merkle tree root hash */
++ __u8 salt[32]; /* salt prepended to each hashed block */
++ __u8 __reserved[144]; /* must be 0's */
++#ifdef __KERNEL__
++ __u8 signature[];
++#endif
++};
++
++#define FS_VERITY_METADATA_TYPE_MERKLE_TREE 1
++#define FS_VERITY_METADATA_TYPE_DESCRIPTOR 2
++#define FS_VERITY_METADATA_TYPE_SIGNATURE 3
++
++struct fsverity_read_metadata_arg {
++ __u64 metadata_type;
++ __u64 offset;
++ __u64 length;
++ __u64 buf_ptr;
++ __u64 __reserved;
++};
++
++#define FS_IOC_READ_VERITY_METADATA \
++ _IOWR('f', 135, struct fsverity_read_metadata_arg)
++#endif
++
+ static errcode_t copy_fs_verity_data(ext2_file_t e2_file, ext2_off_t e2_offset,
+ int fd, uint64_t metadata_type,
+ __u32 *written)
More information about the lede-commits
mailing list