]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Imported Debian patch 1.1.1-4 debian/1%1.1.1-4
authorSteinar H. Gunderson <sesse@debian.org>
Mon, 29 Oct 2007 17:33:15 +0000 (18:33 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 14 Jul 2010 01:59:19 +0000 (02:59 +0100)
debian/changelog
debian/major.patch [deleted file]
debian/nfs-common.default
debian/nfs-common.init
debian/nfs-kernel-server.default
debian/nfs-kernel-server.init
debian/patches/08-clarify-unexport.patch [new file with mode: 0644]
debian/patches/series
debian/rules

index 30644af801307e81435c3de5879f8c67bb4c9248..34b54af4ed0dfdd42c1d07a5c1ef5dd51aee3033 100644 (file)
@@ -1,3 +1,16 @@
+nfs-utils (1:1.1.1-4) unstable; urgency=low
+
+  * Remove broken hack introduced in 1.1.1-3.
+  * Fix init script to work if the package has been removed but not purged;
+    patch adapted from Morita Sho. (Closes: #448251)
+  * Patch init script to allow not running rpc.statd or rpc.mountd (via
+    settings in /etc/default/), since they are not needed for an NFSv4-only
+    setup; patch adapted from David Härdeman. (Closes: #448234)
+  * Clarify language in the exportfs man page; patch adapted from 
+    David Liontooth. (Closes: #443591)
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Mon, 29 Oct 2007 18:33:15 +0100
+
 nfs-utils (1:1.1.1-3) unstable; urgency=low
 
   * Fixed "FTBFS: error: called object 'major' is not a function" by
diff --git a/debian/major.patch b/debian/major.patch
deleted file mode 100644 (file)
index f9aca07..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- utils/mountd/cache.c       2007-10-19 13:07:28.000000000 +1000
-+++ utils/mountd/cache.c       2007-10-22 19:24:07.274232106 +1000
-@@ -36,6 +36,16 @@
- #include "blkid/blkid.h"
- #endif
-+#ifdef major               /* Might be defined in sys/types.h.  */
-+#define HAVE_MAJOR
-+#endif
-+
-+#ifndef HAVE_MAJOR
-+#define major(dev)         (((dev) >> 8) & 0xff)
-+#define minor(dev)         ((dev) & 0xff)
-+#define makedev(maj, min)  (((maj) << 8) | (min))
-+#endif
-+#undef HAVE_MAJOR
- enum nfsd_fsid {
-       FSID_DEV = 0,
index 2e805f0862e8911b085ebc4a889268af06c92479..52f7f91c820a305db52628d16f2172ecbd122ca3 100644 (file)
@@ -2,6 +2,9 @@
 # autodetected; this should be sufficient for most people. Valid alternatives
 # for the NEED_ options are "yes" and "no".
 
+# Do you want to start the statd daemon? It is not needed for NFSv4.
+NEED_STATD=
+
 # Options for rpc.statd.
 #   Should rpc.statd listen on a specific port? This is especially useful
 #   when you have a port-based firewall. To use a fixed port, set this
index 2bfa59d2339961fd67897ec8e598db4644b19c7d..3cbb3229a54a9938e941d377b86b76c1bf676a72 100644 (file)
@@ -18,6 +18,7 @@ DESC="NFS common utilities"
 # Read config
 DEFAULTFILE=/etc/default/nfs-common
 PREFIX=
+NEED_STATD=yes
 NEED_IDMAPD=
 NEED_GSSD=
 PIPEFS_MOUNTPOINT=/var/lib/nfs/rpc_pipefs
@@ -28,6 +29,9 @@ fi
 
 . /lib/lsb/init-functions
 
+# Exit if required binaries are missing.
+[ -x $PREFIX/sbin/rpc.statd ] || exit 0
+
 #
 # Parse the fstab file, and determine whether we need idmapd and gssd. (The
 # /etc/defaults settings, if any, will override our autodetection.) This code
@@ -67,7 +71,6 @@ if [ -f /etc/exports ] && grep -q '^[[:space:]]*[^#]*/' /etc/exports; then
     AUTO_NEED_IDMAPD=yes
 fi
 
-
 case "$NEED_IDMAPD" in
     yes|no)    
         ;;
@@ -117,12 +120,14 @@ case "$1" in
   start)
        log_daemon_msg "Starting $DESC"
 
-       log_progress_msg "statd"
-       start-stop-daemon --start --oknodo --quiet \
-           --exec $PREFIX/sbin/rpc.statd -- $STATDOPTS
-       if [ $? != 0 ]; then
-           log_end_msg $?
-           exit $?
+       if [ "$NEED_STATD" = yes ]; then
+           log_progress_msg "statd"
+           start-stop-daemon --start --oknodo --quiet \
+               --exec $PREFIX/sbin/rpc.statd -- $STATDOPTS
+           if [ $? != 0 ]; then
+               log_end_msg $?
+               exit $?
+           fi
        fi
 
        # Don't start idmapd and gssd if we don't have them (say, if /usr is not
@@ -193,29 +198,35 @@ case "$1" in
                 exit $?
             fi
        fi
-       log_progress_msg "statd"
-       start-stop-daemon --stop --oknodo --quiet \
-           --name rpc.statd
-       if [ $? != 0 ]; then
-            log_end_msg $?
-            exit $?
-        fi
+       if ["$NEED_STATD" = yes ]
+       then
+           log_progress_msg "statd"
+           start-stop-daemon --stop --oknodo --quiet \
+               --name rpc.statd
+           if [ $? != 0 ]; then
+                log_end_msg $?
+                exit $?
+            fi
+       fi
        do_umount $PIPEFS_MOUNTPOINT 2>/dev/null || true
        log_end_msg 0
        ;;
 
   status)
-       if ! pidof rpc.statd >/dev/null
+       if [ "$NEED_STATD" = yes ]
        then
-           echo "rpc.statd not running"
-           exit 3
+           if ! pidof rpc.statd >/dev/null
+           then
+               echo "rpc.statd not running"
+               exit 3
+           fi
        fi
 
        if [ "$NEED_GSSD" = yes ]
        then
             if ! pidof rpc.gssd >/dev/null
            then
-               echo "rpc.statd running, but rpc.gssd halted"
+               echo "rpc.gssd not running"
                exit 3
            fi
        fi
@@ -224,12 +235,12 @@ case "$1" in
        then
             if ! pidof rpc.idmapd >/dev/null
            then
-               echo "rpc.statd running, but rpc.idmapd halted"
+               echo "rpc.idmapd not running"
                exit 3
            fi
        fi
 
-       echo "rpc.statd running"
+       echo "all daemons running"
        exit 0
        ;;
 
index 365f616ea98de74ee955e19a0cb6a2173bbb5715..63f5c6c1b8b7f399a368c0b0c0d369df63490b29 100644 (file)
@@ -4,6 +4,10 @@ RPCNFSDCOUNT=8
 # Runtime priority of server (see nice(1))
 RPCNFSDPRIORITY=0
 
+# Do you want to start the mountd daemon? It is not required for NFSv4.
+# Valid alternatives are "yes" and "no"; the default is "yes".
+NEED_MOUNTD=
+
 # Options for rpc.mountd.
 # If you have a port-based firewall, you might want to set up
 # a fixed port here using the --port option. For more information, 
index 84f9c4dcb1d0fec982f3d001bd70cf0be714ce5f..06c40e6da0b8985ffe3f55f498ba00a0a7a0b192 100644 (file)
@@ -27,6 +27,7 @@ DEFAULTFILE=/etc/default/nfs-kernel-server
 RPCNFSDCOUNT=8
 RPCNFSDPRIORITY=0
 RPCMOUNTDOPTS=
+NEED_MOUNTD=yes
 NEED_SVCGSSD=no
 RPCSVCGSSDOPTS=
 PROCNFSD_MOUNTPOINT=/proc/fs/nfsd
@@ -114,12 +115,14 @@ case "$1" in
                        fi
                fi
 
-               log_progress_msg "mountd"
-               start-stop-daemon --start --oknodo --quiet \
-                   --exec $PREFIX/sbin/rpc.mountd -- $RPCMOUNTDOPTS
-               if [ $? != 0 ]; then
-                       log_end_msg $?
-                       exit $?
+               if [ "$NEED_MOUNTD" != "no" ]; then
+                       log_progress_msg "mountd"
+                       start-stop-daemon --start --oknodo --quiet \
+                           --exec $PREFIX/sbin/rpc.mountd -- $RPCMOUNTDOPTS
+                       if [ $? != 0 ]; then
+                               log_end_msg $?
+                               exit $?
+                       fi
                fi
 
                log_end_msg 0
@@ -130,15 +133,17 @@ case "$1" in
 
   stop)
        log_daemon_msg "Stopping $DESC"
-       
-       log_progress_msg "mountd"
-       start-stop-daemon --stop --oknodo --quiet \
-           --name rpc.mountd --user 0
-       if [ $? != 0 ]; then
-               log_end_msg $?
-               exit $?
+
+       if [ "$NEED_MOUNTD" != "no" ]; then
+               log_progress_msg "mountd"
+               start-stop-daemon --stop --oknodo --quiet \
+                   --name rpc.mountd --user 0
+               if [ $? != 0 ]; then
+                       log_end_msg $?
+                       exit $?
+               fi
        fi
-               
+
        if [ "$NEED_SVCGSSD" = "yes" ]; then
                log_progress_msg "svcgssd"
                start-stop-daemon --stop --oknodo --quiet \
diff --git a/debian/patches/08-clarify-unexport.patch b/debian/patches/08-clarify-unexport.patch
new file mode 100644 (file)
index 0000000..9b203b8
--- /dev/null
@@ -0,0 +1,19 @@
+Index: nfs-utils-1.1.1/utils/exportfs/exportfs.man
+===================================================================
+--- nfs-utils-1.1.1.orig/utils/exportfs/exportfs.man
++++ nfs-utils-1.1.1/utils/exportfs/exportfs.man
+@@ -167,11 +167,13 @@ all entries listed in
+ are removed from the kernel export tables, and the file is cleared. This
+ effectively shuts down all NFS activity.
+ .P
+-To remove individual export entries, one can specify a
++To remove an export to a host, specify a
+ .I host:/path
+ pair. This deletes the specified entry from
+ .B xtab
+ and removes the corresponding kernel entry (if any).
++To remove one or more exports to several hosts, use
++.BR "exportfs -ua" .
+ .P
+ .\" -------------------- Dumping the Export Table -----------------
+ .SS Dumping the Export Table 
index cce0ff418b1f19b75193bd00af65c70c614c3031..7137944dc834147177be1b26d58268b83c9a3b6e 100644 (file)
@@ -1,3 +1,4 @@
+08-clarify-unexport.patch
 02-document-debian-init-scripts.patch
 03-sm-notify-in-sbin.patch
 05-ignore-quota-option.patch
index 81659a45170c0006cb3d3e9acb77c579459f8dbf..dcd8fb4d066843d5d41693119c9cbbb4ef0bdcdb 100755 (executable)
@@ -10,9 +10,6 @@ DEBTMP := $(CURDIR)/debian/tmp
 build: patch build-stamp
 build-stamp:
        dh_testdir
-ifeq ($(DEB_HOST_ARCH),arm)
-       patch -p0 -i debian/major.patch
-endif
        CFLAGS="-g -O2 -Wall" ./configure \
                --mandir='$${prefix}/share/man' \
                --enable-secure-statd \