common/chroot-style: clean up bwrap.sh.

--dev-bind isn't necessary in any case it was being used for. We can
also use --ro-bind for /void-packages.

A possible future improvement would be to mount / read only during the
actual build.

Also exec bwrap, as done in the uchroot and uunshare chroot styles. And
update homepage.
This commit is contained in:
Érico Nogueira 2021-11-11 01:29:32 -03:00 committed by Érico Nogueira Rolim
parent b819e84139
commit 6c7c41b120

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# This chroot script uses bubblewrap (see https://github.com/projectatomic/bubblewrap)
# This chroot script uses bubblewrap (see https://github.com/containers/bubblewrap)
#
set -e
readonly MASTERDIR="$1"
@ -18,6 +18,6 @@ if [ -z "$MASTERDIR" -o -z "$DISTDIR" ]; then
exit 1
fi
bwrap --dev-bind "$MASTERDIR" / --dev-bind "$DISTDIR" /void-packages \
exec bwrap --bind "$MASTERDIR" / --ro-bind "$DISTDIR" /void-packages \
--dev /dev --tmpfs /tmp --proc /proc \
${HOSTDIR:+--dev-bind "$HOSTDIR" /host} $EXTRA_ARGS "$@"
${HOSTDIR:+--bind "$HOSTDIR" /host} $EXTRA_ARGS "$@"