3 %bcond_without debug_asserts
5 %bcond_without static_libs # static library
7 Summary: Tools for the XFS filesystem
8 Summary(pl.UTF-8): Narzędzia do systemu plików XFS
12 License: LGPL v2.1 (libhandle), GPL v2 (the rest)
13 Group: Applications/System
14 Source0: https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/%{name}-%{version}.tar.xz
15 # Source0-md5: 0bde7bc8b3d8cbbd01064f756f67911f
17 Patch0: %{name}-miscfix-v2.patch
18 Patch1: %{name}-pl.po-update.patch
19 URL: https://xfs.wiki.kernel.org/
20 # for <attr/attributes.h>
21 BuildRequires: attr-devel
22 BuildRequires: autoconf >= 2.69
23 BuildRequires: automake
25 BuildRequires: device-mapper-devel
26 BuildRequires: gettext-tools
27 BuildRequires: glibc-static
28 BuildRequires: inih-devel
29 BuildRequires: libblkid-devel
30 # without .la file so that -static-libtool-libs won't take libedit.a
31 BuildRequires: libedit-devel >= 3.1-1.20191231.1
32 BuildRequires: libicu-devel
33 BuildRequires: libtool
34 BuildRequires: libuuid-devel
35 BuildRequires: libuuid-static
36 BuildRequires: pkgconfig
37 BuildRequires: rpm >= 4.4.9-56
38 BuildRequires: rpmbuild(macros) >= 1.527
39 %{?with_scrub:BuildRequires: systemd-devel}
40 BuildRequires: userspace-rcu-devel
41 BuildRequires: userspace-rcu-static
42 BuildRequires: sed >= 4.0
43 BuildRequires: tar >= 1:1.22
45 Obsoletes: xfsprogs-initrd < 3.1.11-2
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 %if "%{pld_release}" == "ac"
49 # libtool in ac doesn't do the reordering of args properly
50 %define filterout_ld -Wl,--as-needed
54 A set of commands to use the XFS filesystem, including mkfs.xfs.
56 XFS is a high performance journaling filesystem which originated on
57 the SGI IRIX platform. It is completely multi-threaded, can support
58 large files and large filesystems, extended attributes, variable block
59 sizes, is extent based, and makes extensive use of Btrees
60 (directories, extents, free space) to aid both performance and
63 This implementation is on-disk compatible with the IRIX version of
66 %description -l pl.UTF-8
67 Zbiór komend do użytku z systemem plików XFS, włączając w to mkfs.xfs.
69 XFS jest wysoko wydajnym systemem plików z kroniką, który oryginalnie
70 był używany na platformie SGI IRIX. Jest to w pełni wielowątkowy,
71 obsługujący wielkie pliki oraz wielkie systemy, o rozszerzonych
72 atrybutach, zmiennych wielkościach bloków, mocno wykorzystujący
73 B-drzewa by uzyskać wysoką wydajność oraz skalowalność.
76 Summary: xfs_scrub - XFS online check and repair feature (EXPERIMENTAL!)
77 Summary(pl.UTF-8): xfs_scrub - sprawdzanie i naprawianie zamontowanego systemu plików XFS (EKSPERYMENTALNE!)
78 Group: Applications/System
79 Requires: %{name} = %{version}-%{release}
80 Requires: systemd-units >= 38
83 xfs_scrub is an XFS online check and repair feature.
85 WARNING: EXPERIMENTAL, use at your own risk!
87 %description scrub -l pl.UTF-8
88 xfs_scrub służy do sprawdzania i naprawiania zamontowanego systmeu
91 UWAGA: EXPERIMENTALNE, użycie na własne ryzyko!
94 Summary: Header files and libraries to develop XFS software
95 Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki
96 Group: Development/Libraries
97 Requires: %{name} = %{version}-%{release}
98 Requires: libuuid-devel
99 Requires: linux-libc-headers
102 Header files and libraries to develop software which operates on XFS
105 %description devel -l pl.UTF-8
106 Pliki nagłówkowe i biblioteki potrzebne do rozwoju oprogramowania
107 operującego na systemie plików XFS.
110 Summary: Static XFS software libraries
111 Summary(pl.UTF-8): Biblioteki statyczne do XFS
112 Group: Development/Libraries
113 Requires: %{name}-devel = %{version}-%{release}
116 Static XFS software libraries.
118 %description static -l pl.UTF-8
119 Biblioteki statyczne do XFS.
125 # files order in pot changes in every version, making diff huge - sort entries first
126 %{__mv} po/xfsprogs.pot po/xfsprogs.pot.upstream
127 msgcat -F po/xfsprogs.pot.upstream -o po/xfsprogs.pot
128 # update line numbers etc.
129 %{__mv} po/pl.po po/pl.po.upstream
130 msgmerge po/pl.po.upstream po/xfsprogs.pot -o po/pl.po
133 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' scrub/xfs_scrub_all.in tools/xfsbuflock.py
139 DEBUG="%{?with_debug_asserts:-DDEBUG}%{!?with_debug_asserts:-DNDEBUG}" \
140 OPTIMIZER="%{rpmcflags}" \
145 %{?with_scrub:--enable-scrub=yes} \
146 %{__enable_disable static_libs static} \
147 --with-udev-rule-dir=/lib/udev/rules.d
153 rm -rf $RPM_BUILD_ROOT
154 install -d $RPM_BUILD_ROOT/etc/cron.d
156 DIST_ROOT=$RPM_BUILD_ROOT
157 DIST_INSTALL=$(pwd)/install.manifest
158 DIST_INSTALL_DEV=$(pwd)/install-dev.manifest
159 export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV
162 DIST_MANIFEST="$DIST_INSTALL"
163 %{__make} install-dev \
164 DIST_MANIFEST="$DIST_INSTALL_DEV"
166 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/xfs_lsprojid
168 # adjust symlink to point to actual library, not libhandle.so symlink, which we remove afterwards
169 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libhandle.so.*.*.*) \
170 $RPM_BUILD_ROOT%{_libdir}/libhandle.so
171 # adjust library path used at link time
172 %{__sed} -i -e "s|libdir='/%{_lib}'|libdir='%{_libdir}'|" \
173 $RPM_BUILD_ROOT%{_libdir}/libhandle.la
175 %{__rm} $RPM_BUILD_ROOT/%{_lib}/libhandle.{so,la,a}
179 %{__mv} $RPM_BUILD_ROOT{%{_datadir}/%{name}/xfs_scrub_all.cron,/etc/cron.d/xfs_scrub_all}
181 %{__rm} $RPM_BUILD_ROOT/%{_datadir}/%{name}/xfs_scrub_all.cron
184 # (config file paths are specified in libfrog/projects.c)
185 echo "#10:/mnt/ftp/roman" >> $RPM_BUILD_ROOT/etc/projects
186 echo "#ftproman:10" >> $RPM_BUILD_ROOT/etc/projid
188 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
193 rm -rf $RPM_BUILD_ROOT
195 %post -p /sbin/ldconfig
196 %postun -p /sbin/ldconfig
201 %files -f %{name}.lang
202 %defattr(644,root,root,755)
203 %doc README doc/{CHANGES,CREDITS}
204 %config(noreplace) %verify(not md5 mtime size) /etc/projects
205 %config(noreplace) %verify(not md5 mtime size) /etc/projid
206 %attr(755,root,root) /sbin/fsck.xfs
207 %attr(755,root,root) /sbin/mkfs.xfs
208 %attr(755,root,root) /sbin/xfs_repair
209 %attr(755,root,root) %{_sbindir}/xfs_*
211 %exclude %{_sbindir}/xfs_scrub*
213 %attr(755,root,root) /%{_lib}/libhandle.so.*.*
214 %attr(755,root,root) %ghost /%{_lib}/libhandle.so.1
217 %dir %{_libexecdir}/%{name}
218 %attr(755,root,root) %{_libexecdir}/%{name}/xfs_scrub_fail
220 %{_mandir}/man5/projects.5*
221 %{_mandir}/man5/projid.5*
222 %{_mandir}/man5/xfs.5*
223 %{_mandir}/man8/fsck.xfs.8*
224 %{_mandir}/man8/mkfs.xfs.8*
225 %{_mandir}/man8/xfs_*.8*
227 %exclude %{_mandir}/man8/xfs_scrub*.8*
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{_sbindir}/xfs_scrub
234 %attr(755,root,root) %{_sbindir}/xfs_scrub_all
235 /lib/udev/rules.d/64-xfs.rules
236 %{systemdunitdir}/xfs_scrub@.service
237 %{systemdunitdir}/xfs_scrub_all.service
238 %{systemdunitdir}/xfs_scrub_all.timer
239 %{systemdunitdir}/xfs_scrub_fail@.service
240 %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/xfs_scrub_all
241 %{_mandir}/man8/xfs_scrub.8*
242 %{_mandir}/man8/xfs_scrub_all.8*
246 %defattr(644,root,root,755)
247 %attr(755,root,root) %{_libdir}/libhandle.so
248 %{_libdir}/libhandle.la
250 %{_mandir}/man2/ioctl_xfs_ag_geometry.2*
251 %{_mandir}/man2/ioctl_xfs_bulkstat.2*
252 %{_mandir}/man2/ioctl_xfs_fsbulkstat.2*
253 %{_mandir}/man2/ioctl_xfs_fscounts.2*
254 %{_mandir}/man2/ioctl_xfs_fsgeometry.2*
255 %{_mandir}/man2/ioctl_xfs_fsgetxattr.2*
256 %{_mandir}/man2/ioctl_xfs_fsgetxattra.2*
257 %{_mandir}/man2/ioctl_xfs_fsinumbers.2*
258 %{_mandir}/man2/ioctl_xfs_fssetxattr.2*
259 %{_mandir}/man2/ioctl_xfs_getbmap.2*
260 %{_mandir}/man2/ioctl_xfs_getbmapa.2*
261 %{_mandir}/man2/ioctl_xfs_getbmapx.2*
262 %{_mandir}/man2/ioctl_xfs_getresblks.2*
263 %{_mandir}/man2/ioctl_xfs_goingdown.2*
264 %{_mandir}/man2/ioctl_xfs_inumbers.2*
265 %{_mandir}/man2/ioctl_xfs_scrub_metadata.2*
266 %{_mandir}/man2/ioctl_xfs_setresblks.2*
267 %{_mandir}/man3/*handle.3*
268 %{_mandir}/man3/xfsctl.3*
270 %if %{with static_libs}
272 %defattr(644,root,root,755)
273 %{_libdir}/libhandle.a