 |
nfs-utils.spec |
|
%define rpcuser_uid 65050
%define rpcuser_gid 65050
%define nfsnobody_uid 65051
%define with_rquotad 1
%define with_mount 1
Name: nfs-utils
Version: 1.2.0
Release: 3mamba
Summary: NFS utilities and supporting clients and daemons for the kernel NFS server
Group: Network/File Systems
Vendor: openmamba
Distribution: openmamba
Packager: Davide Madrisan <davide.madrisan@...>
URL: http://nfs.sourceforge.net
Source0: http://www.kernel.org/pub/linux/utils/nfs/nfs-utils-%{version}.tar.bz2
Source1: nfs-utils-nfs.sysconfig
Source2: nfs-utils-nfs.init
Source3: nfs-utils-nfslock.init
Source4: nfs-utils-rpcidmapd.init
Source5: nfs-utils-rpcgssd.init
Source6: nfs-utils-rpcsvcgssd.init
Source7: nfs-utils-idmapd.conf
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libe2fs-devel
BuildRequires: libevent-devel
BuildRequires: libgssglue-devel
BuildRequires: libkrb5-devel
BuildRequires: libnfsidmap-devel
BuildRequires: librpcsecgss-devel
BuildRequires: libwrap-devel
## AUTOBUILDREQ-END
BuildRequires: chkconfig
BuildRequires: pkgconfig
# build libraries needed to support nfsv4
BuildRequires: tcp_wrappers-devel >= 7.6
PreReq: /sbin/nologin
# note: portmap is required by NFS2 and NFS3 only. NFSv4 has no interaction
# with portmapper, rpc.mountd, rpc.lockd, and rpc.statd, since they have been
# rolled into the kernel. NFSv4 listens on the well known TCP port 2049.
Requires: portmap >= 4.0
BuildRoot: %{_tmppath}/%{name}-%{version}-root
# FIXME:
# configure: WARNING: could not locate SPKM3 header; will not have SPKM3 support
# Note for linux kernel 2.6.x :
# With 2.6 we have the option of having the kernel tell mountd when it
# gets a request from an unknown host, and mountd can give appropriate
# export information to the kernel. This removes the dependency on
# rmtab and means that the kernel only needs to know about currently
# active clients.
#
# To enable this new functionality, you need to:
#
# mount -t nfsd nfsd /proc/fs/nfs
#
# before running exportfs or mountd. It is recommended that all NFS
# services be protected from the internet-at-large by a firewall where
# that is possible.
%description
The nfs-utils package provides a daemon for the kernel NFS server and related tools, which provides a much higher level of performance than the traditional Linux NFS server used by most users.
This package also contains the showmount program. Showmount queries the mount daemon on a remote host for information about the NFS (Network File System) server on the remote host. For example, showmount can display the clients which are mounted on that host.
%prep
%setup -q
%build
%configure \
--enable-nfsv3 \
--enable-nfsv4 \
--enable-gss \
%if %{with_mount}
--enable-mount \
%else
--disable-mount \
%endif
%if %{with_rquotad}
--enable-rquotad \
%else
--disable-rquotad \
%endif
--with-tcp-wrappers \
--enable-shared \
--disable-static \
--with-statduser=rpcuser \
--with-start-statd=/sbin/start-statd
# --enable-secure-statd
make all CFLAGS="%{optflags}"
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%makeinstall statduser=$USER
mv %{buildroot}%{_sbindir}/{start-statd,rpc.statd} %{buildroot}/sbin
install -D -m 644 %{S:1} %{buildroot}%{_sysconfdir}/sysconfig/nfs
install -D -m 755 %{S:2} %{buildroot}%{_initrddir}/nfs
install -D -m 755 %{S:3} %{buildroot}%{_initrddir}/nfslock
install -D -m 755 %{S:4} %{buildroot}%{_initrddir}/rpcidmapd
install -D -m 755 %{S:5} %{buildroot}%{_initrddir}/rpcgssd
install -D -m 755 %{S:6} %{buildroot}%{_initrddir}/rpcsvcgssd
install -D -m 644 %{S:7} %{buildroot}%{_sysconfdir}/idmapd.conf
install -d %{buildroot}/var/lib/nfs/rpc_pipefs
install -d %{buildroot}/var/lib/nfs/statd
install -d %{buildroot}/var/lib/nfs/v4recovery
touch %{buildroot}%{_sysconfdir}/exports
touch %{buildroot}/var/lib/nfs/rmtab
%pre
/usr/sbin/groupadd -g %{rpcuser_gid} rpcuser 2>/dev/null
/usr/sbin/useradd -c "RPC Service User" \
-s /bin/false -u %{rpcuser_uid} -g rpcuser -d /var/lib/nfs rpcuser 2>/dev/null
#/usr/sbin/useradd -c "Anonymous NFS User" \
# -s /bin/false -u %{nfsnobody_uid} -d /var/lib/nfs nfsnobody 2>/dev/null
exit 0
%post
if [ $1 -ge 1 ]; then
#/sbin/chkconfig --add nfs
/sbin/chkconfig --add nfslock
#/sbin/chkconfig --add rpcidmapd
#/sbin/chkconfig --add rpcgssd
#/sbin/chkconfig --add rpcsvcgssd
fi
exit 0
%postun
if [ $1 -ge 1 ]; then
for daemon in rpcidmapd rpcgssd nfs; do
service $daemon condrestart >/dev/null
done
fi
exit 0
%preun
if [ $1 -eq 0 ]; then
for daemon in nfs rpcidmapd rpcgssd rpcsvcgssd nfslock; do
service $daemon stop 2>/dev/null
/sbin/chkconfig --del $daemon
done
/usr/sbin/userdel rpcuser 2>/dev/null
/usr/sbin/groupdel rpcuser 2>/dev/null
/usr/sbin/userdel nfsnobody 2>/dev/null
rm -rf /var/lib/nfs/statd/*
rm -rf /var/lib/nfs/v4recovery/*
fi
exit 0
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%files
%defattr(-,root,root)
%if %{with_mount}
%attr(4755,root,root) /sbin/mount.nfs
%attr(4755,root,root) /sbin/mount.nfs4
%attr(4755,root,root) /sbin/umount.nfs
%attr(4755,root,root) /sbin/umount.nfs4
%endif
/sbin/start-statd
/sbin/rpc.statd
%{_sbindir}/exportfs
%{_sbindir}/gss_clnt_send_err
%{_sbindir}/gss_destroy_creds
%{_sbindir}/nfsstat
#%{_sbindir}/nhfsgraph
#%{_sbindir}/nhfsnums
#%{_sbindir}/nhfsrun
#%{_sbindir}/nhfsstone
%{_sbindir}/rpcdebug
%{_sbindir}/rpc.gssd
%{_sbindir}/rpc.idmapd
%{_sbindir}/rpc.mountd
%{_sbindir}/rpc.nfsd
#%if %{with_rquotad}
#%{_sbindir}/rpc.rquotad
#%endif
%{_sbindir}/rpc.svcgssd
%{_sbindir}/showmount
%{_sbindir}/sm-notify
%{_initrddir}/nfs
%{_initrddir}/nfslock
%{_initrddir}/rpcidmapd
%{_initrddir}/rpcgssd
%{_initrddir}/rpcsvcgssd
%config(noreplace) %{_sysconfdir}/exports
%config(noreplace) %{_sysconfdir}/idmapd.conf
%config(noreplace) %{_sysconfdir}/sysconfig/nfs
%dir /var/lib/nfs
%dir %attr(700,rpcuser,rpcuser) /var/lib/nfs/statd
%dir /var/lib/nfs/v4recovery
%dir /var/lib/nfs/rpc_pipefs
%config(noreplace) /var/lib/nfs/etab
%config(noreplace) /var/lib/nfs/rmtab
%config(noreplace) /var/lib/nfs/state
%config(noreplace) /var/lib/nfs/xtab
%{_mandir}/man5/exports.5*
%exclude %{_mandir}/man5/idmapd.conf.5*
%{_mandir}/man5/nfs.5*
%{_mandir}/man7/nfsd.7*
%{_mandir}/man8/*
%doc COPYING linux-nfs/*
%changelog
* Sat Aug 01 2009 Silvan Calarco <silvan.calarco@...> 1.2.0-3mamba
- exclude idmapd.conf man entry moved to libnfsidmap
* Fri Jul 17 2009 Davide Madrisan <davide.madrisan@...> 1.2.0-2mamba
- minor fix in the initscripts for nfsd and nfslock
* Thu Jun 11 2009 Automatic Build System <autodist@...> 1.2.0-1mamba
- automatic update by autodist
* Fri May 08 2009 Automatic Build System <autodist@...> 1.1.6-1mamba
- automatic update by autodist
* Wed Mar 11 2009 Silvan Calarco <silvan.calarco@...> 1.1.5-1mamba
- automatic update by autodist
* Wed Oct 22 2008 Silvan Calarco <silvan.calarco@...> 1.1.4-1mamba
- update to 1.1.4
- nfslock: activate service on install
* Fri Jun 06 2008 Silvan Calarco <silvan.calarco@...> 1.1.1-1mamba
- update to 1.1.1
* Sat Jul 07 2007 Silvan Calarco <silvan.calarco@...> 1.1.0-1mamba
- update to 1.1.0
- fixes rpcidmapd initscript (don't load module but mount rpc_pipefs)
* Tue May 08 2007 Silvan Calarco <silvan.calarco@...> 1.0.12-1mamba
- update to 1.0.12
- changed uid and gid of rpcuser and nfsnobody to avoid overlap (see resources db)
* Tue Jan 23 2007 Davide Madrisan <davide.madrisan@...> 1.0.10-1qilnx
- update to version 1.0.10 by autospec
- /sbin/rpcdebug moved to /usr/sbin directory
- dropped patch for gcc4 compiler
- fixed permissions for /var/lib/nfs/statd
* Fri Dec 02 2005 Silvan Calarco <silvan.calarco@...> 1.0.7-2qilnx
- rebuilt with new releases of libnfsidmap and libevent
- gcc4 patch applied
* Fri Apr 01 2005 Davide Madrisan <davide.madrisan@...> 1.0.7-1qilnx
- update to version 1.0.7 by autospec
- also fix security issue QSA-2005-035 (CAN-2004-1014)
- added /etc/exports to be compliant with LSB requirements
* Wed Nov 19 2003 Davide Madrisan <davide.madrisan@...> 1.0.6-1qilnx
- first build
|
|
|