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