]> git.pld-linux.org Git - packages/nfs-utils.git/blob - nfs-utils.spec
- add todo: /proc/fs/nfsd is left mounted when package is erased
[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 #
7 Summary:        Kernel NFS server
8 Summary(pl):    Dzia³aj±cy na poziomie j±dra serwer NFS
9 Summary(pt_BR): Os utilitários para o cliente e servidor NFS do Linux
10 Summary(ru):    õÔÉÌÉÔÙ ÄÌÑ NFS É ÄÅÍÏÎÙ ÐÏÄÄÅÒÖËÉ ÄÌÑ NFS-ÓÅÒ×ÅÒÁ ÑÄÒÁ
11 Summary(uk):    õÔÉ̦ÔÉ ÄÌÑ NFS ÔÁ ÄÅÍÏÎɠЦÄÔÒÉÍËÉ ÄÌÑ NFS-ÓÅÒ×ÅÒÁ ÑÄÒÁ
12 Name:           nfs-utils
13 Version:        1.0.7
14 Release:        4
15 License:        GPL
16 Group:          Networking/Daemons
17 Source0:        http://dl.sourceforge.net/nfs/%{name}-%{version}.tar.gz
18 # Source0-md5:  8f863120261cd572ad320a9152581e11
19 Source1:        ftp://ftp.linuxnfs.sourceforge.org/pub/nfs/nfs.doc.tar.gz
20 # Source1-md5:  ae7db9c61c5ad04f83bb99e5caed73da
21 Source2:        nfs.init
22 Source3:        nfslock.init
23 Source4:        rquotad.init
24 Source5:        nfs.sysconfig
25 Source6:        nfslock.sysconfig
26 Source7:        rquotad.sysconfig
27 Source8:        nfsfs.init
28 Patch0:         %{name}-paths.patch
29 Patch1:         %{name}-time.patch
30 Patch2:         %{name}-eepro-support.patch
31 Patch3:         %{name}-install.patch
32 Patch4:         %{name}-nolibs.patch
33 Patch5:         %{name}-usn36.patch
34 Patch6:         http://www.citi.umich.edu/projects/nfsv4/linux/nfs-utils-patches/1.0.7-2/nfs-utils-1.0.7-CITI_NFS4_ALL-2.dif
35 Patch7:         %{name}-heimdal-internals.patch
36 Patch8:         %{name}-rquotad-curblocks.patch
37 URL:            http://nfs.sourceforge.net/
38 BuildRequires:  autoconf
39 %if %{with nfs4}
40 BuildRequires:  heimdal-devel >= 0.7
41 BuildRequires:  libevent-devel
42 BuildRequires:  librpcsecgss-devel
43 BuildRequires:  nfsidmap-devel
44 %endif
45 BuildRequires:  libwrap-devel
46 PreReq:         rc-scripts >= 0.4.0
47 PreReq:         setup >= 2.4.6-7
48 Requires:       %{name}-common = %{version}-%{release}
49 Requires(post,preun):   /sbin/chkconfig
50 Requires(post): fileutils
51 Requires(post): sed
52 Requires:       portmap >= 4.0
53 Provides:       nfsdaemon
54 Obsoletes:      nfsdaemon
55 Obsoletes:      knfsd
56 Obsoletes:      nfs-server
57 Conflicts:      kernel < 2.2.5
58 ExcludeArch:    armv4l
59 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60
61 %description
62 This is the *new* kernel NFS server and related tools. It provides a
63 much higher level of performance than the traditional Linux user-land
64 NFS server.
65
66 %description -l pl
67 To jest *nowy* dzia³aj±cy na poziomie j±dra serwer NFS oraz zwi±zane z
68 nim narzêdzia. Serwer ten dostarcza znacznie wiêksz± wydajno¶æ ni¿
69 tradycyjny, dzia³aj±cy na poziomie u¿ytkownika serwer NFS.
70
71 %description -l pt_BR
72 O pacote nfs-utils provê os utilitários para o cliente e servidor NFS
73 do Linux.
74
75 %description -l ru
76 ðÁËÅÔ nfs-utils ÐÒÅÄÏÓÔÁ×ÌÑÅÔ ÄÅÍÏÎÁ ÄÌÑ NFS-ÓÅÒ×ÅÒÁ, ×ËÌÀÞÅÎÎÏÇÏ ×
77 ÑÄÒÏ, É ÓÏÐÕÔÓÔ×ÕÀÝÉÅ ÕÔÉÌÉÔÙ, ËÏÔÏÒÙÅ ÏÂÅÓÐÅÞÉ×ÁÀÔ ÎÁÍÎÏÇÏ ÂÏÌØÛÕÀ
78 ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔØ, ÞÅÍ ÔÒÁÄÉÃÉÏÎÎÙÅ Linux NFS-ÓÅÒ×ÅÒÁ, ÉÓÐÏÌØÚÕÅÍÙÅ
79 ÂÏÌØÛÉÎÓÔ×ÏÍ ÐÏÌØÚÏ×ÁÔÅÌÅÊ.
80
81 %description -l uk
82 ðÁËÅÔ nfs-utils ÎÁÄÁ¤ ÄÅÍÏÎÁ ÄÌÑ NFS-ÓÅÒ×ÅÒÁ, ×ÂÕÄÏ×ÁÎÏÇÏ × ÑÄÒÏ, ÔÁ
83 ÓÕÐÕÔΦ ÕÔÉ̦ÔÉ, Ñ˦ ÚÁÂÅÚÐÅÞÕÀÔØ ÎÁÂÁÇÁÔϠ¦ÌØÛÕ ÐÒÏÄÕËÔÉ×ΦÓÔØ, Î¦Ö
84 ÔÒÁÄÉæÊΦ Linux NFS-ÓÅÒ×ÅÒÉ, Ñ˦ ×ÉËÏÒÉÓÔÏ×Õ¤ Â¦ÌØÛ¦ÓÔØ ËÏÒÉÓÔÕ×ÁÞ¦×.
85
86 %package clients
87 Summary:        Clients for connecting to a remote NFS server
88 Summary(pl):    Klienci do ³±czenia siê ze zdalnym serwerem NFS
89 Group:          Networking
90 PreReq:         rc-scripts
91 Requires(post,preun):   /sbin/chkconfig
92 Requires:       psmisc
93 Requires:       %{name}-common = %{version}-%{release}
94 Provides:       nfsclient
95 Provides:       nfs-server-clients
96 Obsoletes:      nfsclient
97 Obsoletes:      nfs-server-clients
98 Obsoletes:      knfsd-clients
99
100 %description clients
101 The nfs-server-clients package contains the showmount program.
102 Showmount queries the mount daemon on a remote host for information
103 about the NFS (Network File System) server on the remote host. For
104 example, showmount can display the clients which are mounted on that
105 host. This package is not needed to mount NFS volumes.
106
107 %description clients -l pl
108 Pakiet zawiera program showmount s³u¿±cy do odpytywania serwera NFS.
109 Showmount pyta demona na zdalnej maszynie o informacje NFS na zdalnym
110 ho¶cie. Na przyk³ad, showmount potrafi pokazaæ klientów, którzy s±
111 zamountowani na tym serwerze. Ten pakiet nie jest konieczny do
112 zamountowania zasobów NFS.
113
114 %package lock
115 Summary:        Programs for NFS file locking
116 Summary(pl):    Programy do obs³ugi blokowania plików poprzez NFS (lock)
117 Group:          Networking
118 PreReq:         rc-scripts
119 Requires(post,preun):   /sbin/chkconfig
120 #Requires:      kernel >= 2.2.5
121 Requires:       portmap >= 4.0
122 Provides:       nfslockd
123 Obsoletes:      nfslockd
124 Obsoletes:      knfsd-lock
125
126 %description lock
127 The nfs-lock pacage contains programs which support the NFS file lock.
128 Install nfs-lock if you want to use file lock over NFS.
129
130 %description lock -l pl
131 Ten pakiet zawiera programy umo¿liwiaj±ce wykonywanie blokowania
132 plików (file locking) poprzez NFS.
133
134 %package rquotad
135 Summary:        Remote quota server
136 Summary(pl):    Zdalny serwer quota
137 Group:          Networking/Daemons
138 PreReq:         rc-scripts
139 Requires(post,preun):   /sbin/chkconfig
140 Obsoletes:      quota-rquotad
141
142 %description rquotad
143 rquotad is an rpc(3N) server which returns quotas for a user of a
144 local file system which is mounted by a remote machine over the NFS.
145 The results are used by quota(1) to display user quotas for remote
146 file systems.
147
148 %description rquotad -l pl
149 rquotad jest serverem rpc(3N), który zwraca quoty u¿ytkownika
150 lokalnego systemu plików, który jest zamountowany przez zdaln± maszynê
151 poprzez NFS. Rezultaty s± u¿ywane przez quota(1), aby wy¶wietliæ quotê
152 dla zdalnego systemu plików.
153
154 %package common
155 Summary:        Common programs for NFS
156 Summary(pl):    Wspólne programy do obs³ugi NFS
157 Group:          Networking
158
159 %description common
160 Common programs for NFS.
161
162 %description common -l pl
163 Wspólne programy do obs³ugi NFS.
164
165 %prep
166 %setup -q -a1
167 %patch0 -p1
168 %patch1 -p1
169 %patch2 -p1
170 %patch3 -p1
171 %patch4 -p1
172 %patch5 -p1
173 %patch6 -p1
174 %patch7 -p1
175 %patch8 -p1
176
177 chmod u+w configure
178
179 %build
180 %if "%{_lib}" == "lib64"
181 sed -i -e 's#/lib/#/%{_lib}/#g' configure.in
182 %endif
183 sed -i -e 's#libroken.a#libroken.so#g' configure.in
184 %{__autoconf}
185 %configure \
186 %if %{with nfs4}
187         --enable-nfsv4 \
188         --enable-gss \
189         --with-krb5=%{_prefix} \
190 %else
191         --disable-gss \
192         --disable-nfsv4 \
193 %endif
194         --enable-nfsv3 \
195         --enable-secure-statd \
196         --with-statedir=/var/lib/nfs
197 %{__make} all
198
199 %install
200 rm -rf $RPM_BUILD_ROOT
201 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_mandir}/man{5,8}} \
202         $RPM_BUILD_ROOT{%{_sysconfdir}/{rc.d/init.d,sysconfig},%{_var}/lib/nfs/{rpc_pipefs,v4recovery}}
203
204 %{__make} install \
205         install_prefix=$RPM_BUILD_ROOT
206
207 install utils/idmapd/idmapd.conf        $RPM_BUILD_ROOT/etc
208 install tools/rpcdebug/rpcdebug $RPM_BUILD_ROOT/sbin
209 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfs
210 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfslock
211 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/rquotad
212 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfsfs
213 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/nfsd
214 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/nfslock
215 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/rquotad
216
217 > $RPM_BUILD_ROOT%{_var}/lib/nfs/rmtab
218 > $RPM_BUILD_ROOT%{_sysconfdir}/exports
219
220 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/rpc.{mountd,nfsd,rquotad,statd,lockd,gssd,idmapd,svcgssd}.8
221 rm -f $RPM_BUILD_ROOT%{_mandir}/man5/rpc.idmapd.conf.5
222 echo ".so lockd.8"   >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.lockd.8
223 echo ".so mountd.8"  >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.mountd.8
224 echo ".so nfsd.8"    >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.nfsd.8
225 echo ".so rquotad.8" >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.rquotad.8
226 echo ".so statd.8"   >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.statd.8
227 %if %{with nfs4}
228 echo ".so gssd.8"    >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.gssd.8
229 echo ".so idmapd.8"  >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.idmapd.8
230 echo ".so svcgssd.8" >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.svcgssd.8
231 echo ".so idmapd.conf.5" > $RPM_BUILD_ROOT%{_mandir}/man5/rpc.idmapd.conf.5
232 %endif
233
234 touch $RPM_BUILD_ROOT/var/lib/nfs/xtab
235
236 ln -sf /bin/true $RPM_BUILD_ROOT/sbin/fsck.nfs
237
238 cp -a nfs nfs-copy
239 mv -f nfs-copy/*.ps ./
240 mv -f nfs-copy html
241
242 %clean
243 rm -rf $RPM_BUILD_ROOT
244
245 %post
246 /sbin/chkconfig --add nfs
247 if [ -r /var/lock/subsys/nfs ]; then
248         /etc/rc.d/init.d/nfs restart >&2
249 else
250         echo "Run \"/etc/rc.d/init.d/nfs start\" to start NFS daemon."
251 fi
252 umask 022
253 sed -e 's/NFSDTYPE=.*/NFSDTYPE=K/' /etc/sysconfig/nfsd > /etc/sysconfig/nfsd.new
254 mv -f /etc/sysconfig/nfsd.new /etc/sysconfig/nfsd
255
256 %preun
257 if [ "$1" = "0" ]; then
258         if [ -r /var/lock/subsys/nfs ]; then
259                 /etc/rc.d/init.d/nfs stop >&2
260         fi
261         /sbin/chkconfig --del nfs
262 fi
263
264 %post clients
265 /sbin/chkconfig --add nfsfs
266 if [ -r /var/lock/subsys/nfsfs ]; then
267         /etc/rc.d/init.d/nfsfs restart >&2
268 else
269         echo "Run \"/etc/rc.d/init.d/nfsfs start\" to mount all NFS volumes."
270 fi
271
272 %preun clients
273 if [ "$1" = "0" ]; then
274         if [ -r /var/lock/subsys/nfsfs ]; then
275                 /etc/rc.d/init.d/nfsfs stop >&2
276         fi
277         /sbin/chkconfig --del nfsfs
278 fi
279
280 %post lock
281 /sbin/chkconfig --add nfslock
282 if [ -r /var/lock/subsys/nfslock ]; then
283         /etc/rc.d/init.d/nfslock restart >&2
284 else
285         echo "Run \"/etc/rc.d/init.d/nfslock start\" to start nfslock daemon."
286 fi
287
288 %preun lock
289 if [ "$1" = "0" ]; then
290         if [ -r /var/lock/subsys/nfslock ]; then
291                 /etc/rc.d/init.d/nfslock stop >&2
292         fi
293         /sbin/chkconfig --del nfslock
294 fi
295
296 %post rquotad
297 /sbin/chkconfig --add rquotad
298 if [ -r /var/lock/subsys/rquotad ]; then
299         /etc/rc.d/init.d/rquotad restart >&2
300 else
301         echo "Run \"/etc/rc.d/init.d/rquotad start\" to start NFS quota daemon."
302 fi
303
304 %preun rquotad
305 if [ "$1" = "0" ]; then
306         if [ -r /var/lock/subsys/rquotad ]; then
307                 /etc/rc.d/init.d/rquotad stop >&2
308         fi
309         /sbin/chkconfig --del rquotad
310 fi
311
312 %files
313 %defattr(644,root,root,755)
314 %doc ChangeLog README *.ps html
315 %attr(755,root,root) /sbin/rpcdebug
316 %attr(755,root,root) /sbin/fsck.nfs
317 %attr(755,root,root) %{_sbindir}/exportfs
318 %attr(755,root,root) %{_sbindir}/rpc.mountd
319 %attr(755,root,root) %{_sbindir}/rpc.nfsd
320 %attr(755,root,root) %{_sbindir}/nfsstat
321 %attr(755,root,root) %{_sbindir}/nhfsgraph
322 %attr(755,root,root) %{_sbindir}/nhfsnums
323 %attr(755,root,root) %{_sbindir}/nhfsrun
324 %attr(755,root,root) %{_sbindir}/nhfsstone
325
326 %attr(754,root,root) /etc/rc.d/init.d/nfs
327
328 %attr(664,root,fileshare) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/exports
329 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/nfsd
330 %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/nfs/xtab
331 %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/nfs/etab
332 %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/nfs/rmtab
333
334 %{_mandir}/man5/exports.5*
335 %{_mandir}/man7/nfsd.7*
336 %{_mandir}/man8/exportfs.8*
337 %{_mandir}/man8/mountd.8*
338 %{_mandir}/man8/nhfsgraph.8*
339 %{_mandir}/man8/nhfsnums.8*
340 %{_mandir}/man8/nhfsrun.8*
341 %{_mandir}/man8/nhfsstone.8*
342 %{_mandir}/man8/nfsd.8*
343 %{_mandir}/man8/nfsstat.8*
344 %{_mandir}/man8/rpc.mountd.8*
345 %{_mandir}/man8/rpc.nfsd.8*
346
347 %if %{with nfs4}
348 %attr(755,root,root) %{_sbindir}/rpc.svcgssd
349 %{_mandir}/man8/*svcgss*
350 %endif
351
352 %files lock
353 %defattr(644,root,root,755)
354 %attr(755,root,root) %{_sbindir}/rpc.lockd
355 %attr(755,root,root) %{_sbindir}/rpc.statd
356 %attr(754,root,root) /etc/rc.d/init.d/nfslock
357 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/nfslock
358 %{_mandir}/man8/rpc.lockd.8*
359 %{_mandir}/man8/lockd.8*
360 %{_mandir}/man8/rpc.statd.8*
361 %{_mandir}/man8/statd.8*
362 %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/nfs/state
363
364 %files clients
365 %defattr(644,root,root,755)
366 %attr(754,root,root) /etc/rc.d/init.d/nfsfs
367 %attr(755,root,root) %{_sbindir}/showmount
368 %{_mandir}/man8/showmount.8*
369
370 %if %{with nfs4}
371 %attr(755,root,root) %{_sbindir}/rpc.gssd
372 %{_mandir}/man8/rpc.gssd*
373 %{_mandir}/man8/gssd*
374 %endif
375
376
377 #%files rquotad
378 #%defattr(644,root,root,755)
379 #%attr(755,root,root) %{_sbindir}/rpc.rquotad
380 #%attr(754,root,root) /etc/rc.d/init.d/rquotad
381 #%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rquotad
382 #%%{_mandir}/man8/rpc.rquotad.8*
383
384 %files common
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %dir %{_var}/lib/nfs
387 %attr(755,root,root) %dir %{_var}/lib/nfs/rpc_pipefs
388 %attr(755,root,root) %dir %{_var}/lib/nfs/v4recovery
389 %if %{with nfs4}
390 %attr(755,root,root) %{_sbindir}/rpc.idmapd
391 %attr(660,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/idmapd.conf
392 %{_mandir}/man[58]/*idmap*
393 %endif
This page took 0.063273 seconds and 4 git commands to generate.