Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions elbepack/elbeproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,9 @@ def create_pbuilder(self, cross, noccache, ccachesize):
'--aptconfdir', os.path.join(self.builddir, 'aptconfdir'),
'--debootstrapopts', '--include=git,gnupg', *no_check_gpg, *keyring])

if debootstrap_key_path:
os.remove(debootstrap_key_path)

def sync_xml_to_disk(self):
try:
sourcexmlpath = os.path.join(self.builddir, 'source.xml')
Expand Down
14 changes: 12 additions & 2 deletions elbepack/pbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

import os
import pathlib
from tempfile import NamedTemporaryFile
from urllib.request import urlopen

from elbepack.egpg import unarmor_openpgp_keyring
from elbepack.treeutils import strip_leading_whitespace_from_lines


Expand Down Expand Up @@ -177,8 +179,16 @@ def pbuilder_get_debootstrap_key_path(chrootpath, xml):
# If we have a primary key for use with debootstrap, BuildEnv.debootstrap
# will have added the key. We use the same key for the pbuilder
# debootstrap options.
if get_debootstrap_key(xml):
return os.path.join(chrootpath, 'etc', 'apt', 'trusted.gpg.d', 'elbe-xml-primary-key.gpg')
key = get_debootstrap_key(xml)
if key is None:
return None

tmp_file = NamedTemporaryFile(delete=False)

tmp_file.write(unarmor_openpgp_keyring(key))
tmp_file.close()

return tmp_file.name


def get_apt_keys(builddir, xml):
Expand Down
Loading