git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: What's cooking in git.git (Jul 2017, #04; Thu, 13)

From
Santiago Torres <santiago@nyu.edu>
Date
Jul 18, 2017, 21:16 UTC
Message-ID
<20170718211651.rcnbkhcwem4sbcb5@LykOS.localdomain>
In-Reply-To
<xmqqeftdpor5.fsf@gitster.mtv.corp.google.com>
Show 7 quoted lines
> Oh, wait, I can run "gpg" just fine, but I do not seem to have
> gpgconf.
> 
> 	$ type gpgconf
> 	bash: type: gpgconf: not found
> 
> The patch may need a bit more cross-version work, it seems.
Right, sorry about that. 

I was testing against Debian Stretch/Arch, who do ship gpg2 with gpgconf. It seems Debian oldstable and other variants still ship gpg1, which doesn't have it. Would it make sense to have a fallthrough branch on the switch statement for gpg2.1 instead? something like the attached patch.

Thanks, -Santiago.

From 07ab87c1ddb31197a3a5c124ad5a2462a460d4e3 Mon Sep 17 00:00:00 2001
From: Santiago Torres <santiago@nyu.edu>
Date: Tue, 18 Jul 2017 13:16:11 -0400
Subject: [RFC/PATCH] t: lib-gpg: flush gpg agent on startup

When running gpg-relevant tests, a gpg-daemon is spawned for each GNUPGHOME used. This daemon may stay running after the test and cache file descriptors for the trash directories, even after the trash directory is removed. This leads to ENOENT errors when attempting to create files if tests are run multiple times.

Add a cleanup script to force flushing the gpg-agent for that GNUPGHOME (if any) before setting up the GPG relevant-environment.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Santiago Torres <santiago@nyu.edu>
---
 t/lib-gpg.sh | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index ec2aa8f68..ffb20a438 100755
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -10,6 +10,8 @@ then
 	'gpg (GnuPG) 1.0.6'*)
 		say "Your version of gpg (1.0.6) is too buggy for testing"
 		;;
+	'gpg (GnuPG) 2.1'*)
+		GNUPGHOME="$(pwd)/gpghome" gpgconf --kill all ;&
 	*)
 		# Available key info:
 		# * Type DSA and Elgamal, size 2048 bits, no expiration date,
-- 
2.13.3
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 13 in “What's cooking in git.git (Jul 2017, #04; Thu, 13)”
  1. Junio C HamanoJul 13, 2017
  2. Santiago TorresJul 14, 2017
  3. Junio C HamanoJul 14, 2017
  4. Santiago TorresJul 14, 2017
  5. Junio C HamanoJul 14, 2017
  6. Santiago TorresJul 17, 2017
  7. Junio C HamanoJul 17, 2017
  8. Santiago TorresJul 18, 2017
  9. Junio C HamanoJul 18, 2017
  10. Santiago TorresJul 18, 2017
  11. Junio C HamanoJul 18, 2017
  12. Ævar Arnfjörð BjarmasonJul 15, 2017
  13. Junio C HamanoJul 17, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.