Control: tag -1 + patch

Hi Joey,

Axel Beckert wrote:
> previously all trusted keys for APT were managed in /etc/apt/trusted.gpg
> which was rewritten every time a package added or removed keys.
> 
> Nowadays every package which wants to add keys to APT list of trusted
> keys, just drops a file into /etc/apt/trusted.gpg.d/
> 
> So if I call gui-apt-key on an uptodate Sid installation, it shows no
> key at all by default. (If I added keys manually, it only shows them.)

Here's a simple patch which adds support for /etc/apt/trusted.gpg.d/*.gpg:

--- /usr/share/gui-apt-key/GAK/Backend.pm       2008-04-21 14:39:32.000000000 
+0200
+++ GAK/Backend.pm      2014-07-11 03:01:16.317278387 +0200
@@ -24,7 +24,8 @@
     do_add do_delete do_update/;
 
 use constant SECRING => '/etc/apt/secring.gpg';
-use constant KEYRING => '/etc/apt/trusted.gpg';
+use constant KEYRING => ('/etc/apt/trusted.gpg',
+                         glob('/etc/apt/trusted.gpg.d/*.gpg'));
 use constant TRUSTDB => '/etc/apt/trustdb.gpg';
 
 use constant KEYSERVER => 'hkp://subkeys.pgp.net';
@@ -42,7 +43,7 @@
                     --with-colons --list-keys
                     2> /dev/null};
     $cmd =~ s/\r?\n//g;
-    $cmd = sprintf ($cmd, SECRING, TRUSTDB, KEYRING);
+    $cmd = sprintf ($cmd, SECRING, TRUSTDB, join(' --keyring ', KEYRING));
 
     if (open (G, "$cmd|")) {
        while (<G>) {

> It's probably not trivial to implement removal of keys from multiple key
> stores.

Since gui-apt-key calls apt-key to do that, it should not need any
modification since all the hairy logic needs to be in apt-key itself.

                Regards, Axel
-- 
 ,''`.  |  Axel Beckert <[email protected]>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to