[arch-commits] CVS update of core/support/nfs-utils (9 files)
Tom Killian
tom at archlinux.org
Sun Sep 23 07:37:01 UTC 2007
Date: Sunday, September 23, 2007 @ 03:37:01
Author: tom
Path: /home/cvs-core/core/support/nfs-utils
Added: start-statd.patch (1.1)
Modified: PKGBUILD (1.42 -> 1.43) nfs-utils.install (1.1 -> 1.2)
nfs.conf.d (1.1 -> 1.2) nfsd (1.14 -> 1.15) nfslock (1.5 -> 1.6)
Removed: nfs-utils-compile.patch (1.1) nfsd.conf.d (1.1) nfsmount (1.1)
upgpkg: nfs-utils 1.1.0-2
init scripts amended to provide correct daemon startup order, fixes FS#7368
-------------------------+
PKGBUILD | 20 ++++++++++++++------
nfs-utils-compile.patch | 22 ----------------------
nfs-utils.install | 16 +++++++++++-----
nfs.conf.d | 16 ++++++++++++----
nfsd | 45 ++++++++++++++++++++++-----------------------
nfsd.conf.d | 2 --
nfslock | 6 ++++++
nfsmount | 37 -------------------------------------
start-statd.patch | 21 +++++++++++++++++++++
9 files changed, 86 insertions(+), 99 deletions(-)
Index: core/support/nfs-utils/PKGBUILD
diff -u core/support/nfs-utils/PKGBUILD:1.42 core/support/nfs-utils/PKGBUILD:1.43
--- core/support/nfs-utils/PKGBUILD:1.42 Mon Sep 10 18:37:54 2007
+++ core/support/nfs-utils/PKGBUILD Sun Sep 23 03:37:00 2007
@@ -1,29 +1,31 @@
-# $Id: PKGBUILD,v 1.42 2007/09/10 22:37:54 tpowa Exp $
+# $Id: PKGBUILD,v 1.43 2007/09/23 07:37:00 tom Exp $
# Maintainer: dorphell <dorphell at archlinux.org>
# Contributor: John Proctor <jproctor at prium.net>
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org>
pkgname=nfs-utils
pkgver=1.1.0
-pkgrel=1
+pkgrel=2
pkgdesc="Support programs for Network File Systems"
-arch=(i686 x86_64)
+arch=('i686' 'x86_64')
url='http://nfs.sourceforge.net'
license=('GPL')
-backup=(etc/exports etc/conf.d/nfs)
+backup=('etc/exports' 'etc/conf.d/nfs')
depends=('glibc' 'tcp_wrappers' 'e2fsprogs' 'portmap' 'nfsidmap' 'libevent>=1.3d')
source=(http://heanet.dl.sourceforge.net/sourceforge/nfs/${pkgname}-${pkgver}.tar.gz
nfsd
nfslock
exports
- nfs.conf.d)
+ nfs.conf.d
+ start-statd.patch)
install=nfs-utils.install
build() {
cd ${startdir}/src/${pkgname}-${pkgver}
+ patch -Np0 -i ../start-statd.patch || return 1
./configure --prefix=/usr --enable-nfsv3 --disable-gss \
--with-statedir=/var/lib/nfs --sysconfdir=/etc
- make -j1 || return 1
+ make || return 1
make DESTDIR=${startdir}/pkg install
install -D -m 755 ../nfsd ${startdir}/pkg/etc/rc.d/nfsd
install -D -m 755 ../nfslock ${startdir}/pkg/etc/rc.d/nfslock
@@ -31,3 +33,9 @@
install -D -m 644 ../nfs.conf.d ${startdir}/pkg/etc/conf.d/nfs
mkdir ${startdir}/pkg/var/lib/nfs/v4recovery
}
+md5sums=('df88c6fe88a26f9797e74cb2d3291a2a'
+ '5a9436e492e68efaf801b9c496684541'
+ '5d0d31f27f2319747d4499df11485ae7'
+ '1358d29a549dfc37b522c35e823c6813'
+ 'b4aae6963ec25d226eb2d97214f5bb18'
+ '9c8aeff40ca25312328afe3b7fad293f')
Index: core/support/nfs-utils/nfs-utils-compile.patch
diff -u core/support/nfs-utils/nfs-utils-compile.patch:1.1 core/support/nfs-utils/nfs-utils-compile.patch:removed
--- core/support/nfs-utils/nfs-utils-compile.patch:1.1 Sun Dec 31 09:05:15 2006
+++ core/support/nfs-utils/nfs-utils-compile.patch Sun Sep 23 03:37:00 2007
@@ -1,22 +0,0 @@
-diff -ru nfs-utils-1.0.10.orig/tools/Makefile.am nfs-utils-1.0.10/tools/Makefile.am
---- nfs-utils-1.0.10.orig/tools/Makefile.am 2006-08-07 06:40:50.000000000 +0000
-+++ nfs-utils-1.0.10/tools/Makefile.am 2006-12-31 14:01:57.000000000 +0000
-@@ -1,5 +1,5 @@
- ## Process this file with automake to produce Makefile.in
-
--SUBDIRS = getiversion getkversion locktest rpcdebug rpcgen nlmtest
-+SUBDIRS = getiversion locktest rpcdebug rpcgen nlmtest
-
- MAINTAINERCLEANFILES = Makefile.in
-diff -ru nfs-utils-1.0.10.orig/tools/Makefile.in nfs-utils-1.0.10/tools/Makefile.in
---- nfs-utils-1.0.10.orig/tools/Makefile.in 2006-08-07 06:43:43.000000000 +0000
-+++ nfs-utils-1.0.10/tools/Makefile.in 2006-12-31 14:02:07.000000000 +0000
-@@ -207,7 +207,7 @@
- statedir = @statedir@
- sysconfdir = @sysconfdir@
- target_alias = @target_alias@
--SUBDIRS = getiversion getkversion locktest rpcdebug rpcgen nlmtest
-+SUBDIRS = getiversion locktest rpcdebug rpcgen nlmtest
- MAINTAINERCLEANFILES = Makefile.in
- all: all-recursive
-
Index: core/support/nfs-utils/nfs-utils.install
diff -u core/support/nfs-utils/nfs-utils.install:1.1 core/support/nfs-utils/nfs-utils.install:1.2
--- core/support/nfs-utils/nfs-utils.install:1.1 Thu Apr 19 18:53:51 2007
+++ core/support/nfs-utils/nfs-utils.install Sun Sep 23 03:37:00 2007
@@ -6,7 +6,10 @@
==>
==> PLEASE NOTE:
==> Extended configuration options for NFS are available in
- ==> /etc/conf.d/nfs, courtesy of a patch from dtw.
+ ==> /etc/conf.d/nfs.
+ ==>
+ ==> Please refer to http://wiki.archlinux.org/index.php/Nfs
+ ==> for further information.
==>
EOM
@@ -18,10 +21,13 @@
==>
==> PLEASE NOTE:
==> Extended configuration options for NFS are now available in
- ==> /etc/conf.d/nfs, courtesy of a patch from dtw.
- ==> /etc/conf.d/nfsd remains on your system, but is no longer in use,
- ==> so all settings should be transferred to /etc/conf.d/nfs.
- ==> /etc/conf.d/nfsd can then be deleted.
+ ==> /etc/conf.d/nfs.
+ ==> If /etc/conf.d/nfsd remains on your system from an earlier
+ ==> installation, transfer its settings to /etc/conf.d/nfs and
+ ==> delete it.
+ ==>
+ ==> Please refer to http://wiki.archlinux.org/index.php/Nfs
+ ==> for further information.
==>
EOM
Index: core/support/nfs-utils/nfs.conf.d
diff -u core/support/nfs-utils/nfs.conf.d:1.1 core/support/nfs-utils/nfs.conf.d:1.2
--- core/support/nfs-utils/nfs.conf.d:1.1 Thu Apr 19 18:53:51 2007
+++ core/support/nfs-utils/nfs.conf.d Sun Sep 23 03:37:00 2007
@@ -4,9 +4,17 @@
# Options to pass to rpc.mountd
# e.g. MOUNTDOPTS="-p 32767"
MOUNTD_OPTS="--no-nfs-version 1 --no-nfs-version 2"
+
# Options to pass to rpc.statd
-# e.g. STATDOPTS="-p 32765 -o 32766"
+# N.B. statd normally runs on both client and server, and run-time
+# options should be specified accordingly. Specifically, the Arch
+# NFS init scripts require the --no-notify flag on the server,
+# but not on the client e.g.
+# STATD_OPTS="--no-notify -p 32765 -o 32766" -> server
+# STATD_OPTS="-p 32765 -o 32766" -> client
STATD_OPTS=""
-# Options to pass to rpc.rquotad
-# e.g. RQUOTADOPTS="-p 32764"
-RQUOTAD_OPTS=""
+
+# Options to pass to sm-notify
+# e.g. SMNOTIFY_OPTS="-p 32764"
+SMNOTIFY_OPTS=""
+
Index: core/support/nfs-utils/nfsd
diff -u core/support/nfs-utils/nfsd:1.14 core/support/nfs-utils/nfsd:1.15
--- core/support/nfs-utils/nfsd:1.14 Thu Apr 19 18:53:51 2007
+++ core/support/nfs-utils/nfsd Sun Sep 23 03:37:00 2007
@@ -7,44 +7,49 @@
. /etc/rc.d/functions
DAEMON_NAME=nfsd
-#RQUOTAD_PID=`pidof -o %PPID /usr/sbin/rpc.rquotad`
NFSD_PID=`pidof -o %PPID nfsd`
MOUNTD_PID=`pidof -o %PPID /usr/sbin/rpc.mountd`
case "$1" in
start)
stat_busy "Starting $DAEMON_NAME"
- /usr/sbin/exportfs -r
+ # Check for portmap
if [ ! -f /var/run/daemons/portmap ]; then
echo "ERROR: portmap is not running"
stat_fail
exit 1
fi
+ # Check for nfslock
if [ ! -f /var/run/daemons/nfslock ]; then
- stat_fail
echo "ERROR: nfslock is not running"
+ stat_fail
exit 1
fi
- #[ -z "$RQUOTAD_PID" ] && /usr/sbin/rpc.rquotad $RQUOTAD_OPTS
- #if [ $? -gt 0 ]; then
- # stat_fail
- # exit 1
- #else
- # echo `pidof -o %PPID /usr/sbin/rpc.rquotad` > /var/run/rpc.rquotad.pid
- #fi
- [ -z "$NFSD_PID" ] && /usr/sbin/rpc.nfsd $NFSD_OPTS
+ # Check for /proc/fs/nfsd
+ if grep -qs nfsd /proc/filesystems ; then
+ if ! grep -qs "nfsd /proc/fs/nfsd" /proc/mounts ; then
+ mount -t nfsd -o nodev,noexec,nosuid nfsd /proc/fs/nfsd
+ fi
+ fi
+ # Run exportfs
+ /usr/sbin/exportfs -r
+ # Run mountd
+ [ -z "$MOUNTD_PID" ] && /usr/sbin/rpc.mountd $MOUNTD_OPTS
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
- echo `pidof -o %PPID nfsd` > /var/run/rpc.nfsd.pid
+ echo `pidof -o %PPID /usr/sbin/rpc.mountd` > /var/run/rpc.mountd.pid
fi
- [ -z "$MOUNTD_PID" ] && /usr/sbin/rpc.mountd $MOUNTD_OPTS
+ # Run nfsd
+ [ -z "$NFSD_PID" ] && /usr/sbin/rpc.nfsd $NFSD_OPTS
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
- echo `pidof -o %PPID /usr/sbin/rpc.mountd` > /var/run/rpc.mountd.pid
+ echo `pidof -o %PPID nfsd` > /var/run/rpc.nfsd.pid
fi
+ # Run sm-notify
+ /usr/sbin/sm-notify $SMNOTIFY_OPTS
add_daemon $DAEMON_NAME
stat_done
;;
@@ -67,15 +72,9 @@
kill -9 $NFSD_PID &> /dev/null
rm /var/run/rpc.nfsd.pid &> /dev/null
fi
- #[ ! -z "$RQUOTAD_PID" ] && kill $RQUOTAD_PID &> /dev/null
- #if [ $? -gt 0 ]; then
- # stat_fail
- # exit 1
- #else
- # kill -9 $RQUOTAD_PID &> /dev/null
- # rm /var/run/rpc.rquotad.pid
- #fi
- /usr/sbin/exportfs -au
+ if [ "$RUNLEVEL" = "0" ]; then
+ /usr/sbin/exportfs -au
+ fi
rm_daemon $DAEMON_NAME
stat_done
;;
Index: core/support/nfs-utils/nfsd.conf.d
diff -u core/support/nfs-utils/nfsd.conf.d:1.1 core/support/nfs-utils/nfsd.conf.d:removed
--- core/support/nfs-utils/nfsd.conf.d:1.1 Sat Jun 28 01:01:19 2003
+++ core/support/nfs-utils/nfsd.conf.d Sun Sep 23 03:37:00 2007
@@ -1,2 +0,0 @@
-NFSD_OPTS=8
-MOUNTD_OPTS="--no-nfs-version 1 --no-nfs-version 2"
Index: core/support/nfs-utils/nfslock
diff -u core/support/nfs-utils/nfslock:1.5 core/support/nfs-utils/nfslock:1.6
--- core/support/nfs-utils/nfslock:1.5 Thu Apr 19 18:53:51 2007
+++ core/support/nfs-utils/nfslock Sun Sep 23 03:37:00 2007
@@ -11,6 +11,12 @@
case "$1" in
start)
stat_busy "Starting $DAEMON_NAME"
+ # Check for /proc/fs/nfsd
+ if grep -qs nfsd /proc/filesystems ; then
+ if ! grep -qs "nfsd /proc/fs/nfsd" /proc/mounts ; then
+ mount -t nfsd -o nodev,noexec,nosuid nfsd /proc/fs/nfsd
+ fi
+ fi
[ -z "$PID" ] && /usr/sbin/rpc.statd $STATD_OPTS
if [ $? -gt 0 ]; then
stat_fail
Index: core/support/nfs-utils/nfsmount
diff -u core/support/nfs-utils/nfsmount:1.1 core/support/nfs-utils/nfsmount:removed
--- core/support/nfs-utils/nfsmount:1.1 Tue May 27 13:15:31 2003
+++ core/support/nfs-utils/nfsmount Sun Sep 23 03:37:00 2007
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-case "$1" in
- start)
- stat_busy "Mounting NFS filesystems"
- if [ ! -f /var/run/daemons/portmap ]; then
- stat_fail
- echo "ERROR: portmap is not running"
- exit 1
- fi
- mount -a -t nfs
- add_daemon nfsmount
- stat_done
- ;;
- stop)
- stat_busy "Unmounting NFS filesystems"
- umount -a -t nfs
- sleep 1
- if [ ! -z `mount -t nfs` ]; then
- stat_fail
- exit 1
- fi
- rm_daemon nfsmount
- stat_done
- ;;
- restart)
- $0 stop
- sleep 2
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-exit 0
Index: core/support/nfs-utils/start-statd.patch
diff -u /dev/null core/support/nfs-utils/start-statd.patch:1.1
--- /dev/null Sun Sep 23 03:37:00 2007
+++ core/support/nfs-utils/start-statd.patch Sun Sep 23 03:37:00 2007
@@ -0,0 +1,21 @@
+--- utils/statd/start-statd 2007-05-11 04:40:57.000000000 +0100
++++ utils/statd/start-statd.new 2007-09-21 17:11:34.000000000 +0100
+@@ -1,9 +1,16 @@
+ #!/bin/sh
++
++# Original script provided by the NFS project
++# Modified for Arch Linux by Tom Killian
++
+ # nfsmount calls this script when mounting a filesystem with locking
+ # enabled, but when statd does not seem to be running (based on
+ # /var/run/rpc.statd.pid).
+ # It should run run statd with whatever flags are apropriate for this
+ # site.
+-PATH=/sbin:/usr/sbin
+-exec rpc.statd --no-notify
++
++# source application-specific settings
++[ -f /etc/conf.d/nfs ] && . /etc/conf.d/nfs
++
++exec /usr/sbin/rpc.statd $STATD_OPTS
+
More information about the arch-commits
mailing list