From 2493f16093b14a81e949bd6a1b89724cb931807d Mon Sep 17 00:00:00 2001 From: root Date: Fri, 27 Jan 2012 23:15:06 +0000 Subject: Fri Jan 27 23:15:06 UTC 2012 --- .../0001-mount-fix-automount-regression.patch | 45 ++++++++++++++++++++++ testing/systemd/PKGBUILD | 16 ++++++-- 2 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 testing/systemd/0001-mount-fix-automount-regression.patch (limited to 'testing') diff --git a/testing/systemd/0001-mount-fix-automount-regression.patch b/testing/systemd/0001-mount-fix-automount-regression.patch new file mode 100644 index 000000000..a064f20cf --- /dev/null +++ b/testing/systemd/0001-mount-fix-automount-regression.patch @@ -0,0 +1,45 @@ +From da375869ff31f83938123dc0d2a8d5c0f0845a0c Mon Sep 17 00:00:00 2001 +From: Michal Schmidt +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. +--- + src/mount.c | 7 ++++++- + 1 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/src/mount.c b/src/mount.c +index 6d0af4e..965f705 100644 +--- a/src/mount.c ++++ b/src/mount.c +@@ -583,6 +583,11 @@ static int mount_load(Unit *u) { + + if (UNIT(m)->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. */ ++ UNIT(m)->default_dependencies = false; + + if (!m->where) + if (!(m->where = unit_name_to_path(u->id))) +@@ -615,7 +620,7 @@ static int mount_load(Unit *u) { + if ((r = mount_add_fstab_links(m)) < 0) + return r; + +- if (UNIT(m)->default_dependencies) ++ if (UNIT(m)->default_dependencies || m->from_etc_fstab) + if ((r = mount_add_default_dependencies(m)) < 0) + return r; + +-- +1.7.8.4 + diff --git a/testing/systemd/PKGBUILD b/testing/systemd/PKGBUILD index 4e1d95a74..a1f555c57 100644 --- a/testing/systemd/PKGBUILD +++ b/testing/systemd/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 147240 2012-01-25 01:22:21Z dreisner $ +# $Id: PKGBUILD 147677 2012-01-26 13:47:39Z dreisner $ # Maintainer: Dave Reisner pkgname=systemd pkgver=39 -pkgrel=1 +pkgrel=2 pkgdesc="Session and Startup manager" arch=('i686' 'x86_64') url="http://www.freedesktop.org/wiki/Software/systemd" @@ -27,9 +27,11 @@ backup=(etc/dbus-1/system.d/org.freedesktop.systemd1.conf etc/systemd/systemd-logind.conf) install=systemd.install source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz" - "os-release") + "os-release" + "0001-mount-fix-automount-regression.patch") md5sums=('7179b34f6f6553d2a36551ac1dec5f0d' - '752636def0db3c03f121f8b4f44a63cd') + '752636def0db3c03f121f8b4f44a63cd' + '6e42637c1b1d4589909329dab777631b') build() { cd "$pkgname-$pkgver" @@ -39,6 +41,9 @@ build() { sed -i -e '/^Environ.*LANG/s/^/#/' \ -e '/^ExecStart/s/agetty/& -8/' units/getty@.service.m4 + # fix default dependencies for automounts in /etc/fstab + patch -Np1 < "$srcdir/0001-mount-fix-automount-regression.patch" + ./configure --sysconfdir=/etc \ --libexecdir=/usr/lib \ --libdir=/usr/lib \ @@ -58,6 +63,9 @@ package() { make DESTDIR="$pkgdir" install + # needed by systemd-loginctl for enable-linger + install -dm755 "$pkgdir/var/lib/systemd" + install -Dm644 "$srcdir/os-release" "$pkgdir/etc/os-release" printf "d /run/console 755 root root\n" > "$pkgdir/usr/lib/tmpfiles.d/console.conf" -- cgit v1.2.3-54-g00ecf