aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2014-10-29 16:18:29 +0000
committerGlen Barber <gjb@FreeBSD.org>2014-10-29 16:18:29 +0000
commitf27438c75256f550d9327bf6d3915fc83fd34620 (patch)
treed380677829747f4fb63cf1f36f33e4f0b2732dff
parentd08ce983a7bbe104dfc78c920a86985ae2fd60cc (diff)
downloadsrc-f27438c75256f550d9327bf6d3915fc83fd34620.tar.gz
src-f27438c75256f550d9327bf6d3915fc83fd34620.zip
Avoid hard-coding the Azure image file format.
While here, avoid using OSRELEASE for the output file name. Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/projects/release-vmimage/; revision=273825
-rw-r--r--release/Makefile.vm6
-rwxr-xr-xrelease/amd64/mk-azure.sh2
-rwxr-xr-xrelease/i386/mk-azure.sh2
3 files changed, 6 insertions, 4 deletions
diff --git a/release/Makefile.vm b/release/Makefile.vm
index 82eb7d4ece45..ce7f0eab922c 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -11,7 +11,7 @@ VMSIZE?= 20G
VMBASE?= vm
CLOUDWARE?= AZURE
-AZURE_FORMAT= vhd
+AZURE_FORMAT= vhdf
.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE)
. for _CW in ${CLOUDWARE}
@@ -20,6 +20,7 @@ CLEANDIRS+= vm-${_CW:tl}
CLEANFILES+= ${_CW:tl}.img \
${_CW:tl}.${${_CW:tu}_FORMAT} \
${_CW:tl}.${${_CW:tu}_FORMAT}.raw
+${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT}
. if exists(${.CURDIR}/tools/${_CW:tl}.conf) && !defined(${_CW:tu}CONF)
${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf
. endif
@@ -59,7 +60,8 @@ vm-image: vm-base
vm-azure:
.if exists(${.CURDIR}/${TARGET}/mk-azure.sh)
env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} AZURECONF=${AZURECONF} \
+ AZURE_FORMAT=${AZURE_FORMAT} \
${.CURDIR}/${TARGET}/mk-azure.sh ${.TARGET} azure.img \
- ${WORLDDIR} ${.TARGET} ${VMSIZE} ${OSRELEASE}.vhd
+ ${WORLDDIR} ${.TARGET} ${VMSIZE} ${AZUREIMAGE}
.endif
touch ${.TARGET}
diff --git a/release/amd64/mk-azure.sh b/release/amd64/mk-azure.sh
index 45b70ae73a1d..43c92040ed35 100755
--- a/release/amd64/mk-azure.sh
+++ b/release/amd64/mk-azure.sh
@@ -132,7 +132,7 @@ vm_create_azure() {
echo "Creating image... Please wait."
- mkimg -f vhdf -s gpt \
+ mkimg -f ${AZURE_FORMAT} -s gpt \
-b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \
-p freebsd-swap/swapfs::1G \
-p freebsd-ufs/rootfs:=${VMBASE} \
diff --git a/release/i386/mk-azure.sh b/release/i386/mk-azure.sh
index 45b70ae73a1d..43c92040ed35 100755
--- a/release/i386/mk-azure.sh
+++ b/release/i386/mk-azure.sh
@@ -132,7 +132,7 @@ vm_create_azure() {
echo "Creating image... Please wait."
- mkimg -f vhdf -s gpt \
+ mkimg -f ${AZURE_FORMAT} -s gpt \
-b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \
-p freebsd-swap/swapfs::1G \
-p freebsd-ufs/rootfs:=${VMBASE} \