git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Santiago Torres <santiago@nyu.edu>
Cc: git@vger.kernel.org
Subject: Re: What's cooking in git.git (Jul 2017, #04; Thu, 13)
Date: Tue, 18 Jul 2017 14:38:32 -0700	[thread overview]
Message-ID: <xmqqvampmnmv.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170718211651.rcnbkhcwem4sbcb5@LykOS.localdomain> (Santiago Torres's message of "Tue, 18 Jul 2017 17:16:52 -0400")

Santiago Torres <santiago@nyu.edu> writes:

> ... 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.

If the problem of leftover agent is limited to a narrow versions of
GPG2, alternatively we could unconditionally attempt to use gpgconf
and ignore the failure ;-), but as long as we know all problematic
ones identify themselves as "gpg (GnuPG) 2.1*", then your patch
(with s/;&/;;/ of course ;-)) sounds very sensible.

> Thanks,

Thank *you* for working on this.

> 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

Perhaps it is about time we lost RFC/ mark from here.

>
> 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,

  reply	other threads:[~2017-07-18 21:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13 23:44 What's cooking in git.git (Jul 2017, #04; Thu, 13) Junio C Hamano
2017-07-14  0:27 ` Santiago Torres
2017-07-14  2:32   ` Junio C Hamano
2017-07-14 14:02     ` Santiago Torres
2017-07-14 15:25       ` Junio C Hamano
2017-07-17 21:42         ` Santiago Torres
2017-07-17 22:09           ` Junio C Hamano
2017-07-18 17:54             ` Santiago Torres
2017-07-18 18:46               ` Junio C Hamano
2017-07-18 21:16                 ` Santiago Torres
2017-07-18 21:38                   ` Junio C Hamano [this message]
2017-07-15 11:12 ` Ævar Arnfjörð Bjarmason
2017-07-17 17:55   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqvampmnmv.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=santiago@nyu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).