1
0
mirror of https://github.com/systemd/systemd synced 2024-07-09 04:26:06 +00:00

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
This commit is contained in:
Richard Maw 2023-11-27 17:50:49 +00:00
parent eae7ce2d61
commit 0947748555
2 changed files with 10 additions and 0 deletions

View File

@ -33,6 +33,7 @@ Packages=
strace
systemd
tmux
tar
tree
udev
util-linux

View File

@ -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