Merge lp:~ltrager/maas-images/kernels into lp:maas-images

Proposed by Lee Trager
Status: Merged
Merged at revision: 321
Proposed branch: lp:~ltrager/maas-images/kernels
Merge into: lp:maas-images
Prerequisite: lp:~ltrager/maas-images/rename_squashfs
Diff against target: 470 lines (+417/-12)
2 files modified
conf/meph-v3.yaml (+408/-0)
meph2/commands/cloudimg_sync.py (+9/-12)
To merge this branch: bzr merge lp:~ltrager/maas-images/kernels
Reviewer Review Type Date Requested Status
Blake Rouse (community) Approve
Review via email: mp+303083@code.launchpad.net

This proposal supersedes a proposal from 2016-08-17.

Description of the change

Add support for the new kernel naming format. While the new kernel metapackages haven't been published yet this publishes the existing linux-generic, and linux-image-lowlatency-lts-xenial images using the hwe-16.04 and hwe-16.04-lowlatency names. As the new kernels become available I'll add the hwe-16.04-edge, hwe-16.04-lowlatency-edge, hwe-rolling, hwe-rolling-edge, hwe-rolling-lowlatency, and hwe-rolling-lowlatency-edge kernels. Precise and Trusty still use the old names.

Because the V2 stream can't use the new kernel names I had to create a new config file. As the new kernel names a much longer then the old names I converted the yaml arrays from using [] to newlines with -. I only did this for Xenial and Yakkety as they are the only releases that use the new kernels. If we want to make the config uniform I can do the same for Precise and Trusty. I also converted the --squash flag into a config option.

