Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417437 - app-crypt/gpa-0.9.1_pre20100416 configures incorrect path for /usr/libexec/gpg2keys_* helpers for app-crypt/gnupg[-ldap]
Summary: app-crypt/gpa-0.9.1_pre20100416 configures incorrect path for /usr/libexec/gp...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-25 01:03 UTC by Maxim Kammerer
Modified: 2013-01-13 17:47 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 Maxim Kammerer 2012-05-25 01:03:23 UTC
It appears that the following ebuild fixes:

    sed -e "s|gnupg/:|:|g" -i configure.ac || die
    [[ -f /usr/lib/gnupg/gpgkeys_hkp ]] && myconf="--libexecdir=/usr/$(get_libdir)"

stopped working at some point in the last 8 years (or never worked properly):

# strings -a /usr/bin/gpa | grep libexec
${exec_prefix}/libexec/gnupg

When attempting to retrieve a key from the GPA interface:

$ strace gpa 2>&1 | grep keys_
access("${exec_prefix}/libexec/gnupg/gpg2keys_hkp", F_OK) = -1 ENOENT (No such file or directory)

That's the only message -- probably because the fallback path (as above, but with "gpgkeys_hkp") is then attempted to be spawned in a fork (see src/server-access.c).

src/server-access.c uses GPA_KEYSERVER_HELPERS_DIR, which is defined in gpadefs.h.in as KEYSERVER_HELPERS_DIR, which, according to configure.ac, is set to directory name of gpgkeys_ldap (that is searched in outdated directories, but the sed line above should probably fix that).

So it seems that if app-crypt/gnupg is built with USE=-ldap, GPA will not be able to use any GnuPG helpers to retrieve and upload keys.

TL;DR: gpa's configure searches for gpgkeys_ldap, and sets prefix for all helpers accordingly -- using garbage prefix and outdated suffix if it can't find the file. Using e.g., gpg2keys_hkp should probably fix that, since GPGKEYS_LDAP is apparently not directly used otherwise.
Comment 1 Maxim Kammerer 2012-06-16 17:29:18 UTC
Temporarily creating /usr/libexec/gpgkeys_ldap (with mode 0755) before emerging app-crypt/gpa fixes the issue:

# strings -a /usr/bin/gpa|g libexec
/usr/libexec

So replacing gpgkeys_ldap with e.g., gpgkeys_hkp (or gpg2keys_hkp) in configure.ac will probably work.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-08-27 01:52:41 UTC
Thanks for reporting, fixed it.
Comment 3 Maxim Kammerer 2012-11-22 13:14:46 UTC
It is not fixed:

# strings -a /usr/bin/gpa | grep libexec
/usr/libexec/gnupg
Comment 4 Maxim Kammerer 2012-11-22 13:22:43 UTC
Moreover, the approach in comment #1 ("temporarily creating /usr/libexec/gpgkeys_ldap") doesn't work anymore, so key import in GPA is now broken for all gnupg-2 users, not just gnupg[-ldap].
Comment 5 Maxim Kammerer 2012-11-22 13:48:27 UTC
A temporary workaround, if anyone needs one:

ln -s . /usr/libexec/gnupg
Comment 6 Alon Bar-Lev (RETIRED) gentoo-dev 2013-01-12 22:10:39 UTC
please re-emerge gpa-0.9.3
Comment 7 Maxim Kammerer 2013-01-13 17:47:00 UTC
Thanks, seems to be fixed:

# strings /usr/bin/gpa | grep libexec
/usr/libexec