Skip to content

Commit

Permalink
Fix gnupg metadata verification
Browse files Browse the repository at this point in the history
It looks like a newer version of python2-gnupg now expects the gnupghome
folder to exist before any keys are imported (wereas the older version
presumably just created it if it was not there already).
  • Loading branch information
quba42 committed Jul 27, 2020
1 parent 952fa98 commit 882d0c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/pulp_deb/plugins/importers/sync.py
Expand Up @@ -184,7 +184,10 @@ def verify_release_file(self, distribution):
# check signature
if not self.get_config().get_boolean(constants.CONFIG_REQUIRE_SIGNATURE, False):
return
gpg = self.gnupg_factory(homedir=os.path.join(self.get_working_dir(), 'gpg-home'))
worker_gpg_homedir = os.path.join(self.get_working_dir(), 'gpg-home')
if not os.path.exists(worker_gpg_homedir):
os.mkdir(worker_gpg_homedir, 0o700)
gpg = self.gnupg_factory(homedir=worker_gpg_homedir)
shared_gpg = self.gnupg_factory(homedir=os.path.join('/', 'var', 'lib', 'pulp', 'gpg-home'))

if self.get_config().get(constants.CONFIG_GPG_KEYS):
Expand Down

0 comments on commit 882d0c3

Please sign in to comment.