[systemd/f16] Fix automount regression

Michal Schmidt michich at fedoraproject.org
Thu Jan 26 08:45:55 UTC 2012


commit c0a5082a10a92b0f19acefd568efb7d5fdb2c76e
Author: Michal Schmidt <mschmidt at redhat.com>
Date:   Thu Jan 26 09:45:03 2012 +0100

    Fix automount regression

 0134-mount-fix-automount-regression.patch |   50 +++++++++++++++++++++++++++++
 systemd.spec                              |    6 +++-
 2 files changed, 55 insertions(+), 1 deletions(-)
---
diff --git a/0134-mount-fix-automount-regression.patch b/0134-mount-fix-automount-regression.patch
new file mode 100644
index 0000000..bd42904
--- /dev/null
+++ b/0134-mount-fix-automount-regression.patch
@@ -0,0 +1,50 @@
+From 323d7b4a7eb7b83a0148f6e38b9fd87de848ecf5 Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt at redhat.com>
+Date: Thu, 26 Jan 2012 01:19:19 +0100
+Subject: [PATCH] mount: fix automount regression
+
+Tom Gundersen noticed a regression where comment=systemd.automount in
+fstab no longer prevented the adding of the After=foo.mount dependency
+into local-fs.target. He bisected it to commit 9ddc4a26.
+
+It turns out that clearing the default_dependencies flag is necessary
+after all, in order to avoid complementing of Wants= with After= in the
+target unit. We still want to add the dependencies on quota units and
+umount.target though.
+(cherry picked from commit da375869ff31f83938123dc0d2a8d5c0f0845a0c)
+
+Conflicts:
+
+	src/mount.c
+---
+ src/mount.c |    7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/src/mount.c b/src/mount.c
+index 12c0710..3dc14bb 100644
+--- a/src/mount.c
++++ b/src/mount.c
+@@ -583,6 +583,11 @@ static int mount_load(Unit *u) {
+ 
+                 if (m->meta.fragment_path)
+                         m->from_fragment = true;
++                else if (m->from_etc_fstab)
++                        /* We always add several default dependencies to fstab mounts,
++                         * but we do not want the implicit complementing of Wants= with After=
++                         * in the target unit that this mount unit will be hooked into. */
++                        m->meta.default_dependencies = false;
+ 
+                 if (!m->where)
+                         if (!(m->where = unit_name_to_path(u->meta.id)))
+@@ -615,7 +620,7 @@ static int mount_load(Unit *u) {
+                 if ((r = mount_add_fstab_links(m)) < 0)
+                         return r;
+ 
+-                if (m->meta.default_dependencies)
++                if (m->meta.default_dependencies || m->from_etc_fstab)
+                         if ((r = mount_add_default_dependencies(m)) < 0)
+                                 return r;
+ 
+-- 
+1.7.7.6
+
diff --git a/systemd.spec b/systemd.spec
index 0be44b4..73c99f8 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -2,7 +2,7 @@ Name:           systemd
 Url:            http://www.freedesktop.org/wiki/Software/systemd
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Version:        37
-Release:        10%{?dist}
+Release:        11%{?dist}
 License:        GPLv2+
 Group:          System Environment/Base
 Summary:        A System and Service Manager
@@ -181,6 +181,7 @@ Patch0130:      0130-mount-fix-quota.patch
 Patch0131:      0131-logind-downgrade-login-message-to-debug.patch
 Patch0132:      0132-service-add-missing-pid-file-unwatch-in-the-destruct.patch
 Patch0133:      0133-socket-don-t-fail-the-socket-on-ENOTCONN.patch
+Patch0134:      0134-mount-fix-automount-regression.patch
 
 # For sysvinit tools
 Obsoletes:      SysVinit < 2.86-24, sysvinit < 2.86-24
@@ -502,6 +503,9 @@ fi
 %{_bindir}/systemd-sysv-convert
 
 %changelog
+* Thu Jan 26 2012 Michal Schmidt <mschmidt at redhat.com> - 37-11
+- Fix automount regression.
+
 * Sat Jan 21 2012 Michal Schmidt <mschmidt at redhat.com> - 37-10
 - Fix occasionally failing socket units with Accept=yes (#783344).
 


More information about the scm-commits mailing list