diff --git a/live-build/ubuntu-cpc/hooks/041-vmdk-ova-image.binary b/live-build/ubuntu-cpc/hooks/041-vmdk-ova-image.binary index 3b50a268..60716f3c 100755 --- a/live-build/ubuntu-cpc/hooks/041-vmdk-ova-image.binary +++ b/live-build/ubuntu-cpc/hooks/041-vmdk-ova-image.binary @@ -9,11 +9,24 @@ # # For this step, we re-use the VMDK's made in 040-vmdk-image.binary + +# Switch on $ARCH to determine which ID and description to use in the produced +# OVF. We have fancy Ubuntu-specific IDs in the OVF specification, we might as +# well use them. case $ARCH in - amd64|i386) ;; - *) echo "OVA images are not supported for $ARCH yet."; - exit 0;; + amd64) + ovf_id=94 + ovf_os_type="ubuntu64Guest" + ovf_desc_bits=64 ;; + i386) + ovf_id=93 + ovf_os_type="ubuntu32Guest" + ovf_desc_bits=32 ;; + *) + echo "OVA images are not supported for $ARCH yet."; + exit 0;; esac + cur_d=${PWD} my_d=$(dirname $(readlink -f ${0})) @@ -57,7 +70,10 @@ sed -i "${ovf}" \ -e "s/@@NUM_CPUS@@/2/g" \ -e "s/@@VERSION@@/${version}/g" \ -e "s/@@DATE@@/${serial_stamp}/g" \ - -e "s/@@MEM_SIZE@@/1024/g" + -e "s/@@MEM_SIZE@@/1024/g" \ + -e "s/@@OVF_ID@@/${ovf_id}/g" \ + -e "s/@@OVF_OS_TYPE@@/${ovf_os_type}/g" \ + -e "s/@@OVF_DESC_BITS@@/${ovf_desc_bits}/g" # Get the checksums vmdk_sha256=$(sha256sum ${vmdk_f} | cut -d' ' -f1) diff --git a/live-build/ubuntu-cpc/hooks/042-vagrant.binary b/live-build/ubuntu-cpc/hooks/042-vagrant.binary index aa524a09..0471248d 100755 --- a/live-build/ubuntu-cpc/hooks/042-vagrant.binary +++ b/live-build/ubuntu-cpc/hooks/042-vagrant.binary @@ -18,11 +18,21 @@ cur_d=${PWD} my_d=$(dirname $(readlink -f ${0})) +# Switch on $ARCH to determine which ID and description to use in the produced +# OVF. We have fancy Ubuntu-specific IDs in the OVF specification, we might as +# well use them. case $ARCH in - amd64|i386) ;; - *) - echo "Vagrant images are not supported for $ARCH" - exit 0 + amd64) + ovf_id=94 + ovf_os_type="ubuntu64Guest" + ovf_desc_bits=64 ;; + i386) + ovf_id=93 + ovf_os_type="ubuntu32Guest" + ovf_desc_bits=32 ;; + *) + echo "Vagrant images are not supported for $ARCH yet." + exit 0;; esac . /build/config/functions @@ -172,7 +182,10 @@ sed -i "${ovf}" \ -e "s/@@NUM_CPUS@@/2/g" \ -e "s/@@VERSION@@/${version}/g" \ -e "s/@@DATE@@/${serial_stamp}/g" \ - -e "s/@@MEM_SIZE@@/1024/g" + -e "s/@@MEM_SIZE@@/1024/g" \ + -e "s/@@OVF_ID@@/${ovf_id}/g" \ + -e "s/@@OVF_OS_TYPE@@/${ovf_os_type}/g" \ + -e "s/@@OVF_DESC_BITS@@/${ovf_desc_bits}/g" ovf_sha256=$(sha256sum ${ovf} | cut -d' ' -f1) diff --git a/live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-cloudcfg-vmdk.tmpl b/live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-cloudcfg-vmdk.tmpl index f91b75b2..f2975610 100644 --- a/live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-cloudcfg-vmdk.tmpl +++ b/live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-cloudcfg-vmdk.tmpl @@ -18,8 +18,9 @@ A virtual machine @@NAME@@ - + The kind of installed guest operating system + Ubuntu Linux (@@OVF_DESC_BITS@@-bit) diff --git a/live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-vmdk.tmpl b/live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-vmdk.tmpl index 0eaa85a4..7f0b85e0 100644 --- a/live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-vmdk.tmpl +++ b/live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-vmdk.tmpl @@ -16,8 +16,9 @@ A virtual machine @@NAME@@ - + The kind of installed guest operating system + Ubuntu Linux (@@OVF_DESC_BITS@@-bit)