diff -Nru livecd-rootfs-2.525.47/debian/changelog livecd-rootfs-2.525.48/debian/changelog --- livecd-rootfs-2.525.47/debian/changelog 2020-08-12 13:58:19.000000000 +0000 +++ livecd-rootfs-2.525.48/debian/changelog 2020-11-20 21:08:54.000000000 +0000 @@ -1,3 +1,17 @@ +livecd-rootfs (2.525.48) bionic; urgency=medium + + [ John Chittum ] + * Ensure vmtools version entered into vmdk header (LP: #1893898) + + [ Dimitri John Ledkov & Joshua Powers ] + * amd64: always install grub-pc with shim-signed (LP: #1901906), and + ensure to autoremove packages + + [ Patrick Viafore ] + * Increase Vagrant disk size from 10G to 40G (LP: #1580596) + + -- Robert C Jennings Fri, 20 Nov 2020 15:08:54 -0600 + livecd-rootfs (2.525.47) bionic; urgency=medium * Apparently the lxd appliance needs to use a custom track (4.0) and since diff -Nru livecd-rootfs-2.525.47/live-build/auto/config livecd-rootfs-2.525.48/live-build/auto/config --- livecd-rootfs-2.525.47/live-build/auto/config 2020-08-12 13:58:19.000000000 +0000 +++ livecd-rootfs-2.525.48/live-build/auto/config 2020-11-20 21:08:54.000000000 +0000 @@ -654,8 +654,7 @@ add_package install grub-pc ;; amd64) - add_package install grub-pc-bin - add_package install grub-efi-amd64-signed + add_package install grub-pc add_package install shim-signed ;; esac diff -Nru livecd-rootfs-2.525.47/live-build/functions livecd-rootfs-2.525.48/live-build/functions --- livecd-rootfs-2.525.47/live-build/functions 2020-08-12 13:58:19.000000000 +0000 +++ livecd-rootfs-2.525.48/live-build/functions 2020-11-20 21:08:54.000000000 +0000 @@ -206,28 +206,46 @@ # Extract the vmdk header for manipulation dd if="${vmdk_name}" of="${descriptor}" bs=1 skip=512 count=1024 + echo "Cat'ing original vmdk disk descriptor to console for debugging." + # cat header so we are aware of the original descriptor for debugging + cat $descriptor + + # trim null bytes to treat as standard text file + tr -d '\000' < $descriptor > $newdescriptor - # The sed lines below is where the magic is. Specifically: - # ddb.toolsVersion: sets the open-vm-tools so that VMware shows - # the tooling as current - # ddb.virtualHWVersion: set the version to 7, which covers most - # current versions of VMware - # createType: make sure its set to stream Optimized # remove the vmdk-stream-converter comment and replace with # # Disk DescriptorFile. This is needed for Virtualbox # remove the comments from vmdk-stream-converter which causes # VirtualBox and others to fail VMDK validation - - sed -e 's|# Description file.*|# Disk DescriptorFile|' \ + sed -i -e 's|# Description file.*|# Disk DescriptorFile|' \ -e '/# Believe this is random*/d' \ -e '/# Indicates no parent/d' \ -e '/# The Disk Data Base/d' \ - -e 's|ddb.comment.*|ddb.toolsVersion = "2147483647"|' \ - "${descriptor}" > "${newdescriptor}" + ${newdescriptor} + + # add newline to newdescriptor + echo "" >> $newdescriptor + + # add required tools version + echo -n 'ddb.toolsVersion = "2147483647"' >> $newdescriptor + + echo "Cat'ing modified descriptor for debugging." + cat $newdescriptor + + # diff original descriptor and new descriptor for debugging + # diff exits 1 if difference. pipefail not set so piping diff + # to cat prints diff and swallows exit 1 + echo "Printing diff of original and new descriptors." + diff --text $descriptor $newdescriptor | cat + + # The header must be 1024 or less before padding + if ! expr $(stat --format=%s ${newdescriptor}) \< 1025 > /dev/null 2>&1; then + echo "descriptor is too large, VMDK will be invalid!"; + exit 1 + fi - # The header is cannot be bigger than 1024 - expr $(stat --format=%s ${newdescriptor}) \< 1024 > /dev/null 2>&1 || { - echo "descriptor is too large, VMDK will be invalid!"; exit 1; } + # reset newdescriptor to be 1024 + truncate --no-create --size=1K $newdescriptor # Overwrite the vmdk header with our new, modified one dd conv=notrunc,nocreat \ diff -Nru livecd-rootfs-2.525.47/live-build/ubuntu/hooks/033-disk-image-uefi.binary livecd-rootfs-2.525.48/live-build/ubuntu/hooks/033-disk-image-uefi.binary --- livecd-rootfs-2.525.47/live-build/ubuntu/hooks/033-disk-image-uefi.binary 2020-08-12 13:58:19.000000000 +0000 +++ livecd-rootfs-2.525.48/live-build/ubuntu/hooks/033-disk-image-uefi.binary 2020-11-20 21:08:54.000000000 +0000 @@ -97,11 +97,13 @@ efi_target=arm-efi ;; amd64) - chroot mountpoint apt-get install -qqy grub-efi-amd64-signed grub-efi-amd64 shim-signed + chroot mountpoint apt-get install -qqy grub-pc shim-signed efi_target=x86_64-efi ;; esac + chroot mountpoint apt-get autoremove --purge --assume-yes + # This call to populate the package manifest is added here to capture # grub-efi packages that otherwise would not make it into the base # manifest. filesystem.packages is moved into place via symlinking to diff -Nru livecd-rootfs-2.525.47/live-build/ubuntu-cpc/hooks.d/base/disk-image.binary livecd-rootfs-2.525.48/live-build/ubuntu-cpc/hooks.d/base/disk-image.binary --- livecd-rootfs-2.525.47/live-build/ubuntu-cpc/hooks.d/base/disk-image.binary 2020-08-12 13:58:19.000000000 +0000 +++ livecd-rootfs-2.525.48/live-build/ubuntu-cpc/hooks.d/base/disk-image.binary 2020-11-20 21:08:54.000000000 +0000 @@ -136,6 +136,7 @@ if [ "$ARCH" = "s390x" ]; then # Do ZIPL install bits chroot mountpoint apt-get -qqy install s390-tools sysconfig-hardware + chroot mountpoint apt-get autoremove --purge --assume-yes # Write out cloudy zipl.conf for future kernel updates cat << EOF > mountpoint/etc/zipl.conf diff -Nru livecd-rootfs-2.525.47/live-build/ubuntu-cpc/hooks.d/base/disk-image-ppc64el.binary livecd-rootfs-2.525.48/live-build/ubuntu-cpc/hooks.d/base/disk-image-ppc64el.binary --- livecd-rootfs-2.525.47/live-build/ubuntu-cpc/hooks.d/base/disk-image-ppc64el.binary 2020-08-12 13:58:19.000000000 +0000 +++ livecd-rootfs-2.525.48/live-build/ubuntu-cpc/hooks.d/base/disk-image-ppc64el.binary 2020-11-20 21:08:54.000000000 +0000 @@ -33,6 +33,7 @@ chroot mountpoint apt-get -qqy update chroot mountpoint apt-get -qqy install grub-ieee1275 chroot mountpoint apt-get -qqy remove --purge grub-legacy-ec2 + chroot mountpoint apt-get autoremove --purge --assume-yes # set the kernel commandline to use hvc0 mkdir -p mountpoint/etc/default/grub.d diff -Nru livecd-rootfs-2.525.47/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary livecd-rootfs-2.525.48/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary --- livecd-rootfs-2.525.47/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary 2020-08-12 13:58:19.000000000 +0000 +++ livecd-rootfs-2.525.48/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary 2020-11-20 21:08:54.000000000 +0000 @@ -97,11 +97,13 @@ efi_target=arm-efi ;; amd64) - chroot mountpoint apt-get install -qqy grub-efi-amd64-signed grub-efi-amd64 shim-signed + chroot mountpoint apt-get install -qqy grub-pc shim-signed efi_target=x86_64-efi ;; esac + chroot mountpoint apt-get autoremove --purge --assume-yes + # This call to populate the package manifest is added here to capture # grub-efi packages that otherwise would not make it into the base # manifest. filesystem.packages is moved into place via symlinking to diff -Nru livecd-rootfs-2.525.47/live-build/ubuntu-cpc/hooks.d/base/vagrant.binary livecd-rootfs-2.525.48/live-build/ubuntu-cpc/hooks.d/base/vagrant.binary --- livecd-rootfs-2.525.47/live-build/ubuntu-cpc/hooks.d/base/vagrant.binary 2020-08-12 13:58:19.000000000 +0000 +++ livecd-rootfs-2.525.48/live-build/ubuntu-cpc/hooks.d/base/vagrant.binary 2020-11-20 21:08:54.000000000 +0000 @@ -97,7 +97,7 @@ # Get the VMDK in place prefix="${distro}-${suite}-${version}-cloudimg" vmdk_f="${box_d}/${prefix}.vmdk" -create_vmdk ${derivative_img} ${vmdk_f} +create_vmdk ${derivative_img} ${vmdk_f} 40960 #################################### # Create the ConfigDrive diff -Nru livecd-rootfs-2.525.47/live-build/ubuntu-cpc/hooks.d/base/wsl-gz.binary livecd-rootfs-2.525.48/live-build/ubuntu-cpc/hooks.d/base/wsl-gz.binary --- livecd-rootfs-2.525.47/live-build/ubuntu-cpc/hooks.d/base/wsl-gz.binary 2020-08-12 13:58:19.000000000 +0000 +++ livecd-rootfs-2.525.48/live-build/ubuntu-cpc/hooks.d/base/wsl-gz.binary 2020-11-20 21:08:54.000000000 +0000 @@ -35,6 +35,7 @@ setup_mountpoint $rootfs_dir env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get -y -qq install ubuntu-wsl +env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get autoremove --purge --assume-yes create_manifest $rootfs_dir livecd.ubuntu-cpc.wsl.rootfs.manifest teardown_mountpoint $rootfs_dir