From c905793db03336a116c07f0f2c3e8167cbcb33f0 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 09:14:13 +0000 Subject: [PATCH] =?UTF-8?q?auto-import=20changelog=20data=20from=20nfs-uti?= =?UTF-8?q?ls-0.1.9.1-7.src.rpm=20Wed=20Aug=2002=202000=20Bill=20Nottingha?= =?UTF-8?q?m=20=20-=20fix=20stop=20priority=20of=20nfs?= =?UTF-8?q?lock=20Tue=20Aug=2001=202000=20Bill=20Nottingham=20=20-=20um,=20actually=20*include=20and=20apply*=20the?= =?UTF-8?q?=20statd-drop-privs=20patch=20Mon=20Jul=2024=202000=20Bill=20No?= =?UTF-8?q?ttingham=20=20-=20fix=20init=20script=20ord?= =?UTF-8?q?ering=20(#14502)=20Sat=20Jul=2022=202000=20Bill=20Nottingham=20?= =?UTF-8?q?=20-=20run=20statd=20chrooted=20and=20as=20?= =?UTF-8?q?non-root=20-=20add=20prereqs=20Tue=20Jul=2018=202000=20Trond=20?= =?UTF-8?q?Eivind=20Glomsr=F8d=20=20-=20use=20"License",?= =?UTF-8?q?=20not=20"Copyright"=20-=20use=20%{=5Ftmppath}=20and=20%{=5Fman?= =?UTF-8?q?dir}=20Mon=20Jul=2017=202000=20Matt=20Wilson=20?= =?UTF-8?q?=20-=20built=20for=20next=20release=20Mon=20Jul=2017=202000=20M?= =?UTF-8?q?att=20Wilson=20=20-=200.1.9.1=20-=20remove=20pa?= =?UTF-8?q?tch0,=20has=20been=20integrated=20upstream=20Wed=20Feb=2009=202?= =?UTF-8?q?000=20Bill=20Nottingham=20=20-=20the=20wond?= =?UTF-8?q?erful=20thing=20about=20triggers,=20is=20triggers=20are=20wonde?= =?UTF-8?q?rful=20things...=20Thu=20Feb=2003=202000=20Cristian=20Gafton=20?= =?UTF-8?q?=20-=20switch=20to=20nfs-utils=20as=20the=20?= =?UTF-8?q?base=20tree=20-=20fix=20the=20statfs=20patch=20for=20the=20new?= =?UTF-8?q?=20code=20base=20-=20single=20package=20that=20obsoletes=20ever?= =?UTF-8?q?ything=20we=20had=20before=20(if=20I=20am=20to=20keep=20=20=20?= =?UTF-8?q?=20=20some=20traces=20of=20my=20sanity=20with=20me...)=20Mon=20?= =?UTF-8?q?Jan=2017=202000=20Preston=20Brown=20=20-=20u?= =?UTF-8?q?se=20statfs=20syscall=20instead=20of=20stat=20to=20determinal?= =?UTF-8?q?=20optimal=20blksize?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cvsignore | 2 + nfs-utils.spec | 144 +++++++++++++++++++++++++++++++++++++++++++++++++ nfs.init | 102 +++++++++++++++++++++++++++++++++++ nfslock.init | 82 ++++++++++++++++++++++++++++ sources | 2 + 5 files changed, 332 insertions(+) create mode 100644 nfs-utils.spec create mode 100755 nfs.init create mode 100755 nfslock.init diff --git a/.cvsignore b/.cvsignore index e69de29..3c629dc 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1,2 @@ +nfs-utils-0.1.9.1.tar.gz +nfs.doc.tar.gz diff --git a/nfs-utils.spec b/nfs-utils.spec new file mode 100644 index 0000000..618c03c --- /dev/null +++ b/nfs-utils.spec @@ -0,0 +1,144 @@ +Summary: NFS utlilities and supporting daemons for the kernel NFS server. +Name: nfs-utils +Version: 0.1.9.1 +Release: 7 +Source0: ftp://nfs.sourceforge.net/pub/nfs/nfs-utils-0.1.9.1.tar.gz +Source1: ftp://nfs.sourceforge.net/pub/nfs/nfs.doc.tar.gz +Source10: nfs.init +Source11: nfslock.init +Patch: statd-drop-privs.patch +Group: System Environment/Daemons +Obsoletes: nfs-server +Obsoletes: knfsd +Obsoletes: knfsd-clients +Obsoletes: nfs-server-clients +Obsoletes: knfsd-lock +Provides: nfs-server +Provides: nfs-server-clients +Provides: knfsd-lock +Provides: knfsd-clients +Provides: knfsd +License: GPL +Buildroot: %{_tmppath}/%{name}-root +Requires: kernel >= 2.2.14, portmap >= 4.0 +Prereq: /sbin/chkconfig /usr/sbin/useradd + +%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 -a 1 +%patch -p1 -b .drop-privs + +%build +CFLAGS="$RPM_OPT_FLAGS" ./configure +make all + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT{/sbin,/usr/{sbin,man/man5,man/man8,share/man/man5,share/man/man8}} +mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d +make install install_prefix=$RPM_BUILD_ROOT +install -s -m 755 tools/rpcdebug/rpcdebug $RPM_BUILD_ROOT/sbin +install -m 755 %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfs +install -m 755 %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfslock +touch $RPM_BUILD_ROOT/var/lib/nfs/rmtab +mv $RPM_BUILD_ROOT/usr/sbin/{rpc.lockd,rpc.statd} $RPM_BUILD_ROOT/sbin +mv $RPM_BUILD_ROOT/usr/man/man5/* $RPM_BUILD_ROOT/usr/share/man/man5/ +mv $RPM_BUILD_ROOT/usr/man/man8/* $RPM_BUILD_ROOT/usr/share/man/man8/ + +mkdir -p $RPM_BUILD_ROOT/var/lib/nfs/statd + +%clean +rm -rf $RPM_BUILD_ROOT + +%pre +/usr/sbin/useradd -c "RPC Service User" -r \ + -s /bin/false -u 29 -d /var/lib/nfs rpcuser 2>/dev/null || : + +%post +/sbin/chkconfig --add nfs +/sbin/chkconfig --add nfslock + +%preun +if [ "$1" = "0" ]; then + /sbin/chkconfig --del nfs + /sbin/chkconfig --del nfslock + /usr/sbin/userdel rpcuser 2>/dev/null || : + /usr/sbin/groupdel rpcuser 2>/dev/null || : +fi + +%triggerpostun -- nfs-server +/sbin/chkconfig --add nfs + +%triggerpostun -- knfsd +/sbin/chkconfig --add nfs + +%triggerpostun -- knfsd-clients +/sbin/chkconfig --add nfslock + +%files +%defattr(-,root,root) +%config /etc/rc.d/init.d/nfs +%dir /var/lib/nfs +%dir %attr(700,rpcuser,rpcuser) /var/lib/nfs/statd +%config(noreplace) /var/lib/nfs/xtab +%config(noreplace) /var/lib/nfs/etab +%config(noreplace) /var/lib/nfs/rmtab +%doc nfs/*.html nfs/*.ps linux-nfs/* +/sbin/rpcdebug +/sbin/rpc.lockd +/sbin/rpc.statd +/usr/sbin/exportfs +/usr/sbin/nfsstat +/usr/sbin/nhfsstone +/usr/sbin/rpc.mountd +/usr/sbin/rpc.nfsd +/usr/sbin/rpc.rquotad +/usr/sbin/showmount +%{_mandir}/*/* +%config /etc/rc.d/init.d/nfslock + +%changelog +* Wed Aug 2 2000 Bill Nottingham +- fix stop priority of nfslock + +* Tue Aug 1 2000 Bill Nottingham +- um, actually *include and apply* the statd-drop-privs patch + +* Mon Jul 24 2000 Bill Nottingham +- fix init script ordering (#14502) + +* Sat Jul 22 2000 Bill Nottingham +- run statd chrooted and as non-root +- add prereqs + +* Tue Jul 18 2000 Trond Eivind Glomsrød +- use "License", not "Copyright" +- use %%{_tmppath} and %%{_mandir} + +* Mon Jul 17 2000 Matt Wilson +- built for next release + +* Mon Jul 17 2000 Matt Wilson +- 0.1.9.1 +- remove patch0, has been integrated upstream + +* Wed Feb 9 2000 Bill Nottingham +- the wonderful thing about triggers, is triggers are wonderful things... + +* Thu Feb 03 2000 Cristian Gafton +- switch to nfs-utils as the base tree +- fix the statfs patch for the new code base +- single package that obsoletes everything we had before (if I am to keep + some traces of my sanity with me...) + +* Mon Jan 17 2000 Preston Brown +- use statfs syscall instead of stat to determinal optimal blksize diff --git a/nfs.init b/nfs.init new file mode 100755 index 0000000..4423bdb --- /dev/null +++ b/nfs.init @@ -0,0 +1,102 @@ +#!/bin/sh +# +# nfs This shell script takes care of starting and stopping +# the NFS services. +# +# chkconfig: - 60 20 +# description: NFS is a popular protocol for file sharing across TCP/IP \ +# networks. This service provides NFS server functionality, \ +# which is configured via the /etc/exports file. +# probe: true + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +if [ ! -f /etc/sysconfig/network ]; then + exit 0 +fi + +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +[ -x /usr/sbin/rpc.nfsd ] || exit 0 +[ -x /usr/sbin/rpc.mountd ] || exit 0 +[ -x /usr/sbin/exportfs ] || exit 0 +[ -s /etc/exports ] || exit 0 + +# Number of servers to be started uo by default +RPCNFSDCOUNT=8 +# No NFS V3. +RPCMOUNTDOPTS="--no-nfs-version 3" + +# See how we were called. +case "$1" in + start) + # Start daemons. + action "Starting NFS services: " /usr/sbin/exportfs -r + echo -n "Starting NFS quotas: " + daemon rpc.rquotad + echo + echo -n "Starting NFS mountd: " + daemon rpc.mountd $RPCMOUNTDOPTS + echo + echo -n "Starting NFS daemon: " + daemon rpc.nfsd $RPCNFSDCOUNT + echo + touch /var/lock/subsys/nfs + ;; + stop) + # Stop daemons. + echo -n "Shutting down NFS mountd: " + killproc rpc.mountd + echo + echo -n "Shutting down NFS daemon: " + killproc nfsd + echo + action "Shutting down NFS services: " /usr/sbin/exportfs -au + echo -n "Shutting down NFS quotas: " + killproc rpc.rquotad + echo + rm -f /var/lock/subsys/nfs + ;; + status) + status rpc.mountd + status nfsd + status rpc.rquotad + ;; + restart) + echo -n "Restarting NFS services: " + echo -n "rpc.mountd " + killproc rpc.mountd + daemon rpc.mountd $RPCMOUNTDOPTS + /usr/sbin/exportfs -r + touch /var/lock/subsys/nfs + echo "done." + ;; + reload) + /usr/sbin/exportfs -r + touch /var/lock/subsys/nfs + ;; + probe) + if [ ! -f /var/lock/subsys/nfs ] ; then + echo start; exit 0 + fi + /sbin/pidof rpc.mountd >/dev/null 2>&1; MOUNTD="$?" + /sbin/pidof nfsd >/dev/null 2>&1; NFSD="$?" + if [ $MOUNTD = 1 -o $NFSD = 1 ] ; then + echo restart; exit 0 + fi + if [ /etc/exports -nt /var/lock/subsys/nfs ] ; then + echo reload; exit 0 + fi + ;; + *) + echo "Usage: nfs {start|stop|status|restart|reload}" + exit 1 +esac + +exit 0 + diff --git a/nfslock.init b/nfslock.init new file mode 100755 index 0000000..02bb6fe --- /dev/null +++ b/nfslock.init @@ -0,0 +1,82 @@ +#!/bin/sh +# +# nfslock This shell script takes care of starting and stopping +# the NFS file locking service. +# +# chkconfig: 345 14 86 +# description: NFS is a popular protocol for file sharing across \ +# TCP/IP networks. This service provides NFS file \ +# locking functionality. +# probe: true + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +if [ ! -f /etc/sysconfig/network ]; then + exit 0 +fi + +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +[ -x /sbin/rpc.lockd ] || exit 0 +[ -x /sbin/rpc.statd ] || exit 0 + +# See how we were called. +case "$1" in + start) + # Start daemons. + echo "Starting NFS file locking services: " + echo -n "Starting NFS lockd: " + daemon rpc.lockd + echo + echo -n "Starting NFS statd: " + daemon rpc.statd + echo + touch /var/lock/subsys/nfslock + ;; + stop) + # Stop daemons. + echo "Shutting down NFS file locking services: " + echo -n "Shutting down NFS lockd: " + killproc lockd + echo + echo -n "Shutting down NFS statd: " + killproc rpc.statd + echo + rm -f /var/lock/subsys/nfslock + ;; + status) + status lockd + status rpc.statd + ;; + restart) + echo -n "Restarting NFS file locking services: " + echo -n "rpc.lockd " + killproc lockd + daemon rpc.lockd + echo -n "rpc.statd " + killproc rpc.statd + daemon rpc.statd + touch /var/lock/subsys/nfslock + echo "done." + ;; + probe) + if [ ! -f /var/lock/subsys/nfslock ] ; then + echo start; exit 0 + fi + /sbin/pidof rpc.statd >/dev/null 2>&1; STATD="$?" + /sbin/pidof lockd >/dev/null 2>&1; LOCKD="$?" + if [ $STATD = 1 -o $LOCKD = 1 ] ; then + echo restart; exit 0 + fi + ;; + *) + echo "Usage: nfs {start|stop|status|restart}" + exit 1 +esac + +exit 0 diff --git a/sources b/sources index e69de29..d6bb114 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +1b8ebbd99249c02e16574285dbda560a nfs-utils-0.1.9.1.tar.gz +ae7db9c61c5ad04f83bb99e5caed73da nfs.doc.tar.gz