Acknowledgement sent
to Guillem Jover <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian GnuPG-Maintainers <[email protected]>.
(Sun, 28 May 2017 14:00:05 GMT) (full text, mbox, link).
Subject: gpg: Prints message on stderr about primary-keyring file existence
Date: Sun, 28 May 2017 15:57:14 +0200
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 '<HOME>/.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
Subject: Re: gpg: Prints message on stderr about primary-keyring file
existence
Date: Sun, 28 Jan 2018 22:22:47 +0000
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-agent 2.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 libgcrypt20 1.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 <none>
-- no debconf information
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-agent 2.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 libgcrypt20 1.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 <none>
-- no debconf information
Subject: Re: Bug#863557: gpg: Prints message on stderr about primary-keyring
file existence
Date: Fri, 18 Apr 2025 14:49:46 +0200
Verdsion: 2.4.7-1
On 2018-01-28 Phil Morrell <[email protected]> wrote:
> 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
[...]
Yes, I think Phil nailed it, current gpg manpage says:
--primary-keyring file
This is a varian of --keyring [...]
and --keyring
Add file to the current list of keyrings. [...]
Note that this adds a keyring to the current list. If the intent
is to use the specified keyring alone, use --keyring along with
--no-default-keyring.
cu Andreas
--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.