]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Imported Debian patch 1.0.7-6 debian/1%1.0.7-6
authorSteinar H. Gunderson <sesse@debian.org>
Sat, 1 Apr 2006 00:46:53 +0000 (02:46 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 13 Jul 2010 03:04:24 +0000 (04:04 +0100)
debian/changelog
debian/nfs-common.default
debian/nfs-common.dirs
debian/nfs-common.init
debian/nfs-kernel-server.dirs
debian/rules

index 1c256fd6188dcd7e72f4813c55ea7ae8a95f71f4..4d0cacf895fa2a59f306e807818e8ea3b7685fba 100644 (file)
@@ -1,3 +1,19 @@
+nfs-utils (1:1.0.7-6) unstable; urgency=low
+
+  * Let the man-page fixup script in debian/rules look for the man pages in
+    the right place.
+  * Modprobe nfs4 along with nfs in the nfs-common init script. Also modprobe
+    rpcsec_gss_krb5 before we start gssd.
+  * Implement autodetection for NEED_IDMAPD and NEED_GSSD, based on /etc/fstab.
+  * Add a note to the top of /etc/defaults/nfs-common that the default is to
+    autodetect.
+  * Move /var/lib/nfs/rpc_pipefs from nfs-kernel-server.dirs to
+    nfs-common.dirs; it's needed by the client as well.
+  * Let dh_install install from debian/tmp/ instead of debian/tmp; it fixes
+    minor aesthetic issues in the build log.
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Sat,  1 Apr 2006 02:46:53 +0200
+
 nfs-utils (1:1.0.7-5) unstable; urgency=low
 
   * Non-non-maintainer-upload this time, it seems. :-)
index a8287de5ebb6625a87ffdfb4b648abf301db9969..0a5e8b23f336db888430f826832a66a1aba49cc3 100644 (file)
@@ -1,3 +1,7 @@
+# If you do not set values for the NEED_ options, they will be attempted
+# autodetected; this should be sufficient for most people. Valid alternatives
+# for the NEED_ options are "yes" and "no".
+
 # Options for rpc.statd.
 #   Should rpc.statd listen on a specific port?
 #   If so, set this variable to a statd argument like: "--port 1000".
@@ -8,9 +12,9 @@ STATDOPTS=
 NEED_LOCKD=
 
 # If you are not using NFSv4 and wish to disable the idmapd daemon,
-# then set NEED_IDMAPD to "no".
-NEED_IDMAPD=no
+# then set NEED_IDMAPD to "no". 
+NEED_IDMAPD=
 
 # 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
+NEED_GSSD=
index 653a4e0901947ca09713c7cb06b0acfdbd90d646..7dbf8aa24d2bdb9bbe7268162a94b2b47b8ca396 100644 (file)
@@ -4,3 +4,4 @@ usr/sbin
 var/lib/nfs
 var/lib/nfs/sm
 var/lib/nfs/sm.bak
+var/lib/nfs/rpc_pipefs
index 0f25166a3fa91fb31b9a47b4e4f1658fdbccea76..76ceaca2819ff141590043761fae63c09d21b17a 100755 (executable)
@@ -18,9 +18,9 @@ DESC="NFS common utilities"
 DEFAULTFILE=/etc/default/nfs-common
 PREFIX=
 NEED_LOCKD=
-NEED_IDMAPD=yes
+NEED_IDMAPD=
 IDMAPD_PIDFILE=/var/run/rpc.idmapd.pid
-NEED_GSSD=yes
+NEED_GSSD=
 GSSD_PIDFILE=/var/run/rpc.gssd.pid
 PIPEFS_MOUNTPOINT=/var/lib/nfs/rpc_pipefs
 RPCGSSDOPTS=
@@ -50,6 +50,46 @@ yes|no)      ;;
     ;;
 esac
 
+#
+# Parse the fstab file, and determine whether we need idmapd and gssd. (The
+# /etc/defaults settings, if any, will override our autodetection.) This code
+# is partially adapted from the mountnfs.sh script in the sysvinit package.
+#
+AUTO_NEED_IDMAPD=no
+AUTO_NEED_GSSD=no
+
+exec 9<&0 </etc/fstab
+
+while read DEV MTPT FSTYPE OPTS REST
+do
+    if [ "$FSTYPE" = "nfs4" ]; then
+        AUTO_NEED_IDMAPD=yes
+    fi
+    case "$OPTS" in
+        sec=krb5|*,sec=krb5|sec=krb5,*|*,sec=krb5i,*|sec=krb5i|*,sec=krb5i|sec=krb5i,*|*,sec=krb5i,*|sec=krb5p|*,sec=krb5p|sec=krb5p,*|*,sec=krb5p,*)
+           AUTO_NEED_GSSD=yes
+       ;;
+    esac
+done
+
+exec 0<&9 9<&-
+
+case "$NEED_IDMAPD" in
+    yes|no)    
+        ;;
+    *)
+        NEED_IDMAPD=$AUTO_NEED_IDMAPD
+       ;;
+esac
+
+case "$NEED_GSSD" in
+    yes|no)    
+        ;;
+    *)
+        NEED_GSSD=$AUTO_NEED_GSSD
+       ;;
+esac
+
 # Exit if required binaries are missing.
 [ -x $PREFIX/sbin/rpc.statd ] || exit 0
 [ -x $PREFIX/sbin/rpc.lockd ] || [ "$NEED_LOCKD"  = no ] || exit 0
@@ -90,6 +130,7 @@ case "$1" in
        if [ "$NEED_IDMAPD" = yes ] || [ "$NEED_GSSD" = yes ]
        then
            do_modprobe nfs
+           do_modprobe nfs4
            if do_mount rpc_pipefs $PIPEFS_MOUNTPOINT
            then
                if [ "$NEED_IDMAPD" = yes ]
@@ -101,6 +142,7 @@ case "$1" in
                fi
                if [ "$NEED_GSSD" = yes ]
                then
+                   do_modprobe rpcsec_gss_krb5
                    printf " gssd"
                    start-stop-daemon --start --quiet \
                            --make-pidfile --pidfile $GSSD_PIDFILE \
index 7b964a4558fa1bf6755237197564b56f71811d1d..9fd824293b145e58ce52fdc331ef3db00d57650b 100644 (file)
@@ -2,4 +2,3 @@ etc/init.d
 usr/sbin
 var/lib/nfs
 var/lib/nfs/v4recovery
-var/lib/nfs/rpc_pipefs
index 70877a89783693029880ab6cd6471faae7595c95..65117040dd3e2c95f421455dcf144632fb1ef024 100755 (executable)
@@ -50,12 +50,12 @@ binary-arch: build
        mkdir $(DEBTMP)
        # Add here commands to install the files into debian/tmp
        $(MAKE) install_prefix='$(DEBTMP)' install
-       dh_install --sourcedir=debian/tmp/
+       dh_install --sourcedir=debian/tmp
        # Fixups Start Here #
        cd debian && \
          for f in lockd statd showmount; do \
            perl -pi -e "s#/usr(/sbin/(rpc\\.)?$$f)#\$$1#g" \
-               nfs-common/usr/share/man/man8/$$f.8; \
+               tmp/usr/share/man/man8/$$f.8; \
          done; \
          cp --preserve=timestamps etc.exports nfs-kernel-server/etc/exports; \
          cp --preserve=timestamps idmapd.conf nfs-common/etc/; \