]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Merge branch 'upstream'
authorBen Hutchings <ben@decadent.org.uk>
Wed, 14 Jul 2010 01:29:37 +0000 (02:29 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 14 Jul 2010 01:29:37 +0000 (02:29 +0100)
Conflicts:
config.guess
config.sub
configure
debian/changelog
debian/control
debian/etc.exports
debian/nfs-common.default
debian/nfs-common.dirs
debian/nfs-common.init
debian/nfs-common.install
debian/nfs-common.postinst
debian/nfs-common.postrm
debian/nfs-common.prerm
debian/nfs-kernel-server.default
debian/nfs-kernel-server.dirs
debian/nfs-kernel-server.init
debian/nfs-kernel-server.postinst
debian/nfs-kernel-server.postrm
debian/nfs-kernel-server.prerm
debian/rules
utils/gssd/Makefile
utils/svcgssd/Makefile

50 files changed:
confdefs.h [new file with mode: 0644]
debian/README.Debian.nfsv4 [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/etc.exports [new file with mode: 0644]
debian/etc.exports.md5sum [new file with mode: 0644]
debian/gssapi_mech.conf [new file with mode: 0644]
debian/gssapi_mech.conf.md5sum [new file with mode: 0644]
debian/idmapd.conf [new file with mode: 0644]
debian/idmapd.conf.md5sum [new file with mode: 0644]
debian/nfs-common.conffiles [new file with mode: 0644]
debian/nfs-common.default [new file with mode: 0644]
debian/nfs-common.default.md5sum [new file with mode: 0644]
debian/nfs-common.dirs [new file with mode: 0644]
debian/nfs-common.files [new file with mode: 0644]
debian/nfs-common.init [new file with mode: 0755]
debian/nfs-common.install [new file with mode: 0644]
debian/nfs-common.links [new file with mode: 0644]
debian/nfs-common.manpages [new file with mode: 0644]
debian/nfs-common.postinst [new file with mode: 0755]
debian/nfs-common.postrm [new file with mode: 0755]
debian/nfs-common.prerm [new file with mode: 0755]
debian/nfs-kernel-server.NEWS [new file with mode: 0644]
debian/nfs-kernel-server.conffiles [new file with mode: 0644]
debian/nfs-kernel-server.default [new file with mode: 0644]
debian/nfs-kernel-server.default.md5sum [new file with mode: 0644]
debian/nfs-kernel-server.dirs [new file with mode: 0644]
debian/nfs-kernel-server.init [new file with mode: 0755]
debian/nfs-kernel-server.install [new file with mode: 0644]
debian/nfs-kernel-server.links [new file with mode: 0644]
debian/nfs-kernel-server.manpages [new file with mode: 0644]
debian/nfs-kernel-server.postinst [new file with mode: 0755]
debian/nfs-kernel-server.postrm [new file with mode: 0755]
debian/nfs-kernel-server.prerm [new file with mode: 0755]
debian/nhfsstone.dirs [new file with mode: 0644]
debian/nhfsstone.files [new file with mode: 0644]
debian/nhfsstone.install [new file with mode: 0644]
debian/nhfsstone.postinst [new file with mode: 0644]
debian/nhfsstone.prerm [new file with mode: 0644]
debian/rules [new file with mode: 0755]
support/export/export.c
support/nfs/clients.c
support/nfs/exports.c
utils/exportfs/exportfs.c
utils/exportfs/exports.man
utils/mountd/mountd.c
utils/mountd/mountd.man
utils/nhfsstone/nhfsrun

diff --git a/confdefs.h b/confdefs.h
new file mode 100644 (file)
index 0000000..0010349
--- /dev/null
@@ -0,0 +1,4 @@
+
+#define NFS3_SUPPORTED 1
+#define NFS4_SUPPORTED 1
+#define GSS_SUPPORTED 1
diff --git a/debian/README.Debian.nfsv4 b/debian/README.Debian.nfsv4
new file mode 100644 (file)
index 0000000..70accc4
--- /dev/null
@@ -0,0 +1,52 @@
+NFSv4 in Debian
+===============
+
+NFSv4 support in Debian is rather new, and not fully supported yet. If you want
+to experiment, make sure you have:
+
+ - a recent 2.6 kernel on both client and server; newer is better. You might even
+   want to use CITI's patch set from http://www.citi.umich.edu/projects/nfsv4/linux/ .
+ - a recent enough version of nfs-utils on both client and server (you probably
+   have on at least one of them, since you're reading this file!).
+ - a patched mount, which will hopefully enter the archive soon at the time of
+   writing -- otherwise, you'll have to enable the patch in the Debian package
+   yourself and rebuild it. (It is not enabled by default, since the current version
+   of the patch breaks mounting against NFSv2-only servers, such as nfs-user-server.)
+
+The export structure might be a bit confusing if you're already familiar with
+NFSv2 or NFSv3. The biggest difference is that you will need to export an explicit
+root of your pseudofilesystem, like this /etc/exports fragment:
+
+  /nfs4                   hostname(rw,sync,fsid=0,crossmnt)
+
+(It doesn't need to be named "nfs4".) Then you can mount other volumes under that,
+like:
+
+  /nfs4/music             hostname(rw,sync)
+  /nfs4/movies            hostname(rw,sync)
+
+Then your client can mount shares like this:
+
+  mount -t nfs4 server:/music /mnt/music
+
+Since you might not have everything under one root, you might want /nfs4/* on the
+server to be bind mounts, ie.:
+
+  mount --bind /srv/music /nfs4/music
+
+or in /etc/fstab:
+
+  /srv/music /nfs4/music none bind 0 0
+  
+If you do not wish to use host-based authentication, you can specify "gss/krb5"
+instead of a hostname to get Kerberos-based authentication instead. For this, 
+you will need an "nfs/hostname@REALM" entry in /etc/krb5.keytab, as well as
+rpc.gssd running on the client (enable it manually in /etc/default/nfs-common)
+and rpc.svcgssd running on the server (it should be autodetected once you put
+Kerberos mounts in /etc/exports).
+
+If you use "gss/krb5i", you will also get integrity (ie. authentication), and
+with "gss/krb5p", you'll also get privacy (ie.  encryption). Make sure your
+kernel supports this; not all kernels do.
+
+ -- Steinar H. Gunderson <sesse@debian.org>, Wed, 05 Apr 2006 18:09:47 +0200
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..9d41fc9
--- /dev/null
@@ -0,0 +1,719 @@
+nfs-utils (1:1.0.7-19) unstable; urgency=low
+
+  * Include the md5sum for /etc/default/nfs-common from 1:1.0.7-15, to
+    make ucf not complain when upgrading from that version. (Closes: #368982)
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Sat, 27 May 2006 12:54:50 +0200
+
+nfs-utils (1:1.0.7-18) unstable; urgency=low
+
+  * Make /etc/exports, /etc/default/nfs-{common,kernel-server},
+    /etc/idmapd.conf and /etc/gssapi_mech.conf be managed by ucf
+    instead of being conffiles. (Closes: #353501)
+    * Make directories /usr/share/nfs-{common,kernel-server}/conffiles,
+      and install files in there at debian/rules time. At the same time,
+      install the files with install instead of cp.
+    * Call ucf at postinst time to get the files in.
+    * Correspondingly, call ucf at purge time to remove them as needed (code
+      snippets lifted from autofs).
+    * Make nfs-common and nfs-kernel-server depend on ucf.
+    * Remove the call to dh_installinit -- since it was already not modifying
+      postinst/postrm/prerm scripts due to being called with -n (I must admit
+      I don't know why, but I assume this has a good reason :-) ) and we now
+      install the init script ourself (because we don't want dh_installinit
+      to install our .default files to /etc), it doesn't do anything useful
+      for us.
+    * Include .md5sum files with MD5 checksums of previous defaults shipped,
+      to ease the transition into ucf; at the moment, only checksums from
+      1:1.0.7-17 (the last non-ucf version) and 1:1.0.6-3.1 (the version
+      shipped in sarge) are included, but I think that should actually cover
+      all the defaults shipped in the period between as well.
+    * Install the .md5sum files in debian/rules.
+  * Remove call to dh_installexamples in debian/rules; we don't install any
+    examples.
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Mon, 22 May 2006 01:44:33 +0200
+
+nfs-utils (1:1.0.7-17) unstable; urgency=low
+
+  * The umounting of rpc_pipefs is non-critical and will fail if there are
+    any active NFS mounts during, say, a restart. Thus, send its stderr to
+    /dev/null, and ignore its error status.
+  * Build-Depend on perl, as it's used in debian/rules.
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Sun, 14 May 2006 18:22:19 +0200
+
+nfs-utils (1:1.0.7-16) unstable; urgency=high
+
+  * urgency=high; fixes an RC bug.
+  * If one upgraded from 1:1.0.7-13, /var/lib/nfs might never be set as owned
+    by statd. Bump the version check, so everything before this version gets
+    chowned properly. (Closes: #367009)
+  * Add more detailed explanations and links to the Debian wiki for
+    /etc/defaults/nfs-{common,kernel-server}. (Closes: #366989, #366990)
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Sat, 13 May 2006 16:06:08 +0200
+
+nfs-utils (1:1.0.7-15) unstable; urgency=low
+
+  * /var/lib/nfs/state is not a directory; it shouldn't really be mkdir-ed
+    or chowned (unless it already exists, in which case it should be
+    chowned). However, /var/lib/nfs should be owned by statd, so it can
+    create the file there. (Really Closes: #366654)
+  * umount /var/lib/nfs/rpc_pipefs on /etc/init.d/nfs-common stop; not doing
+    so could prevent purging of nfs-common.
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Thu, 11 May 2006 12:42:13 +0200
+
+nfs-utils (1:1.0.7-14) unstable; urgency=high
+
+  * urgency=high; fixes RC bugs (or at least, bugs that should have been RC).
+  * Add /var/lib/nfs/state to nfs-common.dirs, since we chown it in the
+    postinst. This would prevent nfs-common from configuring on initial
+    install. (Closes: #366654)
+  * Grep after "init_nf(sd|<tab>)" instead of "init_nfsd" in kallsyms, to work
+    around some odd symbol mangling problems on some alpha kernels.
+    (Closes: #363932)
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Wed, 10 May 2006 22:00:59 +0200
+
+nfs-utils (1:1.0.7-13) unstable; urgency=low
+
+  * Up the Standards-Version to 3.7.2; no changes needed.
+  * Tidy up after the /home/statd mess if there was a chance the user ever
+    had 1:1.0.7-10 installed; based on patch from Oskar Liljeblad.
+    (Closes: #366182)
+  * Fix the version check for the chown-ing of /var/lib/nfs/sm etc.; I
+    forgot to include the epoch, so only new installs ever got statd running
+    as non-root. (Due to this, the version number to test against is of course
+    also bumped.)
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Sat,  6 May 2006 01:50:10 +0200
+
+nfs-utils (1:1.0.7-12) unstable; urgency=low
+
+  * Move the home directory again (by request), this time to /var/lib/nfs.
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Wed,  3 May 2006 21:27:18 +0200
+
+nfs-utils (1:1.0.7-11) unstable; urgency=low
+
+  * When creating statd user, create it with a home directory of /nonexistant;
+    it doesn't really require a home directory. (Closes: #365514, #365721)
+  * Fix the signal number for USR1 (actually, use the name instead) in
+    nhfsrun. (Closes: #365657)
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Wed,  3 May 2006 19:51:17 +0200
+
+nfs-utils (1:1.0.7-10) unstable; urgency=low
+
+  * Intermediate 1.0.7 release, waiting for librpcsecgss to be uploaded into
+    Debian so we can upload 1.0.8.
+  * Clarify what the NEED_* options in /etc/default/nfs-common mean.
+    (Closes: #364625)
+  * Make /var/lib/nfs/{sm,sm.bak,state,rpc_pipefs} be owned by a new "statd"
+    user (created in postinst), causing rpc.statd to be run as that user
+    instead of root. (Closes: #240689)
+    * Make nfs-common depend on adduser.
+  * Clear out obsolete (pre-sarge) debconf and rc.d purging from postinst
+    script.
+  * Use invoke-rc.d in nfs-common and nfs-kernel-server prerms instead of
+    calling the /etc/init.d script directly; fixes two lintian warnings.
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Thu, 27 Apr 2006 00:32:27 +0200
+
+nfs-utils (1:1.0.7-9) unstable; urgency=low
+
+  * When checking for nfsd support in the kernel, check for init_nfsd
+    (which is a function) rather than nfsd_version (which is a variable);
+    kernels compiled without CONFIG_KALLSYMS_ALL=y have only the former.
+    (Closes: #361026)
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Thu,  6 Apr 2006 13:31:48 +0200
+
+nfs-utils (1:1.0.7-8) unstable; urgency=low
+
+  * Don't complain about missing sync/async for a read-only export.
+    (Closes: #265409)
+  * Implement --state-directory-path for rpc.mountd; most code borrowed
+    from rpc.statd. (Closes: #352387)
+    * Update mountd.man accordingly.
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Wed,  5 Apr 2006 22:54:09 +0200
+
+nfs-utils (1:1.0.7-7) unstable; urgency=high
+
+  * urgency=high, fixes an RC bug.
+  * Let the init script test for kernel support before trying to start
+    nfs-kernel-server. (Closes: #360420)
+  * Include help on how to activate /etc/exports changes; text from
+    Martin Pool. (Closes: #239286)
+  * Document sync option in exports man page. (Closes: #297135)
+  * Give an example in /etc/exports. (Closes: #345460)
+  * Write a mini-HOWTO on how to get NFSv4 up and running. (Closes: #294468)
+    * Install it in debian/rules.
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Wed,  5 Apr 2006 18:15:20 +0200
+
+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. :-)
+  * Don't let the init script fail if there wasn't any lockd threads to kill;
+    this could cause the package to fail configuration.
+  * Move to debhelper compatibility level 5.
+    * Use dh_install instead of dh_movefiles (actually a combination was used
+      earlier). Move stuff from *.files accordingly into *.install.
+    * mkdir debian/tmp manually before doing make install, and remove it
+      in the clean target.
+    * Use straight cp -a instead of dh_install for the files that _don't_
+      come from debian/tmp/ (the two /etc files).
+    * Fix the "fixups" part in debian/rules to reflect the behaviour of
+      dh_install compared to dh_movefiles (ie. don't rm lots of stuff in
+      debian/tmp, etc.).
+    * Make a debian/nfs-kernel-server.install listing explicitly the files
+      we want in that package; with dh_movefiles everything from make install
+      was implicitly put there. This has the side effect that the man pages
+      for rpc.gssd and idmap.conf are no longer put in nfs-kernel-server, but
+      in nfs-common, where they should be.
+    * Use dh_installman to install the manpages, to make sure they're in the
+      right place (and move the manpage lists from *.files to *.manpages
+      accordingly). List the rpc.* variants of the manpages in *.links,
+      instead of assuming dh_compress (!) will make them for us. Bonus points
+      for then not including the nonsensical rpc.* variants, such as
+      rpc.idmapd.conf(5).
+    * Don't mv lockd, statd and showmount manually from /usr/sbin to /sbin;
+      let the .install file do it for us.
+    * Remove *.conffiles; debhelper now sets everything in /etc as conffiles
+      automatically.
+    * Extend the debian/rules rm hack to the files we removed in this version
+      (ick).
+    * In debian/control, make nfs-common replace nfs-kernel-server
+      (<< 1:1.0.7-5), since the idmapd manpage switched packages.
+  * Remove old cruft in debian/rules file:
+    * Remove non-used dh_* programs.
+    * Remove obsolete source and diff targets.
+    * Remove SETGCC hack.
+  * Don't set rpath for rpc.gssd and rpc.svcgssd (fixes lintian warnings).
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Tue, 28 Mar 2006 02:57:23 +0200
+
+nfs-utils (1:1.0.7-4) unstable; urgency=low
+
+  * Ack NMU. Thanks Steinar H. Gunderson.
+    Closes: #239230, #245449, #246904, #247473, #248300, #252081,
+    #287026, #294928, #303497, #310940, #323460, #326663, #332047,
+    #337836, #338292, #359024.
+  * Added Steinar H. Gunderson and Daniel Baumann as uploaders.
+  * Added homepage to package descriptions.
+  * Set Standards-Version to 3.6.2.
+  * Fixed outdated-autotools-helper-file.
+
+ -- Anibal Monsalve Salazar <anibal@debian.org>  Mon, 27 Mar 2006 13:22:51 +1100
+
+nfs-utils (1:1.0.7-3.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Set u+w on all files in debian/, so dch etc. actually works.
+  * Add /var/lib/nfs/v4recovery to nfs-kernel-server.dirs. (Closes: #337836).
+  * Add /var/lib/nfs/rpc_pipefs to nfs-kernel-server.dirs. (Closes: #310940).
+  * Fix problems with exportfs -o when there are multiple entries of the same
+    type for the same path that match a given client; patch from Fumihiko
+    Kakuma. (Closes: #245449)
+  * Start nfs-kernel-server even if /etc/exports is empty, as long as it
+    exists; patch from Alexis Huxley. (Closes: #246904) This patch also
+    happens to fix and thus Closes: #338292.
+  * When stopping daemons, do it even if they do not run as root; based on a
+    patch from Andreas Schmidt. (Closes: #247473)
+  * SIGKILL kernel lockd thread on stop, to make the kernel release all its
+    locks; patch from Jeffrey Layton. (Closes: #252081)
+  * Flush the kernel export table on stop; patch from Jeffrey Layton
+    (Closes: #248300).
+  * Change default root-squashed uid from -2 to 65534; the former changes
+    depending of the size of uid_t, and we want it to match the user "nobody"
+    (which has uid 65534). (Closes: #323460)
+  * Remove dependency on debconf, as it's no longer used. Also, don't run
+    dh_installdebconf anymore. (Closes: #332047)
+  * Check for /sbin/modprobe before using it, for non-modular kernels;
+    patch from Vincent Crvt. (Closes: #294928)
+  * Replaced the rather emtpy nhfsstone long description by the one from
+    its manpage. (Closes: #303497)
+  * Don't ship upstream README anymore, as it's not relevant for our users.
+    (Closes: #326663)
+  * Add the ability to start nfs-kernel-server niced; patch from Kimmo
+    Tervinen. (Closes: #287026)
+  * Escape '#' when writing export entries, so they are not mistakenly parsed
+    as comments when re-reading them. (Closes: #239230)
+  * Also Closes: #359024 automatically by recompiling package.
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Sun, 26 Mar 2006 14:57:50 +0200
+
+nfs-utils (1:1.0.7-3) unstable; urgency=medium
+
+  * New maintainer, closes: #303559.
+
+ -- Anibal Monsalve Salazar <anibal@debian.org>  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 <chip@debian.org>  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 <chip@debian.org>  Tue, 11 Jan 2005 23:31:05 -0500
+
+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:
+    > Workaround glibc bug with large fd rlimits.
+  * Japanese debconf translation from Kenshi Muto <kmuto@debian.org>.
+    (closes: #209370)
+
+ -- Chip Salzenberg <chip@debian.org>  Fri, 12 Sep 2003 12:47:58 -0400
+
+nfs-utils (1:1.0.5-3) unstable; urgency=high
+
+  * Upstream CVS sync:
+    > Fix crash on invalid reverse DNS.  (closes: #209318)
+
+ -- Chip Salzenberg <chip@debian.org>  Tue,  9 Sep 2003 14:02:46 -0400
+
+nfs-utils (1:1.0.5-2) unstable; urgency=low
+
+  * Upstream CVS sync:
+    > Improve support for 2.6.0 /proc interface.
+  * Use po-debconf.  Patch from Andre Luis Lopes <andrelop@ig.com.br>,
+    with improved French from Christian Perrier <bubulle@debian.org>.
+    (closes: #187866, #202196)
+
+ -- Chip Salzenberg <chip@debian.org>  Wed, 20 Aug 2003 17:03:44 -0400
+
+nfs-utils (1:1.0.5-1) unstable; urgency=high
+
+  * New upstream version:
+    > Don't use freed memory.  (closes: #201311, #201598, #201873)
+    > Fix mountd -o arg.  (closes: #197355)
+  
+ -- Chip Salzenberg <chip@debian.org>  Thu, 24 Jul 2003 15:40:12 -0400
+
+nfs-utils (1:1.0.3-2) unstable; urgency=high
+
+  * Upstream CVS sync:
+    > Fix one-byte buffer overflow in logging code.
+
+ -- Chip Salzenberg <chip@debian.org>  Tue, 10 Jun 2003 11:11:56 -0400
+
+nfs-utils (1:1.0.3-1) unstable; urgency=low
+
+  * New upstream version:
+    > Support reading and writing export cache in /proc/rpc/*/channel,
+      as current syscall interface may not survive into 2.6 on all archs.
+
+ -- Chip Salzenberg <chip@debian.org>  Wed, 26 Mar 2003 11:38:52 -0500
+
+nfs-utils (1:1.0.2-2) unstable; urgency=medium
+
+  * Upstream CVS sync:
+    > Fix one-byte buffer overflow with no apparent security implications.
+      (It's a readlink on a path that should be writable only to root.)
+  * Make nfs-{common,kernel-server} depend on sysvinit 2.80-1 for invoke-rc.d.
+  * Make nfs-common depend on debconf (long overdue).
+  * Fix package description to name nfs-user-server as an alternative, rather
+    than "nfs-server" (which no longer exists).
+
+ -- Chip Salzenberg <chip@debian.org>  Wed, 12 Feb 2003 21:27:24 -0500
+
+nfs-utils (1:1.0.2-1) unstable; urgency=high
+
+  * New upstream version:
+    > Allow program stdin to be a non-INET socket.  (closes: #142557)
+  * Start nfs-common after nfs-kernel-server so that the server is running
+    when statd restarts; without this change, a rebooting server may make
+    clients lose mounts.  (This postinst removes bad rc.d links from old
+    packages.)  From Philippe Troin <phil@fifi.org>.  (closes: #160800)
+  * Make init scripts exit with non-zero status when daemons don't start.
+  * Add titles to templates where I forgot them.  (closes: #158489)
+  * Add /etc/default/{nfs-common,nfs-kernel-server} so setting random
+    parameters doesn't require editing init scripts.  (closes: #131539)
+  * Split templates into separate files, and add French templates.
+    (closes: #134630)
+  * Use invoke-rc.d to avoid premature daemon starts.  (closes: 158574)
+  * Change priority of nfs-kernel-server to 'optional'.
+
+ -- Chip Salzenberg <chip@debian.org>  Sun, 15 Sep 2002 22:00:27 -0400
+
+nfs-utils (1:1.0.1-1) unstable; urgency=low
+
+  * New upstream version:
+    > BIG CHANGE: 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.
+  * Patches from CVS through 2002-08-26.
+  * Let init script start statd on a specific port.  (closes: #144344)
+  * Fix typo in debconf message about tcpwrappers.  (closes: #128709)
+  * Fix typo in rpc.nfsd(8).  (closes: #152556)
+  * Add Russian templates.  (closes: #136599, #136932)
+
+ -- Chip Salzenberg <chip@debian.org>  Mon, 26 Aug 2002 12:17:57 -0400
+
+nfs-utils (1:1.0-2) unstable; urgency=low
+
+  * Fail an export if its mapping option is unsupported.  (closes: #85678)
+
+ -- Chip Salzenberg <chip@debian.org>  Wed,  2 Jan 2002 15:52:37 -0800
+
+nfs-utils (1:1.0-1) unstable; urgency=medium
+
+  * New upstream version.  (Version number is only change.)
+  * Urgency "medium" so woody users see the pretty new version number.
+    (Yeah, it's shallow... but, doggone it, this is mature code.)
+
+ -- Chip Salzenberg <chip@debian.org>  Wed, 26 Dec 2001 20:21:15 -0800
+
+nfs-utils (1:0.3.3-6) unstable; urgency=high
+
+  * Upstream fixes:
+    > Ignore case when comparing host names.
+    > Use all addresses of multi-homed hosts in export processing.
+    > When reading /proc/fs/nfs/exports, assume noasync and nowgather;
+      older kernels did so, while newer kernels report them explicitly.
+    > Remove man page refs to "hosts_allow(5)".  (closes: #122540)
+    > In exports.5: Emphasize the need for options to immediately follow
+      client names.  Explain that wildcards don't usually work on addresses,
+      but may work when reverse DNS fails. (closes: #118040, #116039)
+
+ -- Chip Salzenberg <chip@debian.org>  Wed, 26 Dec 2001 18:54:35 -0800
+
+nfs-utils (1:0.3.3-5) unstable; urgency=high
+
+  * Keep NFS fully operational during upgrade.  (closes: #76544)
+  * When calling update-rc.d, send stdout to /dev/null, but not stderr.
+
+ -- Chip Salzenberg <chip@debian.org>  Thu, 13 Dec 2001 18:50:47 -0800
+
+nfs-utils (1:0.3.3-4) unstable; urgency=high
+
+  * High priority due to changes in previous version.
+  * Upstream fixes:
+    > Close filehandles in nfsd before spawing kernel threads.  This is a
+      workaround for a kernel bug.  (closes: #121213)
+    > Document that both host names *and* addresses are checked with tcpwrappers.
+      This is a doc update, not a change.  (closes: #108493)
+    > Don't assume that strings starting with digits are IP addresses;
+      host names are allowed to start with digits.  (closes: #68977)
+  * German template for nfs-common.  (closes: #120939)
+
+ -- Chip Salzenberg <chip@debian.org>  Mon, 26 Nov 2001 11:50:43 -0800
+
+nfs-utils (1:0.3.3-3) unstable; urgency=low
+
+  * Upstream fixes:
+    > Accept obsolete mount option "crossmnt" for parsing old xtab files
+      after upgrade.  (closes: #78801)
+    > Put filenames into more error messages.
+  * Stop debconf before starting nfsd to avoid a hang.  Kernel threads
+    like nfsd aren't supposed to inherit open files from the programs that
+    start them, but nfsd does.  See debconf tutorial.  (closes: #115817)
+  * Rebuild with current glibc.  (closes: #119545)
+  * Carefully account for ownership of /var/lib/nfs/*.  (closes: #117258)
+  * Warn about statd using tcpwrappers.  (closes: #92666)
+  * Only warn about mountd's tcpwrappers name change if the old name
+    appears in the tcpwrapper config files.
+  * German template for nfs-kernel-server.  (closes: #117196)
+
+ -- Chip Salzenberg <chip@debian.org>  Wed, 21 Nov 2001 18:30:36 -0800
+
+nfs-utils (1:0.3.3-2) unstable; urgency=high
+
+  * The "Test It Before Release, Stupid" release.
+  * Repair total failure of rpc.mountd.  (closes: #115095)
+
+ -- Chip Salzenberg <chip@debian.org>  Thu, 11 Oct 2001 13:03:45 -0700
+
+nfs-utils (1:0.3.3-1) unstable; urgency=medium
+
+  * The "Life Goes On" release.
+  * New upstream version.  (closes: #113042)
+    > Avoid DNS when unexporting... important for shutdown.
+    > Recognize double-quote and \octal quoting in pathnames.
+    > Print pathnames with \octal quoting as necessary.
+  * Depend on a version of glibc that restores rpcinfo to its rightful
+    place.  (closes: #102400)
+  * Fix pathname in mountd doc.  (closes: #112088)
+  * debian/nfs-kernel-server.postinst: Remove rc.d symlinks to old
+    nfs-server init script, which doesn't realize when it's been removed.
+    (closes: #97099)
+  * Warn users about "rpc.mountd" -> "mountd" in /etc/hosts.{allow,deny}.
+    This marks my first use of debconf!  W00T!  (closes: #92671)
+
+ -- Chip Salzenberg <chip@debian.org>  Mon,  8 Oct 2001 15:04:08 -0700
+
+nfs-utils (1:0.3.2-2) unstable; urgency=low
+
+  * Rebuild with new libc.  (closes: #97252, #97455, #99829, #100317)
+  * Fix typo in nfs-kernel-server init script.  (closes: #100380)
+  * Start all daemons in root directory.
+  
+ -- Chip Salzenberg <chip@debian.org>  Fri, 15 Jun 2001 15:57:18 -0700
+
+nfs-utils (1:0.3.2-1) unstable; urgency=low
+
+  * Upstream changes to statd:
+    > Recognize long options.
+    > On startup, close std{in,out,err}.
+    > Updated man page.
+  * Let debhelper handle doc symlinks.  (closes: #74094)
+  * Rename upstream changelog, per policy.
+  * Get rid of suidregister call.
+
+ -- Chip Salzenberg <chip@debian.org>  Sun,  1 Apr 2001 19:21:26 -0700
+
+nfs-utils (1:0.3.1-1) unstable; urgency=medium
+
+  * New upstream version.
+  * Incorporate (but not all) Bug Party changes by David LaBissoniere
+    <labiss@usit.net>:
+    > Mention upstream source and license in copyright file.  (closes: #79997)
+    > Add Build-Depends for debhelper and libwrap0-dev.  (closes: #84131)
+
+ -- Chip Salzenberg <chip@debian.org>  Mon, 26 Feb 2001 16:51:15 -0800
+
+nfs-utils (1:0.3-2) unstable; urgency=low
+
+  * Upstream:
+    > Don't modify socket buffer sizes.
+
+ -- Chip Salzenberg <chip@debian.org>  Mon, 12 Feb 2001 20:46:22 -0800
+
+nfs-utils (1:0.3-1) unstable; urgency=low
+
+  * New upstream.
+
+ -- Chip Salzenberg <chip@debian.org>  Sun, 28 Jan 2001 18:13:59 -0800
+
+nfs-utils (1:0.2.1-5) unstable; urgency=low
+
+  * Fix statd callback protection ("--secure-statd") to
+     1. work with current kernels as far as possible, and
+     2. allow for Trond's recent NFS patches, which change the
+        static callback RPC procedure.
+  * Store return values of getc and getopt in int variables:
+    they can return EOF, which requires an int. (From NMU)
+  
+ -- Chip Salzenberg <chip@debian.org>  Sat, 20 Jan 2001 20:03:07 -0800
+
+nfs-utils (1:0.2.1-4) unstable; urgency=medium
+
+  * Warn about common errors in /etc/exports.  (closes: #66421)
+  * Fix line numbers in messages about /etc/exports.  (closes: #59734)
+  * Let nhfsstone replace files from old server packages.  (closes: #59261)
+
+ -- Chip Salzenberg <chip@valinux.com>  Sun,  3 Dec 2000 14:41:13 -0800
+
+nfs-utils (1:0.2.1-3) unstable; urgency=low
+
+  * Add portmap dependency. (closes: #75639)
+  * Upstream:
+    > mountd: New option "-n/--no-tcp".
+
+ -- Chip Salzenberg <chip@valinux.com>  Sun, 19 Nov 2000 09:22:19 -0800
+
+nfs-utils (1:0.2.1-2) unstable; urgency=high
+
+  * On shutdown, kill user-mode lockd, not kernel-mode lockd thread.
+  * Big upstream fix:
+     > statd: Repair memory leaks and corruptions.
+  * Other upstream patches:
+     > exportfs: Support CIDR netmasks (e.g. "1.2.3.4/24").
+     > statd: Fix callbacks to local lockd; Be paranoid about IP addresses
+       when doing callbacks to local lockd; Add debugging features; Make
+       logs more readable.
+
+ -- Chip Salzenberg <chip@valinux.com>  Thu,  2 Nov 2000 18:10:36 -0800
+
+nfs-utils (1:0.2.1-1) unstable; urgency=low
+
+  * New upstream w/minor fixes.
+
+ -- Chip Salzenberg <chip@valinux.com>  Mon,  2 Oct 2000 17:32:00 -0700
+
+nfs-utils (1:0.2-1) unstable; urgency=low
+
+  * New upstream version number.
+  * Minor fixes.
+
+ -- Chip Salzenberg <chip@valinux.com>  Tue,  5 Sep 2000 11:30:00 -0700
+
+nfs-utils (1:0.1.9.1-2) unstable; urgency=medium
+
+  * Upstream addition of tcpwrapper support in statd and mountd.
+  * Upstream fixes from H.J. Lu and Neil Brown.
+  * Run exportfs first during startup (again).
+
+ -- Chip Salzenberg <chip@valinux.com>  Sat, 26 Aug 2000 17:30:00 -0700
+
+nfs-utils (1:0.1.9.1-1) frozen unstable; urgency=high
+
+  * New upstream version, fixes more logging errors.
+  * Fix Debian distribution list.
+
+ -- Chip Salzenberg <chip@valinux.com>  Wed,  5 Jul 2000 15:00:00 -0800
+
+nfs-utils (1:0.1.8.2-2) unstable; urgency=high
+
+  * Fix serious logging error in statd.
+
+ -- Chip Salzenberg <chip@valinux.com>  Wed, 28 Jun 2000 23:00:00 -0800
+
+nfs-utils (1:0.1.8.2-1) unstable; urgency=low
+
+  * New upstream version.
+  * During startup, start daemons before running exportfs.
+
+ -- Chip Salzenberg <chip@valinux.com>  Wed, 28 Jun 2000 15:00:00 -0800
+
+nfs-utils (1:0.1.8.1-1) unstable; urgency=medium
+
+  * New upstream version.
+  * Chdir to / before spawning daemons. (closes: #60837, #64857)
+  * Follow policy for init messages. (closes: #59184, #65519)
+
+ -- Chip Salzenberg <chip@valinux.com>  Mon, 12 Jun 2000 22:30:00 -0800
+
+nfs-utils (1:0.1.8-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Chip Salzenberg <chip@valinux.com>  Sun,  4 Jun 2000 13:30:00 -0800
+
+nfs-utils (1:0.1.7.1-1) unstable; urgency=medium
+
+  * New upstream version.
+  * Use fewer sockets in mountd by sharing RPC transports,
+    even when it is run without '-p'.
+
+ -- Chip Salzenberg <chip@valinux.com>  Sat, 29 Apr 2000 20:45:00 -0800
+
+nfs-utils (1:0.1.6-3) frozen unstable; urgency=medium
+
+  * Fix kernel server shutdown order: mountd, nfsd, exportfs.
+  * Upstream:  Fix 'mountd -p'.  Use fewer UDP sockets
+    by sharing RPC transports.  Display more mount flags.
+
+ -- Chip Salzenberg <chip@valinux.com>  Mon, 13 Mar 2000 14:45:00 -0800
+
+nfs-utils (1:0.1.6-2) frozen unstable; urgency=medium
+
+  * Split off nhfsstone into its own package, since it has
+    helper scripts and most people won't use it.
+  * Also include nhfsstone's helpers: nhfs{run,nums,graph}.
+  * Install man page for nhfsstone. (closes: #55194)
+  * Always run lockd on non-module kernels. (closes: #57841)
+  * Make init scripts config files. (closes: #55193)
+  * Handle "force-reload" in nfs-common's init script. (ditto)
+  * Fix line numbers in error messages. (closes: #57717)
+  * Write man page for rpc.lockd. (closes: #55192)
+  * Fix typo in exports(5) man page. (closes: #46933)
+  * Add /usr/doc -> /usr/share doc links. (closes: #54983)
+  * Add copyright file. (closes: #55195)
+  * Refresh sources from upstream.
+  * Refine dependencies.
+
+ -- Chip Salzenberg <chip@valinux.com>  Sat, 26 Feb 2000 02:00:00 -0800
+
+nfs-utils (1:0.1.6-1) unstable; urgency=high
+
+  * New upstream version.
+  * Make nfs-kernel-server conflict with and replace knfs.
+
+ -- Chip Salzenberg <chip@valinux.com>  Wed, 12 Jan 2000 19:30:00 -0800
+
+nfs-utils (1:0.1.5-2) unstable; urgency=high
+
+  * Rename packages to "nfs-common" and "nfs-kernel-server".
+    (Previous package names were only temporary anyway.)
+  * Prepend "1:" to version, to override existing nfs-common.
+  * Remove rpc.rquotad -- it's already packaged in "quota".
+
+ -- Chip Salzenberg <chip@valinux.com>  Wed, 29 Dec 1999 17:00:00 -0800
+
+nfs-utils (0.1.5-1) unstable; urgency=medium
+
+  * New upstream version.
+  * Allow for some kernels not requiring rpc.lockd.
+
+ -- Chip Salzenberg <chip@valinux.com>  Sun, 19 Dec 1999 11:40:00 -0800
+
+nfs-utils (0.1.4-1) unstable; urgency=low
+
+  * New upstream version.
+  * Don't disable NFSv3 by default.
+
+ -- Chip Salzenberg <chip@valinux.com>  Fri, 10 Dec 1999 23:00:00 -0800
+
+nfs-utils (0.1.3-2) unstable; urgency=low
+
+  * Conflict with standard NFS packages.
+
+ -- Chip Salzenberg <chip@valinux.com>  Fri,  3 Dec 1999 22:00:00 -0800
+
+nfs-utils (0.1.3-1) unstable; urgency=low
+
+  * New upstream version.
+  * Start following CVS tree at SourceForge.
+
+ -- Chip Salzenberg <chip@valinux.com>  Fri,  3 Dec 1999 20:00:00 -0800
+
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..d64d95c
--- /dev/null
@@ -0,0 +1,56 @@
+Source: nfs-utils
+Priority: standard
+Section: net
+Maintainer: Anibal Monsalve Salazar <anibal@debian.org>
+Uploaders: Steinar H. Gunderson <sesse@debian.org>, Daniel Baumann <daniel.baumann@panthera-systems.net>
+Build-Depends: debhelper (>= 5), autoconf2.13, autotools-dev, libwrap0-dev, libevent-dev, libnfsidmap-dev, libkrb5-dev, perl
+Standards-Version: 3.7.2
+
+Package: nfs-kernel-server
+Priority: optional
+Architecture: any
+Depends: nfs-common (>= 1:0.3.3-3), sysvinit (>= 2.80-1), ucf, ${shlibs:Depends}
+Provides: knfs, nfs-server
+Conflicts: knfs, nfs-server
+Replaces: knfs, nfs-server
+Description: Kernel NFS server support
+ Use this package if you have a fairly recent kernel (2.2.13 or better)
+ and you want to use the kernel-mode NFS server.  The user-mode NFS
+ server in the "nfs-user-server" package is slower but more featureful
+ and easier to debug than the kernel-mode server.
+ .
+ Upstream: SourceForge project "nfs", CVS module nfs-utils.
+ .
+  Homepage: http://nfs.sourceforge.net/
+
+Package: nfs-common
+Architecture: any
+Depends: portmap, sysvinit (>= 2.80-1), adduser, ucf, ${shlibs:Depends}
+Provides: nfs-client
+Conflicts: nfs-client
+Replaces: nfs-client, nfs-kernel-server (<< 1:1.0.7-5)
+Description: NFS support files common to client and server
+ Use this package on any machine that does NFS either as client or
+ server.  Programs included: lockd, statd, showmount, and nfsstat.
+ .
+ Upstream: SourceForge project "nfs", CVS module nfs-utils.
+ .
+  Homepage: http://nfs.sourceforge.net/
+
+Package: nhfsstone
+Priority: extra
+Architecture: any
+Depends: nfs-common, ${shlibs:Depends}
+Replaces: nfs-kernel-server
+Description: NFS benchmark program
+ nhfsstone (pronounced n-f-s-stone, the "h" is silent) is used on a
+ NFS client to generate an artificial load with a particular mix of
+ NFS operations. It reports the average response time of the server
+ in milliseconds per call and the load in calls per second. The
+ program adjusts its calling patterns based on the client's kernel
+ NFS statistics and the elapsed time. Load can be generated over a
+ given time or number of NFS calls.
+ .
+ Upstream: SourceForge project "nfs", CVS module nfs-utils.
+ .
+  Homepage: http://nfs.sourceforge.net/
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..7dd1c08
--- /dev/null
@@ -0,0 +1,11 @@
+This package was debianized by Chip Salzenberg <chip@debian.org> on Fri,  3 Dec 1999 20:00:00 -0800
+
+It was downloaded from http://sourceforge.net/projects/nfs/
+
+View individual source files for respective authors.
+
+
+You are free to distribute this software under the terms of
+the GNU General Public License, version 2 or later.
+On Debian systems, the complete text of the GNU General Public
+License can be found in the file /usr/share/common-licenses/GPL.
diff --git a/debian/etc.exports b/debian/etc.exports
new file mode 100644 (file)
index 0000000..4bb425b
--- /dev/null
@@ -0,0 +1,10 @@
+# /etc/exports: the access control list for filesystems which may be exported
+#              to NFS clients.  See exports(5).
+#
+# Example for NFSv2 and NFSv3:
+# /srv/homes       hostname1(rw,sync) hostname2(ro,sync)
+#
+# Example for NFSv4:
+# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt)
+# /srv/nfs4/homes  gss/krb5i(rw,sync)
+#
diff --git a/debian/etc.exports.md5sum b/debian/etc.exports.md5sum
new file mode 100644 (file)
index 0000000..d6ceaeb
--- /dev/null
@@ -0,0 +1,2 @@
+fa071681b8e7f4eff1d6f5c4f43bf1d8  nfs-utils-1.0.6/debian/etc.exports
+d9037825e2fbe4e58d6176e7297830cb  nfs-utils-1.0.7/debian/etc.exports
diff --git a/debian/gssapi_mech.conf b/debian/gssapi_mech.conf
new file mode 100644 (file)
index 0000000..2dd2fc5
--- /dev/null
@@ -0,0 +1,19 @@
+# GSSAPI Mechanism Definitions
+#
+# This configuration file determines which GSS-API mechanisms
+# the gssd code should use
+#
+# NOTE:
+# The initiaiization function "mechglue_internal_krb5_init"
+# is used for the MIT krb5 gssapi mechanism.  This special
+# function name indicates that an internal function should
+# be used to determine the entry points for the MIT gssapi
+# mechanism funtions.
+#
+# library                               initialization function
+# ================================     ==========================
+# The MIT K5 gssapi library, use special function for initialization.
+/usr/lib/libgssapi_krb5.so.2     mechglue_internal_krb5_init
+#
+# The SPKM3 gssapi library function.  Use the function spkm3_gss_initialize.
+#/usr/local/gss_mechs/spkm/spkm3/libgssapi_spkm3.so    spkm3_gss_initialize
diff --git a/debian/gssapi_mech.conf.md5sum b/debian/gssapi_mech.conf.md5sum
new file mode 100644 (file)
index 0000000..d3dc532
--- /dev/null
@@ -0,0 +1 @@
+36d38b443c98e40ccb89553a45abdcbc  nfs-utils-1.0.7/debian/gssapi_mech.conf
diff --git a/debian/idmapd.conf b/debian/idmapd.conf
new file mode 100644 (file)
index 0000000..8325982
--- /dev/null
@@ -0,0 +1,10 @@
+[General]
+
+Verbosity = 0
+Pipefs-Directory = /var/lib/nfs/rpc_pipefs
+Domain = localdomain
+
+[Mapping]
+
+Nobody-User = nobody
+Nobody-Group = nogroup
diff --git a/debian/idmapd.conf.md5sum b/debian/idmapd.conf.md5sum
new file mode 100644 (file)
index 0000000..6c05a8b
--- /dev/null
@@ -0,0 +1 @@
+3e94f238294cc61b047e7ae50115dffc  nfs-utils-1.0.7/debian/idmapd.conf
diff --git a/debian/nfs-common.conffiles b/debian/nfs-common.conffiles
new file mode 100644 (file)
index 0000000..70e74f5
--- /dev/null
@@ -0,0 +1,4 @@
+/etc/default/nfs-common
+/etc/init.d/nfs-common
+/etc/idmapd.conf
+/etc/gssapi_mech.conf
diff --git a/debian/nfs-common.default b/debian/nfs-common.default
new file mode 100644 (file)
index 0000000..5eba0b5
--- /dev/null
@@ -0,0 +1,20 @@
+# 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? This is especially useful
+#   when you have a port-based firewall. To use a fixed port, set this
+#   this variable to a statd argument like: "--port 4000 --outgoing-port 4001".
+#   For more information, see rpc.statd(8) or http://wiki.debian.org/?SecuringNFS
+STATDOPTS=
+
+# Some kernels need a separate lockd daemon; most don't. Set this if you
+# want to force an explicit choice for some reason.
+NEED_LOCKD=
+
+# Do you want to start the idmapd daemon? It is only needed for NFSv4.
+NEED_IDMAPD=
+
+# Do you want to start the gssd daemon? It is required for Kerberos mounts.
+NEED_GSSD=
diff --git a/debian/nfs-common.default.md5sum b/debian/nfs-common.default.md5sum
new file mode 100644 (file)
index 0000000..a6f3df6
--- /dev/null
@@ -0,0 +1,3 @@
+9409842759091e981d65a210e3e914cb  nfs-utils-1.0.6/debian/nfs-common.default
+bf979c79c0eca8c114c5388bf7225b4f  nfs-utils-1.0.7-18/debian/nfs-common.default
+e460b95b3b808e55ec7dcba8e605ab14  nfs-utils-1.0.7-15/debian/nfs-common.default
diff --git a/debian/nfs-common.dirs b/debian/nfs-common.dirs
new file mode 100644 (file)
index 0000000..795c6e7
--- /dev/null
@@ -0,0 +1,8 @@
+etc/init.d
+sbin
+usr/sbin
+var/lib/nfs
+var/lib/nfs/sm
+var/lib/nfs/sm.bak
+var/lib/nfs/rpc_pipefs
+usr/share/nfs-common/conffiles
diff --git a/debian/nfs-common.files b/debian/nfs-common.files
new file mode 100644 (file)
index 0000000..43fca56
--- /dev/null
@@ -0,0 +1,7 @@
+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*
+usr/share/man/man8/showmount*
diff --git a/debian/nfs-common.init b/debian/nfs-common.init
new file mode 100755 (executable)
index 0000000..df5fca2
--- /dev/null
@@ -0,0 +1,207 @@
+#!/bin/sh
+#
+# nfs-common    This shell script takes care of starting and stopping
+#               common daemons required for NFS clients and servers.
+#
+# chkconfig: 345 20 80
+# description: NFS is a popular protocol for file sharing across \
+#             TCP/IP networks. This service provides NFS file \
+#             locking functionality.
+#
+
+set -e
+
+# What is this?
+DESC="NFS common utilities"
+
+# Read config
+DEFAULTFILE=/etc/default/nfs-common
+PREFIX=
+NEED_LOCKD=
+NEED_IDMAPD=
+IDMAPD_PIDFILE=/var/run/rpc.idmapd.pid
+NEED_GSSD=
+GSSD_PIDFILE=/var/run/rpc.gssd.pid
+PIPEFS_MOUNTPOINT=/var/lib/nfs/rpc_pipefs
+RPCGSSDOPTS=
+if [ -f $DEFAULTFILE ]; then
+    . $DEFAULTFILE
+fi
+
+# Determine whether lockd daemon is required.
+case "$NEED_LOCKD" in
+yes|no)        ;;
+*)  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
+
+#
+# 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
+[ -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
+}
+
+do_umount() {
+    if mountpoint -q "$1"
+    then
+       umount "$1"
+    fi
+    return 0
+}
+
+# See how we were called.
+case "$1" in
+  start)
+       cd /    # daemons should have root dir as cwd
+       printf "Starting $DESC:"
+       printf " statd"
+       start-stop-daemon --start --quiet \
+           --exec $PREFIX/sbin/rpc.statd -- $STATDOPTS
+       if [ "$NEED_LOCKD" = yes ]
+       then
+           printf " lockd"
+           start-stop-daemon --start --quiet \
+               --exec $PREFIX/sbin/rpc.lockd  || true
+       fi
+       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 ]
+               then
+                   printf " idmapd"
+                   start-stop-daemon --start --quiet \
+                           --make-pidfile --pidfile $IDMAPD_PIDFILE \
+                           --exec /usr/sbin/rpc.idmapd
+               fi
+               if [ "$NEED_GSSD" = yes ]
+               then
+                   do_modprobe rpcsec_gss_krb5
+                   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
+           rm -f $GSSD_PIDFILE
+       fi
+       if [ "$NEED_IDMAPD" = yes ]
+       then
+           printf " idmapd"
+           start-stop-daemon --stop --oknodo --quiet \
+               --name rpc.idmapd
+           rm -f $IDMAPD_PIDFILE
+       fi
+       if [ "$NEED_LOCKD" = yes ]
+       then
+           printf " lockd"
+           start-stop-daemon --stop --oknodo --quiet \
+               --name rpc.lockd || true
+       else
+           pkill -KILL -u root -x lockd || true
+       fi
+       printf " statd"
+       start-stop-daemon --stop --oknodo --quiet \
+           --name rpc.statd
+       do_umount $PIPEFS_MOUNTPOINT 2>/dev/null || true
+       echo "."
+       ;;
+
+  restart | force-reload)
+       $0 stop
+       sleep 1
+       $0 start
+       ;;
+
+  *)
+       echo "Usage: nfs-common {start|stop|restart}"
+       exit 1
+       ;;
+esac
+
+exit 0
diff --git a/debian/nfs-common.install b/debian/nfs-common.install
new file mode 100644 (file)
index 0000000..915964a
--- /dev/null
@@ -0,0 +1,6 @@
+usr/sbin/rpc.lockd sbin/
+usr/sbin/rpc.statd sbin/
+usr/sbin/showmount sbin/
+usr/sbin/nfsstat
+usr/sbin/rpc.gssd
+usr/sbin/rpc.idmapd
diff --git a/debian/nfs-common.links b/debian/nfs-common.links
new file mode 100644 (file)
index 0000000..5532df3
--- /dev/null
@@ -0,0 +1,4 @@
+/usr/share/man/man8/gssd.8 /usr/share/man/man8/rpc.gssd.8
+/usr/share/man/man8/lockd.8 /usr/share/man/man8/rpc.lockd.8
+/usr/share/man/man8/statd.8 /usr/share/man/man8/rpc.statd.8
+/usr/share/man/man8/idmapd.8 /usr/share/man/man8/rpc.idmapd.8
diff --git a/debian/nfs-common.manpages b/debian/nfs-common.manpages
new file mode 100644 (file)
index 0000000..0e57332
--- /dev/null
@@ -0,0 +1,8 @@
+debian/tmp/usr/share/man/man5/idmapd.conf*
+debian/tmp/usr/share/man/man8/gssd.8
+debian/tmp/usr/share/man/man8/idmapd.8
+debian/tmp/usr/share/man/man8/lockd.8
+debian/tmp/usr/share/man/man8/statd.8
+debian/tmp/usr/share/man/man8/nfsstat*
+debian/tmp/usr/share/man/man8/showmount*
+debian/tmp/usr/share/man/man8/idmapd*
diff --git a/debian/nfs-common.postinst b/debian/nfs-common.postinst
new file mode 100755 (executable)
index 0000000..c9055dc
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh -e
+
+#DEBHELPER#
+
+case "$1" in
+    configure)
+       ucf --three-way /usr/share/nfs-common/conffiles/idmapd.conf /etc/idmapd.conf
+       ucf --three-way /usr/share/nfs-common/conffiles/gssapi_mech.conf /etc/gssapi_mech.conf
+       ucf --three-way /usr/share/nfs-common/conffiles/nfs-common.default /etc/default/nfs-common
+
+       update-rc.d nfs-common defaults 21 79 >/dev/null
+
+       if ! getent passwd statd >/dev/null; then
+           adduser --system --home /var/lib/nfs --no-create-home statd
+       fi
+       if dpkg --compare-versions "$2" ge 1:1.0.7-10 && dpkg --compare-versions "$2" lt 1:1.0.7-13; then
+            usermod --home /var/lib/nfs statd || true
+            if [ -d /home/statd ]; then
+                rmdir --ignore-fail-on-non-empty /home/statd
+            fi
+       fi
+       if [ "$2" = "" ] || dpkg --compare-versions "$2" lt 1:1.0.7-16; then
+           chown statd /var/lib/nfs/sm \
+               /var/lib/nfs/sm.bak \
+               /var/lib/nfs/rpc_pipefs \
+               /var/lib/nfs
+            if [ -f /var/lib/nfs/state ]; then
+               chown statd /var/lib/nfs/state
+            fi
+       fi
+    ;;
+esac
+
+act="restart"
+[ "$1:$2" = "configure:" ] && act="start"
+invoke-rc.d nfs-common $act
diff --git a/debian/nfs-common.postrm b/debian/nfs-common.postrm
new file mode 100755 (executable)
index 0000000..6783bcd
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+#DEBHELPER#
+
+case "$1" in
+    purge)
+       update-rc.d nfs-common remove >/dev/null
+
+       for FILE in /etc/default/nfs-common /etc/idmapd.conf /etc/gssapi_mech.conf; do
+           # Taken from the ucf example postrm
+           for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist;  do
+               rm -f $FILE$ext
+           done
+           rm -f $FILE
+           if [ -x /usr/bin/ucf ]; then
+               ucf --purge $FILE
+           fi
+       done
+
+       rm -f /var/lib/nfs/state    \
+             /var/lib/nfs/sm/*     \
+             /var/lib/nfs/sm.bak/*
+       ;;
+esac
diff --git a/debian/nfs-common.prerm b/debian/nfs-common.prerm
new file mode 100755 (executable)
index 0000000..c3c15ba
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+#DEBHELPER#
+
+case "$1" in
+    remove|purge)
+       [ -x /etc/init.d/nfs-common ] &&
+           invoke-rc.d nfs-common stop
+       ;;
+esac
+
+if [ "$1" != upgrade ]
+then
+    rm -f /var/lib/nfs/sm/*      \
+          /var/lib/nfs/sm.bak/*  \
+          /var/lib/nfs/state
+fi
+
+exit 0
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
diff --git a/debian/nfs-kernel-server.conffiles b/debian/nfs-kernel-server.conffiles
new file mode 100644 (file)
index 0000000..78db655
--- /dev/null
@@ -0,0 +1,3 @@
+/etc/exports
+/etc/default/nfs-kernel-server
+/etc/init.d/nfs-kernel-server
diff --git a/debian/nfs-kernel-server.default b/debian/nfs-kernel-server.default
new file mode 100644 (file)
index 0000000..c2c4955
--- /dev/null
@@ -0,0 +1,15 @@
+# Number of servers to start up
+RPCNFSDCOUNT=8
+
+# Runtime priority of server (see nice(1))
+RPCNFSDPRIORITY=0
+
+# 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, 
+# see rpc.mountd(8) or http://wiki.debian.org/?SecuringNFS
+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.default.md5sum b/debian/nfs-kernel-server.default.md5sum
new file mode 100644 (file)
index 0000000..1858c27
--- /dev/null
@@ -0,0 +1,2 @@
+226f8fdd37b11c59d73e2f378e22b0d0  nfs-utils-1.0.6/debian/nfs-kernel-server.default
+41388b5bb60d7ad1b1281b975dc07ce9  nfs-utils-1.0.7/debian/nfs-kernel-server.default
diff --git a/debian/nfs-kernel-server.dirs b/debian/nfs-kernel-server.dirs
new file mode 100644 (file)
index 0000000..7d336b9
--- /dev/null
@@ -0,0 +1,5 @@
+etc/init.d
+usr/sbin
+var/lib/nfs
+var/lib/nfs/v4recovery
+usr/share/nfs-kernel-server/conffiles
diff --git a/debian/nfs-kernel-server.init b/debian/nfs-kernel-server.init
new file mode 100755 (executable)
index 0000000..0143862
--- /dev/null
@@ -0,0 +1,159 @@
+#!/bin/sh
+#
+# nfs-kernel-server
+#              This shell script takes care of starting and stopping
+#               the kernel-mode NFS server.
+#
+# chkconfig: 345 60 20
+# description: NFS is a popular protocol for file sharing across TCP/IP \
+#              networks. This service provides NFS server functionality, \
+#              which is configured via the /etc/exports file.
+#
+
+set -e
+
+# What is this?
+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.svcgssd ] || exit 0
+
+# Read config
+DEFAULTFILE=/etc/default/nfs-kernel-server
+RPCNFSDCOUNT=8
+RPCNFSDPRIORITY=0
+RPCMOUNTDOPTS=
+NEED_SVCGSSD=yes
+RPCGSSDOPTS=
+RPCSVCGSSDOPTS=
+PROCNFSD_MOUNTPOINT=/proc/fs/nfsd
+if [ -f $DEFAULTFILE ]; then
+    . $DEFAULTFILE
+fi
+
+do_modprobe() {
+    if [ -x /sbin/modprobe ]
+    then
+        modprobe -q "$1" || true
+    fi
+}
+
+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 [ -f /etc/exports ]
+       then
+               do_modprobe nfsd
+
+               # See if our running kernel supports the NFS kernel server
+               if [ -f /proc/kallsyms ] && ! grep -qE 'init_nf(sd|     )' /proc/kallsyms; then
+                       echo "Not starting $DESC: no support in current kernel."
+                       exit 0
+               fi
+               
+               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 \
+                   --nicelevel $RPCNFSDPRIORITY \
+                   --exec $PREFIX/sbin/rpc.nfsd -- $RPCNFSDCOUNT
+
+               printf " mountd"
+
+               # make sure 127.0.0.1 is a valid source for requests
+               ClearAddr=
+               if [ -f /proc/net/rpc/auth.unix.ip/channel ]
+               then
+                   fgrep -qs 127.0.0.1 /proc/net/rpc/auth.unix.ip/content || {
+                       echo "nfsd 127.0.0.1 2147483647 localhost" >/proc/net/rpc/auth.unix.ip/channel
+                       ClearAddr=yes
+                   }
+               fi
+
+               $PREFIX/bin/rpcinfo -u localhost nfs 3 >/dev/null 2>&1 ||
+                   RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-nfs-version 3"
+
+               [ -z "$ClearAddr" ] || echo "nfsd 127.0.0.1 1" >/proc/net/rpc/auth.unix.ip/channel
+
+               start-stop-daemon --start --quiet \
+                   --exec $PREFIX/sbin/rpc.mountd -- $RPCMOUNTDOPTS
+               echo "."
+       else
+               echo "Not starting $DESC: No exports."
+       fi
+       ;;
+
+  stop)
+       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
+       echo "."
+
+       printf "Unexporting directories for $DESC..."
+       $PREFIX/sbin/exportfs -au
+       if mountpoint -q /proc/nfs/nfsd
+       then
+           $PREFIX/sbin/exportfs -f
+       fi
+       echo "done."
+       ;;
+
+  reload | force-reload)
+       printf "Re-exporting directories for $DESC..."
+       $PREFIX/sbin/exportfs -r
+       echo "done."
+       ;;
+
+  restart)
+       $0 stop
+       sleep 1
+       $0 start
+       ;;
+
+  *)
+       echo "Usage: nfs-kernel-server {start|stop|reload|force-reload|restart}"
+       exit 1
+       ;;
+esac
+
+exit 0
diff --git a/debian/nfs-kernel-server.install b/debian/nfs-kernel-server.install
new file mode 100644 (file)
index 0000000..8ef5f09
--- /dev/null
@@ -0,0 +1,4 @@
+usr/sbin/exportfs
+usr/sbin/rpc.mountd
+usr/sbin/rpc.nfsd
+usr/sbin/rpc.svcgssd
diff --git a/debian/nfs-kernel-server.links b/debian/nfs-kernel-server.links
new file mode 100644 (file)
index 0000000..a720bd0
--- /dev/null
@@ -0,0 +1,4 @@
+/usr/share/man/man8/mountd.8 /usr/share/man/man8/rpc.mountd.8
+/usr/share/man/man8/nfsd.8 /usr/share/man/man8/rpc.nfsd.8
+/usr/share/man/man8/svcgssd.8 /usr/share/man/man8/rpc.svcgssd.8
+
diff --git a/debian/nfs-kernel-server.manpages b/debian/nfs-kernel-server.manpages
new file mode 100644 (file)
index 0000000..f8edbae
--- /dev/null
@@ -0,0 +1,6 @@
+debian/tmp/usr/share/man/man5/exports.5
+debian/tmp/usr/share/man/man7/nfsd.7
+debian/tmp/usr/share/man/man8/mountd.8
+debian/tmp/usr/share/man/man8/exportfs.8
+debian/tmp/usr/share/man/man8/nfsd.8
+debian/tmp/usr/share/man/man8/svcgssd.8
diff --git a/debian/nfs-kernel-server.postinst b/debian/nfs-kernel-server.postinst
new file mode 100755 (executable)
index 0000000..c8b244d
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh -e
+
+#DEBHELPER#
+
+case "$1" in
+    configure)
+       ucf --three-way /usr/share/nfs-kernel-server/conffiles/etc.exports /etc/exports
+       ucf --three-way /usr/share/nfs-kernel-server/conffiles/nfs-kernel-server.default /etc/default/nfs-kernel-server
+
+       for f in /var/lib/nfs/etab  \
+                /var/lib/nfs/rmtab \
+                /var/lib/nfs/xtab; do
+           [ -e $f ] || touch $f
+       done
+
+       update-rc.d nfs-kernel-server defaults 20 80 >/dev/null
+
+       # 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
+       ;;
+esac
+
+act="restart"
+[ "$1:$2" = "configure:" ] && act="start"
+invoke-rc.d nfs-kernel-server $act
diff --git a/debian/nfs-kernel-server.postrm b/debian/nfs-kernel-server.postrm
new file mode 100755 (executable)
index 0000000..4a79162
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+#DEBHELPER#
+
+case "$1" in
+    purge)
+       update-rc.d nfs-kernel-server remove >/dev/null
+
+       for FILE in /etc/default/nfs-kernel-server /etc/exports; do
+           # Taken from the ucf example postrm
+           for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist;  do
+               rm -f $FILE$ext
+           done
+           rm -f $FILE
+           if [ -x /usr/bin/ucf ]; then
+               ucf --purge $FILE
+           fi
+       done
+
+       rm -f /var/lib/nfs/etab  \
+              /var/lib/nfs/rmtab \
+              /var/lib/nfs/xtab
+       ;;
+esac
+
diff --git a/debian/nfs-kernel-server.prerm b/debian/nfs-kernel-server.prerm
new file mode 100755 (executable)
index 0000000..80878e6
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+#DEBHELPER#
+
+case "$1" in
+    remove|purge)
+       [ -x /etc/init.d/nfs-kernel-server ] &&
+           invoke-rc.d nfs-kernel-server stop
+       ;;
+esac
+
+if [ "$1" != upgrade ]
+then
+    rm -f /var/lib/nfs/etab   \
+          /var/lib/nfs/rmtab  \
+          /var/lib/nfs/xtab
+fi
+
+exit 0
diff --git a/debian/nhfsstone.dirs b/debian/nhfsstone.dirs
new file mode 100644 (file)
index 0000000..236670a
--- /dev/null
@@ -0,0 +1 @@
+usr/sbin
diff --git a/debian/nhfsstone.files b/debian/nhfsstone.files
new file mode 100644 (file)
index 0000000..5d2c329
--- /dev/null
@@ -0,0 +1,2 @@
+usr/sbin/nhfs*
+usr/share/man/man8/nhfs*
diff --git a/debian/nhfsstone.install b/debian/nhfsstone.install
new file mode 100644 (file)
index 0000000..5d2c329
--- /dev/null
@@ -0,0 +1,2 @@
+usr/sbin/nhfs*
+usr/share/man/man8/nhfs*
diff --git a/debian/nhfsstone.postinst b/debian/nhfsstone.postinst
new file mode 100644 (file)
index 0000000..07fe0c2
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+
+#DEBHELPER#
diff --git a/debian/nhfsstone.prerm b/debian/nhfsstone.prerm
new file mode 100644 (file)
index 0000000..42faf6a
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..332778c
--- /dev/null
@@ -0,0 +1,92 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+
+export DH_VERBOSE=1
+
+# Temporary root
+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.conffiles       \
+             debian/nfs-common.config          \
+             debian/nfs-common.files           \
+             debian/nfs-common.templates       \
+             debian/nfs-kernel-server.conffiles\
+             debian/nfs-kernel-server.config   \
+             debian/nfs-kernel-server.templates\
+             debian/nhfsstone.files
+
+       dh_testdir
+       -test -r /usr/share/misc/config.sub && cp -f /usr/share/misc/config.sub config.sub
+       -test -r /usr/share/misc/config.guess && cp -f /usr/share/misc/config.guess config.guess
+       autoconf
+       ./configure \
+               --mandir='$${prefix}/share/man' \
+               --enable-secure-statd
+       $(MAKE)
+       touch build-stamp
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp
+       rm -rf $(DEBTMP)
+       # Add here commands to clean up after the build process.
+       -test -r /usr/share/misc/config.sub && rm -f config.sub
+       -test -r /usr/share/misc/config.guess && rm -f config.guess
+       -$(MAKE) distclean
+       rm -f config.log configure
+       dh_clean
+
+binary-indep: build
+binary-arch: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k
+       dh_installdirs
+       mkdir $(DEBTMP)
+       # Add here commands to install the files into debian/tmp
+       $(MAKE) install_prefix='$(DEBTMP)' install
+       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" \
+               tmp/usr/share/man/man8/$$f.8; \
+         done;
+       # Fixups End Here #
+       
+       # Move all files that will be managed by ucf
+       install -m 0644 debian/idmapd.conf debian/nfs-common/usr/share/nfs-common/conffiles/
+       install -m 0644 debian/gssapi_mech.conf debian/nfs-common/usr/share/nfs-common/conffiles/
+       install -m 0644 debian/nfs-common.default debian/nfs-common/usr/share/nfs-common/conffiles/
+       install -m 0644 debian/nfs-kernel-server.default debian/nfs-kernel-server/usr/share/nfs-kernel-server/conffiles/
+       install -m 0644 debian/etc.exports debian/nfs-kernel-server/usr/share/nfs-kernel-server/conffiles/
+       
+       install -m 0644 debian/idmapd.conf.md5sum debian/nfs-common/usr/share/nfs-common/conffiles/
+       install -m 0644 debian/gssapi_mech.conf.md5sum debian/nfs-common/usr/share/nfs-common/conffiles/
+       install -m 0644 debian/nfs-common.default.md5sum debian/nfs-common/usr/share/nfs-common/conffiles/
+       install -m 0644 debian/nfs-kernel-server.default.md5sum debian/nfs-kernel-server/usr/share/nfs-kernel-server/conffiles/
+       install -m 0644 debian/etc.exports.md5sum debian/nfs-kernel-server/usr/share/nfs-kernel-server/conffiles/
+       
+       dh_installdocs -A
+       dh_installdocs -pnfs-common debian/README.Debian.nfsv4
+       install -m 0755 debian/nfs-common.init debian/nfs-common/etc/init.d/nfs-common
+       install -m 0755 debian/nfs-kernel-server.init debian/nfs-kernel-server/etc/init.d/nfs-kernel-server
+       dh_installman
+       dh_link
+       dh_installchangelogs ChangeLog
+       dh_strip
+       dh_compress
+       dh_fixperms
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary
index 27d4440c72bb287f32955704d6beda9ad19f17d3..cfb6681093fe8e629eb38ff1289794115191b10b 100644 (file)
@@ -131,7 +131,7 @@ export_add(nfs_export *exp)
                xlog(L_FATAL, "unknown client type in export_add");
 
        epp = exportlist + type;
-       while (*epp && slen < strlen((*epp)->m_export.e_path))
+       while (*epp && slen <= strlen((*epp)->m_export.e_path))
                epp = &((*epp)->m_next);
        exp->m_next = *epp;
        *epp = exp;
index 9f022b67714d12031e7436e728cfdf05cd3de338..cb35d2ef5be056dd4ac275200393b41c146b3b7d 100644 (file)
@@ -77,8 +77,8 @@ again:
        cle.c_hostname[0] = '\0';
        cle.c_fhkey.k_type = CLE_KEY_NONE;
        cle.c_mapping = CLE_MAP_IDENT;
-       cle.c_anonuid = -2;
-       cle.c_anongid = -2;
+       cle.c_anonuid = 65534;
+       cle.c_anongid = 65534;
 
        if (squash_uids)
                xfree(squash_uids);
index 5d8cf5e30e871ea99e484bf289d8eb3ad9036c3e..e6de71aebfbce484e4c5aae3bf99b87c979408ea 100644 (file)
@@ -89,8 +89,8 @@ getexportent(int fromkernel, int fromexports)
                ee.e_flags &= ~NFSEXP_GATHERED_WRITES;
        }
        ee.e_maptype = CLE_MAP_IDENT;
-       ee.e_anonuid = -2;
-       ee.e_anongid = -2;
+       ee.e_anonuid = 65534;
+       ee.e_anongid = 65534;
        ee.e_squids = NULL;
        ee.e_sqgids = NULL;
        ee.e_mountpoint = NULL;
@@ -167,7 +167,7 @@ putexportent(struct exportent *ep)
 
        fp = efp->x_fp;
        for (i=0; esc[i]; i++)
-               if (iscntrl(esc[i]) || esc[i] == '"' || esc[i] == '\\'|| isspace(esc[i]))
+               if (iscntrl(esc[i]) || esc[i] == '"' || esc[i] == '\\' || esc[i] == '#' || isspace(esc[i]))
                        fprintf(fp, "\\%03o", esc[i]);
                else
                        fprintf(fp, "%c", esc[i]);
@@ -271,8 +271,8 @@ mkexportent(char *hname, char *path, char *options)
 
        ee.e_flags = EXPORT_DEFAULT_FLAGS;
        ee.e_maptype = CLE_MAP_IDENT;
-       ee.e_anonuid = -2;
-       ee.e_anongid = -2;
+       ee.e_anonuid = 65534;
+       ee.e_anongid = 65534;
        ee.e_squids = NULL;
        ee.e_sqgids = NULL;
        ee.e_mountpoint = NULL;
index c3ba9970dd29bf7001eb5a4cb22bece67e1623e0..cd49a3b21f7f614c677440316586625e37b072d0 100644 (file)
@@ -412,9 +412,9 @@ dump(int verbose)
                                c = dumpopt(c, "mapping=ugidd");
                        else if (ep->e_maptype == CLE_MAP_FILE)
                                c = dumpopt(c, "mapping=file");
-                       if (ep->e_anonuid != -2)
+                       if (ep->e_anonuid != 65534)
                                c = dumpopt(c, "anonuid=%d", ep->e_anonuid);
-                       if (ep->e_anongid != -2)
+                       if (ep->e_anongid != 65534)
                                c = dumpopt(c, "anongid=%d", ep->e_anongid);
 
                        printf("%c\n", (c != '(')? ')' : ' ');
index f420a20d60c48a8a54f2284e460c6c22b35f9604..fd6d4be4a74bfe53a44799eef5fcabc7399e2fa1 100644 (file)
@@ -29,6 +29,9 @@ double quotes. You can also specify spaces or other unusual character in
 the export name using a backslash followed by the character code as three
 octal digits.
 .PP
+To apply changes to this file, run exportfs -ra or (on Debian)
+/etc/init.d/nfs-kernel-server reload.
+.PP
 .SS Machine Name Formats
 NFS clients may be specified in a number of ways:
 .IP "single host
@@ -109,6 +112,13 @@ Using this option usually improves performance, but at the cost that
 an unclean server restart (i.e. a crash) can cause data to be lost or
 corrupted.
 
+.TP
+.IR sync
+Reply to requests only after the changes have been committed to stable
+storage (see
+.IR async
+above).
+
 In releases of nfs-utils upto and including 1.0.0, this option was the
 default.  In this and future releases,
 .I sync
@@ -331,7 +341,7 @@ By default,
 '''in the password file at startup time. If it isn't found, a uid and gid
 .I exportfs
 chooses a uid and gid
-of -2 (i.e. 65534) for squashed access. These values can also be overridden by
+of 65534 for squashed access. These values can also be overridden by
 the
 .IR anonuid " and " anongid
 options.
index 9cf2a1f039853a8c78c1faa29f39cb42439efad7..0d77e4a564d8e377e3a5b319c6874c056f4bada2 100644 (file)
@@ -56,6 +56,7 @@ static struct option longopts[] =
        { "port", 1, 0, 'p' },
        { "no-tcp", 0, 0, 'n' },
        { "ha-callout", 1, 0, 'H' },
+       { "state-directory-path", 1, 0, 's' },
        { NULL, 0, 0, 0 }
 };
 
@@ -457,6 +458,7 @@ int
 main(int argc, char **argv)
 {
        char    *export_file = _PATH_EXPORTS;
+       char    *state_dir = NFS_STATEDIR;
        int     foreground = 0;
        int     port = 0;
        int     descriptors = 0;
@@ -506,6 +508,13 @@ main(int argc, char **argv)
                case 'n':
                        _rpcfdtype = SOCK_DGRAM;
                        break;
+               case 's':
+                       if ((state_dir = xstrdup(optarg)) == NULL) {
+                               fprintf(stderr, "%s: xstrdup(%s) failed!\n",
+                                       argv[0], optarg);
+                               exit(1);
+                       }
+                       break;
                case 'V':
                        nfs_version |= 1 << (atoi (optarg) - 1);
                        break;
@@ -523,9 +532,9 @@ main(int argc, char **argv)
        if (optind != argc || !(nfs_version & 0x7))
                usage(argv [0], 1);
 
-       if (chdir(NFS_STATEDIR)) {
+       if (chdir(state_dir)) {
                fprintf(stderr, "%s: chdir(%s) failed: %s\n",
-                       argv [0], NFS_STATEDIR, strerror(errno));
+                       argv [0], state_dir, strerror(errno));
                exit(1);
        }
 
@@ -620,6 +629,6 @@ usage(const char *prog, int n)
 "      [-o num|--descriptors num] [-f exports-file|--exports-file=file]\n"
 "      [-p|--port port] [-V version|--nfs-version version]\n"
 "      [-N version|--no-nfs-version version] [-n|--no-tcp]\n"
-"      [-H ha-callout-prog]\n", prog);
+"      [-H ha-callout-prog] [-s|--state-directory-path path]\n", prog);
        exit(n);
 }
index 64e508a26ea2768ad39ca98e4384b9c36162105f..a815a52d66cdf6c6539054dc96f33fe76032ecb3 100644 (file)
@@ -119,6 +119,12 @@ The third will be the path that the client is mounting.
 The last is the number of concurrent mounts that we believe the client
 has of that path.
 .TP
+.BI "\-P," "" " \-\-state\-directory\-path "  directory
+specify a directory in which to place statd state information.
+If this option is not specified the default of 
+.BR /var/lib/nfs
+is used. (This is a Debian-specific extension.)
+.TP
 .B \-V " or " \-\-nfs-version
 This option can be used to request that
 .B rpc.mountd
index a0ac0f8a86f38e78e012adfffc8ac034cf4df632..ce77acec2d44d8abf89b609bfb976fce84d83d41 100755 (executable)
@@ -46,7 +46,7 @@ INCR=10
 # SIGUSR1 is used by nhfsstone to synchronize child processes.
 #
 nothing() { echo -n ""; }
-trap nothing 30
+trap nothing USR1
 
 rm -f $OUTFILE