Browse Source

e2fsprogs-1.46.5-2

Tomohiro "Tomo-p" KATO 1 year ago
parent
commit
329c9b0e9b
1 changed files with 72 additions and 29 deletions
  1. 72 29
      e/e2fsprogs/e2fsprogs-vl.spec

+ 72 - 29
e/e2fsprogs/e2fsprogs-vl.spec

@@ -1,3 +1,5 @@
+%bcond_with systemd
+
 %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
 %define	_root_sbindir	/sbin
 %define	_root_libdir	/%{_lib}
@@ -5,8 +7,8 @@
 Summary:        Utilities for managing ext2/3/4 filesystem.
 Summary(ja):    ext2/3/4 ファイルシステム操作ユーティリティ
 Name:           e2fsprogs
-Version:        1.46.2
-Release:        1%{?_dist_release}
+Version:        1.46.5
+Release:        2%{?_dist_release}%{?with_systemd:.systemd}
 Group:          admin-tools,system
 Vendor:         Project Vine
 Distribution:   Vine Linux
@@ -16,7 +18,8 @@ URL:            http://e2fsprogs.sourceforge.net/
 Source0:        https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v%{version}/%{name}-%{version}.tar.xz
 Source1:        ext2_types-wrapper.h
 
-Patch2:         e2fsprogs-1.40.4-sb_feature_check_ignore.patch
+Patch0:	        0001-remove-local-PATH.patch
+Patch1000:      CVE-2022-1304.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-root
 
@@ -24,10 +27,13 @@ BuildRequires: gettext, texinfo
 BuildRequires: pkgconfig, device-mapper-devel, gawk
 BuildRequires: libblkid-devel
 BuildRequires: libuuid-devel
-
-Requires(post): /sbin/install-info
-Requires(postun): /sbin/install-info
+%if %{with systemd}
+BuildRequires: systemd
+%else
+BuildRequires: cronie
 Requires(post): chkconfig
+%endif
+
 Requires(pre): shadow-utils
 
 %description
@@ -75,6 +81,30 @@ e2fsprogs-devel には ext2/3/4 ファイルシステム固有のプログラム
 のに必要なライブラリとヘッダファイルが収められています.
 
 
+%package -n e2scrub
+Summary: Online Ext4 metadata consistency checking tool and service
+License: GPLv2 and LGPLv2
+Recommends: postfix
+%if %{with systemd}
+Requires: systemd
+%else
+BuildRequires: cronie
+%endif
+Requires: util-linux
+Requires: lvm2
+Requires: e2fsprogs%{?_isa} = %{version}-%{release}
+
+%description -n e2scrub
+This package includes e2scrub script that can check ext[234] file system
+metadata consistency while the file system is online. It also containes a
+systemd service that can be enabled to do consistency check periodically.
+
+The file system consistency check can be performed online and does not
+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.
+
+
 ## to build compat32 for x86_64 architecture support
 %package -n compat32-%{name}
 Summary:     Utilities for managing ext2/3/4 filesystem.
@@ -113,16 +143,19 @@ also want to install e2fsprogs.
 %prep
 %setup -q -n e2fsprogs-%{version}
 
-# ignore some flag differences on primary/backup sb feature checks
-# mildly unsafe but 'til I get something better, avoid full fsck
-# after an selinux install...
-%patch2 -p1 -b .featurecheck
+%patch0 -p1
+%patch1000 -p1
+# Remove flawed tests
+rm -rf tests/m_rootdir_acl
+
+%global _udevdir /lib/udev/rules.d
 
 
 %build
-%configure --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \
+%configure --with-udev-rules-dir=%{_udevdir} \
+           --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \
            --disable-e2initrd-helper --disable-libblkid --disable-libuuid \
-	   --enable-quota
+           --enable-quota
 make %{?_smp_mflags}
 
 
@@ -151,23 +184,10 @@ rm -rf $RPM_BUILD_ROOT
 %post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
-%post devel
-/sbin/install-info %{_infodir}/libext2fs.info.gz %{_infodir}/dir || :
-
-%preun devel
-if [ $1 = 0 ]; then
-   /sbin/install-info --delete %{_infodir}/libext2fs.info.gz %{_infodir}/dir || :
-fi
-exit 0
-
-%post -n compat32-%{name} -p /sbin/ldconfig
-%postun -n compat32-%{name} -p /sbin/ldconfig
-
 
 %files -f %{name}.lang
 %defattr(-,root,root)
 %doc README RELEASE-NOTES
-%config(noreplace) %{_sysconfdir}/e2scrub.conf
 %config(noreplace) %{_sysconfdir}/mke2fs.conf
 
 %{_root_sbindir}/badblocks
@@ -177,8 +197,6 @@ exit 0
 %{_root_sbindir}/e2image
 %{_root_sbindir}/e2label
 %{_root_sbindir}/e2mmpstatus
-%{_root_sbindir}/e2scrub
-%{_root_sbindir}/e2scrub_all
 %{_root_sbindir}/e2undo
 %{_root_sbindir}/fsck.ext2
 %{_root_sbindir}/fsck.ext3
@@ -226,8 +244,6 @@ exit 0
 %{_mandir}/man8/e2image.8*
 %{_mandir}/man8/e2label.8*
 %{_mandir}/man8/e2mmpstatus.8.gz
-%{_mandir}/man8/e2scrub.8.gz
-%{_mandir}/man8/e2scrub_all.8.gz
 %{_mandir}/man8/e4crypt.8.gz
 %{_mandir}/man8/e4defrag.8*
 %{_mandir}/man8/logsave.8*
@@ -266,6 +282,27 @@ exit 0
 %{_mandir}/man1/mk_cmds.1*
 %{_mandir}/man3/com_err.3*
 
+%files -n e2scrub
+%config(noreplace) %{_sysconfdir}/e2scrub.conf
+%{_root_sbindir}/e2scrub
+%{_root_sbindir}/e2scrub_all
+%{_mandir}/man8/e2scrub.8*
+%{_mandir}/man8/e2scrub_all.8*
+%if %{with systemd}
+%{_libdir}/e2fsprogs/e2scrub_fail
+%{_unitdir}/e2scrub@.service
+%{_unitdir}/e2scrub_all.service
+%{_unitdir}/e2scrub_all.timer
+%{_unitdir}/e2scrub_fail@.service
+%{_unitdir}/e2scrub_reap.service
+%exclude %{_libdir}/e2fsprogs/e2scrub_all_cron
+%exclude %{_sysconfdir}/cron.d/e2scrub_all
+%else
+%{_libdir}/e2fsprogs/e2scrub_all_cron
+%{_sysconfdir}/cron.d/e2scrub_all
+%endif
+%{_udevdir}/96-e2scrub.rules
+
 %if %{build_compat32}
 %files -n compat32-%{name}
 %defattr(-,root,root)
@@ -285,6 +322,12 @@ exit 0
 
 
 %changelog
+* Fri May 06 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.46.5-2
+- imported Patch1000 from upstream to fix CVE-2022-1304.
+
+* Fri May 06 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.46.5-1
+- new upstream release.
+
 * Wed Mar 10 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.46.2-1
 - new upstream release.