[pkg-gnupg-maint] Bug#994939: Insists on updating trustdb when only listing keys in a keyring

Steve McIntyre steve at einval.com
Thu Sep 23 15:21:50 BST 2021

Package: gpg
Version: 2.2.12-1+deb10u1
Severity: important
Tags: upstream


Working on an embedded system, I want to list the keys contained in a
keyring. gpg insists on creating a trustdb for no reason:

# gpg --no-auto-check-trustdb --no-default-keyring --keyring /etc/apt/trusted.gpg.d/pexip-as.gpg  --list-keys 
gpg: directory '/root/.gnupg' created
gpg: /root/.gnupg/trustdb.gpg: trustdb created

Why? Even better, if I try to force no output by using /dev/null for
the trustdb I get a crash:
# gpg --no-auto-check-trustdb --trustdb-name /dev/null --no-default-keyring --keyring /etc/apt/trusted.gpg.d/pexip-as.gpg  --list-keys 
gpg: Ohhhh jeeee: Assertion "recnum" in create_hashtable failed (../../g10/tdbio.c:856)
Aborted (core dumped)

This is not great... :-(

-- System Information:
Debian Release: 10.10
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable-debug'), (500, 'oldoldstable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-0.bpo.5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gpg depends on:
ii  gpgconf        2.2.12-1+deb10u1
ii  libassuan0     2.5.2-1
ii  libbz2-1.0     1.0.6-9.2~deb10u1
ii  libc6          2.28-10
ii  libgcrypt20    1.8.4-5+deb10u1
ii  libgpg-error0  1.35-1
ii  libreadline7   7.0-5
ii  libsqlite3-0   3.27.2-3+deb10u1
ii  zlib1g         1:1.2.11.dfsg-1

Versions of packages gpg recommends:
ii  gnupg  2.2.12-1+deb10u1

gpg suggests no packages.

-- no debconf information

More information about the pkg-gnupg-maint mailing list