From 57a225d7cc348fc3ff86ca8160514818d0862065 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Nov 01 2011 23:21:43 +0000 Subject: Fix remote-fs-pre.target and its ordering Resolves: #749940 --- diff --git a/0001-mount-order-remote-mounts-after-both-network.target-.patch b/0001-mount-order-remote-mounts-after-both-network.target-.patch new file mode 100644 index 0000000..c845c8d --- /dev/null +++ b/0001-mount-order-remote-mounts-after-both-network.target-.patch @@ -0,0 +1,50 @@ +From 7fc2a89a7387db1e5daa4892393c9e9536920c25 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 1 Nov 2011 22:27:48 +0100 +Subject: [PATCH] mount: order remote mounts after both network.target and + remote-fs-pre.target + +Since remote-fs-pre.target is optional we cannot count on it to order +remote mounts after network.target, so let's add that order explicitly +in addition to remote-fs-pre.target. + +https://bugzilla.redhat.com/show_bug.cgi?id=749940 +--- + src/mount.c | 7 ++++++- + 1 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/src/mount.c b/src/mount.c +index ef953f0..f9cfe91 100644 +--- a/src/mount.c ++++ b/src/mount.c +@@ -327,7 +327,7 @@ static bool needs_quota(MountParameters *p) { + } + + static int mount_add_fstab_links(Mount *m) { +- const char *target, *after = NULL; ++ const char *target, *after = NULL, *after2 = NULL; + MountParameters *p; + Unit *tu; + int r; +@@ -358,6 +358,7 @@ static int mount_add_fstab_links(Mount *m) { + if (mount_is_network(p)) { + target = SPECIAL_REMOTE_FS_TARGET; + after = SPECIAL_REMOTE_FS_PRE_TARGET; ++ after2 = SPECIAL_NETWORK_TARGET; + } else { + target = SPECIAL_LOCAL_FS_TARGET; + after = SPECIAL_LOCAL_FS_PRE_TARGET; +@@ -374,6 +375,10 @@ static int mount_add_fstab_links(Mount *m) { + if ((r = unit_add_dependency_by_name(UNIT(m), UNIT_AFTER, after, NULL, true)) < 0) + return r; + ++ if (after2) ++ if ((r = unit_add_dependency_by_name(UNIT(m), UNIT_AFTER, after2, NULL, true)) < 0) ++ return r; ++ + if (automount) { + Unit *am; + +-- +1.7.7 + diff --git a/0001-units-drop-Install-section-from-remote-fs-pre.target.patch b/0001-units-drop-Install-section-from-remote-fs-pre.target.patch new file mode 100644 index 0000000..bbad2fd --- /dev/null +++ b/0001-units-drop-Install-section-from-remote-fs-pre.target.patch @@ -0,0 +1,26 @@ +From fc8f0b5c9cb8277950a2fefdb7f754c47b172dfd Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 1 Nov 2011 22:29:48 +0100 +Subject: [PATCH] units: drop [Install] section from remote-fs-pre.target + +remote-fs-pre.target is not a unit a user should ever explicitly enable. +Instead services which need to hook before network mounts should pull it +in. +--- + units/remote-fs-pre.target | 3 --- + 1 files changed, 0 insertions(+), 3 deletions(-) + +diff --git a/units/remote-fs-pre.target b/units/remote-fs-pre.target +index 5406aa2..8aceb08 100644 +--- a/units/remote-fs-pre.target ++++ b/units/remote-fs-pre.target +@@ -10,6 +10,3 @@ + [Unit] + Description=Remote File Systems (Pre) + After=network.target +- +-[Install] +-WantedBy=multi-user.target +-- +1.7.7 + diff --git a/systemd.spec b/systemd.spec index 046ec0a..dc5df2b 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: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Base Summary: A System and Service Manager @@ -50,6 +50,8 @@ Patch0: 0001-unit-fix-complementing-of-requirement-deps-with-Afte.patch # some post-v37 patches from upstream: Patch1: 0002-manager-fix-a-crash-in-isolating.patch Patch2: 0005-systemctl-completion-always-invoke-with-no-legend.patch +Patch3: 0001-mount-order-remote-mounts-after-both-network.target-.patch +Patch4: 0001-units-drop-Install-section-from-remote-fs-pre.target.patch # For sysvinit tools Obsoletes: SysVinit < 2.86-24, sysvinit < 2.86-24 @@ -115,6 +117,8 @@ SysV compatibility tools for systemd %patch0 -p1 -R %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build %configure --with-rootdir= --with-distro=fedora --with-rootlibdir=/%{_lib} @@ -363,6 +367,10 @@ fi %{_bindir}/systemd-sysv-convert %changelog +* Wed Nov 02 2011 Michal Schmidt - 37-3 +- Fix remote-fs-pre.target and its ordering. +- Resolves: #749940 + * Wed Oct 19 2011 Michal Schmidt - 37-2 - A couple of fixes from upstream: - Fix a regression in bash-completion reported in Bodhi.