Quantcast

[Bug] lingering gpg-agents from test suite

classic Classic list List threaded Threaded
3 messages Options
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug] lingering gpg-agents from test suite


Thanks to changes in gnupg 2.1.20, the agent started by the notmuch test
suite is no longer killed by deleting the home directory.

So yay, we get to adapt to changes in gnupg, again.

See also

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862093


_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Justus Winter-2 Justus Winter-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Bug] lingering gpg-agents from test suite

David Bremner <[hidden email]> writes:

> Thanks to changes in gnupg 2.1.20, the agent started by the notmuch test
> suite is no longer killed by deleting the home directory.
>
> So yay, we get to adapt to changes in gnupg, again.
>
> See also
>
>     https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862093

where you write:
> As of 2.1.20, removing $GNUPGHOME is no longer enough for gpg-agent to
> shut itself down. It seems that removing the directory
> /run/user/gnupg/d.$hash is enough to trigger the shutdown.
>
> I'm not sure the underlying cause; perhaps the change to use /run/user
> for non-standard homedirs (which I generally think is sensible) has
> this as a side-effect.

What triggers the automatic shutdown is the removal of the socket.
2.1.20 creates the so-called socket directory automatically (if it finds
/**/run/user).

> The main practical difficulty for me is that this makes it harder for
> test suites using gnupg to work across multiple gpg versions and
> multiple environments. I suppose I'll have to see how far back
> "gpgconf --kill all" is supported.

Yes, please try to do 'gpgconf --kill all' and ignore the exit status.


Justus

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch

signature.asc (497 bytes) Download Attachment
Tomi Ollila-2 Tomi Ollila-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Bug] lingering gpg-agents from test suite

On Mon, May 15 2017, Justus Winter wrote:

> David Bremner <[hidden email]> writes:
>
>> Thanks to changes in gnupg 2.1.20, the agent started by the notmuch test
>> suite is no longer killed by deleting the home directory.
>>
>> So yay, we get to adapt to changes in gnupg, again.
>>
>> See also
>>
>>     https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862093
>
> where you write:
>> As of 2.1.20, removing $GNUPGHOME is no longer enough for gpg-agent to
>> shut itself down. It seems that removing the directory
>> /run/user/gnupg/d.$hash is enough to trigger the shutdown.
>>
>> I'm not sure the underlying cause; perhaps the change to use /run/user
>> for non-standard homedirs (which I generally think is sensible) has
>> this as a side-effect.
>
> What triggers the automatic shutdown is the removal of the socket.
> 2.1.20 creates the so-called socket directory automatically (if it finds
> /**/run/user).
>
>> The main practical difficulty for me is that this makes it harder for
>> test suites using gnupg to work across multiple gpg versions and
>> multiple environments. I suppose I'll have to see how far back
>> "gpgconf --kill all" is supported.
>
> Yes, please try to do 'gpgconf --kill all' and ignore the exit status.

Quick & dirty:

trap 'if command -v gpgconf >/dev/null; then
         gpgconf --kill all || :
      fi
      trap - 0' 0 INT HUP TERM QUIT

I'll look a bit more a bit later...

Tomi


>
>
> Justus
> _______________________________________________
> notmuch mailing list
> [hidden email]
> https://notmuchmail.org/mailman/listinfo/notmuch
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Loading...