From 92c12b47b6a40f2b126175a6fa6c4e2e0b17f4b2 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Dec 15 2017 02:20:28 +0000 Subject: [PATCH 1/2] post: Re-instate systemd ProtectHome/ProtectSystem and PrivateTmp This reverts https://pagure.io/fedora-atomic/c/6a8ee9a65491d5a37c9177a6d8a709a4ecb3baf7?branch=master I've tested that a rebase of F26AH works with the latest systemd there; for example it looks like `chronyd.service` uses `PrivateTmp=yes` and `ProtectSystem=full`, and it's running fine. --- diff --git a/treecompose-post.sh b/treecompose-post.sh index 5bb7034..2aa1068 100755 --- a/treecompose-post.sh +++ b/treecompose-post.sh @@ -4,6 +4,3 @@ 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' {} \; From d8c1af9c560ca390a4fa108ccbeaa8bf6028eee7 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Dec 15 2017 02:20:31 +0000 Subject: [PATCH 2/2] post: Be rofiles-fuse compatible This fixes corruption I saw when using unified core 🌐 mode; we ended up appending repeatedly to the version in the imported pkgcache repo. --- diff --git a/treecompose-post.sh b/treecompose-post.sh index 2aa1068..f1f23d0 100755 --- a/treecompose-post.sh +++ b/treecompose-post.sh @@ -3,4 +3,8 @@ set -xeuo pipefail # Work around https://bugzilla.redhat.com/show_bug.cgi?id=1265295 -echo 'Storage=persistent' >> /etc/systemd/journald.conf +# Also note the create-new-then-rename dance for rofiles-fuse compat +if ! grep -q '^Storage=persistent' /etc/systemd/journald.conf; then + (cat /etc/systemd/journald.conf && echo 'Storage=persistent') > /etc/systemd.journald.conf.new + mv /etc/systemd.journald.conf{.new,} +fi