erofs-utils: import erofs-utils-1.8.2 into RHEL10

JIRA: https://issues.redhat.com/browse/RHEL-68370

This version adds multithreading and zstd support.
Also removed erroneous gating.yaml file

Resolves: RHEL-68370
Signed-off-by: Abhi Das <adas@redhat.com>
This commit is contained in:
Abhi Das 2024-11-20 13:50:07 -06:00
parent 84c7f0bf6d
commit 51bd9be59c
5 changed files with 75 additions and 89 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/erofs-utils-1.7.1.tar.gz /erofs-utils-1.7.1.tar.gz
/erofs-utils-1.8.2.tar.gz

View File

@ -0,0 +1,51 @@
From 882ad1c3157f7544bd4d004e3b6d744f0cbe3ffc Mon Sep 17 00:00:00 2001
From: Gao Xiang <hsiangkao@linux.alibaba.com>
Date: Sat, 12 Oct 2024 11:52:13 +0800
Subject: erofs-utils: mkfs: fix `-Eall-fragments` for multi-threaded
compression
If `-Eall-fragments` is specified when multi-threaded compression is
enabled, it should only apply to the packed inode instead of other
real inodes for now.
Fixes: 10c1590c0920 ("erofs-utils: enable multi-threaded support for `-Eall-fragments`")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20241012035213.3729725-1-hsiangkao@linux.alibaba.com
---
lib/compress.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lib/compress.c b/lib/compress.c
index 5d6fb2a..cbd4620 100644
--- a/lib/compress.c
+++ b/lib/compress.c
@@ -1456,12 +1456,8 @@ void *erofs_begin_compressed_file(struct erofs_inode *inode, int fd, u64 fpos)
inode->idata_size = 0;
inode->fragment_size = 0;
- if (z_erofs_mt_enabled) {
- ictx = malloc(sizeof(*ictx));
- if (!ictx)
- return ERR_PTR(-ENOMEM);
- ictx->fd = dup(fd);
- } else {
+ if (!z_erofs_mt_enabled ||
+ (cfg.c_all_fragments && !erofs_is_packed_inode(inode))) {
#ifdef EROFS_MT_ENABLED
pthread_mutex_lock(&g_ictx.mutex);
if (g_ictx.seg_num)
@@ -1471,6 +1467,11 @@ void *erofs_begin_compressed_file(struct erofs_inode *inode, int fd, u64 fpos)
#endif
ictx = &g_ictx;
ictx->fd = fd;
+ } else {
+ ictx = malloc(sizeof(*ictx));
+ if (!ictx)
+ return ERR_PTR(-ENOMEM);
+ ictx->fd = dup(fd);
}
ictx->ccfg = &erofs_ccfg[inode->z_algorithmtype[0]];
--
cgit 1.2.3-korg

View File

@ -2,30 +2,35 @@
%bcond fuse 1 %bcond fuse 1
%bcond lz4 %[ 0%{?fedora} >= 34 || 0%{?rhel} >= 9 ] %bcond lz4 %[ 0%{?fedora} >= 34 || 0%{?rhel} >= 9 ]
%bcond lzma %[ 0%{?fedora} >= 36 || 0%{?rhel} >= 10 ] %bcond lzma %[ 0%{?fedora} >= 36 || 0%{?rhel} >= 10 ]
%bcond qpl %[ 0%{?fedora} >= 41 && "%{_arch}" == "x86_64" ]
%bcond selinux 1 %bcond selinux 1
%bcond uuid 1 %bcond uuid 1
%bcond zlib 1 %bcond zlib 1
%bcond zstd 1
Name: erofs-utils Name: erofs-utils
Version: 1.7.1 Version: 1.8.2
Release: 5%{?dist} Release: 2%{?dist}
Summary: Utilities for working with EROFS 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 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://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git URL: https://erofs.docs.kernel.org/
Source: %{url}/snapshot/%{name}-%{version}.tar.gz 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=882ad1c3157f7544bd4d004e3b6d744f0cbe3ffc#/%{name}-1.8.2-fix-all-fragments.patch
BuildRequires: %[ "%{toolchain}" == "clang" ? "clang compiler-rt" : "gcc" ] BuildRequires: %[ "%{toolchain}" == "clang" ? "clang compiler-rt" : "gcc" ]
BuildRequires: libtool BuildRequires: libtool
BuildRequires: make BuildRequires: make
%{?with_deflate:BuildRequires: pkgconfig(libdeflate)} %{?with_deflate:BuildRequires: pkgconfig(libdeflate)}
%{?with_fuse:BuildRequires: pkgconfig(fuse) >= 2.6} %{?with_fuse:BuildRequires: pkgconfig(fuse3) >= 3.2}
%{?with_lz4:BuildRequires: lz4-devel >= 1.9.3} %{?with_lz4:BuildRequires: lz4-devel >= 1.9.3}
%{?with_lzma:BuildRequires: xz-devel >= 5.4} %{?with_lzma:BuildRequires: pkgconfig(liblzma) >= 5.4}
%{?with_qpl:BuildRequires: pkgconfig(qpl) >= 1.5.0}
%{?with_selinux:BuildRequires: pkgconfig(libselinux)} %{?with_selinux:BuildRequires: pkgconfig(libselinux)}
%{?with_uuid:BuildRequires: pkgconfig(uuid)} %{?with_uuid:BuildRequires: pkgconfig(uuid)}
%{?with_zlib:BuildRequires: pkgconfig(zlib)} %{?with_zlib:BuildRequires: pkgconfig(zlib)}
%{?with_zstd:BuildRequires: pkgconfig(libzstd) >= 1.4.0}
%description %description
EROFS stands for Enhanced Read-Only File System. It aims to be a general EROFS stands for Enhanced Read-Only File System. It aims to be a general
@ -37,7 +42,7 @@ This package includes tools to create, check, and extract EROFS images.
%if %{with fuse} %if %{with fuse}
%package -n erofs-fuse %package -n erofs-fuse
Summary: FUSE support for mounting EROFS images Summary: FUSE support for mounting EROFS images
Requires: fuse Requires: fuse3
%description -n erofs-fuse %description -n erofs-fuse
EROFS stands for Enhanced Read-Only File System. It aims to be a general EROFS stands for Enhanced Read-Only File System. It aims to be a general
@ -49,18 +54,21 @@ This package includes erofsfuse to mount EROFS images.
%prep %prep
%autosetup %autosetup -p1
autoreconf -fi autoreconf -fi
%build %build
%configure \ %configure \
--enable-multithreading \
--%{?with_deflate:with}%{!?with_deflate:without}-libdeflate \ --%{?with_deflate:with}%{!?with_deflate:without}-libdeflate \
--%{?with_fuse:enable}%{!?with_fuse:disable}-fuse \ --%{?with_fuse:enable}%{!?with_fuse:disable}-fuse \
--%{?with_lz4:enable}%{!?with_lz4:disable}-lz4 \ --%{?with_lz4:enable}%{!?with_lz4:disable}-lz4 \
--%{?with_lzma:enable}%{!?with_lzma:disable}-lzma \ --%{?with_lzma:enable}%{!?with_lzma:disable}-lzma \
--%{?with_qpl:with}%{!?with_qpl:without}-qpl \
--%{?with_selinux:with}%{!?with_selinux:without}-selinux \ --%{?with_selinux:with}%{!?with_selinux:without}-selinux \
--%{?with_uuid:with}%{!?with_uuid:without}-uuid \ --%{?with_uuid:with}%{!?with_uuid:without}-uuid \
--%{?with_zlib:with}%{!?with_zlib:without}-zlib --%{?with_zlib:with}%{!?with_zlib:without}-zlib \
--%{?with_zstd:with}%{!?with_zstd:without}-libzstd
%make_build %make_build
%install %install
@ -87,6 +95,11 @@ autoreconf -fi
%changelog %changelog
* Wed Nov 20 2024 Abhi Das <adas@redhat.com> - 1.8.2-2
- Rebase to 1.8.2-2 for zstd and multithreading support and
Remove erroneously added gating.yaml
Resolves: RHEL-68370
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.7.1-5 * Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.7.1-5
- Bump release for October 2024 mass rebuild: - Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018 Resolves: RHEL-64018
@ -94,75 +107,3 @@ autoreconf -fi
* Wed Jul 17 2024 Abhi Das <adas@redhat.com> - 1.7.1-4 * Wed Jul 17 2024 Abhi Das <adas@redhat.com> - 1.7.1-4
- Import 1.7.1 to RHEL - Import 1.7.1 to RHEL
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Oct 20 2023 David Michael <fedora.dm0@gmail.com> - 1.7.1-1
- Update to the 1.7.1 release.
* Thu Sep 21 2023 David Michael <fedora.dm0@gmail.com> - 1.7-1
- Update to the 1.7 release.
* Tue Aug 29 2023 David Michael <fedora.dm0@gmail.com> - 1.6-3
- Backport patches for CVE-2023-33551 and CVE-2023-33552.
- Change conditional build feature defaults for supporting EPEL 9.
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Mar 11 2023 David Michael <fedora.dm0@gmail.com> - 1.6-1
- Update to the 1.6 release.
* Wed Jan 25 2023 David Michael <fedora.dm0@gmail.com> - 1.5-4
- Enable MicroLZMA support.
- Switch the License tag to SPDX, and ship matching noneffective license files.
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 David Michael <fedora.dm0@gmail.com> - 1.5-1
- Update to the 1.5 release.
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Nov 25 2021 David Michael <fedora.dm0@gmail.com> - 1.4-2
- Backport the patch to install a man page for fsck.
- Backport the patch to fix dump output.
* Sun Nov 21 2021 David Michael <fedora.dm0@gmail.com> - 1.4-1
- Update to the 1.4 release.
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon May 31 2021 David Michael <fedora.dm0@gmail.com> - 1.3-1
- Update to the 1.3 release.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Jan 09 2021 David Michael <fedora.dm0@gmail.com> - 1.2.1-1
- Update to the 1.2.1 release.
* Thu Dec 10 2020 David Michael <fedora.dm0@gmail.com> - 1.2-1
- Update to the 1.2 release.
- Split FUSE support into an independent subpackage.
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Apr 13 2020 David Michael <fedora.dm0@gmail.com> - 1.1-1
- Update to the 1.1 release.
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Nov 25 2019 David Michael <fedora.dm0@gmail.com> - 1.0-1
- Initial package.

View File

@ -1,7 +0,0 @@
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1 +1 @@
SHA512 (erofs-utils-1.7.1.tar.gz) = f5fc08d8d70e3e06c06aaa5a36e9b16ca1ff7c722fc88dba1f5c46fa86914be02e45e948c59504bd0fd4a3a4050ad7a27a5da2657ffbf40ec20ef0d1bfb832ff SHA512 (erofs-utils-1.8.2.tar.gz) = 474ea30662e498e6ece5d4e5171c333ec040eaffa4f5670d1b728b1461a2a18fa90ea6cc2ad7b26e87732d735985e9108a9c49a7072b4dc4fdfee7916df48593