Am 2015-07-07 13:15, schrieb Christian Seiler:
Thanks for taking care of this!
Thanks for proof-reading the patch!
Am 2015-07-07 13:03, schrieb Jonas Meurer:
Am 2015-06-28 12:54, schrieb Michael Biebl:
I suggest to add this simple fix to Jessie by uploading it to
stable-proposed-updates. What do you think? Also, do you think that
/etc/systemd/system/remote-fs-pre.target.d/nfs.conf belongs to
systemd
package or to nfs-common? I would say it belongs to nfs-common as
that
one provides the required tools and services to mount NFS shares on
a
client.
For Jessie:
- nfs-common is still an init script, so one cannot simply add
Before=remote-fs-pre.target to that. But there are two other
options:
- just for Jessie: update systemd to change the original unit file
remote-fs-pre.target to include After=nfs-common.service
- or alternatively, package a drop-in in /lib in the nfs-common
package, i.e.
/lib/systemd/system/nfs-common.service.d/systemd-ordering.conf:
[Unit]
Before=remote-fs-pre.target
(IMHO at least, I'll defer to the maintainers of the respective
packages as to what they think is appropriate.)
Certainly, the preferred fix is, that packages ship native service
files
which override/replace the sysv init scripts.
In case of nfs-common/rpcbind, Ubuntu has done some extensive work to
properly integrate nfs-common/rpcbind with systemd.
This hasn't landed in Debian (yet) and is not something which can be
backported for jessie.
The drop-in snippet for nfs-common to augment the dependency
information
when being run under systemd is something which seems to be suitable
for
jessie and could be added to the package in sid to give it some
testing
first. Ideally, that drop-in is shipped by the package itself. This
would mean a stable upload for nfs-common.
I prepared a patch for nfs-utils 1.2.8-9 that adds a systemd drop-in
for
nfs-common at
/lib/systemd/system/nfs-common.service.d/remote-fs-pre.conf.
It places the nfs-common service before the remote-fs-pre target. This
results in the rpc.gssd service beeing started before NFS shares are
mounted during the boot process.
The patch is tested on my system and works for me.
Not having built the package with your diff myself: are you sure
that it works as expected and installs the file in the right
place? Just from reading the debdiff, the following seems to be
wrong:
The second argument for lines in .install files should be a
directory (see dh_install manpage), dh_install alone doesn't support
renaming files. (There is dh_exec for that if you need that
functionality, but that requires an additional build-dep.)
OTOH, you don't really need to rename the file, the name you have
is already fine, so why not just put the following line in
nfs-common.install:
debian/systemd-remote-fs-pre.conf
lib/systemd/system/nfs-common.service.d/
Indeed, you're correct. Slipped through my fingers for some reason.
Fixed
in the updated version of the patch.
I suggest to upload
nfs packages with this patch to Jessie (through
stable-proposed-updates)
in order to fix auto-mounting Kerberos-secured NFS mounts at boot in
Jessie.
Note that the release team wants bugs fixed in unstable first,
before they accept uploads to s-p-u.
You're correct. I'll wait for the nfs-utils maintainers to comment and
prepare an NMU for unstable if they don't take care of it themselves.
Cheers,
jonas
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 02:12:43.000000000 +0200
+++ nfs-utils-1.2.8/debian/changelog 2015-07-07 12:11:02.000000000 +0200
@@ -1,3 +1,13 @@
+nfs-utils (1:1.2.8-9+deb8u1) jessie; urgency=medium
+
+ * NMU by Jonas Meurer.
+ * Add a systemd drop-in to fix boot order for NFSv4+Kerberos setups.
+ rpc.gssd needs to be started before mounting Kerberos-secured NFS
+ mounts. The drop-in takes care that NFS common services are started
+ before systemd target remote-fs-pre is reached. Closes: #775542.
+
+ -- Jonas Meurer <jo...@freesources.org> Tue, 07 Jul 2015 12:04:45 +0200
+
nfs-utils (1:1.2.8-9) unstable; urgency=medium
* debian/patches/22-mountd-fix-segfault-in-add_name-with-newer-gcc-
diff -Nru nfs-utils-1.2.8/debian/nfs-common.dirs nfs-utils-1.2.8/debian/nfs-common.dirs
--- nfs-utils-1.2.8/debian/nfs-common.dirs 2014-08-13 02:12:43.000000000 +0200
+++ nfs-utils-1.2.8/debian/nfs-common.dirs 2015-07-07 12:04:37.000000000 +0200
@@ -7,3 +7,4 @@
usr/share/nfs-common/conffiles
usr/share/bug/nfs-common
usr/share/bug/nfs-utils
+lib/systemd/system/nfs-common.service.d
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 02:12:43.000000000 +0200
+++ nfs-utils-1.2.8/debian/nfs-common.install 2015-07-07 13:30:40.000000000 +0200
@@ -22,3 +22,4 @@
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/remote-fs-pre.conf lib/systemd/system/nfs-common.service.d/
diff -Nru nfs-utils-1.2.8/debian/remote-fs-pre.conf nfs-utils-1.2.8/debian/remote-fs-pre.conf
--- nfs-utils-1.2.8/debian/remote-fs-pre.conf 1970-01-01 01:00:00.000000000 +0100
+++ nfs-utils-1.2.8/debian/remote-fs-pre.conf 2015-07-07 12:37:40.000000000 +0200
@@ -0,0 +1,2 @@
+[Unit]
+Before=remote-fs-pre.target