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