]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Rely on tmpfiles to put nsswitch.conf in place
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 9 Apr 2025 13:27:51 +0000 (15:27 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 10 Apr 2025 13:09:29 +0000 (15:09 +0200)
Let's rely on tmpfiles to put our nsswitch.conf in place instead of
doing it in the post-install script. This moves us one step closer
to being able to build the mkosi image without having the source
tree available when NO_BUILD is used.

mkosi/mkosi.postinst.chroot

index 3a021bffd9c11b22b5b201469aff331f0c922740..1d4c5f4451f2fbf2287990536753e26177c9f042 100755 (executable)
@@ -34,8 +34,9 @@ done
 # systemd-journald.
 rm -rf "$BUILDROOT/var/log/journal"
 
+# Make sure our own nsswitch.conf from the repository is used instead of the distribution's by deleting the
+# distribution's and relying on tmpfiles to put ours in place during boot.
 rm -f /etc/nsswitch.conf
-cp "$SRCDIR/factory/etc/nsswitch.conf" /etc/nsswitch.conf
 
 # Remove to make TEST-73-LOCALE pass on Ubuntu.
 rm -f /etc/default/keyboard