From fb7e4f075e626f6d450f3c13ec39f846c1d0e609 Mon Sep 17 00:00:00 2001 From: Abhi Das Date: Mon, 11 Aug 2025 17:56:00 -0500 Subject: [PATCH] erofs-utils: Update to 1.8.10 Update to 1.8.10-1 for latest features and fixes JIRA: https://issues.redhat.com/browse/RHEL-106459 Resolves: RHEL-106459 Signed-off-by: Abhi Das --- erofs-utils-1.8.4-fix-endianness-issue.patch | 60 ----------- ...utils-1.8.4-fragdedupe-inode-support.patch | 102 ------------------ erofs-utils.spec | 10 +- sources | 2 +- 4 files changed, 7 insertions(+), 167 deletions(-) delete mode 100644 erofs-utils-1.8.4-fix-endianness-issue.patch delete mode 100644 erofs-utils-1.8.4-fragdedupe-inode-support.patch diff --git a/erofs-utils-1.8.4-fix-endianness-issue.patch b/erofs-utils-1.8.4-fix-endianness-issue.patch deleted file mode 100644 index b0a7d6a..0000000 --- a/erofs-utils-1.8.4-fix-endianness-issue.patch +++ /dev/null @@ -1,60 +0,0 @@ -From d55344291092b69a2ba6f11dbcda52fa534ac124 Mon Sep 17 00:00:00 2001 -From: Alexander Egorenkov -Date: Tue, 29 Apr 2025 09:30:52 +0200 -Subject: erofs-utils: fix endiannes issue - -Macros __BYTE_ORDER, __LITTLE_ENDIAN and __BIG_ENDIAN are defined in -user space header 'endian.h'. Not including this header results in -the condition #if __BYTE_ORDER == __LITTLE_ENDIAN being always true, -even on BE architectures (e.g. s390x). Due to this bug the compressor -library was built for LE byte-order on BE arch s390x. - -Fixes: bc99c763e3fe ("erofs-utils: switch to effective unaligned access") -Signed-off-by: Alexander Egorenkov -Reviewed-by: Ian Kent -Reviewed-by: Hongbo Li -Link: https://lore.kernel.org/r/20250429073052.53681-1-egorenar@linux.ibm.com -Signed-off-by: Gao Xiang ---- - configure.ac | 1 + - include/erofs/defs.h | 15 +++++++++++++++ - 2 files changed, 16 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 6e1e7a1..88f1cbe 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -194,6 +194,7 @@ AC_ARG_WITH(selinux, - AC_CHECK_HEADERS(m4_flatten([ - dirent.h - execinfo.h -+ endian.h - fcntl.h - getopt.h - inttypes.h -diff --git a/include/erofs/defs.h b/include/erofs/defs.h -index 051a270..21e0f09 100644 ---- a/include/erofs/defs.h -+++ b/include/erofs/defs.h -@@ -24,6 +24,21 @@ extern "C" - #include - #endif - -+#ifdef HAVE_ENDIAN_H -+#include -+#else -+/* Use GNU C predefined macros as a fallback */ -+#ifndef __BYTE_ORDER -+#define __BYTE_ORDER __BYTE_ORDER__ -+#endif -+#ifndef __LITTLE_ENDIAN -+#define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__ -+#endif -+#ifndef __BIG_ENDIAN -+#define __BIG_ENDIAN __ORDER_BIG_ENDIAN__ -+#endif -+#endif -+ - #ifdef HAVE_LINUX_TYPES_H - #include - #endif diff --git a/erofs-utils-1.8.4-fragdedupe-inode-support.patch b/erofs-utils-1.8.4-fragdedupe-inode-support.patch deleted file mode 100644 index 216b61a..0000000 --- a/erofs-utils-1.8.4-fragdedupe-inode-support.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 06875b3f2182eab24b81083dfde542f778b201cc Mon Sep 17 00:00:00 2001 -From: Gao Xiang -Date: Fri, 3 Jan 2025 10:40:11 +0800 -Subject: erofs-utils: mkfs: support `-Efragdedupe=inode` - -If the entire inode can be deduplicated against an existing fragment, -simply reuse it. - -Multi-threading can still be applied for `-Efragdedupe=inode` with -the current codebase: - -Fedora Linux 39 (Workstation Edition) LiveCD results: - -zlzma,level=6,dictsize=131072 -C65536 -Eall-fragments - - `-E^fragdedupe` 2,003,587,072 bytes (1911 MiB) - `-Efragdedupe=inode` 1,970,577,408 bytes (1880 MiB) - -Signed-off-by: Gao Xiang -Link: https://lore.kernel.org/r/20250103024011.198163-1-hsiangkao@linux.alibaba.com ---- - include/erofs/config.h | 8 +++++++- - lib/compress.c | 9 +++++++-- - mkfs/main.c | 13 ++++++++++--- - 3 files changed, 24 insertions(+), 6 deletions(-) - -diff --git a/include/erofs/config.h b/include/erofs/config.h -index 47e4d00..92c1467 100644 ---- a/include/erofs/config.h -+++ b/include/erofs/config.h -@@ -33,6 +33,12 @@ enum { - TIMESTAMP_CLAMPING, - }; - -+enum { -+ FRAGDEDUPE_FULL, -+ FRAGDEDUPE_INODE, -+ FRAGDEDUPE_OFF, -+}; -+ - #define EROFS_MAX_COMPR_CFGS 64 - - struct erofs_compr_opts { -@@ -53,7 +59,7 @@ struct erofs_configure { - bool c_fragments; - bool c_all_fragments; - bool c_dedupe; -- bool c_nofragdedupe; -+ char c_fragdedupe; - bool c_ignore_mtime; - bool c_showprogress; - bool c_extra_ea_name_prefixes; -diff --git a/lib/compress.c b/lib/compress.c -index 0e8faad..20ab208 100644 ---- a/lib/compress.c -+++ b/lib/compress.c -@@ -1527,12 +1527,17 @@ void *erofs_begin_compressed_file(struct erofs_inode *inode, int fd, u64 fpos) - * parts into the packed inode. - */ - if (cfg.c_fragments && !erofs_is_packed_inode(inode) && -- !cfg.c_nofragdedupe) { -+ cfg.c_fragdedupe != FRAGDEDUPE_OFF) { - ret = z_erofs_fragments_dedupe(inode, fd, &ictx->tof_chksum); - if (ret < 0) - goto err_free_ictx; -- } - -+ if (cfg.c_fragdedupe == FRAGDEDUPE_INODE && -+ inode->fragment_size < inode->i_size) { -+ erofs_dbg("Discard the sub-inode tail fragment @ nid %llu", inode->nid); -+ inode->fragment_size = 0; -+ } -+ } - ictx->inode = inode; - ictx->fpos = fpos; - init_list_head(&ictx->extents); -diff --git a/mkfs/main.c b/mkfs/main.c -index 3f74fa2..0f6a32b 100644 ---- a/mkfs/main.c -+++ b/mkfs/main.c -@@ -306,9 +306,16 @@ static int erofs_mkfs_feat_set_dedupe(bool en, const char *val, - static int erofs_mkfs_feat_set_fragdedupe(bool en, const char *val, - unsigned int vallen) - { -- if (vallen) -- return -EINVAL; -- cfg.c_nofragdedupe = !en; -+ if (!en) { -+ if (vallen) -+ return -EINVAL; -+ cfg.c_fragdedupe = FRAGDEDUPE_OFF; -+ } else if (vallen == sizeof("inode") - 1 && -+ !memcmp(val, "inode", vallen)) { -+ cfg.c_fragdedupe = FRAGDEDUPE_INODE; -+ } else { -+ cfg.c_fragdedupe = FRAGDEDUPE_FULL; -+ } - return 0; - } - --- -cgit 1.2.3-korg - diff --git a/erofs-utils.spec b/erofs-utils.spec index 42359e8..f730536 100644 --- a/erofs-utils.spec +++ b/erofs-utils.spec @@ -10,16 +10,14 @@ %bcond zstd 1 Name: erofs-utils -Version: 1.8.4 -Release: 3%{?dist} +Version: 1.8.10 +Release: 1%{?dist} Summary: Utilities for working with EROFS License: GPL-2.0-only AND GPL-2.0-or-later AND (GPL-2.0-only OR Apache-2.0) AND (GPL-2.0-or-later OR Apache-2.0) AND (GPL-2.0-only OR BSD-2-Clause) AND (GPL-2.0-or-later OR BSD-2-Clause) AND Unlicense URL: https://erofs.docs.kernel.org/ Source: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/snapshot/%{name}-%{version}.tar.gz -Patch: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/patch/?id=06875b3f2182eab24b81083dfde542f778b201cc#/%{name}-1.8.4-fragdedupe-inode-support.patch -Patch: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/patch/?id=d55344291092b69a2ba6f11dbcda52fa534ac124#/%{name}-1.8.4-fix-endianness-issue.patch BuildRequires: %[ "%{toolchain}" == "clang" ? "clang compiler-rt" : "gcc" ] BuildRequires: libtool @@ -99,6 +97,10 @@ autoreconf -fi %changelog +* Mon Aug 11 2025 Abhi Das - 1.8.10-1 +- Update to the 1.8.10 release. + Resolves: RHEL-106459 + * Mon May 05 2025 Abhi Das - 1.8.4-3 - erofs-utils: fix endianness issue Resolves: RHEL-86463 diff --git a/sources b/sources index 0428664..0d44d27 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (erofs-utils-1.8.4.tar.gz) = c941b0a2ab6c650a9aa4c9cadeb277ebc87007dc51354ff013c7cb763e6e8c9d44ed9e4791730ed05088faaba8c612198b924e70f5e52019382cfdf6d2e6b677 +SHA512 (erofs-utils-1.8.10.tar.gz) = 8c7afd3db55fd4c4f7aa9fbd7ed40fa40de0bfffcee601a3f5dce823d406a32b5e939e24cd6dc336e3033e940fb16ee93f8821f627f90b10e6137113949933dd