From 94baee78e963692ebe90131f411ab189a7e7ccda Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 28 Feb 2024 08:19:20 -0500 Subject: [PATCH] basic-fixes: Tweak `/usr/lib/tmpfiles.d/provision.conf` This ensures that systemd's creation of `/root` works instead of falling back to what we have in `/usr/lib/tmpfiles.d/rpm-ostree-0-integration.conf` for `d /var/roothome 0700 root root -` which in turn ensures that both the credential values as well as bootc's injection of a tmpfiles.d snippet for root SSH key works. https://github.com/containers/bootc/issues/358 --- tier-0/basic-fixes.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tier-0/basic-fixes.yaml b/tier-0/basic-fixes.yaml index 351db007..0b5c65a7 100644 --- a/tier-0/basic-fixes.yaml +++ b/tier-0/basic-fixes.yaml @@ -17,3 +17,10 @@ postprocess: if test '!' -f /usr/lib/systemd/system/local-fs.target.wants/tmp.mount; then ln -sf ../tmp.mount /usr/lib/systemd/system/local-fs.target.wants fi + + # See https://github.com/containers/bootc/issues/358 + # basically systemd-tmpfiles doesn't follow symlinks; ordinarily our + # tmpfiles.d unit for `/var/roothome` is fine, but this actually doesn't + # work if we want to use tmpfiles.d to write to `/root/.ssh` because + # tmpfiles gives up on that before getting to `/var/roothome`. + sed -ie s,/root,/var/roothome, /usr/lib/tmpfiles.d/provision.conf