diffstat of debian/ for nfs-utils_1.2.5-3 nfs-utils_1.2.5-3ubuntu3 changelog | 358 ++++++++++++++++++++++++++++++++++++++ control | 7 idmapd.conf | 2 nfs-common.default | 3 nfs-common.dirs | 1 nfs-common.gssd.upstart | 87 +++++++++ nfs-common.idmapd.upstart | 46 ++++ nfs-common.init | 3 nfs-common.postinst | 48 ++++- nfs-common.postrm | 1 nfs-common.preinst | 33 +++ nfs-common.prerm | 7 nfs-common.statd-mounting.upstart | 28 ++ nfs-common.statd.upstart | 46 ++++ nfs-kernel-server.default | 6 nfs-kernel-server.init | 12 - nfs-kernel-server.postinst | 1 rules | 9 18 files changed, 662 insertions(+), 36 deletions(-) diff -Nru nfs-utils-1.2.5/debian/changelog nfs-utils-1.2.5/debian/changelog --- nfs-utils-1.2.5/debian/changelog 2011-12-09 10:58:50.000000000 +0000 +++ nfs-utils-1.2.5/debian/changelog 2012-04-09 05:44:41.000000000 +0000 @@ -1,3 +1,41 @@ +nfs-utils (1:1.2.5-3ubuntu3) precise; urgency=low + + * In some cases, /var/lib/nfs/rpc_pipefs is successfully unmounted on + upgrade but the directory still has contents within it. Since this is + /var/lib we shouldn't assume it's ok for delete these; instead, pass + --ignore-fail-on-non-empty to rmdir. LP: #954619. + + -- Steve Langasek Sun, 08 Apr 2012 22:44:40 -0700 + +nfs-utils (1:1.2.5-3ubuntu2) precise; urgency=low + + * Fix wrong path to rpcinfo in the init script, which breaks use of nfs + v3 support in the server. LP: #945651. + + -- Steve Langasek Tue, 27 Mar 2012 10:44:03 -0700 + +nfs-utils (1:1.2.5-3ubuntu1) precise; urgency=low + + * Merge from Debian testing, remaining changes: + - debian/nfs-common.{statd,statd-mounting,gssd,idmapd}.upstart, + debian/control, debian/nfs-common.{preinst,postinst,prerm,postrm}, + debian/rules: drop nfs-common init script in favor of upstart jobs, + and build-depend on debhelper (>= 7.3.15ubuntu3) for correct upstart + init handling. + - Depend on rpcbind (>= 0.2.0-6ubuntu1) for upstart support. + - debian/nfs-kernel-server.postinst: don't call "invoke-rc.d nfs-common" + in the postinst, this is redundant anyway and the nfs-common init script + is gone now. + - nfs-kernel-server.default: Add comment about how to disable nfs4. + - nfs-kernel-server.init: Unmount nfsd fs when init script stops + - Allow issuing options to rpc.nfsd + - debian/nfs-common.defaults: always start idmapd automatically; drop + the configuration option. + - Move /var/lib/nfs/rpc_pipefs to /run/rpc_pipefs. This does not belong + in /var/lib. + + -- Steve Langasek Wed, 04 Jan 2012 09:20:27 -0800 + nfs-utils (1:1.2.5-3) unstable; urgency=low [ Roger Leigh ] @@ -16,6 +54,33 @@ -- Luk Claes Fri, 09 Dec 2011 11:55:31 +0100 +nfs-utils (1:1.2.5-2ubuntu1) precise; urgency=low + + * Merge from Debian testing, remaining changes: + - debian/nfs-common.{statd,statd-mounting,gssd,idmapd}.upstart, + debian/control, debian/nfs-common.{preinst,postinst,prerm,postrm}, + debian/rules: drop nfs-common init script in favor of upstart jobs, + and build-depend on debhelper (>= 7.3.15ubuntu3) for correct upstart + init handling. + - Depend on rpcbind (>= 0.2.0-6ubuntu1) for upstart support. + - debian/nfs-kernel-server.postinst: don't call "invoke-rc.d nfs-common" + in the postinst, this is redundant anyway and the nfs-common init script + is gone now. + - nfs-kernel-server.default: Add comment about how to disable nfs4. + - nfs-kernel-server.init: Unmount nfsd fs when init script stops + - Allow issuing options to rpc.nfsd + - debian/nfs-common.defaults: always start idmapd automatically; drop + the configuration option. + - Move /var/lib/nfs/rpc_pipefs to /run/rpc_pipefs. This does not belong + in /var/lib. + * Dropped changes, superseded in Debian/upstream: + - debian/patches/multiarch-kerberos-paths: Search for kerberos libs + in multiarch locations. + - ubuntu-fix-kernel-version-handling: avoid segfaults from short kernel + version numbers. + + -- Steve Langasek Sun, 30 Oct 2011 00:12:50 +0000 + nfs-utils (1:1.2.5-2) unstable; urgency=low * debian/patches/18-dont-use-PAGE_SIZE.patch @@ -58,6 +123,57 @@ -- Luk Claes Sat, 06 Aug 2011 07:38:48 +0200 +nfs-utils (1:1.2.4-1ubuntu4) precise; urgency=low + + * debian/nfs-common.postinst: handle the case when /var/lib/nfs/rpc_pipefs + is not already mounted on upgrade - dpkg will already remove the + directory for us on upgrade, so don't fail when it's missing. + LP: #882799. + + -- Steve Langasek Thu, 27 Oct 2011 16:21:22 -0700 + +nfs-utils (1:1.2.4-1ubuntu3) precise; urgency=low + + * debian/nfs-common.defaults, debian/nfs-common.idmapd.upstart: idmapd + should always be started automatically, because we can no longer assume + that a mount of type 'nfs' in /etc/fstab is not nfs4. This also lets + things work by default with nfs4 autofs. LP: #662711. + * Move /var/lib/nfs/rpc_pipefs to /run/rpc_pipefs. This does not belong + in /var/lib. + * Ignore errors from mount if the filesystem is already mounted. + LP: #811823. + + -- Steve Langasek Thu, 27 Oct 2011 12:04:58 -0700 + +nfs-utils (1:1.2.4-1ubuntu2) oneiric; urgency=low + + * Allow issuing options to rpc.nfsd + (LP: #567491) + + -- Bryce Harrington Mon, 08 Aug 2011 16:37:26 -0700 + +nfs-utils (1:1.2.4-1ubuntu1) oneiric; urgency=low + + * Merge from Debian unstable (LP: #728586, LP: #789117), remaining + changes: + - debian/nfs-common.{statd,statd-mounting,gssd,idmapd}.upstart, + debian/control, debian/nfs-common.{preinst,postinst,prerm,postrm}, + debian/rules: drop nfs-common init script in favor of upstart jobs, + and build-depend on debhelper (>= 7.3.15ubuntu3) for correct upstart + init handling. + - Depend on rpcbind (>= 0.2.0-6ubuntu1) for upstart support. + - debian/nfs-kernel-server.postinst: don't call "invoke-rc.d nfs-common" + in the postinst, this is redundant anyway and the nfs-common init script + is gone now. + - nfs-kernel-server.default: Add comment about how to disable nfs4. + - debian/patches/multiarch-kerberos-paths: Search for kerberos libs + in multiarch locations. + - nfs-kernel-server.init: Unmount nfsd fs when init script stops + - ubuntu-fix-kernel-version-handling: avoid segfaults from short kernel + version numbers. + + -- Steve Langasek Sat, 23 Jul 2011 17:54:36 +0200 + nfs-utils (1:1.2.4-1) unstable; urgency=low * New upstream version @@ -145,6 +261,93 @@ -- Luk Claes Wed, 16 Mar 2011 23:10:15 +0100 +nfs-utils (1:1.2.2-4ubuntu8) oneiric; urgency=low + + * debian/nfs-common.idmapd.upstart: don't use a script unnecessarily for + our job when we can exec directly - making the job more resilient in + the face of races with /usr being mounted. LP: #811823. + * Drop rpc_pipefs.conf; this has gotten far more complicated than it + should be, just do the mount in-line in each of the gssd and idmapd + jobs. + + -- Steve Langasek Sun, 17 Jul 2011 02:23:01 -0700 + +nfs-utils (1:1.2.2-4ubuntu7) oneiric; urgency=low + + [ Andy Whitcroft ] + * ubuntu-fix-kernel-version-handling: avoid segfaults from short kernel + version numbers. (LP: #796611) + + -- Evan Dandrea Tue, 14 Jun 2011 17:13:14 +0100 + +nfs-utils (1:1.2.2-4ubuntu6) oneiric; urgency=low + + * nfs-kernel-server.init: Unmount nfsd fs when init script stops + (LP: #251026) + + -- Bryce Harrington Mon, 06 Jun 2011 19:18:16 -0700 + +nfs-utils (1:1.2.2-4ubuntu5) natty; urgency=low + + * Search kerberos libs in multiarch locations. + + -- Matthias Klose Fri, 01 Apr 2011 12:35:30 +0200 + +nfs-utils (1:1.2.2-4ubuntu4) natty; urgency=low + + * nvs-kernel-server.default: Add comment about how to disable nfs4. + There are corner cases where the server providing nfsv4 as the default + can confuse the client (117957, 680680) or even cause kernel problems + (716811), so it is worthwhile to document how to fallback to nfs3 only. + + -- Bryce Harrington Mon, 14 Feb 2011 13:20:27 -0800 + +nfs-utils (1:1.2.2-4ubuntu3) natty; urgency=low + + * debian/nfs-common.statd.upstart: pass a new WAITER= variable + to portmap-wait, so that multiple jobs can wait in parallel, fixing + another subtle race condition; and bump the portmap dependency again for + the necessary instance support. + * also fix the grouping in the start condition, so that restarts work + correctly when portmap is restarted. + * debian/nfs-common.rpc_pipefs.upstart: instantiate this job separately for + gssd and idmapd, so that the filesystem gets mounted and unmounted + correctly even if both of gssd and idmapd aren't being run, or if one of + the two tries to start before the filesystem is fully mounted. Though + it may be simpler now to move this logic back into the gssd and idmapd + jobs directly, leave that for a later date. + + -- Steve Langasek Tue, 18 Jan 2011 17:45:45 -0800 + +nfs-utils (1:1.2.2-4ubuntu2) natty; urgency=low + + * debian/nfs-common.statd.upstart, + debian/nfs-common.statd-mounting.upstart: refactor startup to wait for + local-filesystems. (LP: #525154) + * debian/control: depend on portmap version that sets ON_BOOT=y and + has the portmap-wait job. + * debian/rules: install new statd-mounting upstart job + + -- Clint Byrum Wed, 05 Jan 2011 12:27:32 -0800 + +nfs-utils (1:1.2.2-4ubuntu1) natty; urgency=low + + * Merge from debian unstable (LP: #685860), remaining changes: + - debian/nfs-common.{statd,gssd,idmapd,rpc_pipefs}.upstart, + debian/control, debian/nfs-common.{preinst,postinst,prerm,postrm}, + debian/rules: drop nfs-common init script in favor of upstart jobs, and + build-depend on debhelper (>= 7.3.15ubuntu3) for correct upstart init + handling. + - debian/control: + + depend on the upstart-using version of portmap, 6.0-10ubuntu1; and + drop the alternative depends on rpcbind, which hasn't been converted. + + depend on portmap 6.0-10ubuntu1. + - debian/nfs-kernel-server.postinst: don't call "invoke-rc.d nfs-common" + in the postinst, this is redundant anyway and the nfs-common init script + is gone now. + + -- Lorenzo De Liso Wed, 15 Dec 2010 21:42:55 +0100 + nfs-utils (1:1.2.2-4) unstable; urgency=low * mountd: fix path comparison for v4 crossmnt (Closes: #578317) @@ -172,6 +375,28 @@ -- Anibal Monsalve Salazar Tue, 13 Jul 2010 15:20:17 +1000 +nfs-utils (1:1.2.2-1ubuntu1) maverick; urgency=low + + * Merge from Debian unstable, remaining changes: + - debian/nfs-common.{statd,gssd,idmapd,rpc_pipefs}.upstart, + debian/control, debian/nfs-common.{preinst,postinst,prerm,postrm}, + debian/rules: drop nfs-common init script in favor of upstart jobs, and + build-depend on debhelper (>= 7.3.15ubuntu3) for correct upstart init + handling. + - debian/control: depend on the upstart-using version of portmap, + 6.0-10ubuntu1; and drop the alternative depends on rpcbind, which + hasn't been converted. + - debian/nfs-kernel-server.postinst: don't call "invoke-rc.d nfs-common" + in the postinst, this is redundant anyway and the nfs-common init script + is gone now. + * Dropped changes, included in Debian: + - debian/control: add ${misc:Depends} line for nfs-common, for the + upstart deps + - debian/nfs-kernel-server.init: updated check for presence of nfsd + support + + -- Steve Langasek Fri, 04 Jun 2010 09:55:28 +0000 + nfs-utils (1:1.2.2-1) unstable; urgency=low [ Anibal Monsalve Salazar ] @@ -243,6 +468,51 @@ -- Ben Hutchings Wed, 16 Dec 2009 22:14:01 +0000 +nfs-utils (1:1.2.0-4ubuntu4) lucid; urgency=low + + * debian/nfs-common.gssd.upstart: + - fix the OPTIONS= match for the start condition (missing a leading '*') + so that we actually match on nfs4 mounts + - drop the 'script' for a straight exec of rpc.gssd; if /usr is a separate + partition then nfs4 mounts might be attempted in parallel, and upstart + gets mightily confused when this happens. LP: #545673 + + -- Steve Langasek Tue, 23 Mar 2010 22:26:07 -0700 + +nfs-utils (1:1.2.0-4ubuntu3) lucid; urgency=low + + * debian/nfs-common.*.upstart: start on new 'mounting' signal instead of + obsolete 'mount' signal. + + -- Steve Langasek Thu, 25 Feb 2010 06:41:46 -0800 + +nfs-utils (1:1.2.0-4ubuntu2) lucid; urgency=low + + * debian/nfs-kernel-server.init: 2.6.32 kernels no longer export the + same symbols. Switch symbol check to nfsd_serv which has been present + since 2005. LP: #493145. + + -- Andy Whitcroft Mon, 07 Dec 2009 16:56:56 +0000 + +nfs-utils (1:1.2.0-4ubuntu1) lucid; urgency=low + + * Merge from Debian testing, remaining changes: + - debian/nfs-common.{statd,gssd,idmapd,rpc_pipefs}.upstart, + debian/control, debian/nfs-common.{preinst,postinst,prerm,postrm}, + debian/rules: drop nfs-common init script in favor of upstart jobs, and + build-depend on debhelper (>= 7.3.15ubuntu3) for correct upstart init + handling. + - debian/control: depend on the upstart-using version of portmap, + 6.0-10ubuntu1; and drop the alternative depends on rpcbind, which + hasn't been converted. + - debian/control: add ${misc:Depends} line for nfs-common, for the + upstart deps + - debian/nfs-kernel-server.postinst: don't call "invoke-rc.d nfs-common" + in the postinst, this is redundant anyway and the nfs-common init script + is gone now. + + -- Steve Langasek Fri, 04 Dec 2009 18:37:48 -0800 + nfs-utils (1:1.2.0-4) unstable; urgency=low * Removing myself from uploaders. @@ -257,6 +527,94 @@ -- Steinar H. Gunderson Sun, 09 Aug 2009 12:47:00 +0200 +nfs-utils (1:1.2.0-2ubuntu9) lucid; urgency=low + + * debian/nfs-common.statd.upstart: check for a started portmap in a + non-racy manner. LP: #484209. + + -- Steve Langasek Tue, 17 Nov 2009 11:27:37 -0600 + +nfs-utils (1:1.2.0-2ubuntu8) karmic; urgency=low + + * debian/control: add missing ${misc:Depends} for nfs-common, else we don't + get the dependency on upstart that we should have. LP: #456281. + + -- Steve Langasek Tue, 20 Oct 2009 13:10:01 +0000 + +nfs-utils (1:1.2.0-2ubuntu7) karmic; urgency=low + + * debian/rules: now that the jobs will exit cleanly on their own when + 'start' is called but the job is a no-op, remove the --error-handler + option to dh_installinit so that we don't accidentally ignore other + kinds of errors that could point to real problems. + + -- Steve Langasek Sun, 11 Oct 2009 08:51:39 +0000 + +nfs-utils (1:1.2.0-2ubuntu6) karmic; urgency=low + + * Drop the gssd upstart job's dependency on "local-filesystems"; at boot + time this is always implied transitively by the dep on portmap, and using + a combination of 'or' and 'and' operators in the dependency list seems + to confuse upstart quite badly, causing kerberized mounts to hang at boot. + LP: #447654. + + -- Steve Langasek Sat, 10 Oct 2009 20:12:11 +0000 + +nfs-utils (1:1.2.0-2ubuntu5) karmic; urgency=low + + * Set upstart jobs to also start on mount attempt, in the event that + mountall gets to them before the daemons are done starting. Really-fixes + LP: #431248. + * Call 'stop' in the pre-start scripts for all jobs when we want to prevent + the job from starting; this lets upstart know that it's a clean stop, + and avoids boot-time messages about service start failures + + -- Steve Langasek Fri, 09 Oct 2009 19:17:34 +0000 + +nfs-utils (1:1.2.0-2ubuntu4) karmic; urgency=low + + * Mounting rpc_pipefs also requires the sunrpc module, so move this + modprobe to the right upstart job. + + -- Steve Langasek Mon, 05 Oct 2009 22:04:28 -0700 + +nfs-utils (1:1.2.0-2ubuntu3) karmic; urgency=low + + * nfs-kernel-server: don't call invoke-rc.d nfs-common in the postinst, + this is redundant anyway and the nfs-common init script is gone now. + LP: #441855. + + -- Steve Langasek Sat, 03 Oct 2009 23:07:09 -0700 + +nfs-utils (1:1.2.0-2ubuntu2) karmic; urgency=low + + * Configure gssd and idmapd upstart jobs to stop on runlevels 0 and 6; this + is consistent with previous initscript-based behavior, and spares upstart + trying to restart the jobs repeatedly when sendsigs runs. + * When autodetecting gssd, handle the case of 'sec=krb5' being embedded in + the middle of the options list in /etc/fstab. LP: #364861. + * Fix transition idempotency error when stopping old nfs-common init + script, in case the postinst fails to finish afterwards (e.g., failure to + restart the daemons). + * Fix statd upstart job to properly honor NEED_STATD=no and not get stuck + respawning indefinitely. + * Ignore failures to start the daemons on upgrade, since if they aren't + needed we don't *want* them to start. LP: #441055. + * Fix up the rpc_pipefs job, the wrong version of the file slipped into + the previous upload. + + -- Steve Langasek Sat, 03 Oct 2009 01:52:21 +0000 + +nfs-utils (1:1.2.0-2ubuntu1) karmic; urgency=low + + * Drop nfs-common init script in favor of new upstart jobs. LP: #431248. + * Build-depend on debhelper (>= 7.3.15ubuntu3) for correct upstart init + handling. + * Depend the upstart-using version of portmap, 6.0-10ubuntu1; and drop the + alternative depends on rpcbind, which hasn't been converted. + + -- Steve Langasek Fri, 02 Oct 2009 19:23:19 +0000 + nfs-utils (1:1.2.0-2) unstable; urgency=low * Merge from Ubuntu diff -Nru nfs-utils-1.2.5/debian/control nfs-utils-1.2.5/debian/control --- nfs-utils-1.2.5/debian/control 2011-12-09 10:58:50.000000000 +0000 +++ nfs-utils-1.2.5/debian/control 2012-03-27 17:40:11.000000000 +0000 @@ -1,9 +1,10 @@ Source: nfs-utils Priority: standard Section: net -Maintainer: Debian kernel team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian kernel team Uploaders: Anibal Monsalve Salazar , Ben Hutchings , Luk Claes -Build-Depends: debhelper (>= 7), libwrap0-dev, libevent-dev, libnfsidmap-dev (>= 0.24), libkrb5-dev, libgssglue-dev (>= 0.3), libblkid-dev, libkeyutils-dev, pkg-config, libldap2-dev, libcap-dev, libtirpc-dev, libdevmapper-dev, dh-autoreconf +Build-Depends: debhelper (>= 7.3.15ubuntu3), libwrap0-dev, libevent-dev, libnfsidmap-dev (>= 0.24), libkrb5-dev, libgssglue-dev (>= 0.3), libblkid-dev, libkeyutils-dev, pkg-config, libldap2-dev, libcap-dev, libtirpc-dev, libdevmapper-dev, dh-autoreconf Standards-Version: 3.9.0 Homepage: http://nfs.sourceforge.net/ Vcs-Git: git://git.debian.org/kernel/nfs-utils.git @@ -32,7 +33,7 @@ Package: nfs-common Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, rpcbind, adduser, ucf, lsb-base (>= 1.3-9ubuntu3), initscripts (>= 2.88dsf-13.3) +Depends: ${shlibs:Depends}, ${misc:Depends}, rpcbind (>= 0.2.0-6ubuntu1), adduser, ucf, lsb-base (>= 1.3-9ubuntu3), initscripts (>= 2.88dsf-13.3) Recommends: python Provides: nfs-client Conflicts: nfs-client diff -Nru nfs-utils-1.2.5/debian/idmapd.conf nfs-utils-1.2.5/debian/idmapd.conf --- nfs-utils-1.2.5/debian/idmapd.conf 2011-12-09 10:37:05.000000000 +0000 +++ nfs-utils-1.2.5/debian/idmapd.conf 2012-03-27 17:40:11.000000000 +0000 @@ -1,7 +1,7 @@ [General] Verbosity = 0 -Pipefs-Directory = /var/lib/nfs/rpc_pipefs +Pipefs-Directory = /run/rpc_pipefs # set your own domain here, if id differs from FQDN minus hostname # Domain = localdomain diff -Nru nfs-utils-1.2.5/debian/nfs-common.default nfs-utils-1.2.5/debian/nfs-common.default --- nfs-utils-1.2.5/debian/nfs-common.default 2011-07-09 14:38:23.000000000 +0000 +++ nfs-utils-1.2.5/debian/nfs-common.default 2012-03-27 17:40:11.000000000 +0000 @@ -12,8 +12,5 @@ # For more information, see rpc.statd(8) or http://wiki.debian.org/SecuringNFS STATDOPTS= -# 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 -Nru nfs-utils-1.2.5/debian/nfs-common.dirs nfs-utils-1.2.5/debian/nfs-common.dirs --- nfs-utils-1.2.5/debian/nfs-common.dirs 2011-07-09 14:38:23.000000000 +0000 +++ nfs-utils-1.2.5/debian/nfs-common.dirs 2012-03-27 17:40:11.000000000 +0000 @@ -4,7 +4,6 @@ var/lib/nfs var/lib/nfs/sm var/lib/nfs/sm.bak -var/lib/nfs/rpc_pipefs usr/share/nfs-common/conffiles usr/share/bug/nfs-common usr/share/bug/nfs-utils diff -Nru nfs-utils-1.2.5/debian/nfs-common.gssd.upstart nfs-utils-1.2.5/debian/nfs-common.gssd.upstart --- nfs-utils-1.2.5/debian/nfs-common.gssd.upstart 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.5/debian/nfs-common.gssd.upstart 2012-03-27 17:40:11.000000000 +0000 @@ -0,0 +1,87 @@ +# gssd - rpcsec_gss daemon + +# The rpcsec_gss protocol gives a means of using the GSS-API generic security +# API to provide security for protocols using RPC (in particular, NFS). + +description "rpcsec_gss daemon" +author "Steve Langasek " + +start on (started portmap + or mounting TYPE=nfs4 OPTIONS=*sec*krb5*) +stop on (stopping portmap or runlevel [06]) + +expect fork +respawn + +env DEFAULTFILE=/etc/default/nfs-common +env PIPEFS_MOUNTPOINT=/run/rpc_pipefs + +pre-start script + do_modprobe() { + modprobe -q "$1" || true + } + + if [ -f "$DEFAULTFILE" ]; then + . "$DEFAULTFILE" + fi + + # + # Parse the fstab file, and determine whether we need 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. + + if [ -f /etc/fstab ]; then + exec 9<&0 name mapper + +# rpc.idmapd is the NFSv4 ID <-> name mapping daemon. It provides +# functionality to the NFSv4 kernel client and server, to which it +# communicates via upcalls, by translating user and group IDs to names, and +# vice versa. + +description "NFSv4 id <-> name mapper" +author "Steve Langasek " + +start on (local-filesystems or mounting TYPE=nfs4) +stop on runlevel [06] + +expect fork +respawn + +env PIPEFS_MOUNTPOINT=/run/rpc_pipefs + +pre-start script + do_modprobe() { + modprobe -q "$1" || true + } + + do_modprobe nfs + do_modprobe nfsd + + do_modprobe sunrpc + + if ! mountpoint -q "$PIPEFS_MOUNTPOINT" + then + mkdir -p "$PIPEFS_MOUNTPOINT" + mount -t rpc_pipefs rpc_pipefs "$PIPEFS_MOUNTPOINT" || true + fi +end script + +exec rpc.idmapd + +post-stop script + if mountpoint -q "$PIPEFS_MOUNTPOINT" + then + # ignore any failures caused by the filesystem still + # being in use + umount "$PIPEFS_MOUNTPOINT" || true + fi +end script + diff -Nru nfs-utils-1.2.5/debian/nfs-common.init nfs-utils-1.2.5/debian/nfs-common.init --- nfs-utils-1.2.5/debian/nfs-common.init 2011-12-09 10:37:05.000000000 +0000 +++ nfs-utils-1.2.5/debian/nfs-common.init 2012-03-27 17:40:11.000000000 +0000 @@ -21,7 +21,7 @@ NEED_STATD= NEED_IDMAPD= NEED_GSSD= -PIPEFS_MOUNTPOINT=/var/lib/nfs/rpc_pipefs +PIPEFS_MOUNTPOINT=/run/rpc_pipefs RPCGSSDOPTS= if [ -f $DEFAULTFILE ]; then . $DEFAULTFILE @@ -173,6 +173,7 @@ do_modprobe sunrpc do_modprobe nfs do_modprobe nfsd + mkdir -p "$PIPEFS_MOUNTPOINT" if do_mount rpc_pipefs $PIPEFS_MOUNTPOINT then if [ "$NEED_IDMAPD" = yes ] diff -Nru nfs-utils-1.2.5/debian/nfs-common.postinst nfs-utils-1.2.5/debian/nfs-common.postinst --- nfs-utils-1.2.5/debian/nfs-common.postinst 2011-12-09 10:37:05.000000000 +0000 +++ nfs-utils-1.2.5/debian/nfs-common.postinst 2012-04-09 05:43:24.000000000 +0000 @@ -2,18 +2,23 @@ set -e -#DEBHELPER# +finish_rm_conffile() { + local CONFFILE="$1" + + if [ -e "$CONFFILE.dpkg-backup" ]; then + mv -f "$CONFFILE.dpkg-backup" "$CONFFILE.dpkg-bak" + fi + if [ -e "$CONFFILE.dpkg-remove" ]; then + echo "Removing obsolete conffile $CONFFILE ..." + rm -f "$CONFFILE.dpkg-remove" + fi +} 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/nfs-common.default /etc/default/nfs-common - if [ "$2" != "" ] && dpkg --compare-versions "$2" lt 1:1.1.0-10; then - update-rc.d -f nfs-common remove >/dev/null - fi - update-rc.d nfs-common start 20 2 3 4 5 . stop 20 0 1 6 . start 44 S . >/dev/null - if ! getent passwd statd >/dev/null; then adduser --system --home /var/lib/nfs --no-create-home statd fi @@ -26,7 +31,6 @@ 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 @@ -38,6 +42,26 @@ fi fi + if dpkg --compare-versions "$2" lt-nl 1:1.2.0-2ubuntu1 + then + if [ -e /etc/init.d/nfs-common.dpkg-remove ] + then + invoke-rc.d nfs-common.dpkg-remove stop + elif [ -e /etc/init.d/nfs-common.dpkg-backup ] + then + invoke-rc.d nfs-common.dpkg-backup stop + fi + update-rc.d nfs-common remove + elif dpkg --compare-versions "$2" lt-nl 1:1.2.4-1ubuntu3 + then + # handle the move of rpc_pipefs from /var/lib to /run + invoke-rc.d idmapd stop + invoke-rc.d gssd stop + if [ -d /var/lib/nfs/rpc_pipefs ]; then + rmdir --ignore-fail-on-non-empty /var/lib/nfs/rpc_pipefs + fi + fi + # Migrate /lib/init/rw/sendsigs.omit.statd to /run. if [ -f /lib/init/rw/sendsigs.omit.d/statd ]; then mv /lib/init/rw/sendsigs.omit.d/statd /run/sendsigs.omit.d/statd @@ -45,6 +69,10 @@ ;; esac -act="restart" -[ "$1:$2" = "configure:" ] && act="start" -invoke-rc.d nfs-common $act +finish_rm_conffile /etc/init/rpc_pipefs.conf + + + +#DEBHELPER# + +finish_rm_conffile /etc/init.d/nfs-common diff -Nru nfs-utils-1.2.5/debian/nfs-common.postrm nfs-utils-1.2.5/debian/nfs-common.postrm --- nfs-utils-1.2.5/debian/nfs-common.postrm 2011-07-09 14:38:23.000000000 +0000 +++ nfs-utils-1.2.5/debian/nfs-common.postrm 2012-03-27 17:40:11.000000000 +0000 @@ -6,7 +6,6 @@ case "$1" in purge) - update-rc.d nfs-common remove >/dev/null for FILE in /etc/default/nfs-common /etc/idmapd.conf; do # Taken from the ucf example postrm diff -Nru nfs-utils-1.2.5/debian/nfs-common.preinst nfs-utils-1.2.5/debian/nfs-common.preinst --- nfs-utils-1.2.5/debian/nfs-common.preinst 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.5/debian/nfs-common.preinst 2012-03-27 17:40:11.000000000 +0000 @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e + +prepare_rm_conffile() { + local CONFFILE="$1" + local PACKAGE="$2" + + [ -e "$CONFFILE" ] || return 0 + + local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')" + local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PACKAGE | \ + sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")" + if [ "$md5sum" != "$old_md5sum" ]; then + echo "Obsolete conffile $CONFFILE has been modified by you." + echo "Saving as $CONFFILE.dpkg-bak ..." + mv -f "$CONFFILE" "$CONFFILE.dpkg-backup" + else + echo "Moving obsolete conffile $CONFFILE out of the way..." + mv -f "$CONFFILE" "$CONFFILE.dpkg-remove" + fi +} + +# remove the obsolete init script (replaced by an upstart job) +if [ "$1" = install ] || [ "$1" = upgrade ]; then + if [ -e "/etc/init.d/nfs-common" ] && [ ! -L "/etc/init.d/nfs-common" ]; then + prepare_rm_conffile /etc/init.d/nfs-common nfs-common + fi +fi + +prepare_rm_conffile /etc/init/rpc_pipefs.conf nfs-common + +#DEBHELPER# diff -Nru nfs-utils-1.2.5/debian/nfs-common.prerm nfs-utils-1.2.5/debian/nfs-common.prerm --- nfs-utils-1.2.5/debian/nfs-common.prerm 2011-07-09 14:38:23.000000000 +0000 +++ nfs-utils-1.2.5/debian/nfs-common.prerm 2012-03-27 17:40:11.000000000 +0000 @@ -4,13 +4,6 @@ #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/* \ diff -Nru nfs-utils-1.2.5/debian/nfs-common.statd-mounting.upstart nfs-utils-1.2.5/debian/nfs-common.statd-mounting.upstart --- nfs-utils-1.2.5/debian/nfs-common.statd-mounting.upstart 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.5/debian/nfs-common.statd-mounting.upstart 2012-03-27 17:40:11.000000000 +0000 @@ -0,0 +1,28 @@ +# statd-mounting + +description "Block the mounting event for NFS filesytems until statd is running" +author "Clint Byrum " + +start on mounting TYPE=nfs +stop on started statd or stopped statd +task + +# This is required so that the task is still considered +# successful when it gets killed +normal exit 2 + +script + + status statd | grep -q "start/running" && exit 0 + + # Attempt to start statd + start statd || true + + # If its already starting we'll get killed by the impending 'stop on + # started statd' + # If it wasn't already starting, we'll either get killed by the stop + # on started or stopped. + # So, its safe to sleep forever here and rely on upstart to kill us, + + while sleep 3600; do :; done +end script diff -Nru nfs-utils-1.2.5/debian/nfs-common.statd.upstart nfs-utils-1.2.5/debian/nfs-common.statd.upstart --- nfs-utils-1.2.5/debian/nfs-common.statd.upstart 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.5/debian/nfs-common.statd.upstart 2012-03-27 17:40:11.000000000 +0000 @@ -0,0 +1,46 @@ +# statd - NSM status monitor + +description "NSM status monitor" +author "Steve Langasek " + +# ON_BOOT is set to y in portmap's special portmap-boot.conf +# It will not be set when users run 'restart portmap' or 'start portmap' +# This is so that we don't start until we have local filesystems on +# bootup but we also restart whenever portmap is restarted. -Clint Byrum +# +# The case where we need to make sure statd is started on mounting +# TYPE=nfs is handled in the "statd-mounting" job. +# +start on (started portmap ON_BOOT= + or (local-filesystems and started portmap ON_BOOT=y)) +stop on stopping portmap + +expect fork +respawn + +env DEFAULTFILE=/etc/default/nfs-common + +pre-start script + if [ -f "$DEFAULTFILE" ]; then + . "$DEFAULTFILE" + fi + + [ "x$NEED_STATD" != xno ] || { stop; exit 0; } + logger -t statd-pre-start "$UPSTART_EVENTS" || true + echo UPSTART_EVENTS = "$UPSTART_EVENTS" + + # This will block if portmap is mid-starting + start portmap-wait WAITER=statd + + exec sm-notify +end script + +script + if [ -f "$DEFAULTFILE" ]; then + . "$DEFAULTFILE" + fi + + if [ "x$NEED_STATD" != xno ]; then + exec rpc.statd -L $STATDOPTS + fi +end script diff -Nru nfs-utils-1.2.5/debian/nfs-kernel-server.default nfs-utils-1.2.5/debian/nfs-kernel-server.default --- nfs-utils-1.2.5/debian/nfs-kernel-server.default 2011-12-09 10:37:05.000000000 +0000 +++ nfs-utils-1.2.5/debian/nfs-kernel-server.default 2012-03-27 17:40:11.000000000 +0000 @@ -1,4 +1,5 @@ # Number of servers to start up +# To disable nfsv4 on the server, specify '--no-nfs-version 4' here RPCNFSDCOUNT=8 # Runtime priority of server (see nice(1)) @@ -6,7 +7,7 @@ # 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, +# a fixed port here using the --port option. For more information, # see rpc.mountd(8) or http://wiki.debian.org/SecuringNFS # To disable NFSv4 on the server, specify '--no-nfs-version 4' here RPCMOUNTDOPTS=--manage-gids @@ -17,3 +18,6 @@ # Options for rpc.svcgssd. RPCSVCGSSDOPTS= + +# Options for rpc.nfsd. +RPCNFSDOPTS= diff -Nru nfs-utils-1.2.5/debian/nfs-kernel-server.init nfs-utils-1.2.5/debian/nfs-kernel-server.init --- nfs-utils-1.2.5/debian/nfs-kernel-server.init 2011-07-09 14:38:23.000000000 +0000 +++ nfs-utils-1.2.5/debian/nfs-kernel-server.init 2012-03-27 17:40:11.000000000 +0000 @@ -30,6 +30,7 @@ RPCMOUNTDOPTS= NEED_SVCGSSD=no RPCSVCGSSDOPTS= +RPCNFSDOPTS= PROCNFSD_MOUNTPOINT=/proc/fs/nfsd if [ -f $DEFAULTFILE ]; then . $DEFAULTFILE @@ -69,7 +70,7 @@ log_warning_msg "Not starting $DESC: no support in current kernel." exit 0 fi - + do_mount nfsd $PROCNFSD_MOUNTPOINT || NEED_SVCGSSD=no log_begin_msg "Exporting directories for $DESC..." $PREFIX/sbin/exportfs -r @@ -82,9 +83,9 @@ log_daemon_msg "Starting $DESC" log_progress_msg "nfsd" - + # See if rpcbind is running - /usr/sbin/rpcinfo -p >/dev/null 2>&1 + rpcinfo -p >/dev/null 2>&1 RET=$? if [ $RET != 0 ]; then echo @@ -94,7 +95,7 @@ start-stop-daemon --start --oknodo --quiet \ --nicelevel $RPCNFSDPRIORITY \ - --exec $PREFIX/sbin/rpc.nfsd -- $RPCNFSDCOUNT + --exec $PREFIX/sbin/rpc.nfsd -- $RPCNFSDOPTS $RPCNFSDCOUNT RET=$? if [ $RET != 0 ]; then log_end_msg $RET @@ -111,7 +112,7 @@ } fi - $PREFIX/bin/rpcinfo -u localhost nfs 3 >/dev/null 2>&1 || + 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 @@ -189,6 +190,7 @@ if mountpoint -q $PROCNFSD_MOUNTPOINT then $PREFIX/sbin/exportfs -f + umount $PROCNFSD_MOUNTPOINT fi ;; diff -Nru nfs-utils-1.2.5/debian/nfs-kernel-server.postinst nfs-utils-1.2.5/debian/nfs-kernel-server.postinst --- nfs-utils-1.2.5/debian/nfs-kernel-server.postinst 2011-07-09 14:38:23.000000000 +0000 +++ nfs-utils-1.2.5/debian/nfs-kernel-server.postinst 2012-03-27 17:40:11.000000000 +0000 @@ -21,5 +21,4 @@ act="restart" [ "$1:$2" = "configure:" ] && act="start" -[ "$1:$2" = "configure:" ] && invoke-rc.d nfs-common start invoke-rc.d nfs-kernel-server $act diff -Nru nfs-utils-1.2.5/debian/rules nfs-utils-1.2.5/debian/rules --- nfs-utils-1.2.5/debian/rules 2011-12-09 10:37:05.000000000 +0000 +++ nfs-utils-1.2.5/debian/rules 2012-03-27 17:40:11.000000000 +0000 @@ -2,7 +2,9 @@ # Parsing of DEB_BUILD_OPTIONS flags. # Note that nostrip is handled automatically by debhelper. -CFLAGS := -g -Wall +CFLAGS := -g -Wall -DPIPEFS_DIR=\\\"/run/rpc_pipefs\\\" \ + -DGSSD_PIPEFS_DIR=\\\"/run/rpc_pipefs\\\" + ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else @@ -52,7 +54,10 @@ dh_install -Xman --fail-missing 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 + dh_installinit -pnfs-common --upstart-only -R --name statd + dh_installinit -pnfs-common --upstart-only --no-start --name statd-mounting + dh_installinit -pnfs-common --upstart-only -R --name gssd + dh_installinit -pnfs-common --upstart-only -R --name idmapd install -m 0755 debian/nfs-kernel-server.init debian/nfs-kernel-server/etc/init.d/nfs-kernel-server install -m 0644 debian/nfs-common.bugcontrol debian/nfs-common/usr/share/bug/nfs-common/control install -m 0755 debian/nfs-common.bugscript debian/nfs-common/usr/share/bug/nfs-common/script