Name: nfs-utils Epoch: 1 Version: 1.2.3 Release: %mkrel 2 Summary: The utilities for Linux NFS server Group: Networking/Other License: GPL URL: http://sourceforge.net/projects/nfs/ Source0: http://prdownloads.sourceforge.net/nfs/%{name}-%{version}.tar.bz2 Source1: ftp://nfs.sourceforge.net/pub/nfs/nfs.doc.tar.bz2 Source2: nfs-common.init Source3: nfs-server.init Source4: nfs-common.sysconfig Source5: nfs-server.sysconfig Source8: nfsv4.schema Source9: gssapi_mech.conf Source10: idmapd.conf Requires: nfs-utils-clients = %{epoch}:%{version}-%{release} # needed because of /etc/exports transfer Conflicts: setup < 2.7.8 Conflicts: clusternfs Requires(post): rpm-helper Requires(preun): rpm-helper Requires: tcp_wrappers BuildRequires: krb5-devel >= 1.3 BuildRequires: libevent-devel BuildRequires: nfsidmap-devel >= 0.16 BuildRequires: rpcsecgss-devel >= 0.12 BuildRequires: tcp_wrappers-devel BuildRequires: tirpc-devel BuildRequires: libblkid-devel BuildRequires: libcap-devel BuildRoot: %{_tmppath}/%{name}-%{version} %description This package provides various programs needed for NFS support on server. %package clients Summary: The utilities for Linux NFS client Group: Networking/Other Requires: rpcbind # needed because of service scripts and rpcdebug/nfsstat transfer Conflicts: nfs-utils < 1:1.1.2-3mdv Requires(pre): rpm-helper Requires(post): rpm-helper Requires(preun): rpm-helper Requires(postun): rpm-helper %description clients This package provides various programs needed for NFS support on client. %prep %setup -q -a1 -n %{name}-%{version} cp %{SOURCE8} nfsv4.schema %build %serverbuild %configure2_5x \ --with-statedir=%{_localstatedir}/lib/nfs \ --with-statduser=rpcuser \ --enable-nfsv3 \ --enable-nfsv4 \ --enable-ipv6 \ --enable-gss \ --enable-tirpc \ --with-krb5=%{_prefix} \ --enable-mountconfig make all CFLAGS="%{optflags} -DDEBUG" %install rm -rf %{buildroot} install -d %{buildroot}{/sbin,/usr/sbin} install -d %{buildroot}%{_mandir}/{man5,man8} install -d %{buildroot}%{_initrddir} install -d %{buildroot}%{_sysconfdir}/sysconfig install -d %{buildroot}%{_localstatedir}/lib/nfs/statd install -d %{buildroot}%{_localstatedir}/lib/nfs/v4recovery install -d %{buildroot}%{_localstatedir}/lib/nfs/sm %make \ DESTDIR=%{buildroot} \ MANDIR=%{buildroot}%{_mandir} \ SBINDIR=%{buildroot}%{_prefix}/sbin \ install install -m0755 tools/rpcdebug/rpcdebug %{buildroot}/sbin/ ln -snf rpcdebug %{buildroot}/sbin/nfsdebug ln -snf rpcdebug %{buildroot}/sbin/nfsddebug install -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/nfs-common install -m 755 %{SOURCE3} %{buildroot}%{_initrddir}/nfs-server install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/nfs-common install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/nfs-server touch %{buildroot}%{_localstatedir}/lib/nfs/rmtab mv %{buildroot}%{_sbindir}/rpc.statd %{buildroot}/sbin/ install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/idmapd.conf install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/gssapi_mech.conf perl -pi -e "s|/usr/lib|%{_libdir}|g" %{buildroot}%{_sysconfdir}/gssapi_mech.conf install -d %{buildroot}%{_localstatedir}/lib/nfs/rpc_pipefs # nuke dupes rm -f %{buildroot}%{_sbindir}/rpcdebug cat >%{buildroot}%{_sysconfdir}/exports <README.1.1.0.upgrade.urpmi < /dev/null 2>&1 || : fi if [ $1 = 2 ]; then # handle upgrade from previous init script scheme if [ -f %{_initrddir}/nfslock ]; then # map activation status of old script if [ `LC_ALL=C chkconfig --list nfslock | cut -f 5` == '3:on' ]; then chkconfig --add nfs-common fi # don't leave dangling symlinks chkconfig --del nfslock fi [ -f %{_initrddir}/rpcgssd ] && chkconfig --del rpcgssd [ -f %{_initrddir}/rpcidmapd ] && chkconfig --del rpcidmapd # always finish with a true status, otherwise rpm barks /bin/true fi %preun clients %_preun_service nfs-common %postun clients %_postun_userdel rpcuser %clean rm -rf %{buildroot} %files %defattr(-,root,root) %{_docdir}/%{name}/* %exclude %{_docdir}/%{name}/README* %{_initrddir}/nfs-server %config(noreplace) %{_sysconfdir}/sysconfig/nfs-server %config(noreplace) %ghost %{_localstatedir}/lib/nfs/xtab %config(noreplace) %ghost %{_localstatedir}/lib/nfs/etab %config(noreplace) %ghost %{_localstatedir}/lib/nfs/rmtab %config(noreplace) %{_sysconfdir}/exports /sbin/nfsddebug %{_sbindir}/exportfs %{_sbindir}/rpc.mountd %{_sbindir}/rpc.nfsd %{_sbindir}/rpc.svcgssd %{_mandir}/man5/exports.5* %{_mandir}/man7/nfsd.7* %{_mandir}/man8/exportfs.8* %{_mandir}/man8/mountd.8* %{_mandir}/man8/nfsd.8* %{_mandir}/man8/rpc.mountd.8* %{_mandir}/man8/rpc.nfsd.8* %{_mandir}/man8/rpc.svcgssd.8* %{_mandir}/man8/svcgssd.8* %files clients %defattr(-,root,root) %dir %{_docdir}/%{name} %{_docdir}/%{name}/README* %config(noreplace) %{_sysconfdir}/sysconfig/nfs-common %{_initrddir}/nfs-common /sbin/rpc.statd /sbin/mount.nfs /sbin/mount.nfs4 /sbin/umount.nfs /sbin/umount.nfs4 /sbin/rpcdebug /sbin/nfsdebug %{_sbindir}/sm-notify %{_sbindir}/start-statd %{_sbindir}/showmount %{_sbindir}/mountstats %{_sbindir}/nfsiostat %{_mandir}/man5/nfs.5* %{_mandir}/man5/nfsmount.conf.5* %{_mandir}/man8/mount.nfs.8* %{_mandir}/man8/rpc.sm-notify.8* %{_mandir}/man8/sm-notify.8* %{_mandir}/man8/umount.nfs.8* %{_mandir}/man8/rpc.statd.8* %{_mandir}/man8/statd.8* %{_mandir}/man8/showmount.8* %{_mandir}/man8/nfsstat.8* %{_mandir}/man8/rpcdebug.8* %{_mandir}/man8/mountstats.8* %{_mandir}/man8/nfsiostat.8* %dir %{_localstatedir}/lib/nfs %dir %{_localstatedir}/lib/nfs/v4recovery %dir %{_localstatedir}/lib/nfs/state %dir %attr(0700,rpcuser,rpcuser) %{_localstatedir}/lib/nfs/sm %dir %attr(0700,rpcuser,rpcuser) %{_localstatedir}/lib/nfs/statd %config(noreplace) %{_sysconfdir}/idmapd.conf %config(noreplace) %{_sysconfdir}/gssapi_mech.conf %dir %{_localstatedir}/lib/nfs/rpc_pipefs %{_sbindir}/nfsstat %{_sbindir}/rpc.idmapd %{_sbindir}/rpc.gssd %{_sbindir}/gss_clnt_send_err %{_sbindir}/gss_destroy_creds %{_mandir}/man8/rpc.gssd.8* %{_mandir}/man8/rpc.idmapd.8* %{_mandir}/man8/gssd.8* %{_mandir}/man8/idmapd.8*