From 4b00650283c8e87e9e0326a4bd42faae2d69f9f0 Mon Sep 17 00:00:00 2001 From: Anibal Monsalve Salazar Date: Fri, 8 Apr 2005 11:25:17 +1000 Subject: [PATCH] Imported Debian patch 1.0.7-3 --- debian/changelog | 31 ++++++++++++--- debian/control | 8 ++-- debian/nfs-common.conffiles | 2 + debian/nfs-common.config | 10 ----- debian/nfs-common.default | 8 ++++ debian/nfs-common.files | 2 + debian/nfs-common.init | 62 +++++++++++++++++++++++++++++- debian/nfs-common.templates | 5 --- debian/nfs-kernel-server.config | 15 -------- debian/nfs-kernel-server.default | 4 ++ debian/nfs-kernel-server.init | 45 ++++++++++++++++++++-- debian/nfs-kernel-server.templates | 17 -------- debian/rules | 4 +- 13 files changed, 151 insertions(+), 62 deletions(-) delete mode 100644 debian/nfs-common.config delete mode 100644 debian/nfs-common.templates delete mode 100644 debian/nfs-kernel-server.config delete mode 100644 debian/nfs-kernel-server.templates diff --git a/debian/changelog b/debian/changelog index c7fe13b..d06191b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,30 @@ -nfs-utils (1:1.0.6-3.1) unstable; urgency=HIGH +nfs-utils (1:1.0.7-3) unstable; urgency=medium - * NMU - * Ignore SIGPIPE to avoid statd dying when peers close their - TCP connection while we're trying to reply to them. - (CAN-2004-1014) Closes: #284971 + * New maintainer, closes: #303559. - -- Joey Hess Wed, 5 Jan 2005 07:39:41 -0500 + -- Anibal Monsalve Salazar Fri, 08 Apr 2005 11:25:17 +1000 + +nfs-utils (1:1.0.7-2) unstable; urgency=low + + * Orphaning package. + * Upstream CVS sync: + > Support "no_acl" export option, for the few specially patched + kernels that understand it. (Closes: #253824) + > Fix FTBTS on amd64. (Closes: #297729) + > Update config.{guess,sub}. (Closes: #300552) + + -- Chip Salzenberg Thu, 7 Apr 2005 09:07:24 -0400 + +nfs-utils (1:1.0.7-1) unstable; urgency=medium + + * Acknowledge NMU; thanks to joeyh. (closes: #287053) + * New upstream version: + > Add support for NFSv4. + > Ignore SIGPIPE, fixing a remote DOS. Note that the previous + NMU already fixed this bug. (CAN-2004-1014) + > At long last, fix "erroneous SM_UNMON" warnings. (closes: #165744) + + -- Chip Salzenberg Tue, 11 Jan 2005 23:31:05 -0500 nfs-utils (1:1.0.6-3) unstable; urgency=medium diff --git a/debian/control b/debian/control index 737344b..12a38f9 100644 --- a/debian/control +++ b/debian/control @@ -1,9 +1,9 @@ Source: nfs-utils Priority: standard Section: net -Maintainer: Chip Salzenberg -Build-Depends: debhelper (>= 4.1.16), libwrap0-dev -Standards-Version: 3.1.1.1 +Maintainer: Anibal Monsalve Salazar +Build-Depends: debhelper (>= 4.1.16), libwrap0-dev, libevent-dev, libnfsidmap-dev, libkrb5-dev +Standards-Version: 3.6.1 Package: nfs-kernel-server Priority: optional @@ -37,6 +37,6 @@ Priority: extra Architecture: any Depends: nfs-common, ${shlibs:Depends} Replaces: nfs-kernel-server -Description: NFS benchmark program. +Description: NFS benchmark program . Upstream: SourceForge project "nfs", CVS module nfs-utils. diff --git a/debian/nfs-common.conffiles b/debian/nfs-common.conffiles index 1e04e55..70e74f5 100644 --- a/debian/nfs-common.conffiles +++ b/debian/nfs-common.conffiles @@ -1,2 +1,4 @@ /etc/default/nfs-common /etc/init.d/nfs-common +/etc/idmapd.conf +/etc/gssapi_mech.conf diff --git a/debian/nfs-common.config b/debian/nfs-common.config deleted file mode 100644 index 5edd12c..0000000 --- a/debian/nfs-common.config +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -e - -. /usr/share/debconf/confmodule - -if egrep -q 'ALL|[0-9]\.' /etc/hosts.deny -then - db_input high nfs-common/tcpwrappers-statd || true -fi - -db_go diff --git a/debian/nfs-common.default b/debian/nfs-common.default index 664c2e7..a8287de 100644 --- a/debian/nfs-common.default +++ b/debian/nfs-common.default @@ -6,3 +6,11 @@ STATDOPTS= # Are you _sure_ that your kernel does or does not need a lockd daemon? # If so, set this variable to either "yes" or "no". NEED_LOCKD= + +# If you are not using NFSv4 and wish to disable the idmapd daemon, +# then set NEED_IDMAPD to "no". +NEED_IDMAPD=no + +# If you are not running NFS with RPCSEC_GSS security, and wish to +# disable the gssd client daemon, then set NEED_GSSD to "no". +NEED_GSSD=no diff --git a/debian/nfs-common.files b/debian/nfs-common.files index 2a4dd89..43fca56 100644 --- a/debian/nfs-common.files +++ b/debian/nfs-common.files @@ -1,4 +1,6 @@ usr/sbin/nfsstat +usr/sbin/rpc.gssd +usr/sbin/rpc.idmapd usr/share/man/man8/*lockd* usr/share/man/man8/*statd* usr/share/man/man8/nfsstat* diff --git a/debian/nfs-common.init b/debian/nfs-common.init index 59fc59d..b6fb962 100755 --- a/debian/nfs-common.init +++ b/debian/nfs-common.init @@ -18,6 +18,12 @@ DESC="NFS common utilities" DEFAULTFILE=/etc/default/nfs-common PREFIX= NEED_LOCKD= +NEED_IDMAPD=yes +IDMAPD_PIDFILE=/var/run/rpc.idmapd.pid +NEED_GSSD=yes +GSSD_PIDFILE=/var/run/rpc.gssd.pid +PIPEFS_MOUNTPOINT=/var/lib/nfs/rpc_pipefs +RPCGSSDOPTS= if [ -f $DEFAULTFILE ]; then . $DEFAULTFILE fi @@ -46,7 +52,26 @@ esac # Exit if required binaries are missing. [ -x $PREFIX/sbin/rpc.statd ] || exit 0 -[ -x $PREFIX/sbin/rpc.lockd ] || [ "$NEED_LOCKD" = no ] || exit 0 +[ -x $PREFIX/sbin/rpc.lockd ] || [ "$NEED_LOCKD" = no ] || exit 0 +[ -x /usr/sbin/rpc.idmapd ] || [ "$NEED_IDMAPD" = no ] || exit 0 +[ -x /usr/sbin/rpc.gssd ] || [ "$NEED_GSSD" = no ] || exit 0 + +do_modprobe() { + modprobe -q "$1" || true +} + +do_mount() { + if ! grep -E -qs "$1\$" /proc/filesystems + then + return 1 + fi + if ! mountpoint -q "$2" + then + mount -t "$1" "$1" "$2" + return + fi + return 0 +} # See how we were called. case "$1" in @@ -62,11 +87,46 @@ case "$1" in start-stop-daemon --start --quiet \ --exec $PREFIX/sbin/rpc.lockd || true fi + if [ "$NEED_IDMAPD" = yes ] || [ "$NEED_GSSD" = yes ] + then + do_modprobe nfs + if do_mount rpc_pipefs $PIPEFS_MOUNTPOINT + then + if [ "$NEED_IDMAPD" = yes ] + then + printf " idmapd" + start-stop-daemon --start --quiet \ + --make-pidfile --pidfile $IDMAPD_PIDFILE \ + --exec /usr/sbin/rpc.idmapd + fi + if [ "$NEED_GSSD" = yes ] + then + printf " gssd" + start-stop-daemon --start --quiet \ + --make-pidfile --pidfile $GSSD_PIDFILE \ + --exec /usr/sbin/rpc.gssd -- $RPCGSSDOPTS + fi + fi + fi echo "." ;; stop) printf "Stopping $DESC:" + if [ "$NEED_GSSD" = yes ] + then + printf " gssd" + start-stop-daemon --stop --oknodo --quiet \ + --name rpc.gssd --user 0 + rm -f $GSSD_PIDFILE + fi + if [ "$NEED_IDMAPD" = yes ] + then + printf " idmapd" + start-stop-daemon --stop --oknodo --quiet \ + --name rpc.idmapd --user 0 + rm -f $IDMAPD_PIDFILE + fi if [ "$NEED_LOCKD" = yes ] then printf " lockd" diff --git a/debian/nfs-common.templates b/debian/nfs-common.templates deleted file mode 100644 index 91f67f7..0000000 --- a/debian/nfs-common.templates +++ /dev/null @@ -1,5 +0,0 @@ -Template: nfs-common/tcpwrappers-statd -Type: note -_Description: statd uses tcpwrappers - The statd daemon uses tcpwrappers to control access. To configure it, use - program name "statd" in /etc/hosts.allow and /etc/hosts.deny. diff --git a/debian/nfs-kernel-server.config b/debian/nfs-kernel-server.config deleted file mode 100644 index de5df58..0000000 --- a/debian/nfs-kernel-server.config +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -e - -. /usr/share/debconf/confmodule - -if grep -s '^/' /etc/exports | grep -vq sync -then - db_input high nfs-kernel-server/sync-default || true -fi - -if fgrep -q 'rpc' /etc/hosts.allow /etc/hosts.deny -then - db_input high nfs-kernel-server/tcpwrappers-mountd || true -fi - -db_go diff --git a/debian/nfs-kernel-server.default b/debian/nfs-kernel-server.default index 4c6110b..3885575 100644 --- a/debian/nfs-kernel-server.default +++ b/debian/nfs-kernel-server.default @@ -3,3 +3,7 @@ RPCNFSDCOUNT=8 # Options for rpc.mountd RPCMOUNTDOPTS= + +# If you are not running NFS with RPCSEC_GSS security, and wish to +# disable the gssd server daemon, then set NEED_SVCGSSD to "no". +NEED_SVCGSSD=no diff --git a/debian/nfs-kernel-server.init b/debian/nfs-kernel-server.init index 0894f20..11ff438 100755 --- a/debian/nfs-kernel-server.init +++ b/debian/nfs-kernel-server.init @@ -17,29 +17,61 @@ DESC="NFS kernel daemon" PREFIX=/usr # Exit if required binaries are missing. -[ -x $PREFIX/sbin/rpc.nfsd ] || exit 0 -[ -x $PREFIX/sbin/rpc.mountd ] || exit 0 -[ -x $PREFIX/sbin/exportfs ] || exit 0 +[ -x $PREFIX/sbin/rpc.nfsd ] || exit 0 +[ -x $PREFIX/sbin/rpc.mountd ] || exit 0 +[ -x $PREFIX/sbin/exportfs ] || exit 0 +[ -x $PREFIX/sbin/rpc.svcgssd ] || exit 0 # Read config DEFAULTFILE=/etc/default/nfs-kernel-server RPCNFSDCOUNT=8 RPCMOUNTDOPTS= +NEED_SVCGSSD=yes +RPCGSSDOPTS= +RPCSVCGSSDOPTS= +PROCNFSD_MOUNTPOINT=/proc/fs/nfsd if [ -f $DEFAULTFILE ]; then . $DEFAULTFILE fi +do_modprobe() { + modprobe -q "$1" || true +} + +do_mount() { + if ! grep -E -qs "$1\$" /proc/filesystems + then + return 1 + fi + if ! mountpoint -q "$2" + then + mount -t "$1" "$1" "$2" + return + fi + return 0 +} + # See how we were called. case "$1" in start) cd / # daemons should have root dir as cwd if grep -q '^/' /etc/exports then + do_modprobe nfsd + do_mount nfsd $PROCNFSD_MOUNTPOINT || NEED_SVCGSSD=no printf "Exporting directories for $DESC..." $PREFIX/sbin/exportfs -r echo "done." printf "Starting $DESC:" + if [ "$NEED_SVCGSSD" = yes ] + then + printf " svcgssd" + start-stop-daemon --start --quiet \ + --make-pidfile --pidfile /var/run/rpc.svcgssd.pid \ + --exec $PREFIX/sbin/rpc.svcgssd -- $RPCSVCGSSDOPTS + fi + printf " nfsd" start-stop-daemon --start --quiet \ --exec $PREFIX/sbin/rpc.nfsd -- $RPCNFSDCOUNT @@ -73,6 +105,13 @@ case "$1" in printf "Stopping $DESC: mountd" start-stop-daemon --stop --oknodo --quiet \ --name rpc.mountd --user 0 + if [ "$NEED_SVCGSSD" = yes ] + then + printf " svcgssd" + start-stop-daemon --stop --oknodo --quiet \ + --name rpc.svcgssd --user 0 + rm -f /var/run/rpc.svcgssd.pid + fi printf " nfsd" start-stop-daemon --stop --oknodo --quiet \ --name nfsd --user 0 --signal 2 diff --git a/debian/nfs-kernel-server.templates b/debian/nfs-kernel-server.templates deleted file mode 100644 index 85d86e4..0000000 --- a/debian/nfs-kernel-server.templates +++ /dev/null @@ -1,17 +0,0 @@ -Template: nfs-kernel-server/sync-default -Type: note -_Description: NFS server defaults to synchronous writes - To comply with standards and increase data safety, the Linux NFS server - now defaults to synchronous writes. Since this is a major change, it is - not silent: All exports should be explicitly marked as either "sync" or - "async". Exports not so marked will elicit warnings. - -Template: nfs-kernel-server/tcpwrappers-mountd -Type: note -_Description: in /etc/hosts.{allow,deny}, replace "rpc.mountd" with "mountd" - The mount daemon uses tcpwrappers to control access. To configure it, use - program name "mountd" in /etc/hosts.allow and /etc/hosts.deny. - . - Older versions of nfs-kernel-server included a mount daemon that called - itself "rpc.mountd". Therefore, you should replace all occurrences of - "rpc.mountd" with "mountd" in /etc/hosts.allow and /etc/hosts.deny. diff --git a/debian/rules b/debian/rules index 4c8834b..94c635f 100755 --- a/debian/rules +++ b/debian/rules @@ -1,8 +1,9 @@ #!/usr/bin/make -f # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +# Copyright (c) 2005 by Anibal Monsalve Salazar. # Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +export DH_VERBOSE=1 # You can use gcc 2.7.2 if it's installed, # but I don't think that's necessary any more. @@ -46,6 +47,7 @@ binary-arch: build dh_testroot dh_clean -k dh_installdirs + dh_install # Add here commands to install the files into debian/tmp $(MAKE) install_prefix='$(DEBTMP)' install dh_movefiles -- 2.39.5