[Pgp-tools-commit] r794 - in trunk: caff debian
Guilhem Moulin
guilhem-guest at moszumanska.debian.org
Thu Apr 9 20:48:25 UTC 2015
Author: guilhem-guest
Date: 2015-04-09 20:48:25 +0000 (Thu, 09 Apr 2015)
New Revision: 794
Modified:
trunk/caff/caff
trunk/debian/changelog
trunk/debian/copyright
Log:
Pass the 'keyserver-options' specified in ~/.gnupg/gpg.conf to $CONFIG{keyserver} when left unset.
Modified: trunk/caff/caff
===================================================================
--- trunk/caff/caff 2015-04-09 20:48:20 UTC (rev 793)
+++ trunk/caff/caff 2015-04-09 20:48:25 UTC (rev 794)
@@ -5,7 +5,7 @@
#
# Copyright (c) 2004, 2005, 2006 Peter Palfrader <peter at palfrader.org>
# Copyright (c) 2005, 2006 Christoph Berg <cb at df7cb.de>
-# Copyright (c) 2014 Guilhem Moulin <guilhem at guilhem.org>
+# Copyright (c) 2014, 2015 Guilhem Moulin <guilhem at guilhem.org>
#
# All rights reserved.
#
@@ -226,7 +226,10 @@
=item B<keyserver> [string]
-Keyserver to download keys from. Default: the keyserver defined in
+Keyserver to download keys from, passed to gpg(1) as argument to the
+"--keyserver" option. (Optional keyserver configuration options may be
+provided after the keyserver name.)
+Default: the keyserver and keyserver-options defined in
~/.gnupg/gpg.conf if found, otherwise B<pool.sks-keyservers.net>.
=item B<no-download> [boolean]
@@ -1370,13 +1373,18 @@
unless (defined $CONFIG{'keyserver'}) {
my $gpgconf = ($ENV{'GNUPGHOME'} || "$ENV{'HOME'}/.gnupg") . '/gpg.conf';
if (-e $gpgconf and open my $fh, $gpgconf) {
- my @keyservers = map { chomp; s/^\s*keyserver\s+//r } (grep /^\s*keyserver\s/, <$fh>);
- $CONFIG{'keyserver'} = $keyservers[$#keyservers] if @keyservers;
+ my @keyservers = grep defined, map { /^\s*keyserver\s+(.+)/ ? $1 : undef } <$fh>;
+ if (@keyservers) {
+ $CONFIG{'keyserver'} = $keyservers[$#keyservers]; # take the last one found
+ seek $fh, 0, 0;
+ my @keyserver_options = grep defined, map { /^\s*keyserver-options\s+(.+)/ ? $1 : undef } <$fh>;
+ $CONFIG{'keyserver'} .= ' '. join (' ', @keyserver_options) if @keyserver_options;
+ }
close $fh;
}
}
$CONFIG{'keyserver'} //= 'pool.sks-keyservers.net';
- notice("Fetching keys from $CONFIG{keyserver}, this may take a while...");
+ notice("Fetching keys from ".($CONFIG{keyserver} =~ s/\s.*//r).", this may take a while...");
my $gpg = mkGnuPG( homedir => $GNUPGHOME, extra_args => ['--keyserver='.$CONFIG{'keyserver'}] );
# logger: requesting key ... from hkp
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2015-04-09 20:48:20 UTC (rev 793)
+++ trunk/debian/changelog 2015-04-09 20:48:25 UTC (rev 794)
@@ -25,6 +25,8 @@
imported from caff's GNUPGHOME to our own; in auto-lsign'ing mode, lsign
UID for which we have an exportable signature (preserving the signer and
cert level).
+ + Pass the 'keyserver-options' specified in ~/.gnupg/gpg.conf to
+ $CONFIG{keyserver} when it is left unset. (Closes: #780836)
* gpgsigs:
+ Add a legend with the different signature types.
+ Mark local signatures as 'L' (formerly they were marked as 'S'), and
Modified: trunk/debian/copyright
===================================================================
--- trunk/debian/copyright 2015-04-09 20:48:20 UTC (rev 793)
+++ trunk/debian/copyright 2015-04-09 20:48:25 UTC (rev 794)
@@ -12,7 +12,7 @@
Files: caff/*
Copyright: © 2004-2006 Peter Palfrader <peter at palfrader.org>
© 2005-2006 Christoph Berg <cb at df7cb.de>
- © 2014 Guilhem Moulin <guilhem at guilhem.org>
+ © 2014-2015 Guilhem Moulin <guilhem at guilhem.org>
License: BSD-3-clause
Files: gpgdir/*
More information about the Pgp-tools-commit
mailing list