]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Merge commit 'debian/1.0.6-3'
authorBen Hutchings <ben@decadent.org.uk>
Tue, 13 Jul 2010 02:51:44 +0000 (03:51 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 13 Jul 2010 02:51:44 +0000 (03:51 +0100)
17 files changed:
ChangeLog
debian/changelog
debian/etc.exports [new file with mode: 0644]
debian/nfs-common.config [deleted file]
debian/nfs-common.init
debian/nfs-common.postinst
debian/nfs-common.postrm
debian/nfs-common.templates [deleted file]
debian/nfs-kernel-server.NEWS [new file with mode: 0644]
debian/nfs-kernel-server.conffiles
debian/nfs-kernel-server.config [deleted file]
debian/nfs-kernel-server.postinst
debian/nfs-kernel-server.postrm
debian/nfs-kernel-server.templates [deleted file]
debian/rules
utils/exportfs/exports.man
utils/mountd/cache.c

index 1aeb0254bd42a81a907238aca6389911658cb945..98893a178254d271f65511755d5bfb09aa3d70ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2004-03-18  Chip Salzenberg  <chip@pobox.com>
+
+       * debian/changelog: Version 1.0.6-2.
+
+2004-02-24 NeilBrown <neilb@cse.unsw.edu.au>
+       from "J. Bruce Fields" <bfields@fieldses.org>
+
+       * utils/mountd/cache.c: call auth_reload to make sure auth data is
+       current before responding to kernel upcall.
+       
+2004-02-24 NeilBrown <neilb@cse.unsw.edu.au>
+       Based on patch from  Greg Banks <gnb@melbourne.sgi.com>
+
+       * utils/exportfs/exports.man: Document fsid= option.
+       
 2003-09-15 NeilBrown <neilb@cse.unsw.edu.au>
 
        Release 1.0.6
@@ -8,7 +23,7 @@
        utils/statd/Makefile: add "predep" rule so that "make dep" works.
        * Makefile: allow a simple "make" to run ./configure and "make dep"
        if needed.
-       * configure.in, nfs-utils.spec: Update version to 1.0.4
+       * configure.in, nfs-utils.spec: Update version to 1.0.6
        * run autoconf
        
 2003-09-12  Chip Salzenberg  <chip@pobox.com>
index 47210b1b942107e78348c964db3a71efe082b375..9ca0e7a69298f17ab11e309bcf038598992d89de 100644 (file)
@@ -1,3 +1,26 @@
+nfs-utils (1:1.0.6-3) unstable; urgency=medium
+
+  * Remove obsolete debconf-related files in debian/rules, because source
+    diffs don't implement removals.  (closes: #239331)
+
+ -- Chip Salzenberg <chip@debian.org>  Wed, 24 Mar 2004 18:09:21 -0500
+
+nfs-utils (1:1.0.6-2) unstable; urgency=medium
+
+  * Upstream CVS sync.
+  * Urgency "medium" to get debconf fix into testing.
+  * Remove debconf warning notes in favor of nfs-kernel-server.NEWS.
+    (closes: #228365)
+  * Make /etc/exports a conffile.  (closes: #224557)
+  * Clean up /var/lib/nfs in postrm.
+  * Test kernel version in init script; all kernels from 2.4 forward
+    have a lockd thread, and don't need rpc.lockd.  Probe older kernels
+    by checking for lockd-related symbols.  When in doubt, go ahead and
+    run rpc.lockd; if it's not needed, it exits.  (closes: #205867)
+  * Don't bother removing nfs-server's init links; it's long dead.
+
+ -- Chip Salzenberg <chip@debian.org>  Thu, 18 Mar 2004 17:06:00 -0500
+
 nfs-utils (1:1.0.6-1) unstable; urgency=low
 
   * New upstream version:
diff --git a/debian/etc.exports b/debian/etc.exports
new file mode 100644 (file)
index 0000000..26b16e1
--- /dev/null
@@ -0,0 +1,2 @@
+# /etc/exports: the access control list for filesystems which may be exported
+#              to NFS clients.  See exports(5).
diff --git a/debian/nfs-common.config b/debian/nfs-common.config
deleted file mode 100644 (file)
index 5edd12c..0000000
+++ /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
index f6c4a8ad2a3bad07c8019c0b6f7534a440c4f45a..59fc59df6fecad7429ec9b24a762a5b72675630e 100755 (executable)
@@ -22,16 +22,25 @@ if [ -f $DEFAULTFILE ]; then
     . $DEFAULTFILE
 fi
 
-# Determine whether lockd is required
+# Determine whether lockd daemon is required.
 case "$NEED_LOCKD" in
 yes|no)        ;;
-*)  # We must be conservative and run lockd,
-    #  unless we can prove that it's not required.
-    NEED_LOCKD=yes
-    if test -f /proc/ksyms
-    then
-       grep -q lockdctl /proc/ksyms || NEED_LOCKD=no
-    fi
+*)  case `uname -r` in
+    '' | [01].* | 2.[0123].* )
+       # Older kernels may or may not need a lockd daemon.
+       # We must assume they do, unless we can prove otherwise.
+       # (A false positive here results only in a harmless message.)
+       NEED_LOCKD=yes
+       if test -f /proc/ksyms
+       then
+           grep -q lockdctl /proc/ksyms || NEED_LOCKD=no
+       fi
+       ;;
+
+    *)  # Modern kernels (>= 2.4) start a lockd thread automatically.
+       NEED_LOCKD=no
+       ;;
+    esac
     ;;
 esac
 
