keybase / keybase-issues

A single repo for managing publicly recognized issues with the keybase client, installer, and website.
899 stars 37 forks source link

GNUPGHOME isn't respected #2178

Open jasonkarns opened 8 years ago

jasonkarns commented 8 years ago

I have GNUPGHOME set to a directory under XDG_CONFIG_HOME. However, any of the keybase pgp subcommands are still expecting/recreating ~/.gnupg rather than respecting GNUPGHOME.

$ keybase --version
keybase version 1.0.14-1
maxtaco commented 8 years ago

this might be an issue of a restart of the service needed before the environment variable is sourced

jasonkarns commented 8 years ago

I restarted the service, but it still seems to only be writing to .gnupg. (I'm basing this off the fact that keybase pgp pull regenerates the .gnupg directory).

jasonkarns commented 8 years ago

FWIW, I set up a symlink for .gnupg for now, but I would love to figure this out.

maxtaco commented 8 years ago

And the service now has the GNUPGHOME variable set? You can ask ps to tell you the environment of the service.

jasonkarns commented 8 years ago

It appears not to. I have GNUPGHOME exported in .bashrc, which is in turn sourced by .profile.

How is this expected to be set? launchctl? Should it be launched by a different user?

maxtaco commented 8 years ago

Yeah, launchctl setenv should do it. Annoying problem, sorry about that....

jasonkarns commented 8 years ago

Thanks!

Can a feature request be opened so this isn't necessary? I fully expect to forget about this and be baffled in 6mo when I get a new computer or reinstall, you know?

Thanks again for the help.

On Mon, Apr 4, 2016 at 4:22 PM, Maxwell Krohn notifications@github.com wrote:

Yeah, launchctl setenv should do it. Annoying problem, sorry about that....

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/keybase/keybase-issues/issues/2178#issuecomment-205478274

jasonkarns commented 8 years ago

Followup comment as I just realized this will be doubling annoying if my XDG_CONFIG_HOME ever changes. My GNUPGHOME is set as: export GNUPGHOME=$XDG_CONFIG_HOME/gpg but launchctl won't have the proper XDG_CONFIG_HOME, so I'll have to duplicate/hard-code that.

jasonkarns commented 8 years ago

Planning on submitting a PR to the homebrew formula to include this as a caveat:

https://github.com/Homebrew/homebrew-core/commit/efab5ca281b590ad2f6ca8ec90a903d08997cebe

thoughts?