diff options
author | Colin Percival <cperciva@FreeBSD.org> | 2023-09-09 00:51:08 +0000 |
---|---|---|
committer | Colin Percival <cperciva@FreeBSD.org> | 2023-10-03 17:28:17 +0000 |
commit | fec4f6a7c377f576c78dabe16bc632ecf20058b4 (patch) | |
tree | 7c2d417b337b6688f9fe57991f7387975c218347 | |
parent | b9013d75c8531e1eaa993321a22eb7714af10f68 (diff) | |
download | src-fec4f6a7c377f576c78dabe16bc632ecf20058b4.tar.gz src-fec4f6a7c377f576c78dabe16bc632ecf20058b4.zip |
release/Makefile.vm: Add support for CW flavours
There are two "Vagrant" images right now: "Vagrant Image for VirtualBox"
and "Vagrant Image for VMWare". Rather than listing these separately in
a CLOUDWARE list, place "VAGRANT" into a CLOUDWARE_TYPES list and then
use a VAGRANT_FLAVOURS variable to identify the two versions. Add make
logic to allow defaults (in this case, image format and filesystem) to
be specified once for VAGRANT and inherited by both flavours.
This will make future work to add flavoured EC2 images simpler.
releng/14.0 candidate.
Discussed with: gjb
Reviewed by: imp
MFC after: 5 days
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D41790
(cherry picked from commit e6eeac9b71795252b12a6b94e7a06633a9ff6e4e)
-rw-r--r-- | release/Makefile.vm | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/release/Makefile.vm b/release/Makefile.vm index 4041ae14e2f3..e7ff86c28df3 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -17,12 +17,11 @@ VMDK_DESC= VMWare, VirtualBox disk image QCOW2_DESC= Qemu, KVM disk image RAW_DESC= Unformatted raw disk image -CLOUDWARE?= BASIC-CI \ +CLOUDWARE_TYPES?= BASIC-CI \ EC2 \ GCE \ OCI \ - VAGRANT-VIRTUALBOX \ - VAGRANT-VMWARE + VAGRANT AZURE_FORMAT= vhdf AZURE_FSLIST= ufs AZURE_DESC= Microsoft Azure platform image @@ -41,13 +40,26 @@ OCI_DESC= Oracle Cloud Infrastructure image OPENSTACK_FORMAT=qcow2 OPENSTACK_FSLIST= ufs OPENSTACK_DESC= OpenStack platform image -VAGRANT-VIRTUALBOX_FORMAT= vmdk -VAGRANT-VIRTUALBOX_FSLIST= ufs +VAGRANT_FORMAT= vmdk +VAGRANT_FSLIST= ufs +VAGRANT_FLAVOURS= VIRTUALBOX VMWARE VAGRANT-VIRTUALBOX_DESC= Vagrant Image for VirtualBox -VAGRANT-VMWARE_FORMAT= vmdk -VAGRANT-VMWARE_FSLIST= ufs VAGRANT-VMWARE_DESC= Vagrant Image for VMWare +.for _CWT in ${CLOUDWARE_TYPES} +. if defined(${_CWT}_FLAVOURS) +. for _CWF in ${${_CWT}_FLAVOURS} +CLOUDWARE_GEN+= ${_CWT}-${_CWF} +${_CWT}-${_CWF}_FORMAT?= ${${_CWT}_FORMAT} +${_CWT}-${_CWF}_FSLIST?= ${${_CWT}_FSLIST} +${_CWT}-${_CWF}_DESC?= ${${_CWT}_DESC} +. endfor +. else +CLOUDWARE_GEN+= ${_CWT} +. endif +.endfor +CLOUDWARE?= ${CLOUDWARE_GEN} + .for _V in TYPE BRANCH REVISION . if !defined(${_V}) || empty(${_V}) ${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../sys/conf/newvers.sh); echo $$${_V} |