On 25/06/24 18:55, Helmut Grohne wrote:
For systemd-as-pid-1 specifically,
`autopkgtest-build-podman --init=systemd` and
`autopkgtest-virt-podman --init` demonstrate how this can be done, and
last time I tried, it was possible to run them unprivileged (other than
needing access to the setuid newuidmap, as above). systemd is able to
detect that it's running in a container and turn off functionality like
udev that would only be appropriate in a VM or on bare metal, and podman
knows how to tell systemd that it should do this.
This is very cool. Running autopkgtests in system containers without
being root (or incus-admin) very much is what I'd like to do. And it's
much better if I don't have to write my own container framework for
doing it. I couldn't get it to work locally yet (facing non-obvious
error messages).
Would someone be able to document (mail/wiki/blog/...) how to set up and
use podman for running autopkgtests.
I'd like to take this chance to suggest, instead of writing more
documentation, changing the autopkgtest packaging so that it is split
into various per-backend packages, each of which provides a ready-to-go
pre-configured environment. See <https://bugs.debian.org/1039958#22>.
Currently, in order to get a working autopkgtest + podman setup, one has to:
1) install autopkgtest
2) install podman
3) install a non-clearly-defined set of additional packages (including,
surprisingly, dbus-user-session)
4) change various configuration files
5) learn how to use autopkgtest-build-podman
5a) BONUS: realize that, instead, you'd like use mmdebstrap to create
the base images, but mmdebstrap-autopkgtest-build-podman does not exit.
6) learn how to properly invoke autopkgtest $dir -- podman
It would be great if the user experience on a freshly installed system
were instead more like:
$ apt install autopkgtest-podman
$ autopkgtest $dir
$ # done
I believe achieving this right now is just a matter of better packaging.
(Plus some improvements to deal with the few packages whose test have
non ordinary and taxing requirements.)
Regards,
--
Gioele Barabucci