release/Makefile.vm: Support read-only ports tree

Build qemu (if needed) with WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles
so that we can have a read-only /usr/ports and don't contaminate it.  This
became an issue when I enabled parallel release building, since one image
might be creating its ports.txz file at the same time as we're building
qemu as a prerequisite for building another image.

MFC after:	5 days
This commit is contained in:
Colin Percival 2024-04-11 09:24:59 -07:00
parent eeec7a1199
commit 6f454c211b

View File

@ -76,7 +76,10 @@ ${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../sys/conf/newvers.sh); echo
emulator-portinstall:
.if !exists(/usr/local/bin/qemu-${TARGET_ARCH}-static)
.if exists(${PORTSDIR}/emulators/qemu-user-static/Makefile)
env - UNAME_r=${UNAME_r} PATH=$$PATH make -C ${PORTSDIR}/emulators/qemu-user-static BATCH=1 all install clean
env - UNAME_r=${UNAME_r} PATH=$$PATH \
make -C ${PORTSDIR}/emulators/qemu-user-static \
BATCH=1 WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles \
all install clean
.else
.if !exists(/usr/local/sbin/pkg-static)
env ASSUME_ALWAYS_YES=yes pkg bootstrap -y