Build and package e2scrub utility #1

Merged
eabdullin merged 2 commits from brianjmurrell/e2fsprogs:bmurrell/c8/enable-e2scrub into a8 2024-02-28 13:27:11 +00:00
2 changed files with 44 additions and 41 deletions

View File

@ -1,38 +0,0 @@
From 06116f6d053e398d13634df911bcb105d0fb2416 Mon Sep 17 00:00:00 2001
From: Lukas Czerner <lczerner@redhat.com>
Date: Sun, 15 Dec 2019 12:42:28 +0100
Subject: [PATCH 1/7] Makefile.in: Disable e2scrub
e2scrub system is still new and we're not ready to support it yet, so
just disbale it and not even build it.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
Makefile.in | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index b951c017..34e2048d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -13,7 +13,6 @@ INSTALL = @INSTALL@
@DEBUGFS_CMT@DEBUGFS_DIR= debugfs
@UUID_CMT@UUID_LIB_SUBDIR= lib/uuid
@BLKID_CMT@BLKID_LIB_SUBDIR= lib/blkid
-@E2SCRUB_CMT@E2SCRUB_DIR= scrub
@ALL_CMT@SUPPORT_LIB_SUBDIR= lib/support
@ALL_CMT@E2P_LIB_SUBDIR= lib/e2p
@ALL_CMT@EXT2FS_LIB_SUBDIR= lib/ext2fs
@@ -21,8 +20,7 @@ INSTALL = @INSTALL@
LIB_SUBDIRS=lib/et lib/ss $(E2P_LIB_SUBDIR) $(UUID_LIB_SUBDIR) \
$(BLKID_LIB_SUBDIR) $(SUPPORT_LIB_SUBDIR) $(EXT2FS_LIB_SUBDIR) intl
-PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po \
- $(E2SCRUB_DIR)
+PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
--
2.21.3

View File

@ -1,7 +1,7 @@
Summary: Utilities for managing ext2, ext3, and ext4 file systems Summary: Utilities for managing ext2, ext3, and ext4 file systems
Name: e2fsprogs Name: e2fsprogs
Version: 1.45.6 Version: 1.45.6
Release: 5%{?dist} Release: 5.1%{?dist}
# License tags based on COPYING file distinctions for various components # License tags based on COPYING file distinctions for various components
License: GPLv2 License: GPLv2
@ -26,8 +26,8 @@ BuildRequires: libblkid-devel
BuildRequires: libuuid-devel BuildRequires: libuuid-devel
BuildRequires: gettext BuildRequires: gettext
BuildRequires: multilib-rpm-config BuildRequires: multilib-rpm-config
BuildRequires: systemd
Patch0: e2fsprogs-1.45.6-Makefile.in-Disable-e2scrub.patch
Patch1: e2fsprogs-1.45.6-Revert-fuse2fs-install-fuse2fs-in-usr-bin-instead-of.patch Patch1: e2fsprogs-1.45.6-Revert-fuse2fs-install-fuse2fs-in-usr-bin-instead-of.patch
Patch2: e2fsprogs-1.45.6-mke2fs.conf-Introduce-rhel6-and-rhel7-fs_type.patch Patch2: e2fsprogs-1.45.6-mke2fs.conf-Introduce-rhel6-and-rhel7-fs_type.patch
Patch3: e2fsprogs-1.45.6-man-Add-note-about-RHEL8-supported-features-and-moun.patch Patch3: e2fsprogs-1.45.6-man-Add-note-about-RHEL8-supported-features-and-moun.patch
@ -201,10 +201,28 @@ parses a command table to generate a simple command-line interface parser.
It was originally inspired by the Multics SubSystem library. It was originally inspired by the Multics SubSystem library.
%package -n e2scrub
Summary: Online Ext4 metadata consistency checking tool and service
License: GPLv2 and LGPLv2
Recommends: /usr/sbin/sendmail
Requires: systemd
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.
%prep %prep
%setup -q %setup -q
%patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
@ -264,6 +282,8 @@ It was originally inspired by the Multics SubSystem library.
%patch57 -p1 %patch57 -p1
%patch58 -p1 %patch58 -p1
%global _udevdir %{_prefix}/lib/udev/rules.d
%build %build
%configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ %configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
--enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \ --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \
@ -375,6 +395,9 @@ exit 0
%{_mandir}/man8/resize2fs.8* %{_mandir}/man8/resize2fs.8*
%{_mandir}/man8/tune2fs.8* %{_mandir}/man8/tune2fs.8*
# We do not install e2scrub cron job so just exclude it
%exclude %{_libdir}/e2fsprogs/e2scrub_all_cron
%files libs %files libs
%{!?_licensedir:%global license %%doc} %{!?_licensedir:%global license %%doc}
%license NOTICE %license NOTICE
@ -424,7 +447,25 @@ exit 0
%{_mandir}/man1/mk_cmds.1* %{_mandir}/man1/mk_cmds.1*
%{_libdir}/pkgconfig/ss.pc %{_libdir}/pkgconfig/ss.pc
%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
%changelog %changelog
* Thu Dec 28 2023 Brian J. Murrell <brian@intelinx.bc.ca> 1.45.6-5.1
- Build and package e2scrub package
- remove e2fsprogs-1.45.6-Makefile.in-Disable-e2scrub.patch
* Wed May 11 2022 Lukas Czerner <lczerner@redhat.com> 1.45.6-5 * Wed May 11 2022 Lukas Czerner <lczerner@redhat.com> 1.45.6-5
- Update e2fsprogs with upstream fixes and improvements (#2083621) - Update e2fsprogs with upstream fixes and improvements (#2083621)
- Fix out-of-bounds read/write via crafter filesystem (#2073548) - Fix out-of-bounds read/write via crafter filesystem (#2073548)