livecd-rootfs/live-build/buildd/hooks/51-buildd-lxd.binary
Cody Shepherd bacc18b6b3
Change tar transform target to match changes in bionic+, allowing for
ext4 image format to be built correctly
2020-10-09 09:25:23 -07:00

17 lines
571 B
Bash
Executable File

#! /bin/sh
# Some build types prefer a LXD image over a traditional chroot tarball.
set -e
. config/bootstrap
TMPDIR="$(mktemp -d)"
config/make-lxd-metadata "${LB_DISTRIBUTION%-*}" "$ARCH" \
>"$TMPDIR/metadata.yaml"
tar --numeric-owner -cf "livecd.$PROJECT.lxd.tar" -C "$TMPDIR" metadata.yaml
rm -rf "$TMPDIR"
# When using the combined metadata/rootfs form, the rootfs must be under
# rootfs/ rather than under chroot-autobuild/.
tar --transform='s,^chroot,rootfs,' --sort=name --numeric-owner \
-rf "livecd.$PROJECT.lxd.tar" chroot
gzip -9 "livecd.$PROJECT.lxd.tar"