|
|
@ -87,11 +87,16 @@ fi
|
|
|
|
PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
|
|
|
|
PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ]; then
|
|
|
|
if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ]; then
|
|
|
|
# Use ubuntu-image instead of live-build
|
|
|
|
# Use ubuntu-image instead (or as part) of live-build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export SNAPPY_STORE_NO_CDN=1
|
|
|
|
|
|
|
|
LB_UBUNTU_IMAGE_CHANNEL="${LB_UBUNTU_IMAGE_CHANNEL:-stable}"
|
|
|
|
|
|
|
|
snap install \
|
|
|
|
|
|
|
|
--classic --channel="$LB_UBUNTU_IMAGE_CHANNEL" ubuntu-image
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$PROJECT" = "ubuntu-core" ]; then
|
|
|
|
if [ "$PROJECT" = "ubuntu-core" ]; then
|
|
|
|
env SNAPPY_STORE_NO_CDN=1 \
|
|
|
|
# Ubuntu Core images
|
|
|
|
ubuntu-image snap $UBUNTU_IMAGE_ARGS \
|
|
|
|
/snap/bin/ubuntu-image snap $UBUNTU_IMAGE_ARGS \
|
|
|
|
-O output "$PREFIX".model-assertion
|
|
|
|
-O output "$PREFIX".model-assertion
|
|
|
|
# XXX: currently we only have one image generated, but really
|
|
|
|
# XXX: currently we only have one image generated, but really
|
|
|
|
# we should be supporting more than one for models that
|
|
|
|
# we should be supporting more than one for models that
|
|
|
@ -99,24 +104,32 @@ if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ]; then
|
|
|
|
mv output/*.img "$PREFIX".img
|
|
|
|
mv output/*.img "$PREFIX".img
|
|
|
|
xz -0 -T4 "$PREFIX".img
|
|
|
|
xz -0 -T4 "$PREFIX".img
|
|
|
|
mv output/seed.manifest "$PREFIX".manifest
|
|
|
|
mv output/seed.manifest "$PREFIX".manifest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# All the builds are finished now, exit
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
else
|
|
|
|
# First we need to build the gadget tree
|
|
|
|
# Ubuntu classic preinstalled images
|
|
|
|
make -C "config/$PREFIX-gadget" \
|
|
|
|
/snap/bin/ubuntu-image classic --verbose $UBUNTU_IMAGE_ARGS \
|
|
|
|
ARCH=$ARCH SERIES=$SUITE $GADGET_TARGET
|
|
|
|
-O output "$IMAGE_DEFINITION"
|
|
|
|
ubuntu-image classic $UBUNTU_IMAGE_ARGS \
|
|
|
|
# Since the output of the ubuntu-image call can vary based on what
|
|
|
|
-s $SUITE -p $PROJECT -a $ARCH --subarch $SUBARCH \
|
|
|
|
# kind of an image we build, the safest bet is to 'export' all the
|
|
|
|
-O output config/$PREFIX-gadget/install
|
|
|
|
# artifacts from the output directory. The image definition file
|
|
|
|
# XXX: currently we only have one image generated, but really
|
|
|
|
# should be what defines what is expected, so that we don't have
|
|
|
|
# we should be supporting more than one for models that
|
|
|
|
# to tweak livecd-rootfs everytime a different type of artifact
|
|
|
|
# define those.
|
|
|
|
# is needed.
|
|
|
|
mv output/*.img "$PREFIX".img
|
|
|
|
for artifact in output/*; do
|
|
|
|
xz -0 -T4 "$PREFIX".img
|
|
|
|
# We want to be dynamic, and want to support even
|
|
|
|
# Also link the output image to a filename that cdimage expects
|
|
|
|
# two-part extensions.
|
|
|
|
ln "$PREFIX".img.xz livecd.ubuntu-cpc.disk1.img.xz
|
|
|
|
filename=$(basename $artifact)
|
|
|
|
mv output/filesystem.manifest "$PREFIX".manifest
|
|
|
|
noversion=$(echo $filename | sed 's/[0-9][0-9]\.[0-9][0-9]//')
|
|
|
|
|
|
|
|
extension=${noversion#*.}
|
|
|
|
|
|
|
|
mv $artifact "$PREFIX".$extension
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
[ -f $PREFIX.img ] && xz -0 -T4 "$PREFIX".img
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# All the builds are finished now, exit
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Setup cleanup function
|
|
|
|
# Setup cleanup function
|
|
|
|