summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2015-04-23 17:04:01 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2015-04-29 10:07:10 +0000
commit0b685f87bde411130ad24f048c613596dd0b787f (patch)
tree03fdb0e59fa1473d39d50b12c83c87c1e59369b9
parentb177b1b48cf1d287970f20f24750fb8904588b96 (diff)
downloaddefinitions-baserock/jonathanmaw/pam-systemd-2.tar.gz
Configure systemd to support user instancesbaserock/jonathanmaw/pam-systemd-2
This involves: * Adding XDG_RUNTIME_DIR to systemd's environment variables. * Replacing the systemd pam config with one that works. * 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 c53cef39..efca734f 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"