gpg-agent service sets wrong SSH_AUTH_SOCK value
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnupg2 (Ubuntu) |
Fix Released
|
High
|
Dimitri John Ledkov | ||
Yakkety |
New
|
Undecided
|
Unassigned |
Bug Description
After upgrading from xenial to yakkety, I noticed that my SSH_AUTH_SOCK environment variable pointed to $GNUPGHOME/
After much investigation, it appears that the variable is set by upstart in the /usr/share/
The logic is shamelessly stolen from gnupg-agent's systemd user service file, /usr/lib/
ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: gnupg-agent 2.1.15-1ubuntu6
ProcVersionSign
Uname: Linux 4.8.0-41-lowlatency x86_64
ApportVersion: 2.20.3-0ubuntu8.2
Architecture: amd64
CurrentDesktop: GNOME
Date: Fri Mar 24 21:26:51 2017
InstallationDate: Installed on 2012-10-22 (1613 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
SourcePackage: gnupg2
UpgradeStatus: Upgraded to yakkety on 2017-03-19 (5 days ago)
upstart.
initctl: invalid option: --no-wait
Try `initctl --help' for more information.
Changed in gnupg2 (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Dimitri John Ledkov (xnox) |
milestone: | none → ubuntu-17.04 |
Changed in gnupg2 (Ubuntu Yakkety): | |
assignee: | nobody → rahmadani (rahmadani) |
Changed in gnupg2 (Ubuntu Yakkety): | |
assignee: | rahmadani (rahmadani) → nobody |
My first attempt to fix this involved trying to move gpg-agent invocation from upstart to systemd --user. I got that to work by creating: upstart/ gpg-agent. override (manual) systemd/ user/default. target. wants/gpg- agent.service -> /usr/lib/ systemd/ user/gpg- agent.service systemd/ user/gpg- agent.service. d/override. conf ([Unit] graphical- session- pre.target)
~/.config/
~/.config/
~/.config/
Before=
That correctly started the gpg-agent service, but the environment variables were not visible within a terminal started from gnome-shell. Somehow upstart seems to be the only way for setting env vars, the systemd user service unit does not work as intended. Upstart needs to die. Fast ;-)