diff --git a/debian/changelog b/debian/changelog index 4ac493a2..1ab81108 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.408.9) UNRELEASED; urgency=medium +livecd-rootfs (2.408.9) xenial; urgency=medium [ Daniel Watkins ] * Don't overwrite the default sources.list in cloud images. @@ -6,7 +6,17 @@ livecd-rootfs (2.408.9) UNRELEASED; urgency=medium an Ubuntu Server installation (i.e. with all components enabled, and all deb-src lines commented). LP: #1513529. - -- Steve Langasek Tue, 21 Mar 2017 08:29:15 -0700 + [ Chris Glass ] + * Fix the manifest generation in OVA files so that ovf files don't have + double extensions. (LP: #1627931) + * Fix the OVF's metadata to include Ubuntu specific identifiers and + descriptions instead of the generic Linux ones. (LP: #1656293) + + [ Daniel Watkins ] + * Add replace_grub_root_with_label function thereby consolidating multiple + uses of the same calls to sed. + + -- Robert C Jennings Fri, 17 Mar 2017 13:15:49 -0500 livecd-rootfs (2.408.8) xenial; urgency=medium diff --git a/live-build/ubuntu-cpc/functions b/live-build/ubuntu-cpc/functions index 576c1a2e..6b2d69a0 100644 --- a/live-build/ubuntu-cpc/functions +++ b/live-build/ubuntu-cpc/functions @@ -249,4 +249,11 @@ convert_to_qcow2() { qemu-img info "$destination" } +replace_grub_root_with_label() { + # When update-grub is run, it will detect the disks in the build system. + # Instead, we want grub to use the cloudimg-rootfs labelled disk + CHROOT_ROOT="$1" + sed -i -e "s,root=[^ ]\+,root=LABEL=cloudimg-rootfs," \ + "$CHROOT_ROOT/boot/grub/grub.cfg" +} diff --git a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary index 8599ea8d..714c1a35 100755 --- a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary @@ -108,7 +108,7 @@ EOF chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober chroot mountpoint update-grub - sed -i "s,root=.* ,root=LABEL=cloudimg-rootfs ,g" mountpoint/boot/grub/grub.cfg + replace_grub_root_with_label mountpoint chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober chroot mountpoint apt-get -y clean diff --git a/live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary b/live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary index d085ba38..d4539594 100755 --- a/live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary +++ b/live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary @@ -51,7 +51,7 @@ EOF chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober chroot mountpoint update-grub - sed -i "s,root=.* ,root=LABEL=cloudimg-rootfs ,g" mountpoint/boot/grub/grub.cfg + replace_grub_root_with_label mountpoint chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober umount_partition mountpoint 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 c48ca75b..cc8ed5d3 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) @@ -67,7 +83,7 @@ ovf_sha256=$(sha256sum ${ovf} | cut -d' ' -f1) manifest="${scratch_d}/${prefix}.mf" cat > "${manifest}" < "${manifest}" < 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)