Make cloudsetup version overrideable

This is useful for applying hotfixes before the updated port lands in
FreeBSD ports.
This commit is contained in:
Jørn Åne de Jong 2022-05-29 16:29:43 +02:00 committed by Nico Schottelius
parent d3369d321a
commit a4daf87a34
1 changed files with 10 additions and 0 deletions

View File

@ -15,6 +15,10 @@ IMAGE_PATH_ZFS="freebsd-zfs-$RELEASE-$(date -I).img.qcow2"
IMAGE_PATH_UFS="freebsd-ufs-$RELEASE-$(date -I).img.qcow2"
IMAGE_SIZE=10G
# Comment out to simply use latest version
# Hash checking is disabled when specifying this
CLOUDSETUP_VERSION=1.1
DIST_BASE="https://download.freebsd.org/ftp/releases/$ARCH/$RELEASE"
ZPOOL=zroot
ZPOOL_TMP="zinstalling"
@ -63,6 +67,12 @@ then
else
portsnap extract
fi
if [ -n "$CLOUDSETUP_VERSION" ]
then
sed -i .bak -e '/^PORTVERSION=/ s/[0-9]*\.[0-9]*/'"$CLOUDSETUP_VERSION/" /usr/ports/sysutils/firstboot-cloudsetup/Makefile
make -C /usr/ports/sysutils/firstboot-cloudsetup makesum
fi
make -C /usr/ports/sysutils/firstboot-cloudsetup clean package
CLOUDSETUP_VERSION="$(fgrep VERSION /usr/ports/sysutils/firstboot-cloudsetup/Makefile | cut -f2- | tr -d \\t)"
CLOUDSETUP_PKG="/usr/ports/sysutils/firstboot-cloudsetup/work/pkg/firstboot-cloudsetup-${CLOUDSETUP_VERSION}.pkg"