Merge lp:~paolo-de-rosa/curtin/curtin into lp:~curtin-dev/curtin/trunk

Proposed by Andres Rodriguez on 2016-04-26
Status: Rejected
Rejected by: Scott Moser on 2016-06-07
Proposed branch: lp:~paolo-de-rosa/curtin/curtin
Merge into: lp:~curtin-dev/curtin/trunk
Diff against target: 17 lines (+7/-0)
1 file modified
curtin/commands/ (+7/-0)
To merge this branch: bzr merge lp:~paolo-de-rosa/curtin/curtin
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Needs Fixing on 2016-04-26
curtin developers 2016-04-26 Pending
Review via email:

Commit message

Support for apt gpg key in target, adding the key 'apt_mirrors_keys' curtin can import the apt key during the curthooks

To post a comment you must log in.

FAILED: Continuous integration, rev:386
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
Executed test runs:

Click here to trigger a rebuild:

review: Needs Fixing (continuous-integration)
Scott Moser (smoser) wrote :

Hi, this is being worked at
The solution there is to adopt the same apt configuration that cloud-init supports (and modified cloud-init to support adding apt keys by themselves rather than explicitly with a target).

Scott Moser (smoser) wrote :

I'm going to mark this as 'rejected' only in the sense that we will have another solution shortly that will cover the same need. Thank you for your contribution.

Unmerged revisions

386. By Paolo de Rosa on 2016-04-26

fix indenteation

385. By Paolo de Rosa on 2016-04-24

fix join syntax

384. By Paolo de Rosa on 2016-04-24

small patch to load apt mirrors keys

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'curtin/commands/'
2--- curtin/commands/ 2016-04-17 22:35:20 +0000
3+++ curtin/commands/ 2016-04-26 13:51:39 +0000
4@@ -130,6 +130,13 @@
5 if content is not None:
6 util.write_file(sources_list, content)
8+ if isinstance(cfg.get('apt_mirrors_keys'), dict):
9+ for name, key in cfg['apt_mirrors_keys'].items():
10+ tgt_kfile = os.path.sep.join(['/tmp', name + '.gpg'])
11+ kfile = os.path.sep.join([target, tgt_kfile])
12+ util.write_file(kfile, key)
13+ with util.RunInChroot(target) as in_chroot:
14+ in_chroot(['sh', '-c', '/usr/bin/apt-key add ' + tgt_kfile])
16 def disable_overlayroot(cfg, target):
17 # cloud images come with overlayroot, but installed systems need disabled


People subscribed via source and target branches