gpgconf should report clearer errors when it knows that a given daemon's config file is bad
Closed, ResolvedPublic


gpgconf knows about config files for the various components of GnuPG.

some auto-launched and gpgconf-launched GnuPG components will refuse to start if there is an error in their config files.

If the user is doing gpgconf --launch $component and there is an error based on the config file, then it would make sense for gpgconf to try to show the user what the error is.

instead, we currently get mysterious reports like this when there's a typo in the config file:

0 dkg@alice:/tmp/cdtemp.9k1pEE$ export GNUPGHOME=$(pwd)
0 dkg@alice:/tmp/cdtemp.9k1pEE$ echo typo > gpg-agent.conf
0 dkg@alice:/tmp/cdtemp.9k1pEE$ gpgconf --launch gpg-agent
gpgconf: error running '/usr/bin/gpg-connect-agent': exit status 1
gpgconf: error running '/usr/bin/gpg-connect-agent NOP': General error
1 dkg@alice:/tmp/cdtemp.9k1pEE$

And the user must wait 5 seconds to get this unhelpful report!

More clarity in the error reporting, and no delay would be great. gpgconf should already know all the information it needs to know to help the user figure it out here.

dkg created this task.May 10 2019, 11:24 PM
werner triaged this task as Normal priority.May 15 2019, 8:31 AM
werner claimed this task.May 16 2019, 10:53 AM
werner closed this task as Resolved.May 16 2019, 12:28 PM

Fixed in amster and 2.2:

$ gpgconf --launch dirmngr
gpgconf: Configuration file of component dirmngr is broken
gpgconf: Note: Use the command "gpgconf --check-options dirmngr" to get details.