diff --git a/e2fsprogs.spec b/e2fsprogs.spec index 3998adfa7183e5fbb7c9c76f439fcd4703f50350..71f2cd3138806968bbae52939c966577fabb200b 100644 --- a/e2fsprogs.spec +++ b/e2fsprogs.spec @@ -1,58 +1,49 @@ -%define anolis_release 4 +%define anolis_release 5 Name: e2fsprogs Version: 1.46.5 Release: %{anolis_release}%{?dist} Summary: Utilities for managing ext2, ext3, and ext4 file systems License: GPLv2 -URL: http://e2fsprogs.sourceforge.net/ +URL: http://%{name}.sourceforge.net/ Source0: https://www.kernel.org/pub/linux/kernel/people/tytso/%{name}/v%{version}/%{name}-%{version}.tar.xz Patch1: 0001-change-to-use-fuse3.patch Patch2: 0002-Disable-metadata_csum-for-ext4-by-default-until-upst.patch -BuildRequires: pkgconfig, texinfo, libselinux-devel, gcc -BuildRequires: fuse-devel -BuildRequires: libsepol-devel -BuildRequires: libblkid-devel -BuildRequires: libuuid-devel -BuildRequires: gettext -BuildRequires: systemd -BuildRequires: make -BuildRequires: gnupg2 xz -BuildRequires: autoconf - -Requires: e2fsprogs-libs = %{version}-%{release} +BuildRequires: pkgconfig, texinfo, libselinux-devel, gcc, fuse-devel +BuildRequires: libsepol-devel, libblkid-devel, libuuid-devel +BuildRequires: gettext, systemd, make, gnupg2, xz, autoconf + +Requires: %{name}-libs = %{version}-%{release} Requires: libcom_err = %{version}-%{release} -Requires: libss = %{version}-%{release} +Requires: libss = %{version}-%{release} Obsoletes: e4fsprogs < %{version}-%{release} Provides: e4fsprogs = %{version}-%{release} %description -The e2fsprogs package contains a number of utilities for creating, -checking, modifying, and correcting any inconsistencies in second, -third and fourth extended (ext2/ext3/ext4) file systems. E2fsprogs -contains e2fsck (used to repair file system inconsistencies after an -unclean shutdown), mke2fs (used to initialize a partition to contain -an empty ext2 file system), debugfs (used to examine the internal -structure of a file system, to manually repair a corrupted -file system, or to create test cases for e2fsck), tune2fs (used to -modify file system parameters), and most of the other core ext2fs -file system utilities. - -You should install the e2fsprogs package if you need to manage the -performance of an ext2, ext3, or ext4 file system. + +The %{name} package is a set of utilities for maintaining the ext2, ext3 and +ext4 file systems. It provides various functionality such as creating, checking, +modifying and repairing any corruptions. To describe the ultilities in detail, +there is e2fsck (used to repair file system inconsistencies after an unclean +shutdown), mke2fs (used to initialize a partition to contain an empty ext2 file +system), debugfs (used to examine the internal structure of a file system, to +manually repair a corrupted file system, or to create test cases for e2fsck), +tune2fs (used to modify file system parameters), and most of the other core +ext2fs file system utilities. + +In order to tune the performance of an ext2, ext3, or ext4 file system, it is +recommended that you install the %{name} package. %package libs -Summary: Ext2/3/4 file system specific shared libraries +Summary: shared libraries specifically for Ext2/3/4 file system License: GPLv2 and LGPLv2 Requires: libcom_err = %{version}-%{release} %description libs -E2fsprogs-libs contains libe2p and libext2fs, the libraries of the -e2fsprogs package. - -These libraries are used to directly access ext2/3/4 file systems +%{name}-libs contains the libraries of the %{name} package, +libe2p and libext2fs, which are used to directly access ext2/3/4 file systems from user space. %package static @@ -60,7 +51,7 @@ Summary: Ext2/3/4 file system specific static libraries License: GPLv2 and LGPLv2 %description static -E2fsprogs-static contains all static libraries built from e2fsprogs, +E2fsprogs-static contains all static libraries built from %{name}, including libext2fs, libcom_err, libe2p, and libss. These libraries are used to directly access ext2/3/4 file systems @@ -69,42 +60,46 @@ from user space, and perform other useful functions. %package devel Summary: Ext2/3/4 file system specific libraries and headers License: GPLv2 and LGPLv2 -Requires: e2fsprogs-libs = %{version}-%{release} -Requires: libcom_err-devel = %{version}-%{release} -Requires: gawk -Requires: pkgconfig +Requires: pkgconfig gawk libcom_err-devel = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} %description devel -E2fsprogs-devel contains the libraries and header files needed to -develop second, third and fourth extended (ext2/ext3/ext4) -file system specific programs. -You should install e2fsprogs-devel if you want to develop ext2/3/4 -file system specific programs. If you install e2fsprogs-devel, you'll -also want to install e2fsprogs. +The %{name}-devel package provides the libraries and header files required to +develop programs that interact with ext2, ext3, and ext4 file systems. These +libraries include functions for reading and writing data to and from these file +systems, as well as functions for managing file system metadata such as inodes +and directories. By using these libraries, developers can create custom tools +that interact with ext2/3/4 file systems in a variety of ways. + +If you’re interested in developing software that interacts with these file +systems, you should definitely install %{name}-devel together with %{name}. %package -n libcom_err Summary: Common error description library License: MIT %description -n libcom_err -This is the common error description library, part of e2fsprogs. +This is the common error description library, part of %{name}. libcom_err is an attempt to present a common error-handling mechanism. %package -n libcom_err-devel Summary: Common error description library License: MIT -Requires: libcom_err = %{version}-%{release} -Requires: pkgconfig +Requires: libcom_err = %{version}-%{release} pkgconfig %description -n libcom_err-devel -This is the common error description development library and headers, -part of e2fsprogs. It contains the compile_et command, used -to convert a table listing error-code names and associated messages -messages into a C source file suitable for use with the library. -libcom_err is an attempt to present a common error-handling mechanism. +libcom_err-devel contains the common error description development library and +headers, which are part of %{name}. The library contains the compile_et +command which is used to convert a table listing error-code names and +associated messages into a C source file suitable for use with the library. +libcom_err is an attempt to present a common error-handling mechanism. + +It is a common error description library that presents a mechanism to manipulate +the most common form of error code in a fashion that does not have the problems +identified with mechanisms commonly in use. %package -n libss Summary: Command line interface parsing library @@ -112,35 +107,31 @@ License: MIT Requires: libcom_err = %{version}-%{release} %description -n libss -This is libss, a command line interface parsing library, part of e2fsprogs. +This is a description of libss, a command line interface parsing library, +which is part of %{name}. -This package includes a tool that parses a command table to generate -a simple command-line interface parser, the include files needed to -compile and use it. +The package includes a tool that parses a command table to generate a simple +command-line interface parser, the include files needed to compile and use it. It was originally inspired by the Multics SubSystem library. %package -n libss-devel Summary: Command line interface parsing library License: MIT -Requires: libss = %{version}-%{release} -Requires: pkgconfig +Requires: libss = %{version}-%{release} pkgconfig %description -n libss-devel -This is the command line interface parsing (libss) development library -and headers, part of e2fsprogs. It contains the mk_cmds command, which -parses a command table to generate a simple command-line interface parser. +libss-devel is a command line interface parsing library that is part of +%{name}. It contains the mk_cmds command, which generates a simple +command-line interface parser by parsing a command table. -It was originally inspired by the Multics SubSystem library. +This library was inspired by the Multics SubSystem library. %package -n e2scrub Summary: Online Ext4 metadata consistency checking tool and service License: GPLv2 and LGPLv2 Recommends: sendmail -Requires: systemd -Requires: util-linux -Requires: lvm2 -Requires: e2fsprogs = %{version}-%{release} +Requires: systemd util-linux lvm2 %{name} = %{version}-%{release} %description -n e2scrub This package includes e2scrub script that can check ext[234] file system @@ -152,30 +143,28 @@ require the file system to be unmounted. It uses lvm snapshots to do this which means that it can only be done on file systems that are on a lvm managed device with some free space available in respective volume group. - %prep %autosetup -p1 rm -f configure autoconf - rm -rf tests/m_rootdir_acl %global _udevdir %{_prefix}/lib/udev/rules.d %build %global optflags %{optflags} -I%{_includedir}/fuse3 -%configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ - --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \ +%configure --enable-quota --with-root-prefix=/usr --with-crond-dir=no \ --disable-e2initrd-helper --disable-libblkid --disable-libuuid \ - --enable-quota --with-root-prefix=/usr --with-crond-dir=no + CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ + --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck + %make_build %install rm -rf $RPM_BUILD_ROOT export PATH=/sbin:$PATH -%make_install install-libs \ - root_sbindir=%{_sbindir} root_libdir=%{_libdir} +%make_install install-libs root_libdir=%{_libdir} root_sbindir=%{_sbindir} chmod +w %{buildroot}%{_libdir}/*.a %find_lang %{name} @@ -185,91 +174,39 @@ chmod +w %{buildroot}%{_libdir}/*.a %check make PRINT_FAILED=yes fullcheck -%ldconfig_scriptlets libs - -%ldconfig_scriptlets -n libcom_err - %ldconfig_scriptlets -n libss +%ldconfig_scriptlets -n libcom_err +%ldconfig_scriptlets libs %files -f %{name}.lang %doc README %{!?_licensedir:%global license %%doc} %config(noreplace) %{_sysconfdir}/mke2fs.conf - -%{_sbindir}/badblocks -%{_sbindir}/debugfs -%{_sbindir}/dumpe2fs -%{_sbindir}/e2fsck -%{_sbindir}/e2image -%{_sbindir}/e2label -%{_sbindir}/e2mmpstatus -%{_sbindir}/e2undo -%{_sbindir}/e4crypt -%{_sbindir}/fsck.ext2 -%{_sbindir}/fsck.ext3 -%{_sbindir}/fsck.ext4 -%{_sbindir}/logsave -%{_sbindir}/mke2fs -%{_sbindir}/mkfs.ext2 -%{_sbindir}/mkfs.ext3 -%{_sbindir}/mkfs.ext4 -%{_sbindir}/resize2fs -%{_sbindir}/tune2fs -%{_sbindir}/filefrag -%{_sbindir}/e2freefrag -%{_sbindir}/e4defrag -%{_sbindir}/mklost+found -%{abidir}/debugfs-option.list -%{abidir}/e4crypt-option.list - %{_bindir}/chattr %{_bindir}/lsattr %{_bindir}/fuse2fs -%{_mandir}/man1/chattr.1* -%{_mandir}/man1/fuse2fs.1* +%exclude %{_mandir}/man8/e2scrub* +%exclude %{_sbindir}/e2scrub* +%{_sbindir}/* +%{abidir}/debugfs-option.list +%{abidir}/e4crypt-option.list +%{_mandir}/man8/* +%{_mandir}/man5/* %{_mandir}/man1/lsattr.1* +%{_mandir}/man1/fuse2fs.1* +%{_mandir}/man1/chattr.1* -%{_mandir}/man5/ext2.5* -%{_mandir}/man5/ext3.5* -%{_mandir}/man5/ext4.5* -%{_mandir}/man5/e2fsck.conf.5* -%{_mandir}/man5/mke2fs.conf.5* - -%{_mandir}/man8/badblocks.8* -%{_mandir}/man8/debugfs.8* -%{_mandir}/man8/dumpe2fs.8* -%{_mandir}/man8/e2fsck.8* -%{_mandir}/man8/e4crypt.8* -%{_mandir}/man8/filefrag.8* -%{_mandir}/man8/e2freefrag.8* -%{_mandir}/man8/e4defrag.8* -%{_mandir}/man8/fsck.ext2.8* -%{_mandir}/man8/fsck.ext3.8* -%{_mandir}/man8/fsck.ext4.8* -%{_mandir}/man8/e2image.8* -%{_mandir}/man8/e2label.8* -%{_mandir}/man8/e2mmpstatus.8* -%{_mandir}/man8/e2undo.8* -%{_mandir}/man8/logsave.8* -%{_mandir}/man8/mke2fs.8* -%{_mandir}/man8/mkfs.ext2.8* -%{_mandir}/man8/mkfs.ext3.8* -%{_mandir}/man8/mkfs.ext4.8* -%{_mandir}/man8/mklost+found.8* -%{_mandir}/man8/resize2fs.8* -%{_mandir}/man8/tune2fs.8* - -%exclude %{_libdir}/e2fsprogs/e2scrub_all_cron +%exclude %{_libdir}/%{name}/e2scrub_all_cron %files libs %dir %{abidir} -%{!?_licensedir:%global license %%doc} -%license NOTICE -%{_libdir}/libe2p.so.* -%{_libdir}/libext2fs.so.* -%{abidir}/libe2p.dump %{abidir}/libext2fs.dump +%{abidir}/libe2p.dump +%{_libdir}/libext2fs.so.* +%{_libdir}/libe2p.so.* +%license NOTICE +%{!?_licensedir:%global license %%doc} %files static %{!?_licensedir:%global license %%doc} @@ -277,14 +214,13 @@ make PRINT_FAILED=yes fullcheck %{_libdir}/*.a %files devel -%{_infodir}/libext2fs.info* -%{_libdir}/libe2p.so -%{_libdir}/libext2fs.so -%{_libdir}/pkgconfig/e2p.pc -%{_libdir}/pkgconfig/ext2fs.pc - %{_includedir}/e2p %{_includedir}/ext2fs +%{_libdir}/pkgconfig/ext2fs.pc +%{_libdir}/pkgconfig/e2p.pc +%{_libdir}/libext2fs.so +%{_libdir}/libe2p.so +%{_infodir}/libext2fs.info* %files -n libcom_err %{!?_licensedir:%global license %%doc} @@ -293,14 +229,14 @@ make PRINT_FAILED=yes fullcheck %{abidir}/libcom_err.dump %files -n libcom_err-devel -%{_bindir}/compile_et -%{_libdir}/libcom_err.so -%{_datadir}/et -%{_includedir}/et -%{_includedir}/com_err.h -%{_mandir}/man1/compile_et.1* -%{_mandir}/man3/com_err.3* %{_libdir}/pkgconfig/com_err.pc +%{_mandir}/man3/com_err.3* +%{_mandir}/man1/compile_et.1* +%{_includedir}/com_err.h +%{_includedir}/et +%{_datadir}/et +%{_libdir}/libcom_err.so +%{_bindir}/compile_et %files -n libss %{!?_licensedir:%global license %%doc} @@ -309,28 +245,26 @@ make PRINT_FAILED=yes fullcheck %{abidir}/libss.dump %files -n libss-devel -%{_bindir}/mk_cmds -%{_libdir}/libss.so -%{_datadir}/ss -%{_includedir}/ss -%{_mandir}/man1/mk_cmds.1* %{_libdir}/pkgconfig/ss.pc +%{_mandir}/man1/mk_cmds.1* +%{_includedir}/ss +%{_datadir}/ss +%{_libdir}/libss.so +%{_bindir}/mk_cmds %files -n e2scrub -%config(noreplace) %{_sysconfdir}/e2scrub.conf -%{_sbindir}/e2scrub -%{_sbindir}/e2scrub_all -%{_mandir}/man8/e2scrub.8* -%{_mandir}/man8/e2scrub_all.8* -%{_libdir}/e2fsprogs/e2scrub_fail -%{_unitdir}/e2scrub@.service -%{_unitdir}/e2scrub_all.service -%{_unitdir}/e2scrub_all.timer -%{_unitdir}/e2scrub_fail@.service -%{_unitdir}/e2scrub_reap.service %{_udevdir}/96-e2scrub.rules +%{_unitdir}/e2scrub* +%{_libdir}/%{name}/e2scrub_fail +%{_mandir}/man8/e2scrub* +%{_sbindir}/e2scrub_all +%{_sbindir}/e2scrub +%config(noreplace) %{_sysconfdir}/e2scrub.conf %changelog +* Wed Apr 12 2023 Zhongling - 1.46.5-5 +- Refactor rpm spec + * Tue Nov 15 2022 ZiyangZhang - 1.46.5-4 - Disable metadata_csum for ext4 by default until upstream fix perf loss