forked from josch/mmdebstrap
tests/as-debootstrap-unshare-wrapper: bind-mount /proc to work around #1031222
This commit is contained in:
parent
b3810b0fcd
commit
02769190ad
1 changed files with 7 additions and 0 deletions
|
@ -35,8 +35,15 @@ if [ -n "$AUTOPROXY" ] && [ -x "$AUTOPROXY" ] && [ -e /tmp/.auto-apt-proxy-0 ];
|
||||||
chmod 644 "$TMP_APT_CONFIG"
|
chmod 644 "$TMP_APT_CONFIG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# debootstrap runs mount -t proc proc /proc which doesn't work in an unshared
|
||||||
|
# namespace on privileged docker (like salsaci), so mount /proc manually
|
||||||
|
# https://bugs.debian.org/1031222
|
||||||
|
# https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/91
|
||||||
$prefix {{ CMD }} --variant=custom --mode={{ MODE }} \
|
$prefix {{ CMD }} --variant=custom --mode={{ MODE }} \
|
||||||
--setup-hook='env '"${AUTOPROXY:+APT_CONFIG='$TMP_APT_CONFIG'}"' container=lxc debootstrap --variant={{ VARIANT }} unstable "$1" {{ MIRROR }}' \
|
--setup-hook='env '"${AUTOPROXY:+APT_CONFIG='$TMP_APT_CONFIG'}"' container=lxc debootstrap --variant={{ VARIANT }} unstable "$1" {{ MIRROR }}' \
|
||||||
|
--setup-hook='mount -o rbind /proc "$1/proc"' \
|
||||||
|
--setup-hook='chroot "$1" dpkg-reconfigure systemd || true' \
|
||||||
|
--setup-hook='umount --lazy "$1/proc"' \
|
||||||
- /tmp/debian-mm.tar {{ MIRROR }}
|
- /tmp/debian-mm.tar {{ MIRROR }}
|
||||||
if [ -n "$AUTOPROXY" ] && [ -x "$AUTOPROXY" ] && [ -e /tmp/.auto-apt-proxy-0 ]; then
|
if [ -n "$AUTOPROXY" ] && [ -x "$AUTOPROXY" ] && [ -e /tmp/.auto-apt-proxy-0 ]; then
|
||||||
rm "$TMP_APT_CONFIG"
|
rm "$TMP_APT_CONFIG"
|
||||||
|
|
Loading…
Reference in a new issue