diff --git a/AGENTS.md b/AGENTS.md index c336734..c1b044e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -65,7 +65,7 @@ RUN dnf install -y mkosi git-core CMD ["/sbin/init"] END podman run -d --name mkosi --privileged --systemd=always -v :/repo \ - -v mkosi-cache:/root/.cache/mkosi -w /repo mkosi-vm + -v mkosi-cache:/root/.cache/mkosi -v mkosi-work:/var/tmp -w /repo mkosi-vm podman exec mkosi mkosi genkey # Run this once, if there is no mkosi.key. podman exec -d -t mkosi sh -c 'mkosi -f vm > mkosi.output/vm.log 2>&1' podman exec mkosi mkosi ssh -- systemctl --failed @@ -74,6 +74,10 @@ podman exec mkosi mkosi ssh -- systemctl --failed podman resolves paths on the host, so `` is the repository's path there. The volume `mkosi-cache` keeps mkosi's package cache when the container is made again, so builds don't download every package anew. +The volume `mkosi-work` keeps mkosi's workspace in /var/tmp off the +container's overlayfs. mkosi copies a tree with SELinux labels (as files from +the host have) to overlayfs without any xattrs. That drops the file +capabilities of newuidmap and newgidmap, and rootless podman fails in the VM. `mkosi vm` needs a terminal, hence `-d -t`; its console goes to the log. `mkosi ssh` runs a command as root, once the VM has booted. For the user `agent`, run `su - agent -c ''`.