Merge lp:~tribaal/livecd-rootfs/xenial-proposed-build-info-minimal into lp:livecd-rootfs
- xenial-proposed-build-info-minimal
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~tribaal/livecd-rootfs/xenial-proposed-build-info-minimal |
Merge into: | lp:livecd-rootfs |
Diff against target: |
2194 lines (+1501/-92) (has conflicts) 20 files modified
debian/changelog (+335/-0) debian/control (+30/-1) debian/tests/control (+7/-0) debian/tests/default-bootstraps (+96/-0) debian/tests/minimized (+3/-0) live-build/auto/build (+135/-2) live-build/auto/config (+228/-17) live-build/ubuntu-cpc/functions.OTHER (+320/-0) live-build/ubuntu-cpc/hooks/030-root-tarball.binary.OTHER (+27/-0) live-build/ubuntu-cpc/hooks/032-disk-image.binary (+6/-0) live-build/ubuntu-cpc/hooks/032-root-squashfs.binary (+3/-0) live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary (+39/-0) live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary (+9/-0) live-build/ubuntu-cpc/hooks/040-qcow2-image.binary (+10/-1) live-build/ubuntu-cpc/hooks/040-vmdk-image.binary (+25/-8) live-build/ubuntu-cpc/hooks/041-vmdk-ova-image.binary (+44/-13) live-build/ubuntu-cpc/hooks/042-vagrant.binary (+135/-50) live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot (+9/-0) live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot (+35/-0) live-build/ubuntu-cpc/hooks/999-extras.binary (+5/-0) Text conflict in debian/changelog Text conflict in debian/control Conflict adding file debian/tests. Moved existing file to debian/tests.moved. Text conflict in live-build/auto/build Text conflict in live-build/auto/config Contents conflict in live-build/ubuntu-cpc/functions Contents conflict in live-build/ubuntu-cpc/hooks/030-root-tarball.binary Text conflict in live-build/ubuntu-cpc/hooks/032-disk-image.binary Text conflict in live-build/ubuntu-cpc/hooks/032-root-squashfs.binary Text conflict in live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary Text conflict in live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary Text conflict in live-build/ubuntu-cpc/hooks/040-qcow2-image.binary Text conflict in live-build/ubuntu-cpc/hooks/040-vmdk-image.binary Text conflict in live-build/ubuntu-cpc/hooks/041-vmdk-ova-image.binary Text conflict in live-build/ubuntu-cpc/hooks/042-vagrant.binary Conflict adding file live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot. Moved existing file to live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot.moved. Text conflict in live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot Text conflict in live-build/ubuntu-cpc/hooks/999-extras.binary Conflict adding file live-build/ubuntu-touch-custom. Moved existing file to live-build/ubuntu-touch-custom.moved. |
To merge this branch: | bzr merge lp:~tribaal/livecd-rootfs/xenial-proposed-build-info-minimal |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Core Development Team | Pending | ||
Review via email: mp+342297@code.launchpad.net |
This proposal has been superseded by a proposal from 2018-03-28.
Commit message
Description of the change
This change backports changes from bionic where the /etc/cloud/
Unmerged revisions
- 1455. By Chris Glass
-
ubuntu-cpc: When performing a minimized build make sure the
/etc/cloud/build.info file says "minimal" (LP: #1759519) - 1454. By Steve Langasek
-
Merge lp:~daniel-thewatkins/livecd-rootfs/minimized-skips-xenial
- 1453. By Balint Reczey
-
releasing package livecd-rootfs version 2.408.27
- 1452. By Balint Reczey
- 1451. By Łukasz Zemczak
-
releasing package livecd-rootfs version 2.408.26
- 1450. By Łukasz Zemczak
-
Changed default user configuration in the vagrant image, in accordance with the vagrant community's expectations
- 1449. By Balint Reczey
-
releasing package livecd-rootfs version 2.408.25
- 1448. By Balint Reczey
- 1447. By Łukasz Zemczak
-
releasing package livecd-rootfs version 2.408.24
- 1446. By Łukasz Zemczak
-
For the IMAGEFORMAT=none parts to work for ubuntu-image classic builds, we need to make sure IMAGEFORMAT is preserved and not overwritten if defined. Backporting from trunk.
Preview Diff
1 | === modified file 'debian/changelog' | |||
2 | --- debian/changelog 2018-03-27 19:12:35 +0000 | |||
3 | +++ debian/changelog 2018-03-28 13:08:01 +0000 | |||
4 | @@ -1,3 +1,4 @@ | |||
5 | 1 | <<<<<<< TREE | ||
6 | 1 | livecd-rootfs (2.516) bionic; urgency=medium | 2 | livecd-rootfs (2.516) bionic; urgency=medium |
7 | 2 | 3 | ||
8 | 3 | [ Chris Glass ] | 4 | [ Chris Glass ] |
9 | @@ -1042,6 +1043,340 @@ | |||
10 | 1042 | 1043 | ||
11 | 1043 | -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Wed, 04 May 2016 12:49:23 +0200 | 1044 | -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Wed, 04 May 2016 12:49:23 +0200 |
12 | 1044 | 1045 | ||
13 | 1046 | ======= | ||
14 | 1047 | livecd-rootfs (2.408.29) UNRELEASED; urgency=medium | ||
15 | 1048 | |||
16 | 1049 | * ubuntu-cpc: When performing a minimized build make sure the | ||
17 | 1050 | /etc/cloud/build.info file says "minimal" (LP: #1759519) | ||
18 | 1051 | |||
19 | 1052 | -- Christopher Glass (Ubuntu) <tribaal@ubuntu.com> Wed, 28 Mar 2018 12:08:48 +0200 | ||
20 | 1053 | |||
21 | 1054 | livecd-rootfs (2.408.28) xenial; urgency=medium | ||
22 | 1055 | |||
23 | 1056 | * ubuntu-cpc: When performing a minimized build, don't generate artifacts | ||
24 | 1057 | that won't boot with the linux-kvm kernel (LP: #1757223). | ||
25 | 1058 | |||
26 | 1059 | -- Daniel Watkins <daniel.watkins@canonical.com> Tue, 20 Mar 2018 12:42:25 -0400 | ||
27 | 1060 | |||
28 | 1061 | livecd-rootfs (2.408.27) xenial; urgency=medium | ||
29 | 1062 | |||
30 | 1063 | * Don't ask for password and GECOS while creating vagrant user | ||
31 | 1064 | (LP: #1569237) | ||
32 | 1065 | |||
33 | 1066 | -- Balint Reczey <rbalint@ubuntu.com> Thu, 21 Dec 2017 09:20:32 +0100 | ||
34 | 1067 | |||
35 | 1068 | livecd-rootfs (2.408.26) xenial; urgency=medium | ||
36 | 1069 | |||
37 | 1070 | * Added a "vagrant" user to the vagrant image in addition to the "ubuntu" | ||
38 | 1071 | user, in accordance with the vagrant community's expectations (LP: #1569237) | ||
39 | 1072 | |||
40 | 1073 | -- Christopher Glass (Ubuntu) <tribaal@ubuntu.com> Thu, 07 Dec 2017 14:00:59 +0100 | ||
41 | 1074 | |||
42 | 1075 | livecd-rootfs (2.408.25) xenial; urgency=medium | ||
43 | 1076 | |||
44 | 1077 | * Sort and list dependencies nicely | ||
45 | 1078 | * Depend on packages instead of installing them at run time | ||
46 | 1079 | * Use xz -T4 instead of pxz. | ||
47 | 1080 | Supported xz versions before 5.2 accept the -T4 option but ignore it. | ||
48 | 1081 | Also depend on xz-utils instead of downloading pxz. (LP: #1701132) | ||
49 | 1082 | |||
50 | 1083 | -- Balint Reczey <rbalint@ubuntu.com> Wed, 06 Dec 2017 11:34:04 +0100 | ||
51 | 1084 | |||
52 | 1085 | livecd-rootfs (2.408.24) xenial; urgency=medium | ||
53 | 1086 | |||
54 | 1087 | * For the IMAGEFORMAT=none parts to work for ubuntu-image classic builds, we | ||
55 | 1088 | need to make sure IMAGEFORMAT is preserved and not overwritten if defined. | ||
56 | 1089 | Backporting from artful. | ||
57 | 1090 | |||
58 | 1091 | -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Tue, 21 Nov 2017 17:01:14 +0100 | ||
59 | 1092 | |||
60 | 1093 | livecd-rootfs (2.408.23) xenial; urgency=medium | ||
61 | 1094 | |||
62 | 1095 | [ Gary Wang ] | ||
63 | 1096 | * Add the IMAGEFORMAT=none to support generating a single rootfs | ||
64 | 1097 | (LP: #1730642) | ||
65 | 1098 | |||
66 | 1099 | [ Christopher Glass (Ubuntu) ] | ||
67 | 1100 | * Backport "minimized round 2" changes from trunk to Xenial (LP: #1731492) | ||
68 | 1101 | * Remove apt, debconf, dpkg cruft files from /var/cache and /var/lib in | ||
69 | 1102 | all our livefses. | ||
70 | 1103 | * Pass --cache false to lb config; otherwise we copy around caches of | ||
71 | 1104 | .debs that are never used properly, and which prevent us from emptying | ||
72 | 1105 | /var/cache/apt in images. | ||
73 | 1106 | * When building minimized cloud images, remove various packages that we | ||
74 | 1107 | don't want installed by default. Some are tools that aren't needed for | ||
75 | 1108 | non-interactive use; some are libraries whose reverse-dependencies | ||
76 | 1109 | will have already been removed; and one, open-vm-tools, should only be | ||
77 | 1110 | included in images that are targeted to VMWare (which is not the case | ||
78 | 1111 | for any of the current minimal images), rather than being included | ||
79 | 1112 | directly in the cloud-image seed. | ||
80 | 1113 | |||
81 | 1114 | -- Steve Langasek <steve.langasek@ubuntu.com> Tue, 14 Nov 2017 11:21:48 -0800 | ||
82 | 1115 | |||
83 | 1116 | livecd-rootfs (2.408.22) xenial; urgency=medium | ||
84 | 1117 | |||
85 | 1118 | * Make sure to remove any initramfs that was generated in a minimized | ||
86 | 1119 | image. | ||
87 | 1120 | * divert /usr/bin/systemd-detect-virt as part of the grub diversions, so | ||
88 | 1121 | that the grub kernel postinst hook is operational when we're building | ||
89 | 1122 | in a container. LP: #1729034. | ||
90 | 1123 | |||
91 | 1124 | -- Steve Langasek <steve.langasek@ubuntu.com> Sat, 21 Oct 2017 20:53:02 -0700 | ||
92 | 1125 | |||
93 | 1126 | livecd-rootfs (2.408.21) xenial; urgency=medium | ||
94 | 1127 | |||
95 | 1128 | [ Balint Reczey ] | ||
96 | 1129 | * Use kvm kernel only on amd64. | ||
97 | 1130 | * Make non-x86 minimized images consistent with x86 by not explicitly | ||
98 | 1131 | installing the server task. | ||
99 | 1132 | * Clean up dangling /boot/initrd.img symlink left behind on minimized | ||
100 | 1133 | builds. | ||
101 | 1134 | |||
102 | 1135 | -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 20 Oct 2017 23:10:29 -0700 | ||
103 | 1136 | |||
104 | 1137 | livecd-rootfs (2.408.20) xenial; urgency=medium | ||
105 | 1138 | |||
106 | 1139 | * Now that grub-related diversions have been factored out in 2.466 | ||
107 | 1140 | instead of having bogus root=stuff arg generated in grub.cfg, it is | ||
108 | 1141 | actually empty. Therefore update the sed command to make the arg in | ||
109 | 1142 | the root= token optional. This should resolve non-booting livecd cpc | ||
110 | 1143 | images. | ||
111 | 1144 | |||
112 | 1145 | -- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 10 Oct 2017 13:49:49 +0100 | ||
113 | 1146 | |||
114 | 1147 | livecd-rootfs (2.408.19) xenial; urgency=medium | ||
115 | 1148 | |||
116 | 1149 | [ Nishanth Aravamudan ] | ||
117 | 1150 | * live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot: generate iSCSI | ||
118 | 1151 | Initiator Name at first iscsid run for cloud images to ensure it is | ||
119 | 1152 | unique (LP: #1444992). | ||
120 | 1153 | |||
121 | 1154 | [ Steve Langasek ] | ||
122 | 1155 | * Improve teardown_mountpoint to recursively find all submounts and | ||
123 | 1156 | unmount them, instead of working from a hard-coded list. This makes | ||
124 | 1157 | the code resilient against other submounts being added later, including | ||
125 | 1158 | downstream. LP: #1721279. | ||
126 | 1159 | * Also nuke the sleep / udevadm settle calls in the process, which should | ||
127 | 1160 | never be required and slow down the builds. | ||
128 | 1161 | * Fix a reference to an undefined variable in a script that's set -u. | ||
129 | 1162 | * Use /bin/sh, not /bin/bash, for autopkgtest. | ||
130 | 1163 | * debian/tests/default-bootstraps: minor adjustments to shell syntax, | ||
131 | 1164 | syncing with artful where this originated. | ||
132 | 1165 | |||
133 | 1166 | [ Steve Langasek, Balint Reczey ] | ||
134 | 1167 | * Introduce a new project-independent 'minimized' subproject | ||
135 | 1168 | (LP: #1721261): | ||
136 | 1169 | - omit ubuntu-minimal in favor of using only the minbase package set. | ||
137 | 1170 | - boot directly by partuuid, avoiding the use of an initramfs. | ||
138 | 1171 | - Bump needed live-build version which can build images without initrd | ||
139 | 1172 | - drop man pages and most of the documentation from minimized images | ||
140 | 1173 | (/usr/share/doc/*/copyright and changelog.Debian.gz files are still | ||
141 | 1174 | kept) | ||
142 | 1175 | - Add unminimize script for reverting minimization on a running system | ||
143 | 1176 | - Mention unminimize script in motd | ||
144 | 1177 | - Run autopkgtest for SUBPROJECT=minimized | ||
145 | 1178 | - If we're using SUBPROJECT=minimized, and tzdata is not installed, | ||
146 | 1179 | remove files that have been left behind. This is a workaround for a | ||
147 | 1180 | bug that should be fixed in tzdata. | ||
148 | 1181 | * Factor out grub-related diversions and use them consistently, so we | ||
149 | 1182 | don't end up with wrong os-probe output in our grub.cfg. | ||
150 | 1183 | |||
151 | 1184 | [ Balint Reczey ] | ||
152 | 1185 | * Mount using --make-rslave to ensure safe unmounts for rbind mounts | ||
153 | 1186 | * When SUBPROJECT environment variable is not set assume it to be "" | ||
154 | 1187 | |||
155 | 1188 | -- Steve Langasek <steve.langasek@ubuntu.com> Wed, 04 Oct 2017 18:43:48 +0000 | ||
156 | 1189 | |||
157 | 1190 | livecd-rootfs (2.408.18) xenial; urgency=medium | ||
158 | 1191 | |||
159 | 1192 | [ Robert C Jennings ] | ||
160 | 1193 | * Install udev before calls to udevadm | ||
161 | 1194 | |||
162 | 1195 | -- Steve Langasek <steve.langasek@ubuntu.com> Wed, 13 Sep 2017 22:10:11 -0700 | ||
163 | 1196 | |||
164 | 1197 | livecd-rootfs (2.408.17) xenial; urgency=medium | ||
165 | 1198 | |||
166 | 1199 | [ Robert C Jennings ] | ||
167 | 1200 | * live-build/ubuntu-cpc/functions: Add a function, teardown_mountpoint, | ||
168 | 1201 | to reverse the work done in setup_mountpoint. Lack of this function | ||
169 | 1202 | has forced users of setup_mountpoint to implement this separately | ||
170 | 1203 | and the implementations have diverged. (LP: #1716992) | ||
171 | 1204 | * live-build/ubuntu-cpc/functions: Remove umount_settle function. | ||
172 | 1205 | The was only used where teardown_mountpoint was lacking. | ||
173 | 1206 | |||
174 | 1207 | -- Steve Langasek <steve.langasek@ubuntu.com> Wed, 13 Sep 2017 12:21:30 -0700 | ||
175 | 1208 | |||
176 | 1209 | livecd-rootfs (2.408.16) xenial; urgency=medium | ||
177 | 1210 | |||
178 | 1211 | * live-build/ubuntu-cpc/functions: call apt-get update in the chroot | ||
179 | 1212 | after mounting a blank /var/lib/apt, so that further operations work | ||
180 | 1213 | as expected; otherwise, 'apt-get purge ^grub-.*' fails on s390x because | ||
181 | 1214 | no such packages are known to apt. | ||
182 | 1215 | * live-build/ubuntu-cpc/hooks/030-root-tarball.binary: correct a missing | ||
183 | 1216 | unmount of /var/{lib,cache}/apt on cleanup, detected via autopkgtests. | ||
184 | 1217 | |||
185 | 1218 | -- Steve Langasek <steve.langasek@ubuntu.com> Tue, 12 Sep 2017 13:25:58 -0700 | ||
186 | 1219 | |||
187 | 1220 | livecd-rootfs (2.408.15) xenial; urgency=medium | ||
188 | 1221 | |||
189 | 1222 | [ Mathieu Trudel-Lapierre ] | ||
190 | 1223 | * Drop preloading of grub modules that are built into the grub signed | ||
191 | 1224 | image. This is functionally a no-op, changed only to clean up the code. | ||
192 | 1225 | |||
193 | 1226 | [ Steve Langasek ] | ||
194 | 1227 | * live-build/ubuntu-cpc/functions: mount tmpfs on /var/cache/apt and | ||
195 | 1228 | /var/lib/apt, so we don't have to leave empty space in our derivative | ||
196 | 1229 | images for packages that have been downloaded/installed/removed. This | ||
197 | 1230 | normally isn't relevant for the installed system, since the root | ||
198 | 1231 | filesystem will auto-expand in place on the target disk, but lets us | ||
199 | 1232 | ship smaller images. | ||
200 | 1233 | * live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary: call apt-get | ||
201 | 1234 | update *before* installing packages, not after. | ||
202 | 1235 | |||
203 | 1236 | [ Colin Watson ] | ||
204 | 1237 | * Mount and unmount /dev recursively, to cope with setups where there are | ||
205 | 1238 | interesting bind-mounts under /dev (e.g. loop devices bind-mounted by | ||
206 | 1239 | LXD). LP: #1716465. | ||
207 | 1240 | |||
208 | 1241 | [ Balint Reczey ] | ||
209 | 1242 | * Fix suppression of kpartx error. LP: #1684090. | ||
210 | 1243 | |||
211 | 1244 | -- Steve Langasek <steve.langasek@ubuntu.com> Mon, 11 Sep 2017 14:38:42 -0700 | ||
212 | 1245 | |||
213 | 1246 | livecd-rootfs (2.408.14) xenial; urgency=medium | ||
214 | 1247 | |||
215 | 1248 | * live-build/auto/config: Filter libgles1-mesa out of tasks, as it is not a | ||
216 | 1249 | dependency of anything in updates anymore, fixing mate/myth (LP: #1704013) | ||
217 | 1250 | |||
218 | 1251 | -- Adam Conrad <adconrad@ubuntu.com> Wed, 12 Jul 2017 16:28:13 -0600 | ||
219 | 1252 | |||
220 | 1253 | livecd-rootfs (2.408.13) xenial; urgency=medium | ||
221 | 1254 | |||
222 | 1255 | [ Balint Reczey ] | ||
223 | 1256 | * Source ubuntu-cpc functions from the right place | ||
224 | 1257 | * Use all config hooks from the proper place, not from /build/ | ||
225 | 1258 | * Add basic but configurable autopkgtest (LP: #1690440) | ||
226 | 1259 | * sync before calling kpartx to let writing to loop devices finish | ||
227 | 1260 | * wrap kpartx and trap spurious errors, to work around kpartx | ||
228 | 1261 | unreliability. | ||
229 | 1262 | |||
230 | 1263 | -- Steve Langasek <steve.langasek@ubuntu.com> Tue, 06 Jun 2017 21:52:21 -0700 | ||
231 | 1264 | |||
232 | 1265 | livecd-rootfs (2.408.12) xenial; urgency=medium | ||
233 | 1266 | |||
234 | 1267 | * live-build/ubuntu-cpc/hooks/999-extras.binary: Exit on first failure. | ||
235 | 1268 | (LP: #1687752) | ||
236 | 1269 | |||
237 | 1270 | -- Robert C Jennings <robert.jennings@canonical.com> Tue, 09 May 2017 13:57:44 -0700 | ||
238 | 1271 | |||
239 | 1272 | livecd-rootfs (2.408.11) xenial; urgency=medium | ||
240 | 1273 | |||
241 | 1274 | * Add `apt-get update` to ubuntu-cpc ppc64el builds so they use the new | ||
242 | 1275 | sources. | ||
243 | 1276 | |||
244 | 1277 | -- Daniel Watkins <daniel.watkins@canonical.com> Fri, 07 Apr 2017 16:12:53 -0400 | ||
245 | 1278 | |||
246 | 1279 | livecd-rootfs (2.408.10) xenial; urgency=medium | ||
247 | 1280 | |||
248 | 1281 | [ Adam Conrad ] | ||
249 | 1282 | * Fix security mirror sources.list entries for non-x86 architectures. | ||
250 | 1283 | (LP: #1679252) | ||
251 | 1284 | |||
252 | 1285 | -- Daniel Watkins <daniel.watkins@canonical.com> Mon, 03 Apr 2017 14:05:25 -0400 | ||
253 | 1286 | |||
254 | 1287 | livecd-rootfs (2.408.9) xenial; urgency=medium | ||
255 | 1288 | |||
256 | 1289 | [ Daniel Watkins ] | ||
257 | 1290 | * Don't overwrite the default sources.list in cloud images. | ||
258 | 1291 | * Replace sources.list generated using COMPONENTS with the sources.list from | ||
259 | 1292 | an Ubuntu Server installation (i.e. with all components enabled, and all | ||
260 | 1293 | deb-src lines commented). LP: #1513529. | ||
261 | 1294 | |||
262 | 1295 | [ Chris Glass ] | ||
263 | 1296 | * Fix the manifest generation in OVA files so that ovf files don't have | ||
264 | 1297 | double extensions. (LP: #1627931) | ||
265 | 1298 | * Fix the OVF's metadata to include Ubuntu specific identifiers and | ||
266 | 1299 | descriptions instead of the generic Linux ones. (LP: #1656293) | ||
267 | 1300 | |||
268 | 1301 | [ Daniel Watkins ] | ||
269 | 1302 | * Add replace_grub_root_with_label function thereby consolidating multiple | ||
270 | 1303 | uses of the same calls to sed. | ||
271 | 1304 | |||
272 | 1305 | [ Robert C Jennings ] | ||
273 | 1306 | * ubuntu-cpc: Remove redundant copy of grub files. (LP: #1637290) | ||
274 | 1307 | |||
275 | 1308 | -- Robert C Jennings <robert.jennings@canonical.com> Thu, 23 Mar 2017 14:40:59 -0400 | ||
276 | 1309 | |||
277 | 1310 | livecd-rootfs (2.408.8) xenial; urgency=medium | ||
278 | 1311 | |||
279 | 1312 | * Set device_tree_address for the new kernel in the RPi bootloader config.txt | ||
280 | 1313 | |||
281 | 1314 | -- Adam Conrad <adconrad@ubuntu.com> Thu, 16 Feb 2017 10:21:51 -0700 | ||
282 | 1315 | |||
283 | 1316 | livecd-rootfs (2.408.7) xenial; urgency=medium | ||
284 | 1317 | |||
285 | 1318 | [ Łukasz 'sil2100' Zemczak ] | ||
286 | 1319 | * Add additional hints to ubuntu-touch* i386/amd64 image builds to pull in | ||
287 | 1320 | the gles version of the UITK. | ||
288 | 1321 | * Now that we have have systemd working on ubuntu-touch, remove the | ||
289 | 1322 | systemd-sysv- in add_package config to make sure we can build an image with | ||
290 | 1323 | systemd as the init system. | ||
291 | 1324 | |||
292 | 1325 | [ Adam Conrad ] | ||
293 | 1326 | * Forward-port hardware enablement delta from trusty to xenial, with changes: | ||
294 | 1327 | - Implement hwe stack swapping as task filters instead of install hints | ||
295 | 1328 | - Revert ubuntu-desktop and ubuntu-gnome to use tasks again for the above | ||
296 | 1329 | |||
297 | 1330 | -- Adam Conrad <adconrad@ubuntu.com> Wed, 08 Feb 2017 11:50:52 -0700 | ||
298 | 1331 | |||
299 | 1332 | livecd-rootfs (2.408.5) xenial; urgency=medium | ||
300 | 1333 | |||
301 | 1334 | * Temporarily change the 60-install-click.chroot script to pull in clicks for | ||
302 | 1335 | arm64 builds from a different location for ubuntu-touch. | ||
303 | 1336 | * Add the new dhcpd user to touch hooks introduced by latest archive changes. | ||
304 | 1337 | * Remove the ubuntu-pd project logic. | ||
305 | 1338 | * Synced ubuntu-touch-custom changes from the vivid branch to xenial. This | ||
306 | 1339 | also adds a new symlink called ubuntu-touch-custom to the ubuntu-touch hooks | ||
307 | 1340 | dir. | ||
308 | 1341 | * Stop using the overlay PPA for touch livecd-rootfs changes (LP: #1628085). | ||
309 | 1342 | |||
310 | 1343 | -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Tue, 27 Sep 2016 13:27:28 +0200 | ||
311 | 1344 | |||
312 | 1345 | livecd-rootfs (2.408.4) xenial; urgency=medium | ||
313 | 1346 | |||
314 | 1347 | * live-build/ubuntu-cpc/hooks/042-vagrant.binary: fix unmount handling | ||
315 | 1348 | so that the teardown is done properly /before/ we try to make an | ||
316 | 1349 | image from our filesystem, since otherwise /etc/resolv.conf is broken. | ||
317 | 1350 | LP: #1621393. | ||
318 | 1351 | |||
319 | 1352 | -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 09 Sep 2016 17:04:54 -0700 | ||
320 | 1353 | |||
321 | 1354 | livecd-rootfs (2.408.3) xenial-proposed; urgency=medium | ||
322 | 1355 | |||
323 | 1356 | [ Louis Zuckerman ] | ||
324 | 1357 | * Fixes for vagrant box builder in ubuntu-cpc LP: #1565985 | ||
325 | 1358 | - Install virtualbox-guest-utils | ||
326 | 1359 | - Don't disable default synced folder | ||
327 | 1360 | - Don't set vm name | ||
328 | 1361 | - Add cloud-init config to manage /etc/hosts LP: #1561250 | ||
329 | 1362 | |||
330 | 1363 | -- Brian Murray <brian@ubuntu.com> Tue, 30 Aug 2016 13:17:55 -0700 | ||
331 | 1364 | |||
332 | 1365 | livecd-rootfs (2.408.2) xenial; urgency=medium | ||
333 | 1366 | |||
334 | 1367 | * Switch ubuntu-gnome from using tasks to metapackages (LP: #1602035) | ||
335 | 1368 | |||
336 | 1369 | -- Adam Conrad <adconrad@ubuntu.com> Wed, 20 Jul 2016 01:46:41 -0600 | ||
337 | 1370 | |||
338 | 1371 | livecd-rootfs (2.408.1) xenial; urgency=medium | ||
339 | 1372 | |||
340 | 1373 | * Rename old ubuntu-core tarballs to ubuntu-base, for consistency with | ||
341 | 1374 | the changes already made to yakkety and the ubuntu-cdimage project. | ||
342 | 1375 | LP: #1579950. | ||
343 | 1376 | |||
344 | 1377 | -- Steve Langasek <steve.langasek@ubuntu.com> Mon, 09 May 2016 17:00:19 -0700 | ||
345 | 1378 | |||
346 | 1379 | >>>>>>> MERGE-SOURCE | ||
347 | 1045 | livecd-rootfs (2.408) xenial; urgency=medium | 1380 | livecd-rootfs (2.408) xenial; urgency=medium |
348 | 1046 | 1381 | ||
349 | 1047 | * drop linux-firmware-raspi2, it does not actually contain driver | 1382 | * drop linux-firmware-raspi2, it does not actually contain driver |
350 | 1048 | 1383 | ||
351 | === modified file 'debian/control' | |||
352 | --- debian/control 2018-03-06 09:15:41 +0000 | |||
353 | +++ debian/control 2018-03-28 13:08:01 +0000 | |||
354 | @@ -4,10 +4,11 @@ | |||
355 | 4 | Build-Depends: debhelper (>= 7) | 4 | Build-Depends: debhelper (>= 7) |
356 | 5 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> | 5 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
357 | 6 | Standards-Version: 3.9.6 | 6 | Standards-Version: 3.9.6 |
359 | 7 | Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/livecd-rootfs/trunk | 7 | Vcs-Bzr: lp:~ubuntu-core-dev/livecd-rootfs/xenial-proposed/ |
360 | 8 | 8 | ||
361 | 9 | Package: livecd-rootfs | 9 | Package: livecd-rootfs |
362 | 10 | Architecture: any | 10 | Architecture: any |
363 | 11 | <<<<<<< TREE | ||
364 | 11 | Depends: ${misc:Depends}, | 12 | Depends: ${misc:Depends}, |
365 | 12 | apt-utils, | 13 | apt-utils, |
366 | 13 | debootstrap, | 14 | debootstrap, |
367 | @@ -36,6 +37,34 @@ | |||
368 | 36 | vmdk-stream-converter [amd64 i386], | 37 | vmdk-stream-converter [amd64 i386], |
369 | 37 | xz-utils, | 38 | xz-utils, |
370 | 38 | zerofree | 39 | zerofree |
371 | 40 | ======= | ||
372 | 41 | Depends: ${misc:Depends}, | ||
373 | 42 | android-tools-fsutils [armhf], | ||
374 | 43 | apt-utils, | ||
375 | 44 | debootstrap, | ||
376 | 45 | dosfstools, | ||
377 | 46 | e2fsprogs, | ||
378 | 47 | gdisk, | ||
379 | 48 | genisoimage, | ||
380 | 49 | germinate (>= 1.25.1), | ||
381 | 50 | gnupg, | ||
382 | 51 | grep-dctrl, | ||
383 | 52 | kpartx, | ||
384 | 53 | live-build (>= 3.0~a57-1ubuntu25.5~), | ||
385 | 54 | lsb-release, | ||
386 | 55 | lzma, | ||
387 | 56 | parted, | ||
388 | 57 | procps, | ||
389 | 58 | python-minimal | python, | ||
390 | 59 | python3-software-properties, | ||
391 | 60 | qemu-utils, | ||
392 | 61 | rsync, | ||
393 | 62 | squashfs-tools (>= 1:3.3-1), | ||
394 | 63 | vmdk-stream-converter [amd64 i386], | ||
395 | 64 | xz-utils, | ||
396 | 65 | zerofree | ||
397 | 66 | Suggests: partimage | ||
398 | 67 | >>>>>>> MERGE-SOURCE | ||
399 | 39 | Breaks: ubuntu-defaults-builder (<< 0.32) | 68 | Breaks: ubuntu-defaults-builder (<< 0.32) |
400 | 40 | Description: construction script for the livecd rootfs | 69 | Description: construction script for the livecd rootfs |
401 | 41 | livecd-rootfs provides the script used to create the root filesystem | 70 | livecd-rootfs provides the script used to create the root filesystem |
402 | 42 | 71 | ||
403 | === added directory 'debian/tests' | |||
404 | === renamed directory 'debian/tests' => 'debian/tests.moved' | |||
405 | === added file 'debian/tests/control' | |||
406 | --- debian/tests/control 1970-01-01 00:00:00 +0000 | |||
407 | +++ debian/tests/control 2018-03-28 13:08:01 +0000 | |||
408 | @@ -0,0 +1,7 @@ | |||
409 | 1 | Tests: default-bootstraps | ||
410 | 2 | Depends: @, lsb-release | ||
411 | 3 | Restrictions: needs-root isolation-machine | ||
412 | 4 | |||
413 | 5 | Tests: minimized | ||
414 | 6 | Depends: @, lsb-release | ||
415 | 7 | Restrictions: needs-root isolation-machine | ||
416 | 0 | 8 | ||
417 | === added file 'debian/tests/default-bootstraps' | |||
418 | --- debian/tests/default-bootstraps 1970-01-01 00:00:00 +0000 | |||
419 | +++ debian/tests/default-bootstraps 2018-03-28 13:08:01 +0000 | |||
420 | @@ -0,0 +1,96 @@ | |||
421 | 1 | #!/bin/sh | ||
422 | 2 | # autopkgtest check: Build default rootfs for all supported project:subproject pairs | ||
423 | 3 | # (C) 2017 Canonical Ltd. | ||
424 | 4 | # Author: Balint Reczey <balint.reczey@canonical.com> | ||
425 | 5 | |||
426 | 6 | set -e | ||
427 | 7 | |||
428 | 8 | if [ -z "$SUITE" ]; then | ||
429 | 9 | SUITE=$(lsb_release -c -s) | ||
430 | 10 | fi | ||
431 | 11 | |||
432 | 12 | # Known project:subproject:template combinations. | ||
433 | 13 | # Listed subprojects can be combined with other projects as well, | ||
434 | 14 | # but this list gives reasonable coverage. | ||
435 | 15 | ALL_TRIPLETS=" | ||
436 | 16 | base:: | ||
437 | 17 | edubuntu:: | ||
438 | 18 | edubuntu-dvd:: | ||
439 | 19 | kubuntu:: | ||
440 | 20 | kubuntu-active:: | ||
441 | 21 | kubuntu-dvd:: | ||
442 | 22 | kubuntu-plasma5:: | ||
443 | 23 | lubuntu:: | ||
444 | 24 | lubuntu-next:: | ||
445 | 25 | mythbuntu:: | ||
446 | 26 | ubuntu:: | ||
447 | 27 | ubuntu-base:: | ||
448 | 28 | ubuntu-budgie:: | ||
449 | 29 | ubuntu-budgie-desktop:: | ||
450 | 30 | ubuntu-budgie-live:: | ||
451 | 31 | ubuntu-core:system-image:ubuntu-core | ||
452 | 32 | ubuntu-cpc::ubuntu-cpc | ||
453 | 33 | ubuntu-cpc:minimized:ubuntu-cpc | ||
454 | 34 | ubuntu-desktop-next:system-image:ubuntu-desktop-next | ||
455 | 35 | ubuntu-desktop-next::ubuntu-desktop-next | ||
456 | 36 | ubuntu-dvd:: | ||
457 | 37 | ubuntu-gnome:: | ||
458 | 38 | ubuntukylin:: | ||
459 | 39 | ubuntu-mate:: | ||
460 | 40 | ubuntu-mate-core:: | ||
461 | 41 | ubuntu-mate-desktop:: | ||
462 | 42 | ubuntu-mate-live:: | ||
463 | 43 | ubuntu-netbook:: | ||
464 | 44 | ubuntu-server:: | ||
465 | 45 | ubuntu-server:ubuntu-rtm: | ||
466 | 46 | ubuntu-server:ubuntu-rtm/foo: | ||
467 | 47 | ubuntu-server:wubi: | ||
468 | 48 | ubuntu-touch-custom::ubuntu-touch-custom | ||
469 | 49 | ubuntu-touch::ubuntu-touch | ||
470 | 50 | xubuntu::" | ||
471 | 51 | |||
472 | 52 | if [ -z "$SELECTED_TRIPLETS" ]; then | ||
473 | 53 | SELECTED_TRIPLETS=" | ||
474 | 54 | ubuntu-base:: | ||
475 | 55 | ubuntu-cpc::ubuntu-cpc | ||
476 | 56 | " | ||
477 | 57 | fi | ||
478 | 58 | |||
479 | 59 | live_build_rootfs() { | ||
480 | 60 | PROJECT=${1%%:*} | ||
481 | 61 | local SUBPROJECT_TMP=${1%:*} | ||
482 | 62 | SUBPROJECT=${SUBPROJECT_TMP#*:} | ||
483 | 63 | TEMPLATE=${1##*:} | ||
484 | 64 | ARCH=$(dpkg --print-architecture) | ||
485 | 65 | echo "Building rootfs for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD" | ||
486 | 66 | cp -a /usr/share/livecd-rootfs/live-build/auto . | ||
487 | 67 | if [ -n "$TEMPLATE" ]; then | ||
488 | 68 | cp -a /usr/share/livecd-rootfs/live-build/$TEMPLATE . | ||
489 | 69 | fi | ||
490 | 70 | env PROJECT=$PROJECT \ | ||
491 | 71 | SUBPROJECT=$SUBPROJECT \ | ||
492 | 72 | SUITE=$SUITE \ | ||
493 | 73 | ARCH=$ARCH \ | ||
494 | 74 | lb config | ||
495 | 75 | mkdir chroot | ||
496 | 76 | # this part needs root rights, but right now the whole script ran as root by autopkgtest | ||
497 | 77 | env PROJECT=$PROJECT \ | ||
498 | 78 | SUBPROJECT=$SUBPROJECT \ | ||
499 | 79 | ARCH=$ARCH \ | ||
500 | 80 | lb build | ||
501 | 81 | echo "Build results for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD" | ||
502 | 82 | du -sh * | ||
503 | 83 | echo "" | ||
504 | 84 | } | ||
505 | 85 | |||
506 | 86 | WORKDIR=$(mktemp -d) | ||
507 | 87 | trap "RET=\$?; rm -rf $WORKDIR; exit \$RET" 0 INT QUIT ABRT PIPE TERM | ||
508 | 88 | cd $WORKDIR | ||
509 | 89 | |||
510 | 90 | for i in $SELECTED_TRIPLETS; do | ||
511 | 91 | mkdir $i | ||
512 | 92 | (cd $i && live_build_rootfs $i) | ||
513 | 93 | # clean up after build to avoid filling the disk, needs root rights | ||
514 | 94 | rm -rf $i | ||
515 | 95 | done | ||
516 | 96 | |||
517 | 0 | 97 | ||
518 | === added file 'debian/tests/minimized' | |||
519 | --- debian/tests/minimized 1970-01-01 00:00:00 +0000 | |||
520 | +++ debian/tests/minimized 2018-03-28 13:08:01 +0000 | |||
521 | @@ -0,0 +1,3 @@ | |||
522 | 1 | #!/bin/sh | ||
523 | 2 | |||
524 | 3 | env SELECTED_TRIPLETS=ubuntu-cpc:minimized:ubuntu-cpc debian/tests/default-bootstraps | ||
525 | 0 | 4 | ||
526 | === modified file 'live-build/auto/build' | |||
527 | --- live-build/auto/build 2018-03-27 19:12:26 +0000 | |||
528 | +++ live-build/auto/build 2018-03-28 13:08:01 +0000 | |||
529 | @@ -94,6 +94,7 @@ | |||
530 | 94 | 94 | ||
531 | 95 | lb bootstrap "$@" | 95 | lb bootstrap "$@" |
532 | 96 | 96 | ||
533 | 97 | <<<<<<< TREE | ||
534 | 97 | case $PROJECT in | 98 | case $PROJECT in |
535 | 98 | ubuntu-server|ubuntu-cpc) | 99 | ubuntu-server|ubuntu-cpc) |
536 | 99 | # Set locale to C.UTF-8 by default. We should | 100 | # Set locale to C.UTF-8 by default. We should |
537 | @@ -209,6 +210,114 @@ | |||
538 | 209 | 210 | ||
539 | 210 | chmod +x chroot/etc/update-motd.d/60-unminimize | 211 | chmod +x chroot/etc/update-motd.d/60-unminimize |
540 | 211 | fi | 212 | fi |
541 | 213 | ======= | ||
542 | 214 | if [ "${SUBPROJECT:-}" = minimized ] \ | ||
543 | 215 | && ! Chroot chroot dpkg -l tzdata 2>&1 |grep -q ^ii; then | ||
544 | 216 | # workaround for tzdata purge not removing these files | ||
545 | 217 | rm -f chroot/etc/localtime chroot/etc/timezone | ||
546 | 218 | fi | ||
547 | 219 | |||
548 | 220 | if [ "${SUBPROJECT:-}" = minimized ]; then | ||
549 | 221 | # set up dpkg filters to skip installing docs on minimized system | ||
550 | 222 | mkdir -p chroot/etc/dpkg/dpkg.cfg.d | ||
551 | 223 | cat > chroot/etc/dpkg/dpkg.cfg.d/excludes <<EOF | ||
552 | 224 | # Drop all man pages | ||
553 | 225 | path-exclude=/usr/share/man/* | ||
554 | 226 | |||
555 | 227 | # Drop all documentation ... | ||
556 | 228 | path-exclude=/usr/share/doc/* | ||
557 | 229 | |||
558 | 230 | # ... except copyright files ... | ||
559 | 231 | path-include=/usr/share/doc/*/copyright | ||
560 | 232 | |||
561 | 233 | # ... and Debian changelogs | ||
562 | 234 | path-include=/usr/share/doc/*/changelog.Debian.* | ||
563 | 235 | EOF | ||
564 | 236 | |||
565 | 237 | # Remove docs installed by bootstrap | ||
566 | 238 | Chroot chroot dpkg-query -f '${binary:Package}\n' -W | Chroot chroot xargs apt-get install --reinstall | ||
567 | 239 | |||
568 | 240 | # Add unminimizer script which restores default image behavior | ||
569 | 241 | mkdir -p chroot/usr/local/sbin | ||
570 | 242 | cat > chroot/usr/local/sbin/unminimize <<'EOF' | ||
571 | 243 | #!/bin/sh | ||
572 | 244 | |||
573 | 245 | set -e | ||
574 | 246 | |||
575 | 247 | echo "This system has been minimized by removing packages and content that are" | ||
576 | 248 | echo "not required on a system that users do not log into." | ||
577 | 249 | echo "" | ||
578 | 250 | echo "This script restores the content and packages that are found on a default" | ||
579 | 251 | echo "Ubuntu server system." | ||
580 | 252 | echo "" | ||
581 | 253 | echo "Reinstallation of packages may fail due to changes to the system" | ||
582 | 254 | echo "configuration, the presence of third-party packages, or for other" | ||
583 | 255 | echo "reasons." | ||
584 | 256 | read -p "Would you like to continue? [y/N]" REPLY | ||
585 | 257 | echo # (optional) move to a new line | ||
586 | 258 | if [ "$REPLY" != "y" ] && [ "$REPLY" != "Y" ] | ||
587 | 259 | then | ||
588 | 260 | exit 1 | ||
589 | 261 | fi | ||
590 | 262 | |||
591 | 263 | if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp ]; then | ||
592 | 264 | echo "Re-enabling installation of all documentation in dpkg..." | ||
593 | 265 | if [ -f /etc/dpkg/dpkg.cfg.d/excludes ]; then | ||
594 | 266 | mv /etc/dpkg/dpkg.cfg.d/excludes /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp | ||
595 | 267 | fi | ||
596 | 268 | echo "Updating package list and upgrading packages..." | ||
597 | 269 | apt-get update | ||
598 | 270 | # apt-get upgrade asks for confirmation before upgrading packages to let the user stop here | ||
599 | 271 | apt-get upgrade | ||
600 | 272 | echo "Restoring system documentation..." | ||
601 | 273 | echo "Reinstalling packages with files in /usr/share/man/ ..." | ||
602 | 274 | # Reinstallation takes place in two steps because a single dpkg --verified | ||
603 | 275 | # command generates very long parameter list for "xargs dpkg -S" and may go | ||
604 | 276 | # over ARG_MAX. Since many packages have man pages the second download | ||
605 | 277 | # handles a much smaller amount of packages. | ||
606 | 278 | dpkg -S /usr/share/man/ |sed 's|, |\n|g;s|: [^:]*$||' | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y | ||
607 | 279 | echo "Reinstalling packages with system documentation in /usr/share/doc/ .." | ||
608 | 280 | # This step processes the packages which still have missing documentation | ||
609 | 281 | dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \ | ||
610 | 282 | | xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y | ||
611 | 283 | if dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {exit 1}'; then | ||
612 | 284 | echo "Documentation has been restored successfully." | ||
613 | 285 | rm /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp | ||
614 | 286 | else | ||
615 | 287 | echo "There are still files missing from /usr/share/doc/:" | ||
616 | 288 | dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {print " " $2}' | ||
617 | 289 | echo "You may want to try running this script again or you can remove" | ||
618 | 290 | echo "/etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp and restore the files manually." | ||
619 | 291 | fi | ||
620 | 292 | fi | ||
621 | 293 | |||
622 | 294 | if ! dpkg-query --show --showformat='${db:Status-Status}\n' ubuntu-minimal 2> /dev/null | grep -q '^installed$'; then | ||
623 | 295 | echo "Installing ubuntu-minimal package to provide the familiar Ubuntu minimal system..." | ||
624 | 296 | DEBIAN_FRONTEND=noninteractive apt-get install -y ubuntu-minimal | ||
625 | 297 | fi | ||
626 | 298 | |||
627 | 299 | # unminimization succeeded, there is no need to mention it in motd | ||
628 | 300 | rm -f /etc/update-motd.d/60-unminimize | ||
629 | 301 | |||
630 | 302 | EOF | ||
631 | 303 | chmod +x chroot/usr/local/sbin/unminimize | ||
632 | 304 | |||
633 | 305 | # inform users about the unminimize script | ||
634 | 306 | cat > "chroot/etc/update-motd.d/60-unminimize" << EOF | ||
635 | 307 | #!/bin/sh | ||
636 | 308 | # | ||
637 | 309 | # This file is not managed by a package. If you no longer want to | ||
638 | 310 | # see this message you can safely remove the file. | ||
639 | 311 | echo "This system has been minimized by removing packages and content that are" | ||
640 | 312 | echo "not required on a system that users do not log into." | ||
641 | 313 | echo "" | ||
642 | 314 | echo "To restore this content, you can run the 'unminimize' command." | ||
643 | 315 | EOF | ||
644 | 316 | |||
645 | 317 | chmod +x chroot/etc/update-motd.d/60-unminimize | ||
646 | 318 | fi | ||
647 | 319 | |||
648 | 320 | >>>>>>> MERGE-SOURCE | ||
649 | 212 | Chroot chroot "dpkg-divert --quiet --add \ | 321 | Chroot chroot "dpkg-divert --quiet --add \ |
650 | 213 | --divert /usr/sbin/update-initramfs.REAL --rename \ | 322 | --divert /usr/sbin/update-initramfs.REAL --rename \ |
651 | 214 | /usr/sbin/update-initramfs" | 323 | /usr/sbin/update-initramfs" |
652 | @@ -230,6 +339,7 @@ | |||
653 | 230 | 339 | ||
654 | 231 | lb chroot "$@" | 340 | lb chroot "$@" |
655 | 232 | 341 | ||
656 | 342 | <<<<<<< TREE | ||
657 | 233 | if [ "${SUBPROJECT:-}" = minimized ]; then | 343 | if [ "${SUBPROJECT:-}" = minimized ]; then |
658 | 234 | # force removal of initramfs-tools, which we assert is not | 344 | # force removal of initramfs-tools, which we assert is not |
659 | 235 | # required for any minimized images but is still pulled in by | 345 | # required for any minimized images but is still pulled in by |
660 | @@ -255,6 +365,20 @@ | |||
661 | 255 | rm -f chroot/var/cache/debconf/*-old chroot/var/lib/dpkg/*-old | 365 | rm -f chroot/var/cache/debconf/*-old chroot/var/lib/dpkg/*-old |
662 | 256 | Chroot chroot apt clean | 366 | Chroot chroot apt clean |
663 | 257 | 367 | ||
664 | 368 | ======= | ||
665 | 369 | if [ "${SUBPROJECT:-}" = minimized ]; then | ||
666 | 370 | # and if initramfs-tools was configured before our kernel, | ||
667 | 371 | # /etc/kernel/postinst.d/initramfs-tools will have created | ||
668 | 372 | # an initramfs despite the generic dpkg-divert; so remove it | ||
669 | 373 | # here. | ||
670 | 374 | rm -f chroot/boot/initrd.img-* | ||
671 | 375 | fi | ||
672 | 376 | |||
673 | 377 | # remove crufty files that shouldn't be left in an image | ||
674 | 378 | rm -f chroot/var/cache/debconf/*-old chroot/var/lib/dpkg/*-old | ||
675 | 379 | Chroot chroot apt clean | ||
676 | 380 | |||
677 | 381 | >>>>>>> MERGE-SOURCE | ||
678 | 258 | if [ -f config/oem-config-preinstalled ]; then | 382 | if [ -f config/oem-config-preinstalled ]; then |
679 | 259 | 383 | ||
680 | 260 | # This is cargo-culted almost verbatim (with some syntax changes for | 384 | # This is cargo-culted almost verbatim (with some syntax changes for |
681 | @@ -381,6 +505,7 @@ | |||
682 | 381 | > chroot/etc/apt/sources.list | 505 | > chroot/etc/apt/sources.list |
683 | 382 | rm chroot/etc/apt/sources.list.preinstall chroot/etc/apt/sources.list.orig | 506 | rm chroot/etc/apt/sources.list.preinstall chroot/etc/apt/sources.list.orig |
684 | 383 | fi | 507 | fi |
685 | 508 | <<<<<<< TREE | ||
686 | 384 | case $PROJECT:$SUBPROJECT in | 509 | case $PROJECT:$SUBPROJECT in |
687 | 385 | *) | 510 | *) |
688 | 386 | if [ -e "config/seeded-snaps" ]; then | 511 | if [ -e "config/seeded-snaps" ]; then |
689 | @@ -411,6 +536,9 @@ | |||
690 | 411 | esac | 536 | esac |
691 | 412 | 537 | ||
692 | 413 | if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then | 538 | if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then |
693 | 539 | ======= | ||
694 | 540 | if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then | ||
695 | 541 | >>>>>>> MERGE-SOURCE | ||
696 | 414 | if [ "$ARCH" = "armhf" ]; then | 542 | if [ "$ARCH" = "armhf" ]; then |
697 | 415 | INFO_DESC="$(lsb_release -d -s)" | 543 | INFO_DESC="$(lsb_release -d -s)" |
698 | 416 | echo "$INFO_DESC - $ARCH ($BUILDSTAMP)" >chroot/etc/media-info | 544 | echo "$INFO_DESC - $ARCH ($BUILDSTAMP)" >chroot/etc/media-info |
699 | @@ -428,6 +556,7 @@ | |||
700 | 428 | build_name: $BUILD_NAME | 556 | build_name: $BUILD_NAME |
701 | 429 | serial: $BUILDSTAMP | 557 | serial: $BUILDSTAMP |
702 | 430 | EOF | 558 | EOF |
703 | 559 | <<<<<<< TREE | ||
704 | 431 | fi | 560 | fi |
705 | 432 | 561 | ||
706 | 433 | # If the image pre-installs network-manager, let it manage all devices by | 562 | # If the image pre-installs network-manager, let it manage all devices by |
707 | @@ -445,6 +574,8 @@ | |||
708 | 445 | EOF | 574 | EOF |
709 | 446 | else | 575 | else |
710 | 447 | echo "==== NetworkManager not installed ====" | 576 | echo "==== NetworkManager not installed ====" |
711 | 577 | ======= | ||
712 | 578 | >>>>>>> MERGE-SOURCE | ||
713 | 448 | fi | 579 | fi |
714 | 449 | 580 | ||
715 | 450 | echo "===== Checking size of /usr/share/doc =====" | 581 | echo "===== Checking size of /usr/share/doc =====" |
716 | @@ -805,6 +936,7 @@ | |||
717 | 805 | if [ -z "$LB_LINUX_FLAVOURS" ] || [ "$LB_LINUX_FLAVOURS" = "none" ]; then | 936 | if [ -z "$LB_LINUX_FLAVOURS" ] || [ "$LB_LINUX_FLAVOURS" = "none" ]; then |
718 | 806 | continue | 937 | continue |
719 | 807 | fi | 938 | fi |
720 | 939 | FLAVOUR=${FLAVOUR%%-hwe-*} | ||
721 | 808 | if [ "$FLAVOUR" = "virtual" ]; then | 940 | if [ "$FLAVOUR" = "virtual" ]; then |
722 | 809 | # The virtual kernel is named generic in /boot | 941 | # The virtual kernel is named generic in /boot |
723 | 810 | FLAVOUR="generic" | 942 | FLAVOUR="generic" |
724 | @@ -838,17 +970,18 @@ | |||
725 | 838 | NUMFLAVOURS="$(set -- $LB_LINUX_FLAVOURS; echo $#)" | 970 | NUMFLAVOURS="$(set -- $LB_LINUX_FLAVOURS; echo $#)" |
726 | 839 | if [ "$NUMFLAVOURS" = 1 ] && [ "$LB_LINUX_FLAVOURS" != "none" ]; then | 971 | if [ "$NUMFLAVOURS" = 1 ] && [ "$LB_LINUX_FLAVOURS" != "none" ]; then |
727 | 840 | # only one kernel flavour | 972 | # only one kernel flavour |
728 | 973 | FLAVOUR=${LB_LINUX_FLAVOURS%%-hwe-*} | ||
729 | 841 | if [ -e "binary/$INITFS/vmlinuz" ]; then | 974 | if [ -e "binary/$INITFS/vmlinuz" ]; then |
730 | 842 | ln "binary/$INITFS/vmlinuz" "$PREFIX.kernel" | 975 | ln "binary/$INITFS/vmlinuz" "$PREFIX.kernel" |
731 | 843 | chmod 644 "$PREFIX.kernel" | 976 | chmod 644 "$PREFIX.kernel" |
732 | 844 | else | 977 | else |
734 | 845 | ln -sf "$PREFIX.kernel-$LB_LINUX_FLAVOURS" "$PREFIX.kernel" | 978 | ln -sf "$PREFIX.kernel-$FLAVOUR" "$PREFIX.kernel" |
735 | 846 | fi | 979 | fi |
736 | 847 | if [ -e "binary/$INITFS/initrd.lz" ]; then | 980 | if [ -e "binary/$INITFS/initrd.lz" ]; then |
737 | 848 | ln "binary/$INITFS/initrd.lz" "$PREFIX.initrd" | 981 | ln "binary/$INITFS/initrd.lz" "$PREFIX.initrd" |
738 | 849 | chmod 644 "$PREFIX.initrd" | 982 | chmod 644 "$PREFIX.initrd" |
739 | 850 | else | 983 | else |
741 | 851 | ln -sf "$PREFIX.initrd-$LB_LINUX_FLAVOURS" "$PREFIX.initrd" | 984 | ln -sf "$PREFIX.initrd-$FLAVOUR" "$PREFIX.initrd" |
742 | 852 | fi | 985 | fi |
743 | 853 | fi | 986 | fi |
744 | 854 | 987 | ||
745 | 855 | 988 | ||
746 | === modified file 'live-build/auto/config' | |||
747 | --- live-build/auto/config 2018-03-21 11:05:46 +0000 | |||
748 | +++ live-build/auto/config 2018-03-28 13:08:01 +0000 | |||
749 | @@ -59,9 +59,15 @@ | |||
750 | 59 | # failure. | 59 | # failure. |
751 | 60 | 60 | ||
752 | 61 | for task; do | 61 | for task; do |
753 | 62 | if [ -z "$HWE_BUILD" ]; then | ||
754 | 62 | # We need a ridiculous number of backslashes to protect | 63 | # We need a ridiculous number of backslashes to protect |
755 | 63 | # parentheses from eval. | 64 | # parentheses from eval. |
756 | 64 | echo "!chroot chroot apt-cache dumpavail | grep-dctrl -nsPackage \\\\\\( -XFArchitecture $ARCH -o -XFArchitecture all \\\\\\) -a -wFTask $task" >> "config/package-lists/livecd-rootfs.list.chroot_$pass" | 65 | echo "!chroot chroot apt-cache dumpavail | grep-dctrl -nsPackage \\\\\\( -XFArchitecture $ARCH -o -XFArchitecture all \\\\\\) -a -wFTask $task" >> "config/package-lists/livecd-rootfs.list.chroot_$pass" |
757 | 66 | else | ||
758 | 67 | # If HWE_BUILD is set, we strip out drivers not available | ||
759 | 68 | # in the HWE stack, then sed the rest with their HWE suffixes | ||
760 | 69 | echo "!chroot chroot apt-cache dumpavail | grep-dctrl -nsPackage \\\\\\( -XFArchitecture $ARCH -o -XFArchitecture all \\\\\\) -a -wFTask $task | grep -v xserver-xorg-input-vmmouse | grep -v libgles1-mesa | sed -e 's/xserver-xorg.*/&-hwe-16.04/'" >> "config/package-lists/livecd-rootfs.list.chroot_$pass" | ||
761 | 70 | fi | ||
762 | 65 | done | 71 | done |
763 | 66 | } | 72 | } |
764 | 67 | 73 | ||
765 | @@ -105,6 +111,7 @@ | |||
766 | 105 | BINARY_HOOKS="${BINARY_HOOKS:+$BINARY_HOOKS }$1" | 111 | BINARY_HOOKS="${BINARY_HOOKS:+$BINARY_HOOKS }$1" |
767 | 106 | } | 112 | } |
768 | 107 | 113 | ||
769 | 114 | <<<<<<< TREE | ||
770 | 108 | if [ -z "${IMAGEFORMAT:-}" ]; then | 115 | if [ -z "${IMAGEFORMAT:-}" ]; then |
771 | 109 | case $PROJECT:${SUBPROJECT:-} in | 116 | case $PROJECT:${SUBPROJECT:-} in |
772 | 110 | ubuntu-cpc:*) | 117 | ubuntu-cpc:*) |
773 | @@ -121,6 +128,15 @@ | |||
774 | 121 | mkdir -p .build | 128 | mkdir -p .build |
775 | 122 | touch ".build/$STAGE" | 129 | touch ".build/$STAGE" |
776 | 123 | } | 130 | } |
777 | 131 | ======= | ||
778 | 132 | if [ -z "${IMAGEFORMAT:-}" ]; then | ||
779 | 133 | case $PROJECT in | ||
780 | 134 | ubuntu-cpc) | ||
781 | 135 | IMAGEFORMAT=ext4 | ||
782 | 136 | ;; | ||
783 | 137 | esac | ||
784 | 138 | fi | ||
785 | 139 | >>>>>>> MERGE-SOURCE | ||
786 | 124 | 140 | ||
787 | 125 | case $IMAGEFORMAT in | 141 | case $IMAGEFORMAT in |
788 | 126 | ext2|ext3|ext4) | 142 | ext2|ext3|ext4) |
789 | @@ -144,6 +160,7 @@ | |||
790 | 144 | ;; | 160 | ;; |
791 | 145 | 161 | ||
792 | 146 | plain) | 162 | plain) |
793 | 163 | <<<<<<< TREE | ||
794 | 147 | INITRAMFS_TYPE=none | 164 | INITRAMFS_TYPE=none |
795 | 148 | case $PROJECT:${SUBPROJECT:-} in | 165 | case $PROJECT:${SUBPROJECT:-} in |
796 | 149 | ubuntu-server:live) | 166 | ubuntu-server:live) |
797 | @@ -201,6 +218,15 @@ | |||
798 | 201 | none) | 218 | none) |
799 | 202 | OPTS="${OPTS:+$OPTS }--chroot-filesystem $IMAGEFORMAT" | 219 | OPTS="${OPTS:+$OPTS }--chroot-filesystem $IMAGEFORMAT" |
800 | 203 | ;; | 220 | ;; |
801 | 221 | ======= | ||
802 | 222 | OPTS="${OPTS:+$OPTS }--initramfs none --chroot-filesystem $IMAGEFORMAT" | ||
803 | 223 | PREINSTALLED=true | ||
804 | 224 | ;; | ||
805 | 225 | |||
806 | 226 | none) | ||
807 | 227 | OPTS="${OPTS:+$OPTS }--chroot-filesystem $IMAGEFORMAT" | ||
808 | 228 | ;; | ||
809 | 229 | >>>>>>> MERGE-SOURCE | ||
810 | 204 | *) | 230 | *) |
811 | 205 | case $PROJECT in | 231 | case $PROJECT in |
812 | 206 | ubuntu-server|ubuntu-touch|ubuntu-touch-custom) | 232 | ubuntu-server|ubuntu-touch|ubuntu-touch-custom) |
813 | @@ -254,6 +280,7 @@ | |||
814 | 254 | ;; | 280 | ;; |
815 | 255 | esac | 281 | esac |
816 | 256 | 282 | ||
817 | 283 | <<<<<<< TREE | ||
818 | 257 | SIGNED_KERNEL_PACKAGE="linux-signed-generic" | 284 | SIGNED_KERNEL_PACKAGE="linux-signed-generic" |
819 | 258 | 285 | ||
820 | 259 | if [ "${SUBPROJECT:-}" = minimized ]; then | 286 | if [ "${SUBPROJECT:-}" = minimized ]; then |
821 | @@ -321,13 +348,30 @@ | |||
822 | 321 | -S $SEEDMIRROR -m $MIRROR -d $SUITE -s $SEED \ | 348 | -S $SEEDMIRROR -m $MIRROR -d $SUITE -s $SEED \ |
823 | 322 | ${COMPONENTS:+-c "$COMPONENTS"} -a $ARCH) | 349 | ${COMPONENTS:+-c "$COMPONENTS"} -a $ARCH) |
824 | 323 | fi | 350 | fi |
825 | 351 | ======= | ||
826 | 352 | HWE_X_PACKAGES="xserver-xorg-hwe-16.04 xserver-xorg-video-all-hwe-16.04 xserver-xorg-input-all-hwe-16.04" | ||
827 | 353 | HWE_KERNEL_FLAVOUR="generic-hwe-16.04" | ||
828 | 354 | HWE_SIGNED_KERNEL_PACKAGE="linux-signed-$HWE_KERNEL_FLAVOUR" | ||
829 | 355 | |||
830 | 356 | if [ "${SUBPROJECT:-}" = minimized ]; then | ||
831 | 357 | OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal --linux-packages=linux-image" | ||
832 | 358 | fi | ||
833 | 359 | >>>>>>> MERGE-SOURCE | ||
834 | 324 | 360 | ||
835 | 325 | case $PROJECT in | 361 | case $PROJECT in |
836 | 326 | ubuntu|ubuntu-dvd) | 362 | ubuntu|ubuntu-dvd) |
838 | 327 | add_task install minimal standard ubuntu-desktop | 363 | <<<<<<< TREE |
839 | 364 | add_task install minimal standard ubuntu-desktop | ||
840 | 365 | ======= | ||
841 | 366 | HWE_BUILD="yes" | ||
842 | 367 | add_task install minimal standard ubuntu-desktop | ||
843 | 368 | add_package install $HWE_X_PACKAGES | ||
844 | 369 | >>>>>>> MERGE-SOURCE | ||
845 | 328 | LIVE_TASK='ubuntu-live' | 370 | LIVE_TASK='ubuntu-live' |
846 | 371 | LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' | ||
847 | 372 | KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" | ||
848 | 329 | case $ARCH in | 373 | case $ARCH in |
850 | 330 | amd64) add_package live $SIGNED_KERNEL_PACKAGE ;; | 374 | amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; |
851 | 331 | esac | 375 | esac |
852 | 332 | ;; | 376 | ;; |
853 | 333 | 377 | ||
854 | @@ -351,11 +395,15 @@ | |||
855 | 351 | ;; | 395 | ;; |
856 | 352 | 396 | ||
857 | 353 | kubuntu|kubuntu-dvd) | 397 | kubuntu|kubuntu-dvd) |
858 | 398 | HWE_BUILD="yes" | ||
859 | 354 | add_task install minimal standard | 399 | add_task install minimal standard |
860 | 355 | add_task install kubuntu-desktop | 400 | add_task install kubuntu-desktop |
861 | 401 | add_package install $HWE_X_PACKAGES | ||
862 | 356 | LIVE_TASK='kubuntu-live' | 402 | LIVE_TASK='kubuntu-live' |
863 | 403 | LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' | ||
864 | 404 | KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" | ||
865 | 357 | case $ARCH in | 405 | case $ARCH in |
867 | 358 | amd64) add_package live linux-signed-generic ;; | 406 | amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; |
868 | 359 | esac | 407 | esac |
869 | 360 | COMPONENTS='main restricted universe' | 408 | COMPONENTS='main restricted universe' |
870 | 361 | add_chroot_hook remove-gnome-icon-cache | 409 | add_chroot_hook remove-gnome-icon-cache |
871 | @@ -390,16 +438,17 @@ | |||
872 | 390 | ;; | 438 | ;; |
873 | 391 | 439 | ||
874 | 392 | xubuntu) | 440 | xubuntu) |
875 | 441 | HWE_BUILD="yes" | ||
876 | 393 | add_task install minimal standard xubuntu-desktop | 442 | add_task install minimal standard xubuntu-desktop |
877 | 443 | add_package install $HWE_X_PACKAGES | ||
878 | 394 | add_package install xterm | 444 | add_package install xterm |
879 | 395 | LIVE_TASK='xubuntu-live' | 445 | LIVE_TASK='xubuntu-live' |
880 | 446 | LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' | ||
881 | 447 | KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" | ||
882 | 396 | case $ARCH in | 448 | case $ARCH in |
884 | 397 | amd64) add_package live linux-signed-generic ;; | 449 | amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; |
885 | 398 | esac | 450 | esac |
886 | 399 | COMPONENTS='main restricted universe multiverse' | 451 | COMPONENTS='main restricted universe multiverse' |
887 | 400 | case $ARCH in | ||
888 | 401 | amd64|i386) KERNEL_FLAVOURS=generic ;; | ||
889 | 402 | esac | ||
890 | 403 | ;; | 452 | ;; |
891 | 404 | 453 | ||
892 | 405 | ubuntu-netbook) | 454 | ubuntu-netbook) |
893 | @@ -408,25 +457,32 @@ | |||
894 | 408 | ;; | 457 | ;; |
895 | 409 | 458 | ||
896 | 410 | mythbuntu) | 459 | mythbuntu) |
897 | 460 | HWE_BUILD="yes" | ||
898 | 411 | add_task install minimal standard mythbuntu-desktop | 461 | add_task install minimal standard mythbuntu-desktop |
899 | 462 | add_package install $HWE_X_PACKAGES | ||
900 | 412 | LIVE_TASK='mythbuntu-live' | 463 | LIVE_TASK='mythbuntu-live' |
901 | 464 | LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' | ||
902 | 465 | KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" | ||
903 | 413 | case $ARCH in | 466 | case $ARCH in |
905 | 414 | amd64) add_package live linux-signed-generic ;; | 467 | amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; |
906 | 415 | esac | 468 | esac |
907 | 416 | COMPONENTS='main restricted universe multiverse' | 469 | COMPONENTS='main restricted universe multiverse' |
908 | 417 | ;; | 470 | ;; |
909 | 418 | 471 | ||
910 | 419 | lubuntu) | 472 | lubuntu) |
911 | 473 | HWE_BUILD="yes" | ||
912 | 420 | add_task install minimal standard lubuntu-desktop | 474 | add_task install minimal standard lubuntu-desktop |
913 | 475 | case $ARCH in | ||
914 | 476 | amd64|i386) add_package install thermald ;; | ||
915 | 477 | esac | ||
916 | 478 | add_package install $HWE_X_PACKAGES | ||
917 | 421 | LIVE_TASK='lubuntu-live' | 479 | LIVE_TASK='lubuntu-live' |
918 | 480 | LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' | ||
919 | 481 | KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" | ||
920 | 422 | case $ARCH in | 482 | case $ARCH in |
922 | 423 | amd64) add_package live linux-signed-generic ;; | 483 | amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; |
923 | 424 | esac | 484 | esac |
924 | 425 | COMPONENTS='main restricted universe multiverse' | 485 | COMPONENTS='main restricted universe multiverse' |
925 | 426 | case $ARCH in | ||
926 | 427 | amd64|i386) KERNEL_FLAVOURS=generic ;; | ||
927 | 428 | esac | ||
928 | 429 | |||
929 | 430 | # The Lubuntu STRUCTURE file has "feature | 486 | # The Lubuntu STRUCTURE file has "feature |
930 | 431 | # no-follow-recommends". Mirror this. | 487 | # no-follow-recommends". Mirror this. |
931 | 432 | APT_OPTIONS="${APT_OPTIONS} --no-install-recommends" | 488 | APT_OPTIONS="${APT_OPTIONS} --no-install-recommends" |
932 | @@ -449,10 +505,14 @@ | |||
933 | 449 | ;; | 505 | ;; |
934 | 450 | 506 | ||
935 | 451 | ubuntu-gnome) | 507 | ubuntu-gnome) |
936 | 508 | HWE_BUILD="yes" | ||
937 | 452 | add_task install minimal standard ubuntu-gnome-desktop | 509 | add_task install minimal standard ubuntu-gnome-desktop |
938 | 510 | add_package install $HWE_X_PACKAGES | ||
939 | 453 | LIVE_TASK='ubuntu-gnome-live' | 511 | LIVE_TASK='ubuntu-gnome-live' |
940 | 512 | LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' | ||
941 | 513 | KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" | ||
942 | 454 | case $ARCH in | 514 | case $ARCH in |
944 | 455 | amd64) add_package live linux-signed-generic ;; | 515 | amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; |
945 | 456 | esac | 516 | esac |
946 | 457 | COMPONENTS='main restricted universe' | 517 | COMPONENTS='main restricted universe' |
947 | 458 | ;; | 518 | ;; |
948 | @@ -467,28 +527,41 @@ | |||
949 | 467 | ;; | 527 | ;; |
950 | 468 | 528 | ||
951 | 469 | ubuntu-mate) | 529 | ubuntu-mate) |
952 | 530 | HWE_BUILD="yes" | ||
953 | 470 | add_task install minimal standard ubuntu-mate-core ubuntu-mate-desktop | 531 | add_task install minimal standard ubuntu-mate-core ubuntu-mate-desktop |
954 | 532 | case $ARCH in | ||
955 | 533 | amd64|i386) add_package install thermald ;; | ||
956 | 534 | esac | ||
957 | 535 | add_package install $HWE_X_PACKAGES | ||
958 | 471 | LIVE_TASK='ubuntu-mate-live' | 536 | LIVE_TASK='ubuntu-mate-live' |
959 | 537 | LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' | ||
960 | 538 | KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" | ||
961 | 472 | case $ARCH in | 539 | case $ARCH in |
963 | 473 | amd64) add_package live linux-signed-generic ;; | 540 | amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; |
964 | 474 | esac | 541 | esac |
965 | 475 | COMPONENTS='main restricted universe multiverse' | 542 | COMPONENTS='main restricted universe multiverse' |
966 | 476 | ;; | 543 | ;; |
967 | 477 | 544 | ||
968 | 478 | ubuntustudio-dvd) | 545 | ubuntustudio-dvd) |
969 | 546 | HWE_BUILD="yes" | ||
970 | 479 | add_task install minimal standard ubuntustudio-desktop ubuntustudio-audio ubuntustudio-fonts ubuntustudio-graphics ubuntustudio-video ubuntustudio-publishing ubuntustudio-photography | 547 | add_task install minimal standard ubuntustudio-desktop ubuntustudio-audio ubuntustudio-fonts ubuntustudio-graphics ubuntustudio-video ubuntustudio-publishing ubuntustudio-photography |
971 | 548 | add_package install $HWE_X_PACKAGES linux-generic-hwe-16.04- | ||
972 | 480 | COMPONENTS='main restricted universe multiverse' | 549 | COMPONENTS='main restricted universe multiverse' |
973 | 481 | case $ARCH in | 550 | case $ARCH in |
975 | 482 | amd64|i386) KERNEL_FLAVOURS=lowlatency ;; | 551 | amd64|i386) KERNEL_FLAVOURS=lowlatency-hwe-16.04 ;; |
976 | 483 | esac | 552 | esac |
977 | 484 | ;; | 553 | ;; |
978 | 485 | 554 | ||
979 | 486 | ubuntukylin) | 555 | ubuntukylin) |
980 | 556 | HWE_BUILD="yes" | ||
981 | 487 | add_task install minimal standard ubuntukylin-desktop | 557 | add_task install minimal standard ubuntukylin-desktop |
982 | 558 | add_package install $HWE_X_PACKAGES | ||
983 | 488 | add_package install ubuntukylin-default-settings | 559 | add_package install ubuntukylin-default-settings |
984 | 489 | LIVE_TASK='ubuntukylin-live' | 560 | LIVE_TASK='ubuntukylin-live' |
985 | 561 | LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' | ||
986 | 562 | KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" | ||
987 | 490 | case $ARCH in | 563 | case $ARCH in |
989 | 491 | amd64) add_package live linux-signed-generic ;; | 564 | amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; |
990 | 492 | esac | 565 | esac |
991 | 493 | COMPONENTS='main restricted universe' | 566 | COMPONENTS='main restricted universe' |
992 | 494 | ;; | 567 | ;; |
993 | @@ -514,6 +587,7 @@ | |||
994 | 514 | ;; | 587 | ;; |
995 | 515 | 588 | ||
996 | 516 | ubuntu-core) | 589 | ubuntu-core) |
997 | 590 | <<<<<<< TREE | ||
998 | 517 | OPTS="${OPTS:+$OPTS }--apt-recommends false" | 591 | OPTS="${OPTS:+$OPTS }--apt-recommends false" |
999 | 518 | 592 | ||
1000 | 519 | # some workarounds because the seeds are not quite | 593 | # some workarounds because the seeds are not quite |
1001 | @@ -581,6 +655,83 @@ | |||
1002 | 581 | ;; | 655 | ;; |
1003 | 582 | esac | 656 | esac |
1004 | 583 | add_package install ubuntu-minimal ubuntu-touch $HINTS | 657 | add_package install ubuntu-minimal ubuntu-touch $HINTS |
1005 | 658 | ======= | ||
1006 | 659 | # mvo: This is for cron.daily-preinstalled | ||
1007 | 660 | # CDIMAGE_PREINSTALLED is not passed from build.py | ||
1008 | 661 | # and PREINSTALLED means something different. So | ||
1009 | 662 | # we use SUBPROJECT to pass on the information | ||
1010 | 663 | if [ "$SUBPROJECT" = "system-image" ]; then | ||
1011 | 664 | OPTS="${OPTS:+$OPTS }--apt-recommends false" | ||
1012 | 665 | |||
1013 | 666 | # some workarounds because the seeds are not quite | ||
1014 | 667 | # corrent at the moment | ||
1015 | 668 | add_package install dbus | ||
1016 | 669 | add_package install isc-dhcp-client | ||
1017 | 670 | add_package install libpam-systemd | ||
1018 | 671 | add_package install ppp | ||
1019 | 672 | add_package install watchdog | ||
1020 | 673 | # no Task: header yet | ||
1021 | 674 | add_package install snapd | ||
1022 | 675 | add_package install ubuntu-core-snapd-units | ||
1023 | 676 | |||
1024 | 677 | # no minimal as we want to be really minimal | ||
1025 | 678 | #add_task install minimal | ||
1026 | 679 | add_task install ubuntu-core | ||
1027 | 680 | |||
1028 | 681 | # more packages are pulled in via the seed. | ||
1029 | 682 | # (important to remember when comparing to the | ||
1030 | 683 | # livecd-rootfs from ppa:snappy-dev/image) | ||
1031 | 684 | |||
1032 | 685 | case $ARCH in | ||
1033 | 686 | i386) | ||
1034 | 687 | # efi support can go once the task | ||
1035 | 688 | # header is available for grub-efi-ia32-bin | ||
1036 | 689 | add_package install grub-efi-ia32-bin | ||
1037 | 690 | ;; | ||
1038 | 691 | esac | ||
1039 | 692 | |||
1040 | 693 | # generic kernel etc | ||
1041 | 694 | KERNEL_FLAVOURS=none | ||
1042 | 695 | case $ARCH in | ||
1043 | 696 | i386) | ||
1044 | 697 | add_package install grub-pc | ||
1045 | 698 | ;; | ||
1046 | 699 | amd64) | ||
1047 | 700 | add_package install grub-pc-bin | ||
1048 | 701 | add_package install grub-efi-amd64-signed | ||
1049 | 702 | add_package install shim-signed | ||
1050 | 703 | ;; | ||
1051 | 704 | armhf) | ||
1052 | 705 | add_package install flash-kernel u-boot-tools | ||
1053 | 706 | ;; | ||
1054 | 707 | arm64) | ||
1055 | 708 | add_package install u-boot-tools | ||
1056 | 709 | ;; | ||
1057 | 710 | esac | ||
1058 | 711 | OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none --initramfs-compression=none" | ||
1059 | 712 | |||
1060 | 713 | # contains the framework definition | ||
1061 | 714 | add_package install ubuntu-core-libs | ||
1062 | 715 | |||
1063 | 716 | # universe needed for 'system-image-cli' and multiverse for firmware | ||
1064 | 717 | COMPONENTS='main restricted universe multiverse' | ||
1065 | 718 | fi | ||
1066 | 719 | OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" | ||
1067 | 720 | ;; | ||
1068 | 721 | |||
1069 | 722 | ubuntu-base) | ||
1070 | 723 | OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" | ||
1071 | 724 | ;; | ||
1072 | 725 | |||
1073 | 726 | ubuntu-touch|ubuntu-touch-custom) | ||
1074 | 727 | HINTS="packagekit ubuntu-system-settings-online-accounts" | ||
1075 | 728 | case $ARCH in | ||
1076 | 729 | amd64|i386) | ||
1077 | 730 | HINTS="$HINTS qml-module-ubuntu-components-gles unity8" | ||
1078 | 731 | ;; | ||
1079 | 732 | esac | ||
1080 | 733 | add_package install ubuntu-minimal ubuntu-touch $HINTS | ||
1081 | 734 | >>>>>>> MERGE-SOURCE | ||
1082 | 584 | 735 | ||
1083 | 585 | COMPONENTS='main restricted universe' | 736 | COMPONENTS='main restricted universe' |
1084 | 586 | BOOTAPPEND_LIVE='hostname=ubuntu-phablet username=ubuntu' | 737 | BOOTAPPEND_LIVE='hostname=ubuntu-phablet username=ubuntu' |
1085 | @@ -612,6 +763,7 @@ | |||
1086 | 612 | ;; | 763 | ;; |
1087 | 613 | 764 | ||
1088 | 614 | ubuntu-cpc) | 765 | ubuntu-cpc) |
1089 | 766 | <<<<<<< TREE | ||
1090 | 615 | if [ "${SUBPROJECT:-}" = minimized ]; then | 767 | if [ "${SUBPROJECT:-}" = minimized ]; then |
1091 | 616 | add_task install cloud-image | 768 | add_task install cloud-image |
1092 | 617 | add_package install sudo | 769 | add_package install sudo |
1093 | @@ -639,6 +791,35 @@ | |||
1094 | 639 | ;; | 791 | ;; |
1095 | 640 | esac | 792 | esac |
1096 | 641 | fi | 793 | fi |
1097 | 794 | ======= | ||
1098 | 795 | if [ "${SUBPROJECT:-}" = minimized ]; then | ||
1099 | 796 | add_task install cloud-image | ||
1100 | 797 | add_package install sudo | ||
1101 | 798 | # linux-kvm currently only exists in xenial, not in | ||
1102 | 799 | # non-LTS suites. Fall back to virtual flavor, which | ||
1103 | 800 | # may or may not boot initramfsless but enables us to | ||
1104 | 801 | # test building and possibly build derivative images | ||
1105 | 802 | # using other kernel flavors. | ||
1106 | 803 | # If you enable an extra ppa, it is assumed that | ||
1107 | 804 | # linux-kvm is available since you control the | ||
1108 | 805 | # archive and can provide this metapackage as | ||
1109 | 806 | # necessary. | ||
1110 | 807 | if [ "$ARCH" != "amd64" ] || ([ -z "$EXTRA_PPAS" ] && [ "$SUITE" != xenial ]); then | ||
1111 | 808 | KERNEL_FLAVOURS=virtual | ||
1112 | 809 | else | ||
1113 | 810 | KERNEL_FLAVOURS=kvm | ||
1114 | 811 | fi | ||
1115 | 812 | else | ||
1116 | 813 | add_task install minimal standard cloud-image | ||
1117 | 814 | add_package install ubuntu-minimal | ||
1118 | 815 | KERNEL_FLAVOURS=virtual | ||
1119 | 816 | case $ARCH in | ||
1120 | 817 | armhf|arm64|ppc64el|powerpc) | ||
1121 | 818 | add_task install server | ||
1122 | 819 | ;; | ||
1123 | 820 | esac | ||
1124 | 821 | fi | ||
1125 | 822 | >>>>>>> MERGE-SOURCE | ||
1126 | 642 | 823 | ||
1127 | 643 | BINARY_REMOVE_LINUX=false | 824 | BINARY_REMOVE_LINUX=false |
1128 | 644 | OPTS="${OPTS:+$OPTS }--initramfs=none" | 825 | OPTS="${OPTS:+$OPTS }--initramfs=none" |
1129 | @@ -649,6 +830,12 @@ | |||
1130 | 649 | ;; | 830 | ;; |
1131 | 650 | arm64) | 831 | arm64) |
1132 | 651 | add_package install flash-kernel | 832 | add_package install flash-kernel |
1133 | 833 | <<<<<<< TREE | ||
1134 | 834 | ======= | ||
1135 | 835 | ;; | ||
1136 | 836 | powerpc) | ||
1137 | 837 | KERNEL_FLAVOURS=powerpc64-smp | ||
1138 | 838 | >>>>>>> MERGE-SOURCE | ||
1139 | 652 | ;; | 839 | ;; |
1140 | 653 | esac | 840 | esac |
1141 | 654 | OPTS="${OPTS:+$OPTS }--system=normal" | 841 | OPTS="${OPTS:+$OPTS }--system=normal" |
1142 | @@ -772,6 +959,7 @@ | |||
1143 | 772 | ;; | 959 | ;; |
1144 | 773 | esac | 960 | esac |
1145 | 774 | 961 | ||
1146 | 962 | <<<<<<< TREE | ||
1147 | 775 | case $PROJECT:${SUBPROJECT:-} in | 963 | case $PROJECT:${SUBPROJECT:-} in |
1148 | 776 | ubuntu-server:live) | 964 | ubuntu-server:live) |
1149 | 777 | ;; | 965 | ;; |
1150 | @@ -780,6 +968,20 @@ | |||
1151 | 780 | KERNEL_FLAVOURS=none | 968 | KERNEL_FLAVOURS=none |
1152 | 781 | BINARY_REMOVE_LINUX=false | 969 | BINARY_REMOVE_LINUX=false |
1153 | 782 | ;; | 970 | ;; |
1154 | 971 | ======= | ||
1155 | 972 | case $PROJECT in | ||
1156 | 973 | ubuntu-server|ubuntu-core|ubuntu-base|ubuntu-touch|ubuntu-touch-custom) | ||
1157 | 974 | case $SUBPROJECT in | ||
1158 | 975 | system-image) | ||
1159 | 976 | # keep the kernel for the system-image build | ||
1160 | 977 | ;; | ||
1161 | 978 | *) | ||
1162 | 979 | OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none" | ||
1163 | 980 | KERNEL_FLAVOURS=none | ||
1164 | 981 | BINARY_REMOVE_LINUX=false | ||
1165 | 982 | ;; | ||
1166 | 983 | esac | ||
1167 | 984 | >>>>>>> MERGE-SOURCE | ||
1168 | 783 | esac | 985 | esac |
1169 | 784 | 986 | ||
1170 | 785 | add_chroot_hook update-apt-file-cache | 987 | add_chroot_hook update-apt-file-cache |
1171 | @@ -817,8 +1019,13 @@ | |||
1172 | 817 | ${KERNEL_FLAVOURS:+--linux-flavours "$KERNEL_FLAVOURS"} \ | 1019 | ${KERNEL_FLAVOURS:+--linux-flavours "$KERNEL_FLAVOURS"} \ |
1173 | 818 | --initsystem none \ | 1020 | --initsystem none \ |
1174 | 819 | --bootloader "$BOOTLOADER" \ | 1021 | --bootloader "$BOOTLOADER" \ |
1175 | 1022 | <<<<<<< TREE | ||
1176 | 820 | --initramfs-compression "${INITRAMFS_COMPRESSION:-lzma}" \ | 1023 | --initramfs-compression "${INITRAMFS_COMPRESSION:-lzma}" \ |
1177 | 821 | --cache false \ | 1024 | --cache false \ |
1178 | 1025 | ======= | ||
1179 | 1026 | --initramfs-compression lzma \ | ||
1180 | 1027 | --cache false \ | ||
1181 | 1028 | >>>>>>> MERGE-SOURCE | ||
1182 | 822 | ${BOOTAPPEND_LIVE:+--bootappend-live "$BOOTAPPEND_LIVE"} \ | 1029 | ${BOOTAPPEND_LIVE:+--bootappend-live "$BOOTAPPEND_LIVE"} \ |
1183 | 823 | $OPTS \ | 1030 | $OPTS \ |
1184 | 824 | "$@" | 1031 | "$@" |
1185 | @@ -956,7 +1163,11 @@ | |||
1186 | 956 | fi | 1163 | fi |
1187 | 957 | ;; | 1164 | ;; |
1188 | 958 | 1165 | ||
1189 | 1166 | <<<<<<< TREE | ||
1190 | 959 | ubuntu-touch:*|ubuntu-touch-custom:*|ubuntu-core:system-image|ubuntu-desktop-next:system-image|ubuntu-cpc:*|ubuntu-server:live) | 1167 | ubuntu-touch:*|ubuntu-touch-custom:*|ubuntu-core:system-image|ubuntu-desktop-next:system-image|ubuntu-cpc:*|ubuntu-server:live) |
1191 | 1168 | ======= | ||
1192 | 1169 | ubuntu-touch:*|ubuntu-touch-custom:*|ubuntu-core:system-image|ubuntu-desktop-next:system-image|ubuntu-cpc:*) | ||
1193 | 1170 | >>>>>>> MERGE-SOURCE | ||
1194 | 960 | cp -af /usr/share/livecd-rootfs/live-build/${PROJECT}/* \ | 1171 | cp -af /usr/share/livecd-rootfs/live-build/${PROJECT}/* \ |
1195 | 961 | config/ | 1172 | config/ |
1196 | 962 | if [ "$IMAGEFORMAT" = none ]; then | 1173 | if [ "$IMAGEFORMAT" = none ]; then |
1197 | 963 | 1174 | ||
1198 | === added file 'live-build/ubuntu-cpc/functions.OTHER' | |||
1199 | --- live-build/ubuntu-cpc/functions.OTHER 1970-01-01 00:00:00 +0000 | |||
1200 | +++ live-build/ubuntu-cpc/functions.OTHER 2018-03-28 13:08:01 +0000 | |||
1201 | @@ -0,0 +1,320 @@ | |||
1202 | 1 | # vi: ts=4 expandtab syntax=sh | ||
1203 | 2 | |||
1204 | 3 | CLOUD_IMG_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" | ||
1205 | 4 | IMAGE_SIZE=$((2252*1024**2)) # 2.2G (the current size we ship) | ||
1206 | 5 | |||
1207 | 6 | rootfs_dev_mapper= | ||
1208 | 7 | loop_device= | ||
1209 | 8 | loop_raw= | ||
1210 | 9 | backing_img= | ||
1211 | 10 | |||
1212 | 11 | clean_loops() { | ||
1213 | 12 | local kpartx_ret | ||
1214 | 13 | local kpartx_stdout | ||
1215 | 14 | |||
1216 | 15 | if [ -n "${backing_img}" ]; then | ||
1217 | 16 | # sync before removing loop to avoid "Device or resource busy" errors | ||
1218 | 17 | sync | ||
1219 | 18 | kpartx_ret="" | ||
1220 | 19 | kpartx_stdout=$(kpartx -v -d "${backing_img}") || kpartx_ret=$? | ||
1221 | 20 | echo "$kpartx_stdout" | ||
1222 | 21 | if [ -n "$kpartx_ret" ]; then | ||
1223 | 22 | if echo "$kpartx_stdout" | grep -q "loop deleted"; then | ||
1224 | 23 | echo "Suppressing kpartx returning error (#860894)" | ||
1225 | 24 | else | ||
1226 | 25 | exit $kpartx_ret | ||
1227 | 26 | fi | ||
1228 | 27 | fi | ||
1229 | 28 | unset backing_img | ||
1230 | 29 | fi | ||
1231 | 30 | |||
1232 | 31 | if [ -z "${rootfs_dev_mapper}" ]; then | ||
1233 | 32 | return 0 | ||
1234 | 33 | fi | ||
1235 | 34 | |||
1236 | 35 | unset loop_device | ||
1237 | 36 | unset loop_raw | ||
1238 | 37 | unset rootfs_dev_mapper | ||
1239 | 38 | } | ||
1240 | 39 | |||
1241 | 40 | create_empty_disk_image() { | ||
1242 | 41 | # Prepare an empty disk image | ||
1243 | 42 | dd if=/dev/zero of="$1" bs=1 count=0 seek="${IMAGE_SIZE}" | ||
1244 | 43 | } | ||
1245 | 44 | |||
1246 | 45 | make_ext4_partition() { | ||
1247 | 46 | device="$1" | ||
1248 | 47 | |||
1249 | 48 | mkfs.ext4 -F -b 4096 -i 8192 -m 0 -L cloudimg-rootfs -E resize=536870912 "$device" | ||
1250 | 49 | } | ||
1251 | 50 | |||
1252 | 51 | mount_image() { | ||
1253 | 52 | trap clean_loops EXIT | ||
1254 | 53 | backing_img="$1" | ||
1255 | 54 | local rootpart="$2" | ||
1256 | 55 | kpartx_mapping="$(kpartx -s -v -a ${backing_img})" | ||
1257 | 56 | |||
1258 | 57 | # Find the loop device | ||
1259 | 58 | loop_p1="$(echo -e ${kpartx_mapping} | head -n1 | awk '{print$3}')" | ||
1260 | 59 | loop_device="/dev/loop$(echo ${loop_p1} | cut -b5)" | ||
1261 | 60 | if [ ! -b ${loop_device} ]; then | ||
1262 | 61 | echo "unable to find loop device for ${backing_img}" | ||
1263 | 62 | exit 1 | ||
1264 | 63 | fi | ||
1265 | 64 | |||
1266 | 65 | # Find the rootfs location | ||
1267 | 66 | rootfs_dev_mapper="/dev/mapper/${loop_p1%%[0-9]}${rootpart}" | ||
1268 | 67 | if [ ! -b "${rootfs_dev_mapper}" ]; then | ||
1269 | 68 | echo "${rootfs_dev_mapper} is not a block device"; | ||
1270 | 69 | exit 1 | ||
1271 | 70 | fi | ||
1272 | 71 | |||
1273 | 72 | # Add some information to the debug logs | ||
1274 | 73 | echo "Mounted disk image ${backing_img} to ${rootfs_dev_mapper}" | ||
1275 | 74 | blkid ${rootfs_dev_mapper} | ||
1276 | 75 | |||
1277 | 76 | return 0 | ||
1278 | 77 | } | ||
1279 | 78 | |||
1280 | 79 | setup_mountpoint() { | ||
1281 | 80 | local mountpoint="$1" | ||
1282 | 81 | |||
1283 | 82 | mount --rbind --make-rslave /dev "$mountpoint/dev" | ||
1284 | 83 | mount proc-live -t proc "$mountpoint/proc" | ||
1285 | 84 | mount sysfs-live -t sysfs "$mountpoint/sys" | ||
1286 | 85 | mount -t tmpfs none "$mountpoint/tmp" | ||
1287 | 86 | mount -t tmpfs none "$mountpoint/var/lib/apt" | ||
1288 | 87 | mount -t tmpfs none "$mountpoint/var/cache/apt" | ||
1289 | 88 | mv "$mountpoint/etc/resolv.conf" resolv.conf.tmp | ||
1290 | 89 | cp /etc/resolv.conf "$mountpoint/etc/resolv.conf" | ||
1291 | 90 | chroot "$mountpoint" apt-get update | ||
1292 | 91 | |||
1293 | 92 | } | ||
1294 | 93 | |||
1295 | 94 | teardown_mountpoint() { | ||
1296 | 95 | # Reverse the operations from setup_mountpoint | ||
1297 | 96 | local mountpoint="$1" | ||
1298 | 97 | |||
1299 | 98 | # ensure we have exactly one trailing slash, and escape all slashes for awk | ||
1300 | 99 | mountpoint_match=$(echo "$mountpoint" | sed -e's,/$,,; s,/,\\/,g;')'\/' | ||
1301 | 100 | # sort -r ensures that deeper mountpoints are unmounted first | ||
1302 | 101 | for submount in $(awk </proc/self/mounts "\$2 ~ /$mountpoint_match/ \ | ||
1303 | 102 | { print \$2 }" | LC_ALL=C sort -r); do | ||
1304 | 103 | umount $submount | ||
1305 | 104 | done | ||
1306 | 105 | mv resolv.conf.tmp "$mountpoint/etc/resolv.conf" | ||
1307 | 106 | } | ||
1308 | 107 | |||
1309 | 108 | mount_partition() { | ||
1310 | 109 | partition="$1" | ||
1311 | 110 | mountpoint="$2" | ||
1312 | 111 | |||
1313 | 112 | mount "$partition" "$mountpoint" | ||
1314 | 113 | setup_mountpoint "$mountpoint" | ||
1315 | 114 | } | ||
1316 | 115 | |||
1317 | 116 | |||
1318 | 117 | mount_disk_image() { | ||
1319 | 118 | local disk_image=${1} | ||
1320 | 119 | local mountpoint=${2} | ||
1321 | 120 | mount_image ${disk_image} 1 | ||
1322 | 121 | mount_partition "${rootfs_dev_mapper}" $mountpoint | ||
1323 | 122 | |||
1324 | 123 | local uefi_dev="/dev/mapper${loop_device///dev/}p15" | ||
1325 | 124 | if [ -b ${uefi_dev} -a -e $mountpoint/boot/efi ]; then | ||
1326 | 125 | mount "${uefi_dev}" $mountpoint/boot/efi | ||
1327 | 126 | fi | ||
1328 | 127 | |||
1329 | 128 | # This is needed to allow for certain operations | ||
1330 | 129 | # such as updating grub and installing software | ||
1331 | 130 | cat > $mountpoint/usr/sbin/policy-rc.d << EOF | ||
1332 | 131 | #!/bin/sh | ||
1333 | 132 | # ${CLOUD_IMG_STR} | ||
1334 | 133 | echo "All runlevel operations denied by policy" >&2 | ||
1335 | 134 | exit 101 | ||
1336 | 135 | EOF | ||
1337 | 136 | chmod 0755 $mountpoint/usr/sbin/policy-rc.d | ||
1338 | 137 | |||
1339 | 138 | } | ||
1340 | 139 | |||
1341 | 140 | umount_partition() { | ||
1342 | 141 | local mountpoint=${1} | ||
1343 | 142 | teardown_mountpoint $mountpoint | ||
1344 | 143 | umount -R $mountpoint | ||
1345 | 144 | udevadm settle | ||
1346 | 145 | |||
1347 | 146 | if [ -n "${rootfs_dev_mapper}" -a -b "${rootfs_dev_mapper}" ]; then | ||
1348 | 147 | # buildd's don't have /etc/mtab symlinked | ||
1349 | 148 | # /etc/mtab is needed in order zerofree space for ext4 filesystems | ||
1350 | 149 | [ -e /etc/mtab ] || ln -s /proc/mounts /etc/mtab | ||
1351 | 150 | |||
1352 | 151 | # both of these are likely overkill, but it does result in slightly | ||
1353 | 152 | # smaller ext4 filesystem | ||
1354 | 153 | e2fsck -y -E discard ${rootfs_dev_mapper} | ||
1355 | 154 | zerofree ${rootfs_dev_mapper} | ||
1356 | 155 | fi | ||
1357 | 156 | } | ||
1358 | 157 | |||
1359 | 158 | umount_disk_image() { | ||
1360 | 159 | mountpoint="$1" | ||
1361 | 160 | |||
1362 | 161 | local uefi_dev="/dev/mapper${loop_device///dev/}p15" | ||
1363 | 162 | if [ -e "$mountpoint/boot/efi" -a -b "$uefi_dev" ]; then | ||
1364 | 163 | umount --detach-loop "$mountpoint/boot/efi" | ||
1365 | 164 | fi | ||
1366 | 165 | |||
1367 | 166 | if [ -e $mountpoint/usr/sbin/policy-rc.d ]; then | ||
1368 | 167 | rm $mountpoint/usr/sbin/policy-rc.d | ||
1369 | 168 | fi | ||
1370 | 169 | umount_partition $mountpoint | ||
1371 | 170 | clean_loops | ||
1372 | 171 | } | ||
1373 | 172 | |||
1374 | 173 | modify_vmdk_header() { | ||
1375 | 174 | # Modify the VMDK headers so that both VirtualBox _and_ VMware can | ||
1376 | 175 | # read the vmdk and import them. The vodoo here is _not_ documented | ||
1377 | 176 | # anywhere....so this will have to do. This is undocumented vodoo | ||
1378 | 177 | # that has been learned by the Cloud Image team. | ||
1379 | 178 | |||
1380 | 179 | vmdk_name="${1}" | ||
1381 | 180 | descriptor=$(mktemp) | ||
1382 | 181 | newdescriptor=$(mktemp) | ||
1383 | 182 | |||
1384 | 183 | # Extract the vmdk header for manipulation | ||
1385 | 184 | dd if="${vmdk_name}" of="${descriptor}" bs=1 skip=512 count=1024 | ||
1386 | 185 | |||
1387 | 186 | # The sed lines below is where the magic is. Specifically: | ||
1388 | 187 | # ddb.toolsVersion: sets the open-vm-tools so that VMware shows | ||
1389 | 188 | # the tooling as current | ||
1390 | 189 | # ddb.virtualHWVersion: set the version to 7, which covers most | ||
1391 | 190 | # current versions of VMware | ||
1392 | 191 | # createType: make sure its set to stream Optimized | ||
1393 | 192 | # remove the vmdk-stream-converter comment and replace with | ||
1394 | 193 | # # Disk DescriptorFile. This is needed for Virtualbox | ||
1395 | 194 | # remove the comments from vmdk-stream-converter which causes | ||
1396 | 195 | # VirtualBox and others to fail VMDK validation | ||
1397 | 196 | |||
1398 | 197 | sed -e 's|# Description file.*|# Disk DescriptorFile|' \ | ||
1399 | 198 | -e '/# Believe this is random*/d' \ | ||
1400 | 199 | -e '/# Indicates no parent/d' \ | ||
1401 | 200 | -e '/# The Disk Data Base/d' \ | ||
1402 | 201 | -e 's|ddb.comment.*|ddb.toolsVersion = "2147483647"|' \ | ||
1403 | 202 | "${descriptor}" > "${newdescriptor}" | ||
1404 | 203 | |||
1405 | 204 | # The header is cannot be bigger than 1024 | ||
1406 | 205 | expr $(stat --format=%s ${newdescriptor}) \< 1024 > /dev/null 2>&1 || { | ||
1407 | 206 | echo "descriptor is too large, VMDK will be invalid!"; exit 1; } | ||
1408 | 207 | |||
1409 | 208 | # Overwrite the vmdk header with our new, modified one | ||
1410 | 209 | dd conv=notrunc,nocreat \ | ||
1411 | 210 | if="${newdescriptor}" of="${vmdk_name}" \ | ||
1412 | 211 | bs=1 seek=512 count=1024 | ||
1413 | 212 | |||
1414 | 213 | rm ${descriptor} ${newdescriptor} | ||
1415 | 214 | } | ||
1416 | 215 | |||
1417 | 216 | create_vmdk() { | ||
1418 | 217 | # There is no real good way to create a _compressed_ VMDK using open source | ||
1419 | 218 | # tooling that works across multiple VMDK-capable platforms. This functions | ||
1420 | 219 | # uses vmdk-stream-converter and then calls modify_vmdk_header to produce a | ||
1421 | 220 | # compatible VMDK. | ||
1422 | 221 | |||
1423 | 222 | src="$1" | ||
1424 | 223 | destination="$2" | ||
1425 | 224 | size="${3:-10240}" | ||
1426 | 225 | |||
1427 | 226 | streamconverter="/usr/share/pyshared/VMDKstream.py" | ||
1428 | 227 | scratch_d=$(mktemp -d) | ||
1429 | 228 | cp ${src} ${scratch_d}/resize.img | ||
1430 | 229 | |||
1431 | 230 | truncate --size=${size}M ${scratch_d}/resize.img | ||
1432 | 231 | python ${streamconverter} ${scratch_d}/resize.img ${destination} | ||
1433 | 232 | modify_vmdk_header ${destination} | ||
1434 | 233 | |||
1435 | 234 | qemu-img info ${destination} | ||
1436 | 235 | rm -rf ${scratch_d} | ||
1437 | 236 | } | ||
1438 | 237 | |||
1439 | 238 | create_derivative() { | ||
1440 | 239 | # arg1 is the disk type | ||
1441 | 240 | # arg2 is the new name | ||
1442 | 241 | unset derivative_img | ||
1443 | 242 | case ${1} in | ||
1444 | 243 | uefi) disk_image="binary/boot/disk-uefi.ext4"; | ||
1445 | 244 | dname="${disk_image//-uefi/-$2-uefi}";; | ||
1446 | 245 | *) disk_image="binary/boot/disk.ext4"; | ||
1447 | 246 | dname="${disk_image//.ext4/-$2.ext4}";; | ||
1448 | 247 | esac | ||
1449 | 248 | |||
1450 | 249 | if [ ! -e ${disk_image} ]; then | ||
1451 | 250 | echo "Did not find ${disk_image}!"; exit 1; | ||
1452 | 251 | fi | ||
1453 | 252 | |||
1454 | 253 | cp ${disk_image} ${dname} | ||
1455 | 254 | export derivative_img=${dname} | ||
1456 | 255 | } | ||
1457 | 256 | |||
1458 | 257 | convert_to_qcow2() { | ||
1459 | 258 | |||
1460 | 259 | src="$1" | ||
1461 | 260 | destination="$2" | ||
1462 | 261 | qemu-img convert -c -O qcow2 -o compat=0.10 "$src" "$destination" | ||
1463 | 262 | qemu-img info "$destination" | ||
1464 | 263 | } | ||
1465 | 264 | |||
1466 | 265 | replace_grub_root_with_label() { | ||
1467 | 266 | # When update-grub is run, it will detect the disks in the build system. | ||
1468 | 267 | # Instead, we want grub to use the cloudimg-rootfs labelled disk | ||
1469 | 268 | CHROOT_ROOT="$1" | ||
1470 | 269 | |||
1471 | 270 | # If boot by partuuid has been requested, don't override. | ||
1472 | 271 | if [ -f $CHROOT_ROOT/etc/default/grub.d/40-force-partuuid.cfg ] && \ | ||
1473 | 272 | grep -q ^GRUB_FORCE_PARTUUID= $CHROOT_ROOT/etc/default/grub.d/40-force-partuuid.cfg | ||
1474 | 273 | then | ||
1475 | 274 | return 0 | ||
1476 | 275 | fi | ||
1477 | 276 | sed -i -e "s,root=[^ ]*,root=LABEL=cloudimg-rootfs," \ | ||
1478 | 277 | "$CHROOT_ROOT/boot/grub/grub.cfg" | ||
1479 | 278 | } | ||
1480 | 279 | |||
1481 | 280 | |||
1482 | 281 | # When running update-grub in a chroot on a build host, we don't want it to | ||
1483 | 282 | # probe for disks or probe for other installed OSes. Extract common | ||
1484 | 283 | # diversion wrappers, so this isn't reinvented differently for each image. | ||
1485 | 284 | divert_grub() { | ||
1486 | 285 | CHROOT_ROOT="$1" | ||
1487 | 286 | |||
1488 | 287 | chroot "$CHROOT_ROOT" dpkg-divert --local \ | ||
1489 | 288 | --rename /usr/sbin/grub-probe | ||
1490 | 289 | chroot "$CHROOT_ROOT" touch /usr/sbin/grub-probe | ||
1491 | 290 | chroot "$CHROOT_ROOT" chmod +x /usr/sbin/grub-probe | ||
1492 | 291 | |||
1493 | 292 | chroot "$CHROOT_ROOT" dpkg-divert --local \ | ||
1494 | 293 | --divert /etc/grub.d/30_os-prober.dpkg-divert \ | ||
1495 | 294 | --rename /etc/grub.d/30_os-prober | ||
1496 | 295 | |||
1497 | 296 | # Divert systemd-detect-virt; /etc/kernel/postinst.d/zz-update-grub | ||
1498 | 297 | # no-ops if we are in a container, and the launchpad farm runs builds | ||
1499 | 298 | # in lxd. We therefore pretend that we're never in a container (by | ||
1500 | 299 | # exiting 1). | ||
1501 | 300 | chroot "$CHROOT_ROOT" dpkg-divert --local \ | ||
1502 | 301 | --rename /usr/bin/systemd-detect-virt | ||
1503 | 302 | echo "exit 1" > "$CHROOT_ROOT"/usr/bin/systemd-detect-virt | ||
1504 | 303 | chmod +x "$CHROOT_ROOT"/usr/bin/systemd-detect-virt | ||
1505 | 304 | } | ||
1506 | 305 | |||
1507 | 306 | undivert_grub() { | ||
1508 | 307 | CHROOT_ROOT="$1" | ||
1509 | 308 | |||
1510 | 309 | chroot "$CHROOT_ROOT" rm /usr/sbin/grub-probe | ||
1511 | 310 | chroot "$CHROOT_ROOT" dpkg-divert --remove --local \ | ||
1512 | 311 | --rename /usr/sbin/grub-probe | ||
1513 | 312 | |||
1514 | 313 | chroot "$CHROOT_ROOT" dpkg-divert --remove --local \ | ||
1515 | 314 | --divert /etc/grub.d/30_os-prober.dpkg-divert \ | ||
1516 | 315 | --rename /etc/grub.d/30_os-prober | ||
1517 | 316 | |||
1518 | 317 | rm "$CHROOT_ROOT"/usr/bin/systemd-detect-virt | ||
1519 | 318 | chroot "$CHROOT_ROOT" dpkg-divert --remove --local \ | ||
1520 | 319 | --rename /usr/bin/systemd-detect-virt | ||
1521 | 320 | } | ||
1522 | 0 | 321 | ||
1523 | === added file 'live-build/ubuntu-cpc/hooks/030-root-tarball.binary.OTHER' | |||
1524 | --- live-build/ubuntu-cpc/hooks/030-root-tarball.binary.OTHER 1970-01-01 00:00:00 +0000 | |||
1525 | +++ live-build/ubuntu-cpc/hooks/030-root-tarball.binary.OTHER 2018-03-28 13:08:01 +0000 | |||
1526 | @@ -0,0 +1,27 @@ | |||
1527 | 1 | #!/bin/bash -ex | ||
1528 | 2 | |||
1529 | 3 | if [ -n "$SUBARCH" ]; then | ||
1530 | 4 | echo "Skipping rootfs build for subarch flavor build" | ||
1531 | 5 | exit 0 | ||
1532 | 6 | fi | ||
1533 | 7 | |||
1534 | 8 | . config/functions | ||
1535 | 9 | |||
1536 | 10 | mkdir binary/boot/filesystem.dir | ||
1537 | 11 | cp -a chroot/* binary/boot/filesystem.dir | ||
1538 | 12 | |||
1539 | 13 | setup_mountpoint binary/boot/filesystem.dir | ||
1540 | 14 | |||
1541 | 15 | chroot binary/boot/filesystem.dir dpkg-divert --local --rename /usr/sbin/grub-probe | ||
1542 | 16 | chroot binary/boot/filesystem.dir touch /usr/sbin/grub-probe | ||
1543 | 17 | chroot binary/boot/filesystem.dir chmod +x /usr/sbin/grub-probe | ||
1544 | 18 | |||
1545 | 19 | env DEBIAN_FRONTEND=noninteractive chroot binary/boot/filesystem.dir apt-get --purge remove --assume-yes '^linux-.*' 'linux-base+' | ||
1546 | 20 | env DEBIAN_FRONTEND=noninteractive chroot binary/boot/filesystem.dir apt-get --purge remove --assume-yes '^grub-.*' | ||
1547 | 21 | env DEBIAN_FRONTEND=noninteractive chroot binary/boot/filesystem.dir apt-get autoremove --purge --assume-yes | ||
1548 | 22 | chroot binary/boot/filesystem.dir mkdir /lib/modules | ||
1549 | 23 | |||
1550 | 24 | chroot binary/boot/filesystem.dir rm /usr/sbin/grub-probe | ||
1551 | 25 | chroot binary/boot/filesystem.dir dpkg-divert --remove --local --rename /usr/sbin/grub-probe | ||
1552 | 26 | |||
1553 | 27 | teardown_mountpoint binary/boot/filesystem.dir | ||
1554 | 0 | 28 | ||
1555 | === modified file 'live-build/ubuntu-cpc/hooks/032-disk-image.binary' | |||
1556 | --- live-build/ubuntu-cpc/hooks/032-disk-image.binary 2018-03-06 12:58:38 +0000 | |||
1557 | +++ live-build/ubuntu-cpc/hooks/032-disk-image.binary 2018-03-28 13:08:01 +0000 | |||
1558 | @@ -1,11 +1,17 @@ | |||
1559 | 1 | #!/bin/bash -ex | 1 | #!/bin/bash -ex |
1560 | 2 | 2 | ||
1561 | 3 | <<<<<<< TREE | ||
1562 | 3 | IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" | 4 | IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" |
1563 | 4 | FS_LABEL="cloudimg-rootfs" | 5 | FS_LABEL="cloudimg-rootfs" |
1564 | 5 | 6 | ||
1565 | 6 | . config/binary | 7 | . config/binary |
1566 | 7 | 8 | ||
1567 | 8 | . config/functions | 9 | . config/functions |
1568 | 10 | ======= | ||
1569 | 11 | . config/functions | ||
1570 | 12 | |||
1571 | 13 | . config/binary | ||
1572 | 14 | >>>>>>> MERGE-SOURCE | ||
1573 | 9 | 15 | ||
1574 | 10 | BOOTPART_START= | 16 | BOOTPART_START= |
1575 | 11 | BOOTPART_END= | 17 | BOOTPART_END= |
1576 | 12 | 18 | ||
1577 | === modified file 'live-build/ubuntu-cpc/hooks/032-root-squashfs.binary' | |||
1578 | --- live-build/ubuntu-cpc/hooks/032-root-squashfs.binary 2017-11-10 07:49:30 +0000 | |||
1579 | +++ live-build/ubuntu-cpc/hooks/032-root-squashfs.binary 2018-03-28 13:08:01 +0000 | |||
1580 | @@ -17,6 +17,7 @@ | |||
1581 | 17 | exit 0 | 17 | exit 0 |
1582 | 18 | fi | 18 | fi |
1583 | 19 | 19 | ||
1584 | 20 | <<<<<<< TREE | ||
1585 | 20 | . config/functions | 21 | . config/functions |
1586 | 21 | 22 | ||
1587 | 22 | mkdir binary/boot/squashfs.dir | 23 | mkdir binary/boot/squashfs.dir |
1588 | @@ -39,6 +40,8 @@ | |||
1589 | 39 | 40 | ||
1590 | 40 | teardown_mountpoint binary/boot/squashfs.dir | 41 | teardown_mountpoint binary/boot/squashfs.dir |
1591 | 41 | 42 | ||
1592 | 43 | ======= | ||
1593 | 44 | >>>>>>> MERGE-SOURCE | ||
1594 | 42 | squashfs_f="${PWD}/livecd.ubuntu-cpc.squashfs" | 45 | squashfs_f="${PWD}/livecd.ubuntu-cpc.squashfs" |
1595 | 43 | squashfs_f_manifest="${squashfs_f}.manifest" | 46 | squashfs_f_manifest="${squashfs_f}.manifest" |
1596 | 44 | 47 | ||
1597 | 45 | 48 | ||
1598 | === modified file 'live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary' | |||
1599 | --- live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary 2018-03-06 12:58:38 +0000 | |||
1600 | +++ live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary 2018-03-28 13:08:01 +0000 | |||
1601 | @@ -9,12 +9,16 @@ | |||
1602 | 9 | ;; | 9 | ;; |
1603 | 10 | esac | 10 | esac |
1604 | 11 | 11 | ||
1605 | 12 | <<<<<<< TREE | ||
1606 | 12 | IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" | 13 | IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" |
1607 | 13 | FS_LABEL="cloudimg-rootfs" | 14 | FS_LABEL="cloudimg-rootfs" |
1608 | 14 | 15 | ||
1609 | 15 | . config/binary | 16 | . config/binary |
1610 | 16 | 17 | ||
1611 | 17 | . config/functions | 18 | . config/functions |
1612 | 19 | ======= | ||
1613 | 20 | . config/functions | ||
1614 | 21 | >>>>>>> MERGE-SOURCE | ||
1615 | 18 | 22 | ||
1616 | 19 | create_partitions() { | 23 | create_partitions() { |
1617 | 20 | disk_image="$1" | 24 | disk_image="$1" |
1618 | @@ -64,6 +68,7 @@ | |||
1619 | 64 | efi_boot_dir="/boot/efi/EFI/BOOT" | 68 | efi_boot_dir="/boot/efi/EFI/BOOT" |
1620 | 65 | chroot mountpoint mkdir -p "${efi_boot_dir}" | 69 | chroot mountpoint mkdir -p "${efi_boot_dir}" |
1621 | 66 | 70 | ||
1622 | 71 | <<<<<<< TREE | ||
1623 | 67 | if [ "${SUBPROJECT:-}" = minimized ] && [ -n "$partuuid" ]; then | 72 | if [ "${SUBPROJECT:-}" = minimized ] && [ -n "$partuuid" ]; then |
1624 | 68 | # FIXME: code duplicated between 032-disk-image.binary | 73 | # FIXME: code duplicated between 032-disk-image.binary |
1625 | 69 | # and 033-disk-image-uefi.binary. We want to fix this to not | 74 | # and 033-disk-image-uefi.binary. We want to fix this to not |
1626 | @@ -78,9 +83,30 @@ | |||
1627 | 78 | # non-Secure Boot systems. If you need an extra module not already | 83 | # non-Secure Boot systems. If you need an extra module not already |
1628 | 79 | # provided or run into "Secure Boot policy forbids loading X" problems, | 84 | # provided or run into "Secure Boot policy forbids loading X" problems, |
1629 | 80 | # please file a bug against grub2 to include the affected module. | 85 | # please file a bug against grub2 to include the affected module. |
1630 | 86 | ======= | ||
1631 | 87 | if [ "${SUBPROJECT:-}" = minimized ] && [ -n "$partuuid" ]; then | ||
1632 | 88 | # FIXME: code duplicated between 032-disk-image.binary | ||
1633 | 89 | # and 033-disk-image-uefi.binary. We want to fix this to not | ||
1634 | 90 | # have initramfs-tools installed at all on these images. | ||
1635 | 91 | echo "partuuid found for root device; omitting initrd" | ||
1636 | 92 | echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid.cfg | ||
1637 | 93 | fi | ||
1638 | 94 | |||
1639 | 95 | chroot mountpoint apt-get -y update | ||
1640 | 96 | |||
1641 | 97 | # The modules below only make sense on non-Secure Boot UEFI systems. | ||
1642 | 98 | # Otherwise, with Secure Boot enabled GRUB will refuse to load them. | ||
1643 | 99 | # Any modules already in debian/build-efi-images do not need to be listed. | ||
1644 | 100 | # Furthermore, other modules such as terminal, video_* and efi_* are all | ||
1645 | 101 | # already available. | ||
1646 | 102 | >>>>>>> MERGE-SOURCE | ||
1647 | 81 | case $ARCH in | 103 | case $ARCH in |
1648 | 82 | arm64) | 104 | arm64) |
1649 | 83 | chroot mountpoint apt-get -qqy install --no-install-recommends grub-efi-arm64 grub-efi-arm64-bin | 105 | chroot mountpoint apt-get -qqy install --no-install-recommends grub-efi-arm64 grub-efi-arm64-bin |
1650 | 106 | <<<<<<< TREE | ||
1651 | 107 | ======= | ||
1652 | 108 | grub_modules="serial" | ||
1653 | 109 | >>>>>>> MERGE-SOURCE | ||
1654 | 84 | efi_target=arm64-efi | 110 | efi_target=arm64-efi |
1655 | 85 | ;; | 111 | ;; |
1656 | 86 | armhf) | 112 | armhf) |
1657 | @@ -89,10 +115,23 @@ | |||
1658 | 89 | ;; | 115 | ;; |
1659 | 90 | amd64) | 116 | amd64) |
1660 | 91 | chroot mountpoint apt-get install -qqy grub-efi-amd64-signed grub-efi-amd64 shim-signed | 117 | chroot mountpoint apt-get install -qqy grub-efi-amd64-signed grub-efi-amd64 shim-signed |
1661 | 118 | <<<<<<< TREE | ||
1662 | 119 | ======= | ||
1663 | 120 | grub_modules="multiboot serial usb usb_keyboard" | ||
1664 | 121 | >>>>>>> MERGE-SOURCE | ||
1665 | 92 | efi_target=x86_64-efi | 122 | efi_target=x86_64-efi |
1666 | 93 | ;; | 123 | ;; |
1667 | 94 | esac | 124 | esac |
1668 | 95 | 125 | ||
1669 | 126 | <<<<<<< TREE | ||
1670 | 127 | ======= | ||
1671 | 128 | cat << EOF >> mountpoint/etc/default/grub.d/50-cloudimg-settings.cfg | ||
1672 | 129 | ${CLOUD_IMG_STR} | ||
1673 | 130 | # For Cloud Image compatability | ||
1674 | 131 | GRUB_PRELOAD_MODULES="${GRUB_PRELOAD_MODULES:-$grub_modules}" | ||
1675 | 132 | EOF | ||
1676 | 133 | |||
1677 | 134 | >>>>>>> MERGE-SOURCE | ||
1678 | 96 | chroot mountpoint grub-install "${loop_device}" \ | 135 | chroot mountpoint grub-install "${loop_device}" \ |
1679 | 97 | --boot-directory=/boot \ | 136 | --boot-directory=/boot \ |
1680 | 98 | --efi-directory=/boot/efi \ | 137 | --efi-directory=/boot/efi \ |
1681 | 99 | 138 | ||
1682 | === modified file 'live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary' | |||
1683 | --- live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary 2017-12-06 22:22:41 +0000 | |||
1684 | +++ live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary 2018-03-28 13:08:01 +0000 | |||
1685 | @@ -7,12 +7,16 @@ | |||
1686 | 7 | ;; | 7 | ;; |
1687 | 8 | esac | 8 | esac |
1688 | 9 | 9 | ||
1689 | 10 | <<<<<<< TREE | ||
1690 | 10 | IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" | 11 | IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" |
1691 | 11 | FS_LABEL="cloudimg-rootfs" | 12 | FS_LABEL="cloudimg-rootfs" |
1692 | 12 | 13 | ||
1693 | 13 | . config/binary | 14 | . config/binary |
1694 | 14 | 15 | ||
1695 | 15 | . config/functions | 16 | . config/functions |
1696 | 17 | ======= | ||
1697 | 18 | . config/functions | ||
1698 | 19 | >>>>>>> MERGE-SOURCE | ||
1699 | 16 | 20 | ||
1700 | 17 | create_partitions() { | 21 | create_partitions() { |
1701 | 18 | disk_image="$1" | 22 | disk_image="$1" |
1702 | @@ -30,8 +34,13 @@ | |||
1703 | 30 | mkdir mountpoint | 34 | mkdir mountpoint |
1704 | 31 | mount_partition "${rootfs_dev_mapper}" mountpoint | 35 | mount_partition "${rootfs_dev_mapper}" mountpoint |
1705 | 32 | 36 | ||
1706 | 37 | <<<<<<< TREE | ||
1707 | 33 | chroot mountpoint apt-get -qqy update | 38 | chroot mountpoint apt-get -qqy update |
1708 | 34 | chroot mountpoint apt-get -qqy install grub-ieee1275 | 39 | chroot mountpoint apt-get -qqy install grub-ieee1275 |
1709 | 40 | ======= | ||
1710 | 41 | chroot mountpoint apt-get -qqy update | ||
1711 | 42 | chroot mountpoint apt-get -qqy install grub2 | ||
1712 | 43 | >>>>>>> MERGE-SOURCE | ||
1713 | 35 | chroot mountpoint apt-get -qqy remove --purge grub-legacy-ec2 | 44 | chroot mountpoint apt-get -qqy remove --purge grub-legacy-ec2 |
1714 | 36 | 45 | ||
1715 | 37 | # set the kernel commandline to use hvc0 | 46 | # set the kernel commandline to use hvc0 |
1716 | 38 | 47 | ||
1717 | === modified file 'live-build/ubuntu-cpc/hooks/040-qcow2-image.binary' | |||
1718 | --- live-build/ubuntu-cpc/hooks/040-qcow2-image.binary 2017-11-20 20:18:33 +0000 | |||
1719 | +++ live-build/ubuntu-cpc/hooks/040-qcow2-image.binary 2018-03-28 13:08:01 +0000 | |||
1720 | @@ -18,7 +18,16 @@ | |||
1721 | 18 | ;; | 18 | ;; |
1722 | 19 | esac | 19 | esac |
1723 | 20 | 20 | ||
1725 | 21 | . config/functions | 21 | <<<<<<< TREE |
1726 | 22 | . config/functions | ||
1727 | 23 | ======= | ||
1728 | 24 | |||
1729 | 25 | . config/functions | ||
1730 | 26 | |||
1731 | 27 | if [ -f binary/boot/disk.ext4 ]; then | ||
1732 | 28 | convert_to_qcow2 binary/boot/disk.ext4 livecd.ubuntu-cpc.disk1.img | ||
1733 | 29 | fi | ||
1734 | 30 | >>>>>>> MERGE-SOURCE | ||
1735 | 22 | 31 | ||
1736 | 23 | if [ -f binary/boot/disk-uefi.ext4 ]; then | 32 | if [ -f binary/boot/disk-uefi.ext4 ]; then |
1737 | 24 | convert_to_qcow2 binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.img | 33 | convert_to_qcow2 binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.img |
1738 | 25 | 34 | ||
1739 | === modified file 'live-build/ubuntu-cpc/hooks/040-vmdk-image.binary' | |||
1740 | --- live-build/ubuntu-cpc/hooks/040-vmdk-image.binary 2018-03-20 18:30:27 +0000 | |||
1741 | +++ live-build/ubuntu-cpc/hooks/040-vmdk-image.binary 2018-03-28 13:08:01 +0000 | |||
1742 | @@ -3,14 +3,27 @@ | |||
1743 | 3 | # | 3 | # |
1744 | 4 | # Generate VMDK files | 4 | # Generate VMDK files |
1745 | 5 | 5 | ||
1754 | 6 | case ${SUBPROJECT:-} in | 6 | <<<<<<< TREE |
1755 | 7 | minimized) | 7 | case ${SUBPROJECT:-} in |
1756 | 8 | echo "Skipping minimized $0 build as images won't boot with linux-kvm" | 8 | minimized) |
1757 | 9 | exit 0 | 9 | echo "Skipping minimized $0 build as images won't boot with linux-kvm" |
1758 | 10 | ;; | 10 | exit 0 |
1759 | 11 | *) | 11 | ;; |
1760 | 12 | ;; | 12 | *) |
1761 | 13 | esac | 13 | ;; |
1762 | 14 | esac | ||
1763 | 15 | ======= | ||
1764 | 16 | case ${SUBPROJECT:-} in | ||
1765 | 17 | minimized) | ||
1766 | 18 | echo "Skipping minimized $0 build as images won't boot with linux-kvm" | ||
1767 | 19 | exit 0 | ||
1768 | 20 | ;; | ||
1769 | 21 | *) | ||
1770 | 22 | ;; | ||
1771 | 23 | esac | ||
1772 | 24 | |||
1773 | 25 | extension="disk1.vmdk" | ||
1774 | 26 | >>>>>>> MERGE-SOURCE | ||
1775 | 14 | 27 | ||
1776 | 15 | case $ARCH in | 28 | case $ARCH in |
1777 | 16 | amd64) ;; | 29 | amd64) ;; |
1778 | @@ -18,6 +31,7 @@ | |||
1779 | 18 | exit 0;; | 31 | exit 0;; |
1780 | 19 | esac | 32 | esac |
1781 | 20 | 33 | ||
1782 | 34 | <<<<<<< TREE | ||
1783 | 21 | case ${IMAGE_TARGETS:-} in | 35 | case ${IMAGE_TARGETS:-} in |
1784 | 22 | ""|*vmdk*) | 36 | ""|*vmdk*) |
1785 | 23 | ;; | 37 | ;; |
1786 | @@ -26,6 +40,9 @@ | |||
1787 | 26 | exit 0 | 40 | exit 0 |
1788 | 27 | ;; | 41 | ;; |
1789 | 28 | esac | 42 | esac |
1790 | 43 | ======= | ||
1791 | 44 | . config/functions | ||
1792 | 45 | >>>>>>> MERGE-SOURCE | ||
1793 | 29 | 46 | ||
1794 | 30 | . config/functions | 47 | . config/functions |
1795 | 31 | 48 | ||
1796 | 32 | 49 | ||
1797 | === modified file 'live-build/ubuntu-cpc/hooks/041-vmdk-ova-image.binary' | |||
1798 | --- live-build/ubuntu-cpc/hooks/041-vmdk-ova-image.binary 2018-03-20 18:30:27 +0000 | |||
1799 | +++ live-build/ubuntu-cpc/hooks/041-vmdk-ova-image.binary 2018-03-28 13:08:01 +0000 | |||
1800 | @@ -9,20 +9,36 @@ | |||
1801 | 9 | # | 9 | # |
1802 | 10 | # For this step, we re-use the VMDK's made in 040-vmdk-image.binary | 10 | # For this step, we re-use the VMDK's made in 040-vmdk-image.binary |
1803 | 11 | 11 | ||
1817 | 12 | case ${SUBPROJECT:-} in | 12 | <<<<<<< TREE |
1818 | 13 | minimized) | 13 | case ${SUBPROJECT:-} in |
1819 | 14 | echo "Skipping minimized $0 build as images won't boot with linux-kvm" | 14 | minimized) |
1820 | 15 | exit 0 | 15 | echo "Skipping minimized $0 build as images won't boot with linux-kvm" |
1821 | 16 | ;; | 16 | exit 0 |
1822 | 17 | *) | 17 | ;; |
1823 | 18 | ;; | 18 | *) |
1824 | 19 | esac | 19 | ;; |
1825 | 20 | 20 | esac | |
1826 | 21 | 21 | ||
1827 | 22 | # Switch on $ARCH to determine which ID and description to use in the produced | 22 | |
1828 | 23 | # OVF. We have fancy Ubuntu-specific IDs in the OVF specification, we might as | 23 | # Switch on $ARCH to determine which ID and description to use in the produced |
1829 | 24 | # well use them. | 24 | # OVF. We have fancy Ubuntu-specific IDs in the OVF specification, we might as |
1830 | 25 | # well use them. | ||
1831 | 26 | ======= | ||
1832 | 27 | case ${SUBPROJECT:-} in | ||
1833 | 28 | minimized) | ||
1834 | 29 | echo "Skipping minimized $0 build as images won't boot with linux-kvm" | ||
1835 | 30 | exit 0 | ||
1836 | 31 | ;; | ||
1837 | 32 | *) | ||
1838 | 33 | ;; | ||
1839 | 34 | esac | ||
1840 | 35 | |||
1841 | 36 | # Switch on $ARCH to determine which ID and description to use in the produced | ||
1842 | 37 | # OVF. We have fancy Ubuntu-specific IDs in the OVF specification, we might as | ||
1843 | 38 | # well use them. | ||
1844 | 39 | >>>>>>> MERGE-SOURCE | ||
1845 | 25 | case $ARCH in | 40 | case $ARCH in |
1846 | 41 | <<<<<<< TREE | ||
1847 | 26 | amd64) | 42 | amd64) |
1848 | 27 | ovf_id=94 | 43 | ovf_id=94 |
1849 | 28 | ovf_os_type="ubuntu64Guest" | 44 | ovf_os_type="ubuntu64Guest" |
1850 | @@ -41,6 +57,21 @@ | |||
1851 | 41 | ;; | 57 | ;; |
1852 | 42 | esac | 58 | esac |
1853 | 43 | 59 | ||
1854 | 60 | ======= | ||
1855 | 61 | amd64) | ||
1856 | 62 | ovf_id=94 | ||
1857 | 63 | ovf_os_type="ubuntu64Guest" | ||
1858 | 64 | ovf_desc_bits=64 ;; | ||
1859 | 65 | i386) | ||
1860 | 66 | ovf_id=93 | ||
1861 | 67 | ovf_os_type="ubuntu32Guest" | ||
1862 | 68 | ovf_desc_bits=32 ;; | ||
1863 | 69 | *) | ||
1864 | 70 | echo "OVA images are not supported for $ARCH yet."; | ||
1865 | 71 | exit 0;; | ||
1866 | 72 | esac | ||
1867 | 73 | |||
1868 | 74 | >>>>>>> MERGE-SOURCE | ||
1869 | 44 | cur_d=${PWD} | 75 | cur_d=${PWD} |
1870 | 45 | my_d=$(dirname $(readlink -f ${0})) | 76 | my_d=$(dirname $(readlink -f ${0})) |
1871 | 46 | 77 | ||
1872 | 47 | 78 | ||
1873 | === modified file 'live-build/ubuntu-cpc/hooks/042-vagrant.binary' | |||
1874 | --- live-build/ubuntu-cpc/hooks/042-vagrant.binary 2018-03-20 18:30:27 +0000 | |||
1875 | +++ live-build/ubuntu-cpc/hooks/042-vagrant.binary 2018-03-28 13:08:01 +0000 | |||
1876 | @@ -3,6 +3,7 @@ | |||
1877 | 3 | # | 3 | # |
1878 | 4 | # Generate a generic Vagrant Box. | 4 | # Generate a generic Vagrant Box. |
1879 | 5 | # | 5 | # |
1880 | 6 | <<<<<<< TREE | ||
1881 | 6 | # Vagrant images are essentially nothing more than OVA's with extra-metadata | 7 | # Vagrant images are essentially nothing more than OVA's with extra-metadata |
1882 | 7 | # and some preinstalled packages. | 8 | # and some preinstalled packages. |
1883 | 8 | # | 9 | # |
1884 | @@ -32,6 +33,28 @@ | |||
1885 | 32 | exit 0 | 33 | exit 0 |
1886 | 33 | ;; | 34 | ;; |
1887 | 34 | esac | 35 | esac |
1888 | 36 | ======= | ||
1889 | 37 | # Vagrant images are essentially nothing more than OVA's with extra-metadata | ||
1890 | 38 | # and some preinstalled packages. | ||
1891 | 39 | # | ||
1892 | 40 | # We can't use the OVA's for Vagrant since Vagrant uses SSH to modify the | ||
1893 | 41 | # instance. This build step creates a cloud-config ISO so that Cloud-Init | ||
1894 | 42 | # will configure the initial user, creates meta-data that tells Vagrant how | ||
1895 | 43 | # to interact with the cloud-init created users, and finally create the OVA. | ||
1896 | 44 | # | ||
1897 | 45 | # For this step, we make a deriviative of binary/boot/disk.ext4 and install | ||
1898 | 46 | # some packages in it, convert it to a vmdk, and then assemble the vagrant | ||
1899 | 47 | # box. | ||
1900 | 48 | |||
1901 | 49 | case ${SUBPROJECT:-} in | ||
1902 | 50 | minimized) | ||
1903 | 51 | echo "Skipping minimized $0 build as images won't boot with linux-kvm" | ||
1904 | 52 | exit 0 | ||
1905 | 53 | ;; | ||
1906 | 54 | *) | ||
1907 | 55 | ;; | ||
1908 | 56 | esac | ||
1909 | 57 | >>>>>>> MERGE-SOURCE | ||
1910 | 35 | 58 | ||
1911 | 36 | cur_d=${PWD} | 59 | cur_d=${PWD} |
1912 | 37 | my_d=$(dirname $(readlink -f ${0})) | 60 | my_d=$(dirname $(readlink -f ${0})) |
1913 | @@ -40,13 +63,27 @@ | |||
1914 | 40 | # OVF. We have fancy Ubuntu-specific IDs in the OVF specification, we might as | 63 | # OVF. We have fancy Ubuntu-specific IDs in the OVF specification, we might as |
1915 | 41 | # well use them. | 64 | # well use them. |
1916 | 42 | case $ARCH in | 65 | case $ARCH in |
1924 | 43 | amd64) | 66 | <<<<<<< TREE |
1925 | 44 | ovf_id=94 | 67 | amd64) |
1926 | 45 | ovf_os_type="ubuntu64Guest" | 68 | ovf_id=94 |
1927 | 46 | ovf_desc_bits=64 ;; | 69 | ovf_os_type="ubuntu64Guest" |
1928 | 47 | *) | 70 | ovf_desc_bits=64 ;; |
1929 | 48 | echo "Vagrant images are not supported for $ARCH yet." | 71 | *) |
1930 | 49 | exit 0;; | 72 | echo "Vagrant images are not supported for $ARCH yet." |
1931 | 73 | exit 0;; | ||
1932 | 74 | ======= | ||
1933 | 75 | amd64) | ||
1934 | 76 | ovf_id=94 | ||
1935 | 77 | ovf_os_type="ubuntu64Guest" | ||
1936 | 78 | ovf_desc_bits=64 ;; | ||
1937 | 79 | i386) | ||
1938 | 80 | ovf_id=93 | ||
1939 | 81 | ovf_os_type="ubuntu32Guest" | ||
1940 | 82 | ovf_desc_bits=32 ;; | ||
1941 | 83 | *) | ||
1942 | 84 | echo "Vagrant images are not supported for $ARCH yet." | ||
1943 | 85 | exit 0;; | ||
1944 | 86 | >>>>>>> MERGE-SOURCE | ||
1945 | 50 | esac | 87 | esac |
1946 | 51 | 88 | ||
1947 | 52 | . config/functions | 89 | . config/functions |
1948 | @@ -54,49 +91,97 @@ | |||
1949 | 54 | # Lets be safe about this | 91 | # Lets be safe about this |
1950 | 55 | box_d=$(mktemp -d) | 92 | box_d=$(mktemp -d) |
1951 | 56 | seed_d=$(mktemp -d) | 93 | seed_d=$(mktemp -d) |
1995 | 57 | mount_d=$(mktemp -d) | 94 | <<<<<<< TREE |
1996 | 58 | 95 | mount_d=$(mktemp -d) | |
1997 | 59 | create_derivative "disk" "vagrant" #sets ${derivative_img} | 96 | |
1998 | 60 | mount_disk_image ${derivative_img} ${mount_d} | 97 | create_derivative "disk" "vagrant" #sets ${derivative_img} |
1999 | 61 | 98 | mount_disk_image ${derivative_img} ${mount_d} | |
2000 | 62 | cleanup_vagrant() { | 99 | |
2001 | 63 | if [ -d "$mount_d" ]; then | 100 | cleanup_vagrant() { |
2002 | 64 | umount_disk_image "$mount_d" | 101 | if [ -d "$mount_d" ]; then |
2003 | 65 | fi | 102 | umount_disk_image "$mount_d" |
2004 | 66 | rm -rf ${box_d} ${seed_d} ${mount_d} ${derivative_img} | 103 | fi |
2005 | 67 | } | 104 | rm -rf ${box_d} ${seed_d} ${mount_d} ${derivative_img} |
2006 | 68 | trap cleanup_vagrant EXIT | 105 | } |
2007 | 69 | 106 | trap cleanup_vagrant EXIT | |
2008 | 70 | chroot ${mount_d} apt-get update | 107 | |
2009 | 71 | # virtualbox-guest-utils Recommends: virtualbox-guest-x11, which we want to | 108 | chroot ${mount_d} apt-get update |
2010 | 72 | # avoid pulling into a cloud image. | 109 | # virtualbox-guest-utils Recommends: virtualbox-guest-x11, which we want to |
2011 | 73 | chroot ${mount_d} apt-get install --no-install-recommends -y virtualbox-guest-utils | 110 | # avoid pulling into a cloud image. |
2012 | 74 | chroot ${mount_d} apt-get clean | 111 | chroot ${mount_d} apt-get install --no-install-recommends -y virtualbox-guest-utils |
2013 | 75 | 112 | chroot ${mount_d} apt-get clean | |
2014 | 76 | # Create and setup users inside the image. | 113 | |
2015 | 77 | # Vagrant users expect a "vagrant" user with a "vagrant" username. | 114 | # Create and setup users inside the image. |
2016 | 78 | # See https://www.vagrantup.com/docs/boxes/base.html | 115 | # Vagrant users expect a "vagrant" user with a "vagrant" username. |
2017 | 79 | # Note: We decided NOT to allow root login with a default password. | 116 | # See https://www.vagrantup.com/docs/boxes/base.html |
2018 | 80 | chroot ${mount_d} adduser vagrant --disabled-password --gecos "" | 117 | # Note: We decided NOT to allow root login with a default password. |
2019 | 81 | echo "vagrant:vagrant" | chroot ${mount_d} chpasswd | 118 | chroot ${mount_d} adduser vagrant --disabled-password --gecos "" |
2020 | 82 | 119 | echo "vagrant:vagrant" | chroot ${mount_d} chpasswd | |
2021 | 83 | # The vagrant user should have passwordless sudo. | 120 | |
2022 | 84 | cat << EOF > ${mount_d}/etc/sudoers.d/vagrant | 121 | # The vagrant user should have passwordless sudo. |
2023 | 85 | vagrant ALL=(ALL) NOPASSWD:ALL | 122 | cat << EOF > ${mount_d}/etc/sudoers.d/vagrant |
2024 | 86 | EOF | 123 | vagrant ALL=(ALL) NOPASSWD:ALL |
2025 | 87 | 124 | EOF | |
2026 | 88 | # Add the insecure vagrant pubkey to the vagrant user, as is expected by the | 125 | |
2027 | 89 | # vagrant ecosystem (https://www.vagrantup.com/docs/boxes/base.html) | 126 | # Add the insecure vagrant pubkey to the vagrant user, as is expected by the |
2028 | 90 | chroot ${mount_d} chmod 0440 /etc/sudoers.d/vagrant | 127 | # vagrant ecosystem (https://www.vagrantup.com/docs/boxes/base.html) |
2029 | 91 | chroot ${mount_d} mkdir -p /home/vagrant/.ssh | 128 | chroot ${mount_d} chmod 0440 /etc/sudoers.d/vagrant |
2030 | 92 | cat << EOF > ${mount_d}/home/vagrant/.ssh/authorized_keys | 129 | chroot ${mount_d} mkdir -p /home/vagrant/.ssh |
2031 | 93 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key | 130 | cat << EOF > ${mount_d}/home/vagrant/.ssh/authorized_keys |
2032 | 94 | EOF | 131 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key |
2033 | 95 | chroot ${mount_d} chown -R vagrant:vagrant /home/vagrant/.ssh | 132 | EOF |
2034 | 96 | chroot ${mount_d} chmod 700 /home/vagrant/.ssh | 133 | chroot ${mount_d} chown -R vagrant:vagrant /home/vagrant/.ssh |
2035 | 97 | 134 | chroot ${mount_d} chmod 700 /home/vagrant/.ssh | |
2036 | 98 | umount_disk_image "$mount_d" | 135 | |
2037 | 99 | rmdir "$mount_d" | 136 | umount_disk_image "$mount_d" |
2038 | 137 | rmdir "$mount_d" | ||
2039 | 138 | ======= | ||
2040 | 139 | mount_d=$(mktemp -d) | ||
2041 | 140 | |||
2042 | 141 | create_derivative "disk" "vagrant" #sets ${derivative_img} | ||
2043 | 142 | mount_disk_image ${derivative_img} ${mount_d} | ||
2044 | 143 | |||
2045 | 144 | cleanup_vagrant() { | ||
2046 | 145 | if [ -d "$mount_d" ]; then | ||
2047 | 146 | umount_disk_image "$mount_d" | ||
2048 | 147 | fi | ||
2049 | 148 | rm -rf ${box_d} ${seed_d} ${mount_d} ${derivative_img} | ||
2050 | 149 | } | ||
2051 | 150 | trap cleanup_vagrant EXIT | ||
2052 | 151 | |||
2053 | 152 | chroot ${mount_d} apt-get update | ||
2054 | 153 | # virtualbox-guest-utils Recommends: virtualbox-guest-x11, which we want to | ||
2055 | 154 | # avoid pulling into a cloud image. | ||
2056 | 155 | chroot ${mount_d} apt-get install --no-install-recommends -y virtualbox-guest-utils | ||
2057 | 156 | chroot ${mount_d} apt-get clean | ||
2058 | 157 | |||
2059 | 158 | # Create and setup users inside the image. | ||
2060 | 159 | # Vagrant users expect a "vagrant" user with a "vagrant" username. | ||
2061 | 160 | # See https://www.vagrantup.com/docs/boxes/base.html | ||
2062 | 161 | # Note: We decided NOT to allow root login with a default password. | ||
2063 | 162 | # --disabled-password and --gecos need to be passed to avoid adduser | ||
2064 | 163 | # asking questions when running in an interactive shell | ||
2065 | 164 | chroot ${mount_d} adduser vagrant --disabled-password --gecos "" | ||
2066 | 165 | echo "vagrant:vagrant" | chroot ${mount_d} chpasswd | ||
2067 | 166 | |||
2068 | 167 | # The vagrant user should have passwordless sudo. | ||
2069 | 168 | cat << EOF > ${mount_d}/etc/sudoers.d/vagrant | ||
2070 | 169 | vagrant ALL=(ALL) NOPASSWD:ALL | ||
2071 | 170 | EOF | ||
2072 | 171 | |||
2073 | 172 | # Add the insecure vagrant pubkey to the vagrant user, as is expected by the | ||
2074 | 173 | # vagrant ecosystem (https://www.vagrantup.com/docs/boxes/base.html) | ||
2075 | 174 | chroot ${mount_d} chmod 0440 /etc/sudoers.d/vagrant | ||
2076 | 175 | chroot ${mount_d} mkdir -p /home/vagrant/.ssh | ||
2077 | 176 | cat << EOF > ${mount_d}/home/vagrant/.ssh/authorized_keys | ||
2078 | 177 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key | ||
2079 | 178 | EOF | ||
2080 | 179 | chroot ${mount_d} chown -R vagrant:vagrant /home/vagrant/.ssh | ||
2081 | 180 | chroot ${mount_d} chmod 700 /home/vagrant/.ssh | ||
2082 | 181 | |||
2083 | 182 | umount_disk_image "$mount_d" | ||
2084 | 183 | rmdir "$mount_d" | ||
2085 | 184 | >>>>>>> MERGE-SOURCE | ||
2086 | 100 | 185 | ||
2087 | 101 | # Used to identify bits | 186 | # Used to identify bits |
2088 | 102 | suite=$(chroot chroot lsb_release -c -s) | 187 | suite=$(chroot chroot lsb_release -c -s) |
2089 | 103 | 188 | ||
2090 | === added file 'live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot' | |||
2091 | --- live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot 1970-01-01 00:00:00 +0000 | |||
2092 | +++ live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot 2018-03-28 13:08:01 +0000 | |||
2093 | @@ -0,0 +1,9 @@ | |||
2094 | 1 | #!/bin/bash | ||
2095 | 2 | # | ||
2096 | 3 | # Set InitiatorName to be runtime generated when iscsid first starts, so | ||
2097 | 4 | # that each cloud image gets a unique value | ||
2098 | 5 | # | ||
2099 | 6 | |||
2100 | 7 | if [ -f /etc/iscsi/initiatorname.iscsi ]; then | ||
2101 | 8 | echo "GenerateName=yes" > /etc/iscsi/initiatorname.iscsi | ||
2102 | 9 | fi | ||
2103 | 0 | 10 | ||
2104 | === renamed file 'live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot' => 'live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot.moved' | |||
2105 | === modified file 'live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot' | |||
2106 | --- live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot 2017-10-19 01:11:53 +0000 | |||
2107 | +++ live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot 2018-03-28 13:08:01 +0000 | |||
2108 | @@ -59,6 +59,7 @@ | |||
2109 | 59 | _xchroot "${rootd}" sh -c 'rm -f /etc/ssh/ssh_host_[rd]sa_key*' | 59 | _xchroot "${rootd}" sh -c 'rm -f /etc/ssh/ssh_host_[rd]sa_key*' |
2110 | 60 | 60 | ||
2111 | 61 | ## -------------- | 61 | ## -------------- |
2112 | 62 | <<<<<<< TREE | ||
2113 | 62 | if [ "${SUBPROJECT:-}" != minimized ]; then | 63 | if [ "${SUBPROJECT:-}" != minimized ]; then |
2114 | 63 | _xchroot "${rootd}" locale-gen en_US.utf8 | 64 | _xchroot "${rootd}" locale-gen en_US.utf8 |
2115 | 64 | fi | 65 | fi |
2116 | @@ -68,6 +69,11 @@ | |||
2117 | 68 | # should be C.UTF-8 for 17.10 and later. For earlier releases, cloud-init may | 69 | # should be C.UTF-8 for 17.10 and later. For earlier releases, cloud-init may |
2118 | 69 | # override this. | 70 | # override this. |
2119 | 70 | echo LANG="C.UTF-8" > "${rootd}/etc/default/locale" | 71 | echo LANG="C.UTF-8" > "${rootd}/etc/default/locale" |
2120 | 72 | ======= | ||
2121 | 73 | if [ "${SUBPROJECT:-}" != minimized ]; then | ||
2122 | 74 | _xchroot "${rootd}" locale-gen en_US.utf8 | ||
2123 | 75 | fi | ||
2124 | 76 | >>>>>>> MERGE-SOURCE | ||
2125 | 71 | 77 | ||
2126 | 72 | ## -------------- | 78 | ## -------------- |
2127 | 73 | # set cloud-init to be on | 79 | # set cloud-init to be on |
2128 | @@ -130,6 +136,7 @@ | |||
2129 | 130 | } > "${rootd}/etc/overlayroot.local.conf" | 136 | } > "${rootd}/etc/overlayroot.local.conf" |
2130 | 131 | fi | 137 | fi |
2131 | 132 | 138 | ||
2132 | 139 | <<<<<<< TREE | ||
2133 | 133 | # previous steps may have left a dangling symlink here with | 140 | # previous steps may have left a dangling symlink here with |
2134 | 134 | # SUBPROJECT=minimized and that breaks lb_chroot_hacks step | 141 | # SUBPROJECT=minimized and that breaks lb_chroot_hacks step |
2135 | 135 | if [ -L "${rootd}/boot/initrd.img" ] && [ ! -e "${rootd}/boot/initrd.img" ]; then | 142 | if [ -L "${rootd}/boot/initrd.img" ] && [ ! -e "${rootd}/boot/initrd.img" ]; then |
2136 | @@ -156,6 +163,34 @@ | |||
2137 | 156 | 163 | ||
2138 | 157 | _xchroot "${rootd}" apt clean | 164 | _xchroot "${rootd}" apt clean |
2139 | 158 | fi | 165 | fi |
2140 | 166 | ======= | ||
2141 | 167 | # previous steps may have left a dangling symlink here with | ||
2142 | 168 | # SUBPROJECT=minimized and that breaks lb_chroot_hacks step | ||
2143 | 169 | if [ -L "${rootd}/boot/initrd.img" ] && [ ! -e "${rootd}/boot/initrd.img" ]; then | ||
2144 | 170 | rm "${rootd}/boot/initrd.img" | ||
2145 | 171 | fi | ||
2146 | 172 | |||
2147 | 173 | if [ "${SUBPROJECT:-}" = minimized ]; then | ||
2148 | 174 | # Remove various packages that we don't want in the minimized images. | ||
2149 | 175 | # Some of these are tools that don't make sense by default | ||
2150 | 176 | # non-interactively; some are libraries whose reverse-dependencies | ||
2151 | 177 | # will have already been removed; open-vm-tools, it's a bug that this | ||
2152 | 178 | # is in the common cloud seed because this should only be included | ||
2153 | 179 | # in VMWare guest images, and we know none of the minimized images | ||
2154 | 180 | # are targeted at VMWare. | ||
2155 | 181 | _xchroot "${rootd}" env DEBIAN_FRONTEND=noninteractive \ | ||
2156 | 182 | apt-mark auto '^lib.*' '^python*' vim-runtime 2>/dev/null | ||
2157 | 183 | # FIXME: iso-codes is a dep of software-properties and shouldn't be | ||
2158 | 184 | _xchroot "${rootd}" env DEBIAN_FRONTEND=noninteractive \ | ||
2159 | 185 | apt-get -y autoremove --purge iso-codes xauth pastebinit \ | ||
2160 | 186 | plymouth open-vm-tools git shared-mime-info vim vim-common \ | ||
2161 | 187 | console-setup ncurses-term tmux screen policykit-1 \ | ||
2162 | 188 | xdg-user-dirs less run-one apport-symptoms \ | ||
2163 | 189 | ubuntu-cloudimage-keyring file | ||
2164 | 190 | |||
2165 | 191 | _xchroot "${rootd}" apt clean | ||
2166 | 192 | fi | ||
2167 | 193 | >>>>>>> MERGE-SOURCE | ||
2168 | 159 | 194 | ||
2169 | 160 | #### END COMMON ARCH FUNCTIONS | 195 | #### END COMMON ARCH FUNCTIONS |
2170 | 161 | 196 | ||
2171 | 162 | 197 | ||
2172 | === modified file 'live-build/ubuntu-cpc/hooks/999-extras.binary' | |||
2173 | --- live-build/ubuntu-cpc/hooks/999-extras.binary 2017-04-13 17:54:14 +0000 | |||
2174 | +++ live-build/ubuntu-cpc/hooks/999-extras.binary 2018-03-28 13:08:01 +0000 | |||
2175 | @@ -8,9 +8,14 @@ | |||
2176 | 8 | exit 0 | 8 | exit 0 |
2177 | 9 | fi | 9 | fi |
2178 | 10 | 10 | ||
2179 | 11 | <<<<<<< TREE | ||
2180 | 11 | export IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" | 12 | export IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" |
2181 | 12 | export CLOUD_IMG_STR="$IMAGE_STR" | 13 | export CLOUD_IMG_STR="$IMAGE_STR" |
2182 | 13 | export FS_LABEL="cloudimg-rootfs" | 14 | export FS_LABEL="cloudimg-rootfs" |
2183 | 15 | ======= | ||
2184 | 16 | # Export the common functions to the extras | ||
2185 | 17 | . config/functions | ||
2186 | 18 | >>>>>>> MERGE-SOURCE | ||
2187 | 14 | 19 | ||
2188 | 15 | # Cleaner execution | 20 | # Cleaner execution |
2189 | 16 | /bin/run-parts --exit-on-error --regex ".*\.binary" "${extra_d}" | 21 | /bin/run-parts --exit-on-error --regex ".*\.binary" "${extra_d}" |
2190 | 17 | 22 | ||
2191 | === added symlink 'live-build/ubuntu-touch-custom' | |||
2192 | === target is u'ubuntu-touch/' | |||
2193 | === renamed symlink 'live-build/ubuntu-touch-custom' => 'live-build/ubuntu-touch-custom.moved' | |||
2194 | === modified file 'live-build/ubuntu-touch/hooks/00-uid-gid-fix.chroot_early' |