1821469 - use list of keyservers when trying to download gpg keys
This commit is contained in:
parent
48d84277fa
commit
5cb03441e9
@ -1,12 +1,59 @@
|
|||||||
diff -up hplip-3.18.6/base/validation.py.keyserver hplip-3.18.6/base/validation.py
|
diff -up hplip-3.20.3/base/tui.py.keyserver hplip-3.20.3/base/tui.py
|
||||||
--- hplip-3.18.6/base/validation.py.keyserver 2018-11-13 17:35:38.085322569 +0100
|
--- hplip-3.20.3/base/tui.py.keyserver 2020-04-07 07:31:12.747293360 +0200
|
||||||
+++ hplip-3.18.6/base/validation.py 2018-11-13 17:36:18.026991983 +0100
|
+++ hplip-3.20.3/base/tui.py 2020-04-07 07:31:32.180113572 +0200
|
||||||
@@ -42,7 +42,7 @@ class DigiSign_Verification(object):
|
@@ -241,6 +241,7 @@ class ProgressMeter(object):
|
||||||
|
sys.stdout.write(y)
|
||||||
|
|
||||||
|
sys.stdout.flush()
|
||||||
|
+ sys.stdout.write('\n')
|
||||||
|
self.prev_length = len(y)
|
||||||
|
self.spinner_pos = (self.spinner_pos + 1) % 8
|
||||||
|
|
||||||
|
diff -up hplip-3.20.3/base/validation.py.keyserver hplip-3.20.3/base/validation.py
|
||||||
|
--- hplip-3.20.3/base/validation.py.keyserver 2020-03-10 09:01:53.000000000 +0100
|
||||||
|
+++ hplip-3.20.3/base/validation.py 2020-04-07 07:34:30.896467229 +0200
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env python
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# (c) Copyright 2015 HP Development Company, L.P.
|
||||||
|
@@ -42,8 +42,10 @@ class DigiSign_Verification(object):
|
||||||
|
|
||||||
|
|
||||||
class GPG_Verification(DigiSign_Verification):
|
class GPG_Verification(DigiSign_Verification):
|
||||||
- def __init__(self, pgp_site = 'pgp.mit.edu', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9):
|
- def __init__(self, pgp_site = 'pgp.mit.edu', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9):
|
||||||
+ def __init__(self, pgp_site = 'sks-keyservers.net', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9):
|
- self.__pgp_site = pgp_site
|
||||||
self.__pgp_site = pgp_site
|
+ def __init__(self, keyservers = ['pgp.mit.edu', 'sks-keyservers.net',
|
||||||
|
+ 'pool.sks-keyservers.net'],
|
||||||
|
+ key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9):
|
||||||
|
+ self.__keyservers = keyservers
|
||||||
self.__key = key
|
self.__key = key
|
||||||
self.__gpg = utils.which('gpg',True)
|
self.__gpg = utils.which('gpg',True)
|
||||||
|
|
||||||
|
@@ -82,13 +84,18 @@ class GPG_Verification(DigiSign_Verifica
|
||||||
|
|
||||||
|
|
||||||
|
def __acquire_gpg_key(self):
|
||||||
|
-
|
||||||
|
- cmd = '%s --homedir %s --no-permission-warning --keyserver %s --recv-keys 0x%X' \
|
||||||
|
- % (self.__gpg, self.__gpg_dir, self.__pgp_site, self.__key)
|
||||||
|
-
|
||||||
|
- log.info("Receiving digital keys: %s" % cmd)
|
||||||
|
- status, output = utils.run(cmd)
|
||||||
|
- log.debug(output)
|
||||||
|
+ for kserver in self.__keyservers:
|
||||||
|
+ cmd = '%s --homedir %s --no-permission-warning --keyserver %s --recv-keys 0x%X' \
|
||||||
|
+ % (self.__gpg, self.__gpg_dir, kserver, self.__key)
|
||||||
|
+
|
||||||
|
+ log.info("Receiving digital keys: %s" % cmd)
|
||||||
|
+ status, output = utils.run(cmd)
|
||||||
|
+ log.debug(output)
|
||||||
|
+
|
||||||
|
+ if not status:
|
||||||
|
+ break
|
||||||
|
+ log.info("Receiving keys from {} failed, trying the next keyserver."
|
||||||
|
+ .format(kserver))
|
||||||
|
|
||||||
|
self.__change_owner(True)
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Summary: HP Linux Imaging and Printing Project
|
Summary: HP Linux Imaging and Printing Project
|
||||||
Name: hplip
|
Name: hplip
|
||||||
Version: 3.20.3
|
Version: 3.20.3
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC
|
License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC
|
||||||
|
|
||||||
Url: https://developers.hp.com/hp-linux-imaging-and-printing
|
Url: https://developers.hp.com/hp-linux-imaging-and-printing
|
||||||
@ -699,6 +699,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|||||||
%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
|
%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 07 2020 Zdenek Dohnal <zdohnal@redhat.com> - 3.20.3-3
|
||||||
|
- 1821469 - use list of keyservers when trying to download gpg keys
|
||||||
|
|
||||||
* Wed Mar 25 2020 Tom Stellard <tstellar@redhat.com> - 3.20.3-2
|
* Wed Mar 25 2020 Tom Stellard <tstellar@redhat.com> - 3.20.3-2
|
||||||
- Fix some -Wreturn-type warnings
|
- Fix some -Wreturn-type warnings
|
||||||
- clang treates these as errors, so this fixes the build with clang.
|
- clang treates these as errors, so this fixes the build with clang.
|
||||||
|
Loading…
Reference in New Issue
Block a user