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