mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-07 17:02:30 +00:00
Merge lp:~rbalint/livecd-rootfs/use-ubuntu-image
This commit is contained in:
commit
821d5823b1
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -5,8 +5,12 @@ livecd-rootfs (2.442) UNRELEASED; urgency=medium
|
|||||||
comparison prior to aa-series (LP: #1681548)
|
comparison prior to aa-series (LP: #1681548)
|
||||||
* live-build/ubuntu-cpc/hooks/999-extras.binary: Exit on first failure
|
* live-build/ubuntu-cpc/hooks/999-extras.binary: Exit on first failure
|
||||||
|
|
||||||
[Balint Reczey]
|
[ Balint Reczey ]
|
||||||
* sync before calling kpartx to let writing to loop devices finish
|
* sync before calling kpartx to let writing to loop devices finish
|
||||||
|
* Sort and list dependencies nicely
|
||||||
|
* Require PROJECT environment to be set for lb build
|
||||||
|
* Allow overwriting IMAGEFORMAT even for ubuntu-cpc and ubuntu-server
|
||||||
|
* Optionally use ubuntu-image for building snap based images
|
||||||
|
|
||||||
-- Steve Langasek <steve.langasek@ubuntu.com> Thu, 13 Apr 2017 10:38:04 -0700
|
-- Steve Langasek <steve.langasek@ubuntu.com> Thu, 13 Apr 2017 10:38:04 -0700
|
||||||
|
|
||||||
|
20
debian/control
vendored
20
debian/control
vendored
@ -8,7 +8,25 @@ Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/livecd-rootfs/trunk
|
|||||||
|
|
||||||
Package: livecd-rootfs
|
Package: livecd-rootfs
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${misc:Depends}, debootstrap, rsync, python-minimal | python, procps, squashfs-tools (>= 1:3.3-1), grep-dctrl, lsb-release, lzma, e2fsprogs, germinate (>= 1.25.1), apt-utils, gnupg, live-build (>= 3.0~a57-1ubuntu12~), android-tools-fsutils [armhf], python3-software-properties
|
Depends: ${misc:Depends},
|
||||||
|
android-tools-fsutils [armhf],
|
||||||
|
apt-utils,
|
||||||
|
debootstrap,
|
||||||
|
e2fsprogs,
|
||||||
|
germinate (>= 1.25.1),
|
||||||
|
gnupg,
|
||||||
|
grep-dctrl,
|
||||||
|
live-build (>= 3.0~a57-1ubuntu12~),
|
||||||
|
lsb-release,
|
||||||
|
lzma,
|
||||||
|
procps,
|
||||||
|
python-minimal | python,
|
||||||
|
python3-software-properties,
|
||||||
|
rsync,
|
||||||
|
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
|
||||||
|
@ -10,6 +10,17 @@ Arguments "${@}"
|
|||||||
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
|
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
|
||||||
Set_defaults
|
Set_defaults
|
||||||
|
|
||||||
|
if [ -z "${PROJECT:-}" ]; then
|
||||||
|
echo "PROJECT environment variable has to be set" >&2
|
||||||
|
exit 1
|
||||||
|
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
|
||||||
|
|
||||||
|
@ -104,14 +104,16 @@ add_binary_hook ()
|
|||||||
BINARY_HOOKS="${BINARY_HOOKS:+$BINARY_HOOKS }$1"
|
BINARY_HOOKS="${BINARY_HOOKS:+$BINARY_HOOKS }$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
case $PROJECT:$SUBPROJECT in
|
if [ -z "${IMAGEFORMAT:-}" ]; then
|
||||||
ubuntu-cpc:*)
|
case $PROJECT:$SUBPROJECT in
|
||||||
IMAGEFORMAT=ext4
|
ubuntu-cpc:*)
|
||||||
;;
|
IMAGEFORMAT=ext4
|
||||||
ubuntu-server:live)
|
;;
|
||||||
IMAGEFORMAT=plain
|
ubuntu-server:live)
|
||||||
;;
|
IMAGEFORMAT=plain
|
||||||
esac
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
case $IMAGEFORMAT in
|
case $IMAGEFORMAT in
|
||||||
ext2|ext3|ext4)
|
ext2|ext3|ext4)
|
||||||
@ -145,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