summaryrefslogtreecommitdiffstats
path: root/mkosi.images/system
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2023-11-27 18:50:49 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2023-12-13 18:55:46 +0100
commit0947748555c77754e09f0c6fe6919112b0aed2f0 (patch)
tree94a95e1efcd302b9b09a1e40d2e28af49c050e4b /mkosi.images/system
parentmkosi: Allow the output directory to be overridden (diff)
downloadsystemd-0947748555c77754e09f0c6fe6919112b0aed2f0.tar.xz
systemd-0947748555c77754e09f0c6fe6919112b0aed2f0.zip
mkosi: Add testuser and tar to system image
The integration tests are installed into the image with the intention that it should be possible to run those tests, but those tests require the named user testuser and tar is needed for machined-import
Diffstat (limited to 'mkosi.images/system')
-rw-r--r--mkosi.images/system/mkosi.conf1
-rwxr-xr-xmkosi.images/system/mkosi.postinst.chroot9
2 files changed, 10 insertions, 0 deletions
diff --git a/mkosi.images/system/mkosi.conf b/mkosi.images/system/mkosi.conf
index 7612f221cc..6948f8eb7c 100644
--- a/mkosi.images/system/mkosi.conf
+++ b/mkosi.images/system/mkosi.conf
@@ -33,6 +33,7 @@ Packages=
strace
systemd
tmux
+ tar
tree
udev
util-linux
diff --git a/mkosi.images/system/mkosi.postinst.chroot b/mkosi.images/system/mkosi.postinst.chroot
index e0728de279..0fec067ebb 100755
--- a/mkosi.images/system/mkosi.postinst.chroot
+++ b/mkosi.images/system/mkosi.postinst.chroot
@@ -83,3 +83,12 @@ if [ "$ID" = "centos" ] && [ "$VERSION" = "8" ]; then
alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
alternatives --set python3 /usr/bin/python3.9
fi
+
+mkdir -p /usr/lib/sysusers.d
+cat >/usr/lib/sysusers.d/testuser.conf <<EOF
+u testuser 4711 "Test User" /home/testuser
+EOF
+mkdir -p /usr/lib/tmpfiles.d
+cat >/usr/lib/tmpfiles.d/testuser.conf <<EOF
+q /home/testuser 0700 4711 4711
+EOF