Several GnuPG instances, with their corresponding agents

Phil Pennock gnupg-users at spodhuis.org
Mon Mar 11 20:56:37 CET 2019


On 2019-03-10 at 01:25 -0500, Konstantin Boyandin via Gnupg-users wrote:
> I would like to use, whenever I like, manually builds (such as current
> 2.2.13).
> 
> Question: how do I keep several GnuPG versions installed, every version
> with its own gpg-agent?

After running ./configure [--args], take a look at the generated
`config.h` file.  Some of these can't be easily overridden at configure
time, but you can patch between configure and build.

As to whether you break at the "directory" or "socket location" level
... remember that GnuPG regards the contents of the directory as its
fiefdom and is free to move things around, often with auto-upgrade logic
which might get in the way if you want to try to downgrade.

Specifically, the defines which matter here are:
  GNUPG_DEFAULT_HOMEDIR
  anything ending _SOCK_NAME

I recommend, if doing this, that you just change GNUPG_DEFAULT_HOMEDIR
and do not try to share one config directory between multiple
concurrently-installed versions of GnuPG.

Myself, I install to /opt/gnupg/ and leave the homedir to the default.
If a user account needs to use the newer GnuPG instead of the system
one, it's the responsibility of that account to manage the directory.
If one account is trying to use both system and current GnuPG, that's a
logic error elsewhere which should be cleaned up.

-Phil



More information about the Gnupg-users mailing list