mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-18 14:21:45 +00:00
Optionally use ubuntu-image for building snap based images
This commit is contained in:
parent
f807c3703a
commit
0109d5304e
5
debian/control
vendored
5
debian/control
vendored
@ -23,7 +23,10 @@ Depends: ${misc:Depends},
|
|||||||
python-minimal | python,
|
python-minimal | python,
|
||||||
python3-software-properties,
|
python3-software-properties,
|
||||||
rsync,
|
rsync,
|
||||||
squashfs-tools (>= 1:3.3-1)
|
snapd,
|
||||||
|
squashfs-tools (>= 1:3.3-1),
|
||||||
|
sudo,
|
||||||
|
ubuntu-image
|
||||||
Suggests: partimage
|
Suggests: partimage
|
||||||
Breaks: ubuntu-defaults-builder (<< 0.32)
|
Breaks: ubuntu-defaults-builder (<< 0.32)
|
||||||
Description: construction script for the livecd rootfs
|
Description: construction script for the livecd rootfs
|
||||||
|
@ -15,6 +15,12 @@ if [ -z "${PROJECT:-}" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ]; then
|
||||||
|
# Use ubuntu-image instead of live-build
|
||||||
|
env SNAPPY_STORE_NO_CDN=1 ubuntu-image -o livecd."$PROJECT".img livecd."$PROJECT".model-assertion
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Setup cleanup function
|
# Setup cleanup function
|
||||||
Setup_cleanup
|
Setup_cleanup
|
||||||
|
|
||||||
|
@ -147,6 +147,35 @@ case $IMAGEFORMAT in
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
ubuntu-image)
|
||||||
|
case "$ARCH+${SUBARCH:-}" in
|
||||||
|
amd64+*)
|
||||||
|
MODEL=pc-amd64 ;;
|
||||||
|
i386+*)
|
||||||
|
MODEL=pc-i386 ;;
|
||||||
|
arm64+snapdragon)
|
||||||
|
MODEL=dragonboard ;;
|
||||||
|
armhf+raspi2)
|
||||||
|
MODEL=pi2 ;;
|
||||||
|
armhf+raspi3)
|
||||||
|
MODEL=pi3 ;;
|
||||||
|
*)
|
||||||
|
echo "Model $ARCH+${SUBARCH:-} unknown to livecd-rootfs" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common
|
||||||
|
# Store model assertion in top dir to get it picked up later as a build artifact
|
||||||
|
env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 model="$MODEL" brand-id=canonical > livecd."$PROJECT".model-assertion
|
||||||
|
echo "Configured ubuntu-image for the following model assertion:"
|
||||||
|
cat livecd."$PROJECT".model-assertion
|
||||||
|
echo "----------------------------------------------------------"
|
||||||
|
# Fake finished configuration for lb build
|
||||||
|
mkdir -p .build
|
||||||
|
touch .build/config
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
case $PROJECT in
|
case $PROJECT in
|
||||||
ubuntu-server|ubuntu-touch|ubuntu-touch-custom)
|
ubuntu-server|ubuntu-touch|ubuntu-touch-custom)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user