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