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/curthooks.py (+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: mp+292944@code.launchpad.net

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):
https://code.launchpad.net/~paolo-de-rosa/curtin/curtin/+merge/292944/+edit-commit-message

https://server-team-jenkins.canonical.com/job/curtin-ci/224/
Executed test runs:
    None: https://server-team-jenkins.canonical.com/job/generic-update-mp/221/console

Click here to trigger a rebuild:
https://server-team-jenkins.canonical.com/job/curtin-ci/224/rebuild

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

Hi, this is being worked at https://code.launchpad.net/~paelzer/curtin/bug-1574113-derived-repositories/+merge/296118
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/curthooks.py'
2--- curtin/commands/curthooks.py 2016-04-17 22:35:20 +0000
3+++ curtin/commands/curthooks.py 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)
7
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])
15
16 def disable_overlayroot(cfg, target):
17 # cloud images come with overlayroot, but installed systems need disabled

Subscribers

People subscribed via source and target branches