diffstat of debian/ for nfs-utils_1.2.8-9 nfs-utils_1.2.8-9ubuntu12 changelog | 727 +++++++++++++++++++ control | 11 nfs-common.default | 5 nfs-common.gssd-mounting.upstart | 57 + nfs-common.gssd.upstart | 86 ++ nfs-common.idmapd-mounting.upstart | 27 nfs-common.idmapd.upstart | 46 + nfs-common.install | 9 nfs-common.links | 2 nfs-common.postinst | 52 + nfs-common.preinst | 43 + nfs-common.statd-mounting.upstart | 29 nfs-common.statd.upstart | 42 + nfs-kernel-server.default | 5 nfs-kernel-server.init | 12 nfs-kernel-server.install | 4 nfs-kernel-server.links | 2 nfs-utils_env.sh | 23 patches/00git-start-statd-systemd.patch | 27 patches/00git-systemd-units.patch | 385 ++++++++++ patches/20-ticket-expired-error.patch | 79 ++ patches/23-systemd-relax-dependencies.patch | 122 +++ patches/24-systemd-pipefs_in_run.patch | 92 ++ patches/25-systemd-daemon-paths.patch | 24 patches/26-systemd-server-before-client.patch | 28 patches/27-systemd-enable-with-systemctl-statd.patch | 66 + patches/90-gss-free-lucid-sec-context.patch | 20 patches/remove-gssproxy.patch | 57 + patches/series | 10 rules | 11 statd-mounting.override | 1 statd.override | 1 tests/control | 4 tests/local-server-client | 65 + 34 files changed, 2153 insertions(+), 21 deletions(-) diff -Nru nfs-utils-1.2.8/debian/changelog nfs-utils-1.2.8/debian/changelog --- nfs-utils-1.2.8/debian/changelog 2014-08-13 00:12:43.000000000 +0000 +++ nfs-utils-1.2.8/debian/changelog 2016-04-06 14:49:00.000000000 +0000 @@ -1,3 +1,140 @@ +nfs-utils (1:1.2.8-9ubuntu12) xenial; urgency=medium + + * Drop gssproxy as it's not in Ubuntu (LP: #1446851) + * Fix no nfs doesn't show failed units on client (LP: #1452667) + + -- Bryan Quigley Wed, 02 Mar 2016 15:01:29 -0500 + +nfs-utils (1:1.2.8-9ubuntu11) xenial; urgency=medium + + * Drop obsolete and no-op dh_installinit --upstart-only option. + (LP: #1519228) + + -- Martin Pitt Tue, 24 Nov 2015 09:39:56 +0100 + +nfs-utils (1:1.2.8-9ubuntu10) wily; urgency=medium + + * debian/nfs-common.links: Add naming compatibility symlinks for + gssd.service → rpc-gssd.service and idmapd.service → /dev/null (as this + is bound to/handled by nfs-server.service) to provide a match for the + upstart job names. (LP: #1476010). + + -- Martin Pitt Fri, 28 Aug 2015 09:59:48 +0200 + +nfs-utils (1:1.2.8-9ubuntu9) wily; urgency=medium + + * Drop versioned mountall dependency. Trusty's is already newer and we don't + need it with systemd under Ubuntu 15.04 and newer. + + -- Martin Pitt Mon, 27 Jul 2015 10:37:24 +0200 + +nfs-utils (1:1.2.8-9ubuntu8.1) vivid; urgency=medium + + * Add a dependency on keyutils to nfs-common, so that idmapping will work + under systemd. LP: #1449074. + + -- Steve Langasek Mon, 27 Apr 2015 17:46:03 +0200 + +nfs-utils (1:1.2.8-9ubuntu8) vivid; urgency=medium + + * Ship missing .override files + * Ensure we only remove the manual flag from the statd-mounting.override + file, and potentially, remove it if empty. + + -- Didier Roche Wed, 01 Apr 2015 08:22:59 +0200 + +nfs-utils (1:1.2.8-9ubuntu7) vivid; urgency=medium + + * 27-systemd-enable-with-systemctl-statd.patch: let the admin + enable/disable statd via systemd tools. (LP: #1428486) + * debian/nfs-common.default: remove NEED_STATD and related comment. + * debian/statd{,-mounting}.upstart: remove the usage of NEED_STATD, we'll + directly disable the jobs now. + * debian/rules: don't start statd by default (or it will trigger upstart + and systemd statd unit startup). + * debian/nfs-common.{preinst,postinst}: transition the conffile to the new + template and enable statd services in both upstart and systemd if + NEED_STATD was set to yes. + * debian/control, debian/*install: move nfs-utils.service to nfs-common + package. (LP: #1436304) + + -- Didier Roche Thu, 12 Mar 2015 09:13:06 +0100 + +nfs-utils (1:1.2.8-9ubuntu6) vivid; urgency=medium + + * Revert previous upload; per upstream, rpc.idmapd is not used when the + nfsidmap utility is available and configured for use in request-key + upcalls. So rpc.idmapd does not need to be started on clients anymore. + + -- Steve Langasek Fri, 06 Mar 2015 10:19:57 -0800 + +nfs-utils (1:1.2.8-9ubuntu5) vivid; urgency=medium + + * Add 27-systemd-start-nfs-idmapd-also-on-clients.patch: idmapd is needed + for clients too, so start it from nfs-client.target and stop binding to it + in nfs-server.service. (LP: #1428961) + + -- Martin Pitt Fri, 06 Mar 2015 11:56:46 +0100 + +nfs-utils (1:1.2.8-9ubuntu4) vivid; urgency=medium + + * Add autopkgtest for installing server and client on localhost, setting up + two exports, rebooting, and ensuring that the NFS mounts work. + * Add 23-systemd-relax-dependencies.patch: Stop depending on basic.target in + the daemons which still do; i. e. add DefaultDependencies=no. This makes + it possible to run NFS during early boot, helps if you e. g. have /var + on NFS, and avoids dependency cycles with rcS init.d scripts which depend + on $remote_fs. (LP: #1428487) + * Shift number prefixes of other systemd patches accordingly, and adjust + them to the above patch. + + -- Martin Pitt Thu, 05 Mar 2015 10:43:54 +0100 + +nfs-utils (1:1.2.8-9ubuntu3) vivid; urgency=medium + + * Add 00git-start-statd-systemd.patch: Latest start-statd script from + 1.3.2 to start rpc-statd.service under systemd. + * Add 23-systemd-pipefs_in_run.patch: systemd: Mount rpc_pipefs in /run instead of + /var/lib/nfs/, like in the upstart units. + * Add 24-systemd-daemon-paths.patch: Adjust program paths in systemd units. + * debian/nfs-kernel-server.links: Add nfs-kernel-server.service alias + symlink, to match SysV init script. + * Add 25-systemd-server-before-client.patch: Order NFS server before client, + to make mounting NFS shares from localhost work reliably. + * Add debian/nfs-utils_env.sh: Translate our /etc/default files into runtime + configuration for nfs-config.service. + * debian/nfs-{common,kernel-server}.install: Install systemd units. + * debian/rules: Enable/start systemd units. (LP: #1312976) + + -- Martin Pitt Thu, 05 Mar 2015 07:46:41 +0100 + +nfs-utils (1:1.2.8-9ubuntu2) vivid; urgency=medium + + * debian/nfs-common.statd.upstart: wait for rpcbind job instead of + relying on portmap compatibility event. (LP: #1391296) + + -- Marc Deslauriers Tue, 18 Nov 2014 19:07:15 -0500 + +nfs-utils (1:1.2.8-9ubuntu1) utopic; urgency=medium + + * Merge from Debian usntable, 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. + - Depend on rpcbind (>= 0.2.0-6ubuntu1) for upstart support. + - Depend on mountall (>= 2.41) to avoid deadlocks on boot. + - debian/nfs-common.default: always start idmapd automatically; drop + the configuration option. + - nfs-kernel-server.init: Unmount nfsd fs when init script stops + - Allow issuing options to rpc.nfsd + - Add "-e" (ticket expiry is error) option to rpc.gssd to prevent hangs + due to EKEYEXPIRED error from kernel on ticket expiry. + - drop nfs-kernel-server's LSB dependency on nfs-common. + - Add patch to adjust for changes to the ctx argument of the + serialize_krb5_ctx() function. + + -- Steve Langasek Thu, 21 Aug 2014 11:29:38 -0700 + nfs-utils (1:1.2.8-9) unstable; urgency=medium * debian/patches/22-mountd-fix-segfault-in-add_name-with-newer-gcc- @@ -6,6 +143,26 @@ -- Steve Langasek Tue, 12 Aug 2014 17:12:38 -0700 +nfs-utils (1:1.2.8-8ubuntu1) utopic; urgency=medium + + * Merge from Debian unstable, 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. + - Depend on rpcbind (>= 0.2.0-6ubuntu1) for upstart support. + - Depend on mountall (>= 2.41) to avoid deadlocks on boot. + - debian/nfs-common.default: always start idmapd automatically; drop + the configuration option. + - nfs-kernel-server.init: Unmount nfsd fs when init script stops + - Allow issuing options to rpc.nfsd + - Add "-e" (ticket expiry is error) option to rpc.gssd to prevent hangs + due to EKEYEXPIRED error from kernel on ticket expiry. + - drop nfs-kernel-server's LSB dependency on nfs-common. + - Add patch to adjust for changes to the ctx argument of the + serialize_krb5_ctx() function. + + -- Steve Langasek Mon, 11 Aug 2014 01:10:28 -0700 + nfs-utils (1:1.2.8-8) unstable; urgency=medium * Upload to unstable where this belongs. @@ -26,6 +183,38 @@ -- Anibal Monsalve Salazar Sat, 02 Aug 2014 12:25:47 +0100 +nfs-utils (1:1.2.8-6ubuntu4) utopic; urgency=medium + + * Add patch from Sergio Gelato to adjust for changes to the ctx + argument of the serialize_krb5_ctx() function (LP: #1331201) + + -- Adam Conrad Wed, 25 Jun 2014 12:23:09 -0600 + +nfs-utils (1:1.2.8-6ubuntu3) utopic; urgency=medium + + * Soon nfs-common.init is going to be split on the Debian side, and + nfs-kernel-server init.d's LSB depends on "nfs-common" has never done + anything in Ubuntu. Drop it to avoid breaking insserv. (LP: #1323274) + + -- Martin Pitt Tue, 27 May 2014 11:38:51 +0200 + +nfs-utils (1:1.2.8-6ubuntu1) trusty; urgency=medium + + * Merge from Debian unstable, 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. + - Depend on rpcbind (>= 0.2.0-6ubuntu1) for upstart support. + - Depend on mountall (>= 2.41) to avoid deadlocks on boot. + - debian/nfs-common.default: always start idmapd automatically; drop + the configuration option. + - nfs-kernel-server.init: Unmount nfsd fs when init script stops + - Allow issuing options to rpc.nfsd + - Add "-e" (ticket expiry is error) option to rpc.gssd to prevent hangs + due to EKEYEXPIRED error from kernel on ticket expiry. + + -- Steve Langasek Tue, 25 Feb 2014 09:18:47 -0800 + nfs-utils (1:1.2.8-6) unstable; urgency=medium * Fix the sec=krb5* handling in debian/nfs-common.init to properly match @@ -52,6 +241,29 @@ -- Steve Langasek Mon, 24 Feb 2014 18:11:17 +0000 +nfs-utils (1:1.2.8-5ubuntu1) trusty; urgency=medium + + * Merge from Debian unstable, 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. + - Depend on rpcbind (>= 0.2.0-6ubuntu1) for upstart support. + - Depend on mountall (>= 2.41) to avoid deadlocks on boot. + - debian/nfs-common.default: always start idmapd automatically; drop + the configuration option. + - nfs-kernel-server.init: Unmount nfsd fs when init script stops + - Allow issuing options to rpc.nfsd + - Add "-e" (ticket expiry is error) option to rpc.gssd to prevent hangs + due to EKEYEXPIRED error from kernel on ticket expiry. + * Dropped changes, included in Debian: + - Move /var/lib/nfs/rpc_pipefs to /run/rpc_pipefs. This does not belong + in /var/lib. + - 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 Mon, 13 Jan 2014 21:13:11 -0800 + nfs-utils (1:1.2.8-5) unstable; urgency=medium [ Ben Hutchings ] @@ -68,6 +280,37 @@ -- Steve Langasek Mon, 13 Jan 2014 22:07:53 +0000 +nfs-utils (1:1.2.8-4ubuntu1) trusty; urgency=low + + * Merge from Debian unstable, 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. + - Depend on rpcbind (>= 0.2.0-6ubuntu1) for upstart support. + - Depend on mountall (>= 2.41) to avoid deadlocks on boot. + - 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.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. + - Add "-e" (ticket expiry is error) option to rpc.gssd to prevent hangs due + to EKEYEXPIRED error from kernel on ticket expiry. LP: #794112 + - Fix the stop conditions: never stop on 'runlevel [06]' since that gives + the system no time to cleanly unmount nfs mounts; instead, stop only on + the unmounted-remote-filesystems event. LP: #569094. + * Dropped changes: + - build-depend on debhelper (>= 7.3.15ubuntu3): all supported debhelper + versions meet this requirement now, so it's not worth carrying a delta + for. + * Drop removal handling for rpc_pipefs.conf, which has been obsolete since + before the 12.04 release. + + -- Steve Langasek Thu, 21 Nov 2013 13:35:20 -0800 + nfs-utils (1:1.2.8-4) unstable; urgency=low * The configure option name is --with-gssglue, not --with-libgssglue. @@ -86,6 +329,64 @@ -- Steve Langasek Fri, 31 May 2013 17:59:53 -0700 +nfs-utils (1:1.2.8-2ubuntu2) saucy; urgency=low + + * Start statd on virtual-filesystems instead of on local-filesystems; + this works and avoids a deadlock in the nfsroot case. Also, adjust + idmapd to not block MOUNTPOINT=/ for the same reason. This isn't a + perfect fix since idmapd would be needed if we ever wanted nfsv4 + nfsroot, but implementing that can wait until we have /usr mounting from + the initramfs. LP: #537133. + + -- Steve Langasek Wed, 11 Sep 2013 15:00:02 -0700 + +nfs-utils (1:1.2.8-2ubuntu1) saucy; urgency=low + + [ Stéphane Graber ] + * Merge from Debian unstable. + - includes upstream fix for gssd -R. LP: #1179992. + - includes upstream fix for an exportfs crash when using long paths. + LP: #1062022. + * 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.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. + - Add "-e" (ticket expiry is error) option to rpc.gssd to prevent hangs due + to EKEYEXPIRED error from kernel on ticket expiry. LP: #794112 + - Adjust upstart jobs to treat TYPE=nfs and TYPE=nfs4 mounts identically, + since TYPE=nfs4 is considered deprecated. + - Fix various boot-time race conditions between mountall and nfs-utils by + moving handling of the 'mounting' events to separate gssd-mounting and + idmapd-mounting jobs. Requires mountall 2.41 or better to avoid deadlock + on boot. LP: #643289, LP: #611397. + - Fix the stop conditions: never stop on 'runlevel [06]' since that gives + the system no time to cleanly unmount nfs mounts; instead, stop only on + the unmounted-remote-filesystems event. LP: #569094. + - Newer versions of gssd don't talk to portmap, so don't make the upstart + job depend on it. + - Add an instance to statd-mounting, and change it to just wait for statd + instead of trying to trigger it potentially out of order. This also + means we don't need to try to force portmap to start from statd. + + [ Steve Langasek ] + * Build --with-gssglue; linking directly against libgssapi-krb5 results in + rpc.gssd trying to incorrectly pass opaque pointers between two different + gss implementations (via libtirpc). + + -- Steve Langasek Fri, 31 May 2013 18:05:03 -0700 + nfs-utils (1:1.2.8-2) unstable; urgency=medium * Fix reportbug scripts to use rpcinfo in /usr/sbin. @@ -115,12 +416,80 @@ -- Luk Claes Fri, 10 May 2013 14:27:47 +0200 +nfs-utils (1:1.2.6-3ubuntu2) quantal; urgency=low + + [ Steve Langasek ] + * Adjust upstart jobs to treat TYPE=nfs and TYPE=nfs4 mounts identically, + since TYPE=nfs4 is considered deprecated. + * Fix various boot-time race conditions between mountall and nfs-utils by + moving handling of the 'mounting' events to separate gssd-mounting and + idmapd-mounting jobs. Requires mountall 2.41 or better to avoid deadlock + on boot. LP: #643289, LP: #611397. + * Fix the stop conditions: never stop on 'runlevel [06]' since that gives + the system no time to cleanly unmount nfs mounts; instead, stop only on + the unmounted-remote-filesystems event. LP: #569094. + * Newer versions of gssd don't talk to portmap, so don't make the upstart + job depend on it. + * Add an instance to statd-mounting, and change it to just wait for statd + instead of trying to trigger it potentially out of order. This also means + we don't need to try to force portmap to start from statd. + + [ Matthew L. Dailey ] + * Add "-e" (ticket expiry is error) option to rpc.gssd to prevent hangs due + to EKEYEXPIRED error from kernel on ticket expiry. LP: #794112 + + -- Stéphane Graber Fri, 28 Sep 2012 13:58:43 -0400 + +nfs-utils (1:1.2.6-3ubuntu1) quantal; urgency=low + + * Merge from Debian unstable. 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.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. + + -- Logan Rosen Sun, 05 Aug 2012 00:56:05 -0400 + nfs-utils (1:1.2.6-3) unstable; urgency=low * Iterate through exports.d to look for expors (Closes: #676604). -- Luk Claes Tue, 10 Jul 2012 19:38:22 +0200 +nfs-utils (1:1.2.6-2ubuntu1) quantal; urgency=low + + * Merge from Debian unstable, 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.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, included in Debian: + - nfs-kernel-server.default: Add comment about how to disable nfs4. + + -- Steve Langasek Fri, 22 Jun 2012 11:25:28 -0700 + nfs-utils (1:1.2.6-2) unstable; urgency=low * Move open-iscsi and watchdog to Suggests. @@ -148,6 +517,44 @@ -- Luk Claes Sun, 22 Jan 2012 15:46:25 +0100 +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 ] @@ -166,6 +573,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 @@ -208,6 +642,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 @@ -295,6 +780,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) @@ -322,6 +894,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 ] @@ -393,6 +987,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. @@ -407,6 +1046,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.8/debian/control nfs-utils-1.2.8/debian/control --- nfs-utils-1.2.8/debian/control 2014-08-13 00:12:43.000000000 +0000 +++ nfs-utils-1.2.8/debian/control 2015-07-27 08:37:22.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 , Steve Langasek -Build-Depends: debhelper (>= 7), libwrap0-dev, libevent-dev, libnfsidmap-dev (>= 0.24), libkrb5-dev, libblkid-dev, libkeyutils-dev, pkg-config, libldap2-dev, libcap-dev, libtirpc-dev (>= 0.2.4-2~), libdevmapper-dev, dh-autoreconf, libmount-dev, libsqlite3-dev +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 (>= 0.2.4-2~), libdevmapper-dev, dh-autoreconf, libmount-dev, libsqlite3-dev, dh-systemd Standards-Version: 3.9.0 Homepage: http://nfs.sourceforge.net/ Vcs-Git: git://git.debian.org/kernel/nfs-utils.git @@ -32,13 +33,13 @@ Package: nfs-common Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, rpcbind, adduser, ucf, lsb-base (>= 1.3-9ubuntu3), initscripts (>= 2.88dsf-13.3), libtirpc1 (>= 0.2.4) +Depends: ${shlibs:Depends}, ${misc:Depends}, rpcbind (>= 0.2.0-6ubuntu1), adduser, ucf, lsb-base (>= 1.3-9ubuntu3), initscripts (>= 2.88dsf-13.10ubuntu1), libtirpc1 (>= 0.2.4), keyutils Recommends: python Suggests: open-iscsi, watchdog Provides: nfs-client Conflicts: nfs-client -Breaks: nfs-kernel-server (<< 1:1.2.8-6~) -Replaces: nfs-client, nfs-kernel-server (<< 1:1.2.8-6~), mount (<< 2.13~) +Breaks: nfs-kernel-server (<< 1:1.2.8-9ubuntu7~) +Replaces: nfs-client, nfs-kernel-server (<< 1:1.2.8-9ubuntu7~), mount (<< 2.13~) Description: NFS support files common to client and server Use this package on any machine that uses NFS, either as client or server. Programs included: lockd, statd, showmount, nfsstat, gssd, diff -Nru nfs-utils-1.2.8/debian/nfs-common.default nfs-utils-1.2.8/debian/nfs-common.default --- nfs-utils-1.2.8/debian/nfs-common.default 2014-08-13 00:12:43.000000000 +0000 +++ nfs-utils-1.2.8/debian/nfs-common.default 2015-04-27 15:44:03.000000000 +0000 @@ -2,8 +2,6 @@ # autodetected; this should be sufficient for most people. Valid alternatives # for the NEED_ options are "yes" and "no". -# Do you want to start the statd daemon? It is not needed for NFSv4. -NEED_STATD= # Options for rpc.statd. # Should rpc.statd listen on a specific port? This is especially useful @@ -12,8 +10,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.8/debian/nfs-common.gssd-mounting.upstart nfs-utils-1.2.8/debian/nfs-common.gssd-mounting.upstart --- nfs-utils-1.2.8/debian/nfs-common.gssd-mounting.upstart 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/nfs-common.gssd-mounting.upstart 2012-10-10 16:15:43.000000000 +0000 @@ -0,0 +1,57 @@ +# gssd-mounting + +description "Block the mounting event for NFS4 filesytems until gssd is running" +author "Steve Langasek " + +instance $MOUNTPOINT + +start on mounting TYPE=nfs* OPTIONS=*sec*krb5* +stop on started gssd or stopped gssd +task + +# This is required so that the task is still considered +# successful when it gets killed +normal exit TERM + +script + + DEFAULTFILE=/etc/default/nfs-common + + if [ -f "$DEFAULTFILE" ]; then + . "$DEFAULTFILE" + fi + + if [ -f /etc/fstab ]; then + exec 9<&0 " + +start on local-filesystems +stop on unmounted-remote-filesystems + +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 " + +instance $MOUNTPOINT + +start on mounting TYPE=nfs* MOUNTPOINT!=/ +stop on started idmapd or stopped idmapd +task + +# This is required so that the task is still considered +# successful when it gets killed +normal exit TERM + +script + + status idmapd | grep -q "start/running" && exit 0 + + # If it's already starting we'll get killed by the impending 'stop on + # started idmapd' + # 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.8/debian/nfs-common.idmapd.upstart nfs-utils-1.2.8/debian/nfs-common.idmapd.upstart --- nfs-utils-1.2.8/debian/nfs-common.idmapd.upstart 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/nfs-common.idmapd.upstart 2012-10-10 16:15:43.000000000 +0000 @@ -0,0 +1,46 @@ +# idmapd - NFSv4 id <-> 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 +stop on unmounted-remote-filesystems + +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.8/debian/nfs-common.install nfs-utils-1.2.8/debian/nfs-common.install --- nfs-utils-1.2.8/debian/nfs-common.install 2014-08-13 00:12:43.000000000 +0000 +++ nfs-utils-1.2.8/debian/nfs-common.install 2015-04-27 15:44:03.000000000 +0000 @@ -22,3 +22,12 @@ debian/idmapd.conf usr/share/nfs-common/conffiles/ debian/nfs-common.default usr/share/nfs-common/conffiles/ debian/id_resolver.conf etc/request-key.d/ +debian/nfs-utils_env.sh /usr/lib/systemd/scripts/ +systemd/*.mount /lib/systemd/system +systemd/*rpc*.service /lib/systemd/system +systemd/nfs-config.service /lib/systemd/system +systemd/nfs-idmapd.service /lib/systemd/system +systemd/nfs-client.target /lib/systemd/system +systemd/nfs-utils.service /lib/systemd/system +debian/statd.override /etc/init/ +debian/statd-mounting.override /etc/init/ diff -Nru nfs-utils-1.2.8/debian/nfs-common.links nfs-utils-1.2.8/debian/nfs-common.links --- nfs-utils-1.2.8/debian/nfs-common.links 2014-08-13 00:12:43.000000000 +0000 +++ nfs-utils-1.2.8/debian/nfs-common.links 2015-08-28 08:07:57.000000000 +0000 @@ -3,3 +3,5 @@ usr/share/man/man8/idmapd.8 usr/share/man/man8/rpc.idmapd.8 usr/share/man/man8/sm-notify.8 usr/share/man/man8/rpc.sm-notify.8 usr/share/man/man8/svcgssd.8 usr/share/man/man8/rpc.svcgssd.8 +/lib/systemd/system/rpc-gssd.service lib/systemd/system/gssd.service +/dev/null lib/systemd/system/idmapd.service diff -Nru nfs-utils-1.2.8/debian/nfs-common.postinst nfs-utils-1.2.8/debian/nfs-common.postinst --- nfs-utils-1.2.8/debian/nfs-common.postinst 2014-08-13 00:12:43.000000000 +0000 +++ nfs-utils-1.2.8/debian/nfs-common.postinst 2015-04-27 15:44:03.000000000 +0000 @@ -2,15 +2,23 @@ set -e +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 - if ! getent passwd statd >/dev/null; then adduser --system --home /var/lib/nfs --no-create-home statd fi @@ -34,11 +42,47 @@ 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 fi + + # Remove enablement flag in conffile + DEFAULT_CONFFILE=/etc/default/nfs-common + if [ -f ${DEFAULT_CONFFILE}.statd.enable ]; then + # enable upstart and systemd jobs. Ignore errors as name mapping isn't one to one + # upstart jobs are not disabled under systemd by update-rc.d wihout sysvinit file. + sed -i 's/manual//' /etc/init/statd-mounting.override 2>/dev/null || true + if [ `stat -c%s /etc/init/whoopsie.override` -eq 0 ]; then + rm -f /etc/init/statd-mounting.override /etc/init/statd.override + fi + update-rc.d rpc-statd-notify enable >/dev/null 2>&1 || true + update-rc.d rpc-statd enable >/dev/null 2>&1 || true + rm -f ${DEFAULT_CONFFILE}.statd.enable + fi ;; esac #DEBHELPER# + +finish_rm_conffile /etc/init.d/nfs-common diff -Nru nfs-utils-1.2.8/debian/nfs-common.preinst nfs-utils-1.2.8/debian/nfs-common.preinst --- nfs-utils-1.2.8/debian/nfs-common.preinst 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/nfs-common.preinst 2015-04-27 15:44:03.000000000 +0000 @@ -0,0 +1,43 @@ +#!/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 removal of enablement flag in conffile. +DEFAULT_CONFFILE=/etc/default/nfs-common +if [ "$1" = upgrade ]; then + if dpkg --compare-versions "$2" lt-nl 1:1.2.8-9ubuntu7 && [ -f $DEFAULT_CONFFILE ]; then + if egrep -sqi 'NEED_STATD="?yes' $DEFAULT_CONFFILE; then + touch ${DEFAULT_CONFFILE}.statd.enable + fi + sed -i '/#.*statd daemon/d' /etc/default/nfs-common + sed -i '/NEED_STATD/d' /etc/default/nfs-common + fi +fi + +#DEBHELPER# diff -Nru nfs-utils-1.2.8/debian/nfs-common.statd-mounting.upstart nfs-utils-1.2.8/debian/nfs-common.statd-mounting.upstart --- nfs-utils-1.2.8/debian/nfs-common.statd-mounting.upstart 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/nfs-common.statd-mounting.upstart 2015-04-27 15:44:03.000000000 +0000 @@ -0,0 +1,29 @@ +# statd-mounting + +description "Block the mounting event for NFS filesytems until statd is running" +author "Clint Byrum " + +instance $MOUNTPOINT + +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 + + . /etc/default/nfs-common + + status statd | grep -q "start/running" && exit 0 + + # 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.8/debian/nfs-common.statd.upstart nfs-utils-1.2.8/debian/nfs-common.statd.upstart --- nfs-utils-1.2.8/debian/nfs-common.statd.upstart 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/nfs-common.statd.upstart 2015-04-27 15:44:03.000000000 +0000 @@ -0,0 +1,42 @@ +# statd - NSM status monitor + +description "NSM status monitor" +author "Steve Langasek " + +# ON_BOOT is set to y in rpcbind's special rpcbind-boot.conf +# It will not be set when users run 'restart rpcbind' or 'start rpcbind' +# This is so that we don't start until we have local filesystems on +# bootup but we also restart whenever rpcbind 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 rpcbind ON_BOOT= + or (virtual-filesystems and started rpcbind ON_BOOT=y)) +stop on stopping rpcbind + +expect fork +respawn + +env DEFAULTFILE=/etc/default/nfs-common + +pre-start script + if [ -f "$DEFAULTFILE" ]; then + . "$DEFAULTFILE" + fi + + logger -t statd-pre-start "$UPSTART_EVENTS" || true + echo UPSTART_EVENTS = "$UPSTART_EVENTS" + + 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.8/debian/nfs-kernel-server.default nfs-utils-1.2.8/debian/nfs-kernel-server.default --- nfs-utils-1.2.8/debian/nfs-kernel-server.default 2014-08-13 00:12:43.000000000 +0000 +++ nfs-utils-1.2.8/debian/nfs-kernel-server.default 2014-08-11 08:00:01.000000000 +0000 @@ -6,7 +6,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 +17,6 @@ # Options for rpc.svcgssd. RPCSVCGSSDOPTS="" + +# Options for rpc.nfsd. +RPCNFSDOPTS="" diff -Nru nfs-utils-1.2.8/debian/nfs-kernel-server.init nfs-utils-1.2.8/debian/nfs-kernel-server.init --- nfs-utils-1.2.8/debian/nfs-kernel-server.init 2014-08-13 00:12:43.000000000 +0000 +++ nfs-utils-1.2.8/debian/nfs-kernel-server.init 2014-08-11 08:00:01.000000000 +0000 @@ -2,8 +2,8 @@ ### BEGIN INIT INFO # Provides: nfs-kernel-server -# Required-Start: $remote_fs nfs-common $portmap $time -# Required-Stop: $remote_fs nfs-common $portmap $time +# Required-Start: $remote_fs $portmap $time +# Required-Stop: $remote_fs $portmap $time # Should-Start: $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 @@ -30,6 +30,7 @@ RPCMOUNTDOPTS= NEED_SVCGSSD=no RPCSVCGSSDOPTS= +RPCNFSDOPTS= PROCNFSD_MOUNTPOINT=/proc/fs/nfsd if [ -f $DEFAULTFILE ]; then . $DEFAULTFILE @@ -75,7 +76,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 @@ -88,7 +89,7 @@ log_daemon_msg "Starting $DESC" log_progress_msg "nfsd" - + # See if rpcbind is running $PREFIX/sbin/rpcinfo -p >/dev/null 2>&1 RET=$? @@ -100,7 +101,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 @@ -192,6 +193,7 @@ if mountpoint -q $PROCNFSD_MOUNTPOINT then $PREFIX/sbin/exportfs -f + umount $PROCNFSD_MOUNTPOINT fi ;; diff -Nru nfs-utils-1.2.8/debian/nfs-kernel-server.install nfs-utils-1.2.8/debian/nfs-kernel-server.install --- nfs-utils-1.2.8/debian/nfs-kernel-server.install 2014-08-13 00:12:43.000000000 +0000 +++ nfs-utils-1.2.8/debian/nfs-kernel-server.install 2015-04-27 15:44:03.000000000 +0000 @@ -7,3 +7,7 @@ debian/tmp/var/lib/nfs/rmtab debian/nfs-kernel-server.default /usr/share/nfs-kernel-server/conffiles/ debian/etc.exports /usr/share/nfs-kernel-server/conffiles/ +systemd/nfs-blkmap.target /lib/systemd/system +systemd/nfs-blkmap.service /lib/systemd/system +systemd/nfs-mountd.service /lib/systemd/system +systemd/nfs-server.service /lib/systemd/system diff -Nru nfs-utils-1.2.8/debian/nfs-kernel-server.links nfs-utils-1.2.8/debian/nfs-kernel-server.links --- nfs-utils-1.2.8/debian/nfs-kernel-server.links 2014-08-13 00:12:43.000000000 +0000 +++ nfs-utils-1.2.8/debian/nfs-kernel-server.links 2015-03-06 06:45:34.000000000 +0000 @@ -1,2 +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 +# provide match for SysV init script +/lib/systemd/system/nfs-server.service /lib/systemd/system/nfs-kernel-server.service diff -Nru nfs-utils-1.2.8/debian/nfs-utils_env.sh nfs-utils-1.2.8/debian/nfs-utils_env.sh --- nfs-utils-1.2.8/debian/nfs-utils_env.sh 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/nfs-utils_env.sh 2015-03-06 06:45:34.000000000 +0000 @@ -0,0 +1,23 @@ +#!/bin/sh +# Create /run/sysconfig/nfs-utils from NFS' /etc/default/ files, for +# nfs-config.service + +nfs_config=/etc/sysconfig/nfs +[ -r /etc/default/nfs-common ] && . /etc/default/nfs-common +[ -r /etc/default/nfs-kernel-server ] && . /etc/default/nfs-kernel-server + +mkdir -p /run/sysconfig +{ +echo PIPEFS_MOUNTPOINT=/run/rpc_pipefs +echo RPCNFSDARGS=\"$RPCNFSDOPTS ${RPCNFSDCOUNT:-8}\" +echo RPCMOUNTDARGS=\"$RPCMOUNTDOPTS\" +echo STATDARGS=\"$STATDOPTS\" +echo RPCSVCGSSDARGS=\"$RPCSVCGSSDOPTS\" +} > /run/sysconfig/nfs-utils + +# the following are supported by the systemd units, but not exposed in default files +# echo SMNOTIFYARGS=\"$SMNOTIFYARGS\" +# echo RPCIDMAPDARGS=\"$RPCIDMAPDARGS\" +# echo RPCGSSDARGS=\"$RPCGSSDARGS\" +# echo BLKMAPDARGS=\"$BLKMAPDARGS\" +# echo GSS_USE_PROXY=\"$GSS_USE_PROXY\" diff -Nru nfs-utils-1.2.8/debian/patches/00git-start-statd-systemd.patch nfs-utils-1.2.8/debian/patches/00git-start-statd-systemd.patch --- nfs-utils-1.2.8/debian/patches/00git-start-statd-systemd.patch 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/patches/00git-start-statd-systemd.patch 2015-03-06 06:45:34.000000000 +0000 @@ -0,0 +1,27 @@ +Description: Latest start-statd script from 1.3.2 to start rpc-statd.service under systemd +Origin: upstream, from 1.3.2 + +Index: nfs-utils-1.2.8/utils/statd/start-statd +=================================================================== +--- nfs-utils-1.2.8.orig/utils/statd/start-statd ++++ nfs-utils-1.2.8/utils/statd/start-statd +@@ -1,9 +1,16 @@ +-#!/bin/bash -p ++#!/bin/sh + # nfsmount calls this script when mounting a filesystem with locking + # enabled, but when statd does not seem to be running (based on + # /var/run/rpc.statd.pid). + # It should run statd with whatever flags are apropriate for this + # site. +-PATH=/sbin:/usr/sbin +-exec rpc.statd --no-notify ++PATH="/sbin:/usr/sbin:/bin:/usr/bin" ++ ++# First try systemd if it's installed. ++if [ -d /run/systemd/system ]; then ++ # Quit only if the call worked. ++ systemctl start rpc-statd.service && exit ++fi + ++# Fall back to launching it ourselves. ++exec rpc.statd --no-notify diff -Nru nfs-utils-1.2.8/debian/patches/00git-systemd-units.patch nfs-utils-1.2.8/debian/patches/00git-systemd-units.patch --- nfs-utils-1.2.8/debian/patches/00git-systemd-units.patch 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/patches/00git-systemd-units.patch 2015-03-06 06:45:34.000000000 +0000 @@ -0,0 +1,385 @@ +Description: systemd units from upstream +Origin: upstream, 1.3.2 + +Index: nfs-utils-1.2.8/systemd/README +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/README +@@ -0,0 +1,71 @@ ++ ++Notes about systemd unit files for nfs-utils. ++ ++The unit files provided here should be sufficient for systemd ++to manage all daemons and related services provides by nfs-utils. ++ ++They do *not* include any unit files for separate services such as ++rpc.rquotad (in the 'quota' package) or rpcbind. ++ ++There are 4 units that can be 'enabled' or 'disabled' by systemctl, or ++by a suitable 'preset' setting: ++ ++ nfs-server.service ++ If enabled, nfs service is started together with dependencies ++ such as mountd, statd, rpc.idmapd ++ This is a "service" file rather than a "target" (which is the ++ normal grouping construct) so that ++ systemctl start nfs-server ++ can work (if no type is given, ".service" is assumed). ++ ++ nfs-client.target ++ If enabled, daemons needs for an nfs client are enabled. ++ This does *not* include rpc.statd. the rpc-statd.service unit ++ is started by /usr/sbin/start-statd which mount.nfs will run ++ if statd is needed. ++ ++ nfs-blkmap.target ++ If enabled, then blkmapd will be run when nfs-client.target is ++ started. ++ ++Another special unit is "nfs-utils.service". This doesn't really do ++anything, but exists so that other units may declare themselves as ++"PartOf" nfs-utils.service. ++The effect of this is that ++ systemctl restart nfs-utils ++will restart all nfs-utils daemons as maybe be required during ++software update. It isn't possible to make ++ systemctl try-restart nfs-server nfs-client.target ++do this as some daemon are included in both, and rpc.statd would ++not be restarted if nfs-server were not active (as nfs-client doesn't ++Want it - it is started by mount.nfs running start-statd). ++ ++It is possible that we should have an nfs-statd.target which can ++selectively enable statd being stared by -server and sm-notify ++being started by -server or -client. That way it could be disabled ++completely on V4-only configurations. Currently statd is always ++started on the server and sm-notify is always run if server or ++client is enabled. ++ ++Stopping nfs-server will also stop rpc.mountd, and rpc.svcgssd. ++It cannot stop rpc.statd or rpc.gssd as they may be in use by the ++client and systemd cannot specify is two-pronged reverse dependency. ++(i.e. stop this unit if none of these units are running) ++ ++Distro specific commandline configuration can be provided by ++installing a script /usr/lib/systemd/scripts/nfs-utils_env.sh ++This should write /run/sysconfig/nfs-utils based on configuration ++information such as in /etc/sysconfig/nfs or /etc/defaults/nfs. ++It is run once by nfs-config.service. ++ ++rpc.gssd and rpc.svcgssd are assumed to be needed if /etc/krb5.keytab ++is present. ++If a site needs this file present but does not want the gss daemons ++running, it should create ++ /etc/systemd/system/rpc-gssd.service.d/01-disable.conf ++and ++ /etc/systemd/system/rpc-svcgssd.service.d/01-disable.conf ++ ++containing ++ [Unit] ++ ConditionNull=false +Index: nfs-utils-1.2.8/systemd/auth-rpcgss-module.service +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/auth-rpcgss-module.service +@@ -0,0 +1,15 @@ ++# We want to start gss-proxy on kernels that support it and rpc.svcgssd ++# on those that don't. Those services check for support by checking ++# for existence of the path /proc/net/rpc/use-gss-proxy. Before they ++# can perform that check, they need this module loaded. (Unless ++# rpcsec_gss support is built directly into the kernel, in which case this ++# unit will fail. But that's OK.) ++[Unit] ++Description=Kernel Module supporting RPCSEC_GSS ++Before=gssproxy.service rpc-svcgssd.service rpc-gssd.service ++Wants=gssproxy.service rpc-svcgssd.service rpc-gssd.service ++ConditionPathExists=/etc/krb5.keytab ++ ++[Service] ++Type=oneshot ++ExecStart=/sbin/modprobe -q auth_rpcgss +Index: nfs-utils-1.2.8/systemd/nfs-blkmap.service +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/nfs-blkmap.service +@@ -0,0 +1,16 @@ ++[Unit] ++Description=pNFS block layout mapping daemon ++DefaultDependencies=no ++Conflicts=umount.target ++After=var-lib-nfs-rpc_pipefs.mount ++Requires=var-lib-nfs-rpc_pipefs.mount ++ ++Requisite=nfs-blkmap.target ++After=nfs-blkmap.target ++ ++PartOf=nfs-utils.service ++ ++[Service] ++Type=forking ++PIDFile=/var/run/blkmapd.pid ++ExecStart=/usr/sbin/blkmapd $BLKMAPDARGS +Index: nfs-utils-1.2.8/systemd/nfs-blkmap.target +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/nfs-blkmap.target +@@ -0,0 +1,8 @@ ++[Unit] ++Description= PNFS blkmaping enablement. ++# If this target is enabled, then blkmapd will be started ++# as required. If it is not enabled it won't. ++ ++[Install] ++WantedBy=remote-fs.target ++WantedBy=multi-user.target +\ No newline at end of file +Index: nfs-utils-1.2.8/systemd/nfs-client.target +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/nfs-client.target +@@ -0,0 +1,17 @@ ++[Unit] ++Description=NFS client services ++Before=remote-fs-pre.target ++Wants=remote-fs-pre.target ++ ++# Note: we don't "Wants=rpc-statd.service" as "mount.nfs" will arrange to ++# start that on demand if needed. ++Wants=nfs-blkmap.service rpc-statd-notify.service ++After=nfs-blkmap.service ++ ++# GSS services dependencies and ordering ++Wants=auth-rpcgss-module.service ++After=rpc-gssd.service rpc-svcgssd.service gssproxy.service ++ ++[Install] ++WantedBy=multi-user.target ++WantedBy=remote-fs.target +Index: nfs-utils-1.2.8/systemd/nfs-config.service +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/nfs-config.service +@@ -0,0 +1,7 @@ ++[Unit] ++Description=Preprocess NFS configuration ++ ++[Service] ++Type=oneshot ++RemainAfterExit=yes ++ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh +Index: nfs-utils-1.2.8/systemd/nfs-idmapd.service +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/nfs-idmapd.service +@@ -0,0 +1,14 @@ ++[Unit] ++Description=NFSv4 ID-name mapping service ++Requires=var-lib-nfs-rpc_pipefs.mount ++After=var-lib-nfs-rpc_pipefs.mount ++ ++BindsTo=nfs-server.service ++ ++Wants=nfs-config.service ++After=nfs-config.service ++ ++[Service] ++EnvironmentFile=-/run/sysconfig/nfs-utils ++Type=forking ++ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS +Index: nfs-utils-1.2.8/systemd/nfs-mountd.service +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/nfs-mountd.service +@@ -0,0 +1,14 @@ ++[Unit] ++Description=NFS Mount Daemon ++Requires=proc-fs-nfsd.mount ++After=proc-fs-nfsd.mount ++After=network.target ++BindsTo=nfs-server.service ++ ++Wants=nfs-config.service ++After=nfs-config.service ++ ++[Service] ++EnvironmentFile=-/run/sysconfig/nfs-utils ++Type=forking ++ExecStart=/usr/sbin/rpc.mountd $RPCMOUNTDARGS +Index: nfs-utils-1.2.8/systemd/nfs-server.service +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/nfs-server.service +@@ -0,0 +1,33 @@ ++[Unit] ++Description=NFS server and services ++Requires= network.target proc-fs-nfsd.mount rpcbind.target ++Requires= nfs-mountd.service ++Wants=rpc-statd.service nfs-idmapd.service ++Wants=rpc-statd-notify.service ++ ++After= network.target proc-fs-nfsd.mount rpcbind.target nfs-mountd.service ++After= nfs-idmapd.service rpc-statd.service ++Before= rpc-statd-notify.service ++ ++# GSS services dependencies and ordering ++Wants=auth-rpcgss-module.service ++After=rpc-gssd.service gssproxy.service rpc-svcgssd.service ++ ++Wants=nfs-config.service ++After=nfs-config.service ++ ++[Service] ++EnvironmentFile=-/run/sysconfig/nfs-utils ++ ++Type=oneshot ++RemainAfterExit=yes ++ExecStartPre=/usr/sbin/exportfs -r ++ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS ++ExecStop=/usr/sbin/rpc.nfsd 0 ++ExecStopPost=/usr/sbin/exportfs -au ++ExecStopPost=/usr/sbin/exportfs -f ++ ++ExecReload=/usr/sbin/exportfs -r ++ ++[Install] ++WantedBy=multi-user.target +Index: nfs-utils-1.2.8/systemd/nfs-utils.service +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/nfs-utils.service +@@ -0,0 +1,17 @@ ++[Unit] ++Description=NFS server and client services ++# This service should never be stopped, only restarted. ++# When it is re-started, all other services which declare ++# themselves to be "PartOf" this service will also be ++# restarted. Thus ++# systemctl restart nfs-utils ++# will restart all daemons which are part of nfs-utils ++# and which are running. This is useful after a software ++# update. ++ ++# This is a "service" rather than "target" so that we ++# don't need to say "systemctl restart nfs-utils.target". ++[Service] ++Type=oneshot ++RemainAfterExit=yes ++ExecStart=/bin/true +Index: nfs-utils-1.2.8/systemd/proc-fs-nfsd.mount +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/proc-fs-nfsd.mount +@@ -0,0 +1,7 @@ ++[Unit] ++Description=NFSD configuration filesystem ++ ++[Mount] ++What=nfsd ++Where=/proc/fs/nfsd ++Type=nfsd +Index: nfs-utils-1.2.8/systemd/rpc-gssd.service +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/rpc-gssd.service +@@ -0,0 +1,19 @@ ++[Unit] ++Description=RPC security service for NFS client and server ++DefaultDependencies=no ++Conflicts=umount.target ++Requires=var-lib-nfs-rpc_pipefs.mount ++After=var-lib-nfs-rpc_pipefs.mount ++ ++ConditionPathExists=/etc/krb5.keytab ++ ++PartOf=nfs-utils.service ++ ++Wants=nfs-config.service ++After=nfs-config.service ++ ++[Service] ++EnvironmentFile=-/run/sysconfig/nfs-utils ++ ++Type=forking ++ExecStart=/usr/sbin/rpc.gssd $GSSDARGS +Index: nfs-utils-1.2.8/systemd/rpc-statd-notify.service +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/rpc-statd-notify.service +@@ -0,0 +1,18 @@ ++[Unit] ++Description=Notify NFS peers of a restart ++Requires=network-online.target ++After=network.target nss-lookup.target ++ ++# if we run an nfs server, it needs to be running before we ++# tell clients that it has restarted. ++After=nfs-server.service ++ ++PartOf=nfs-utils.service ++ ++Wants=nfs-config.service ++After=nfs-config.service ++ ++[Service] ++EnvironmentFile=-/run/sysconfig/nfs-utils ++Type=forking ++ExecStart=-/usr/sbin/sm-notify $SMNOTIFYARGS +Index: nfs-utils-1.2.8/systemd/rpc-statd.service +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/rpc-statd.service +@@ -0,0 +1,17 @@ ++[Unit] ++Description=NFS status monitor for NFSv2/3 locking. ++DefaultDependencies=no ++Conflicts=umount.target ++Requires=nss-lookup.target rpcbind.target ++After=network.target nss-lookup.target rpcbind.target ++ ++PartOf=nfs-utils.service ++ ++Wants=nfs-config.service ++After=nfs-config.service ++ ++[Service] ++EnvironmentFile=-/run/sysconfig/nfs-utils ++Type=forking ++PIDFile=/var/run/rpc.statd.pid ++ExecStart=/usr/sbin/rpc.statd --no-notify $STATDARGS +Index: nfs-utils-1.2.8/systemd/rpc-svcgssd.service +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/rpc-svcgssd.service +@@ -0,0 +1,19 @@ ++[Unit] ++Description=RPC security service for NFS server ++Requires=var-lib-nfs-rpc_pipefs.mount ++After=var-lib-nfs-rpc_pipefs.mount ++PartOf=nfs-server.service ++PartOf=nfs-utils.service ++ ++After=gssproxy.service ++ConditionPathExists=|!/run/gssproxy.pid ++ConditionPathExists=|!/proc/net/rpc/use-gss-proxy ++ConditionPathExists=/etc/krb5.keytab ++ ++Wants=nfs-config.service ++After=nfs-config.service ++ ++[Service] ++EnvironmentFile=-/run/sysconfig/nfs-utils ++Type=forking ++ExecStart=/usr/sbin/rpc.svcgssd $SVCGSSDARGS +Index: nfs-utils-1.2.8/systemd/var-lib-nfs-rpc_pipefs.mount +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/var-lib-nfs-rpc_pipefs.mount +@@ -0,0 +1,9 @@ ++[Unit] ++Description=RPC Pipe File System ++DefaultDependencies=no ++Conflicts=umount.target ++ ++[Mount] ++What=sunrpc ++Where=/var/lib/nfs/rpc_pipefs ++Type=rpc_pipefs diff -Nru nfs-utils-1.2.8/debian/patches/20-ticket-expired-error.patch nfs-utils-1.2.8/debian/patches/20-ticket-expired-error.patch --- nfs-utils-1.2.8/debian/patches/20-ticket-expired-error.patch 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/patches/20-ticket-expired-error.patch 2013-05-30 20:51:18.000000000 +0000 @@ -0,0 +1,79 @@ +## Description: add some description +## Origin/Author: add some origin or author +## Bug: bug URL +Index: ubuntu/utils/gssd/gssd.c +=================================================================== +--- ubuntu.orig/utils/gssd/gssd.c 2013-05-24 16:44:14.635084023 -0400 ++++ ubuntu/utils/gssd/gssd.c 2013-05-24 16:45:41.339080825 -0400 +@@ -63,6 +63,7 @@ + int root_uses_machine_creds = 1; + unsigned int context_timeout = 0; + char *preferred_realm = NULL; ++int ticket_expiry_is_error = 0; + + void + sig_die(int signal) +@@ -85,7 +86,7 @@ + static void + usage(char *progname) + { +- fprintf(stderr, "usage: %s [-f] [-l] [-M] [-n] [-v] [-r] [-p pipefsdir] [-k keytab] [-d ccachedir] [-t timeout] [-R preferred realm] [-D]\n", ++ fprintf(stderr, "usage: %s [-e] [-f] [-l] [-M] [-n] [-v] [-r] [-p pipefsdir] [-k keytab] [-d ccachedir] [-t timeout] [-R preferred realm] [-D]\n", + progname); + exit(1); + } +@@ -102,8 +103,11 @@ + char *progname; + + memset(ccachesearch, 0, sizeof(ccachesearch)); +- while ((opt = getopt(argc, argv, "DfvrlmnMp:k:d:t:R:")) != -1) { ++ while ((opt = getopt(argc, argv, "eDfvrlmnMp:k:d:t:R:")) != -1) { + switch (opt) { ++ case 'e': ++ ticket_expiry_is_error = 1; ++ break; + case 'f': + fg = 1; + break; +Index: ubuntu/utils/gssd/gssd.h +=================================================================== +--- ubuntu.orig/utils/gssd/gssd.h 2013-05-24 16:44:14.635084023 -0400 ++++ ubuntu/utils/gssd/gssd.h 2013-05-24 16:44:14.627084023 -0400 +@@ -67,6 +67,7 @@ + extern int root_uses_machine_creds; + extern unsigned int context_timeout; + extern char *preferred_realm; ++extern int ticket_expiry_is_error; + + TAILQ_HEAD(clnt_list_head, clnt_info) clnt_list; + +Index: ubuntu/utils/gssd/gssd.man +=================================================================== +--- ubuntu.orig/utils/gssd/gssd.man 2013-05-24 16:44:14.635084023 -0400 ++++ ubuntu/utils/gssd/gssd.man 2013-05-24 16:44:14.627084023 -0400 +@@ -272,6 +272,12 @@ + seconds, which allows changing Kerberos tickets and identities frequently. + The default is no explicit timeout, which means the kernel context will live + the lifetime of the Kerberos service ticket used in its creation. ++.TP ++.B -e ++Return EACCESS instead of EKEYEXPIRED when a user's credentials expire. ++Returning EKEYEXPIRED was introduced around kernel 2.6.34 and causes all nfs4 ++I/O to block when a user's credentials expire. This option reverts to old ++bevavior. + .SH SEE ALSO + .BR rpc.svcgssd (8), + .BR kerberos (1), +Index: ubuntu/utils/gssd/gssd_proc.c +=================================================================== +--- ubuntu.orig/utils/gssd/gssd_proc.c 2013-05-24 16:44:14.635084023 -0400 ++++ ubuntu/utils/gssd/gssd_proc.c 2013-05-24 16:46:28.887079072 -0400 +@@ -1019,7 +1019,7 @@ + * trolling for credentials */ + for (dirname = ccachesearch; create_resp != 0 && *dirname != NULL; dirname++) { + err = gssd_setup_krb5_user_gss_ccache(uid, clp->servername, *dirname); +- if (err == -EKEYEXPIRED) ++ if (err == -EKEYEXPIRED && !ticket_expiry_is_error) + downcall_err = -EKEYEXPIRED; + else if (!err) + create_resp = create_auth_rpc_client(clp, &rpc_clnt, &auth, uid, diff -Nru nfs-utils-1.2.8/debian/patches/23-systemd-relax-dependencies.patch nfs-utils-1.2.8/debian/patches/23-systemd-relax-dependencies.patch --- nfs-utils-1.2.8/debian/patches/23-systemd-relax-dependencies.patch 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/patches/23-systemd-relax-dependencies.patch 2015-03-06 06:45:34.000000000 +0000 @@ -0,0 +1,122 @@ +From 314a5003a27d2a654d117c40714739e6aa3b7092 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Tue, 3 Mar 2015 16:42:28 +0100 +Subject: [PATCH] systemd: Relax dependencies of services + +Stop depending on basic.target in the daemons which still do; i. e. add +DefaultDependencies=no. This makes it possible to run NFS during early boot, +and helps if you e. g. have /var on NFS. We don't require much else than +local-fs. +--- + systemd/auth-rpcgss-module.service | 1 + + systemd/nfs-config.service | 2 ++ + systemd/nfs-idmapd.service | 3 ++- + systemd/nfs-mountd.service | 3 ++- + systemd/nfs-server.service | 2 ++ + systemd/rpc-statd-notify.service | 3 ++- + systemd/rpc-svcgssd.service | 3 ++- + 7 files changed, 13 insertions(+), 4 deletions(-) + +Forwarded: http://www.spinics.net/lists/linux-nfs/msg49934.html + +diff --git a/systemd/auth-rpcgss-module.service b/systemd/auth-rpcgss-module.service +index 0355e13..5241f7b 100644 +--- a/systemd/auth-rpcgss-module.service ++++ b/systemd/auth-rpcgss-module.service +@@ -6,6 +6,7 @@ + # unit will fail. But that's OK.) + [Unit] + Description=Kernel Module supporting RPCSEC_GSS ++DefaultDependencies=no + Before=gssproxy.service rpc-svcgssd.service rpc-gssd.service + Wants=gssproxy.service rpc-svcgssd.service rpc-gssd.service + ConditionPathExists=/etc/krb5.keytab +diff --git a/systemd/nfs-config.service b/systemd/nfs-config.service +index 64010e6..7f65305 100644 +--- a/systemd/nfs-config.service ++++ b/systemd/nfs-config.service +@@ -1,5 +1,7 @@ + [Unit] + Description=Preprocess NFS configuration ++After=local-fs.target ++DefaultDependencies=no + + [Service] + Type=oneshot +diff --git a/systemd/nfs-idmapd.service b/systemd/nfs-idmapd.service +index e84f8c8..df3dd9d 100644 +--- a/systemd/nfs-idmapd.service ++++ b/systemd/nfs-idmapd.service +@@ -1,7 +1,8 @@ + [Unit] + Description=NFSv4 ID-name mapping service ++DefaultDependencies=no + Requires=var-lib-nfs-rpc_pipefs.mount +-After=var-lib-nfs-rpc_pipefs.mount ++After=var-lib-nfs-rpc_pipefs.mount local-fs.target + + BindsTo=nfs-server.service + +diff --git a/systemd/nfs-mountd.service b/systemd/nfs-mountd.service +index d908afe..8a39f3e 100644 +--- a/systemd/nfs-mountd.service ++++ b/systemd/nfs-mountd.service +@@ -1,8 +1,9 @@ + [Unit] + Description=NFS Mount Daemon ++DefaultDependencies=no + Requires=proc-fs-nfsd.mount + After=proc-fs-nfsd.mount +-After=network.target ++After=network.target local-fs.target + BindsTo=nfs-server.service + + Wants=nfs-config.service +diff --git a/systemd/nfs-server.service b/systemd/nfs-server.service +index b35e193..db801cb 100644 +--- a/systemd/nfs-server.service ++++ b/systemd/nfs-server.service +@@ -1,10 +1,12 @@ + [Unit] + Description=NFS server and services ++DefaultDependencies=no + Requires= network.target proc-fs-nfsd.mount rpcbind.target + Requires= nfs-mountd.service + Wants=rpc-statd.service nfs-idmapd.service + Wants=rpc-statd-notify.service + ++After= local-fs.target + After= network.target proc-fs-nfsd.mount rpcbind.target nfs-mountd.service + After= nfs-idmapd.service rpc-statd.service + Before= rpc-statd-notify.service +diff --git a/systemd/rpc-statd-notify.service b/systemd/rpc-statd-notify.service +index a655445..a7e2f8e 100644 +--- a/systemd/rpc-statd-notify.service ++++ b/systemd/rpc-statd-notify.service +@@ -1,7 +1,8 @@ + [Unit] + Description=Notify NFS peers of a restart ++DefaultDependencies=no + Requires=network-online.target +-After=network.target nss-lookup.target ++After=local-fs.target network.target nss-lookup.target + + # if we run an nfs server, it needs to be running before we + # tell clients that it has restarted. +diff --git a/systemd/rpc-svcgssd.service b/systemd/rpc-svcgssd.service +index f7424b0..41177b6 100644 +--- a/systemd/rpc-svcgssd.service ++++ b/systemd/rpc-svcgssd.service +@@ -1,7 +1,8 @@ + [Unit] + Description=RPC security service for NFS server ++DefaultDependencies=no + Requires=var-lib-nfs-rpc_pipefs.mount +-After=var-lib-nfs-rpc_pipefs.mount ++After=var-lib-nfs-rpc_pipefs.mount local-fs.target + PartOf=nfs-server.service + PartOf=nfs-utils.service + +-- +2.1.4 + diff -Nru nfs-utils-1.2.8/debian/patches/24-systemd-pipefs_in_run.patch nfs-utils-1.2.8/debian/patches/24-systemd-pipefs_in_run.patch --- nfs-utils-1.2.8/debian/patches/24-systemd-pipefs_in_run.patch 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/patches/24-systemd-pipefs_in_run.patch 2015-03-06 06:45:34.000000000 +0000 @@ -0,0 +1,92 @@ +Description: systemd: Mount rpc_pipefs in /run instead of /var/lib/nfs/ +Author: Martin Pitt +Forwarded: No + +Index: nfs-utils-1.2.8/systemd/var-lib-nfs-rpc_pipefs.mount +=================================================================== +--- nfs-utils-1.2.8.orig/systemd/var-lib-nfs-rpc_pipefs.mount ++++ /dev/null +@@ -1,9 +0,0 @@ +-[Unit] +-Description=RPC Pipe File System +-DefaultDependencies=no +-Conflicts=umount.target +- +-[Mount] +-What=sunrpc +-Where=/var/lib/nfs/rpc_pipefs +-Type=rpc_pipefs +Index: nfs-utils-1.2.8/systemd/nfs-blkmap.service +=================================================================== +--- nfs-utils-1.2.8.orig/systemd/nfs-blkmap.service ++++ nfs-utils-1.2.8/systemd/nfs-blkmap.service +@@ -2,8 +2,8 @@ + Description=pNFS block layout mapping daemon + DefaultDependencies=no + Conflicts=umount.target +-After=var-lib-nfs-rpc_pipefs.mount +-Requires=var-lib-nfs-rpc_pipefs.mount ++After=run-rpc_pipefs.mount ++Requires=run-rpc_pipefs.mount + + Requisite=nfs-blkmap.target + After=nfs-blkmap.target +Index: nfs-utils-1.2.8/systemd/nfs-idmapd.service +=================================================================== +--- nfs-utils-1.2.8.orig/systemd/nfs-idmapd.service ++++ nfs-utils-1.2.8/systemd/nfs-idmapd.service +@@ -1,8 +1,8 @@ + [Unit] + Description=NFSv4 ID-name mapping service + DefaultDependencies=no +-Requires=var-lib-nfs-rpc_pipefs.mount +-After=var-lib-nfs-rpc_pipefs.mount local-fs.target ++Requires=run-rpc_pipefs.mount ++After=run-rpc_pipefs.mount local-fs.target + + BindsTo=nfs-server.service + +Index: nfs-utils-1.2.8/systemd/rpc-gssd.service +=================================================================== +--- nfs-utils-1.2.8.orig/systemd/rpc-gssd.service ++++ nfs-utils-1.2.8/systemd/rpc-gssd.service +@@ -2,8 +2,8 @@ + Description=RPC security service for NFS client and server + DefaultDependencies=no + Conflicts=umount.target +-Requires=var-lib-nfs-rpc_pipefs.mount +-After=var-lib-nfs-rpc_pipefs.mount ++Requires=run-rpc_pipefs.mount ++After=run-rpc_pipefs.mount + + ConditionPathExists=/etc/krb5.keytab + +Index: nfs-utils-1.2.8/systemd/rpc-svcgssd.service +=================================================================== +--- nfs-utils-1.2.8.orig/systemd/rpc-svcgssd.service ++++ nfs-utils-1.2.8/systemd/rpc-svcgssd.service +@@ -1,8 +1,8 @@ + [Unit] + Description=RPC security service for NFS server + DefaultDependencies=no +-Requires=var-lib-nfs-rpc_pipefs.mount +-After=var-lib-nfs-rpc_pipefs.mount local-fs.target ++Requires=run-rpc_pipefs.mount ++After=run-rpc_pipefs.mount local-fs.target + PartOf=nfs-server.service + PartOf=nfs-utils.service + +Index: nfs-utils-1.2.8/systemd/run-rpc_pipefs.mount +=================================================================== +--- /dev/null ++++ nfs-utils-1.2.8/systemd/run-rpc_pipefs.mount +@@ -0,0 +1,9 @@ ++[Unit] ++Description=RPC Pipe File System ++DefaultDependencies=no ++Conflicts=umount.target ++ ++[Mount] ++What=sunrpc ++Where=/run/rpc_pipefs ++Type=rpc_pipefs diff -Nru nfs-utils-1.2.8/debian/patches/25-systemd-daemon-paths.patch nfs-utils-1.2.8/debian/patches/25-systemd-daemon-paths.patch --- nfs-utils-1.2.8/debian/patches/25-systemd-daemon-paths.patch 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/patches/25-systemd-daemon-paths.patch 2015-03-06 06:45:34.000000000 +0000 @@ -0,0 +1,24 @@ +Description: Adjust program paths in systemd units +Author: Martin Pitt +Forwarded: No + +Index: nfs-utils-1.2.8/systemd/rpc-statd-notify.service +=================================================================== +--- nfs-utils-1.2.8.orig/systemd/rpc-statd-notify.service ++++ nfs-utils-1.2.8/systemd/rpc-statd-notify.service +@@ -16,4 +16,4 @@ After=nfs-config.service + [Service] + EnvironmentFile=-/run/sysconfig/nfs-utils + Type=forking +-ExecStart=-/usr/sbin/sm-notify $SMNOTIFYARGS ++ExecStart=-/sbin/sm-notify $SMNOTIFYARGS +Index: nfs-utils-1.2.8/systemd/rpc-statd.service +=================================================================== +--- nfs-utils-1.2.8.orig/systemd/rpc-statd.service ++++ nfs-utils-1.2.8/systemd/rpc-statd.service +@@ -14,4 +14,4 @@ After=nfs-config.service + EnvironmentFile=-/run/sysconfig/nfs-utils + Type=forking + PIDFile=/var/run/rpc.statd.pid +-ExecStart=/usr/sbin/rpc.statd --no-notify $STATDARGS ++ExecStart=/sbin/rpc.statd --no-notify $STATDARGS diff -Nru nfs-utils-1.2.8/debian/patches/26-systemd-server-before-client.patch nfs-utils-1.2.8/debian/patches/26-systemd-server-before-client.patch --- nfs-utils-1.2.8/debian/patches/26-systemd-server-before-client.patch 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/patches/26-systemd-server-before-client.patch 2015-03-06 06:45:34.000000000 +0000 @@ -0,0 +1,28 @@ +From d8c1fcce6d06aa062315a47134e8e3b364cb0700 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Tue, 3 Mar 2015 10:45:38 +0100 +Subject: [PATCH] systemd: Order NFS server before client + +This makes mounting NFS shares from localhost work reliably, as you need to +start the server before attempting (client) mounts, and conversely on shutdown +need to unmount all shares before stopping the server to avoid hangs. +--- + systemd/nfs-server.service | 3 +++ + 1 file changed, 3 insertions(+) + +Forwarded: http://www.spinics.net/lists/linux-nfs/msg49934.html + +Index: nfs-utils-1.2.8/systemd/nfs-server.service +=================================================================== +--- nfs-utils-1.2.8.orig/systemd/nfs-server.service ++++ nfs-utils-1.2.8/systemd/nfs-server.service +@@ -15,6 +15,9 @@ Before= rpc-statd-notify.service + Wants=auth-rpcgss-module.service + After=rpc-gssd.service gssproxy.service rpc-svcgssd.service + ++# start/stop server before/after client ++Before=remote-fs-pre.target ++ + Wants=nfs-config.service + After=nfs-config.service + diff -Nru nfs-utils-1.2.8/debian/patches/27-systemd-enable-with-systemctl-statd.patch nfs-utils-1.2.8/debian/patches/27-systemd-enable-with-systemctl-statd.patch --- nfs-utils-1.2.8/debian/patches/27-systemd-enable-with-systemctl-statd.patch 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/patches/27-systemd-enable-with-systemctl-statd.patch 2015-04-27 15:44:03.000000000 +0000 @@ -0,0 +1,66 @@ +Description: Let sysadmins enable/disable statd services + As the admin was able to control under upstart the statd services with + NEED_STATD in default conffiles, mirror this funcationality under systemd + by letting the user systemctl enable/disable statd services. +Author: Didier Roche +Bug-Ubuntu: https://launchpad.net/bugs/1428486 +Index: nfs-utils-1.2.8/systemd/nfs-server.service +=================================================================== +--- nfs-utils-1.2.8.orig/systemd/nfs-server.service ++++ nfs-utils-1.2.8/systemd/nfs-server.service +@@ -3,8 +3,7 @@ Description=NFS server and services + DefaultDependencies=no + Requires= network.target proc-fs-nfsd.mount rpcbind.target + Requires= nfs-mountd.service +-Wants=rpc-statd.service nfs-idmapd.service +-Wants=rpc-statd-notify.service ++Wants=nfs-idmapd.service + + After= local-fs.target + After= network.target proc-fs-nfsd.mount rpcbind.target nfs-mountd.service +Index: nfs-utils-1.2.8/systemd/rpc-statd-notify.service +=================================================================== +--- nfs-utils-1.2.8.orig/systemd/rpc-statd-notify.service ++++ nfs-utils-1.2.8/systemd/rpc-statd-notify.service +@@ -17,3 +17,6 @@ After=nfs-config.service + EnvironmentFile=-/run/sysconfig/nfs-utils + Type=forking + ExecStart=-/sbin/sm-notify $SMNOTIFYARGS ++ ++[Install] ++WantedBy=nfs-client.target +Index: nfs-utils-1.2.8/systemd/rpc-statd.service +=================================================================== +--- nfs-utils-1.2.8.orig/systemd/rpc-statd.service ++++ nfs-utils-1.2.8/systemd/rpc-statd.service +@@ -7,7 +7,7 @@ After=network.target nss-lookup.target r + + PartOf=nfs-utils.service + +-Wants=nfs-config.service ++Wants=nfs-config.service rpc-statd-notify.service + After=nfs-config.service + + [Service] +@@ -15,3 +15,6 @@ EnvironmentFile=-/run/sysconfig/nfs-util + Type=forking + PIDFile=/var/run/rpc.statd.pid + ExecStart=/sbin/rpc.statd --no-notify $STATDARGS ++ ++[Install] ++WantedBy=nfs-server.service +Index: nfs-utils-1.2.8/systemd/nfs-client.target +=================================================================== +--- nfs-utils-1.2.8.orig/systemd/nfs-client.target ++++ nfs-utils-1.2.8/systemd/nfs-client.target +@@ -3,9 +3,7 @@ Description=NFS client services + Before=remote-fs-pre.target + Wants=remote-fs-pre.target + +-# Note: we don't "Wants=rpc-statd.service" as "mount.nfs" will arrange to +-# start that on demand if needed. +-Wants=nfs-blkmap.service rpc-statd-notify.service ++Wants=nfs-blkmap.service + After=nfs-blkmap.service + + # GSS services dependencies and ordering diff -Nru nfs-utils-1.2.8/debian/patches/90-gss-free-lucid-sec-context.patch nfs-utils-1.2.8/debian/patches/90-gss-free-lucid-sec-context.patch --- nfs-utils-1.2.8/debian/patches/90-gss-free-lucid-sec-context.patch 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/patches/90-gss-free-lucid-sec-context.patch 2014-08-11 07:50:15.000000000 +0000 @@ -0,0 +1,20 @@ +From: Sergio Gelato +Subject: Fix gss_free_lucid_sec_context() call + Commit 051eb4863cf880f0349a1de44517f9c99a9c5bd4 changed + serialize_krb5_ctx() to take a pointer to gss_ctx_id_t instead of a + gss_ctx_id_t directly. The call to gss_export_lucid_sec_context() + was adjusted accordingly but the call to gss_free_lucid_sec_context() + was not. +Bug-Ubuntu: https://launchpad.net/bugs/1331201 + +--- a/utils/gssd/context_lucid.c ++++ b/utils/gssd/context_lucid.c +@@ -302,7 +302,7 @@ + else + retcode = prepare_krb5_rfc4121_buffer(lctx, buf, endtime); + +- maj_stat = gss_free_lucid_sec_context(&min_stat, ctx, return_ctx); ++ maj_stat = gss_free_lucid_sec_context(&min_stat, *ctx, return_ctx); + if (maj_stat != GSS_S_COMPLETE) { + pgsserr("gss_free_lucid_sec_context", + maj_stat, min_stat, &krb5oid); diff -Nru nfs-utils-1.2.8/debian/patches/remove-gssproxy.patch nfs-utils-1.2.8/debian/patches/remove-gssproxy.patch --- nfs-utils-1.2.8/debian/patches/remove-gssproxy.patch 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/patches/remove-gssproxy.patch 2016-04-06 14:49:00.000000000 +0000 @@ -0,0 +1,57 @@ +Description: Remove gssproxy + Gssproxy isn't packages for Ubuntu so we should drop it from + the service definitions. It also makes rpc-svcgssd always show + as failing on the client. + . +Author: Bryan Quigley +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1452667 + +--- nfs-utils-1.2.8.orig/systemd/auth-rpcgss-module.service ++++ nfs-utils-1.2.8/systemd/auth-rpcgss-module.service +@@ -7,8 +7,8 @@ + [Unit] + Description=Kernel Module supporting RPCSEC_GSS + DefaultDependencies=no +-Before=gssproxy.service rpc-svcgssd.service rpc-gssd.service +-Wants=gssproxy.service rpc-svcgssd.service rpc-gssd.service ++Before=rpc-svcgssd.service rpc-gssd.service ++Wants=rpc-svcgssd.service rpc-gssd.service + ConditionPathExists=/etc/krb5.keytab + + [Service] +--- nfs-utils-1.2.8.orig/systemd/nfs-client.target ++++ nfs-utils-1.2.8/systemd/nfs-client.target +@@ -7,8 +7,8 @@ Wants=nfs-blkmap.service + After=nfs-blkmap.service + + # GSS services dependencies and ordering +-Wants=auth-rpcgss-module.service +-After=rpc-gssd.service rpc-svcgssd.service gssproxy.service ++Wants=rpc-gssd.service ++After=rpc-gssd.service + + [Install] + WantedBy=multi-user.target +--- nfs-utils-1.2.8.orig/systemd/nfs-server.service ++++ nfs-utils-1.2.8/systemd/nfs-server.service +@@ -12,7 +12,7 @@ Before= rpc-statd-notify.service + + # GSS services dependencies and ordering + Wants=auth-rpcgss-module.service +-After=rpc-gssd.service gssproxy.service rpc-svcgssd.service ++After=rpc-gssd.service rpc-svcgssd.service + + # start/stop server before/after client + Before=remote-fs-pre.target +--- nfs-utils-1.2.8.orig/systemd/rpc-svcgssd.service ++++ nfs-utils-1.2.8/systemd/rpc-svcgssd.service +@@ -6,9 +6,6 @@ After=run-rpc_pipefs.mount local-fs.targ + PartOf=nfs-server.service + PartOf=nfs-utils.service + +-After=gssproxy.service +-ConditionPathExists=|!/run/gssproxy.pid +-ConditionPathExists=|!/proc/net/rpc/use-gss-proxy + ConditionPathExists=/etc/krb5.keytab + + Wants=nfs-config.service diff -Nru nfs-utils-1.2.8/debian/patches/series nfs-utils-1.2.8/debian/patches/series --- nfs-utils-1.2.8/debian/patches/series 2014-08-13 00:12:43.000000000 +0000 +++ nfs-utils-1.2.8/debian/patches/series 2016-04-06 14:49:00.000000000 +0000 @@ -1,3 +1,5 @@ +00git-start-statd-systemd.patch +00git-systemd-units.patch 21-no-more-var-run.patch 01-sm-notify-in-sbin.patch 02-524255-manpages.patch @@ -6,5 +8,13 @@ 16-mount.nfs.man-update-distinction-between-fstype.patch 17-multiarch-kerberos-paths.patch 19-iscsiadm-path.patch +20-ticket-expired-error.patch 20-remove-autogenerated-man.patch 22-mountd-fix-segfault-in-add_name-with-newer-gcc-compi.patch +23-systemd-relax-dependencies.patch +24-systemd-pipefs_in_run.patch +25-systemd-daemon-paths.patch +26-systemd-server-before-client.patch +27-systemd-enable-with-systemctl-statd.patch +90-gss-free-lucid-sec-context.patch +remove-gssproxy.patch diff -Nru nfs-utils-1.2.8/debian/rules nfs-utils-1.2.8/debian/rules --- nfs-utils-1.2.8/debian/rules 2014-08-13 00:12:43.000000000 +0000 +++ nfs-utils-1.2.8/debian/rules 2015-11-24 08:39:53.000000000 +0000 @@ -54,7 +54,16 @@ dh_install -Xman --fail-missing dh_installdocs -A dh_installdocs -pnfs-common debian/README.Debian.nfsv4 - dh_installinit -pnfs-common -R + dh_systemd_enable -p nfs-common nfs-client.target + dh_systemd_enable -p nfs-kernel-server nfs-server.service + dh_installinit -pnfs-common --no-start -R --name statd + dh_installinit -pnfs-common --no-start --name statd-mounting + dh_installinit -pnfs-common -R --name gssd + dh_installinit -pnfs-common --no-start --name gssd-mounting + dh_installinit -pnfs-common -R --name idmapd + dh_installinit -pnfs-common --no-start --name idmapd-mounting + dh_systemd_start -p nfs-common --restart-after-upgrade nfs-utils.service + dh_systemd_start -p nfs-kernel-server --restart-after-upgrade nfs-server.service 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 diff -Nru nfs-utils-1.2.8/debian/statd-mounting.override nfs-utils-1.2.8/debian/statd-mounting.override --- nfs-utils-1.2.8/debian/statd-mounting.override 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/statd-mounting.override 2015-04-27 15:44:03.000000000 +0000 @@ -0,0 +1 @@ +manual diff -Nru nfs-utils-1.2.8/debian/statd.override nfs-utils-1.2.8/debian/statd.override --- nfs-utils-1.2.8/debian/statd.override 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/statd.override 2015-04-27 15:44:03.000000000 +0000 @@ -0,0 +1 @@ +manual diff -Nru nfs-utils-1.2.8/debian/tests/control nfs-utils-1.2.8/debian/tests/control --- nfs-utils-1.2.8/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/tests/control 2015-03-06 06:45:34.000000000 +0000 @@ -0,0 +1,4 @@ +Tests: local-server-client +Depends: nfs-kernel-server +# we need machine isolation as we need to modprobe stuff +Restrictions: needs-root, isolation-machine, breaks-testbed diff -Nru nfs-utils-1.2.8/debian/tests/local-server-client nfs-utils-1.2.8/debian/tests/local-server-client --- nfs-utils-1.2.8/debian/tests/local-server-client 1970-01-01 00:00:00.000000000 +0000 +++ nfs-utils-1.2.8/debian/tests/local-server-client 2015-03-06 06:45:34.000000000 +0000 @@ -0,0 +1,65 @@ +#!/bin/sh +# install server and client, do some mounts, verify that it boots and works +set -e + +if ! [ -x /tmp/autopkgtest-reboot ]; then + echo "SKIP: testbed does not support rebooting" + exit 0 +fi + +pre_boot_setup() { + # set up some exports + cat <> /etc/exports +/home localhost(rw,no_root_squash,no_subtree_check) +/var/log/ localhost(ro,no_root_squash,subtree_check) +EOF + + # set up client mounts + mkdir -p /mnt/nfs_home /mnt/nfs_log + cat << EOF >> /etc/fstab +localhost:/home /mnt/nfs_home nfs defaults,nofail 0 0 +localhost:/var/log /mnt/nfs_log nfs defaults,nofail 0 0 +EOF +} + +fail() { + echo "FAIL: $1" >&2 + exit 1 +} + +post_boot_tests() { + # ensure we have our mounts + mount | grep 'localhost:.*nfs_home' || fail "nfs_home not mounted" + mount | grep 'localhost:.*nfs_log' || fail "nfs_log not mounted" + + # test that we can write to NFS export and get it in /home + [ ! -e /home/hello.txt ] || fail "/home/hello.txt already exists" + echo world > /mnt/nfs_home/hello.txt + sync + [ -e /home/hello.txt ] || fail "/home/hello.txt does not exist" + [ "$(cat /home/hello.txt)" = "world" ] || fail "/home/hello.txt has wrong contents" + + # test that we can write to /home and get it in NFS + rm /home/hello.txt + sync + [ ! -e /mnt/nfs_home/hello.txt ] || fail "/mnt/nfs_home/hello.txt exists after removal" + + # read-only, should fail + ! touch /mnt/nfs_log/pwned 2>/dev/null || fail "writing to r/o /mnt/nfs_log succeeded" + + # our systemd jobs have a rather delicate dependency structure and run + # early; ensure that we did not run into any cycles + if [ -d /run/systemd/system ]; then + if journalctl | grep 'Found ordering cycle'; then + journalctl -p warning || true + fail "found ordering cycle in units" + fi + fi +} + +if [ -z "$ADT_REBOOT_MARK" ]; then + pre_boot_setup + /tmp/autopkgtest-reboot boot1 +else + post_boot_tests +fi