debian/tests/control: run debootstrap with unshared namespaces
Thank you for merging !91 (merged) which fixed the problem described in bug #1031222 where systemd-tmpfiles
exited early because /proc
wasn't mounted. Mounting /proc
using mount -o rbind /proc "$TARGET/proc"
as implemented as part of !91 (merged) indeed fixes this problem but it creates another problem. When that code path is taken (for example when running autopkgtest on salsaci) /proc
will not get unmounted after debootstrap finished. To fix this for good I extended the debootstrap autopkgtest to also test running debootstrap in an unshared user namespace.
The reason I'm marking this MR as "Draft" is that I'm not happy with using umount --lazy
as the solution to the problem. I much rather would use umount --recursive
but that fails with
umount: [...]/proc/sys/net: not mounted
Even if /proc
is bind-mounted with rslave
as a mount option. If on the other hand one mounts /proc
with bind
instead of using rbind
then unmounting is no problem but as the added autopkgtest shows, mounting /proc
that way will still let systemd-tmpfiles
exit early without creating its files.
Does anybody have a better idea or is umounting with --lazy
the way to go?