- fix systemd startup race and a couple of other small problems.
This commit is contained in:
parent
10f0ff8b5d
commit
a443d88249
@ -0,0 +1,39 @@
|
||||
autofs-5.1.4 - add units After line to include statd service
|
||||
|
||||
From: Ian Kent <raven@themaw.net>
|
||||
|
||||
autofs needs to ensure statd is started before any NFS mounts
|
||||
are attempted. This is because if the first NFS mount starts
|
||||
the service and the mount is an automounted directory that is
|
||||
included in the PATH used by systemctl (eg. /usr/local/bin)
|
||||
the mount cannot complete.
|
||||
|
||||
Add rpc-statd.service to the unit "After=" line to try and
|
||||
ensure it is started before automount.
|
||||
|
||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
||||
---
|
||||
CHANGELOG | 1 +
|
||||
samples/autofs.service.in | 2 +-
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- autofs-5.1.4.orig/CHANGELOG
|
||||
+++ autofs-5.1.4/CHANGELOG
|
||||
@@ -21,6 +21,7 @@ xx/xx/2018 autofs-5.1.5
|
||||
- add an example fedfs master map entry to the installed master map.
|
||||
- improve hostname lookup error logging.
|
||||
- tiny patch for autofs typo and possible bug.
|
||||
+- add units After line to include statd service.
|
||||
|
||||
19/12/2017 autofs-5.1.4
|
||||
- fix spec file url.
|
||||
--- autofs-5.1.4.orig/samples/autofs.service.in
|
||||
+++ autofs-5.1.4/samples/autofs.service.in
|
||||
@@ -1,6 +1,6 @@
|
||||
[Unit]
|
||||
Description=Automounts filesystems on demand
|
||||
-After=network.target ypbind.service sssd.service network-online.target remote-fs.target
|
||||
+After=network.target ypbind.service sssd.service network-online.target remote-fs.target rpc-statd.service rpcbind.service
|
||||
Wants=network-online.target rpc-statd.service rpcbind.service
|
||||
|
||||
[Service]
|
||||
69
autofs-5.1.4-fix-NFS-version-mask-usage.patch
Normal file
69
autofs-5.1.4-fix-NFS-version-mask-usage.patch
Normal file
@ -0,0 +1,69 @@
|
||||
autofs-5.1.4 - fix NFS version mask usage
|
||||
|
||||
From: Ian Kent <raven@themaw.net>
|
||||
|
||||
Upstream commit a8af65195 changed NFS_VERS_MASK to exclude NFSv2
|
||||
so NFSv2 would be excluded in the default availability probe.
|
||||
|
||||
But NFS_VERS_MASK is used like a mask elsewhere and causes NFSv2
|
||||
to be cleared for the availability probe even when it is requested.
|
||||
|
||||
So add a macro to NFS_VERS_DEFAULT (and accompanying macros) to be
|
||||
used to set initial defaults and restore NFS_VERS_MASK to what it
|
||||
should be when used as a mask.
|
||||
|
||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
||||
---
|
||||
CHANGELOG | 1 +
|
||||
include/replicated.h | 5 ++++-
|
||||
modules/mount_nfs.c | 6 +++---
|
||||
3 files changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
--- autofs-5.1.4.orig/CHANGELOG
|
||||
+++ autofs-5.1.4/CHANGELOG
|
||||
@@ -23,6 +23,7 @@ xx/xx/2018 autofs-5.1.5
|
||||
- tiny patch for autofs typo and possible bug.
|
||||
- add units After line to include statd service.
|
||||
- use systemd sd_notify() at startup.
|
||||
+- fix NFS version mask usage.
|
||||
|
||||
19/12/2017 autofs-5.1.4
|
||||
- fix spec file url.
|
||||
--- autofs-5.1.4.orig/include/replicated.h
|
||||
+++ autofs-5.1.4/include/replicated.h
|
||||
@@ -26,7 +26,9 @@
|
||||
#define NFS2_SUPPORTED 0x0010
|
||||
#define NFS3_SUPPORTED 0x0020
|
||||
#define NFS4_SUPPORTED 0x0040
|
||||
-#define NFS_VERS_MASK (NFS3_SUPPORTED)
|
||||
+#define NFS_VERS_DEFAULT (NFS3_SUPPORTED)
|
||||
+#define NFS_VERS_MASK (NFS2_SUPPORTED|NFS3_SUPPORTED)
|
||||
+#define NFS4_VERS_DEFAULT (NFS4_SUPPORTED)
|
||||
#define NFS4_VERS_MASK (NFS4_SUPPORTED)
|
||||
|
||||
#define NFS2_REQUESTED NFS2_SUPPORTED
|
||||
@@ -39,6 +41,7 @@
|
||||
#define UDP_REQUESTED UDP_SUPPORTED
|
||||
#define TCP6_REQUESTED 0x0100
|
||||
#define UDP6_REQUESTED 0x0200
|
||||
+#define NFS_PROTO_DEFAULT (TCP_SUPPORTED|UDP_SUPPORTED)
|
||||
#define NFS_PROTO_MASK (TCP_SUPPORTED|UDP_SUPPORTED)
|
||||
|
||||
#define NFS2_TCP_SUPPORTED NFS2_SUPPORTED
|
||||
--- autofs-5.1.4.orig/modules/mount_nfs.c
|
||||
+++ autofs-5.1.4/modules/mount_nfs.c
|
||||
@@ -86,11 +86,11 @@ int mount_mount(struct autofs_point *ap,
|
||||
root, name, what, fstype, options);
|
||||
|
||||
mount_default_proto = defaults_get_mount_nfs_default_proto();
|
||||
- vers = NFS_VERS_MASK | NFS_PROTO_MASK;
|
||||
+ vers = NFS_VERS_DEFAULT | NFS_PROTO_DEFAULT;
|
||||
if (strcmp(fstype, "nfs4") == 0)
|
||||
- vers = NFS4_VERS_MASK | TCP_SUPPORTED;
|
||||
+ vers = NFS4_VERS_DEFAULT | TCP_SUPPORTED;
|
||||
else if (mount_default_proto == 4)
|
||||
- vers = vers | NFS4_VERS_MASK;
|
||||
+ vers = vers | NFS4_VERS_DEFAULT;
|
||||
|
||||
/* Extract "nosymlink" pseudo-option which stops local filesystems
|
||||
* from being symlinked.
|
||||
@ -0,0 +1,48 @@
|
||||
autofs-5.1.4 - tiny patch for autofs typo and possible bug
|
||||
|
||||
From: Todd Eigenschink <todd@fai2.com>
|
||||
|
||||
(1) The word "to" is doubled in two warnings.
|
||||
|
||||
(2) It prints a warning when it can't open the "old" config file, even
|
||||
if it was able to open the default one. That's a reasonable warning if
|
||||
it *couldn't* open the new one, but seems unnecessary if it could.
|
||||
|
||||
The patch removes the unneeded "to"s and only prints warning about the
|
||||
old config file if it couldn't open the default one.
|
||||
|
||||
Signed-off-by: Todd Eigenschink <todd@fai2.com>
|
||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
||||
---
|
||||
CHANGELOG | 1 +
|
||||
lib/defaults.c | 6 +++---
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
--- autofs-5.1.4.orig/CHANGELOG
|
||||
+++ autofs-5.1.4/CHANGELOG
|
||||
@@ -20,6 +20,7 @@ xx/xx/2018 autofs-5.1.5
|
||||
- add conditional inclusion of fedfs binaries.
|
||||
- add an example fedfs master map entry to the installed master map.
|
||||
- improve hostname lookup error logging.
|
||||
+- tiny patch for autofs typo and possible bug.
|
||||
|
||||
19/12/2017 autofs-5.1.4
|
||||
- fix spec file url.
|
||||
--- autofs-5.1.4.orig/lib/defaults.c
|
||||
+++ autofs-5.1.4/lib/defaults.c
|
||||
@@ -1207,12 +1207,12 @@ unsigned int defaults_read_config(unsign
|
||||
|
||||
conf = open_fopen_r(DEFAULT_CONFIG_FILE);
|
||||
if (!conf)
|
||||
- message(to_syslog, "failed to to open config %s",
|
||||
+ message(to_syslog, "failed to open config %s",
|
||||
DEFAULT_CONFIG_FILE);
|
||||
|
||||
oldconf = open_fopen_r(OLD_CONFIG_FILE);
|
||||
- if (!oldconf)
|
||||
- message(to_syslog, "failed to to open old config %s",
|
||||
+ if (!oldconf && !conf)
|
||||
+ message(to_syslog, "failed to open old config %s",
|
||||
OLD_CONFIG_FILE);
|
||||
|
||||
/* Neither config has been updated */
|
||||
1357
autofs-5.1.4-use-systemd-sd_notify-at-startup.patch
Normal file
1357
autofs-5.1.4-use-systemd-sd_notify-at-startup.patch
Normal file
File diff suppressed because it is too large
Load Diff
19
autofs.spec
19
autofs.spec
@ -8,7 +8,7 @@
|
||||
Summary: A tool for automatically mounting and unmounting filesystems
|
||||
Name: autofs
|
||||
Version: 5.1.4
|
||||
Release: 14%{?dist}
|
||||
Release: 15%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv2+
|
||||
Group: System Environment/Daemons
|
||||
@ -34,6 +34,10 @@ Patch18: autofs-5.1.4-add-fedfs-map-nfs4_c.patch
|
||||
Patch19: autofs-5.1.4-add-conditional-inclusion-of-fedfs-binaries.patch
|
||||
Patch20: autofs-5.1.4-add-an-example-fedfs-master-map-entry-to-the-installed-master-map.patch
|
||||
Patch21: autofs-5.1.4-improve-hostname-lookup-error-logging.patch
|
||||
Patch22: autofs-5.1.4-tiny-patch-for-autofs-typo-and-possible-bug.patch
|
||||
Patch23: autofs-5.1.4-add-units-After-line-to-include-statd-service.patch
|
||||
Patch24: autofs-5.1.4-use-systemd-sd_notify-at-startup.patch
|
||||
Patch25: autofs-5.1.4-fix-NFS-version-mask-usage.patch
|
||||
|
||||
%if %{with_systemd}
|
||||
BuildRequires: systemd-units
|
||||
@ -114,6 +118,10 @@ echo %{version}-%{release} > .version
|
||||
%patch19 -p1
|
||||
%patch20 -p1
|
||||
%patch21 -p1
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
%patch24 -p1
|
||||
%patch25 -p1
|
||||
|
||||
%build
|
||||
LDFLAGS=-Wl,-z,now
|
||||
@ -208,6 +216,13 @@ fi
|
||||
%dir /etc/auto.master.d
|
||||
|
||||
%changelog
|
||||
* Mon Mar 26 2018 Ian Kent <ikent@redhat.com> - 1:5.1.4-15
|
||||
- tiny patch for autofs typo and possible bug.
|
||||
- add units After line to include statd service.
|
||||
- use systemd sd_notify() at startup.
|
||||
- fix NFS version mask usage.
|
||||
- fix incorrect date in changelog.
|
||||
|
||||
* Tue Mar 06 2018 Ian Kent <ikent@redhat.com> - 1:5.1.4-14
|
||||
- improve hostname lookup error logging.
|
||||
|
||||
@ -230,7 +245,7 @@ fi
|
||||
* Fri Feb 9 2018 Ian Kent <ikent@redhat.com> - 1:5.1.4-10
|
||||
- clean up obsolete spec file directives.
|
||||
|
||||
* Tue Feb 7 2018 Ian Kent <ikent@redhat.com> - 1:5.1.4-9
|
||||
* Wed Feb 7 2018 Ian Kent <ikent@redhat.com> - 1:5.1.4-9
|
||||
- fix install mode of autofs_ldap_auth.conf.
|
||||
|
||||
* Tue Feb 6 2018 Ian Kent <ikent@redhat.com> - 1:5.1.4-8
|
||||
|
||||
Loading…
Reference in New Issue
Block a user