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