Re: [PATCH 2/5] lib-gpg: allow tests with the GPGSM prereq first
- From
Todd Zullinger <tmz@pobox.com>
- Date
- Oct 9, 2025, 02:37 UTC
- Message-ID
- <aOcfzgxOwGemReNm@teonanacatl.net>
- In-Reply-To
- <871pncdfrw.fsf@gmail.com>
Collin Funk wrote:
Show 35 quoted lines
> Christian Couder <christian.couder@gmail.com> writes: > >>> Okay. I wonder why we even have to create the directory manually. We >>> don't do it in the GPGSM prereq either, as gpgsm seems to handle this >>> for us. >> >> Yeah, the GPGSSH prereq does `mkdir -p "$GNUPGHOME"`, but not the GPGSM prereq. >> >>> Doesn't `gpg --homedir ... --import` create the home directory >>> in a similar way? >> >> I am not sure. It might depend on the gpg version. Or maybe gpgsm >> does it but not gpg. I will check. > > If $GNUPGHOME or --homedir is the default (usually ~/.gnupg) gets > created by 'gpg' and 'gpgsm': > > $ ls ~/.gnupg > ls: cannot access '/root/.gnupg': No such file or directory > $ gpgsm > gpgsm: directory '/root/.gnupg' created > gpgsm: invalid command (there is no implicit command) > $ rm -rf ~/.gnupg && gpg > gpg: directory '/root/.gnupg' created > [...] > > If it is not the default then it will not be created: > > $ GNUPGHOME=$HOME/test gpgsm > gpgsm: keyblock resource '/root/test/pubring.kbx': No such file or directory > $ GNUPGHOME=$HOME/test gpg > gpg: keyblock resource '/root/test/pubring.kbx': No such file or directory > > Collin >
I sent a series long ago to fix this issue¹, but it wasn't picked up.
Fixing the issue exposes broken tests which use the gpg2 prereq. That breakage turns up in our CI and other build environments, like Fedora's, but I was never able to reliably trigger it locally and track down what was broken about those test.
I believe I asked about it again a few months later and it did not gain any attention.
I simply apply the patches locally and then disable those tests -- tests which don't run reliably are not worth running IMO. :)
¹ <20240703153738.916469-1-tmz@pobox.com>
-- Todd