Bug 1401716 - trojita: FTBFS in Fedora Rawhide
Summary: trojita: FTBFS in Fedora Rawhide
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kf5-gpgmepp
Version: rawhide
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Daniel Vrátil
QA Contact: Fedora Extras Quality Assurance
URL: http://apps.fedoraproject.org/koschei...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-05 23:10 UTC by Raphael Groner
Modified: 2017-06-08 18:23 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-12-07 21:46:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1230986 0 unspecified CLOSED gnupg2-2.1.20 is available 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1402577 0 unspecified NEW trojita FTBFS on ppc64 and ppc64le 2024-07-04 17:04:15 UTC
Red Hat Bugzilla 1402580 0 unspecified CLOSED trojita FTBFS on aarch64 and armv7hl 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1402582 0 unspecified CLOSED trojita FTBFS on armv7hl because ragel core dumps 2021-02-22 00:41:40 UTC

Internal Links: 1230986 1402577 1402580 1402582

Description Raphael Groner 2016-12-05 23:10:19 UTC
Description of problem:
Package trojita fails to build from source in Fedora Rawhide. This seems to be related to the update of gnupg2:
 	gnupg2 	2.1.13-2.fc26 	> 	2.1.16-1.fc26

[ 22%] Generating crypto_test_data.h
bash /builddir/build/BUILD/trojita-0.7/tests/Cryptography/keygen.sh /builddir/build/BUILD/trojita-0.7
make[2]: Leaving directory '/builddir/build/BUILD/trojita-0.7/x86_64-redhat-linux-gnu'
gpgconf: error running '/usr/libexec/scdaemon': probably not installed
gpgconf: error running '/usr/bin/gpgsm': probably not installed
gpg: Generating key for valid encryptions and signatures
gpg: key BDA68A3F9DF0FE25 marked as ultimately trusted
gpg: Generating key for expired encryptions and signatures
gpg: Generating key that will be deleted after message generation
gpg: Generating a key which will be used for signature verification, where the private key will be removed
gpg: Keys generated
gpg: checking the trustdb
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   4  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 4u
gpg (GnuPG) 2.1.16; Copyright (C) 2016 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
gpg: key "905D445F56DE436323FFD5DBC28BC74A23D52539
2CFCEB7A6BA374C882147E98689ADB75DCF8C28E" not found: Not found
gpg: 905D445F56DE436323FFD5DBC28BC74A23D52539
2CFCEB7A6BA374C882147E98689ADB75DCF8C28E: delete key failed: Not found
make[2]: *** [CMakeFiles/crypto_test_data.dir/build.make:66: crypto_test_data.h] Error 2
make[1]: *** [CMakeFiles/Makefile2:1287: CMakeFiles/crypto_test_data.dir/all] Error 2

Version-Release number of selected component (if applicable):
0.7-3.fc25

Steps to Reproduce:
koji build --scratch f26 trojita-0.7-3.fc25.src.rpm

Additional info:
This package is tracked by Koschei. See:
http://apps.fedoraproject.org/koschei/package/trojita

Comment 1 Raphael Groner 2016-12-05 23:10:57 UTC
Asking gnupg2 maintainer for help.

Comment 2 Raphael Groner 2016-12-05 23:14:49 UTC
> gpgconf: error running '/usr/libexec/scdaemon': probably not installed
> gpgconf: error running '/usr/bin/gpgsm': probably not installed

This is fixed by adding 'BR: gnupg2-smime', see http://pkgs.fedoraproject.org/cgit/rpms/gnupg2.git/commit/?id=7e641a941a4e85678a4e8e73584199df04dc9784

Though, still FTBFS.

Comment 3 Jan Kundrát 2016-12-06 01:09:13 UTC
Upstream patch: https://gerrit.vesnicky.cesnet.cz/r/805

Comment 4 Raphael Groner 2016-12-06 06:27:31 UTC
(In reply to Jan Kundrát from comment #3)
> Upstream patch: https://gerrit.vesnicky.cesnet.cz/r/805

Wow! That was really fast. Thanks a lot.

Comment 5 Raphael Groner 2016-12-06 20:50:20 UTC
I've added the patch from comment #3. Still FTBFS:

FAIL!  : CryptographyPGPTest::testDecryption(valid) Compared values are not the same
   Actual   (qcaSuccessSpy.empty()): 1
   Expected (!successful)          : 0
   Loc: [/builddir/build/BUILD/trojita-0.7/tests/Cryptography/test_Cryptography_PGP.cpp(124)]

http://koji.fedoraproject.org/koji/taskinfo?taskID=16775202

@Jan What version of kf5-gpgmepp do you test with?

@Rex Maybe there's a bug in kf5-gpgmepp 16.08.3 with gnupg2 2.1.16 (instead of 2.1.13)?

Comment 6 Raphael Groner 2016-12-06 20:52:33 UTC
Note: See comments in bug #1227295 how to enable qDebug()

Comment 7 Jan Kundrát 2016-12-07 00:04:53 UTC
> @Jan What version of kf5-gpgmepp do you test with?

My Gentoo laptop has kf5-gpgmepp-16.08.2, gpgme-1.7.1-r1, gnupg-2.1.15.

The last builds in our CI system used kf5-gpgmepp commit 2aca8d3fd70a17f33722900016f4f03dd52d67f2 on a CentOS 7, which means libgpg-error-devel-1.12-3.el7.x86_64, gpgme-1.3.2-5.el7.x86_64, gnupg2-2.0.22-3.el7.x86_64, libgpg-error-1.12-3.el7.x86_64, gpgme-devel-1.3.2-5.el7.x86_64.

Comment 8 Jan Kundrát 2016-12-07 00:17:07 UTC
Updating gnupg to 2.1.16 on my Gentoo laptop leads to the following failure, though:

$ ctest -R test_Cryptography_PGP --output-on-failure
Test project /home/jkt/work/prog/_trojita-build/qt5
    Start 24: test_Cryptography_PGP
1/1 Test #24: test_Cryptography_PGP ............***Failed   21.40 sec
********* Start testing of CryptographyPGPTest *********
Config: Using QtTest library 5.7.1, Qt 5.7.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 4.9.3)
PASS   : CryptographyPGPTest::initTestCase()
FAIL!  : CryptographyPGPTest::testDecryption(valid) Compared values are not the same
   Actual   (qcaSuccessSpy.empty()): 1
   Expected (!successful)          : 0
   Loc: [/home/jkt/work/prog/trojita/tests/Cryptography/test_Cryptography_PGP.cpp(124)]
