Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 573398

Summary: app-crypt/gnupg-2.1.11 fails tests
Product: Gentoo Linux Reporter: tka <tka>
Component: Current packagesAssignee: Crypto team [DISABLED] <crypto+disabled>
Status: RESOLVED FIXED    
Severity: normal CC: k_f, neal, toralf
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugs.gnupg.org/gnupg/issue2229
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 552936    
Attachments: build.log
Logs of the failed tests
info.txt
app-crypt:gnupg-2.1.11:20160201-220950.log
emerge-history.txt
environment

Description tka 2016-01-30 14:19:44 UTC
gnupg-2.1.11. fails some openpgp tests:

make[3]: Entering directory '/var/tmp/portage/app-crypt/gnupg-2.1.11/work/gnupg-2.1.11/tests/openpgp'
FAIL: version.test
FAIL: decrypt.test
FAIL: sigs.test
FAIL: seat.test
FAIL: clearsig.test
FAIL: detach.test
FAIL: armsigs.test
FAIL: signencrypt.test
FAIL: armsignencrypt.test
FAIL: armdetach.test
FAIL: armdetachm.test
FAIL: detachm.test
FAIL: conventional-mdc.test
armor.test: bug#1179 is back in town
FAIL: armor.test
======================================
14 of 34 tests failed
Please report to http://bugs.gnupg.org
======================================
Makefile:466: recipe for target 'check-TESTS' failed
make[3]: *** [check-TESTS] Error 1
make[3]: Leaving directory '/var/tmp/portage/app-crypt/gnupg-2.1.11/work/gnupg-2.1.11/tests/openpgp'


Reproducible: Always




