control: close 1070436 thanks On Sun, 5 May 2024, 19:10 Jochen Sprickerhof, <jspri...@debian.org> wrote:
> Hi Richard, > > * Richard Lewis <richard.lewis.deb...@googlemail.com> [2024-05-05 11:32]: > >If i try and run tests that use 'unshare --net' with a > >schroot backend they fail inside autopkgtest even though > >this works in the schroot being used. > > > >This works fine in a 'plain schroot' (I expect i allowed > >the calling user to run the schroot as root in the schroot > >in /etc/schroot): > > > > $ schroot --chroot chroot:unstable-amd64-sbuild --directory / --user > root -- unshare --net --map-root-user ls > > bin boot build dev etc home lib lib64 media mnt opt proc > root run sbin srv sys tmp usr var > > I can't reproduce this. Testing in a fresh debvm: > > $ debvm-create --size=2G --release=stable -- \ > --include=sbuild,schroot,debootstrap,autopkgtest \ > --hook-dir=/usr/share/mmdebstrap/hooks/useradd > $ debvm-run > # echo "inside debvm" > # sbuild-createchroot unstable /srv/chroot/unstable-amd64-sbuild \ > http://deb.debian.org/debian > # sbuild-adduser user > # su - user > $ schroot --chroot chroot:unstable-amd64-sbuild --directory / --user root > -- unshare --net --map-root-user ls > unshare: unshare failed: Operation not permitted > > Do you have any idea why it works for you? > im so sorry - this was just a complete user error by me. the issue is the --map-root-user, i thought absolutely sure i was using that with plain schroot, but it turns out i was completely misreading what i was running, and apparently copied the command and output from separate places. as you say, if i omit map-root-user then it works with both schroot and autopkgtest. and if i include map-root-user then both fail. Over all I think using unshare --map-root-user in > autopkgtest-virt-schroot is not supported and I don't think there is a > way around that except using a different autopkgtest backend. thanks - this is fair enough. thanks for the response. and sorry for the noise