]>
Commit | Line | Data |
---|---|---|
bcc8f09e JB |
1 | # |
2 | # Conditional build: | |
83f8c239 | 3 | %bcond_without debug_asserts |
98f845f4 | 4 | %bcond_without scrub |
4f04313e | 5 | %bcond_without static_libs # static library |
83f8c239 | 6 | # |
80ded214 | 7 | Summary: Tools for the XFS filesystem |
809af116 | 8 | Summary(pl.UTF-8): Narzędzia do systemu plików XFS |
80ded214 | 9 | Name: xfsprogs |
2b2b4b13 | 10 | Version: 6.7.0 |
b980bffa | 11 | Release: 1 |
636af8bd | 12 | License: LGPL v2.1 (libhandle), GPL v2 (the rest) |
80ded214 | 13 | Group: Applications/System |
d2d84c6a | 14 | Source0: https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/%{name}-%{version}.tar.xz |
2b2b4b13 | 15 | # Source0-md5: 0bde7bc8b3d8cbbd01064f756f67911f |
a32e9a39 | 16 | Source1: xfs_lsprojid |
bc92c0b0 | 17 | Patch0: %{name}-miscfix-v2.patch |
50b504f9 | 18 | Patch1: %{name}-pl.po-update.patch |
964bc873 | 19 | URL: https://xfs.wiki.kernel.org/ |
058705df JB |
20 | # for <attr/attributes.h> |
21 | BuildRequires: attr-devel | |
b93753bd | 22 | BuildRequires: autoconf >= 2.69 |
1c0f6863 | 23 | BuildRequires: automake |
cb58e4a3 | 24 | BuildRequires: bash |
1467f630 | 25 | BuildRequires: device-mapper-devel |
7fb2d2e7 | 26 | BuildRequires: gettext-tools |
7f3b3fd0 | 27 | BuildRequires: glibc-static |
4cf17b4d | 28 | BuildRequires: inih-devel |
51a52578 | 29 | BuildRequires: libblkid-devel |
d2d84c6a JB |
30 | # without .la file so that -static-libtool-libs won't take libedit.a |
31 | BuildRequires: libedit-devel >= 3.1-1.20191231.1 | |
1467f630 | 32 | BuildRequires: libicu-devel |
92a53cbb | 33 | BuildRequires: libtool |
a5769371 | 34 | BuildRequires: libuuid-devel |
7f3b3fd0 | 35 | BuildRequires: libuuid-static |
71531787 | 36 | BuildRequires: pkgconfig |
dec839eb | 37 | BuildRequires: rpm >= 4.4.9-56 |
4f04313e | 38 | BuildRequires: rpmbuild(macros) >= 1.527 |
98f845f4 | 39 | %{?with_scrub:BuildRequires: systemd-devel} |
2849b9f4 AG |
40 | BuildRequires: userspace-rcu-devel |
41 | BuildRequires: userspace-rcu-static | |
3eb6b74a | 42 | BuildRequires: sed >= 4.0 |
d2d84c6a JB |
43 | BuildRequires: tar >= 1:1.22 |
44 | BuildRequires: xz | |
2924c896 | 45 | Obsoletes: xfsprogs-initrd < 3.1.11-2 |
c826f244 | 46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
80ded214 | 47 | |
dec839eb ER |
48 | %if "%{pld_release}" == "ac" |
49 | # libtool in ac doesn't do the reordering of args properly | |
50 | %define filterout_ld -Wl,--as-needed | |
51 | %endif | |
52 | ||
80ded214 AM |
53 | %description |
54 | A set of commands to use the XFS filesystem, including mkfs.xfs. | |
55 | ||
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 | |
61 | scalability. | |
62 | ||
63 | This implementation is on-disk compatible with the IRIX version of | |
64 | XFS. | |
65 | ||
ddc220a9 JR |
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. | |
80ded214 | 68 | |
ddc220a9 JR |
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ść. | |
80ded214 | 74 | |
3eb6b74a JB |
75 | %package scrub |
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 | |
81 | ||
82 | %description scrub | |
83 | xfs_scrub is an XFS online check and repair feature. | |
84 | ||
85 | WARNING: EXPERIMENTAL, use at your own risk! | |
86 | ||
87 | %description scrub -l pl.UTF-8 | |
88 | xfs_scrub służy do sprawdzania i naprawiania zamontowanego systmeu | |
89 | plików XFS w locie. | |
90 | ||
91 | UWAGA: EXPERIMENTALNE, użycie na własne ryzyko! | |
92 | ||
80ded214 AM |
93 | %package devel |
94 | Summary: Header files and libraries to develop XFS software | |
809af116 | 95 | Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki |
80ded214 | 96 | Group: Development/Libraries |
8b4647b2 | 97 | Requires: %{name} = %{version}-%{release} |
2528905a | 98 | Requires: libuuid-devel |
7d20b833 | 99 | Requires: linux-libc-headers |
80ded214 AM |
100 | |
101 | %description devel | |
102 | Header files and libraries to develop software which operates on XFS | |
103 | filesystems. | |
104 | ||
ddc220a9 JR |
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. | |
80ded214 | 108 | |
1c0f6863 | 109 | %package static |
110 | Summary: Static XFS software libraries | |
809af116 | 111 | Summary(pl.UTF-8): Biblioteki statyczne do XFS |
1c0f6863 | 112 | Group: Development/Libraries |
8b4647b2 | 113 | Requires: %{name}-devel = %{version}-%{release} |
1c0f6863 | 114 | |
115 | %description static | |
116 | Static XFS software libraries. | |
117 | ||
ddc220a9 | 118 | %description static -l pl.UTF-8 |
1c0f6863 | 119 | Biblioteki statyczne do XFS. |
120 | ||
80ded214 | 121 | %prep |
600886d5 | 122 | %setup -q |
80ded214 | 123 | %patch0 -p1 |
53895d35 JB |
124 | |
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 | |
131 | %patch1 -p1 -b .orig | |
4ede93fd | 132 | |
3eb6b74a JB |
133 | %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' scrub/xfs_scrub_all.in tools/xfsbuflock.py |
134 | ||
80ded214 | 135 | %build |
ff9c0a4e | 136 | %{__aclocal} -I m4 |
551b0d1f | 137 | %{__autoconf} |
1c0f6863 | 138 | %configure \ |
83f8c239 | 139 | DEBUG="%{?with_debug_asserts:-DDEBUG}%{!?with_debug_asserts:-DNDEBUG}" \ |
8745a86f | 140 | OPTIMIZER="%{rpmcflags}" \ |
d2d84c6a | 141 | --enable-editline \ |
8745a86f | 142 | --enable-gettext \ |
d2d84c6a JB |
143 | --enable-libicu \ |
144 | --disable-lto \ | |
330879b1 | 145 | %{?with_scrub:--enable-scrub=yes} \ |
4f04313e | 146 | %{__enable_disable static_libs static} \ |
330879b1 | 147 | --with-udev-rule-dir=/lib/udev/rules.d |
00d1530a | 148 | |
2849b9f4 | 149 | %{__make} \ |
03dcab3f | 150 | V=1 |
80ded214 AM |
151 | |
152 | %install | |
153 | rm -rf $RPM_BUILD_ROOT | |
8745a86f | 154 | install -d $RPM_BUILD_ROOT/etc/cron.d |
df004a70 | 155 | |
9656c3b9 ER |
156 | DIST_ROOT=$RPM_BUILD_ROOT |
157 | DIST_INSTALL=$(pwd)/install.manifest | |
158 | DIST_INSTALL_DEV=$(pwd)/install-dev.manifest | |
59aa30e8 | 159 | export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV |
ff9c0a4e JB |
160 | |
161 | %{__make} install \ | |
162 | DIST_MANIFEST="$DIST_INSTALL" | |
163 | %{__make} install-dev \ | |
164 | DIST_MANIFEST="$DIST_INSTALL_DEV" | |
80ded214 | 165 | |
8745a86f | 166 | install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/xfs_lsprojid |
cb190f67 | 167 | |
8745a86f JB |
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 | |
174 | # already in /usr | |
175 | %{__rm} $RPM_BUILD_ROOT/%{_lib}/libhandle.{so,la,a} | |
51a52578 | 176 | |
8745a86f | 177 | # install cron file |
98f845f4 | 178 | %if %{with scrub} |
8db21f86 | 179 | %{__mv} $RPM_BUILD_ROOT{%{_datadir}/%{name}/xfs_scrub_all.cron,/etc/cron.d/xfs_scrub_all} |
98f845f4 | 180 | %else |
8db21f86 | 181 | %{__rm} $RPM_BUILD_ROOT/%{_datadir}/%{name}/xfs_scrub_all.cron |
98f845f4 | 182 | %endif |
b756248b | 183 | |
8745a86f | 184 | # (config file paths are specified in libfrog/projects.c) |
6e781c10 PG |
185 | echo "#10:/mnt/ftp/roman" >> $RPM_BUILD_ROOT/etc/projects |
186 | echo "#ftproman:10" >> $RPM_BUILD_ROOT/etc/projid | |
187 | ||
03dcab3f | 188 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
5e040522 | 189 | |
8745a86f | 190 | %find_lang %{name} |
28e86fdc | 191 | |
80ded214 AM |
192 | %clean |
193 | rm -rf $RPM_BUILD_ROOT | |
194 | ||
3eb6b74a | 195 | %post -p /sbin/ldconfig |
c7083593 JR |
196 | %postun -p /sbin/ldconfig |
197 | ||
3eb6b74a JB |
198 | %post scrub |
199 | %systemd_reload | |
200 | ||
01483858 | 201 | %files -f %{name}.lang |
80ded214 | 202 | %defattr(644,root,root,755) |
636af8bd | 203 | %doc README doc/{CHANGES,CREDITS} |
6e781c10 PG |
204 | %config(noreplace) %verify(not md5 mtime size) /etc/projects |
205 | %config(noreplace) %verify(not md5 mtime size) /etc/projid | |
8745a86f JB |
206 | %attr(755,root,root) /sbin/fsck.xfs |
207 | %attr(755,root,root) /sbin/mkfs.xfs | |
8745a86f JB |
208 | %attr(755,root,root) /sbin/xfs_repair |
209 | %attr(755,root,root) %{_sbindir}/xfs_* | |
98f845f4 | 210 | %if %{with scrub} |
1467f630 | 211 | %exclude %{_sbindir}/xfs_scrub* |
98f845f4 | 212 | %endif |
8745a86f JB |
213 | %attr(755,root,root) /%{_lib}/libhandle.so.*.* |
214 | %attr(755,root,root) %ghost /%{_lib}/libhandle.so.1 | |
f1712211 | 215 | %{_datadir}/%{name} |
98f845f4 | 216 | %if %{with scrub} |
d69e2421 | 217 | %dir %{_libexecdir}/%{name} |
8db21f86 | 218 | %attr(755,root,root) %{_libexecdir}/%{name}/xfs_scrub_fail |
98f845f4 | 219 | %endif |
275db5b4 AM |
220 | %{_mandir}/man5/projects.5* |
221 | %{_mandir}/man5/projid.5* | |
0c1d4bf9 JB |
222 | %{_mandir}/man5/xfs.5* |
223 | %{_mandir}/man8/fsck.xfs.8* | |
224 | %{_mandir}/man8/mkfs.xfs.8* | |
225 | %{_mandir}/man8/xfs_*.8* | |
98f845f4 | 226 | %if %{with scrub} |
3eb6b74a | 227 | %exclude %{_mandir}/man8/xfs_scrub*.8* |
98f845f4 | 228 | %endif |
3eb6b74a | 229 | |
98f845f4 | 230 | %if %{with scrub} |
3eb6b74a JB |
231 | %files scrub |
232 | %defattr(644,root,root,755) | |
1467f630 AM |
233 | %attr(755,root,root) %{_sbindir}/xfs_scrub |
234 | %attr(755,root,root) %{_sbindir}/xfs_scrub_all | |
330879b1 | 235 | /lib/udev/rules.d/64-xfs.rules |
3eb6b74a JB |
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* | |
98f845f4 | 243 | %endif |
80ded214 AM |
244 | |
245 | %files devel | |
246 | %defattr(644,root,root,755) | |
8745a86f JB |
247 | %attr(755,root,root) %{_libdir}/libhandle.so |
248 | %{_libdir}/libhandle.la | |
353bc53d | 249 | %{_includedir}/xfs |
e7ecd7c8 AM |
250 | %{_mandir}/man2/ioctl_xfs_ag_geometry.2* |
251 | %{_mandir}/man2/ioctl_xfs_bulkstat.2* | |
851787e1 AM |
252 | %{_mandir}/man2/ioctl_xfs_fsbulkstat.2* |
253 | %{_mandir}/man2/ioctl_xfs_fscounts.2* | |
7caeff7f | 254 | %{_mandir}/man2/ioctl_xfs_fsgeometry.2* |
851787e1 | 255 | %{_mandir}/man2/ioctl_xfs_fsgetxattr.2* |
7caeff7f | 256 | %{_mandir}/man2/ioctl_xfs_fsgetxattra.2* |
851787e1 | 257 | %{_mandir}/man2/ioctl_xfs_fsinumbers.2* |
7caeff7f JB |
258 | %{_mandir}/man2/ioctl_xfs_fssetxattr.2* |
259 | %{_mandir}/man2/ioctl_xfs_getbmap.2* | |
260 | %{_mandir}/man2/ioctl_xfs_getbmapa.2* | |
851787e1 AM |
261 | %{_mandir}/man2/ioctl_xfs_getbmapx.2* |
262 | %{_mandir}/man2/ioctl_xfs_getresblks.2* | |
263 | %{_mandir}/man2/ioctl_xfs_goingdown.2* | |
e7ecd7c8 | 264 | %{_mandir}/man2/ioctl_xfs_inumbers.2* |
28e86fdc | 265 | %{_mandir}/man2/ioctl_xfs_scrub_metadata.2* |
7caeff7f | 266 | %{_mandir}/man2/ioctl_xfs_setresblks.2* |
0c1d4bf9 JB |
267 | %{_mandir}/man3/*handle.3* |
268 | %{_mandir}/man3/xfsctl.3* | |
1c0f6863 | 269 | |
4f04313e | 270 | %if %{with static_libs} |
1c0f6863 | 271 | %files static |
272 | %defattr(644,root,root,755) | |
8745a86f | 273 | %{_libdir}/libhandle.a |
4f04313e | 274 | %endif |