]> git.pld-linux.org Git - packages/e2fsprogs.git/blobdiff - e2fsprogs.spec
- allow building without scrub utilities
[packages/e2fsprogs.git] / e2fsprogs.spec
index 79ba25422a5b3f553249a0ca4e5c8a713f053643..5efa2b4a17c8c9f342dbbd29d91370f62ba6e33e 100644 (file)
@@ -1,8 +1,14 @@
 #
+#TODO:
+# - subpackage for systemd / cron / udev files?
+#
+
 # Conditional build:
 %bcond_with    allstatic       # link everything statically
+%bcond_without fuse            # fuse2fs program
 %bcond_without nls             # build without NLS
 %bcond_without tls             # TLS
+%bcond_without scrub           # don't package e2scrub* utilities
 %if "%{pld_release}" == "ac"
 %bcond_with    initrd          # don't build initrd version
 %bcond_without uClibc          # link initrd version with static glibc instead of uClibc
@@ -46,29 +52,28 @@ Summary(uk.UTF-8):  Утиліти для роботи з файловою сис
 Summary(zh_CN.UTF-8):  管理第二扩展(ext2)文件系统的工具。
 Summary(zh_TW.UTF-8):  用於管理 ext2 檔案系統的工具程式。
 Name:          e2fsprogs
-Version:       1.42.12
-Release:       3
+Version:       1.47.0
+Release:       1
 License:       GPL v2 (with LGPL v2 and BSD parts)
 Group:         Applications/System
-Source0:       http://downloads.sourceforge.net/e2fsprogs/%{name}-%{version}.tar.gz
-# Source0-md5: 68255f51be017a93f2f6402fab06c2bf
-Source1:       e2compr-0.4.texinfo.gz
-# Source1-md5: c3c59ff37e49d8759abb1ef95a8d3abf
+Source0:       https://downloads.sourceforge.net/e2fsprogs/%{name}-%{version}.tar.gz
+# Source0-md5: 6b4f18a33873623041857b4963641ee9
 Source2:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source2-md5: 992a37783bd42a897232972917e8ca7d
 Patch0:                %{name}-info.patch
-Patch1:                e2compr-info.patch
-Patch2:                %{name}-498381.patch
-Patch3:                %{name}-diet.patch
+Patch1:                %{name}-498381.patch
+Patch2:                %{name}-diet.patch
 URL:           http://e2fsprogs.sourceforge.net/
-BuildRequires: autoconf >= 2.54
+BuildRequires: autoconf >= 2.71
+BuildRequires: autoconf-archive
 BuildRequires: automake
 BuildRequires: gettext-tools >= 0.11
 BuildRequires: libblkid-devel
+%{?with_fuse:BuildRequires:    libfuse-devel}
 BuildRequires: libuuid-devel
 BuildRequires: pkgconfig
 BuildRequires: rpm >= 4.4.9-56
-BuildRequires: rpmbuild(macros) >= 1.583
+BuildRequires: rpmbuild(macros) >= 1.644
 BuildRequires: texinfo
 BuildRequires: texinfo-texi2dvi
 %if %{with allstatic}
@@ -90,11 +95,13 @@ BuildRequires:      libuuid-static
        %endif
 %endif
 Requires(post,postun): /sbin/ldconfig
+Requires(post,preun,postun):   systemd-units >= 38
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      fsck
 Requires:      libcom_err = %{version}-%{release}
 Requires:      libss = %{version}-%{release}
-Obsoletes:     e2fsprogs-evms
+Requires:      systemd-units >= 38
+Obsoletes:     e2fsprogs-evms < 1.36
 Obsoletes:     libext2fs2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -331,6 +338,20 @@ debugfs(用于检查文件系统的内部结构、手动修复被破坏的文
 创建测试范例)、 tune2fs(用于修改文件系统参数)和其它大多数核心
 ext2fs 文件系统实用程序。
 
