Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134413 - gpg-agent (1.9.20-r3) does not set environment variables
Summary: gpg-agent (1.9.20-r3) does not set environment variables
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Crypto team [DISABLED]
URL: http://www.gnupg.org
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-26 06:19 UTC by Peter Hyman
Modified: 2006-05-26 07:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Hyman 2006-05-26 06:19:49 UTC
When starting gpg-agent as a daemon, it prints the commands which would be required to set the GPG_AGENT_INFO environment variable, but does not actually execute the command!

peter@mars ~ $ gpg-agent --daemon
GPG_AGENT_INFO=/tmp/gpg-BFjiaC/S.gpg-agent:2270:1; export GPG_AGENT_INFO;
peter@mars ~ $ set |grep GPG_AGENT_INFO
peter@mars ~ $ 

Manual application looks like this:
peter@mars ~ $ GPG_AGENT_INFO=/tmp/gpg-BFjiaC/S.gpg-agent:2270:1; export GPG_AGENT_INFO;
peter@mars ~ $ set |grep GPG_AGENT_INFO
GPG_AGENT_INFO=/tmp/gpg-BFjiaC/S.gpg-agent:2270:1

which is the expected output.

By manually copying the output, the environment is set. However, if that is not done, no contact with the agent daemon is possible. Programs such as kgpg will complain that use-agent is defined in gpg.conf, but the agent does not appear to be running.
Comment 1 Stefan Schweizer (RETIRED) gentoo-dev 2006-05-26 06:24:32 UTC
try eval "$(/usr/bin/gpg-agent --daemon)"

eval does just add the resulting flags to the environment :)
Comment 2 Peter Hyman 2006-05-26 06:30:28 UTC
Yes. that works. In the xml guide for gnupg, I `thought' the command used in the kde example was specific to kde. So I extracted the part in the () and tried it directly. BTW, what's with the gpg-experimental use flag? I did not realize gpg2 was not even being compiled until I tried to run it. It does not conflict with gpg, and IMHO, the flag is superfluous!
Comment 3 Daniel Black (RETIRED) gentoo-dev 2006-05-26 06:59:00 UTC
Peter it was just in case a package went for gpg2 over gpg. Upstream still recommend gpg 1.4. It is a bit superfluous but it made people happy (I hope) bug 132343. (http://lists.gnupg.org/pipermail/gnupg-announce/2005q4/000209.html)
Comment 4 Peter Hyman 2006-05-26 07:12:48 UTC
oddly enough, this package is marked stable, and came through emerge as a slot og gnupg. I was a little confused by this! Since gpg2 is named differently, I do not see the potential for confusion. Although, perhaps consider adding an info notice in the ebuild about not having used gpg2-experimental. It's not apparent that gpg is not being compiled since the configure summary disappears quickly off the screen. JM2C