Created attachment 305271 [details] Output of 'emerge --info' I have app-crypt/gnupg-2.0.17 installed with the following USE flags: bzip2 ldap nls static -adns -caps -doc -openct -pcsc-lite (-selinux) -smartcard When I try to retrieve a key from a keyserver, I get the following error (key ID replaced with XXX): $ gpg --keyserver subkeys.pgp.net --keyserver-options debug --recv-keys XXX gpg: requesting key XXX from hkp server subkeys.pgp.net gpgkeys: curl version = GnuPG curl-shim * HTTP proxy is "null" * HTTP URL is "http://subkeys.pgp.net:11371/pks/lookup?op=get&options=mr&search=XXX" * HTTP auth is "null" * HTTP method is GET : can't connect to `subkeys.pgp.net': host not found gpgkeys: HTTP fetch error 7: couldn't connect: Not found gpg: no valid OpenPGP data found. gpg: Total number processed: 0 If I build gnupg with -static, everything works fine. I will add the output of 'emerge --info' as an attachment.
Same here, also with gnupg-2.0.19. # gpg2 --homedir /etc/portage/gpg --keyserver subkeys.pgp.net --recv-keys 0x239C75C4 0x96D8BF6D gpg: requesting key 239C75C4 from hkp server subkeys.pgp.net gpg: requesting key 96D8BF6D from hkp server subkeys.pgp.net : can't connect to `subkeys.pgp.net': host not found gpgkeys: HTTP fetch error 7: couldn't connect: Not found : can't connect to `subkeys.pgp.net': host not found gpgkeys: HTTP fetch error 7: couldn't connect: Not found gpg: no valid OpenPGP data found. gpg: Total number processed: 0
Attached config.log, I think the intersting part is from: configure:9374: checking whether libcurl is usable configure:9407: x86_64-pc-linux-gnu-gcc -o conftest -O2 -pipe -march=native -mno-avx -Wl,-O1 -Wl,--as-needed -static conftest.c -lcurl -lldap -lrt -lz -lgnutls >&5 Which fails with a lot of errors. I think we're missing some static-libs. I've the static-libs USE flag enabled on these ebuilds (among others): dev-libs/openssl dev-libs/libgcrypt net-libs/gnutls net-misc/curl
Created attachment 307859 [details] config.log from `USE="static" emerge gnupg`
I've tracked the issue down a little and it the problem *might* be in the gpg2keys_hkp binary (maybe also gpg2keys_curl). I'll attach two attachements that might help with debugging. The easy way to test it is: cd gnupg-2.0.19 LDFLAGS=-static ./configure make then you can do this: ~/gnupg-2.0.19 $ cat test-file | ./keyserver/gpg2keys_hkp and, if you used my patch, get this: VERSION 1 PROGRAM 2.0.19 Host: keyserver.ubuntu.com Command: SEARCH SEARCH joost BEGIN gpgkeys: HTTP URL is `http://keyserver.ubuntu.com:11371/pks/lookup?op=index&options=mr&search=joost' * HTTP proxy is "null" * HTTP URL is "http://keyserver.ubuntu.com:11371/pks/lookup?op=index&options=mr&search=joost" * HTTP auth is "null" * HTTP method is GET : can't connect to `keyserver.ubuntu.com': host not found gpgkeys: HTTP search error 7: couldn't connect: Not found SEARCH joost FAILED 9 "test-file" is a file that contains a (seems) valid string that gpg feeds to gpg2keys_hkp when executed with --search-keys joost (just an example). It worked for me if without static and doesn't if -static option passed. These artifacts are results of my attempts to track it down. Keep in mind I'm not sure it's the correct "path"… I'll attach the "test-file" and the patch.
Created attachment 308029 [details, diff] patch to provide more debugging info
Created attachment 308031 [details] "test-file" mentioned in comment 4
Hello I also have same problem.
it happens with 2.0.19 ?
Same problem with amd64 with GPG 2.0.19 gpg --keyserver http://pool.sks-keyservers.net --recv-keys XXX gpg: requesting key XXX from http server pool.sks-keyservers.net gpgkeys: no key data found for http://pool.sks-keyservers.net/ gpg: no valid OpenPGP data found. gpg: Total number processed: 0 It seems to be common to gpgp 2.x, I found the key with gpg on ubuntu, but the same problem occurred with gpg2.
I don't think upstream supports gpg2 built in static.
Should be fixed in gnupg-2.0.19-r1. USE="static" emerge --oneshot gnupg gpg --keyserver pgp.mit.edu --recv-keys F758CE318D77295D gpg: requesting key 8D77295D from hkp server pgp.mit.edu gpg: key 8D77295D: public key "Eric Evans <eevans@sym-link.com>" imported gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model gpg: depth: 0 valid: 12 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 12u gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1)