[PATCH 2 of 3] test-gpg: start gpg-agent under control of the test runner

Danek Duvall danek.duvall at oracle.com
Sun Aug 28 13:22:53 EDT 2016


Yuya Nishihara wrote:

> > I got an error here:
> > 
> >     --- test-gpg.t	2016-08-26 20:00:15.146215645 -0700
> >     +++ test-gpg.t.err	2016-08-26 20:06:43.142508667 -0700
> >     @@ -17,6 +17,8 @@
> >      #if gpg2
> >        $ gpg-connect-agent -q --subst /serverpid '/echo ${get serverpid}' /bye \
> >        > >> $DAEMON_PIDS
> >     +  gpg-connect-agent: can't connect to the agent: IPC connect call failed
> >     +  [1]
> >        $ gpg --no-permission-warning --no-secmem-warning --list-secret-keys \
> >        > > /dev/null 2>&1
> >      #endif
> 
> Can you provide "gpg --version" ?

    gpg (GnuPG) 2.0.30
    libgcrypt 1.7.2
    Copyright (C) 2015 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

    Home: ~/.gnupg
    Supported algorithms:
    Pubkey: RSA, RSA, RSA, ELG, DSA
    Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
            CAMELLIA128, CAMELLIA192, CAMELLIA256
    Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
    Compression: Uncompressed, ZIP, ZLIB, BZIP2

> > which seems reasonable, since gpg-agent hasn't actually been started yet.
> > The command -- gpg-connect-agent -- seems out of place with the comment,
> > which talks about gpg-agent.
> > 
> > What's actually supposed to happen?  Is gpg supposed to start gpg-agent in
> > the background?  If so, then shouldn't using gpg-connect-agent to get the
> > agent's pid come after that?
> 
> The man page says gpg-connect-agent starts gpg-agent. What I want is to spawn
> gpg-agent and wait to get pid.
> 
> https://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html

Neither the info page nor the man page on my system say that.  Looks like
this is a feature that's new with 2.1?  I can probably try to get us
upgraded to 2.1, but the fact that 2.0.x is labeled "stable" and continues
to get updates probably doesn't help any.

I can patch my local copy if you don't want to support gpg 2.0.

Thanks,
Danek


More information about the Mercurial-devel mailing list