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