aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2021-09-18 18:32:55 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2021-09-18 13:28:19 +0200
commitb119d4f2dc4c04189d2eb0ac4b58a0a37828b32a (patch)
tree186cb215123f3ab3777935f80e33fef9a2ce525c
parent7a0b2d2d705632c8e859bc9ef6c8238ebb6e8f0a (diff)
downloadaports-b119d4f2dc4c04189d2eb0ac4b58a0a37828b32a.tar.gz
aports-b119d4f2dc4c04189d2eb0ac4b58a0a37828b32a.tar.bz2
aports-b119d4f2dc4c04189d2eb0ac4b58a0a37828b32a.tar.xz
community/gpgme: fix tests on 32-bit systems
-rw-r--r--community/gpgme/0002-Make-sure-expiration-time-is-interpreted-as-unsigned.patch30
-rw-r--r--community/gpgme/APKBUILD4
2 files changed, 33 insertions, 1 deletions
diff --git a/community/gpgme/0002-Make-sure-expiration-time-is-interpreted-as-unsigned.patch b/community/gpgme/0002-Make-sure-expiration-time-is-interpreted-as-unsigned.patch
new file mode 100644
index 0000000000..558cacda03
--- /dev/null
+++ b/community/gpgme/0002-Make-sure-expiration-time-is-interpreted-as-unsigned.patch
@@ -0,0 +1,30 @@
+From 6a79e90dedc19877ae1c520fed875b57089a5425 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 8 Jul 2021 11:54:06 +0200
+Subject: [PATCH] Make sure expiration time is interpreted as unsigned number
+
+* lang/qt/tests/t-various.cpp (testSignKeyWithExpiration): Convert
+expiration time to uint_least32_t.
+--
+
+This fixes the test on 32-bit systems where time_t (the return type of
+expirationTime()) is a signed 32-bit integer type.
+
+GnuPG-bug-id: 5522
+---
+ lang/qt/tests/t-various.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lang/qt/tests/t-various.cpp b/lang/qt/tests/t-various.cpp
+index 8563b681..72a2487a 100644
+--- a/lang/qt/tests/t-various.cpp
++++ b/lang/qt/tests/t-various.cpp
+@@ -355,7 +355,7 @@ private Q_SLOTS:
+ target.update();
+ const auto keySignature = target.userID(0).signature(target.userID(0).numSignatures() - 1);
+ QVERIFY(!keySignature.neverExpires());
+- const auto expirationDate = QDateTime::fromSecsSinceEpoch(keySignature.expirationTime()).date();
++ const auto expirationDate = QDateTime::fromSecsSinceEpoch(uint_least32_t(keySignature.expirationTime())).date();
+ QCOMPARE(expirationDate, QDate(2106, 2, 6)); // expiration date is capped at 2106-02-06
+ }
+
diff --git a/community/gpgme/APKBUILD b/community/gpgme/APKBUILD
index 5bba81a4b9..bd4778ad8a 100644
--- a/community/gpgme/APKBUILD
+++ b/community/gpgme/APKBUILD
@@ -24,7 +24,8 @@ subpackages="
$pkgname-lisp:lisp:noarch
"
source="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-$pkgver.tar.bz2
- 0001-core-Fix-use-after-free-issue-in-test.patch"
+ 0001-core-Fix-use-after-free-issue-in-test.patch
+ 0002-Make-sure-expiration-time-is-interpreted-as-unsigned.patch"
build() {
./configure \
@@ -77,4 +78,5 @@ qgpgme() {
sha512sums="
69487be69612e9bf0221ff56ae687248bd13635db1b7087130e93c1670e38f3c810bbca17723555c04fe207976c35871bbc3da005179ce099504321cf33636e4 gpgme-1.16.0.tar.bz2
8e455ffa6590ab976ec52e47a8adf28ddc7fe5cfe6a191375bf19ff0ca3b9dd1a5788f2d33ecd4214eaf59cf7668b64f87add305da169775ad59ebd048e93303 0001-core-Fix-use-after-free-issue-in-test.patch
+774e2c28168353c5933293d4ed17ed7c5c88426290ed3500cbf2d3131dd406d2e6944bdc1b3db90c8310c71cd6db67aaae0f3459eadf47484c9cbfaaf1e712de 0002-Make-sure-expiration-time-is-interpreted-as-unsigned.patch
"