]> git.pld-linux.org Git - packages/nfs-utils.git/blob - nfs-utils.spec
- new common subpackage used by clients and servers
[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 Requires:       %{name}-common = %{version}-%{release}
41 %endif
42 BuildRequires:  libwrap-devel
43 PreReq:         rc-scripts >= 0.4.0
44 PreReq:         setup >= 2.4.6-7
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 %if %{with nfs4}
90 Requires:       %{name}-common = %{version}-%{release}
91 %endif
92 Provides:       nfsclient
93 Provides:       nfs-server-clients
94 Obsoletes:      nfsclient
95 Obsoletes:      nfs-server-clients
96 Obsoletes:      knfsd-clients
97
98 %description clients
99 The nfs-server-clients package contains the showmount program.
100 Showmount queries the mount daemon on a remote host for information
101 about the NFS (Network File System) server on the remote host. For
102 example, showmount can display the clients which are mounted on that
103 host. This package is not needed to mount NFS volumes.
104
105 %description clients -l pl
106 Pakiet zawiera program showmount s³u¿±cy do odpytywania serwera NFS.
107 Showmount pyta demona na zdalnej maszynie o informacje NFS na zdalnym
108 ho¶cie. Na przyk³ad, showmount potrafi pokazaæ klientów, którzy s±
109 zamountowani na tym serwerze. Ten pakiet nie jest konieczny do
110 zamountowania zasobów NFS.
111
112 %package lock
113 Summary:        Programs for NFS file locking
114 Summary(pl):    Programy do obs³ugi blokowania plików poprzez NFS (lock)
115 Group:          Networking
116 PreReq:         rc-scripts
117 Requires(post,preun):   /sbin/chkconfig
118 #Requires:      kernel >= 2.2.5
119 Requires:       portmap >= 4.0
120 Provides:       nfslockd
121 Obsoletes:      nfslockd
122 Obsoletes:      knfsd-lock
123
124 %description lock
125 The nfs-lock pacage contains programs which support the NFS file lock.
126 Install nfs-lock if you want to use file lock over NFS.
127
128 %description lock -l pl
129 Ten pakiet zawiera programy umo¿liwiaj±ce wykonywanie blokowania
130 plików (file locking) poprzez NFS.
131
132 %package rquotad
133 Summary:        Remote quota server
134 Summary(pl):    Zdalny serwer quota
135 Group:          Networking/Daemons
136 PreReq:         rc-scripts
137 Requires(post,preun):   /sbin/chkconfig
138 Obsoletes:      quota-rquotad
139
140 %description rquotad
141 rquotad is an rpc(3N) server which returns quotas for a user of a
142 local file system which is mounted by a remote machine over the NFS.
143 The results are used by quota(1) to display user quotas for remote
144 file systems.
145
146 %description rquotad -l pl
147 rquotad jest serverem rpc(3N), który zwraca quoty u¿ytkownika
148 lokalnego systemu plików, który jest zamountowany przez zdaln± maszynê
149 poprzez NFS. Rezultaty s± u¿ywane przez quota(1), aby wy¶wietliæ quotê
150 dla zdalnego systemu plików.
151
152 %package common
153 Summary:        Common programs for NFS
154 Summary(pl):    Wspólne programy do obs³ugi NFS
155 Group:          Networking
156
157 %description common
158 Common programs for NFS.
159
160 %description common -l pl
161 Wspólne programy do obs³ugi NFS.
162
163 %prep
164 %setup -q -a1
165 %patch0 -p1
166 %patch1 -p1
167 %patch2 -p1
168 %patch3 -p1
169 %patch4 -p1
170 %patch5 -p1
171 %patch6 -p1
172
173 chmod u+w configure
174
175 %build
176 %if "%{_lib}" == "lib64"
177 sed -i -e 's#/lib/#/%{_lib}/#g' configure.in
178 %endif
179 sed -i -e 's#libroken.a#libroken.so#g' configure.in
180 %{__autoconf}
181 %configure \
182 %if %{with nfs4}
183         --enable-nfsv4 \
184         --enable-gss \
185         --with-krb5=%{_prefix} \
186 %else
187         --disable-gss \
188         --disable-nfsv4 \
189 %endif
190         --enable-nfsv3 \
191         --enable-secure-statd \
192         --with-statedir=/var/lib/nfs
193 %{__make} all
194
195 %install
196 rm -rf $RPM_BUILD_ROOT
197 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_mandir}/man{5,8}} \
198         $RPM_BUILD_ROOT{%{_sysconfdir}/{rc.d/init.d,sysconfig},%{_var}/lib/nfs/rpc_pipefs}
199
200 %{__make} install \
201         install_prefix=$RPM_BUILD_ROOT
202
203 install utils/idmapd/idmapd.conf        $RPM_BUILD_ROOT/etc
204 install tools/rpcdebug/rpcdebug $RPM_BUILD_ROOT/sbin
205 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfs
206 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfslock
207 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/rquotad
208 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfsfs
209 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/nfsd
210 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/nfslock
211 install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/rquotad
212
213 > $RPM_BUILD_ROOT%{_var}/lib/nfs/rmtab
214 > $RPM_BUILD_ROOT%{_sysconfdir}/exports
215
216 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/rpc.{mountd,nfsd,rquotad,statd,lockd,gssd,idmapd,svcgssd}.8
217 rm -f $RPM_BUILD_ROOT%{_mandir}/man5/rpc.idmapd.conf.5
218 echo ".so lockd.8"   >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.lockd.8
219 echo ".so mountd.8"  >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.mountd.8
220 echo ".so nfsd.8"    >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.nfsd.8
221 echo ".so rquotad.8" >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.rquotad.8
222 echo ".so statd.8"   >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.statd.8
223 %if %{with nfs4}
224 echo ".so gssd.8"    >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.gssd.8
225 echo ".so idmapd.8"  >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.idmapd.8
226 echo ".so svcgssd.8" >  $RPM_BUILD_ROOT%{_mandir}/man8/rpc.svcgssd.8
227 echo ".so idmapd.conf.5" > $RPM_BUILD_ROOT%{_mandir}/man5/rpc.idmapd.conf.5
228 %endif
229
230 touch $RPM_BUILD_ROOT/var/lib/nfs/xtab
231
232 ln -sf /bin/true $RPM_BUILD_ROOT/sbin/fsck.nfs
233
234 cp -a nfs nfs-copy
235 mv -f nfs-copy/*.ps ./
236 mv -f nfs-copy html
237
238 %clean
239 rm -rf $RPM_BUILD_ROOT
240
241 %post
242 /sbin/chkconfig --add nfs
243 if [ -r /var/lock/subsys/nfs ]; then
244         /etc/rc.d/init.d/nfs restart >&2
245 else
246         echo "Run \"/etc/rc.d/init.d/nfs start\" to start NFS daemon."
247 fi
248 umask 022
249 sed -e 's/NFSDTYPE=.*/NFSDTYPE=K/' /etc/sysconfig/nfsd > /etc/sysconfig/nfsd.new
250 mv -f /etc/sysconfig/nfsd.new /etc/sysconfig/nfsd
251
252 %preun
253 if [ "$1" = "0" ]; then
254         if [ -r /var/lock/subsys/nfs ]; then
255                 /etc/rc.d/init.d/nfs stop >&2
256         fi
257         /sbin/chkconfig --del nfs
258 fi
259
260 %post clients
261 /sbin/chkconfig --add nfsfs
262 if [ -r /var/lock/subsys/nfsfs ]; then
263         /etc/rc.d/init.d/nfsfs restart >&2
264 else
265         echo "Run \"/etc/rc.d/init.d/nfsfs start\" to mount all NFS volumes."
266 fi
267
268 %preun clients
269 if [ "$1" = "0" ]; then
270         if [ -r /var/lock/subsys/nfsfs ]; then
271                 /etc/rc.d/init.d/nfsfs stop >&2
272         fi
273         /sbin/chkconfig --del nfsfs
274 fi
275
276 %post lock
277 /sbin/chkconfig --add nfslock
278 if [ -r /var/lock/subsys/nfslock ]; then
279         /etc/rc.d/init.d/nfslock restart >&2
280 else
281         echo "Run \"/etc/rc.d/init.d/nfslock start\" to start nfslock daemon."
282 fi
283
284 %preun lock
285 if [ "$1" = "0" ]; then
286         if [ -r /var/lock/subsys/nfslock ]; then
287                 /etc/rc.d/init.d/nfslock stop >&2
288         fi
289         /sbin/chkconfig --del nfslock
290 fi
291
292 %post rquotad
293 /sbin/chkconfig --add rquotad
294 if [ -r /var/lock/subsys/rquotad ]; then
295         /etc/rc.d/init.d/rquotad restart >&2
296 else
297         echo "Run \"/etc/rc.d/init.d/rquotad start\" to start NFS quota daemon."
298 fi
299
300 %preun rquotad
301 if [ "$1" = "0" ]; then
302         if [ -r /var/lock/subsys/rquotad ]; then
303                 /etc/rc.d/init.d/rquotad stop >&2
304         fi
305         /sbin/chkconfig --del rquotad
306 fi
307
308 %files
309 %defattr(644,root,root,755)
310 %doc ChangeLog README *.ps html
311 %attr(755,root,root) /sbin/rpcdebug
312 %attr(755,root,root) /sbin/fsck.nfs
313 %attr(755,root,root) %{_sbindir}/exportfs
314 %attr(755,root,root) %{_sbindir}/rpc.mountd
315 %attr(755,root,root) %{_sbindir}/rpc.nfsd
316 %attr(755,root,root) %{_sbindir}/nfsstat
317 %attr(755,root,root) %{_sbindir}/nhfsgraph
318 %attr(755,root,root) %{_sbindir}/nhfsnums
319 %attr(755,root,root) %{_sbindir}/nhfsrun
320 %attr(755,root,root) %{_sbindir}/nhfsstone
321
322 %attr(754,root,root) /etc/rc.d/init.d/nfs
323
324 %attr(755,root,root) %dir %{_var}/lib/nfs
325 %attr(755,root,root) %dir %{_var}/lib/nfs/rpc_pipefs
326
327 %attr(664,root,fileshare) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/exports
328 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/nfsd
329 %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/nfs/xtab
330 %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/nfs/etab
331 %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/nfs/rmtab
332
333 %{_mandir}/man5/exports.5*
334 %{_mandir}/man7/nfsd.7*
335 %{_mandir}/man8/exportfs.8*
336 %{_mandir}/man8/mountd.8*
337 %{_mandir}/man8/nhfsgraph.8*
338 %{_mandir}/man8/nhfsnums.8*
339 %{_mandir}/man8/nhfsrun.8*
340 %{_mandir}/man8/nhfsstone.8*
341 %{_mandir}/man8/nfsd.8*
342 %{_mandir}/man8/nfsstat.8*
343 %{_mandir}/man8/rpc.mountd.8*
344 %{_mandir}/man8/rpc.nfsd.8*
345
346 %if %{with nfs4}
347 %attr(755,root,root) %{_sbindir}/rpc.svcgssd
348 %{_mandir}/man8/*svcgss*
349 %endif
350
351 %files lock
352 %defattr(644,root,root,755)
353 %attr(755,root,root) %{_sbindir}/rpc.lockd
354 %attr(755,root,root) %{_sbindir}/rpc.statd
355 %attr(754,root,root) /etc/rc.d/init.d/nfslock
356 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/nfslock
357 %{_mandir}/man8/rpc.lockd.8*
358 %{_mandir}/man8/lockd.8*
359 %{_mandir}/man8/rpc.statd.8*
360 %{_mandir}/man8/statd.8*
361 %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/nfs/state
362
363 %files clients
364 %defattr(644,root,root,755)
365 %attr(754,root,root) /etc/rc.d/init.d/nfsfs
366 %attr(755,root,root) %{_sbindir}/showmount
367 %{_mandir}/man8/showmount.8*
368
369 %if %{with nfs4}
370 %attr(755,root,root) %{_sbindir}/rpc.gssd
371 %{_mandir}/man8/rpc.gssd*
372 %{_mandir}/man8/gssd*
373 %endif
374
375
376 #%files rquotad
377 #%defattr(644,root,root,755)
378 #%attr(755,root,root) %{_sbindir}/rpc.rquotad
379 #%attr(754,root,root) /etc/rc.d/init.d/rquotad
380 #%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rquotad
381 #%%{_mandir}/man8/rpc.rquotad.8*
382
383 %if %{with nfs4}
384 %files common
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{_sbindir}/rpc.idmapd
387 %attr(660,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/idmapd.conf
388 %{_mandir}/man[58]/*idmap*
389 %endif
This page took 0.053902 seconds and 4 git commands to generate.