8 Commits

Author SHA1 Message Date
Robert C Jennings
f0b2591de5 ubuntu-cpc: apt sources.list fixes, OVA manifest fixes
[ Daniel Watkins ]
  * Don't overwrite the default sources.list in cloud images.
  * Replace sources.list generated using COMPONENTS with the sources.list from
    an Ubuntu Server installation (i.e. with all components enabled, and all
    deb-src lines commented).  LP: #1513529.
  [ 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 ]
  * ubuntu-cpc: Remove redundant copy of grub files. (LP: #1637290)
2017-05-25 20:35:31 -05:00
Robert C Jennings
742985bb4d Clean/refactor to add raspi2, plus ubuntu-cpc fixes
[ Steve Langasek ]
  * Add hooks to ubuntu-cpc to divert /bin/sync in the chroot and undivert it
    at the end.  This is a general-purpose change that should be applied to
    all flavors and archs, but at the moment it's only needed on armhf+raspi2
    to work around the raspberrypi2-firmware postinst calling sync, which is
    actually warranted in the normal case.
  * If a subarch is specified for a cloud image build, don't build rootfs
    artifacts; these should come from the 'generic' build.
  * Fix architecture handling in hooks.  We know we're always being invoked
    from a launchpad-buildd-like setup, which passes ARCH and SUBARCH in the
    environment, because auto/config and auto/build both rely on this.  So
    don't scatter dpkg --print-architecture calls throughout, especially
    when many of these are not cross-build-aware.
  * Refactor ubuntu-cpc hooks to allow us to handle images where the root
    partition should not be partition 1.

  [ Ben Howard ]
  * ubuntu-cpc: fix hooks/032-disk-image.binary call to
    create_empty_partition, which requires five args due to "-u"
  * ubuntu-cpc: in hooks/030-root-tarball.binary create /lib/modules to fix
    (LP: 1543204).

  [ Steve Langasek ]
  * Refactor ubuntu-cpc hooks to always produce a 'plain' rootfs via
    live-build and reuse this for the tarball, instead of lb_binary_rootfs
    creating some artifact that we ignore / throw away.
  * Initial support for raspi2 subarch.
  * Import live-build/ubuntu-cpc/hooks/raspi2/mkknlimg from
    https://github.com/raspberrypi/linux/blob/rpi-4.1.y/scripts/mkknlimg
    and use it to install a bootable uboot.bin.
2017-05-25 20:35:26 -05:00
Robert C Jennings
4a65c41a5e ubuntu-cpc: Mask blkid failure in mount_image
On trusty parted does not create the FS based on the type passed to it.
As a result, calling mount_image for a newly created image will not have
an FS on the root partition.  Calling blkid in mount_image to provide
additional debug output will fail when the root partition has no FS.
The root FS is created after mount_image is called in the hook that
creates the base.ext4 image.  We can ignore the blkid failure as it is
used for debug output; the base image will not have output but derivative
images already have a formatted partition and we'll have handy info.
2017-05-25 20:35:25 -05:00
Robert C Jennings
9cf7b2278f ubuntu-cpc: Refactor for consistency & fix grub-install logic
[ Steve Langasek ]
  * Refactor/reorder ubuntu-cpc support for consistency with other flavors,
    so that subarch overrides can be applied correctly.
  [ Ben Howard ]
  * ubuntu-cpc:
    - fixed loop setup due to change of kpartx output
    - only use grub-install logic for Intel architectures
2017-05-25 20:35:24 -05:00
Robert C Jennings
65bb92f3a6 ubunutu-cpc: Improvements for derivative image creation
* ubunutu-cpc:
    - extended hooks/functions to support creation of derivative images
      including mounting images.
    - added the ability to create qcow2 images in hooks/functions
    - simplified loop clean-up in hooks/functions
    - removed assumption that disk1.img would be built
    - switched qcow2 generation to use hooks/functions function
2017-05-25 20:35:21 -05:00
Robert C Jennings
004ee17e1f ubuntu-cpc: Add /dev/pts to hook env, also settle disks after UEFI builds 2017-05-25 20:35:20 -05:00
Robert C Jennings
f433184416 Added additional CPC build targets
- added manifest generation for squashfs and root.tar.gz
    - added VMDK generation
    - added OVA generation from VMDK's
2017-05-25 20:35:17 -05:00
Robert C Jennings
38c87ca9af Move building of all architecture-specific CPC artifacts into Launchpad (LP: #1513754) 2017-05-25 20:35:16 -05:00