QDEBUG : CryptographyPGPTest::testDecryption(valid) We have 1 orphaned crypto tasks
PASS   : CryptographyPGPTest::testDecryption(invalid)
FAIL!  : CryptographyPGPTest::testDecryption(expiredKey) Compared values are not the same
   Actual   (qcaSuccessSpy.empty()): 1
   Expected (!successful)          : 0
   Loc: [/home/jkt/work/prog/trojita/tests/Cryptography/test_Cryptography_PGP.cpp(124)]
QDEBUG : CryptographyPGPTest::testDecryption(expiredKey) We have 1 orphaned crypto tasks
PASS   : CryptographyPGPTest::testDecryption(unknownKey)
PASS   : CryptographyPGPTest::testDecryptWithoutEnvelope()
PASS   : CryptographyPGPTest::testVerification(valid-me)
PASS   : CryptographyPGPTest::testVerification(my-signature-different-identity)
PASS   : CryptographyPGPTest::testVerification(my-signature-different-data)
PASS   : CryptographyPGPTest::testVerification(invalid-implicit-content-type)
PASS   : CryptographyPGPTest::testMalformed(signed-missing-protocol-micalg)
PASS   : CryptographyPGPTest::testMalformed(signed-ml-stripped-gpg-signature)
PASS   : CryptographyPGPTest::testOffline(signed)
PASS   : CryptographyPGPTest::testOffline(encrypted)
PASS   : CryptographyPGPTest::cleanupTestCase()
Totals: 13 passed, 2 failed, 0 skipped, 0 blacklisted, 21382ms
********* Finished testing of CryptographyPGPTest *********


0% tests passed, 1 tests failed out of 1

Total Test time (real) =  21.40 sec

The following tests FAILED:
         24 - test_Cryptography_PGP (Failed)
Errors while running CTest

I guess that I should look harder into using gpgmepp from upstream libgpgme 1.7+.

Comment 9 Jan Kundrát 2016-12-07 01:32:04 UTC
I've filed a bug in Trojita bugzilla for this, https://bugs.kde.org/show_bug.cgi?id=373374 . I tried to document my findings in there.

A call to GpgME::Context::decryptAndVerify doesn't appear to return in a timely manner for two test cases/rows, the testDecryption:valid and :expiredKey. I do not understand the root cause; maybe gpg-agent now takes its time to read some entropy?

Does the following help?

diff --git a/tests/Cryptography/test_Cryptography_PGP.cpp b/tests/Cryptography/test_Cryptography_PGP.cpp
index 2d33a4d..19c1ad6 100644
--- a/tests/Cryptography/test_Cryptography_PGP.cpp
+++ b/tests/Cryptography/test_Cryptography_PGP.cpp
@@ -106,10 +106,12 @@ void CryptographyPGPTest::testDecryption()
 
     int i = 0;
     while (data.isValid() && data.data(Imap::Mailbox::RolePartCryptoNotFinishedYet).toBool() && i++ < 1000) {
-        QTest::qWait(10);
+        QTest::qWait(20);
     }
     // allow for event processing, so that the model can retrieve the results
     QCoreApplication::processEvents();
+    // ensure that we're done now
+    QVERIFY(!data.data(Imap::Mailbox::RolePartCryptoNotFinishedYet).toBool());
 
     if (!qcaErrorSpy.isEmpty() && successful) {
         qDebug() << "Unexpected failure in crypto";

Comment 10 Raphael Groner 2016-12-07 21:46:12 UTC
Still FTBFS on ppc64, ppc64le and aarch64 and armv7hl, see bug #1402577 and bug #1402580 and bug #1402582.

I'll close here cause the original issue (gpg) is fixed. Thanks a lot again @Jan.

Comment 11 Jan Kundrát 2017-06-08 08:10:47 UTC
FYI, I no longer see that test failure with Gentoo's app-crypt/gnupg-2.1.20-r1.

Comment 12 Raphael Groner 2017-06-08 18:23:45 UTC
FWIW The gnupg tests are running successfully. This bug is already closed.


Note You need to log in before you can comment on or make changes to this bug.