summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2015-04-23 17:04:01 (GMT)
committerJavier Jardón <jjardon@gnome.org>2015-04-29 15:00:13 (GMT)
commit000136bd1ac5102cd6780928bf5ba4a4756f89a8 (patch)
tree1bad11c1c3b8b13a910e68653a9716a5e135bd9b
parentaae1e3dec176ebc40cd233a29cf48c04d856fac5 (diff)
downloaddefinitions-000136bd1ac5102cd6780928bf5ba4a4756f89a8.tar.gz
Configure systemd to support user instances
This involves: * A workaround to user@.service being shut down prematurely. * Fixing a systemd unit using 'kill' from a path that doesn't necessarily exist. Change-Id: Iacad155da9752313a2e4bbaae34a3e593d6ecc1b
-rw-r--r--strata/foundation/systemd.morph14
1 files changed, 13 insertions, 1 deletions
diff --git a/strata/foundation/systemd.morph b/strata/foundation/systemd.morph
index c53cef3..efca734 100644
--- a/strata/foundation/systemd.morph
+++ b/strata/foundation/systemd.morph
@@ -1,10 +1,20 @@
name: systemd
kind: chunk
build-system: autotools
+pre-configure-commands:
+# systemd prematurely kills the user session. This is a known bug in systemd
+# https://bugs.freedesktop.org/show_bug.cgi?id=70593
+- |
+ cat >> units/user@.service.m4.in <<EOF
+ KillSignal=SIGCONT
+ ExecStop=/bin/kill -TERM \$MAINPID
+ EOF
configure-commands:
- sh autogen.sh
+# KILL added because it picks up /usr/bin/kill, which is not installed on
+# all systems
- |
- ./configure --prefix="$PREFIX" --enable-xz --disable-manpages \
+ KILL=/bin/kill ./configure --prefix="$PREFIX" --enable-xz --disable-manpages \
--disable-tests --sysconfdir=/etc --localstatedir=/var \
--libdir="$PREFIX/lib" --libexecdir="$PREFIX/libexec" \
--with-rootprefix= --with-rootlibdir=/lib
@@ -27,3 +37,5 @@ post-install-commands:
[Network]
DHCP=yes
EOF
+# Use the pam config systemd provides
+- cp -a "$DESTDIR/$PREFIX"/share/factory/etc/pam.d/* "$DESTDIR/etc/pam.d"