livecd-rootfs/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary
Steve Langasek 4109c1c2b3 Import patches-unapplied version 2.419 to ubuntu/yakkety-proposed
Imported using git-ubuntu import.

Changelog parent: eb0cb09a8d5c77853e7f9cba2b79270e12dc6a59

New changelog entries:
  [ Daniel Watkins ]
  * Consolidate cloud images
    - Remove .tar.gz and .tar.xz (removed in favour of the squashfs).
    - Remove the MBR-only disk image in favour of the shared GPT/MBR UEFI
      image.
    - Remove '-disk1' from bootable image names.
  [ Phil Roche ]
  * Removed HWCLOCKACCESS=no from /etc/default/rcS (LP: #1581044)
2016-06-28 23:54:13 +00:00

22 lines
597 B
Bash
Executable File

#!/bin/bash -ex
case $ARCH:$SUBARCH in
# Not sure if any other cloud images use subarch for something that
# should take qcow2 format, so only skipping this on raspi2 for now.
armhf:raspi2)
apt-get install -qqy pxz
pxz -T4 -c binary/boot/disk.ext4 > livecd.ubuntu-cpc.disk1.img.xz
exit 0
;;
esac
apt-get install -qqy qemu-utils
. /build/config/functions
if [ -f binary/boot/disk-uefi.ext4 ]; then
convert_to_qcow2 binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.img
elif [ -f binary/boot/disk.ext4 ]; then
convert_to_qcow2 binary/boot/disk.ext4 livecd.ubuntu-cpc.img
fi