- Package e2scrub unit files and separate scrubbing bits into a separate

subpackage e2fsprogs-scrub


Rev filesystems/112 Md5 749ce58032412ca6b2e59728979ae814 2019-05-31 12:03:49 jankara 706656
This commit is contained in:
OBS User jankara 2019-05-31 12:03:49 +00:00 committed by Git OBS Bridge
parent 20457bbc61
commit 582b049f7f
2 changed files with 90 additions and 5 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri May 31 10:42:41 UTC 2019 - Jan Kara <jack@suse.cz>
- Package e2scrub unit files and separate scrubbing bits into a separate
subpackage e2fsprogs-scrub
------------------------------------------------------------------- -------------------------------------------------------------------
Fri May 31 03:50:23 UTC 2019 - seanlew@opensuse.org Fri May 31 03:50:23 UTC 2019 - seanlew@opensuse.org

View File

@ -23,6 +23,11 @@ Name: e2fsprogs
# Hint for ZYPP # Hint for ZYPP
Supplements: filesystem(ext2) filesystem(ext3) filesystem(ext4) Supplements: filesystem(ext2) filesystem(ext3) filesystem(ext4)
%endif %endif
%if 0%{?suse_version} >= 1210
%bcond_without systemd
%else
%bcond_with systemd
%endif
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: libblkid-devel BuildRequires: libblkid-devel
@ -71,6 +76,7 @@ Url: http://e2fsprogs.sourceforge.net
Requires(post): coreutils Requires(post): coreutils
Requires: libcom_err2 >= %{version} Requires: libcom_err2 >= %{version}
Requires: libext2fs2 >= %{version} Requires: libext2fs2 >= %{version}
Suggests: e2fsprogs-scrub
Source: http://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v%{version}/e2fsprogs-%{version}.tar.xz Source: http://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v%{version}/e2fsprogs-%{version}.tar.xz
Source2: README.SUSE Source2: README.SUSE
Source3: baselibs.conf Source3: baselibs.conf
@ -105,6 +111,27 @@ Requires: libuuid-devel
%description devel %description devel
Dummy development package for backwards compatibility. Dummy development package for backwards compatibility.
%if %{build_mini}
%package -n e2fsprogs-scrub-mini
%else
%package -n e2fsprogs-scrub
%endif
Summary: Ext2fs scrubbing scripts and service files
License: GPL-2.0-only
Group: System/Filesystems
%if %{with systemd}
BuildRequires: systemd-rpm-macros
%{?systemd_requires}
%endif
Requires: e2fsprogs
Requires: lvm2
Requires: postfix
Requires: util-linux
%description -n e2fsprogs-scrub
Scripts and systemd service files for background scrubbing of LVM volumes
with ext2, ext3, and ext4 filesystems.
%if %{build_mini} %if %{build_mini}
%package -n libext2fs2-mini %package -n libext2fs2-mini
%else %else
@ -228,15 +255,14 @@ cp %{SOURCE2} .
%build %build
autoreconf --force --install autoreconf --force --install
%configure \ %configure \
--disable-evms \
--with-root-prefix='' \ --with-root-prefix='' \
--enable-elf-shlibs \ --enable-elf-shlibs \
--disable-libblkid \ --disable-libblkid \
--disable-libuuid \ --disable-libuuid \
--disable-uuidd \ --disable-uuidd \
--disable-fsck \ --disable-fsck \
--enable-static \
--without-crond-dir \ --without-crond-dir \
--with-systemd-unit-dir=%{?_unitdir} \
CFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS"
%if %{build_mini} %if %{build_mini}
rm -rf doc rm -rf doc
@ -280,6 +306,16 @@ for libName in $LIBNAMES;
do ln -s %{_libdir}/$libName %{buildroot}/%{_lib}; do ln -s %{_libdir}/$libName %{buildroot}/%{_lib};
done done
#EndUsrMerge #EndUsrMerge
%if %{with systemd}
%if %{build_mini}
%pre -n e2fsprogs-scrub-mini
%else
%pre -n e2fsprogs-scrub
%endif
%service_add_pre e2scrub@.service e2scrub_all.service e2scrub_all.timer e2scrub_fail@.service e2scrub_reap.service
%endif
%post %post
/sbin/ldconfig /sbin/ldconfig
%if ! %{build_mini} %if ! %{build_mini}
@ -287,6 +323,24 @@ done
%{?regenerate_initrd_post} %{?regenerate_initrd_post}
%endif %endif
%if %{with systemd}
%if %{build_mini}
%post -n e2fsprogs-scrub-mini
%else
%post -n e2fsprogs-scrub
%endif
%service_add_post e2scrub@.service e2scrub_all.service e2scrub_all.timer e2scrub_fail@.service e2scrub_reap.service
%endif
%if %{with systemd}
%if %{build_mini}
%preun -n e2fsprogs-scrub-mini
%else
%preun -n e2fsprogs-scrub
%endif
%service_del_preun e2scrub@.service e2scrub_all.service e2scrub_all.timer e2scrub_fail@.service e2scrub_reap.service
%endif
%postun %postun
/sbin/ldconfig /sbin/ldconfig
%if ! %{build_mini} %if ! %{build_mini}
@ -294,6 +348,15 @@ done
%{?regenerate_initrd_post} %{?regenerate_initrd_post}
%endif %endif
%if %{with systemd}
%if %{build_mini}
%postun -n e2fsprogs-scrub-mini
%else
%postun -n e2fsprogs-scrub
%endif
%service_del_postun e2scrub@.service e2scrub_all.service e2scrub_all.timer e2scrub_fail@.service e2scrub_reap.service
%endif
%if ! %{build_mini} %if ! %{build_mini}
%posttrans %posttrans
%{?regenerate_initrd_posttrans} %{?regenerate_initrd_posttrans}
@ -330,7 +393,6 @@ done
%license NOTICE %license NOTICE
%endif %endif
%config /etc/mke2fs.conf %config /etc/mke2fs.conf
%config /etc/e2scrub.conf
#UsrMerge #UsrMerge
/sbin/badblocks /sbin/badblocks
/sbin/debugfs /sbin/debugfs
@ -376,8 +438,6 @@ done
%{_sbindir}/e2freefrag %{_sbindir}/e2freefrag
%{_sbindir}/e4defrag %{_sbindir}/e4defrag
%{_sbindir}/e4crypt %{_sbindir}/e4crypt
%{_sbindir}/e2scrub
%{_sbindir}/e2scrub_all
%if ! %{build_mini} %if ! %{build_mini}
%{_infodir}/libext2fs.info.gz %{_infodir}/libext2fs.info.gz
%endif %endif
@ -392,6 +452,25 @@ done
%defattr(-,root,root) %defattr(-,root,root)
%doc README.SUSE %doc README.SUSE
%if %{build_mini}
%files -n e2fsprogs-scrub-mini
%else
%files -n e2fsprogs-scrub
%endif
%defattr(-,root,root)
%config /etc/e2scrub.conf
%{_sbindir}/e2scrub
%{_sbindir}/e2scrub_all
%if %{with systemd}
%{_libdir}/e2fsprogs/
%{_libdir}/e2fsprogs/e2scrub_fail
%{_unitdir}/e2scrub@.service
%{_unitdir}/e2scrub_all.service
%{_unitdir}/e2scrub_all.timer
%{_unitdir}/e2scrub_fail@.service
%{_unitdir}/e2scrub_reap.service
%endif
%if %{build_mini} %if %{build_mini}
%files -n libext2fs2-mini %files -n libext2fs2-mini
%else %else