aboutsummaryrefslogtreecommitdiff
path: root/release/Makefile.vm
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2015-02-24 21:06:25 +0000
committerGlen Barber <gjb@FreeBSD.org>2015-02-24 21:06:25 +0000
commit0e44fa6c1c240deed948cbefb196253bddd2b35d (patch)
tree189349367f5e298f327492c17b5cc86e35c0973f /release/Makefile.vm
parent5dd72ff56176869603974608700d55b5f4cdfb46 (diff)
downloadsrc-0e44fa6c1c240deed948cbefb196253bddd2b35d.tar.gz
src-0e44fa6c1c240deed948cbefb196253bddd2b35d.zip
Add 'cloudware-install' target to handle copying cloud
disk images to a directory within DESTDIR. Add CLOUDINSTALL variable to automatically generate the actual list of install targets. While here, rename the cloud-specific names from 'vm-' to 'cw-' to avoid naming collisions. Add AZURE_DISK, GCE_DISK, and OPENSTACK_DISK output file variables. Add 'cloudware-install' to the 'install' target. MFC after: 1 week Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=279249
Diffstat (limited to 'release/Makefile.vm')
-rw-r--r--release/Makefile.vm25
1 files changed, 22 insertions, 3 deletions
diff --git a/release/Makefile.vm b/release/Makefile.vm
index 50365f579eb3..9f632ebfc31d 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -20,24 +20,28 @@ CLOUDWARE?= AZURE \
OPENSTACK
AZURE_FORMAT= vhdf
AZURE_DESC= Microsoft Azure platform image
+AZURE_DISK= ${OSRELEASE}.${AZURE_FORMAT}
GCE_FORMAT= raw
GCE_DESC= Google Compute Engine image
+GCE_DISK= disk.${GCE_FORMAT}
OPENSTACK_FORMAT=qcow2
OPENSTACK_DESC= OpenStack platform image
+OPENSTACK_DISK= ${OSRELEASE}.${OPENSTACK_FORMAT}
.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE)
. for _CW in ${CLOUDWARE}
-CLOUDTARGETS+= vm-${_CW:tl}
-CLEANDIRS+= vm-${_CW:tl}
+CLOUDTARGETS+= cw-${_CW:tl}
+CLEANDIRS+= cw-${_CW:tl}
CLEANFILES+= ${_CW:tl}.img \
${_CW:tl}.${${_CW:tu}_FORMAT} \
${_CW:tl}.${${_CW:tu}_FORMAT}.raw
+CLOUDINSTALL+= cw${_CW:tl}-install
${_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
-vm-${_CW:tl}:
+cw-${_CW:tl}:
mkdir -p ${.OBJDIR}/${.TARGET}
env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
${.CURDIR}/scripts/mk-vmimage.sh \
@@ -45,6 +49,16 @@ vm-${_CW:tl}:
-i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW}_FORMAT} \
-S ${WORLDDIR} -o ${.OBJDIR}/${${_CW}IMAGE} -c ${${_CW}CONF}
touch ${.TARGET}
+
+cw${_CW:tl}-install:
+ mkdir -p ${DESTDIR}/${_CW:tl}
+ cp -p ${${_CW}IMAGE} \
+ ${DESTDIR}/${_CW:tl}/${${_CW}_DISK}
+ cd ${DESTDIR}/${_CW:tl} && sha256 ${${_CW}_DISK}* > \
+ ${DESTDIR}/${_CW:tl}/CHECKSUM.SHA256
+ cd ${DESTDIR}/${_CW:tl} && md5 ${${_CW}_DISK}* > \
+ ${DESTDIR}/${_CW:tl}/CHECKSUM.MD5
+
. endfor
.endif
@@ -119,3 +133,8 @@ cloudware-release:
.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE)
${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${CLOUDTARGETS}
.endif
+
+cloudware-install:
+.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE)
+ ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${CLOUDINSTALL}
+.endif