livecd-rootfs/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary
Steve Langasek eeac687884 Import patches-unapplied version 2.408.13 to ubuntu/xenial-proposed
Imported using git-ubuntu import.

Changelog parent: eea56e02ae121482387ddc2206bc27de53f2627c

New changelog entries:
  [ Balint Reczey ]
  * Source ubuntu-cpc functions from the right place
  * Use all config hooks from the proper place, not from /build/
  * Add basic but configurable autopkgtest (LP: #1690440)
  * sync before calling kpartx to let writing to loop devices finish
  * wrap kpartx and trap spurious errors, to work around kpartx
    unreliability.
2017-06-13 13:58:45 +00:00

24 lines
604 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
. config/functions
if [ -f binary/boot/disk.ext4 ]; then
convert_to_qcow2 binary/boot/disk.ext4 livecd.ubuntu-cpc.disk1.img
fi
if [ -f binary/boot/disk-uefi.ext4 ]; then
convert_to_qcow2 binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.uefi1.img
fi