]>
Commit | Line | Data |
---|---|---|
042f4ecc | 1 | # TODO |
d1c5b6d6 JR |
2 | # - where to package pNFS blkmapd client deamon (clients or separate package) |
3 | # - consider enabling: libmount-mount | |
042f4ecc JR |
4 | # - should unmount /proc/fs/nfsd and /var/lib/nfs/rpc_pipefs at package |
5 | # uninstall (or in service nfs stop) | |
6 | # | |
7 | # Conditional build: | |
8 | %bcond_with krb5 # build with MIT Kerberos (+libgssglue) instead of Heimdal | |
9 | %bcond_without tirpc # use librpcsecgss instead of libtirpc | |
10 | # | |
11 | Summary: Kernel NFS server | |
12 | Summary(pl.UTF-8): Działający na poziomie jądra serwer NFS | |
13 | Summary(pt_BR.UTF-8): Os utilitários para o cliente e servidor NFS do Linux | |
14 | Summary(ru.UTF-8): Утилиты для NFS и демоны поддержки для NFS-сервера ядра | |
15 | Summary(uk.UTF-8): Утиліти для NFS та демони підтримки для NFS-сервера ядра | |
16 | Name: nfs-utils | |
d1c5b6d6 | 17 | Version: 1.2.5 |
0f0a4804 | 18 | Release: 1 |
042f4ecc JR |
19 | License: GPL v2 |
20 | Group: Networking/Daemons | |
d1c5b6d6 JR |
21 | #Source0: http://www.kernel.org/pub/linux/utils/nfs/%{name}-%{version}.tar.bz2 |
22 | Source0: http://downloads.sourceforge.net/project/nfs/nfs-utils/%{version}/%{name}-%{version}.tar.bz2 | |
23 | # Source0-md5: 8395ac770720b83c5c469f88306d7765 | |
042f4ecc JR |
24 | #Source1: ftp://ftp.linuxnfs.sourceforge.org/pub/nfs/nfs.doc.tar.gz |
25 | Source1: nfs.doc.tar.gz | |
26 | # Source1-md5: ae7db9c61c5ad04f83bb99e5caed73da | |
27 | Source2: nfs.init | |
28 | Source3: nfslock.init | |
29 | Source4: nfsfs.init | |
30 | Source5: rpcidmapd.init | |
31 | Source6: rpcgssd.init | |
32 | Source7: rpcsvcgssd.init | |
33 | Source8: nfs.sysconfig | |
34 | Source9: nfslock.sysconfig | |
35 | Source10: nfsfs.sysconfig | |
36 | Patch0: %{name}-install.patch | |
37 | Patch1: %{name}-statdpath.patch | |
38 | Patch2: %{name}-subsys.patch | |
39 | Patch3: %{name}-union-mount.patch | |
c1a7163e | 40 | Patch4: %{name}-heimdal.patch |
d277a362 | 41 | Patch5: %{name}-heimdal-kcm.patch |
042f4ecc JR |
42 | URL: http://nfs.sourceforge.net/ |
43 | BuildRequires: autoconf >= 2.59 | |
44 | BuildRequires: automake | |
45 | BuildRequires: cpp | |
d277a362 | 46 | BuildRequires: keyutils-devel |
05395780 | 47 | BuildRequires: libblkid-devel >= 1.40 |
042f4ecc | 48 | BuildRequires: libcap-devel |
d1c5b6d6 | 49 | BuildRequires: device-mapper-devel |
042f4ecc JR |
50 | BuildRequires: libevent-devel >= 1.2 |
51 | BuildRequires: libnfsidmap-devel >= 0.21-3 | |
52 | BuildRequires: libtool | |
53 | BuildRequires: libwrap-devel | |
54 | BuildRequires: pkgconfig | |
cf24a9e6 | 55 | BuildRequires: rpm-pythonprov |
042f4ecc JR |
56 | %if %{with tirpc} |
57 | BuildRequires: libtirpc-devel >= 1:0.1.10-4 | |
58 | %else | |
59 | BuildRequires: librpcsecgss-devel >= 0.16 | |
60 | %endif | |
61 | %if %{with krb5} | |
62 | BuildRequires: krb5-devel >= 1.6 | |
63 | BuildRequires: libgssglue-devel >= 0.1 | |
64 | %else | |
65 | BuildRequires: heimdal-devel >= 1.0 | |
66 | %endif | |
67 | # lucid context fields mismatch with current version of spkm3.h | |
68 | BuildConflicts: gss_mech_spkm3-devel | |
69 | Requires(post): fileutils | |
70 | Requires(post): sed >= 4.0 | |
71 | Requires(post,preun): /sbin/chkconfig | |
72 | Requires: %{name}-common = %{version}-%{release} | |
73 | Requires: rc-scripts >= 0.4.1.5 | |
74 | Requires: rpcbind >= 0.1.7 | |
75 | Requires: setup >= 2.4.6-7 | |
76 | Provides: nfsdaemon | |
77 | Obsoletes: knfsd | |
78 | Obsoletes: nfs-server | |
79 | Obsoletes: nfsdaemon | |
80 | Conflicts: kernel < 2.2.5 | |
81 | Conflicts: krb5-common < 1.7 | |
82 | ExcludeArch: armv4l | |
83 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
84 | ||
85 | %description | |
86 | This is the *new* kernel NFS server and related tools. It provides a | |
87 | much higher level of performance than the traditional Linux user-land | |
88 | NFS server. | |
89 | ||
90 | %description -l pl.UTF-8 | |
91 | To jest *nowy* działający na poziomie jądra serwer NFS oraz związane z | |
92 | nim narzędzia. Serwer ten dostarcza znacznie większą wydajność niż | |
93 | tradycyjny, działający na poziomie użytkownika serwer NFS. | |
94 | ||
95 | %description -l pt_BR.UTF-8 | |
96 | O pacote nfs-utils provê os utilitários para o cliente e servidor NFS | |
97 | do Linux. | |
98 | ||
99 | %description -l ru.UTF-8 | |
100 | Пакет nfs-utils предоставляет демона для NFS-сервера, включенного в | |
101 | ядро, и сопутствующие утилиты, которые обеспечивают намного большую | |
102 | производительность, чем традиционные Linux NFS-сервера, используемые | |
103 | большинством пользователей. | |
104 | ||
105 | %description -l uk.UTF-8 | |
106 | Пакет nfs-utils надає демона для NFS-сервера, вбудованого в ядро, та | |
107 | супутні утиліти, які забезпечують набагато більшу продуктивність, ніж | |
108 | традиційні Linux NFS-сервери, які використовує більшість користувачів. | |
109 | ||
110 | %package clients | |
111 | Summary: Clients for connecting to a remote NFS server | |
112 | Summary(pl.UTF-8): Klienci do łączenia się ze zdalnym serwerem NFS | |
113 | Group: Networking | |
114 | Requires(post,preun): /sbin/chkconfig | |
115 | Requires: %{name}-common = %{version}-%{release} | |
116 | Requires: psmisc | |
117 | Requires: rc-scripts | |
118 | Provides: nfs-server-clients | |
119 | Provides: nfsclient | |
120 | Obsoletes: knfsd-clients | |
121 | Obsoletes: nfs-server-clients | |
122 | Obsoletes: nfsclient | |
123 | Conflicts: krb5-common < 1.7 | |
124 | ||
125 | %description clients | |
126 | The nfs-server-clients package contains the showmount program. | |
127 | Showmount queries the mount daemon on a remote host for information | |
128 | about the NFS (Network File System) server on the remote host. For | |
129 | example, showmount can display the clients which are mounted on that | |
130 | host. This package is not needed to mount NFS volumes. | |
131 | ||
132 | %description clients -l pl.UTF-8 | |
133 | Pakiet zawiera program showmount służący do odpytywania serwera NFS. | |
134 | Showmount pyta demona na zdalnej maszynie o informacje NFS na zdalnym | |
135 | hoście. Na przykład, showmount potrafi pokazać klientów, którzy są | |
136 | zamountowani na tym serwerze. Ten pakiet nie jest konieczny do | |
137 | zamountowania zasobów NFS. | |
138 | ||
139 | %package lock | |
140 | Summary: Programs for NFS file locking | |
141 | Summary(pl.UTF-8): Programy do obsługi blokowania plików poprzez NFS (lock) | |
142 | Group: Networking | |
143 | Requires(post,preun): /sbin/chkconfig | |
144 | Requires: rc-scripts | |
145 | Requires: rpcbind >= 0.1.7 | |
146 | Provides: group(rpcstatd) | |
147 | Provides: nfslockd | |
148 | Provides: user(rpcstatd) | |
149 | Obsoletes: knfsd-lock | |
150 | Obsoletes: nfslockd | |
151 | ||
152 | %description lock | |
153 | The nfs-lock pacage contains programs which support the NFS file lock. | |
154 | Install nfs-lock if you want to use file lock over NFS. | |
155 | ||
156 | %description lock -l pl.UTF-8 | |
157 | Ten pakiet zawiera programy umożliwiające wykonywanie blokowania | |
158 | plików (file locking) poprzez NFS. | |
159 | ||
160 | %package common | |
161 | Summary: Common programs for NFS | |
162 | Summary(pl.UTF-8): Wspólne programy do obsługi NFS | |
163 | Group: Networking | |
164 | Requires: libnfsidmap >= 0.21-3 | |
165 | Conflicts: mount < 2.13-0.pre7.1 | |
166 | ||
167 | %description common | |
168 | Common programs for NFS. | |
169 | ||
170 | %description common -l pl.UTF-8 | |
171 | Wspólne programy do obsługi NFS. | |
172 | ||
173 | %prep | |
174 | %setup -q -a1 | |
175 | %patch0 -p1 | |
176 | %patch1 -p1 | |
177 | %patch2 -p1 | |
178 | %patch3 -p1 | |
c1a7163e | 179 | %patch4 -p1 |
927aa100 | 180 | %patch5 -p1 |
042f4ecc JR |
181 | |
182 | %build | |
183 | %{__libtoolize} | |
184 | %{__aclocal} -I aclocal | |
185 | %{__autoconf} | |
186 | %{__autoheader} | |
187 | %{__automake} | |
188 | %configure \ | |
189 | --enable-nfsv3 \ | |
190 | --enable-nfsv4 \ | |
d1c5b6d6 | 191 | --enable-nfsv41 \ |
042f4ecc JR |
192 | --enable-gss \ |
193 | --enable-mount \ | |
d1c5b6d6 | 194 | --enable-mountconfig \ |
5ec77457 JR |
195 | %if %{with tirpc} |
196 | --enable-tirpc \ | |
042f4ecc | 197 | --enable-ipv6 \ |
5ec77457 JR |
198 | %else |
199 | --disable-tirpc \ | |
200 | --disable-ipv6 \ | |
201 | %endif | |
d1c5b6d6 | 202 | --with-statdpath=/var/lib/nfs/statd \ |
042f4ecc JR |
203 | --with-statedir=/var/lib/nfs \ |
204 | --with-statduser=rpcstatd \ | |
205 | --with-start-statd=%{_sbindir}/start-statd \ | |
206 | --with-tcp-wrappers \ | |
8001d84c | 207 | --with-krb5 |
042f4ecc JR |
208 | |
209 | %{__make} all | |
210 | ||
211 | %install | |
212 | rm -rf $RPM_BUILD_ROOT | |
69621933 | 213 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,sysconfig,exports.d} \ |
042f4ecc JR |
214 | $RPM_BUILD_ROOT%{_var}/lib/nfs/{rpc_pipefs,v4recovery} |
215 | ||
216 | %{__make} install \ | |
217 | DESTDIR=$RPM_BUILD_ROOT | |
218 | ||
d1c5b6d6 JR |
219 | install -p utils/mount/nfsmount.conf $RPM_BUILD_ROOT/etc |
220 | ||
042f4ecc JR |
221 | cat >$RPM_BUILD_ROOT%{_sbindir}/start-statd <<EOF |
222 | #!/bin/sh | |
223 | # mount.nfs calls this script when mounting a filesystem with locking | |
224 | # enabled, but when statd does not seem to be running (based on | |
225 | # /var/run/rpc.statd.pid). | |
226 | exec /sbin/service nfslock start | |
227 | EOF | |
228 | ||
229 | sed -e "s|#!/bin/bash|#!/bin/sh|" utils/gssd/gss_destroy_creds > $RPM_BUILD_ROOT%{_sbindir}/gss_destroy_creds | |
230 | ||
231 | mv $RPM_BUILD_ROOT%{_sbindir}/rpcdebug $RPM_BUILD_ROOT/sbin | |
232 | ||
233 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfs | |
234 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfslock | |
235 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfsfs | |
236 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/idmapd | |
237 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/gssd | |
238 | install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/svcgssd | |
239 | install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/nfsd | |
240 | install %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/nfslock | |
241 | install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/nfsfs | |
242 | ||
243 | > $RPM_BUILD_ROOT%{_var}/lib/nfs/rmtab | |
244 | > $RPM_BUILD_ROOT%{_sysconfdir}/exports | |
245 | ||
d1c5b6d6 | 246 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/rpc.{mountd,nfsd,statd,sm-notify,svcgssd,gssd,idmapd}.8 |
042f4ecc JR |
247 | echo ".so mountd.8" > $RPM_BUILD_ROOT%{_mandir}/man8/rpc.mountd.8 |
248 | echo ".so nfsd.8" > $RPM_BUILD_ROOT%{_mandir}/man8/rpc.nfsd.8 | |
249 | echo ".so statd.8" > $RPM_BUILD_ROOT%{_mandir}/man8/rpc.statd.8 | |
250 | echo ".so sm-notify.8" > $RPM_BUILD_ROOT%{_mandir}/man8/rpc.sm-notify.8 | |
251 | echo ".so gssd.8" > $RPM_BUILD_ROOT%{_mandir}/man8/rpc.gssd.8 | |
252 | echo ".so idmapd.8" > $RPM_BUILD_ROOT%{_mandir}/man8/rpc.idmapd.8 | |
253 | echo ".so svcgssd.8" > $RPM_BUILD_ROOT%{_mandir}/man8/rpc.svcgssd.8 | |
254 | ||
255 | touch $RPM_BUILD_ROOT/var/lib/nfs/xtab | |
256 | ||
257 | ln -sf /bin/true $RPM_BUILD_ROOT/sbin/fsck.nfs | |
258 | ||
259 | cp -a nfs html | |
260 | ||
261 | %clean | |
262 | rm -rf $RPM_BUILD_ROOT | |
263 | ||
264 | %post | |
265 | /sbin/chkconfig --add nfs | |
266 | %service nfs restart "NFS daemon" | |
267 | /sbin/chkconfig --add svcgssd | |
268 | %service svcgssd restart "RPC svcgssd" | |
269 | ||
270 | %preun | |
271 | if [ "$1" = "0" ]; then | |
272 | %service nfs stop | |
273 | /sbin/chkconfig --del nfs | |
274 | %service svcgssd stop | |
275 | /sbin/chkconfig --del svcgssd | |
276 | fi | |
277 | ||
278 | %post clients | |
279 | /sbin/chkconfig --add nfsfs | |
280 | %service nfsfs restart | |
281 | /sbin/chkconfig --add gssd | |
282 | %service gssd restart "RPC gssd" | |
283 | ||
284 | %preun clients | |
285 | if [ "$1" = "0" ]; then | |
286 | %service nfsfs stop | |
287 | /sbin/chkconfig --del nfsfs | |
288 | %service gssd stop | |
289 | /sbin/chkconfig --del gssd | |
290 | fi | |
291 | ||
292 | %pre lock | |
293 | %groupadd -g 191 rpcstatd | |
294 | %useradd -u 191 -d /var/lib/nfs/statd -s /bin/false -c "RPC statd user" -g rpcstatd rpcstatd | |
295 | ||
296 | %post lock | |
297 | /sbin/chkconfig --add nfslock | |
298 | %service nfslock restart "RPC statd" | |
299 | ||
300 | %preun lock | |
301 | if [ "$1" = "0" ]; then | |
302 | %service nfslock stop | |
303 | /sbin/chkconfig --del nfslock | |
304 | fi | |
305 | ||
306 | %postun lock | |
307 | if [ "$1" = "0" ]; then | |
308 | %userremove rpcstatd | |
309 | %groupremove rpcstatd | |
310 | fi | |
311 | ||
312 | %post common | |
313 | /sbin/chkconfig --add idmapd | |
314 | %service idmapd restart "RPC idmapd" | |
315 | ||
316 | %preun common | |
317 | if [ "$1" = "0" ]; then | |
318 | %service idmapd stop | |
319 | /sbin/chkconfig --del idmapd | |
320 | fi | |
321 | ||
322 | %triggerpostun -- %{name} < 1.1.0-0.rc1.1 | |
323 | /sbin/chkconfig nfs reset | |
324 | /sbin/chkconfig svcgssd reset | |
325 | ||
326 | %triggerpostun lock -- %{name}-lock < 1.1.0-0.rc1.1 | |
327 | /sbin/chkconfig nfslock reset | |
328 | ||
329 | %triggerpostun clients -- %{name}-clients < 1.1.0-0.rc1.1 | |
330 | if [ -f /etc/sysconfig/nfsclient.rpmsave ]; then | |
331 | mv -f /etc/sysconfig/nfsfs{,.rpmnew} | |
332 | mv -f /etc/sysconfig/nfsclient.rpmsave /etc/sysconfig/nfsfs | |
333 | fi | |
334 | /sbin/chkconfig nfsfs reset | |
335 | /sbin/chkconfig gssd reset | |
336 | ||
337 | %triggerpostun common -- %{name}-common < 1.1.0-0.rc1.1 | |
338 | /sbin/chkconfig idmapd reset | |
339 | ||
340 | %files | |
341 | %defattr(644,root,root,755) | |
342 | %doc ChangeLog README html | |
343 | %attr(755,root,root) /sbin/rpcdebug | |
344 | %attr(755,root,root) /sbin/fsck.nfs | |
345 | %attr(755,root,root) %{_sbindir}/exportfs | |
346 | %attr(755,root,root) %{_sbindir}/rpc.mountd | |
347 | %attr(755,root,root) %{_sbindir}/rpc.nfsd | |
348 | %attr(755,root,root) %{_sbindir}/rpc.svcgssd | |
349 | %attr(755,root,root) %{_sbindir}/nfsstat | |
350 | ||
351 | %attr(754,root,root) /etc/rc.d/init.d/nfs | |
352 | %attr(754,root,root) /etc/rc.d/init.d/svcgssd | |
353 | ||
354 | %attr(664,root,fileshare) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/exports | |
974d2ecb JR |
355 | %dir %{_sysconfdir}/exports.d |
356 | ||
042f4ecc JR |
357 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/nfsd |
358 | %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/nfs/xtab | |
359 | %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/nfs/etab | |
360 | %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/nfs/rmtab | |
361 | ||
362 | %{_mandir}/man5/exports.5* | |
363 | %{_mandir}/man7/nfsd.7* | |
364 | %{_mandir}/man8/exportfs.8* | |
365 | %{_mandir}/man8/mountd.8* | |
366 | %{_mandir}/man8/nfsd.8* | |
367 | %{_mandir}/man8/nfsstat.8* | |
368 | %{_mandir}/man8/rpc.mountd.8* | |
369 | %{_mandir}/man8/rpc.nfsd.8* | |
370 | %{_mandir}/man8/rpc.svcgssd.8* | |
371 | %{_mandir}/man8/rpcdebug.8* | |
372 | %{_mandir}/man8/svcgssd.8* | |
373 | ||
374 | %files lock | |
375 | %defattr(644,root,root,755) | |
376 | %attr(700,rpcstatd,rpcstatd) %dir %{_var}/lib/nfs/statd | |
377 | %attr(700,rpcstatd,rpcstatd) %dir %{_var}/lib/nfs/statd/sm | |
378 | %attr(700,rpcstatd,rpcstatd) %dir %{_var}/lib/nfs/statd/sm.bak | |
379 | %attr(600,rpcstatd,rpcstatd) %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/nfs/statd/state | |
380 | %attr(755,root,root) %{_sbindir}/rpc.statd | |
381 | %attr(755,root,root) %{_sbindir}/sm-notify | |
382 | %attr(755,root,root) %{_sbindir}/start-statd | |
383 | %attr(754,root,root) /etc/rc.d/init.d/nfslock | |
384 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/nfslock | |
385 | %{_mandir}/man8/rpc.sm-notify.8* | |
386 | %{_mandir}/man8/rpc.statd.8* | |
387 | %{_mandir}/man8/sm-notify.8* | |
388 | %{_mandir}/man8/statd.8* | |
389 | ||
390 | %files clients | |
391 | %defattr(644,root,root,755) | |
392 | %attr(754,root,root) /etc/rc.d/init.d/nfsfs | |
393 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/nfsfs | |
d1c5b6d6 | 394 | %attr(664,root,fileshare) %config(noreplace) %verify(not md5 mtime size) /etc/nfsmount.conf |
042f4ecc JR |
395 | %attr(4755,root,root) /sbin/mount.nfs |
396 | %attr(4755,root,root) /sbin/umount.nfs | |
397 | %attr(4755,root,root) /sbin/mount.nfs4 | |
398 | %attr(4755,root,root) /sbin/umount.nfs4 | |
399 | %attr(755,root,root) %{_sbindir}/mountstats | |
400 | %attr(755,root,root) %{_sbindir}/nfsiostat | |
401 | %attr(755,root,root) %{_sbindir}/showmount | |
402 | %attr(755,root,root) %{_sbindir}/rpc.gssd | |
403 | %attr(754,root,root) /etc/rc.d/init.d/gssd | |
d1c5b6d6 | 404 | %{_mandir}/man5/nfsmount.conf.5* |
042f4ecc JR |
405 | %{_mandir}/man8/gssd.8* |
406 | %{_mandir}/man8/mount.nfs.8* | |
407 | %{_mandir}/man8/mountstats.8* | |
408 | %{_mandir}/man8/nfsiostat.8* | |
409 | %{_mandir}/man8/rpc.gssd.8* | |
410 | %{_mandir}/man8/showmount.8* | |
411 | %{_mandir}/man8/umount.nfs.8* | |
412 | ||
413 | %files common | |
414 | %defattr(644,root,root,755) | |
415 | %attr(755,root,root) %{_sbindir}/gss_clnt_send_err | |
416 | %attr(755,root,root) %{_sbindir}/gss_destroy_creds | |
fba6fbdd | 417 | %attr(755,root,root) %{_sbindir}/nfsidmap |
042f4ecc JR |
418 | %attr(755,root,root) %{_sbindir}/rpc.idmapd |
419 | %attr(754,root,root) /etc/rc.d/init.d/idmapd | |
420 | %dir %{_var}/lib/nfs | |
421 | %dir %{_var}/lib/nfs/rpc_pipefs | |
422 | %dir %{_var}/lib/nfs/v4recovery | |
423 | %{_mandir}/man5/nfs.5* | |
424 | %{_mandir}/man8/idmapd.8* | |
fba6fbdd | 425 | %{_mandir}/man8/nfsidmap.8* |
042f4ecc | 426 | %{_mandir}/man8/rpc.idmapd.8* |