+%package fuse
+Summary:       FUSE file system client for ext2/ext3/ext4 file systems
+Summary(pl.UTF-8):     Klient systemu plików FUSE dla systemów plików ext2/ext3/ext4
+Group:         Applications/System
+Requires:      %{name}-libs = %{version}-%{release}
+Requires:      libfuse-tools
+Requires:      libcom_err = %{version}-%{release}
+
+%description fuse
+FUSE file system client for ext2/ext3/ext4 file systems.
+
+%description fuse -l pl.UTF-8
+Klient systemu plików FUSE dla systemów plików ext2/ext3/ext4.
+
 %package libs
 Summary:       ext2 filesystem-specific libraries
 Summary(pl.UTF-8):     Biblioteki dla systemu plików ext2
@@ -376,7 +397,7 @@ Requires:   libcom_err-devel = %{version}-%{release}
 Requires:      libuuid-devel
 Obsoletes:     libext2fs2-devel
 # until it comes back
-Obsoletes:     libquota-devel
+Obsoletes:     libquota-devel < 1.42.12
 
 %description devel
 e2fsprogs-devel contains the libraries and header files needed to
@@ -620,10 +641,8 @@ na potrzeby initrd.
 %prep
 %setup -q
 %patch0 -p1
-%{__gzip} -dc < %{SOURCE1} > doc/e2compr.texinfo
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
 
 %build
 cp -f /usr/share/automake/config.sub .
@@ -639,6 +658,7 @@ cp -f /usr/share/automake/config.sub .
        LDFLAGS="%{rpmldflags} -static" \
        --disable-elf-shlibs \
        --disable-fsck \
+       --disable-fuse2fs \
        --disable-libblkid \
        --disable-libuuid \
        --disable-nls \
@@ -648,7 +668,7 @@ cp -f /usr/share/automake/config.sub .
        --disable-tls \
        --disable-uuidd
 
-%{__make} -j1 libs \
+%{__make} libs \
        V=1
 %{__make} progs \
        V=1
@@ -659,34 +679,27 @@ mv -f misc/mke2fs initrd-mke2fs
 %configure \
        --with-root-prefix="" \
        --disable-fsck \
+       %{!?with_fuse:--disable-fuse2fs} \
        --disable-libblkid \
        --disable-libuuid \
        %{!?with_nls:--disable-nls} \
        %{!?with_tls:--disable-tls} \
        --disable-rpath \
        --disable-uuidd \
-       --enable-compression \
-       %{!?with_allstatic:--enable-elf-shlibs} \
-       --enable-htree \
-       --enable-quota
+       %{!?with_allstatic:--enable-elf-shlibs}
 
-%{__make} -j1 libs \
+%{__make} libs \
        LDFLAGS="%{rpmldflags}" \
        V=1
 %{__make} progs docs \
        LDFLAGS="%{rpmldflags}" \
        V=1
 
-cd doc
-makeinfo --no-split e2compr.texinfo
-
 %install
 rm -rf $RPM_BUILD_ROOT
 %{?with_dietlibc:install -d $RPM_BUILD_ROOT%{dietlibdir}}
 export PATH=/sbin:$PATH
 
-echo "install-shlibs:" >> intl/Makefile
-
 %{__make} -j1 install install-libs \
        root_libdir=/%{_lib} \
        mkinstalldirs='install -d' \
@@ -697,46 +710,33 @@ ln -sf e2fsck $RPM_BUILD_ROOT/sbin/fsck.ext2
 ln -sf e2fsck $RPM_BUILD_ROOT/sbin/fsck.ext3
 ln -sf mke2fs $RPM_BUILD_ROOT/sbin/mkfs.ext2
 
-cp -p doc/e2compr.info $RPM_BUILD_ROOT%{_infodir}
-
 touch $RPM_BUILD_ROOT%{_sysconfdir}/e2fsck.conf
 
 bzip2 -dc %{SOURCE2} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
 
-rm -f $RPM_BUILD_ROOT%{_mandir}/man8/{mkfs,fsck}.ext[234]*.8*
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/{mkfs,fsck}.ext{2,3,4}.8*
 echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/man8/fsck.ext2.8
 echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/man8/fsck.ext3.8
 echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/man8/fsck.ext4.8
-echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/man8/fsck.ext4dev.8
 echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/man8/mkfs.ext2.8
 echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/man8/mkfs.ext3.8
 echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/man8/mkfs.ext4.8
-echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/man8/mkfs.ext4dev.8
 # missing in non-english-man-pages tarball
 echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/hu/man8/fsck.ext3.8
 echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/hu/man8/fsck.ext4.8
-echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/hu/man8/fsck.ext4dev.8
 echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/it/man8/fsck.ext3.8
 echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/it/man8/fsck.ext4.8
-echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/it/man8/fsck.ext4dev.8
 echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/it/man8/mkfs.ext3.8
 echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/it/man8/mkfs.ext4.8
-echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/it/man8/mkfs.ext4dev.8
 echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/ja/man8/fsck.ext4.8
-echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/ja/man8/fsck.ext4dev.8
 echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/ja/man8/mkfs.ext4.8
-echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/ja/man8/mkfs.ext4dev.8
 echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/ko/man8/fsck.ext3.8
 echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/ko/man8/fsck.ext4.8
-echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/ko/man8/fsck.ext4dev.8
 echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/ko/man8/mkfs.ext3.8
 echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/ko/man8/mkfs.ext4.8
-echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/ko/man8/mkfs.ext4dev.8
 echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/pl/man8/fsck.ext4.8
-echo '.so e2fsck.8' > $RPM_BUILD_ROOT%{_mandir}/pl/man8/fsck.ext4dev.8
 echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/pl/man8/mkfs.ext3.8
 echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/pl/man8/mkfs.ext4.8
-echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/pl/man8/mkfs.ext4dev.8
 # moved to util-linux-ng.spec
 %{__rm} $RPM_BUILD_ROOT%{_mandir}/*/man1/uuidgen.1
 %{__rm} $RPM_BUILD_ROOT%{_mandir}/*/man3/libuuid.3
@@ -750,7 +750,9 @@ echo '.so mke2fs.8' > $RPM_BUILD_ROOT%{_mandir}/pl/man8/mkfs.ext4dev.8
 %find_lang %{name}
 %endif
 
-rm -f $RPM_BUILD_ROOT%{_mandir}/README.e2fsprogs-non-english-man-pages
+%{__rm} $RPM_BUILD_ROOT/sbin/logsave
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/logsave.8*
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/README.e2fsprogs-non-english-man-pages
 
 %if %{with initrd}
 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
