On Thu, 03 Sep 2026 at 16:36:47 +0200, Jochen Sprickerhof wrote:
* Simon McVittie <[email protected]> [2025-02-23 16:19]:
To reproduce, create a minimal testbed:

  mmdebstrap --variant=apt sid | \
  autopkgtest-build-podman --tarball=- --vendor=debian --release=sid

and use it to test a package that does not have the needs-root
restriction:

  autopkgtest hello -- podman localhost/autopkgtest/debian:sid

Note that there is an other solution which is actually what autopkgtest-virt-unshare does: Use useradd --prefix {rootdir} from the outside system to create the user:

https://sources.debian.org/src/autopkgtest/6.0/virt/autopkgtest-virt-unshare#L179

That could be done in setup-testbed, or do I miss anything?

Only if setup-commands/create-normal-user is running in the host, with a monolithic directory tree available somewhere "public" to write into; but that isn't really how podman/Docker work (their directory tree is "private" to the container manager, if it exists as a single monolithic tree on the host filesystem at all). So those backends always run setup-testbed already inside the container, with its root directory as /, as far as I'm aware.

For schroot, unshare, etc. that take an arbitrary directory tree as input, yes, useradd on the host with a non-trivial --prefix argument would probably work fine.

    smcv

Reply via email to