From 4d65c9f70c866e678bd1c408a0a9ebf9046c5db0 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 20 Feb 2025 15:08:53 +0100 Subject: [PATCH] mkosi: Enable userdb tmpfiles dropin on Fedora/CentOS It's disabled by default in the Fedora spec, but still available as an example file. Let's symlink it to the proper name in the images to enable it again. --- mkosi.postinst.chroot | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mkosi.postinst.chroot b/mkosi.postinst.chroot index 310a26fa141..693514b3130 100755 --- a/mkosi.postinst.chroot +++ b/mkosi.postinst.chroot @@ -52,6 +52,12 @@ rm -f /etc/default/keyboard systemctl mask isc-dhcp-server.service systemctl mask mdmonitor.service +# Fedora disables the userdb ssh dropin by default, but helpfully leaves it available in +# the package so that we can just symlink it to a name that will be picked up by systemd-tmpfiles. +if [[ -f /usr/lib/tmpfiles.d/20-systemd-userdb.conf.example ]]; then + ln --symbolic 20-systemd-userdb.conf.example /usr/lib/tmpfiles.d/20-systemd-userdb.conf +fi + # This is executed inside the chroot so no need to disable any features as the default features will match # the kernel's supported features. SYSTEMD_REPART_MKFS_OPTIONS_EXT4="" \ -- 2.47.3