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

Re: tests do not work with gpg 2.1

From
Jeff King <peff@peff.net>
Date
Dec 2, 2014, 21:30 UTC
Message-ID
<20141202213002.GA25338@peff.net>
In-Reply-To
<20141202212133.GE23461@peff.net>
On Tue, Dec 02, 2014 at 04:21:33PM -0500, Jeff King wrote:
Show 8 quoted lines
> I'm not sure if the most expedient path is trying to convince gpg
> developers that it's a bug, or if there is some workaround (like
> "--passphrase-file /dev/null" or something).
> 
> I've been using the patch below to test, and am tempted to offer it for
> inclusion. But if we need to hack up the gpg command-line just for the
> tests, then lib-gpg.sh would end up setting gpg.program, and that would
> override what my patch is doing anyway.
So...I tried that. So many things went wrong. :)

For one thing, the build-time GPG_PATH patch I posted is not quite enough. We would probably want to pass it down to the test scripts, too, as they run "gpg --version" to figure out whether we have gpg or not.

Secondly, you cannot set gpg.program to "gpg2 --passphrase-file /dev/null", because we do not use the shell to exec gpg.program. This is unlike most of the rest of git-spawned programs, but of course changing it has compatibility problems. We'd probably want gpg.command or something as an alternative.

And finally, after convincing git to really use "--passphrase-file", I find that it does not fix the problem at all. GPG still insists on opening an agent window. Nor does "--batch" help.

So I dunno. Maybe there is some clever way to work around it, but I do not know it.

-Peff
Previous: Jeff King
Message 15 of 15 in “[ANNOUNCE] Git v2.2.0”
  1. Junio C HamanoNov 26, 2014
  2. Steven NoonanNov 27, 2014
  3. Jeff KingNov 28, 2014
  4. Michael J GruberNov 28, 2014
  5. tests do not work with gpg 2.1Jeff King, Nov 28, 2014
  6. Michael J GruberDec 2, 2014
  7. t/lib-gpg: adjust permissions for gnupg 2.1Michael J Gruber, Dec 2, 2014
  8. Jeff KingDec 2, 2014
  9. Junio C HamanoDec 2, 2014
  10. Jeff KingDec 3, 2014
  11. Junio C HamanoDec 3, 2014
  12. Michael J GruberDec 3, 2014
  13. Junio C HamanoDec 3, 2014
  14. Jeff KingDec 2, 2014
  15. Jeff KingDec 2, 2014

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.