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