X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=xfsprogs.spec;h=4bf4f77bc468592042d60aaeef2063fda7367357;hb=eb18ee86691f2b5fdf285674f3ddbbf1b6fdd658;hp=a1ad439dadb9e54a0c732db2d6c31dc76c336c85;hpb=24cbb2b11de04b67e1ad0da7fda8dae8bb58e28f;p=packages%2Fxfsprogs.git diff --git a/xfsprogs.spec b/xfsprogs.spec index a1ad439..4bf4f77 100644 --- a/xfsprogs.spec +++ b/xfsprogs.spec @@ -1,15 +1,21 @@ +# +# Conditional build: +%bcond_without debug_asserts +# Summary: Tools for the XFS filesystem Summary(pl.UTF-8): Narzędzia do systemu plików XFS Name: xfsprogs -Version: 4.14.0 -Release: 1 +Version: 4.19.0 +Release: 2 License: LGPL v2.1 (libhandle), GPL v2 (the rest) Group: Applications/System -Source0: https://kernel.org/pub/linux/utils/fs/xfs/xfsprogs/%{name}-%{version}.tar.gz -# Source0-md5: e3d6d26bb7842b443e09d6d3363a7160 +Source0: https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/%{name}-%{version}.tar.gz +# Source0-md5: 955b3dad9cbe01d6b21a562cc0100e04 Source1: xfs_lsprojid Patch0: %{name}-miscfix-v2.patch Patch1: %{name}-pl.po-update.patch +Patch2: xfsprogs-small_fixes.patch +# Patch1-md5: 28832d2c0aefb92ec17ebfe924c156e3 URL: http://www.xfs.org/ BuildRequires: autoconf >= 2.50 BuildRequires: automake @@ -23,6 +29,7 @@ BuildRequires: libuuid-static BuildRequires: readline-devel BuildRequires: rpm >= 4.4.9-56 BuildRequires: rpmbuild(macros) >= 1.402 +BuildRequires: sed >= 4.0 Obsoletes: xfsprogs-initrd BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -31,11 +38,6 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define filterout_ld -Wl,--as-needed %endif -%define _sbindir /sbin -%define _bindir /usr/sbin -%define _libdir /%{_lib} -%define _libexecdir /usr/%{_lib} - %description A set of commands to use the XFS filesystem, including mkfs.xfs. @@ -58,6 +60,24 @@ obsługujący wielkie pliki oraz wielkie systemy, o rozszerzonych atrybutach, zmiennych wielkościach bloków, mocno wykorzystujący B-drzewa by uzyskać wysoką wydajność oraz skalowalność. +%package scrub +Summary: xfs_scrub - XFS online check and repair feature (EXPERIMENTAL!) +Summary(pl.UTF-8): xfs_scrub - sprawdzanie i naprawianie zamontowanego systemu plików XFS (EKSPERYMENTALNE!) +Group: Applications/System +Requires: %{name} = %{version}-%{release} +Requires: systemd-units >= 38 + +%description scrub +xfs_scrub is an XFS online check and repair feature. + +WARNING: EXPERIMENTAL, use at your own risk! + +%description scrub -l pl.UTF-8 +xfs_scrub służy do sprawdzania i naprawiania zamontowanego systmeu +plików XFS w locie. + +UWAGA: EXPERIMENTALNE, użycie na własne ryzyko! + %package devel Summary: Header files and libraries to develop XFS software Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki @@ -89,24 +109,27 @@ Biblioteki statyczne do XFS. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 + +%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' scrub/xfs_scrub_all.in tools/xfsbuflock.py %build %{__aclocal} -I m4 %{__autoconf} %configure \ - --sbindir=%{_bindir}\ - --enable-gettext \ - --enable-readline \ + DEBUG="%{?with_debug_asserts:-DDEBUG}%{!?with_debug_asserts:-DNDEBUG}" \ + OPTIMIZER="%{rpmcflags}" \ + --enable-lto=no \ --enable-blkid \ - DEBUG="%{?debug:-DDEBUG}%{!?debug:-DNDEBUG}" \ - OPTIMIZER="%{rpmcflags}" + --enable-gettext \ + --enable-readline %{__make} -j1 \ V=1 %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_libexecdir},/etc} +install -d $RPM_BUILD_ROOT/etc/cron.d DIST_ROOT=$RPM_BUILD_ROOT DIST_INSTALL=$(pwd)/install.manifest @@ -118,26 +141,27 @@ export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV %{__make} install-dev \ DIST_MANIFEST="$DIST_INSTALL_DEV" -install %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/xfs_lsprojid - -ln -sf %{_libdir}/$(basename $RPM_BUILD_ROOT%{_libdir}/libhandle.so.*.*.*) \ - $RPM_BUILD_ROOT%{_libexecdir}/libhandle.so +install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/xfs_lsprojid -%{__mv} $RPM_BUILD_ROOT%{_libdir}/lib*.la $RPM_BUILD_ROOT%{_libexecdir} -%{__mv} $RPM_BUILD_ROOT%{_libdir}/lib*.a $RPM_BUILD_ROOT%{_libexecdir} +# adjust symlink to point to actual library, not libhandle.so symlink, which we remove afterwards +ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libhandle.so.*.*.*) \ + $RPM_BUILD_ROOT%{_libdir}/libhandle.so +# adjust library path used at link time +%{__sed} -i -e "s|libdir='/%{_lib}'|libdir='%{_libdir}'|" \ + $RPM_BUILD_ROOT%{_libdir}/libhandle.la +# already in /usr +%{__rm} $RPM_BUILD_ROOT/%{_lib}/libhandle.{so,la,a} -%{__sed} -i -e "s|libdir='%{_libdir}'|libdir='%{_libexecdir}'|" \ - $RPM_BUILD_ROOT%{_libexecdir}/libhandle.la +# install cron file +%{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{name}/xfs_scrub_all.cron,/etc/cron.d/xfs_scrub_all} +# (config file paths are specified in libfrog/projects.c) echo "#10:/mnt/ftp/roman" >> $RPM_BUILD_ROOT/etc/projects echo "#ftproman:10" >> $RPM_BUILD_ROOT/etc/projid -%find_lang %{name} - %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} -# already in /usr -%{__rm} $RPM_BUILD_ROOT%{_libdir}/libhandle.so +%find_lang %{name} %clean rm -rf $RPM_BUILD_ROOT @@ -145,32 +169,51 @@ rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%post scrub +%systemd_reload + %files -f %{name}.lang %defattr(644,root,root,755) %doc README doc/{CHANGES,CREDITS} %config(noreplace) %verify(not md5 mtime size) /etc/projects %config(noreplace) %verify(not md5 mtime size) /etc/projid -%attr(755,root,root) %{_sbindir}/fsck.xfs -%attr(755,root,root) %{_sbindir}/mkfs.xfs -%attr(755,root,root) %{_sbindir}/xfs_repair -%attr(755,root,root) %{_bindir}/xfs_* -%attr(755,root,root) %{_libdir}/libhandle.so.*.* -%attr(755,root,root) %ghost %{_libdir}/libhandle.so.1 +%attr(755,root,root) /sbin/fsck.xfs +%attr(755,root,root) /sbin/mkfs.xfs +%attr(755,root,root) /sbin/xfs_repair +%attr(755,root,root) %{_sbindir}/xfs_* +%attr(755,root,root) /%{_lib}/libhandle.so.*.* +%attr(755,root,root) %ghost /%{_lib}/libhandle.so.1 +%dir %{_libdir}/%{name} +%attr(755,root,root) %{_libdir}/%{name}/xfs_scrub_fail %{_mandir}/man5/projects.5* %{_mandir}/man5/projid.5* %{_mandir}/man5/xfs.5* %{_mandir}/man8/fsck.xfs.8* %{_mandir}/man8/mkfs.xfs.8* %{_mandir}/man8/xfs_*.8* +%exclude %{_mandir}/man8/xfs_scrub*.8* + +%files scrub +%defattr(644,root,root,755) +%attr(755,root,root) /sbin/xfs_scrub +%attr(755,root,root) /sbin/xfs_scrub_all +%{systemdunitdir}/xfs_scrub@.service +%{systemdunitdir}/xfs_scrub_all.service +%{systemdunitdir}/xfs_scrub_all.timer +%{systemdunitdir}/xfs_scrub_fail@.service +%config(noreplace) %verify(not md5 mtime size) /etc/cron.d/xfs_scrub_all +%{_mandir}/man8/xfs_scrub.8* +%{_mandir}/man8/xfs_scrub_all.8* %files devel %defattr(644,root,root,755) -%attr(755,root,root) %{_libexecdir}/libhandle.so -%{_libexecdir}/libhandle.la +%attr(755,root,root) %{_libdir}/libhandle.so +%{_libdir}/libhandle.la %{_includedir}/xfs +%{_mandir}/man2/ioctl_xfs_scrub_metadata.2* %{_mandir}/man3/*handle.3* %{_mandir}/man3/xfsctl.3* %files static %defattr(644,root,root,755) -%{_libexecdir}/libhandle.a +%{_libdir}/libhandle.a