Re: [PATCH] gpg-interface: fix for gpgsm v2.3
From: Todd Zullinger <hidden>
Date: 2022-02-23 04:39:03
Fabian Stelzer wrote:
On 09.02.2022 11:20, Todd Zullinger wrote:quoted
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..
quoted
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