]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Fix up ownership of testuser home directory on first boot
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 9 Oct 2024 12:49:07 +0000 (14:49 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 11 Oct 2024 09:35:02 +0000 (11:35 +0200)
When building unprivileged, the testuser home directory ends up
owned by root:root because mkosi can't chown directories to other
owners when running unprivileged. So let's fix up the testuser
ownership on first boot with tmpfiles instead.

mkosi.extra/usr/lib/tmpfiles.d/testuser.conf [new file with mode: 0644]

diff --git a/mkosi.extra/usr/lib/tmpfiles.d/testuser.conf b/mkosi.extra/usr/lib/tmpfiles.d/testuser.conf
new file mode 100644 (file)
index 0000000..7113177
--- /dev/null
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+z! /home/testuser 700 testuser testuser