Tips running gpg-agent/scdaemon in a dev env?

Werner Koch wk at gnupg.org
Sun Jan 16 13:57:42 CET 2011


On Sun, 16 Jan 2011 02:20, kgo at grant-olson.net said:

> If anyone could provide some tips so that I can get to the point where I
> can easily start/stop gpg-agent and scdaemon at will while developing,

For testing I do this.  I add a disable-scdaemon to
~/.gnupg/gpg-agent.conf .  This allows to keep on using gpg-agent.

For testing I have a new gnupg home directory, cd to it and then run
gpg-agent this way:

  cd /home/me/testdir
  GNUPGHOME=$(pwd) ~/b/gnupg/gpg-agent --daemon sh

The creates a new shell with all environment variables properly set up.
If you want to test a new version of gpg-agent, just enter "exit" to
leave this shell and wait a few seconds until the still running
gpg-agent detected that the shell terminated and terminate itself.
You may test this by running gpg-connect-agent.  For example

  gpg-connect-agent 'getinfo socket_name' /bye

quickliy shows tou the socket gpg-agent is using.  

  gpg-connect-agent 'getinfo pid' /bye

shows the pid; you may also run gpg-connect-agent interactivly.  For
example:

  gpg-connect-agent
  > scd serialno

Starts scdameon if it is not already running and sends the SERIALNO
command to scdameon (via gpg-agent).

Running watchgnupg on a log socket dedicated to the test environment is
also very helpful; add

  log-file socket:///home/me/testdir/S.log
  debug 1024
  verbose

to testdir/gpg-agent.conf and testdir/scdaemon.conf.  In some xterm run

  watchgnupg --force /home/me/testdir/S.log

to see what's going on.


Salam-Shalom,

   Werner

p.s.  If you want to send patches, be aware that we need copyright
assignments to the FSF.  A couple of patches to solve your problem have
already been posted to this ML.

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-devel mailing list