Bug#863557: gpg: Prints message on stderr about primary-keyring file existence
Package: gnupg Version: 2.1.18-8~deb9u1 Followup-For: Bug #863557 Hi Guillem, I believe this is a documentation bug, you simply need to add `no-default-keyring` before `primary-keyring`. I discovered this report whilst trying to separate automatically retrieved keys from my manual keyring. Essentially, `primary-keyring` doesn't just "designate" the primary, it appends to the keyrings list. keyring ~/.gnupg/public-keys/auto.kbx ... primary-keyring ~/.gnupg/public-keys/auto.kbx This is also not specific to the `primary-keyring` option, listing the same keyring entry twice either via gpg.conf or cli options shows the same unhelpful message. So a minimally reproducable test for this is: gpg --keyring pubring.kbx --list-keys -- Phil Morrell (emorrp1) -- System Information: Debian Release: 9.3 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.9.0-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 /bin/dash Init: systemd (via /run/systemd/system) Versions of packages gnupg depends on: ii gnupg-agent2.1.18-8~deb9u1 ii libassuan0 2.4.3-2 ii libbz2-1.0 1.0.6-8.1 ii libc6 2.24-11+deb9u1 ii libgcrypt201.7.6-2+deb9u2 ii libgpg-error0 1.26-2 ii libksba8 1.3.5-2 ii libreadline7 7.0-3 ii libsqlite3-0 3.16.2-5+deb9u1 ii zlib1g 1:1.2.8.dfsg-5 Versions of packages gnupg recommends: ii dirmngr 2.1.18-8~deb9u1 ii gnupg-l10n 2.1.18-8~deb9u1 Versions of packages gnupg suggests: ii parcimonie 0.10.2-4 pn xloadimage -- no debconf information signature.asc Description: PGP signature
Bug#863557: gpg: Prints message on stderr about primary-keyring file existence
Package: gnupg Version: 2.1.18-8~deb9u1 Followup-For: Bug #863557 etc. -- System Information: Debian Release: 9.3 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.9.0-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 /bin/dash Init: systemd (via /run/systemd/system) Versions of packages gnupg depends on: ii gnupg-agent2.1.18-8~deb9u1 ii libassuan0 2.4.3-2 ii libbz2-1.0 1.0.6-8.1 ii libc6 2.24-11+deb9u1 ii libgcrypt201.7.6-2+deb9u2 ii libgpg-error0 1.26-2 ii libksba8 1.3.5-2 ii libreadline7 7.0-3 ii libsqlite3-0 3.16.2-5+deb9u1 ii zlib1g 1:1.2.8.dfsg-5 Versions of packages gnupg recommends: ii dirmngr 2.1.18-8~deb9u1 ii gnupg-l10n 2.1.18-8~deb9u1 Versions of packages gnupg suggests: ii parcimonie 0.10.2-4 pn xloadimage -- no debconf information
Bug#863557: gpg: Prints message on stderr about primary-keyring file existence
Package: gnupg Version: 2.1.21-2 Severity: normal Hi! I've got configured my personal keyring as the primary one so that I can add additional third-party ones, something like this: ,--- # Set the primary keyring primary-keyring ~/.gnupg/pubring.kbx # Additional keyrings: Debian keyring /usr/share/keyrings/debian-keyring.gpg keyring /usr/share/keyrings/debian-maintainers.gpg keyring /usr/share/keyrings/debian-nonupload.gpg keyring /usr/share/keyrings/debian-role-keys.gpg # Keyservers keyserver hkps://hkps.pool.sks-keyservers.net `--- But this makes gpg, emit the following message on stderr: ,--- gpg: keyblock resource '/.gnupg/pubring.kbx': File exists `--- which at least messes up with mutt when sending encrypted mail, as it detects that there is stuff on stderr and considers it a problem, and then aborts the send action. If the notice/warning/error was because the file is missing that would make some sense, but as it is, it looks just unnecessarily chatty? :) Thanks, Guillem