Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 374549 - >=www-client/seamonkey-2.1 enigmail-1.2 fails to initialize gpg-agent
Summary: >=www-client/seamonkey-2.1 enigmail-1.2 fails to initialize gpg-agent
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL: https://www.mozdev.org/bugs/show_bug....
Whiteboard:
Keywords:
: 381923 388857 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-09 13:07 UTC by Chí-Thanh Christopher Nguyễn
Modified: 2011-12-06 18:39 UTC (History)
10 users (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 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-07-09 13:07:27 UTC
In seamonkey 2.1 and 2.2, the included enigmail extension is unable to initialize gpg-agent if it was not already started before.

This has already been fixed upstream.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-07-10 21:53:01 UTC
+*seamonkey-2.2-r1 (10 Jul 2011)
+
+  10 Jul 2011; Lars Wendler <polynomial-c@gentoo.org>
+  -files/enigmail/enigmail-1.2-seamonkey-2.2-versionfix.patch,
+  -seamonkey-2.2.ebuild, +seamonkey-2.2-r1.ebuild,
+  +files/enigmail/enigmail-updates.patch:
+  Attempt to fix gpg-agent bug with enigmail (bug #374549).
+

Can you please try seamonkey-2.2-r1 and report back if it works now?
Comment 2 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-07-11 02:36:37 UTC
No, there is a problem with the patch name which makes the build fail ("enigmail-updates.patch" filename vs "enigmail-update.patch" in epatch).

After changing the ebuild to match the patch name, the same error that gpg-agent could not be started comes.
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-07-11 07:51:46 UTC
Ah sorry... fixed the patchname.

So the bug still isn't fixed upstream. Let's keep this bug open until it is fixed. Meanwhile you might try to make sure that your gpg-agent is manually started properly when using seamonkey mail + enigmail.
Comment 4 Martin Mokrejš 2011-07-19 06:59:14 UTC
Is this bug about https://www.mozdev.org/bugs/show_bug.cgi?id=24153 ? I have the same issue and had probably never configured gpg-agent (http://mozilla-enigmail.org/forum/viewtopic.php?f=10&t=249). But still enigmail worked for me.

BTW, does Gentoo treat properly various possibilities where the files could reside ("${HOME}"/.gpg-agent-info, "${HOME}"/S.gpg-agent, or "${HOME}"/.gnupg/$somefile)? I do not see any 'socket/nfs' USE variable which I bet should be evaluated in the ebuild if the preferred/safe way would be to disable it for nfs-mounted $HOME. 'man gpg-agent' says:


       --use-standard-socket

       --no-use-standard-socket
              By enabling this option gpg-agent will listen on the socket named ‘S.gpg-agent’, located in the home directory, and  not
              create  a  random  socket below a temporary directory.  Tools connecting to gpg-agent should first try to connect to the
              socket given in environment variable GPG_AGENT_INFO and then fall back to this socket.  This option may not be  used  if
              the home directory is mounted on a remote file system which does not support special files like fifos or sockets.  Note,
              that --use-standard-socket is the default on all systems since GnuPG  2.1.   Note,  that  --use-standard-socket  is  the
              default  on  Windows  systems.  The default may be changed at build time.  It is possible to test at runtime whether the
              agent has been configured for use with the standard socket by  issuing  the  command  gpg-agent  --use-standard-socket-p
              which returns success if the standard socket option has been enabled.
Comment 5 Martin Mokrejš 2011-07-20 09:42:44 UTC
I contacted upstream and received:

This will get you the most complete diff with a few more bugs fixed:
http://www.mozdev.org/source/browse/enigmail/src/package/enigmail.js.diff?r1=1.300;r2=1.300.2.3

To recompile seamonkey on my hardware will take a while to test, somebody else please report meanwhile.
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-08-03 06:55:03 UTC
+*seamonkey-2.2-r2 (03 Aug 2011)
+
+  03 Aug 2011; Lars Wendler <polynomial-c@gentoo.org> -seamonkey-2.2-r1.ebuild,
+  +seamonkey-2.2-r2.ebuild, -files/enigmail/enigmail-updates.patch:
+  Updated enigmail version to 1.2.1
+
Does -r2 fix this issue?
Comment 7 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-08-04 16:59:31 UTC
No, it doesn't work. The same error as before.
Comment 8 Libor Polčák 2011-09-04 19:36:55 UTC
I have the same issue with www-client/seamonkey-2.3.1
Comment 9 aditsu 2011-09-05 11:22:30 UTC
*** Bug 381923 has been marked as a duplicate of this bug. ***
Comment 10 Martin Mokrejš 2011-09-20 21:37:34 UTC
Same with seamonkey-2.3.3.
Comment 11 Jory A. Pratt gentoo-dev 2011-10-31 17:23:19 UTC
*** Bug 388857 has been marked as a duplicate of this bug. ***
Comment 12 Jory A. Pratt gentoo-dev 2011-10-31 18:27:29 UTC
AGNT="${HOME}/.gpg-agent-info"

if test -f ${AGNT} && kill -0 $(cut -d : -f 2 ${AGNT}) 2>/dev/null ; then
        eval $(cat ${AGNT})
else
        eval $(gpg-agent --daemon --write-env-file)
fi

export GPG_AGENT_INFO

This is from polynomial-c, if your are not on kde place this in your .bashrc and do some testing. If you are on kde please email mozilla@gentoo.org to receive assistants from myself or polynomial-c.
Comment 13 Jimmy C. Chau 2011-11-01 11:35:44 UTC
(In reply to comment #12)
> AGNT="${HOME}/.gpg-agent-info"
> 
> if test -f ${AGNT} && kill -0 $(cut -d : -f 2 ${AGNT}) 2>/dev/null ; then
>         eval $(cat ${AGNT})
> else
>         eval $(gpg-agent --daemon --write-env-file)
> fi
> 
> export GPG_AGENT_INFO
> 
> This is from polynomial-c, if your are not on kde place this in your .bashrc
> and do some testing. If you are on kde please email mozilla@gentoo.org to
> receive assistants from myself or polynomial-c.

I'd also advise adding the following to .bashrc:
GPG_TTY="$(tty)"
export GPG_TTY

This is recommended by <http://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html>.  Without it, starting a new instance of gpg-agent may be required if another TTY is used.  E.g., if I first login to tty1 (causing gpg-agent to start), log into tty2, set GPG_AGENT_INFO but don't set GPG_TTY in tty2, and execute gpg --sign foo from tty2, then another instance of gpg-agent will be temporarily started by gpg to get my passphrase.
Comment 14 Matthew Schultz 2011-11-07 13:24:51 UTC
Has anyone tested enigmail 1.3.3 to see if that fixes this problem?  Seems enigmail should be bumped already since the one in portage is quite old.
Comment 15 Jory A. Pratt gentoo-dev 2011-11-13 21:57:01 UTC
Thunderbird-8.0 is fixed, seamonkey will be fixed soon as Polynomial-c has time to add it.
Comment 16 Jory A. Pratt gentoo-dev 2011-12-06 18:39:49 UTC
seamonkey-2.4.1-r2.ebuild has required fixes, thanks for reporting closing.