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