Merge lp:~sil2100/livecd-rootfs/xenial-ui-support-and-core-suite into lp:~ubuntu-core-dev/livecd-rootfs/xenial-proposed

Proposed by Łukasz Zemczak
Status: Merged
Merged at revision: 1468
Proposed branch: lp:~sil2100/livecd-rootfs/xenial-ui-support-and-core-suite
Merge into: lp:~ubuntu-core-dev/livecd-rootfs/xenial-proposed
Diff against target: 140 lines (+82/-3)
4 files modified
debian/changelog (+10/-0)
debian/control (+2/-0)
live-build/auto/build (+22/-3)
live-build/auto/config (+48/-0)
To merge this branch: bzr merge lp:~sil2100/livecd-rootfs/xenial-ui-support-and-core-suite
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Mathieu Trudel-Lapierre Needs Information
Review via email: mp+356150@code.launchpad.net

Commit message

Backporting core support to xenial + selecting core series per suite.

Description of the change

One possible proposition: backporting core support to xenial + selecting core series per suite.

To post a comment you must log in.
1468. By Łukasz Zemczak

Missing dep

1469. By Łukasz Zemczak

The model assertions for 18 don't actually use series=18 because that would be too logical.

1470. By Łukasz Zemczak

For the pc model, the name changed so we need to special case it a bit.

1471. By Łukasz Zemczak

Merge trunk.

1472. By Łukasz Zemczak

Add bug to changelog.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Isn't the:

touch .build/config

Place wrong? Won't it make it so build won't run at all, so you wouldn't run ubuntu-image? Seems like it should be just before the return in auto/build instead?

review: Needs Information
Revision history for this message
Steve Langasek (vorlon) :
review: Needs Fixing
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Fixing the assignment move.

1473. By Łukasz Zemczak

As Steve pointed out, the auto/build PREFIX change was a move, not an addition.

Revision history for this message
Steve Langasek (vorlon) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2018-10-10 16:09:19 +0000
3+++ debian/changelog 2018-10-29 16:57:59 +0000
4@@ -1,3 +1,13 @@
5+livecd-rootfs (2.408.39) UNRELEASED; urgency=medium
6+
7+ * Backport support for building ubuntu-core images with ubuntu-image (using
8+ IMAGEFORMAT=ubuntu-image).
9+ * Decide what model assertion series to fetch depending on the suite. Use 16
10+ for xenial and 18 for other series (bionic+). This enables core18 image
11+ builds (LP: #1799736).
12+
13+ -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Thu, 04 Oct 2018 19:30:17 +0200
14+
15 livecd-rootfs (2.408.38) xenial; urgency=medium
16
17 * ubuntu-cpc: Handle a pre-existing /lib/modules in 030-root-tarball.hook
18
19=== modified file 'debian/control'
20--- debian/control 2018-06-07 21:54:23 +0000
21+++ debian/control 2018-10-29 16:57:59 +0000
22@@ -30,7 +30,9 @@
23 python3-software-properties,
24 qemu-utils,
25 rsync,
26+ snapd,
27 squashfs-tools (>= 1:3.3-1),
28+ ubuntu-image,
29 vmdk-stream-converter [amd64 i386],
30 xz-utils,
31 zerofree
32
33=== modified file 'live-build/auto/build'
34--- live-build/auto/build 2018-07-02 21:43:35 +0000
35+++ live-build/auto/build 2018-10-29 16:57:59 +0000
36@@ -10,6 +10,28 @@
37 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
38 Set_defaults
39
40+if [ -z "${PROJECT:-}" ]; then
41+ echo "PROJECT environment variable has to be set" >&2
42+ exit 1
43+fi
44+
45+. config/functions
46+
47+# Link output files somewhere BuildLiveCD will be able to find them.
48+PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
49+
50+if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ]; then
51+ # Use ubuntu-image instead of live-build
52+
53+ CHANNEL="${CHANNEL:-edge}"
54+ env SNAPPY_STORE_NO_CDN=1 \
55+ ubuntu-image -c "$CHANNEL" $UBUNTU_IMAGE_ARGS \
56+ -o "$PREFIX".img "$PREFIX".model-assertion
57+ xz -0 -T4 "$PREFIX".img
58+ mv seed.manifest "$PREFIX".manifest
59+ exit 0
60+fi
61+
62 # Setup cleanup function
63 Setup_cleanup
64
65@@ -350,9 +372,6 @@
66 exit 1
67 fi
68
69-# Link output files somewhere BuildLiveCD will be able to find them.
70-PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
71-
72 case $LB_INITRAMFS in
73 casper)
74 INITFS="casper"
75
76=== modified file 'live-build/auto/config'
77--- live-build/auto/config 2018-06-08 16:12:22 +0000
78+++ live-build/auto/config 2018-10-29 16:57:59 +0000
79@@ -96,6 +96,7 @@
80 PREINSTALLED=false
81 PREINSTALL_POOL=
82 PREINSTALL_POOL_SEEDS=
83+PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
84
85 CHROOT_HOOKS=
86 BINARY_HOOKS=
87@@ -144,6 +145,53 @@
88 PREINSTALLED=true
89 ;;
90
91+ ubuntu-image)
92+ case "$ARCH+${SUBARCH:-}" in
93+ amd64+*)
94+ MODEL=pc-amd64 ;;
95+ i386+*)
96+ MODEL=pc-i386 ;;
97+ arm64+snapdragon)
98+ MODEL=dragonboard ;;
99+ armhf+raspi2)
100+ MODEL=pi2 ;;
101+ armhf+raspi3)
102+ MODEL=pi3 ;;
103+ armhf+cm3)
104+ MODEL=cm3 ;;
105+ *)
106+ echo "Model $ARCH+${SUBARCH:-} unknown to livecd-rootfs" >&2
107+ exit 1
108+ ;;
109+ esac
110+ case $MODEL in
111+ pc-amd64|pc-i386)
112+ UBUNTU_IMAGE_ARGS="--image-size 3700M" ;;
113+ *)
114+ UBUNTU_IMAGE_ARGS="" ;;
115+ esac
116+ case $SUITE in
117+ xenial)
118+ # Ubuntu Core 16
119+ ;;
120+ *)
121+ # Ubuntu Core 18
122+ MODEL="ubuntu-core-18-${MODEL#pc-}" ;;
123+ esac
124+
125+ echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common
126+ echo "UBUNTU_IMAGE_ARGS=\"$UBUNTU_IMAGE_ARGS\"" >> config/common
127+ # Store model assertion in top dir to get it picked up later as a build artifact
128+ env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 model="$MODEL" brand-id=canonical > "$PREFIX".model-assertion
129+ echo "Configured ubuntu-image for the following model assertion:"
130+ cat "$PREFIX".model-assertion
131+ echo "----------------------------------------------------------"
132+ # Fake finished configuration for lb build
133+ mkdir -p .build
134+ touch .build/config
135+ exit 0
136+ ;;
137+
138 none)
139 OPTS="${OPTS:+$OPTS }--chroot-filesystem $IMAGEFORMAT"
140 ;;

Subscribers

People subscribed via source and target branches