]> git.pld-linux.org Git - packages/xfsprogs.git/blob - xfsprogs.spec
add static_libs bcond
[packages/xfsprogs.git] / xfsprogs.spec
1 #
2 # Conditional build:
3 %bcond_without  debug_asserts
4 %bcond_without  scrub
5 %bcond_without  static_libs     # static library
6 #
7 Summary:        Tools for the XFS filesystem
8 Summary(pl.UTF-8):      Narzędzia do systemu plików XFS
9 Name:           xfsprogs
10 Version:        6.7.0
11 Release:        1
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
16 Source1:        xfs_lsprojid
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
24 BuildRequires:  bash
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
44 BuildRequires:  xz
45 Obsoletes:      xfsprogs-initrd < 3.1.11-2
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
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
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
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.
68
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ść.
74
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
93 %package devel
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
100
101 %description devel
102 Header files and libraries to develop software which operates on XFS
103 filesystems.
104
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.
108
109 %package static
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}
114
115 %description static
116 Static XFS software libraries.
117
118 %description static -l pl.UTF-8
119 Biblioteki statyczne do XFS.
120
121 %prep
122 %setup -q
123 %patch0 -p1
124 %patch1 -p1
125
126 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' scrub/xfs_scrub_all.in tools/xfsbuflock.py
127
128 %build
129 %{__aclocal} -I m4
130 %{__autoconf}
131 %configure \
132         DEBUG="%{?with_debug_asserts:-DDEBUG}%{!?with_debug_asserts:-DNDEBUG}" \
133         OPTIMIZER="%{rpmcflags}" \
134         --enable-editline \
135         --enable-gettext \
136         --enable-libicu \
137         --disable-lto \
138         %{?with_scrub:--enable-scrub=yes} \
139         %{__enable_disable static_libs static} \
140         --with-udev-rule-dir=/lib/udev/rules.d
141
142 %{__make} \
143         V=1
144
145 %install
146 rm -rf $RPM_BUILD_ROOT
147 install -d $RPM_BUILD_ROOT/etc/cron.d
148
149 DIST_ROOT=$RPM_BUILD_ROOT
150 DIST_INSTALL=$(pwd)/install.manifest
151 DIST_INSTALL_DEV=$(pwd)/install-dev.manifest
152 export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV
153
154 %{__make} install \
155         DIST_MANIFEST="$DIST_INSTALL"
156 %{__make} install-dev \
157         DIST_MANIFEST="$DIST_INSTALL_DEV"
158
159 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/xfs_lsprojid
160
161 # adjust symlink to point to actual library, not libhandle.so symlink, which we remove afterwards
162 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libhandle.so.*.*.*) \
163          $RPM_BUILD_ROOT%{_libdir}/libhandle.so
164 # adjust library path used at link time
165 %{__sed} -i -e "s|libdir='/%{_lib}'|libdir='%{_libdir}'|" \
166         $RPM_BUILD_ROOT%{_libdir}/libhandle.la
167 # already in /usr
168 %{__rm} $RPM_BUILD_ROOT/%{_lib}/libhandle.{so,la,a}
169
170 # install cron file
171 %if %{with scrub}
172 %{__mv} $RPM_BUILD_ROOT{%{_datadir}/%{name}/xfs_scrub_all.cron,/etc/cron.d/xfs_scrub_all}
173 %else
174 %{__rm} $RPM_BUILD_ROOT/%{_datadir}/%{name}/xfs_scrub_all.cron
175 %endif
176
177 # (config file paths are specified in libfrog/projects.c)
178 echo "#10:/mnt/ftp/roman"  >> $RPM_BUILD_ROOT/etc/projects
179 echo "#ftproman:10" >> $RPM_BUILD_ROOT/etc/projid
180
181 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
182
183 %find_lang %{name}
184
185 %clean
186 rm -rf $RPM_BUILD_ROOT
187
188 %post   -p /sbin/ldconfig
189 %postun -p /sbin/ldconfig
190
191 %post scrub
192 %systemd_reload
193
194 %files -f %{name}.lang
195 %defattr(644,root,root,755)
196 %doc README doc/{CHANGES,CREDITS}
197 %config(noreplace) %verify(not md5 mtime size) /etc/projects
198 %config(noreplace) %verify(not md5 mtime size) /etc/projid
199 %attr(755,root,root) /sbin/fsck.xfs
200 %attr(755,root,root) /sbin/mkfs.xfs
201 %attr(755,root,root) /sbin/xfs_repair
202 %attr(755,root,root) %{_sbindir}/xfs_*
203 %if %{with scrub}
204 %exclude %{_sbindir}/xfs_scrub*
205 %endif
206 %attr(755,root,root) /%{_lib}/libhandle.so.*.*
207 %attr(755,root,root) %ghost /%{_lib}/libhandle.so.1
208 %{_datadir}/%{name}
209 %dir %{_libexecdir}/%{name}
210 %if %{with scrub}
211 %attr(755,root,root) %{_libexecdir}/%{name}/xfs_scrub_fail
212 %endif
213 %{_mandir}/man5/projects.5*
214 %{_mandir}/man5/projid.5*
215 %{_mandir}/man5/xfs.5*
216 %{_mandir}/man8/fsck.xfs.8*
217 %{_mandir}/man8/mkfs.xfs.8*
218 %{_mandir}/man8/xfs_*.8*
219 %if %{with scrub}
220 %exclude %{_mandir}/man8/xfs_scrub*.8*
221 %endif
222
223 %if %{with scrub}
224 %files scrub
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_sbindir}/xfs_scrub
227 %attr(755,root,root) %{_sbindir}/xfs_scrub_all
228 /lib/udev/rules.d/64-xfs.rules
229 %{systemdunitdir}/xfs_scrub@.service
230 %{systemdunitdir}/xfs_scrub_all.service
231 %{systemdunitdir}/xfs_scrub_all.timer
232 %{systemdunitdir}/xfs_scrub_fail@.service
233 %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/xfs_scrub_all
234 %{_mandir}/man8/xfs_scrub.8*
235 %{_mandir}/man8/xfs_scrub_all.8*
236 %endif
237
238 %files devel
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/libhandle.so
241 %{_libdir}/libhandle.la
242 %{_includedir}/xfs
243 %{_mandir}/man2/ioctl_xfs_ag_geometry.2*
244 %{_mandir}/man2/ioctl_xfs_bulkstat.2*
245 %{_mandir}/man2/ioctl_xfs_fsbulkstat.2*
246 %{_mandir}/man2/ioctl_xfs_fscounts.2*
247 %{_mandir}/man2/ioctl_xfs_fsgeometry.2*
248 %{_mandir}/man2/ioctl_xfs_fsgetxattr.2*
249 %{_mandir}/man2/ioctl_xfs_fsgetxattra.2*
250 %{_mandir}/man2/ioctl_xfs_fsinumbers.2*
251 %{_mandir}/man2/ioctl_xfs_fssetxattr.2*
252 %{_mandir}/man2/ioctl_xfs_getbmap.2*
253 %{_mandir}/man2/ioctl_xfs_getbmapa.2*
254 %{_mandir}/man2/ioctl_xfs_getbmapx.2*
255 %{_mandir}/man2/ioctl_xfs_getresblks.2*
256 %{_mandir}/man2/ioctl_xfs_goingdown.2*
257 %{_mandir}/man2/ioctl_xfs_inumbers.2*
258 %{_mandir}/man2/ioctl_xfs_scrub_metadata.2*
259 %{_mandir}/man2/ioctl_xfs_setresblks.2*
260 %{_mandir}/man3/*handle.3*
261 %{_mandir}/man3/xfsctl.3*
262
263 %if %{with static_libs}
264 %files static
265 %defattr(644,root,root,755)
266 %{_libdir}/libhandle.a
267 %endif
This page took 0.102342 seconds and 4 git commands to generate.