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