xbps-src: remove proot chroot-style

proot is broken and result in random hard to debug issues,
this is the best way to not have new users use it.
This commit is contained in:
Duncaen 2020-11-07 22:50:11 +01:00 committed by Michael Aldridge
parent bf397c1372
commit 3eed75216c
5 changed files with 4 additions and 50 deletions

View file

@ -1,30 +0,0 @@
#!/bin/sh
#
# This chroot script uses proot (see http://proot.me)
#
readonly MASTERDIR="$1"
readonly DISTDIR="$2"
readonly HOSTDIR="$3"
readonly EXTRA_ARGS="$4"
shift 4
if ! command -v proot >/dev/null 2>&1; then
exit 1
fi
if [ -z "$MASTERDIR" -o -z "$DISTDIR" ]; then
echo "$0 MASTERDIR/DISTDIR not set"
exit 1
fi
# proot does not properly return the resultcode. Workaround this
RESULT=$(mktemp) || exit 1
PROOT_NO_SECCOMP=1 proot -r $MASTERDIR -w / -b "$RESULT:/.result" -b $DISTDIR:/void-packages \
${HOSTDIR:+-b $HOSTDIR:/host} -b /proc:/proc -b /dev:/dev \
-b /sys:/sys $EXTRA_ARGS /bin/sh -c '$@; echo $? > /.result' $0 $@
rv=$(cat "$RESULT")
rm "$RESULT"
exit $rv