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