To post a comment you must log in.
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'conf/meph-v3.yaml'
--- conf/meph-v3.yaml 1970-01-01 00:00:00 +0000
+++ conf/meph-v3.yaml 2016-08-17 00:25:46 +0000
@@ -0,0 +1,408 @@
1# kernel entries are a list of
2# kernel-release, arch, primary-subarch, flavor, kernel-pkgname, subarches
3# we use the anchors to make subarches more compact
4#
5# builtin_kernel is "builtin" kernel.
6# default is 'linux-generic'
7#
8# kernel arrays are
9# krel, karch, primary-subarch, flavor, kernel-package, [subarches], {khdata}
10#
11# 'khdata' is an optional dictionary used to tell which dtb files to pull or
12# what kernel helper to run on the kernel and initramfs.
13
14# Previous to 16.04 kernels were naming using the format
15# hwe-<first letter of release>. From 16.04 onwards kernels come in the format
16# hwe-<release version>. Because the version has a '.' in it we keep the old
17# naming format for the anchors.
18subarches:
19 - &sa_hwe_p
20 - generic
21 - hwe-p
22 - &sa_hwe_q
23 - generic
24 - hwe-p
25 - hwe-q
26 - &sa_hwe_r
27 - generic
28 - hwe-p
29 - hwe-q
30 - hwe-r
31 - &sa_hwe_s
32 - generic
33 - hwe-p
34 - hwe-q
35 - hwe-r
36 - hwe-s
37 - &sa_hwe_t
38 - generic
39 - hwe-p
40 - hwe-q
41 - hwe-r
42 - hwe-s
43 - hwe-t
44 - &sa_hwe_u
45 - generic
46 - hwe-p
47 - hwe-q
48 - hwe-r
49 - hwe-s
50 - hwe-t
51 - hwe-u
52 - &sa_hwe_v
53 - generic
54 - hwe-p
55 - hwe-q
56 - hwe-r
57 - hwe-s
58 - hwe-t
59 - hwe-u
60 - hwe-v
61 - &sa_hwe_w
62 - generic
63 - hwe-p
64 - hwe-q
65 - hwe-r
66 - hwe-s
67 - hwe-t
68 - hwe-u
69 - hwe-v
70 - hwe-w
71 - &sa_hwe_x
72 - generic
73 - hwe-p
74 - hwe-q
75 - hwe-r
76 - hwe-s
77 - hwe-t
78 - hwe-u
79 - hwe-v
80 - hwe-w
81 - hwe-16.04
82 - hwe-16.04-lowlatency
83 - &sa_hwe_y
84 - generic
85 - hwe-p
86 - hwe-q
87 - hwe-r
88 - hwe-s
89 - hwe-t
90 - hwe-u
91 - hwe-v
92 - hwe-w
93 - hwe-16.04
94 - hwe-16.04-lowlatency
95 - hwe-16.10
96 - &arm_hwe_t
97 - generic
98 - highbank
99 - hwe-p
100 - hwe-q
101 - hwe-r
102 - hwe-s
103 - hwe-t
104 - &arm_hwe_u
105 - generic
106 - highbank
107 - hwe-p
108 - hwe-q
109 - hwe-r
110 - hwe-s
111 - hwe-t
112 - hwe-u
113 - &arm_hwe_v
114 - generic
115 - highbank
116 - hwe-p
117 - hwe-q
118 - hwe-r
119 - hwe-s
120 - hwe-t
121 - hwe-u
122 - hwe-v
123 - &arm_hwe_w
124 - generic
125 - highbank
126 - hwe-p
127 - hwe-q
128 - hwe-r
129 - hwe-s
130 - hwe-t
131 - hwe-u
132 - hwe-v
133 - hwe-w
134 - &arm_hwe_x
135 - generic
136 - highbank
137 - hwe-p
138 - hwe-q
139 - hwe-r
140 - hwe-s
141 - hwe-t
142 - hwe-u
143 - hwe-v
144 - hwe-w
145 - hwe-16.04
146 - hwe-16.04-lowlatency
147 - &arm_hwe_y
148 - generic
149 - highbank
150 - hwe-p
151 - hwe-q
152 - hwe-r
153 - hwe-s
154 - hwe-t
155 - hwe-u
156 - hwe-v
157 - hwe-w
158 - hwe-16.04
159 - hwe-16.04-lowlatency
160 - hwe-16.10
161
162misc:
163 - &glpae generic-lpae
164 - &xguboot xgene-uboot
165 - &mustang xgene-uboot-mustang
166 - &kh-mustang {suffix: .xgene-mustang, kihelper: kh-xgene,
167 di-format: 'xgene', dtb: 'apm-mustang.dtb'}
168 - &kh-xgene {suffix: .xgene, kihelper: "kh-xgene", di-format: 'xgene'}
169
170releases:
171 - version: "16.10"
172 release: yakkety
173 kernels:
174 -
175 - yakkety
176 - amd64
177 - hwe-16.10
178 - generic
179 - linux-generic
180 - *sa_hwe_y
181 -
182 - yakkety
183 - arm64
184 - hwe-16.10
185 - generic
186 - linux-generic
187 - *sa_hwe_y
188 -
189 - yakkety
190 - arm64
191 - *mustang
192 - generic
193 - linux-generic
194 - [*mustang]
195 - *kh-mustang
196 -
197 - yakkety
198 - arm64
199 - *xguboot
200 - generic
201 - linux-generic
202 - [*xguboot]
203 - *kh-xgene
204 -
205 - yakkety
206 - armhf
207 - *glpae
208 - *glpae
209 - linux-generic-lpae
210 - [*glpae]
211 -
212 - yakkety
213 - armhf
214 - hwe-16.10
215 - generic
216 - linux-generic
217 - *arm_hwe_y
218 -
219 - yakkety
220 - i386
221 - hwe-16.10
222 - generic
223 - linux-generic
224 - *sa_hwe_y
225 -
226 - yakkety
227 - ppc64el
228 - hwe-16.10
229 - generic
230 - linux-generic
231 - *sa_hwe_y
232 -
233 - yakkety
234 - s390x
235 - hwe-16.10
236 - generic
237 - linux-generic
238 - *sa_hwe_y
239 - version: "16.04"
240 release: xenial
241 kernels:
242 -
243 - xenial
244 - amd64
245 - hwe-16.04
246 - generic
247 - linux-generic
248 - *sa_hwe_x
249 -
250 - xenial
251 - amd64
252 - hwe-16.04-lowlatency
253 - lowlatency
254 - linux-image-lowlatency-lts-xenial
255 - *sa_hwe_x
256 -
257 - xenial
258 - arm64
259 - hwe-16.04
260 - generic
261 - linux-generic
262 - *sa_hwe_x
263 -
264 - xenial
265 - arm64
266 - hwe-16.04-lowlatency
267 - lowlatency
268 - linux-image-lowlatency-lts-xenial
269 - *sa_hwe_x
270 -
271 - xenial
272 - arm64
273 - *mustang
274 - generic
275 - linux-generic
276 - [*mustang]
277 - *kh-mustang
278 -
279 - xenial
280 - arm64
281 - *xguboot
282 - generic
283 - linux-generic
284 - [*xguboot]
285 - *kh-xgene
286 -
287 - xenial
288 - armhf
289 - *glpae
290 - *glpae
291 - linux-generic-lpae
292 - [*glpae]
293 -
294 - xenial
295 - armhf
296 - hwe-16.04
297 - generic
298 - linux-generic
299 - *arm_hwe_x
300 -
301 - xenial
302 - armhf
303 - hwe-16.04-lowlatency
304 - lowlatency
305 - linux-image-lowlatency-lts-xenial
306 - *arm_hwe_x
307 -
308 - xenial
309 - i386
310 - hwe-16.04
311 - generic
312 - linux-generic
313 - *sa_hwe_x
314 -
315 - xenial
316 - i386
317 - hwe-16.04-lowlatency
318 - lowlatency
319 - linux-image-lowlatency-lts-xenial
320 - *sa_hwe_x
321 -
322 - xenial
323 - ppc64el
324 - hwe-16.04
325 - generic
326 - linux-generic
327 - *sa_hwe_x
328 -
329 - xenial
330 - ppc64el
331 - hwe-16.04-lowlatency
332 - lowlatency
333 - linux-image-lowlatency-lts-xenial
334 - *sa_hwe_x
335 -
336 - xenial
337 - s390x
338 - hwe-16.04
339 - generic
340 - linux-generic
341 - *sa_hwe_x
342 -
343 - xenial
344 - s390x
345 - hwe-16.04-lowlatency
346 - lowlatency
347 - linux-image-lowlatency-lts-xenial
348 - *sa_hwe_x
349 - version: "14.04"
350 builtin_kernel: linux-generic
351 release: trusty
352 kernels:
353 - [trusty, armhf, hwe-t, generic, linux-generic, *arm_hwe_t]
354 - [trusty, armhf, *glpae, *glpae, linux-generic-lpae, [*glpae]]
355 - [trusty, armhf, keystone, keystone, linux-keystone, [keystone]]
356 - [trusty, i386, hwe-t, generic, linux-generic, *sa_hwe_t]
357 - [trusty, amd64, hwe-t, generic, linux-generic, *sa_hwe_t]
358 - [trusty, ppc64el, hwe-t, generic, linux-generic, *sa_hwe_t]
359 - [trusty, arm64, hwe-t, generic, linux-generic, *sa_hwe_t]
360 - [trusty, arm64, *xguboot, generic, linux-generic, [*xguboot], *kh-xgene]
361 - [trusty, arm64, *mustang, generic, linux-generic, [*mustang], *kh-mustang]
362 - [utopic, amd64, hwe-u, generic, linux-generic-lts-utopic, *sa_hwe_u]
363 - [utopic, arm64, hwe-u, generic, linux-generic-lts-utopic, *sa_hwe_u]
364 - [utopic, armhf, hwe-u, generic, linux-generic-lts-utopic, *sa_hwe_u]
365 - [utopic, i386, hwe-u, generic, linux-generic-lts-utopic, *sa_hwe_u]
366 - [utopic, ppc64el, hwe-u, generic, linux-generic-lts-utopic, *sa_hwe_u]
367 - [vivid, amd64, hwe-v, generic, linux-generic-lts-vivid, *sa_hwe_v]
368 - [vivid, arm64, hwe-v, generic, linux-generic-lts-vivid, *sa_hwe_v]
369 - [vivid, armhf, hwe-v, generic, linux-generic-lts-vivid, *sa_hwe_v]
370 - [vivid, i386, hwe-v, generic, linux-generic-lts-vivid, *sa_hwe_v]
371 - [vivid, ppc64el, hwe-v, generic, linux-generic-lts-vivid, *sa_hwe_v]
372 - [wily, amd64, hwe-w, generic, linux-generic-lts-wily, *sa_hwe_w]
373 - [wily, arm64, hwe-w, generic, linux-generic-lts-wily, *sa_hwe_w]
374 - [wily, armhf, hwe-w, generic, linux-generic-lts-wily, *sa_hwe_w]
375 - [wily, i386, hwe-w, generic, linux-generic-lts-wily, *sa_hwe_w]
376 - [wily, ppc64el, hwe-w, generic, linux-generic-lts-wily, *sa_hwe_w]
377 - [xenial, amd64, hwe-x, generic, linux-generic-lts-xenial, *sa_hwe_x]
378 - [xenial, arm64, hwe-x, generic, linux-generic-lts-xenial, *sa_hwe_x]
379 - [xenial, armhf, hwe-x, generic, linux-generic-lts-xenial, *sa_hwe_x]
380 - [xenial, i386, hwe-x, generic, linux-generic-lts-xenial, *sa_hwe_x]
381 - [xenial, ppc64el, hwe-x, generic, linux-generic-lts-xenial, *sa_hwe_x]
382 - version: "12.04"
383 release: precise
384 builtin_kernel: {armhf: linux-highbank, default: 'linux-generic'}
385 kernels:
386 - [precise, i386, hwe-p, generic, linux-generic, *sa_hwe_p]
387 - [precise, amd64, hwe-p, generic, linux-generic, *sa_hwe_p]
388 - [precise, armhf, highbank, highbank, linux-highbank, [highbank]]
389 - [quantal, i386, hwe-q, generic, linux-generic-lts-quantal, *sa_hwe_q]
390 - [quantal, amd64, hwe-q, generic, linux-generic-lts-quantal, *sa_hwe_q]
391 - [raring, i386, hwe-r, generic, linux-generic-lts-raring, *sa_hwe_r]
392 - [raring, amd64, hwe-r, generic, linux-generic-lts-raring, *sa_hwe_r]
393 - [saucy, i386, hwe-s, generic, linux-generic-lts-saucy, *sa_hwe_s]
394 - [saucy, amd64, hwe-s, generic, linux-generic-lts-saucy, *sa_hwe_s]
395 - [trusty, i386, hwe-t, generic, linux-generic-lts-trusty, *sa_hwe_t]
396 - [trusty, amd64, hwe-t, generic, linux-generic-lts-trusty, *sa_hwe_t]
397
398# enable_proposed: True
399
400# If available pull and publish SquashFS images from upstream
401squashfs: True
402
403## Notes:
404## * there are no hwe installer kernels for armhf
405## nothing named 'saucy-highbank' at
406## http://ports.ubuntu.com/ubuntu-ports/dists/precise-updates/main/installer-armhf/current/images/MD5SUMS
407## so for now, we just don't have a stream for that.
408## * kernel meta package in all cases here is linux-image-<flavor>
0409
=== modified file 'meph2/commands/cloudimg_sync.py'
--- meph2/commands/cloudimg_sync.py 2016-08-17 00:25:46 +0000
+++ meph2/commands/cloudimg_sync.py 2016-08-17 00:25:46 +0000
@@ -66,8 +66,8 @@
6666
6767
68class CloudImg2Meph2Sync(mirrors.BasicMirrorWriter):68class CloudImg2Meph2Sync(mirrors.BasicMirrorWriter):
69 def __init__(self, config, out_d, target, v2config, rebuilds=None,69 def __init__(
70 verbosity=0, squashfs=False):70 self, config, out_d, target, v2config, rebuilds=None, verbosity=0):
71 super(CloudImg2Meph2Sync, self).__init__(config=config)71 super(CloudImg2Meph2Sync, self).__init__(config=config)
72 if rebuilds is None:72 if rebuilds is None:
73 rebuilds = {}73 rebuilds = {}
@@ -76,17 +76,18 @@
76 self.target = target76 self.target = target
77 self.v2config = v2config77 self.v2config = v2config
78 self.filters = self.config.get('filters', [])78 self.filters = self.config.get('filters', [])
79 self.squashfs = squashfs79 with open(v2config) as fp:
80 if self.squashfs:80 cfgdata = yaml.load(fp)
81 self.cfgdata = cfgdata
82 if self.cfgdata.get('squashfs'):
83 self.squashfs = True
81 # As of MAAS 2.0 DI is no longer supported but SquashFS is.84 # As of MAAS 2.0 DI is no longer supported but SquashFS is.
82 # Since the DI won't be used don't generate them.85 # Since the DI won't be used don't generate them.
83 self.enable_di = False86 self.enable_di = False
84 else:87 else:
88 self.squashfs = False
85 self.enable_di = self.config.get('enable_di', True)89 self.enable_di = self.config.get('enable_di', True)
8690
87 with open(v2config) as fp:
88 cfgdata = yaml.load(fp)
89 self.cfgdata = cfgdata
90 self.releases = []91 self.releases = []
91 for r in [k['release'] for k in cfgdata['releases']]:92 for r in [k['release'] for k in cfgdata['releases']]:
92 if r not in ubuntu_info.SUPPORTED:93 if r not in ubuntu_info.SUPPORTED:
@@ -272,9 +273,6 @@
272 parser.add_argument('--verbose', '-v', action='count', default=0)273 parser.add_argument('--verbose', '-v', action='count', default=0)
273 parser.add_argument('--log-file', default=sys.stderr,274 parser.add_argument('--log-file', default=sys.stderr,
274 type=argparse.FileType('w'))275 type=argparse.FileType('w'))
275 parser.add_argument('--squashfs', action='store_true', default=False,
276 help='Download SquashFS root file systems if available'
277 )
278276
279 parser.add_argument('output_d')277 parser.add_argument('output_d')
280 parser.add_argument('filters', nargs='*', default=[])278 parser.add_argument('filters', nargs='*', default=[])
@@ -335,8 +333,7 @@
335333
336 tmirror = CloudImg2Meph2Sync(config=mirror_config, out_d=args.output_d,334 tmirror = CloudImg2Meph2Sync(config=mirror_config, out_d=args.output_d,
337 target=args.target, v2config=args.config,335 target=args.target, v2config=args.config,
338 rebuilds=rebuilds, verbosity=vlevel,336 rebuilds=rebuilds, verbosity=vlevel)
339 squashfs=args.squashfs)
340337
341 tmirror.sync(smirror, initial_path)338 tmirror.sync(smirror, initial_path)
342339

Subscribers

People subscribed via source and target branches