I'm trying to figure out how to work around gpgconf complaints in T4866, so i thought i would look into using gpgconf itself to see whether it was safe to run a program if the home directory doesn't exist. --check-programs seems like the obvious choice, but the results are surprising:
0 dkg@alice:~$ HOME=/nonexistent gpgconf --check-programs gpg:OpenPGP:/usr/bin/gpg:1:1: gpg-agent:Private Keys:/usr/bin/gpg-agent:1:0: scdaemon:Smartcards:/usr/lib/gnupg/scdaemon:1:1: gpgsm:S/MIME:/usr/bin/gpgsm:1:0:::can't create directory '/nonexistent/.gnupg'%3a No such file or directory: :::::::keyblock resource '/nonexistent/.gnupg/pubring.kbx'%3a No such file or directory: dirmngr:Network:/usr/bin/dirmngr:1:1: pinentry:Passphrase Entry:/usr/bin/pinentry:1:1: 0 dkg@alice:~$
This raises several questions:
- what does the line between gpgsm and dirmngr mean? Is there documentation to tell me that i should expect some line with empty values in first 7 fields?
- the avail field is 1 (true) for all of them, meaning "installed and runnable" according to gpgconf(1), but in T4866, @werner says: "GnuPG requires its home directory". Which is correct?
- Why do gpg-agent and gpgsm both have okay ("config file is syntactically ok") set to 0 (false), but the others claim an OK config file in the same situation?