From 5a93d18e96f16acba69d02ad4937e69f4f55f57d Mon Sep 17 00:00:00 2001 From: Jiri Kucera Date: Fri, 3 Mar 2023 15:43:32 +0100 Subject: [PATCH] Fix FTBFS Skip gpgme Qt binding t-remarks test for gnupg 2.4+. Resolves: #2161905 --- ...-qt-skip-test-remarks-for-gnupg2-2.4.patch | 58 +++++++++++++++++++ gpgme.spec | 4 ++ 2 files changed, 62 insertions(+) create mode 100644 1001-qt-skip-test-remarks-for-gnupg2-2.4.patch diff --git a/1001-qt-skip-test-remarks-for-gnupg2-2.4.patch b/1001-qt-skip-test-remarks-for-gnupg2-2.4.patch new file mode 100644 index 0000000..5588205 --- /dev/null +++ b/1001-qt-skip-test-remarks-for-gnupg2-2.4.patch @@ -0,0 +1,58 @@ +diff --git a/lang/qt/tests/t-remarks.cpp b/lang/qt/tests/t-remarks.cpp +index f9a901a..4b2f2ab 100644 +--- a/lang/qt/tests/t-remarks.cpp ++++ b/lang/qt/tests/t-remarks.cpp +@@ -47,6 +47,12 @@ + + #include "t-support.h" + ++#define SKIP_ON_2_4() do { \ ++ if (GpgME::engineInfo(GpgME::GpgEngine).engineVersion() >= "2.4.0") { \ ++ QSKIP("The test does not work well with gnupg 2.4+."); \ ++ } \ ++} while (false) ++ + using namespace QGpgME; + using namespace GpgME; + +@@ -105,6 +111,7 @@ private Q_SLOTS: + + void testRemarkReplaceSingleUIDExportable() + { ++ SKIP_ON_2_4(); + if (!loopbackSupported()) { + return; + } +@@ -187,6 +194,7 @@ private Q_SLOTS: + + void testMultipleRemarks() + { ++ SKIP_ON_2_4(); + if (!loopbackSupported()) { + return; + } +@@ -269,6 +277,7 @@ private Q_SLOTS: + + void testRemarkReplaceSingleUID() + { ++ SKIP_ON_2_4(); + if (!loopbackSupported()) { + return; + } +@@ -350,6 +359,7 @@ private Q_SLOTS: + + void testRemarkReplaceMultiUID() + { ++ SKIP_ON_2_4(); + if (!loopbackSupported()) { + return; + } +@@ -466,6 +476,8 @@ private: + QTemporaryDir mDir; + }; + ++#undef SKIP_ON_2_4 ++ + QTEST_MAIN(TestRemarks) + + #include "t-remarks.moc" diff --git a/gpgme.spec b/gpgme.spec index 3c2c351..583170f 100644 --- a/gpgme.spec +++ b/gpgme.spec @@ -36,6 +36,10 @@ Patch2005: 0005-qt-tests-Make-sure-expiration-time-is-interpreted-as-unsign Patch2006: 0006-qt-tests-Make-test-pass-on-32-bit-systems.patch Patch2007: 0007-cpp-Fix-handling-of-no-key-or-invalid-time-situation.patch +## temporary downstream fixes +# Skip lang/qt/tests/t-remarks on gnupg 2.4+ +Patch3001: 1001-qt-skip-test-remarks-for-gnupg2-2.4.patch + #BuildRequires: autoconf #BuildRequires: automake BuildRequires: make