index a69cf6a022f2d74a9517d2fcc47751f69203f7ff..5af4731e87791e704755457a4882f7731bcfb80c 100755 (executable)
@@ -12,6 +12,13 @@ case "$1" in
            update-rc.d -f nfs-common remove >/dev/null 2>&1 || true
        fi
        update-rc.d nfs-common defaults 21 79 >/dev/null
+
+       # Remove obsolete debconf questions
+       if [ -e /usr/share/debconf/confmodule ]; then
+           . /usr/share/debconf/confmodule
+           db_unregister nfs-common/tcpwrappers-statd || true
+           db_stop
+       fi
        ;;
 esac
 
index ff64e775d226d8839a31fb89ac1d8e80bb92f997..005c92843d3777d293763279deeb3380372938dd 100755 (executable)
@@ -5,5 +5,9 @@
 case "$1" in
     purge)
        update-rc.d nfs-common remove >/dev/null
+
+       rm -f /var/lib/nfs/state    \
+             /var/lib/nfs/sm/*     \
+             /var/lib/nfs/sm.bak/*
        ;;
 esac
diff --git a/debian/nfs-common.templates b/debian/nfs-common.templates
deleted file mode 100644 (file)
index 91f67f7..0000000
+++ /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.NEWS b/debian/nfs-kernel-server.NEWS
new file mode 100644 (file)
index 0000000..dcea315
--- /dev/null
@@ -0,0 +1,8 @@
+nfs-utils (1:1.0.1-1) unstable; urgency=low
+
+  * Exports default to "sync", that is, synchronous writes.
+    This is safer but MUCH SLOWER than the old default of "async".
+    All exports should be marked as either "sync" or "async" to
+    avoid a warning from exportfs.
+
+ -- Chip Salzenberg <chip@debian.org>  Mon, 26 Aug 2002 12:17:57 -0400
index bb8c3856f1e1089d3bc4ec9b48abf9d97067e358..78db6556e661d3d7c769337843de2ca85b6b1faf 100644 (file)
@@ -1,2 +1,3 @@
+/etc/exports
 /etc/default/nfs-kernel-server
 /etc/init.d/nfs-kernel-server
diff --git a/debian/nfs-kernel-server.config b/debian/nfs-kernel-server.config
deleted file mode 100644 (file)
index de5df58..0000000
+++ /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
index 4bef32204ac3b4c0876eb7ec70a56f8aa675e4c1..fa43e13a038e2bff459584ba46f7d7420dd38667 100755 (executable)
@@ -2,36 +2,26 @@
 
 #DEBHELPER#
 
-. /usr/share/debconf/confmodule
-
 case "$1" in
     configure)
-       db_get nfs-kernel-server/tcpwrappers-mountd || true
+       for f in /var/lib/nfs/etab  \
+                /var/lib/nfs/rmtab \
+                /var/lib/nfs/xtab; do
+           [ -e $f ] || touch $f
+       done
 
-       touch /var/lib/nfs/etab  \
-              /var/lib/nfs/rmtab \
-              /var/lib/nfs/xtab
+       update-rc.d nfs-kernel-server defaults 20 80 >/dev/null
 
-       if test -s /etc/exports
-       then
-           : do nothing
-       else
-           cat <<EOF >/etc/exports
-# /etc/exports: the access control list for filesystems which may be exported
-#              to NFS clients.  See exports(5).
-EOF
+       # Remove obsolete debconf questions
+       if [ -e /usr/share/debconf/confmodule ]; then
+           . /usr/share/debconf/confmodule
+           db_unregister nfs-kernel-server/sync-default || true
+           db_unregister nfs-kernel-server/tcpwrappers-mountd || true
+           db_stop
        fi
-
-       # The old nfs-server's init script can't tell that it's been
-       # removed, so we have to kill the symlinks to it.
-       update-rc.d -f nfs-server remove >/dev/null
-
-       update-rc.d nfs-kernel-server defaults 20 80 >/dev/null
        ;;
 esac
 
-db_stop
-
 act="restart"
 [ "$1:$2" = "configure:" ] && act="start"
 invoke-rc.d nfs-kernel-server $act
index a326cd3e8e54bc53aec8e9007d93a6be04399dd6..6ee42b7c02cbd7569c7bd5d41b0b84dda6edc91b 100755 (executable)
@@ -5,6 +5,10 @@
 case "$1" in
     purge)
        update-rc.d nfs-kernel-server remove >/dev/null
+
+       rm -f /var/lib/nfs/etab  \
+              /var/lib/nfs/rmtab \
+              /var/lib/nfs/xtab
        ;;
 esac
 
diff --git a/debian/nfs-kernel-server.templates b/debian/nfs-kernel-server.templates
deleted file mode 100644 (file)
index 85d86e4..0000000
+++ /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.
index 344bf6ed1f7aaad1fd333cde4ddd9560c5d346fd..4c8834b9a972912d7581f23fab1e91b3b357b29b 100755 (executable)
@@ -13,6 +13,13 @@ DEBTMP       := $(shell pwd)/debian/tmp
 
 build: build-stamp
 build-stamp:
+       # Debian source diffs don't reflect removals.
+       # This kludge will suffice until the next upstream version. *sigh*
+       rm -f debian/nfs-common.config          \
+             debian/nfs-common.templates       \
+             debian/nfs-kernel-server.config   \
+             debian/nfs-kernel-server.templates
+
        dh_testdir
        # Add here commands to compile the package.
        $(SETGCC) ./configure \
@@ -51,7 +58,8 @@ binary-arch: build
          done; \
          rm -f tmp/usr/sbin/*quota*; \
          rm -f tmp/usr/share/man/man8/*quota*; \
-         rm -rf tmp/var/lib/nfs/*
+         rm -rf tmp/var/lib/nfs/*; \
+         cp --preserve=timestamps etc.exports tmp/etc/exports
        # Fixups End Here #
        dh_installdocs -A README
        dh_installexamples
index 62239441f6f8485e027b7ea33abd1401e40e56db..034a896225e09c84001e9365b941397b54350306 100644 (file)
@@ -256,6 +256,28 @@ If a path is given (e.g.
 then the nominted path must be a mountpoint for the exportpoint to be
 exported.
 
+.TP
+.IR fsid= num
+This option forces the filesystem identification portion of the file
+handle and file attributes used on the wire to be
+.I num
+instead of a number derived from the major and minor number of the
+block device on which the filesystem is mounted.  Any 32 bit number
+can be used, but it must be unique amongst all the exported filesystems.
+
+This can be useful for NFS failover, to ensure that both servers of
+the failover pair use the same NFS file handles for the shared filesystem
+thus avoiding stale file handles after failover.
+
+Some Linux filesystems are not mounted on a block device; exporting
+these via NFS requires the use of the
+.I fsid
+option (although that may still not be enough).
+
+The value  0 has a special meaning when use with NFSv4.  NFSv4 has a
+concept of a root of the overall exported filesystem. The export point
+exported with fsid=0 will be used as this root.
+
 .SS User ID Mapping
 .PP
 .I nfsd
index a265ecda9f6412fefa457b79a915f32cfa0506c9..3a166419e4e7892cce9970da192b95e5de9f24ec 100644 (file)
@@ -67,6 +67,8 @@ void auth_unix_ip(FILE *f)
        if (inet_aton(ipaddr, &addr)==0)
                return;
 
+       auth_reload();
+
        /* addr is a valid, interesting address, find the domain name... */
        client = client_compose(addr);
 
@@ -138,6 +140,8 @@ void nfsd_fh(FILE *f)
                break;
        }
 
+       auth_reload();
+
        /* Now determine export point for this fsid/domain */
        for (i=0 ; i < MCL_MAXTYPES; i++) {
                for (exp = exportlist[i]; exp; exp = exp->m_next) {
@@ -236,6 +240,8 @@ void nfsd_export(FILE *f)
        if (qword_get(&cp, path, strlen(lbuf)) <= 0)
                goto out;
 
+       auth_reload();
+
        /* now find flags for this export point in this domain */
        for (i=0 ; i < MCL_MAXTYPES; i++) {
                for (exp = exportlist[i]; exp; exp = exp->m_next) {