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
Asking gnupg2 maintainer for help.
> 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.
Upstream patch: https://gerrit.vesnicky.cesnet.cz/r/805
(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.
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)?
Note: See comments in bug #1227295 how to enable qDebug()
> @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.
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+.
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";
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.
FYI, I no longer see that test failure with Gentoo's app-crypt/gnupg-2.1.20-r1.
FWIW The gnupg tests are running successfully. This bug is already closed.