@@ -760,11 +762,16 @@ install -p initrd-mke2fs $RPM_BUILD_ROOT%{_libdir}/initrd/mke2fs
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post  -p /sbin/postshell
--/usr/sbin/fix-info-dir -c %{_infodir}
+%post
+[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
+%systemd_post e2scrub_all.service
 
-%postun        -p /sbin/postshell
--/usr/sbin/fix-info-dir -c %{_infodir}
+%preun
+%systemd_preun e2scrub_all.service
+
+%postun
+[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
+%systemd_reload
 
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
@@ -783,36 +790,53 @@ rm -rf $RPM_BUILD_ROOT
 
 %files %{?with_nls:-f %{name}.lang}
 %defattr(644,root,root,755)
-# COPYING specifies license details for some parts of package
-%doc COPYING README RELEASE-NOTES
+%doc NOTICE README RELEASE-NOTES
 %attr(755,root,root) /sbin/badblocks
 %attr(755,root,root) /sbin/debugfs
 %attr(755,root,root) /sbin/dumpe2fs
 %attr(755,root,root) /sbin/e2fsck
 %attr(755,root,root) /sbin/e2image
 %attr(755,root,root) /sbin/e2label
+%attr(755,root,root) /sbin/e2mmpstatus
+%if %{with scrub}
+%attr(755,root,root) /sbin/e2scrub
+%attr(755,root,root) /sbin/e2scrub_all
+%endif
 %attr(755,root,root) /sbin/e2undo
 %attr(755,root,root) /sbin/fsck.ext2
 %attr(755,root,root) /sbin/fsck.ext3
 %attr(755,root,root) /sbin/fsck.ext4
-%attr(755,root,root) /sbin/fsck.ext4dev
-%attr(755,root,root) /sbin/logsave
 %attr(755,root,root) /sbin/mke2fs
 %attr(755,root,root) /sbin/mkfs.ext2
 %attr(755,root,root) /sbin/mkfs.ext3
 %attr(755,root,root) /sbin/mkfs.ext4
-%attr(755,root,root) /sbin/mkfs.ext4dev
 %attr(755,root,root) /sbin/resize2fs
 %attr(755,root,root) /sbin/tune2fs
 %attr(755,root,root) %{_bindir}/chattr
 %attr(755,root,root) %{_bindir}/lsattr
 %attr(755,root,root) %{_sbindir}/e2freefrag
+%attr(755,root,root) %{_sbindir}/e4crypt
 %attr(755,root,root) %{_sbindir}/e4defrag
 %attr(755,root,root) %{_sbindir}/filefrag
 %attr(755,root,root) %{_sbindir}/mklost+found
 %attr(755,root,root) %{_libdir}/e2initrd_helper
+%dir %{_libdir}/e2fsprogs
+%if %{with scrub}
+%attr(755,root,root) %{_libdir}/e2fsprogs/e2scrub_all_cron
+%attr(755,root,root) %{_libdir}/e2fsprogs/e2scrub_fail
+%config(noreplace) %verify(not md5 mtime size) /etc/cron.d/e2scrub_all
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/e2scrub.conf
+%endif
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/e2fsck.conf
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mke2fs.conf
+%if %{with scrub}
+%{systemdunitdir}/e2scrub@.service
+%{systemdunitdir}/e2scrub_all.service
+%{systemdunitdir}/e2scrub_all.timer
+%{systemdunitdir}/e2scrub_fail@.service
+%{systemdunitdir}/e2scrub_reap.service
+/lib/udev/rules.d/96-e2scrub.rules
+%endif
 %{_mandir}/man1/chattr.1*
 %{_mandir}/man1/lsattr.1*
 %{_mandir}/man5/e2fsck.conf.5*
@@ -827,19 +851,22 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man8/e2fsck.8*
 %{_mandir}/man8/e2image.8*
 %{_mandir}/man8/e2label.8*
+%{_mandir}/man8/e2mmpstatus.8*
+%if %{with scrub}
+%{_mandir}/man8/e2scrub.8*
+%{_mandir}/man8/e2scrub_all.8*
+%endif
 %{_mandir}/man8/e2undo.8*
+%{_mandir}/man8/e4crypt.8*
 %{_mandir}/man8/e4defrag.8*
 %{_mandir}/man8/filefrag.8*
 %{_mandir}/man8/fsck.ext2.8*
 %{_mandir}/man8/fsck.ext3.8*
 %{_mandir}/man8/fsck.ext4.8*
-%{_mandir}/man8/fsck.ext4dev.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/mkfs.ext4dev.8*
 %{_mandir}/man8/mklost+found.8*
 %{_mandir}/man8/resize2fs.8*
 %{_mandir}/man8/tune2fs.8*
@@ -857,7 +884,6 @@ rm -rf $RPM_BUILD_ROOT
 %lang(hu) %{_mandir}/hu/man8/fsck.ext2.8*
 %lang(hu) %{_mandir}/hu/man8/fsck.ext3.8*
 %lang(hu) %{_mandir}/hu/man8/fsck.ext4.8*
-%lang(hu) %{_mandir}/hu/man8/fsck.ext4dev.8*
 %lang(hu) %{_mandir}/hu/man8/tune2fs.8*
 %lang(it) %{_mandir}/it/man1/chattr.1*
 %lang(it) %{_mandir}/it/man1/lsattr.1*
@@ -868,12 +894,10 @@ rm -rf $RPM_BUILD_ROOT
 %lang(it) %{_mandir}/it/man8/fsck.ext2.8*
 %lang(it) %{_mandir}/it/man8/fsck.ext3.8*
 %lang(it) %{_mandir}/it/man8/fsck.ext4.8*
-%lang(it) %{_mandir}/it/man8/fsck.ext4dev.8*
 %lang(it) %{_mandir}/it/man8/mke2fs.8*
 %lang(it) %{_mandir}/it/man8/mkfs.ext2.8*
 %lang(it) %{_mandir}/it/man8/mkfs.ext3.8*
 %lang(it) %{_mandir}/it/man8/mkfs.ext4.8*
-%lang(it) %{_mandir}/it/man8/mkfs.ext4dev.8*
 %lang(it) %{_mandir}/it/man8/mklost+found.8*
 %lang(it) %{_mandir}/it/man8/tune2fs.8*
 %lang(ja) %{_mandir}/ja/man1/chattr.1*
@@ -887,12 +911,10 @@ rm -rf $RPM_BUILD_ROOT
 %lang(ja) %{_mandir}/ja/man8/fsck.ext2.8*
 %lang(ja) %{_mandir}/ja/man8/fsck.ext3.8*
 %lang(ja) %{_mandir}/ja/man8/fsck.ext4.8*
-%lang(ja) %{_mandir}/ja/man8/fsck.ext4dev.8*
 %lang(ja) %{_mandir}/ja/man8/mke2fs.8*
 %lang(ja) %{_mandir}/ja/man8/mkfs.ext2.8*
 %lang(ja) %{_mandir}/ja/man8/mkfs.ext3.8*
 %lang(ja) %{_mandir}/ja/man8/mkfs.ext4.8*
-%lang(ja) %{_mandir}/ja/man8/mkfs.ext4dev.8*
 %lang(ja) %{_mandir}/ja/man8/mklost+found.8*
 %lang(ja) %{_mandir}/ja/man8/resize2fs.8*
 %lang(ja) %{_mandir}/ja/man8/tune2fs.8*
@@ -905,12 +927,10 @@ rm -rf $RPM_BUILD_ROOT
 %lang(ko) %{_mandir}/ko/man8/fsck.ext2.8*
 %lang(ko) %{_mandir}/ko/man8/fsck.ext3.8*
 %lang(ko) %{_mandir}/ko/man8/fsck.ext4.8*
-%lang(ko) %{_mandir}/ko/man8/fsck.ext4dev.8*
 %lang(ko) %{_mandir}/ko/man8/mke2fs.8*
 %lang(ko) %{_mandir}/ko/man8/mkfs.ext2.8*
 %lang(ko) %{_mandir}/ko/man8/mkfs.ext3.8*
 %lang(ko) %{_mandir}/ko/man8/mkfs.ext4.8*
-%lang(ko) %{_mandir}/ko/man8/mkfs.ext4dev.8*
 %lang(ko) %{_mandir}/ko/man8/mklost+found.8*
 %lang(ko) %{_mandir}/ko/man8/tune2fs.8*
 %lang(pl) %{_mandir}/pl/man1/chattr.1*
@@ -923,15 +943,19 @@ rm -rf $RPM_BUILD_ROOT
 %lang(pl) %{_mandir}/pl/man8/fsck.ext2.8*
 %lang(pl) %{_mandir}/pl/man8/fsck.ext3.8*
 %lang(pl) %{_mandir}/pl/man8/fsck.ext4.8*
-%lang(pl) %{_mandir}/pl/man8/fsck.ext4dev.8*
 %lang(pl) %{_mandir}/pl/man8/mke2fs.8*
 %lang(pl) %{_mandir}/pl/man8/mkfs.ext2.8*
 %lang(pl) %{_mandir}/pl/man8/mkfs.ext3.8*
 %lang(pl) %{_mandir}/pl/man8/mkfs.ext4.8*
-%lang(pl) %{_mandir}/pl/man8/mkfs.ext4dev.8*
 %lang(pl) %{_mandir}/pl/man8/mklost+found.8*
 %lang(pl) %{_mandir}/pl/man8/tune2fs.8*
-%{_infodir}/e2compr.info*
+
+%if %{with fuse}
+%files fuse
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/fuse2fs
+%{_mandir}/man1/fuse2fs.1*
+%endif
 
 %if %{without allstatic}
 %files libs
This page took 0.090499 seconds and 4 git commands to generate.