# emerge --info '=app-crypt/gnupg-2.1.11::gentoo'
Portage 2.2.27 (python 3.4.3-final-0, hardened/linux/amd64/no-multilib, gcc-5.3.0, glibc-2.22-r1, 4.4.0 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.4.0-x86_64-Intel-R-_Core-TM-_i7-3720QM_CPU_@_2.60GHz-with-gentoo-2.2
KiB Mem:    16399632 total,  11099488 free
KiB Swap:   17825788 total,  17825788 free
Timestamp of repository gentoo: Sat, 30 Jan 2016 13:00:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo
dev-util/cmake:           3.4.3::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.20.4::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.14.1-r1::gentoo, 1.15-r1::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.7.4::gentoo, 4.9.3::gentoo, 5.3.0::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

local
    location: /var/lib/portage-local/local
    masters: gentoo
    priority: 0

testing
    location: /var/lib/portage-local/testing
    masters: gentoo
    priority: 1

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -mtune=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 acl acpi alsa amd64 avx berkdb bzip2 cairo caps cdda cddb cdparanoia cli cracklib crypt cups cxx dbus dri dts dvd fam ffmpeg fftw flac fontconfig foomaticdb gdbm gif gimp gmp gnutls gtk hardened iconv icu idn ipv6 jpeg justify lame lcms libnotify lzma mad matroska mmap mmx mmxext modules mp3 mpeg ncurses networkmanager nptl ogg opengl openmp pam pcre pie png policykit ppds readline sasl sdl seccomp session sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssp ssse3 startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower vaapi vorbis wayland x264 xattr xcb xml xtpax xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="i965 intel nouveau" XFCE_PLUGINS="power" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


# emerge -pqv '=app-crypt/gnupg-2.1.11::gentoo'
[ebuild     U ] app-crypt/gnupg-2.1.11 [2.1.10-r1] USE="bzip2 gnutls readline -doc -ldap -nls (-selinux) -smartcard -static -tofu -tools -usb"
Comment 1 tka 2016-01-30 14:20:19 UTC
Created attachment 424250 [details]
build.log
Comment 2 tka 2016-01-30 14:34:55 UTC
Created attachment 424252 [details]
Logs of the failed tests

The common error is "gpg: * failed: No passphrase given" except for version.test, where there is an error with the agent. The agent error is related to the passphrase though.
Comment 3 Kristian Fiskerstrand gentoo-dev Security 2016-01-30 14:36:36 UTC
(In reply to tka from comment #2)
> Created attachment 424252 [details]
> Logs of the failed tests
> 
> The common error is "gpg: * failed: No passphrase given" except for
> version.test, where there is an error with the agent. The agent error is
> related to the passphrase though.

Immediately sounds like a pinentry issue, you can try export GPG_TTY=$(tty) and make sure DISPLAY is unset (although I expect it normally tries to use a pinentry loopback).. will look into it after FOSDEM..
Comment 4 tka 2016-01-30 14:55:52 UTC
(In reply to Kristian Fiskerstrand from comment #3)
> Immediately sounds like a pinentry issue, you can try export GPG_TTY=$(tty)
> and make sure DISPLAY is unset

# export GPG_TTY=$(tty)
# unset DISPLAY
# MAKEOPTS=-j1 emerge -1 =app-crypt/gnupg-2.1.11::gentoo

==> The tests still fail.
Comment 5 tka 2016-01-30 15:10:31 UTC
Just to rule out other packages that where updated since the last build of gnupg as the culprit, I rebuild gnupg-2.1.10-r1. Its test suite still passes; thus, the failure is likely in gnupg-2.1.11 (or its test suite) itself.
Comment 6 Kristian Fiskerstrand gentoo-dev Security 2016-02-01 20:36:03 UTC
(In reply to tka from comment #5)
> Just to rule out other packages that where updated since the last build of
> gnupg as the culprit, I rebuild gnupg-2.1.10-r1. Its test suite still
> passes; thus, the failure is likely in gnupg-2.1.11 (or its test suite)
> itself.

fwiw, I just re-ran the test suite for .11 here and all passes. 

What is interesting in your logs is this
gpg-preset-passphrase: problem with the agent
gpg-preset-passphrase: caching passphrase failed: Invalid response

One difference between the systems is that I'm not running it on a hardened host though. Do you have access to non-hardened to see if you can replicate it there? Or access to any logs or information that might explain why gpg-preset-passphrase fails to communicate with gpg-agent over the assuan channel?
Comment 7 Kristian Fiskerstrand gentoo-dev Security 2016-02-01 21:24:57 UTC
(In reply to Kristian Fiskerstrand from comment #6)
> (In reply to tka from comment #5)
> > Just to rule out other packages that where updated since the last build of
> > gnupg as the culprit, I rebuild gnupg-2.1.10-r1. Its test suite still
> > passes; thus, the failure is likely in gnupg-2.1.11 (or its test suite)
> > itself.
> 
> fwiw, I just re-ran the test suite for .11 here and all passes. 
> 
> What is interesting in your logs is this
> gpg-preset-passphrase: problem with the agent
> gpg-preset-passphrase: caching passphrase failed: Invalid response
> 
> One difference between the systems is that I'm not running it on a hardened
> host though. Do you have access to non-hardened to see if you can replicate
> it there? Or access to any logs or information that might explain why
> gpg-preset-passphrase fails to communicate with gpg-agent over the assuan
> channel?

Seems to be working on hardened system as well. And that test also included gcc 5..
Comment 8 Toralf Förster gentoo-dev 2016-02-01 22:14:31 UTC
Created attachment 424424 [details]
info.txt

confirmed at a hardened chroot image at a hardened host
  -----------------------------------------------------------------

  This is an unstable amd64 chroot image (named amd64-hardened-unstable_20160121-225008) at a hardened host acting as a tinderbox.

  -----------------------------------------------------------------

  make.conf: USE="mmx sse sse2 pax_kernel -cdinstall -oci8 bindist alsa compat -csc -dvd gtk gudev haptic imap javaxml kvm -llvm minizip modplug multimedia ois opengl -openmpi plasma png python qemu qt4 sqlite svg system-jpeg system-libvpx system-sqlite usbredir v4l2 xa xscreensaver xslt"
Comment 9 Toralf Förster gentoo-dev 2016-02-01 22:14:34 UTC
Created attachment 424426 [details]
app-crypt:gnupg-2.1.11:20160201-220950.log
Comment 10 Toralf Förster gentoo-dev 2016-02-01 22:14:37 UTC
Created attachment 424428 [details]
emerge-history.txt
Comment 11 Toralf Förster gentoo-dev 2016-02-01 22:14:39 UTC
Created attachment 424430 [details]
environment
Comment 12 Kristian Fiskerstrand gentoo-dev Security 2016-02-12 21:41:54 UTC
Please try 2.1.11-r1 and see if the issue persists
Comment 13 Kristian Fiskerstrand gentoo-dev Security 2016-02-13 09:45:46 UTC
*** Bug 574612 has been marked as a duplicate of this bug. ***
Comment 14 Kristian Fiskerstrand gentoo-dev Security 2016-02-13 09:50:48 UTC
Ok, at least now we're down to only the gpgtar test failing (c.f bug 574612)
Comment 15 tka 2016-02-13 20:28:33 UTC
All (34) tests pass now on my system.
Comment 16 Kristian Fiskerstrand gentoo-dev Security 2016-02-13 21:42:20 UTC
(In reply to tka from comment #15)
> All (34) tests pass now on my system.

yes, the gpgtar issue only shows spuriously, c.f this report on debian: http://lists.gnupg.org/pipermail/gnupg-devel/2016-January/030744.html

trying to figure out a cause along with upstream and debian maintainers...
Comment 17 Toralf Förster gentoo-dev 2016-02-13 21:57:49 UTC
(In reply to Kristian Fiskerstrand from comment #16)
does https://bugs.gentoo.org/show_bug.cgi?id=574612#c9 help ?
Comment 18 Kristian Fiskerstrand gentoo-dev Security 2016-05-19 21:10:16 UTC
Does the issue still persist with 2.1.12?
Comment 19 Toralf Förster gentoo-dev 2016-05-20 07:54:11 UTC
(In reply to Kristian Fiskerstrand from comment #18)
no, fixed there..
Comment 20 Kristian Fiskerstrand gentoo-dev Security 2016-05-20 08:06:03 UTC
(In reply to Toralf Förster from comment #19)
> (In reply to Kristian Fiskerstrand from comment #18)
> no, fixed there..

Thanks, closing then