control: close 1070436
thanks
On Sun, 5 May 2024, 19:10 Jochen Sprickerhof, <
jspricke@debian.org> wrote:
Hi Richard,
* Richard Lewis <richard.lewis.debian@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
<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">control: close 1070436</div><div dir="ltr" class="gmail_attr">thanks</div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">On Sun, 5 May 2024, 19:
10 Jochen Sprickerhof, <<a href="mailto:
jspricke@debian.org">
jspricke@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Richard,<br>
* Richard Lewis <<a href="mailto:
richard.lewis.debian@googlemail.com" target="_blank" rel="noreferrer">
richard.lewis.debian@googlemail.com</a>> [2024-05-05 11:32]:<br>
>If i try and run tests that use 'unshare --net' with a<br> >schroot backend they fail inside autopkgtest even though<br>
>this works in the schroot being used.<br>
><br>
>This works fine in a 'plain schroot' (I expect i allowed<br> >the calling user to run the schroot as root in the schroot<br>
>in /etc/schroot):<br>
><br>
> $ schroot --chroot chroot:unstable-amd64-sbuild --directory / --user root -- unshare --net --map-root-user ls<br>
> bin boot build dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var<br>
I can't reproduce this. Testing in a fresh debvm:<br>
$ debvm-create --size=2G --release=stable -- \<br>
--include=sbuild,schroot,debootstrap,autopkgtest \<br>
--hook-dir=/usr/share/mmdebstrap/hooks/useradd<br>
$ debvm-run<br>
# echo "inside debvm"<br>
# sbuild-createchroot unstable /srv/chroot/unstable-amd64-sbuild \<br>
<a href="
http://deb.debian.org/debian" rel="noreferrer noreferrer" target="_blank">
http://deb.debian.org/debian</a><br>
# sbuild-adduser user<br>
# su - user<br>
$ schroot --chroot chroot:unstable-amd64-sbuild --directory / --user root -- unshare --net --map-root-user ls<br>
unshare: unshare failed: Operation not permitted<br>
Do you have any idea why it works for you?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">im so sorry - this was just a complete user error by me. </div><div dir="auto"><br></div><div dir="auto"> 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. </div><div dir="auto"><br></div><div dir="auto"><br></div><
div dir="auto">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. </div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><
blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Over all I think using unshare --map-root-user in<br></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> autopkgtest-virt-schroot is not supported and I don't think there is a <br> way around that except using a different autopkgtest backend.</blockquote></div></div><div dir="auto"><br></div><div dir="auto">thanks - this is fair enough. </div><div dir="auto"> </div><div dir="auto">thanks for the response. and sorry for the noise</
<div dir="auto"><br></div><div dir="auto"></div></div>
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)