release: Support r/o /usr/ports for cloudware

Set WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles when building tools
needed for uploading cloudware images.

While I'm here, adjust the bsdec2-image-upload build target to match
the style used by the Azure/GCE/Vagrant Makefiles.

MFC after:	3 days
This commit is contained in:
Colin Percival 2024-04-12 10:20:25 -07:00
parent 4336161cc9
commit 6c87aed39c
4 changed files with 22 additions and 10 deletions

View File

@ -37,7 +37,9 @@ azure-check-depends:
. endif
env ASSUME_ALWAYS_YES=yes pkg install -y sysutils/py-azure-cli
. else
env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/sysutils/py-azure-cli BATCH=1 all install clean
env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/sysutils/py-azure-cli \
BATCH=1 WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles \
all install clean
. endif
.endif

View File

@ -40,13 +40,17 @@ CW_EC2_PORTINSTALL=
.endif
cw-ec2-portinstall:
.if exists(${PORTSDIR}/net/bsdec2-image-upload/Makefile)
env - UNAME_r=${UNAME_r} PATH=$$PATH make -C ${PORTSDIR}/net/bsdec2-image-upload BATCH=1 all install clean
.else
. if !exists(/usr/local/sbin/pkg-static)
env ASSUME_ALWAYS_YES=yes pkg bootstrap -y
. endif
.if !exists(/usr/local/bin/bsdec2-image-upload)
. if !exists(${PORTSDIR}/net/bsdec2-image-upload/Makefile)
. if !exists(/usr/local/sbin/pkg-static)
env ASSUME_ALWAYS_YES=yes pkg bootstrap -yf
. endif
env ASSUME_ALWAYS_YES=yes pkg install -y net/bsdec2-image-upload
. else
env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/net/bsdec2-image-upload \
BATCH=1 WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles \
all install clean
. endif
.endif
@touch ${.TARGET}

View File

@ -43,8 +43,12 @@ gce-check-depends:
env ASSUME_ALWAYS_YES=yes pkg install -y net/google-cloud-sdk \
lang/python
. else
env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/net/google-cloud-sdk BATCH=1 all install clean
env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/lang/python BATCH=1 all install clean
env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/net/google-cloud-sdk \
BATCH=1 WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles \
all install clean
env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/lang/python \
BATCH=1 WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles \
all install clean
. endif
.endif

View File

@ -57,7 +57,9 @@ vagrant-check-depends:
. endif
env ASSUME_ALWAYS_YES=yes pkg install -y curl
. else
env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/ftp/curl BATCH=1 all install clean
env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/ftp/curl \
BATCH=1 WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles \
all install clean
. endif
.endif