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

Proposed by Lee Trager on 2018-08-30
Status: Merged
Merged at revision: 409
Proposed branch: lp:~ltrager/maas-images/fix_building_bootloaders
Merge into: lp:maas-images
Diff against target: 27 lines (+8/-2)
1 file modified
meph2/commands/dpkg.py (+8/-2)
To merge this branch: bzr merge lp:~ltrager/maas-images/fix_building_bootloaders
Reviewer Review Type Date Requested Status
maintainers of maas images 2018-08-30 Pending
Review via email: mp+354064@code.launchpad.net

Commit message

Fix building bootloaders.

This fixes bootloaders failing to build due to being unable to verify the
deb file GPG key and works around LP:1790003 by specifying a prefix when
using grub-mkimage.

To post a comment you must log in.
Scott Moser (smoser) wrote :

As long as gpgv takes multiple --keyring arguments as you imply here the change looks fine.

Just some comments about readability. I've just learned to do subprocess code like this over time to (possibly) avoid having to type 'man some-command' in order to figure out:

  some-command -acf foo --flag1 --flag2 foo2 bar

Just better to do:
  some-command --activate --configure --file=foo --flag1 --flag2=foo2 bar

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'meph2/commands/dpkg.py'
2--- meph2/commands/dpkg.py 2018-06-25 19:15:30 +0000
3+++ meph2/commands/dpkg.py 2018-08-30 21:46:10 +0000
4@@ -46,8 +46,13 @@
5 stream.write(data_file)
6
7 subprocess.check_output(
8- ['gpgv', '--keyring', '/etc/apt/trusted.gpg', sig_out, data_out],
9- stderr=subprocess.STDOUT)
10+ [
11+ 'gpgv',
12+ '--keyring', os.path.join(
13+ os.path.dirname(__file__), '..', '..', 'keyring.gpg'),
14+ '--keyring', '/usr/share/keyrings/ubuntu-archive-keyring.gpg',
15+ sig_out, data_out
16+ ], stderr=subprocess.STDOUT)
17
18 shutil.rmtree(tmp, ignore_errors=True)
19
20@@ -310,6 +315,7 @@
21 '-O', grub_format,
22 '-d', modules_path,
23 '-c', grub_config_path,
24+ '-p', '',
25 ] + modules)
26 else:
27 subprocess.check_output(

Subscribers

People subscribed via source and target branches