~cjwatson/livecd-rootfs/buildd-lxd

« back to all changes in this revision

Viewing changes to live-build/auto/build

  • Committer: Colin Watson
  • Date: 2018-12-07 18:37:01 UTC
  • Revision ID: cjwatson@canonical.com-20181207183701-4u8x0hdxnz324410
Add a LXD image to builds for the buildd subproject.

Show diffs side-by-side

added added

removed removed

Lines of Context:
531
531
        tar --transform='s,^binary,chroot-autobuild,' \
532
532
                --sort=name --numeric-owner \
533
533
                -czf "$PREFIX.rootfs.tar.gz" binary
 
534
 
 
535
        # Build a LXD image as well, which is preferable for some build types.
 
536
        TMPDIR="$(mktemp -d)"
 
537
        config/make-lxd-metadata "${LB_DISTRIBUTION%-*}" "$ARCH" >"$TMPDIR/metadata.yaml"
 
538
        tar --numeric-owner -cf "$PREFIX.lxd.tar" -C "$TMPDIR" metadata.yaml
 
539
        rm -rf "$TMPDIR"
 
540
        # When using the combined metadata/rootfs form, the rootfs must be
 
541
        # under rootfs/ rather than under chroot-autobuild/.
 
542
        tar --transform='s,^binary,rootfs,' \
 
543
                --sort=name --numeric-owner \
 
544
                -rf "$PREFIX.lxd.tar" binary
 
545
        gzip -9 "$PREFIX.lxd.tar"
534
546
fi
535
547
 
536
548
if [ "$PROJECT:${SUBPROJECT:-}" = "ubuntu-core:system-image" ]; then