Gentoo Archives: gentoo-portage-dev

From: Matthew Thode <prometheanfire@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH][v4] enable user settable gpg keyservers
Date: Sun, 03 Mar 2019 21:43:46
Message-Id: 20190303214340.sud43lapwqoiujsp@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH][v3] enable user settable gpg keyservers (attached) by Matthew Thode
1 On 19-02-26 15:33:53, Matthew Thode wrote:
2 > On 19-02-26 10:52:52, Zac Medico wrote:
3 > > On 2/26/19 10:48 AM, Zac Medico wrote:
4 > > > On 2/25/19 1:45 PM, Matthew Thode wrote:
5 > > >> On 19-02-25 15:41:03, Matthew Thode wrote:
6 > > >>> On 19-02-25 14:34:46, Matthew Thode wrote:
7 > > >>>> Allowing users to define which keyservers they update from allows them
8 > > >>>> to work around buggy keyservers. It is also useful for local mirrors
9 > > >>>> and / or private keyservers.
10 > > >>>>
11 > > >>>> It's likely that I'm setting the default incorrectly and not
12 > > >>>> alphabetizing right, but the code works at least...
13 > > >>>>
14 > > >>>
15 > > >>> Ok, let's try that again, should be cleaner/better/etc
16 > > >>>
17 > > >>
18 > > >> v3, attached
19 > > >>
20 > > >> ---
21 > > >
22 > > >> lib/portage/repository/config.py | 6 ++++++
23 > > >> lib/portage/sync/syncbase.py | 6 +++---
24 > > >> 2 files changed, 9 insertions(+), 3 deletions(-)
25 > > >>
26 > > >> diff --git a/lib/portage/repository/config.py b/lib/portage/repository/config.py
27 > > >> index 482711c4b..235371ce5 100644
28 > > >> --- a/lib/portage/repository/config.py
29 > > >> +++ b/lib/portage/repository/config.py
30 > > >> @@ -109,6 +109,7 @@ class RepoConfig(object):
31 > > >> 'sync_allow_hardlinks',
32 > > >> 'sync_depth',
33 > > >> 'sync_hooks_only_on_change',
34 > > >> + 'sync_openpgp_keyserver',
35 > > >> 'sync_openpgp_key_path',
36 > > >> 'sync_openpgp_key_refresh_retry_count',
37 > > >> 'sync_openpgp_key_refresh_retry_delay_exp_base',
38 > > >> @@ -224,6 +225,9 @@ class RepoConfig(object):
39 > > >> self.sync_allow_hardlinks = repo_opts.get(
40 > > >> 'sync-allow-hardlinks', 'true').lower() in ('true', 'yes')
41 > > >>
42 > > >> + self.sync_openpgp_keyserver = repo_opts.get(
43 > > >> + 'sync-openpgp-keyserver', 'hkps.pool.sks-keyservers.net').strip.lower()
44 > > >
45 > > > It needs to be like this:
46 > > >
47 > > > + 'sync-openpgp-keyserver', 'hkps.pool.sks-keyservers.net').strip().lower() or None
48 > > >
49 > > > because gemato handles None but not empty strings.
50 > >
51 > > Also let's not provide a default keyserver, let gemato handle that.
52 > >
53 > > Also please update man/portage.5.
54 > >
55 >
56 > Ok, that stanza no reads:
57 >
58 > self.sync_openpgp_keyserver = repo_opts.get(
59 > 'sync-openpgp-keyserver').strip.lower() or None
60 >
61 > I didn't see a section for the sync-openpgp options though, let me know
62 > anything else or I'll send the updated patch tonight.
63 >
64
65 v4 patch attached (as said previously, no section in man page for
66 sync-openpgp options so not added there).
67
68 --
69 Matthew Thode (prometheanfire)

Attachments

File name MIME type
0001-enable-user-settable-gpg-keyservers.patch text/x-diff
signature.asc application/pgp-signature

Replies