[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#754436: apt: "apt-key del" doesn't support longer key IDs, but indicates no error if they're used



Package: apt
Version: 1.1~exp1
Severity: normal
Control: block 746574 by -1

Dear APT Maintainers,

If I try to delete a key and reference it by an 8 byte keyid instead of
the short and deprecated 4 byte key ID, apt-key says "OK", but does
neither remove the key nor warn about anything:

# gpg --export 612616B5 | apt-key add -
OK
# apt-key list
/etc/apt/trusted.gpg
--------------------
[…]
pub   4096R/612616B5 2009-07-12
uid                  Axel Beckert <abe@deuxchevaux.org>
uid                  Axel Beckert (E-Mail + Jabber) <abe@noone.org>
uid                  Axel Beckert (Symlink) <xtaran@symlink.ch>
uid                  [jpeg image of size 3155]
uid                  Axel Stefan Beckert
uid                  Axel Beckert (FSFE Fellow) <abe@fsfe.org>
uid                  Axel Beckert (Debian Developer) <abe@debian.org>
sub   4096g/004AB7CC 2009-07-12
[…]
$ gpg --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg  --keyring  /etc/apt/trusted.gpg  --with-colons --list-keys 612616B5
tru::1:1398954712:0:3:1:5
pub:-:4096:1:2FF9CD59612616B5:2009-07-12:::-:Axel Beckert <abe@deuxchevaux.org>::scESC:
uid:-::::2009-07-12::5F1173CDF821BB7631B5DBE4975AC1E455A038D1::Axel Beckert (E-Mail + Jabber) <abe@noone.org>:
uid:-::::2009-07-12::F4E9A04705DE3EF34324BABA0658CEBF28B4A1D2::Axel Beckert (Symlink) <xtaran@symlink.ch>:
uat:-::::2009-07-12::801394D4B37E646BCCA9A0B0ED392BAF8F48EBB4::1 3174:
uid:-::::2009-07-12::369380CEA2907029D5EA3AABDA1932244CE3F83A::Axel Stefan Beckert:
uid:-::::2009-12-08::B39F3A53D805CBDF66117B2E7BCCD89BE5F51516::Axel Beckert (FSFE Fellow) <abe@fsfe.org>:
uid:-::::2010-01-31::34F30888A6299A63190E0522CDB2C5E0602F506D::Axel Beckert (Debian Developer) <abe@debian.org>:
sub:-:4096:16:E230E02B004AB7CC:2009-07-12::::::e:
# apt-key del 2FF9CD59612616B5
OK
# echo $?
0
# apt-key list
/etc/apt/trusted.gpg
--------------------
[…]
pub   4096R/612616B5 2009-07-12
uid                  Axel Beckert <abe@deuxchevaux.org>
uid                  Axel Beckert (E-Mail + Jabber) <abe@noone.org>
uid                  Axel Beckert (Symlink) <xtaran@symlink.ch>
uid                  [jpeg image of size 3155]
uid                  Axel Stefan Beckert
uid                  Axel Beckert (FSFE Fellow) <abe@fsfe.org>
uid                  Axel Beckert (Debian Developer) <abe@debian.org>
sub   4096g/004AB7CC 2009-07-12
[…]
# apt-key del 612616B5
OK
# apt-key list
/etc/apt/trusted.gpg
--------------------
[… no more 612616B5 in the output …]
#

Fixing this issue would also fix https://bugs.debian.org/746574 filed
against gui-apt-key. (I suspect that regression came in when gpg
switched to printing long key IDs by default as the above command is
what gui-apt-key uses to parse the content of the trusted.gpg keyring.)

I think this issue was already present in at least 1.0.4, but I've only
tested it with 1.1~exp1 so far.

Interestingly "apt-key export 2FF9CD59612616B5" works as expected.

-- Package-specific info:
-- (/etc/apt/preferences present, but not submitted) --


-- (/etc/apt/sources.list present, but not submitted) --

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (600, 'testing'), (110, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.15-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages apt depends on:
ii  debian-archive-keyring  2012.4
ii  gnupg                   1.4.18-2
ii  libapt-pkg4.13          1.1~exp1
ii  libc6                   2.19-5
ii  libgcc1                 1:4.9.0-10
ii  libstdc++6              4.9.0-10

apt recommends no packages.

Versions of packages apt suggests:
ii  apt-doc     1.0.6
ii  aptitude    0.6.11-1
ii  dpkg-dev    1.17.10
ii  python-apt  0.9.3.8
ii  synaptic    0.81.2
ii  wajig       2.14

-- no debconf information

Reply to: