From 82cdd1ff531f2dc0152c199ddd40330f266acd7d Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sep 01 2016 18:57:21 +0000 Subject: post: Neuter all systemd PrivateTmp= and Protect(Home|System) See https://github.com/systemd/systemd/issues/4082 for the root of this (mounts not following symlinks). For Protect(Home|System), for the most part this is unnecessary with ostree (we already have a ro bind mount over /usr). And unfortunately it doesn't cover `/sysroot`. Anyways, at some point we'll revisit the systemd Protect*, but for now let's have the current system boot. --- diff --git a/treecompose-post.sh b/treecompose-post.sh index 836afac..b1cbbce 100755 --- a/treecompose-post.sh +++ b/treecompose-post.sh @@ -5,6 +5,9 @@ set -xeuo pipefail # Work around https://bugzilla.redhat.com/show_bug.cgi?id=1265295 echo 'Storage=persistent' >> /etc/systemd/journald.conf +# Work around https://github.com/systemd/systemd/issues/4082 +find /usr/lib/systemd/system/ -type f -exec sed -i -e '/^PrivateTmp=/d' -e '/^Protect\(Home\|System\)=/d' {} \; + # See: https://bugzilla.redhat.com/show_bug.cgi?id=1051816 KEEPLANG=en_US find /usr/share/locale -mindepth 1 -maxdepth 1 -type d -not -name "${KEEPLANG}" -exec rm -rf {} +