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

Subscribers

People subscribed via source and target branches