Re: [PATCH] gpg-interface: fix for gpgsm v2.3
- From
Todd Zullinger <tmz@pobox.com>
- Date
- Feb 23, 2022, 04:38 UTC
- Message-ID
- <YhW6Xx5iVqVleUYc@pobox.com>
- In-Reply-To
- <20220221092234.6kg66c3tuo2pya2a@fs>
Fabian Stelzer wrote:
Show 11 quoted lines
> On 09.02.2022 11:20, Todd Zullinger wrote: >> Interesting. I do have a patch in my gnupg-2.3 series to >> reload the gpg agent after changing the trustlist, as the >> changes were not picked up prior to that. In my case, I was >> running the tests in an environment where gpg could not >> prompt me. (It also seems like we should try harder to have >> the test suite reject such prompts). >> > > Yes, gpg-agent in general can be problematic for the tests. I'm not familiar > enough with gpg but I don't know if we can get by without it?
With modern gnupg, the secret keyring access is handled by gpg-agent. So it's no longer optional, which is mildly unfortunate for automated tests..
Show 16 quoted lines
>> diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
>> index 6bc083ca77..38e2c0f4fb 100644
>> --- a/t/lib-gpg.sh
>> +++ b/t/lib-gpg.sh
>> @@ -75,6 +75,7 @@ test_lazy_prereq GPGSM '
>> gpgsm --homedir "${GNUPGHOME}" -K --with-colons |
>> awk -F ":" "/^fpr:/ {printf \"%s S relax\\n\", \$10}" \
>> >"${GNUPGHOME}/trustlist.txt" &&
>> + (gpgconf --reload all || : ) &&
>>
>> echo hello | gpgsm --homedir "${GNUPGHOME}" >/dev/null \
>> -u committer@example.com -o /dev/null --sign -
>>
>> --- 8< ---
>
> This patch fixes it for me.Excellent.
> I have prepared the patch with the simple strstr() matching I can post in a > bit. I would add your two gpg test lib patches to it if thats ok?
Absolutely. Thank you for working on this and pulling it together.
Cheers,
-- Todd