/[packages]/cauldron/nfs-utils/current/SPECS/nfs-utils.spec
ViewVC logotype

Contents of /cauldron/nfs-utils/current/SPECS/nfs-utils.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 49044 - (show annotations) (download)
Tue Feb 8 16:36:05 2011 UTC (13 years, 7 months ago) by ennael
File size: 7994 byte(s)
imported package nfs-utils
1 Name: nfs-utils
2 Epoch: 1
3 Version: 1.2.3
4 Release: %mkrel 2
5 Summary: The utilities for Linux NFS server
6 Group: Networking/Other
7 License: GPL
8 URL: http://sourceforge.net/projects/nfs/
9 Source0: http://prdownloads.sourceforge.net/nfs/%{name}-%{version}.tar.bz2
10 Source1: ftp://nfs.sourceforge.net/pub/nfs/nfs.doc.tar.bz2
11 Source2: nfs-common.init
12 Source3: nfs-server.init
13 Source4: nfs-common.sysconfig
14 Source5: nfs-server.sysconfig
15 Source8: nfsv4.schema
16 Source9: gssapi_mech.conf
17 Source10: idmapd.conf
18 Requires: nfs-utils-clients = %{epoch}:%{version}-%{release}
19 # needed because of /etc/exports transfer
20 Conflicts: setup < 2.7.8
21 Conflicts: clusternfs
22 Requires(post): rpm-helper
23 Requires(preun): rpm-helper
24 Requires: tcp_wrappers
25 BuildRequires: krb5-devel >= 1.3
26 BuildRequires: libevent-devel
27 BuildRequires: nfsidmap-devel >= 0.16
28 BuildRequires: rpcsecgss-devel >= 0.12
29 BuildRequires: tcp_wrappers-devel
30 BuildRequires: tirpc-devel
31 BuildRequires: libblkid-devel
32 BuildRequires: libcap-devel
33 BuildRoot: %{_tmppath}/%{name}-%{version}
34
35 %description
36 This package provides various programs needed for NFS support on server.
37
38 %package clients
39 Summary: The utilities for Linux NFS client
40 Group: Networking/Other
41 Requires: rpcbind
42 # needed because of service scripts and rpcdebug/nfsstat transfer
43 Conflicts: nfs-utils < 1:1.1.2-3mdv
44 Requires(pre): rpm-helper
45 Requires(post): rpm-helper
46 Requires(preun): rpm-helper
47 Requires(postun): rpm-helper
48
49 %description clients
50 This package provides various programs needed for NFS support on client.
51
52 %prep
53 %setup -q -a1 -n %{name}-%{version}
54
55 cp %{SOURCE8} nfsv4.schema
56
57 %build
58 %serverbuild
59 %configure2_5x \
60 --with-statedir=%{_localstatedir}/lib/nfs \
61 --with-statduser=rpcuser \
62 --enable-nfsv3 \
63 --enable-nfsv4 \
64 --enable-ipv6 \
65 --enable-gss \
66 --enable-tirpc \
67 --with-krb5=%{_prefix} \
68 --enable-mountconfig
69
70 make all CFLAGS="%{optflags} -DDEBUG"
71
72 %install
73 rm -rf %{buildroot}
74
75 install -d %{buildroot}{/sbin,/usr/sbin}
76 install -d %{buildroot}%{_mandir}/{man5,man8}
77 install -d %{buildroot}%{_initrddir}
78 install -d %{buildroot}%{_sysconfdir}/sysconfig
79 install -d %{buildroot}%{_localstatedir}/lib/nfs/statd
80 install -d %{buildroot}%{_localstatedir}/lib/nfs/v4recovery
81 install -d %{buildroot}%{_localstatedir}/lib/nfs/sm
82
83 %make \
84 DESTDIR=%{buildroot} \
85 MANDIR=%{buildroot}%{_mandir} \
86 SBINDIR=%{buildroot}%{_prefix}/sbin \
87 install
88
89 install -m0755 tools/rpcdebug/rpcdebug %{buildroot}/sbin/
90 ln -snf rpcdebug %{buildroot}/sbin/nfsdebug
91 ln -snf rpcdebug %{buildroot}/sbin/nfsddebug
92
93 install -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/nfs-common
94 install -m 755 %{SOURCE3} %{buildroot}%{_initrddir}/nfs-server
95 install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/nfs-common
96 install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/nfs-server
97
98 touch %{buildroot}%{_localstatedir}/lib/nfs/rmtab
99 mv %{buildroot}%{_sbindir}/rpc.statd %{buildroot}/sbin/
100
101 install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/idmapd.conf
102 install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/gssapi_mech.conf
103 perl -pi -e "s|/usr/lib|%{_libdir}|g" %{buildroot}%{_sysconfdir}/gssapi_mech.conf
104 install -d %{buildroot}%{_localstatedir}/lib/nfs/rpc_pipefs
105
106 # nuke dupes
107 rm -f %{buildroot}%{_sbindir}/rpcdebug
108
109 cat >%{buildroot}%{_sysconfdir}/exports <<EOF
110 # /etc/exports: the access control list for filesystems which may be exported
111 # to NFS clients. See exports(5).
112 EOF
113
114 cat >README.1.1.0.upgrade.urpmi <<EOF
115 This release changed organisation of init scripts:
116 - rpcidmapd, rpcgssd and nfslock have been merged in nfs-common
117 - rpcsvcgssd and nfs have been merged in nfs-server
118 Individual daemons handled previously by those init scripts are now handled
119 automatically, according to current nfs configuration and to init scripts
120 configuration files /etc/sysconfig/nfs-common and /etc/sysconfig/nfs-server.
121 EOF
122
123 # manage documentation manually
124 install -d -m 755 %{buildroot}%{_docdir}/%{name}
125 install -m 644 README README.1.1.0.upgrade.urpmi ChangeLog COPYING NEWS \
126 nfs/*.html nfs/*.ps nfsv4.schema \
127 %{buildroot}%{_docdir}/%{name}
128
129 # fix perms
130 chmod 4555 %{buildroot}/sbin/mount.nfs
131
132 %post
133 %_post_service nfs-server
134 if [ $1 = 2 ]; then
135 # handle upgrade from previous init script scheme
136 if [ -f %{_initrddir}/nfs ]; then
137 # ap activation status of old script
138 if [ `LC_ALL=C chkconfig --list nfs | cut -f 5` == '3:on' ]; then
139 chkconfig --add nfs-server
140 fi
141 # don't leave dangling symlinks
142 chkconfig --del nfs
143 fi
144 [ -f %{_initrddir}/rpcsvcgssd ] && chkconfig --del rpcsvcgssd
145 # always finish with a true status, otherwise rpm barks
146 /bin/true
147 fi
148
149 %create_ghostfile %{_localstatedir}/lib/nfs/xtab root root 644
150 %create_ghostfile %{_localstatedir}/lib/nfs/etab root root 644
151 %create_ghostfile %{_localstatedir}/lib/nfs/rmtab root root 644
152
153 %preun
154 %_preun_service nfs-server
155
156 %pre clients
157 %_pre_useradd rpcuser %{_localstatedir}/lib/nfs /bin/false
158
159 %post clients
160 %_post_service nfs-common
161 # restart nfs-server service if running
162 if [ -f /var/lock/subsys/nfs-server ]; then
163 /sbin/service nfs-server restart > /dev/null 2>&1 || :
164 fi
165 if [ $1 = 2 ]; then
166 # handle upgrade from previous init script scheme
167 if [ -f %{_initrddir}/nfslock ]; then
168 # map activation status of old script
169 if [ `LC_ALL=C chkconfig --list nfslock | cut -f 5` == '3:on' ]; then
170 chkconfig --add nfs-common
171 fi
172 # don't leave dangling symlinks
173 chkconfig --del nfslock
174 fi
175 [ -f %{_initrddir}/rpcgssd ] && chkconfig --del rpcgssd
176 [ -f %{_initrddir}/rpcidmapd ] && chkconfig --del rpcidmapd
177 # always finish with a true status, otherwise rpm barks
178 /bin/true
179 fi
180
181 %preun clients
182 %_preun_service nfs-common
183
184 %postun clients
185 %_postun_userdel rpcuser
186
187 %clean
188 rm -rf %{buildroot}
189
190 %files
191 %defattr(-,root,root)
192 %{_docdir}/%{name}/*
193 %exclude %{_docdir}/%{name}/README*
194 %{_initrddir}/nfs-server
195 %config(noreplace) %{_sysconfdir}/sysconfig/nfs-server
196 %config(noreplace) %ghost %{_localstatedir}/lib/nfs/xtab
197 %config(noreplace) %ghost %{_localstatedir}/lib/nfs/etab
198 %config(noreplace) %ghost %{_localstatedir}/lib/nfs/rmtab
199 %config(noreplace) %{_sysconfdir}/exports
200 /sbin/nfsddebug
201 %{_sbindir}/exportfs
202 %{_sbindir}/rpc.mountd
203 %{_sbindir}/rpc.nfsd
204 %{_sbindir}/rpc.svcgssd
205 %{_mandir}/man5/exports.5*
206 %{_mandir}/man7/nfsd.7*
207 %{_mandir}/man8/exportfs.8*
208 %{_mandir}/man8/mountd.8*
209 %{_mandir}/man8/nfsd.8*
210 %{_mandir}/man8/rpc.mountd.8*
211 %{_mandir}/man8/rpc.nfsd.8*
212 %{_mandir}/man8/rpc.svcgssd.8*
213 %{_mandir}/man8/svcgssd.8*
214
215 %files clients
216 %defattr(-,root,root)
217 %dir %{_docdir}/%{name}
218 %{_docdir}/%{name}/README*
219 %config(noreplace) %{_sysconfdir}/sysconfig/nfs-common
220 %{_initrddir}/nfs-common
221 /sbin/rpc.statd
222 /sbin/mount.nfs
223 /sbin/mount.nfs4
224 /sbin/umount.nfs
225 /sbin/umount.nfs4
226 /sbin/rpcdebug
227 /sbin/nfsdebug
228 %{_sbindir}/sm-notify
229 %{_sbindir}/start-statd
230 %{_sbindir}/showmount
231 %{_sbindir}/mountstats
232 %{_sbindir}/nfsiostat
233 %{_mandir}/man5/nfs.5*
234 %{_mandir}/man5/nfsmount.conf.5*
235 %{_mandir}/man8/mount.nfs.8*
236 %{_mandir}/man8/rpc.sm-notify.8*
237 %{_mandir}/man8/sm-notify.8*
238 %{_mandir}/man8/umount.nfs.8*
239 %{_mandir}/man8/rpc.statd.8*
240 %{_mandir}/man8/statd.8*
241 %{_mandir}/man8/showmount.8*
242 %{_mandir}/man8/nfsstat.8*
243 %{_mandir}/man8/rpcdebug.8*
244 %{_mandir}/man8/mountstats.8*
245 %{_mandir}/man8/nfsiostat.8*
246 %dir %{_localstatedir}/lib/nfs
247 %dir %{_localstatedir}/lib/nfs/v4recovery
248 %dir %{_localstatedir}/lib/nfs/state
249 %dir %attr(0700,rpcuser,rpcuser) %{_localstatedir}/lib/nfs/sm
250 %dir %attr(0700,rpcuser,rpcuser) %{_localstatedir}/lib/nfs/statd
251 %config(noreplace) %{_sysconfdir}/idmapd.conf
252 %config(noreplace) %{_sysconfdir}/gssapi_mech.conf
253 %dir %{_localstatedir}/lib/nfs/rpc_pipefs
254 %{_sbindir}/nfsstat
255 %{_sbindir}/rpc.idmapd
256 %{_sbindir}/rpc.gssd
257 %{_sbindir}/gss_clnt_send_err
258 %{_sbindir}/gss_destroy_creds
259 %{_mandir}/man8/rpc.gssd.8*
260 %{_mandir}/man8/rpc.idmapd.8*
261 %{_mandir}/man8/gssd.8*
262 %{_mandir}/man8/idmapd.8*
263
264

  ViewVC Help
Powered by ViewVC 1.1.30