Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] gpgme: update to 1.18.0.
@ 2022-08-22  5:58 oreo639
  2022-08-22  6:07 ` [PR PATCH] [Updated] " oreo639
                   ` (36 more replies)
  0 siblings, 37 replies; 38+ messages in thread
From: oreo639 @ 2022-08-22  5:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]

There is a new pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested it with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 7615 bytes --]

From 8d136e45d18e61d4b6b7e935c9cd9706f6c33a67 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 1/9] gpgme: update to 1.18.0.

---
 common/shlibs          | 2 +-
 srcpkgs/gpgme/template | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index e7d39c4313d6..337d788af727 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -724,7 +724,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..b1cfd5f78657 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -14,7 +14,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 49f7ceb8a9fc2a8c338d2ff87261551cbf739b90 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 2/9] libkleo: rebuild for gpgme 1.18

---
 srcpkgs/libkleo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..9dc4d95e7591 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,7 +1,7 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"

From 427755b9e99cd0147c4fb5939c7b22070cc5a0d4 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 3/9] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..4e2e315a3955 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"

From 8579426eaa38a83a20f750670d52c4938f1e8109 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 4/9] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..2324875ed023 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,7 +1,7 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"

From 0c1e55d0bf1dad4d351f6d2ba216c53ca5705ca6 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 5/9] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 87c8706c39bf74304b1158274487883a37b9a76f Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 6/9] kget: rebuild for gpgme 1.18

---
 srcpkgs/kget/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From c42725ba1cb546efb7db8c93267e3f100ed6edc1 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 7/9] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From d9efeb2bde603d1d7a2dc84679fe47c1d38f924d Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 8/9] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From bd0497a02de92c42419481d1635df19a58217f22 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:50:10 -0700
Subject: [PATCH 9/9] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..d53fbeee2291 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
@ 2022-08-22  6:07 ` oreo639
  2022-08-22  6:12 ` oreo639
                   ` (35 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-08-22  6:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 7829 bytes --]

From 869218ff5fb4d165d46190f07791fa3faa4c52b7 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 1/9] gpgme: update to 1.18.0.

---
 common/shlibs          | 2 +-
 srcpkgs/gpgme/template | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index e7d39c4313d6..337d788af727 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -724,7 +724,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..43e9e21fe37f 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,20 +1,21 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
  --with-libassuan-prefix=$XBPS_CROSS_BASE/usr"
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
+checkdepends="which"
 depends="gnupg>=2"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 60e21b4b0079d7c3fa801905c909eebc88d94472 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 2/9] libkleo: rebuild for gpgme 1.18

---
 srcpkgs/libkleo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..9dc4d95e7591 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,7 +1,7 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"

From bda57d7db0a22fe55ccabf674a04dce0a5a0ea42 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 3/9] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..4e2e315a3955 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"

From a011f683a136926eac3f937e75c097f20ddcd2ea Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 4/9] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..2324875ed023 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,7 +1,7 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"

From cd76f7b4db54a57e6867363400415fcbc16aadae Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 5/9] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 055cc29a5e6f4c25b6bb6dd138194f4beade5798 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 6/9] kget: rebuild for gpgme 1.18

---
 srcpkgs/kget/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From 1544e7b75bad04254fc3fdb45f61173d0c84e5e5 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 7/9] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From 26be2db35ec9b915631ccda1d6ca30862a6ad5ab Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 8/9] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From 71a2b2309003abecd7ad1fc91d01da6cea9a2abd Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:50:10 -0700
Subject: [PATCH 9/9] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..d53fbeee2291 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
  2022-08-22  6:07 ` [PR PATCH] [Updated] " oreo639
@ 2022-08-22  6:12 ` oreo639
  2022-08-22  7:22 ` oreo639
                   ` (34 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-08-22  6:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 7833 bytes --]

From 8ca00d6eb5ffbce5adfa13ff5fb0a141ad6cae82 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 1/9] gpgme: update to 1.18.0.

---
 common/shlibs          | 2 +-
 srcpkgs/gpgme/template | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index e7d39c4313d6..337d788af727 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -724,7 +724,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 0a3753242c29b842895caf93b8084a6a5c707f1e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 2/9] libkleo: rebuild for gpgme 1.18

---
 srcpkgs/libkleo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..9dc4d95e7591 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,7 +1,7 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"

From 108bc355bfe40d1eb716b0daa840389977f5c385 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 3/9] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..4e2e315a3955 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"

From 3b7d9751185b53a7f48c334d791089c50fb5aceb Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 4/9] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..2324875ed023 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,7 +1,7 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"

From 2a83cccbc73ed7d5c189adc1a0a3a724706cb1ae Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 5/9] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 836d0334c77b3a0e91b39014669c6856e756fe23 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 6/9] kget: rebuild for gpgme 1.18

---
 srcpkgs/kget/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From ff50413ec33528f88573dbeec0ade9c8d75d9269 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 7/9] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From 799381035d4aa146220d9e18466b84c37271ef49 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 8/9] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From 2d89df746f8272c8f39e323e512506aaaad41b7f Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:50:10 -0700
Subject: [PATCH 9/9] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..d53fbeee2291 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
  2022-08-22  6:07 ` [PR PATCH] [Updated] " oreo639
  2022-08-22  6:12 ` oreo639
@ 2022-08-22  7:22 ` oreo639
  2022-09-08  2:27 ` classabbyamp
                   ` (33 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-08-22  7:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/38825#issuecomment-1221954945

Comment:
The failing libkleo tests fail outside this PR as well, not sure how best to handle it.

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (2 preceding siblings ...)
  2022-08-22  7:22 ` oreo639
@ 2022-09-08  2:27 ` classabbyamp
  2022-09-08  2:28 ` classabbyamp
                   ` (32 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: classabbyamp @ 2022-09-08  2:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/38825#issuecomment-1240142813

Comment:
kinda hacky, but I was able to successfully build with this patch:

```patch
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -25,13 +25,6 @@
     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
 )
 
-ecm_add_test(
-    keyresolvercoretest.cpp
-    keyresolvercoretest.qrc
-    TEST_NAME keyresolvercoretest
-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
-)
-
 ecm_add_tests(
     editdirectoryservicedialogtest.cpp
     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -33,7 +33,6 @@
 ecm_add_tests(
     keyselectioncombotest.cpp
     keyserverconfigtest.cpp
-    newkeyapprovaldialogtest.cpp
     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
 )
 
 ```

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (3 preceding siblings ...)
  2022-09-08  2:27 ` classabbyamp
@ 2022-09-08  2:28 ` classabbyamp
  2022-09-08  2:28 ` classabbyamp
                   ` (31 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: classabbyamp @ 2022-09-08  2:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/38825#issuecomment-1240142813

Comment:
kinda hacky, but I was able to successfully build with this patch:

```patch
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -25,13 +25,6 @@
     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
 )
 
-ecm_add_test(
-    keyresolvercoretest.cpp
-    keyresolvercoretest.qrc
-    TEST_NAME keyresolvercoretest
-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
-)
-
 ecm_add_tests(
     editdirectoryservicedialogtest.cpp
     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -33,7 +33,6 @@
 ecm_add_tests(
     keyselectioncombotest.cpp
     keyserverconfigtest.cpp
-    newkeyapprovaldialogtest.cpp
     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
 )
 ```

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (4 preceding siblings ...)
  2022-09-08  2:28 ` classabbyamp
@ 2022-09-08  2:28 ` classabbyamp
  2022-09-08 21:39 ` [PR PATCH] [Updated] " oreo639
                   ` (30 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: classabbyamp @ 2022-09-08  2:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/38825#issuecomment-1240142813

Comment:
kinda hacky, but I was able to successfully build and check libkleo with this patch:

```patch
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -25,13 +25,6 @@
     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
 )
 
-ecm_add_test(
-    keyresolvercoretest.cpp
-    keyresolvercoretest.qrc
-    TEST_NAME keyresolvercoretest
-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
-)
-
 ecm_add_tests(
     editdirectoryservicedialogtest.cpp
     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -33,7 +33,6 @@
 ecm_add_tests(
     keyselectioncombotest.cpp
     keyserverconfigtest.cpp
-    newkeyapprovaldialogtest.cpp
     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
 )
 ```

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (5 preceding siblings ...)
  2022-09-08  2:28 ` classabbyamp
@ 2022-09-08 21:39 ` oreo639
  2022-09-08 22:36 ` oreo639
                   ` (29 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-08 21:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 9058 bytes --]

From acd373c073c2ede9864352e63218a6b26c8212a3 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 1/9] gpgme: update to 1.18.0.

---
 common/shlibs          | 2 +-
 srcpkgs/gpgme/template | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index bd9890ed7846..6dc6a3e37045 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From fe8a4350d978bd1ca93d82eaef490189046a8318 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 2/9] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  2 +-
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..9dc4d95e7591 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,7 +1,7 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"

From c6b771767d2d2b258fd7fae148a89b51081465f1 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 3/9] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..4e2e315a3955 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"

From cf5560351027406c480bc1acc7ea339c466923ff Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 4/9] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..2324875ed023 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,7 +1,7 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"

From 2eb785496d81dd7af744f7d09d037cca203995c8 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 5/9] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 7b712c832d8f70a10c1165d10e2347026b737a23 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 6/9] kget: rebuild for gpgme 1.18

---
 srcpkgs/kget/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From b4cb63240290bf4851acc94b9c6cd05f1dfb63a2 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 7/9] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From 3c0b5465645ddca439d53f693d9f7a68cb55b914 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 8/9] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From c9d5eb135110942122f82cff52c33272597e6100 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:50:10 -0700
Subject: [PATCH 9/9] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..d53fbeee2291 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (6 preceding siblings ...)
  2022-09-08 21:39 ` [PR PATCH] [Updated] " oreo639
@ 2022-09-08 22:36 ` oreo639
  2022-09-08 22:52 ` oreo639
                   ` (28 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-08 22:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 9470 bytes --]

From acd373c073c2ede9864352e63218a6b26c8212a3 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 1/9] gpgme: update to 1.18.0.

---
 common/shlibs          | 2 +-
 srcpkgs/gpgme/template | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index bd9890ed7846..6dc6a3e37045 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From fe8a4350d978bd1ca93d82eaef490189046a8318 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 2/9] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  2 +-
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..9dc4d95e7591 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,7 +1,7 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"

From 7bb5a72ae7f2e1b13950be4043ca69882d6dce99 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 3/9] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From 0a10b9464e1e008fb3bf75092b0888239b7dcd0b Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 4/9] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..2324875ed023 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,7 +1,7 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"

From d3735d232149ac73372be858e8d61c74bed155a8 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 5/9] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From bbf75a0060ede0e6bb509e380172d8ff246194e0 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 6/9] kget: rebuild for gpgme 1.18

---
 srcpkgs/kget/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From 593bdd83c32c445bb2dc7476fc66cc6c73bd4c3d Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 7/9] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From ecf69df59355cddfd7edbeb03a4df8d3914279a9 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 8/9] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From 12d0ea598865f526dc69da8b5945438b35be0035 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:50:10 -0700
Subject: [PATCH 9/9] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..d53fbeee2291 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (7 preceding siblings ...)
  2022-09-08 22:36 ` oreo639
@ 2022-09-08 22:52 ` oreo639
  2022-09-09  0:56 ` oreo639
                   ` (27 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-08 22:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 13630 bytes --]

From e2b0e0e68d3f827360b05b30fa40da33a39f254f Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 1/9] gpgme: update to 1.18.0.

---
 common/shlibs                               |  2 +-
 srcpkgs/gpgme/patches/fix-tests-32bit.patch | 75 +++++++++++++++++++++
 srcpkgs/gpgme/template                      |  7 +-
 3 files changed, 80 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/gpgme/patches/fix-tests-32bit.patch

diff --git a/common/shlibs b/common/shlibs
index bd9890ed7846..6dc6a3e37045 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/patches/fix-tests-32bit.patch b/srcpkgs/gpgme/patches/fix-tests-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-tests-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 7a6238cf29960f4e15d9574307d209f9c84576b3 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 2/9] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  2 +-
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..9dc4d95e7591 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,7 +1,7 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"

From e35c521421e0fd5e3c6714cc07c79e8ebf872944 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 3/9] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From 0370976d10e9114b34768c1d9c57b9a5c827262f Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 4/9] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..2324875ed023 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,7 +1,7 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"

From 347362983ab18a1b13565385c20aab3dacf9a856 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 5/9] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From e3a634909be9486092681b99d238f22c1ef8d532 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 6/9] kget: rebuild for gpgme 1.18

---
 srcpkgs/kget/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From c46b2bde689ec8ec730ddba1654e636760dfcac9 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 7/9] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From cce820b9dd161410d4ba01a6566620c85608422d Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 8/9] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From b02c3f866156a30ecf8a57200c493fac61b07335 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:50:10 -0700
Subject: [PATCH 9/9] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..d53fbeee2291 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (8 preceding siblings ...)
  2022-09-08 22:52 ` oreo639
@ 2022-09-09  0:56 ` oreo639
  2022-09-09  2:27 ` oreo639
                   ` (26 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-09  0:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 25167 bytes --]

From b5b471a3176e1d954e0c73d8ffda72a475799a30 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 1/9] gpgme: update to 1.18.0.

---
 common/shlibs                                 |   2 +-
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 srcpkgs/gpgme/template                        |   7 +-
 5 files changed, 290 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch

diff --git a/common/shlibs b/common/shlibs
index bd9890ed7846..6dc6a3e37045 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From b8f201c4146a62b2c624bbeb495ab0ee178ef263 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 2/9] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  2 +-
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..9dc4d95e7591 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,7 +1,7 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"

From ef436b0e5b808a2cadd37682d2f92d83180bbc1d Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 3/9] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From b1fe52641e2509ca419daedc5465100f5c8848c2 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 4/9] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..2324875ed023 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,7 +1,7 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"

From 3439331a2e91e58cd89623c36387aa352e444f64 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 5/9] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 09514fe86eb85ad5c3db31e5a88692ccbfa79be0 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 6/9] kget: rebuild for gpgme 1.18

---
 srcpkgs/kget/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From 0d67af5c2312e7f9bbb06849958be6b41b18cb06 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 7/9] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From c6189c7f8855ada9bb3eca546dc1c7c8fd1f0533 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 8/9] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From 115604de98996b4889d9f9356fd38d962a9d5e78 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Thu, 8 Sep 2022 17:55:25 -0700
Subject: [PATCH 9/9] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..d53fbeee2291 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (9 preceding siblings ...)
  2022-09-09  0:56 ` oreo639
@ 2022-09-09  2:27 ` oreo639
  2022-09-09  2:35 ` oreo639
                   ` (25 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-09  2:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 27374 bytes --]

From 56c43be446705c5e70415b59e7237a0adbe2b1c9 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 1/9] gpgme: update to 1.18.0.

---
 common/shlibs                                 |   2 +-
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   7 +-
 6 files changed, 330 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/common/shlibs b/common/shlibs
index bd9890ed7846..6dc6a3e37045 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 4066724d4f7a36344e81849c0febdc4e4bce8dfc Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 2/9] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  2 +-
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..9dc4d95e7591 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,7 +1,7 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"

From ed34c54d2587cfbc940f555a1455d8db1e0d0ca2 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 3/9] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From ac51c09d97b2cf326ceb0f9c4c7570b0cb9d997a Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 4/9] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..2324875ed023 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,7 +1,7 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"

From 5bbd48da2287eeb6b50ae073b98d303fe159662e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 5/9] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From e307f15f2fc392255e52da22aa4f6d0b3a6b6de0 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 6/9] kget: rebuild for gpgme 1.18

---
 srcpkgs/kget/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From 8a5f2cdbe5b83ac68133803d1c82bbf4acb7c995 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 7/9] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From ae2815b2d22c9271ba6e64fa7cc74eb20f69a193 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 8/9] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From 4ba37d2634146ae38233da3a7b6774bf631209cf Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Thu, 8 Sep 2022 17:55:25 -0700
Subject: [PATCH 9/9] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..d53fbeee2291 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (10 preceding siblings ...)
  2022-09-09  2:27 ` oreo639
@ 2022-09-09  2:35 ` oreo639
  2022-09-14 10:56 ` [PR PATCH] [Updated] " oreo639
                   ` (24 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-09  2:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 589 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/38825#issuecomment-1241430973

Comment:
Now the mailcommon tests are failing first with missing dbus. After fixing that I get:
```
org.kde.pim.akonadiserver: Starting up the Akonadi Server...
Cannot mix incompatible Qt library (5.15.4) with this library (5.15.5)
org.kde.pim.akonadicontrol: ProcessControl: Application "/usr/bin/akonadiserver" stopped unexpectedly ( "Process crashed" )
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' crashed! 1 restarts left.
```

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (11 preceding siblings ...)
  2022-09-09  2:35 ` oreo639
@ 2022-09-14 10:56 ` oreo639
  2022-09-14 11:07 ` oreo639
                   ` (23 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-14 10:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 27991 bytes --]

From badba51fcf3b3588b3664cf48c8185f5454a5c2e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 1/9] gpgme: update to 1.18.0.

---
 common/shlibs                                 |   2 +-
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   7 +-
 6 files changed, 330 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/common/shlibs b/common/shlibs
index ec58b8c40619..5fddc7dc8ba6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 41857c532ee7449153a1a75aff52a30536ddff40 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 2/9] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  2 +-
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..9dc4d95e7591 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,7 +1,7 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"

From 37cec84fde9d09c3afe4d71d7038e694d53574b1 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 3/9] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From 0dae593c5a0203ca61c23698aa7dfd448c9dc161 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 4/9] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..f1d63a94dc5a 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -7,12 +7,15 @@ hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"
 makedepends="mailimporter-devel messagelib-devel kdesignerplugin-devel
  pimcommon-devel libkleo-devel qt5-multimedia-devel kcontacts-devel"
+checkdepends="dbus"
 short_desc="KDE PIM library providing support for mail applications"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/mailcommon-${version}.tar.xz"
 checksum=eb3b2b848574f086c6e9642adfbb61fa0e69e6f857f368d0fa0ec6a9ce15396e
+make_check_pre="dbus-run-session"
+make_check=no #Cannot mix incompatible Qt library (5.15.4) with this library (5.15.5)
 
 mailcommon-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} ${makedpends}"

From 3d742d311eda21492c2f94ebe5fd25f0c31349fc Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 5/9] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 13b77dc10d737d6b5efce8def1a3b4b6f3150840 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 6/9] kget: rebuild for gpgme 1.18

---
 srcpkgs/kget/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From 1bc0b76bdc2bb9deadaa9e87e5b46c994ae06c85 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 7/9] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From 56d108e986865a8da0950494e5242f445eb64a68 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 8/9] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From e0a8b7cfed3cc3a17cf917846f5d7d96ee31a239 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Thu, 8 Sep 2022 17:55:25 -0700
Subject: [PATCH 9/9] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..d53fbeee2291 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (12 preceding siblings ...)
  2022-09-14 10:56 ` [PR PATCH] [Updated] " oreo639
@ 2022-09-14 11:07 ` oreo639
  2022-09-14 11:20 ` oreo639
                   ` (22 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-14 11:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 28301 bytes --]

From badba51fcf3b3588b3664cf48c8185f5454a5c2e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 1/9] gpgme: update to 1.18.0.

---
 common/shlibs                                 |   2 +-
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   7 +-
 6 files changed, 330 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/common/shlibs b/common/shlibs
index ec58b8c40619..5fddc7dc8ba6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 08eaf9d98852fb3dae8a53b9c120350def3ae88e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 2/9] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  5 ++--
 2 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..dc17b7bcf1e4 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,11 +1,12 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"
-makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel"
+makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel
+ boost-devel"
 short_desc="KDE PIM cryptographic library"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"

From 083f84478cc8f94549918e46bdd0a597558383f6 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 3/9] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From 2c92f8aa8d7ebaeab476283f97ba1f312f5b9ac7 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 4/9] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..f1d63a94dc5a 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -7,12 +7,15 @@ hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"
 makedepends="mailimporter-devel messagelib-devel kdesignerplugin-devel
  pimcommon-devel libkleo-devel qt5-multimedia-devel kcontacts-devel"
+checkdepends="dbus"
 short_desc="KDE PIM library providing support for mail applications"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/mailcommon-${version}.tar.xz"
 checksum=eb3b2b848574f086c6e9642adfbb61fa0e69e6f857f368d0fa0ec6a9ce15396e
+make_check_pre="dbus-run-session"
+make_check=no #Cannot mix incompatible Qt library (5.15.4) with this library (5.15.5)
 
 mailcommon-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} ${makedpends}"

From c84c26a3723a38855b112070b1b471f0c7251e00 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 5/9] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 6f7d65fe023b6d51564663a43b1d0d30691a0137 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 6/9] kget: rebuild for gpgme 1.18

---
 srcpkgs/kget/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From 3ebfe5e1a0bc28f76b536a92fd97842b9824afb2 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 7/9] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From 6d0ffb2a14fffa5f2758a4dcb8b2b6fa327fbe33 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 8/9] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From 2a67f9a4d16f9825d0f6fe2b76cc05e3c8c1edd9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Thu, 8 Sep 2022 17:55:25 -0700
Subject: [PATCH 9/9] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..d53fbeee2291 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (13 preceding siblings ...)
  2022-09-14 11:07 ` oreo639
@ 2022-09-14 11:20 ` oreo639
  2022-09-14 11:45 ` oreo639
                   ` (21 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-14 11:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 28433 bytes --]

From badba51fcf3b3588b3664cf48c8185f5454a5c2e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 1/9] gpgme: update to 1.18.0.

---
 common/shlibs                                 |   2 +-
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   7 +-
 6 files changed, 330 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/common/shlibs b/common/shlibs
index ec58b8c40619..5fddc7dc8ba6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 08eaf9d98852fb3dae8a53b9c120350def3ae88e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 2/9] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  5 ++--
 2 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..dc17b7bcf1e4 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,11 +1,12 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"
-makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel"
+makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel
+ boost-devel"
 short_desc="KDE PIM cryptographic library"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"

From 083f84478cc8f94549918e46bdd0a597558383f6 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 3/9] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From d80524500fa907b50e3991431dc503dc1767964c Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 4/9] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..18456c5c625d 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,18 +1,21 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"
 makedepends="mailimporter-devel messagelib-devel kdesignerplugin-devel
  pimcommon-devel libkleo-devel qt5-multimedia-devel kcontacts-devel"
+checkdepends="dbus"
 short_desc="KDE PIM library providing support for mail applications"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/mailcommon-${version}.tar.xz"
 checksum=eb3b2b848574f086c6e9642adfbb61fa0e69e6f857f368d0fa0ec6a9ce15396e
+make_check_pre="dbus-run-session"
+make_check=no #Cannot mix incompatible Qt library (5.15.4) with this library (5.15.5)
 
 mailcommon-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} ${makedpends}"

From d95e5301e02217cbfe504444eb62394b27a9e4c9 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 5/9] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 9472dc6b990aac616021e3532832e628edcbc74d Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 6/9] kget: rebuild for gpgme 1.18

---
 srcpkgs/kget/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From fabc9480adf089875cdd97eec01f4c5c07410f93 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 7/9] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From f06849e124d5abc930e5217beb14a5b0de0f7924 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 8/9] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From 77b368d9520ff4481c9dd1dba7baab6461f5d543 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Thu, 8 Sep 2022 17:55:25 -0700
Subject: [PATCH 9/9] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..d53fbeee2291 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (14 preceding siblings ...)
  2022-09-14 11:20 ` oreo639
@ 2022-09-14 11:45 ` oreo639
  2022-09-14 12:11 ` oreo639
                   ` (20 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-14 11:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 29734 bytes --]

From badba51fcf3b3588b3664cf48c8185f5454a5c2e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 01/10] gpgme: update to 1.18.0.

---
 common/shlibs                                 |   2 +-
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   7 +-
 6 files changed, 330 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/common/shlibs b/common/shlibs
index ec58b8c40619..5fddc7dc8ba6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 08eaf9d98852fb3dae8a53b9c120350def3ae88e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 02/10] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  5 ++--
 2 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..dc17b7bcf1e4 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,11 +1,12 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"
-makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel"
+makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel
+ boost-devel"
 short_desc="KDE PIM cryptographic library"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"

From 083f84478cc8f94549918e46bdd0a597558383f6 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 03/10] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From d80524500fa907b50e3991431dc503dc1767964c Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 04/10] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..18456c5c625d 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,18 +1,21 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"
 makedepends="mailimporter-devel messagelib-devel kdesignerplugin-devel
  pimcommon-devel libkleo-devel qt5-multimedia-devel kcontacts-devel"
+checkdepends="dbus"
 short_desc="KDE PIM library providing support for mail applications"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/mailcommon-${version}.tar.xz"
 checksum=eb3b2b848574f086c6e9642adfbb61fa0e69e6f857f368d0fa0ec6a9ce15396e
+make_check_pre="dbus-run-session"
+make_check=no #Cannot mix incompatible Qt library (5.15.4) with this library (5.15.5)
 
 mailcommon-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} ${makedpends}"

From d95e5301e02217cbfe504444eb62394b27a9e4c9 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 05/10] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 9472dc6b990aac616021e3532832e628edcbc74d Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 06/10] kget: rebuild for gpgme 1.18

---
 srcpkgs/kget/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From fabc9480adf089875cdd97eec01f4c5c07410f93 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 07/10] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From f06849e124d5abc930e5217beb14a5b0de0f7924 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 08/10] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From 77b368d9520ff4481c9dd1dba7baab6461f5d543 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Thu, 8 Sep 2022 17:55:25 -0700
Subject: [PATCH 09/10] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..d53fbeee2291 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"

From 7e17e983eaa061e88c043ed6f9ea570c9bef4c7c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Wed, 14 Sep 2022 04:39:25 -0700
Subject: [PATCH 10/10] libktorrent: fix build failure due to missing boost

---
 srcpkgs/libktorrent/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/libktorrent/template b/srcpkgs/libktorrent/template
index 787e5a7c40ee..2b2b5cc321f6 100644
--- a/srcpkgs/libktorrent/template
+++ b/srcpkgs/libktorrent/template
@@ -1,11 +1,11 @@
 # Template file for 'libktorrent'
 pkgname=libktorrent
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules gettext qt5-host-tools qt5-qmake python3 doxygen"
 makedepends="qt5-devel karchive-devel ksolid-devel kio-devel ki18n-devel
-	kcrash-devel gmp-devel qca-qt5-devel"
+ kcrash-devel gmp-devel qca-qt5-devel boost-devel"
 short_desc="BitTorrent protocol implementation"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
@@ -18,7 +18,7 @@ if [ "$CROSS_BUILD" ]; then
 fi
 
 libktorrent-devel_package() {
-	depends="${sourcepkg}-${version}_${revision} gmp-devel"
+	depends="${sourcepkg}-${version}_${revision} gmp-devel boost-devel"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (15 preceding siblings ...)
  2022-09-14 11:45 ` oreo639
@ 2022-09-14 12:11 ` oreo639
  2022-09-14 12:27 ` oreo639
                   ` (19 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-14 12:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 33629 bytes --]

From badba51fcf3b3588b3664cf48c8185f5454a5c2e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 01/10] gpgme: update to 1.18.0.

---
 common/shlibs                                 |   2 +-
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   7 +-
 6 files changed, 330 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/common/shlibs b/common/shlibs
index ec58b8c40619..5fddc7dc8ba6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 08eaf9d98852fb3dae8a53b9c120350def3ae88e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 02/10] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  5 ++--
 2 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..dc17b7bcf1e4 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,11 +1,12 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"
-makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel"
+makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel
+ boost-devel"
 short_desc="KDE PIM cryptographic library"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"

From 083f84478cc8f94549918e46bdd0a597558383f6 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 03/10] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From d80524500fa907b50e3991431dc503dc1767964c Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 04/10] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..18456c5c625d 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,18 +1,21 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"
 makedepends="mailimporter-devel messagelib-devel kdesignerplugin-devel
  pimcommon-devel libkleo-devel qt5-multimedia-devel kcontacts-devel"
+checkdepends="dbus"
 short_desc="KDE PIM library providing support for mail applications"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/mailcommon-${version}.tar.xz"
 checksum=eb3b2b848574f086c6e9642adfbb61fa0e69e6f857f368d0fa0ec6a9ce15396e
+make_check_pre="dbus-run-session"
+make_check=no #Cannot mix incompatible Qt library (5.15.4) with this library (5.15.5)
 
 mailcommon-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} ${makedpends}"

From d95e5301e02217cbfe504444eb62394b27a9e4c9 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 05/10] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 412f64be0a26377054267fcc65ccf4aab8b67bdf Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 06/10] kget: rebuild for gpgme 1.18

---
 .../kget/patches/disable-failing-tests.patch  | 71 +++++++++++++++++++
 srcpkgs/kget/template                         |  2 +-
 2 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kget/patches/disable-failing-tests.patch

diff --git a/srcpkgs/kget/patches/disable-failing-tests.patch b/srcpkgs/kget/patches/disable-failing-tests.patch
new file mode 100644
index 000000000000..b17a17cdbb75
--- /dev/null
+++ b/srcpkgs/kget/patches/disable-failing-tests.patch
@@ -0,0 +1,71 @@
+diff -rup kget-22.04.1.orig/tests/schedulertest.cpp kget-22.04.1/tests/schedulertest.cpp
+--- a/tests/schedulertest.cpp
++++ b/tests/schedulertest.cpp
+@@ -211,50 +211,6 @@ void SchedulerTest::testStopScheduler_da
+     QTest::newRow("no limit, one running, three stopped") << NO_LIMIT << (QList<Job::Status>() << Job::Running << Job::Stopped << Job::Stopped << Job::Stopped);
+ }
+ 
+-void SchedulerTest::testSchedulerStopStart()
+-{
+-    QFETCH(int, limit);
+-    QFETCH(QList<Job::Status>, status);
+-    QFETCH(QList<Job::Status>, finalStatus);
+-
+-    SettingsHelper helper(limit);
+-
+-    Scheduler scheduler;
+-    auto *queue = new TestQueue(&scheduler);
+-    scheduler.addQueue(queue);
+-
+-    //uses an own list instead of the iterators to make sure that the order stays the same
+-    QList<TestJob*> jobs;
+-    for (int i = 0; i < status.size(); ++i) {
+-        auto *job = new TestJob(&scheduler, queue);
+-        job->setStatus(status[i]);
+-        queue->appendPub(job);
+-        jobs << job;
+-    }
+-
+-    scheduler.stop();
+-    scheduler.start();
+-
+-    for (int i = 0; i < status.size(); ++i) {
+-        QCOMPARE(jobs[i]->status(), finalStatus[i]);
+-    }
+-}
+-
+-void SchedulerTest::testSchedulerStopStart_data()
+-{
+-    QTest::addColumn<int>("limit");
+-    QTest::addColumn<QList<Job::Status> >("status");
+-    QTest::addColumn<QList<Job::Status> >("finalStatus");
+-
+-    QTest::newRow("limit 2, two finished, will third be started?") << 2 << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Stopped) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-    QTest::newRow("limit 2, will first two start while last will stay stopped?") << 2 << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Stopped) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Stopped);
+-    QTest::newRow("limit 2, will first two start while last will be stopped?") << 2 << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Running) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Stopped);
+-    QTest::newRow("no limit, two finished, will third be started?") << NO_LIMIT << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Stopped) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-    QTest::newRow("no limit, will all three be started?") << NO_LIMIT << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Stopped) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Running);
+-    QTest::newRow("limit 2, two finished, will third stay running?") << 2 << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-}
+-
+-
+ void SchedulerTest::testSuspendScheduler()
+ {
+     QFETCH(int, limit);
+diff -rup kget-22.04.1.orig/tests/schedulertest.h kget-22.04.1/tests/schedulertest.h
+--- a/tests/schedulertest.h
++++ b/tests/schedulertest.h
+@@ -99,13 +99,6 @@ class SchedulerTest : public QObject
+         void testStopScheduler();
+         void testStopScheduler_data();
+ 
+-        /**
+-         * Stops the scheduler and then starts it again to see if jobs
+-         * are correctly started
+-         */
+-        void testSchedulerStopStart();
+-        void testSchedulerStopStart_data();
+-
+         void testSuspendScheduler();
+         void testSuspendScheduler_data();
+
diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From 306b34cbbeb91ae106c4102d30efad3524c63585 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 07/10] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From 88c5f944909793cc84d779a3d3c93aae09c06bea Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 08/10] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From b7ae42c88c596cb5131942d62694ea2ce1bc9943 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Thu, 8 Sep 2022 17:55:25 -0700
Subject: [PATCH 09/10] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..d53fbeee2291 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"

From 623087f89e8b4eda4f83ef1e68e045a565a99c07 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Wed, 14 Sep 2022 04:39:25 -0700
Subject: [PATCH 10/10] libktorrent: fix build failure due to missing boost

---
 srcpkgs/libktorrent/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/libktorrent/template b/srcpkgs/libktorrent/template
index 787e5a7c40ee..2b2b5cc321f6 100644
--- a/srcpkgs/libktorrent/template
+++ b/srcpkgs/libktorrent/template
@@ -1,11 +1,11 @@
 # Template file for 'libktorrent'
 pkgname=libktorrent
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules gettext qt5-host-tools qt5-qmake python3 doxygen"
 makedepends="qt5-devel karchive-devel ksolid-devel kio-devel ki18n-devel
-	kcrash-devel gmp-devel qca-qt5-devel"
+ kcrash-devel gmp-devel qca-qt5-devel boost-devel"
 short_desc="BitTorrent protocol implementation"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
@@ -18,7 +18,7 @@ if [ "$CROSS_BUILD" ]; then
 fi
 
 libktorrent-devel_package() {
-	depends="${sourcepkg}-${version}_${revision} gmp-devel"
+	depends="${sourcepkg}-${version}_${revision} gmp-devel boost-devel"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (16 preceding siblings ...)
  2022-09-14 12:11 ` oreo639
@ 2022-09-14 12:27 ` oreo639
  2022-09-14 19:43 ` oreo639
                   ` (18 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-14 12:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 34467 bytes --]

From badba51fcf3b3588b3664cf48c8185f5454a5c2e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 01/10] gpgme: update to 1.18.0.

---
 common/shlibs                                 |   2 +-
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   7 +-
 6 files changed, 330 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/common/shlibs b/common/shlibs
index ec58b8c40619..5fddc7dc8ba6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 08eaf9d98852fb3dae8a53b9c120350def3ae88e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 02/10] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  5 ++--
 2 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..dc17b7bcf1e4 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,11 +1,12 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"
-makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel"
+makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel
+ boost-devel"
 short_desc="KDE PIM cryptographic library"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"

From 083f84478cc8f94549918e46bdd0a597558383f6 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 03/10] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From c0c01e71c9d72f32ca85900e7838a1e15f436a69 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 04/10] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..f55bf7570772 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,18 +1,21 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"
 makedepends="mailimporter-devel messagelib-devel kdesignerplugin-devel
  pimcommon-devel libkleo-devel qt5-multimedia-devel kcontacts-devel"
+checkdepends="dbus"
 short_desc="KDE PIM library providing support for mail applications"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/mailcommon-${version}.tar.xz"
 checksum=eb3b2b848574f086c6e9642adfbb61fa0e69e6f857f368d0fa0ec6a9ce15396e
+make_check_pre="dbus-run-session"
+make_check=no # Akonadi: Cannot mix incompatible Qt library (5.15.4) with this library (5.15.5) ( "Process crashed" )
 
 mailcommon-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} ${makedpends}"

From d95bcc99a3fde26955f9bcc8b1c418da2640464a Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 05/10] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 6f8498cb844e9a7526c51b42acff7a539fb189c9 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 06/10] kget: rebuild for gpgme 1.18

---
 .../kget/patches/disable-failing-tests.patch  | 71 +++++++++++++++++++
 srcpkgs/kget/template                         |  2 +-
 2 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kget/patches/disable-failing-tests.patch

diff --git a/srcpkgs/kget/patches/disable-failing-tests.patch b/srcpkgs/kget/patches/disable-failing-tests.patch
new file mode 100644
index 000000000000..b17a17cdbb75
--- /dev/null
+++ b/srcpkgs/kget/patches/disable-failing-tests.patch
@@ -0,0 +1,71 @@
+diff -rup kget-22.04.1.orig/tests/schedulertest.cpp kget-22.04.1/tests/schedulertest.cpp
+--- a/tests/schedulertest.cpp
++++ b/tests/schedulertest.cpp
+@@ -211,50 +211,6 @@ void SchedulerTest::testStopScheduler_da
+     QTest::newRow("no limit, one running, three stopped") << NO_LIMIT << (QList<Job::Status>() << Job::Running << Job::Stopped << Job::Stopped << Job::Stopped);
+ }
+ 
+-void SchedulerTest::testSchedulerStopStart()
+-{
+-    QFETCH(int, limit);
+-    QFETCH(QList<Job::Status>, status);
+-    QFETCH(QList<Job::Status>, finalStatus);
+-
+-    SettingsHelper helper(limit);
+-
+-    Scheduler scheduler;
+-    auto *queue = new TestQueue(&scheduler);
+-    scheduler.addQueue(queue);
+-
+-    //uses an own list instead of the iterators to make sure that the order stays the same
+-    QList<TestJob*> jobs;
+-    for (int i = 0; i < status.size(); ++i) {
+-        auto *job = new TestJob(&scheduler, queue);
+-        job->setStatus(status[i]);
+-        queue->appendPub(job);
+-        jobs << job;
+-    }
+-
+-    scheduler.stop();
+-    scheduler.start();
+-
+-    for (int i = 0; i < status.size(); ++i) {
+-        QCOMPARE(jobs[i]->status(), finalStatus[i]);
+-    }
+-}
+-
+-void SchedulerTest::testSchedulerStopStart_data()
+-{
+-    QTest::addColumn<int>("limit");
+-    QTest::addColumn<QList<Job::Status> >("status");
+-    QTest::addColumn<QList<Job::Status> >("finalStatus");
+-
+-    QTest::newRow("limit 2, two finished, will third be started?") << 2 << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Stopped) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-    QTest::newRow("limit 2, will first two start while last will stay stopped?") << 2 << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Stopped) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Stopped);
+-    QTest::newRow("limit 2, will first two start while last will be stopped?") << 2 << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Running) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Stopped);
+-    QTest::newRow("no limit, two finished, will third be started?") << NO_LIMIT << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Stopped) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-    QTest::newRow("no limit, will all three be started?") << NO_LIMIT << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Stopped) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Running);
+-    QTest::newRow("limit 2, two finished, will third stay running?") << 2 << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-}
+-
+-
+ void SchedulerTest::testSuspendScheduler()
+ {
+     QFETCH(int, limit);
+diff -rup kget-22.04.1.orig/tests/schedulertest.h kget-22.04.1/tests/schedulertest.h
+--- a/tests/schedulertest.h
++++ b/tests/schedulertest.h
+@@ -99,13 +99,6 @@ class SchedulerTest : public QObject
+         void testStopScheduler();
+         void testStopScheduler_data();
+ 
+-        /**
+-         * Stops the scheduler and then starts it again to see if jobs
+-         * are correctly started
+-         */
+-        void testSchedulerStopStart();
+-        void testSchedulerStopStart_data();
+-
+         void testSuspendScheduler();
+         void testSuspendScheduler_data();
+
diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From fe60cb2159452194c83248a030734a9ede19db60 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 07/10] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From b0f3ce56810041d320dd5cd41115457076cf8290 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 08/10] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From f2adb8542e363eb4865764cc3524d5dd65191092 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Thu, 8 Sep 2022 17:55:25 -0700
Subject: [PATCH 09/10] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..ee41bc9ab23b 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"
@@ -10,9 +10,12 @@ makedepends="kcalutils-devel knotifyconfig-devel kontactinterface-devel
  messagelib-devel qt5-location-devel qt5-webchannel-devel qt5-webengine-devel"
 depends="kdepim-runtime kmail-account-wizard mariadb akonadi-import-wizard
  pim-data-exporter"
+checkdepends="dbus"
 short_desc="KDE Mail Client"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later, GFDL-1.2-or-later"
 homepage="https://kde.org/applications/en/internet/org.kde.kmail2"
 distfiles="${KDE_SITE}/release-service/${version}/src/kmail-${version}.tar.xz"
 checksum=b88101f47259a5ebfc4ec8e5d0efa19cdff33c67034e9c7082c22c0a11474d74
+make_check_pre="dbus-run-session"
+make_check=no # Akonadi: Cannot mix incompatible Qt library (5.15.4) with this library (5.15.5) ( "Process crashed" )

From 653ed6b817494eb46e5beefccb2eb96312356238 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Wed, 14 Sep 2022 04:39:25 -0700
Subject: [PATCH 10/10] libktorrent: fix build failure due to missing boost

---
 srcpkgs/libktorrent/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/libktorrent/template b/srcpkgs/libktorrent/template
index 787e5a7c40ee..2b2b5cc321f6 100644
--- a/srcpkgs/libktorrent/template
+++ b/srcpkgs/libktorrent/template
@@ -1,11 +1,11 @@
 # Template file for 'libktorrent'
 pkgname=libktorrent
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules gettext qt5-host-tools qt5-qmake python3 doxygen"
 makedepends="qt5-devel karchive-devel ksolid-devel kio-devel ki18n-devel
-	kcrash-devel gmp-devel qca-qt5-devel"
+ kcrash-devel gmp-devel qca-qt5-devel boost-devel"
 short_desc="BitTorrent protocol implementation"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
@@ -18,7 +18,7 @@ if [ "$CROSS_BUILD" ]; then
 fi
 
 libktorrent-devel_package() {
-	depends="${sourcepkg}-${version}_${revision} gmp-devel"
+	depends="${sourcepkg}-${version}_${revision} gmp-devel boost-devel"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (17 preceding siblings ...)
  2022-09-14 12:27 ` oreo639
@ 2022-09-14 19:43 ` oreo639
  2022-09-14 20:43 ` oreo639
                   ` (17 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-14 19:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 34347 bytes --]

From badba51fcf3b3588b3664cf48c8185f5454a5c2e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 01/10] gpgme: update to 1.18.0.

---
 common/shlibs                                 |   2 +-
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   7 +-
 6 files changed, 330 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/common/shlibs b/common/shlibs
index ec58b8c40619..5fddc7dc8ba6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 08eaf9d98852fb3dae8a53b9c120350def3ae88e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 02/10] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  5 ++--
 2 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..dc17b7bcf1e4 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,11 +1,12 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"
-makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel"
+makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel
+ boost-devel"
 short_desc="KDE PIM cryptographic library"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"

From 083f84478cc8f94549918e46bdd0a597558383f6 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 03/10] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From c0c01e71c9d72f32ca85900e7838a1e15f436a69 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 04/10] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..f55bf7570772 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,18 +1,21 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"
 makedepends="mailimporter-devel messagelib-devel kdesignerplugin-devel
  pimcommon-devel libkleo-devel qt5-multimedia-devel kcontacts-devel"
+checkdepends="dbus"
 short_desc="KDE PIM library providing support for mail applications"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/mailcommon-${version}.tar.xz"
 checksum=eb3b2b848574f086c6e9642adfbb61fa0e69e6f857f368d0fa0ec6a9ce15396e
+make_check_pre="dbus-run-session"
+make_check=no # Akonadi: Cannot mix incompatible Qt library (5.15.4) with this library (5.15.5) ( "Process crashed" )
 
 mailcommon-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} ${makedpends}"

From d95bcc99a3fde26955f9bcc8b1c418da2640464a Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 05/10] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 6f8498cb844e9a7526c51b42acff7a539fb189c9 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 06/10] kget: rebuild for gpgme 1.18

---
 .../kget/patches/disable-failing-tests.patch  | 71 +++++++++++++++++++
 srcpkgs/kget/template                         |  2 +-
 2 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kget/patches/disable-failing-tests.patch

diff --git a/srcpkgs/kget/patches/disable-failing-tests.patch b/srcpkgs/kget/patches/disable-failing-tests.patch
new file mode 100644
index 000000000000..b17a17cdbb75
--- /dev/null
+++ b/srcpkgs/kget/patches/disable-failing-tests.patch
@@ -0,0 +1,71 @@
+diff -rup kget-22.04.1.orig/tests/schedulertest.cpp kget-22.04.1/tests/schedulertest.cpp
+--- a/tests/schedulertest.cpp
++++ b/tests/schedulertest.cpp
+@@ -211,50 +211,6 @@ void SchedulerTest::testStopScheduler_da
+     QTest::newRow("no limit, one running, three stopped") << NO_LIMIT << (QList<Job::Status>() << Job::Running << Job::Stopped << Job::Stopped << Job::Stopped);
+ }
+ 
+-void SchedulerTest::testSchedulerStopStart()
+-{
+-    QFETCH(int, limit);
+-    QFETCH(QList<Job::Status>, status);
+-    QFETCH(QList<Job::Status>, finalStatus);
+-
+-    SettingsHelper helper(limit);
+-
+-    Scheduler scheduler;
+-    auto *queue = new TestQueue(&scheduler);
+-    scheduler.addQueue(queue);
+-
+-    //uses an own list instead of the iterators to make sure that the order stays the same
+-    QList<TestJob*> jobs;
+-    for (int i = 0; i < status.size(); ++i) {
+-        auto *job = new TestJob(&scheduler, queue);
+-        job->setStatus(status[i]);
+-        queue->appendPub(job);
+-        jobs << job;
+-    }
+-
+-    scheduler.stop();
+-    scheduler.start();
+-
+-    for (int i = 0; i < status.size(); ++i) {
+-        QCOMPARE(jobs[i]->status(), finalStatus[i]);
+-    }
+-}
+-
+-void SchedulerTest::testSchedulerStopStart_data()
+-{
+-    QTest::addColumn<int>("limit");
+-    QTest::addColumn<QList<Job::Status> >("status");
+-    QTest::addColumn<QList<Job::Status> >("finalStatus");
+-
+-    QTest::newRow("limit 2, two finished, will third be started?") << 2 << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Stopped) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-    QTest::newRow("limit 2, will first two start while last will stay stopped?") << 2 << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Stopped) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Stopped);
+-    QTest::newRow("limit 2, will first two start while last will be stopped?") << 2 << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Running) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Stopped);
+-    QTest::newRow("no limit, two finished, will third be started?") << NO_LIMIT << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Stopped) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-    QTest::newRow("no limit, will all three be started?") << NO_LIMIT << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Stopped) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Running);
+-    QTest::newRow("limit 2, two finished, will third stay running?") << 2 << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-}
+-
+-
+ void SchedulerTest::testSuspendScheduler()
+ {
+     QFETCH(int, limit);
+diff -rup kget-22.04.1.orig/tests/schedulertest.h kget-22.04.1/tests/schedulertest.h
+--- a/tests/schedulertest.h
++++ b/tests/schedulertest.h
+@@ -99,13 +99,6 @@ class SchedulerTest : public QObject
+         void testStopScheduler();
+         void testStopScheduler_data();
+ 
+-        /**
+-         * Stops the scheduler and then starts it again to see if jobs
+-         * are correctly started
+-         */
+-        void testSchedulerStopStart();
+-        void testSchedulerStopStart_data();
+-
+         void testSuspendScheduler();
+         void testSuspendScheduler_data();
+
diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From fe60cb2159452194c83248a030734a9ede19db60 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 07/10] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From b0f3ce56810041d320dd5cd41115457076cf8290 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 08/10] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From b6230bb964a87681e9f78e635edabd15bbe83403 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Thu, 8 Sep 2022 17:55:25 -0700
Subject: [PATCH 09/10] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..3dc67f0d773d 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"
@@ -10,9 +10,11 @@ makedepends="kcalutils-devel knotifyconfig-devel kontactinterface-devel
  messagelib-devel qt5-location-devel qt5-webchannel-devel qt5-webengine-devel"
 depends="kdepim-runtime kmail-account-wizard mariadb akonadi-import-wizard
  pim-data-exporter"
+checkdepends="dbus"
 short_desc="KDE Mail Client"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later, GFDL-1.2-or-later"
 homepage="https://kde.org/applications/en/internet/org.kde.kmail2"
 distfiles="${KDE_SITE}/release-service/${version}/src/kmail-${version}.tar.xz"
 checksum=b88101f47259a5ebfc4ec8e5d0efa19cdff33c67034e9c7082c22c0a11474d74
+make_check_pre="dbus-run-session"

From da42b1f94628f5fe07306d7b3f4024a2dcc15db4 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Wed, 14 Sep 2022 04:39:25 -0700
Subject: [PATCH 10/10] libktorrent: fix build failure due to missing boost

---
 srcpkgs/libktorrent/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/libktorrent/template b/srcpkgs/libktorrent/template
index 787e5a7c40ee..2b2b5cc321f6 100644
--- a/srcpkgs/libktorrent/template
+++ b/srcpkgs/libktorrent/template
@@ -1,11 +1,11 @@
 # Template file for 'libktorrent'
 pkgname=libktorrent
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules gettext qt5-host-tools qt5-qmake python3 doxygen"
 makedepends="qt5-devel karchive-devel ksolid-devel kio-devel ki18n-devel
-	kcrash-devel gmp-devel qca-qt5-devel"
+ kcrash-devel gmp-devel qca-qt5-devel boost-devel"
 short_desc="BitTorrent protocol implementation"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
@@ -18,7 +18,7 @@ if [ "$CROSS_BUILD" ]; then
 fi
 
 libktorrent-devel_package() {
-	depends="${sourcepkg}-${version}_${revision} gmp-devel"
+	depends="${sourcepkg}-${version}_${revision} gmp-devel boost-devel"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (18 preceding siblings ...)
  2022-09-14 19:43 ` oreo639
@ 2022-09-14 20:43 ` oreo639
  2022-09-14 20:49 ` oreo639
                   ` (16 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-14 20:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 34555 bytes --]

From badba51fcf3b3588b3664cf48c8185f5454a5c2e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 01/10] gpgme: update to 1.18.0.

---
 common/shlibs                                 |   2 +-
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   7 +-
 6 files changed, 330 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/common/shlibs b/common/shlibs
index ec58b8c40619..5fddc7dc8ba6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 08eaf9d98852fb3dae8a53b9c120350def3ae88e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 02/10] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  5 ++--
 2 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..dc17b7bcf1e4 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,11 +1,12 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"
-makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel"
+makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel
+ boost-devel"
 short_desc="KDE PIM cryptographic library"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"

From 083f84478cc8f94549918e46bdd0a597558383f6 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 03/10] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From c0c01e71c9d72f32ca85900e7838a1e15f436a69 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 04/10] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..f55bf7570772 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,18 +1,21 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"
 makedepends="mailimporter-devel messagelib-devel kdesignerplugin-devel
  pimcommon-devel libkleo-devel qt5-multimedia-devel kcontacts-devel"
+checkdepends="dbus"
 short_desc="KDE PIM library providing support for mail applications"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/mailcommon-${version}.tar.xz"
 checksum=eb3b2b848574f086c6e9642adfbb61fa0e69e6f857f368d0fa0ec6a9ce15396e
+make_check_pre="dbus-run-session"
+make_check=no # Akonadi: Cannot mix incompatible Qt library (5.15.4) with this library (5.15.5) ( "Process crashed" )
 
 mailcommon-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} ${makedpends}"

From d95bcc99a3fde26955f9bcc8b1c418da2640464a Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 05/10] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 6f8498cb844e9a7526c51b42acff7a539fb189c9 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 06/10] kget: rebuild for gpgme 1.18

---
 .../kget/patches/disable-failing-tests.patch  | 71 +++++++++++++++++++
 srcpkgs/kget/template                         |  2 +-
 2 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kget/patches/disable-failing-tests.patch

diff --git a/srcpkgs/kget/patches/disable-failing-tests.patch b/srcpkgs/kget/patches/disable-failing-tests.patch
new file mode 100644
index 000000000000..b17a17cdbb75
--- /dev/null
+++ b/srcpkgs/kget/patches/disable-failing-tests.patch
@@ -0,0 +1,71 @@
+diff -rup kget-22.04.1.orig/tests/schedulertest.cpp kget-22.04.1/tests/schedulertest.cpp
+--- a/tests/schedulertest.cpp
++++ b/tests/schedulertest.cpp
+@@ -211,50 +211,6 @@ void SchedulerTest::testStopScheduler_da
+     QTest::newRow("no limit, one running, three stopped") << NO_LIMIT << (QList<Job::Status>() << Job::Running << Job::Stopped << Job::Stopped << Job::Stopped);
+ }
+ 
+-void SchedulerTest::testSchedulerStopStart()
+-{
+-    QFETCH(int, limit);
+-    QFETCH(QList<Job::Status>, status);
+-    QFETCH(QList<Job::Status>, finalStatus);
+-
+-    SettingsHelper helper(limit);
+-
+-    Scheduler scheduler;
+-    auto *queue = new TestQueue(&scheduler);
+-    scheduler.addQueue(queue);
+-
+-    //uses an own list instead of the iterators to make sure that the order stays the same
+-    QList<TestJob*> jobs;
+-    for (int i = 0; i < status.size(); ++i) {
+-        auto *job = new TestJob(&scheduler, queue);
+-        job->setStatus(status[i]);
+-        queue->appendPub(job);
+-        jobs << job;
+-    }
+-
+-    scheduler.stop();
+-    scheduler.start();
+-
+-    for (int i = 0; i < status.size(); ++i) {
+-        QCOMPARE(jobs[i]->status(), finalStatus[i]);
+-    }
+-}
+-
+-void SchedulerTest::testSchedulerStopStart_data()
+-{
+-    QTest::addColumn<int>("limit");
+-    QTest::addColumn<QList<Job::Status> >("status");
+-    QTest::addColumn<QList<Job::Status> >("finalStatus");
+-
+-    QTest::newRow("limit 2, two finished, will third be started?") << 2 << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Stopped) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-    QTest::newRow("limit 2, will first two start while last will stay stopped?") << 2 << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Stopped) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Stopped);
+-    QTest::newRow("limit 2, will first two start while last will be stopped?") << 2 << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Running) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Stopped);
+-    QTest::newRow("no limit, two finished, will third be started?") << NO_LIMIT << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Stopped) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-    QTest::newRow("no limit, will all three be started?") << NO_LIMIT << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Stopped) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Running);
+-    QTest::newRow("limit 2, two finished, will third stay running?") << 2 << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-}
+-
+-
+ void SchedulerTest::testSuspendScheduler()
+ {
+     QFETCH(int, limit);
+diff -rup kget-22.04.1.orig/tests/schedulertest.h kget-22.04.1/tests/schedulertest.h
+--- a/tests/schedulertest.h
++++ b/tests/schedulertest.h
+@@ -99,13 +99,6 @@ class SchedulerTest : public QObject
+         void testStopScheduler();
+         void testStopScheduler_data();
+ 
+-        /**
+-         * Stops the scheduler and then starts it again to see if jobs
+-         * are correctly started
+-         */
+-        void testSchedulerStopStart();
+-        void testSchedulerStopStart_data();
+-
+         void testSuspendScheduler();
+         void testSuspendScheduler_data();
+
diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From fe60cb2159452194c83248a030734a9ede19db60 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 07/10] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From b0f3ce56810041d320dd5cd41115457076cf8290 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 08/10] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From 027267c60c67dc68c7b38845043f28de2029b9da Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Thu, 8 Sep 2022 17:55:25 -0700
Subject: [PATCH 09/10] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..7affa2f8be19 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"
@@ -10,9 +10,13 @@ makedepends="kcalutils-devel knotifyconfig-devel kontactinterface-devel
  messagelib-devel qt5-location-devel qt5-webchannel-devel qt5-webengine-devel"
 depends="kdepim-runtime kmail-account-wizard mariadb akonadi-import-wizard
  pim-data-exporter"
+checkdepends="dbus"
 short_desc="KDE Mail Client"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later, GFDL-1.2-or-later"
 homepage="https://kde.org/applications/en/internet/org.kde.kmail2"
 distfiles="${KDE_SITE}/release-service/${version}/src/kmail-${version}.tar.xz"
 checksum=b88101f47259a5ebfc4ec8e5d0efa19cdff33c67034e9c7082c22c0a11474d74
+make_check_pre="dbus-run-session"
+# https://github.com/void-linux/void-packages/actions/runs/3055595240/jobs/4928821782
+make_check=no # Akonadi: Cannot mix incompatible Qt library (5.15.4) with this library (5.15.5) ( "Process crashed" )

From c46564b89b71c10d2de2984f3690adaedbaa9c09 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Wed, 14 Sep 2022 04:39:25 -0700
Subject: [PATCH 10/10] libktorrent: fix build failure due to missing boost

---
 srcpkgs/libktorrent/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/libktorrent/template b/srcpkgs/libktorrent/template
index 787e5a7c40ee..2b2b5cc321f6 100644
--- a/srcpkgs/libktorrent/template
+++ b/srcpkgs/libktorrent/template
@@ -1,11 +1,11 @@
 # Template file for 'libktorrent'
 pkgname=libktorrent
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules gettext qt5-host-tools qt5-qmake python3 doxygen"
 makedepends="qt5-devel karchive-devel ksolid-devel kio-devel ki18n-devel
-	kcrash-devel gmp-devel qca-qt5-devel"
+ kcrash-devel gmp-devel qca-qt5-devel boost-devel"
 short_desc="BitTorrent protocol implementation"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
@@ -18,7 +18,7 @@ if [ "$CROSS_BUILD" ]; then
 fi
 
 libktorrent-devel_package() {
-	depends="${sourcepkg}-${version}_${revision} gmp-devel"
+	depends="${sourcepkg}-${version}_${revision} gmp-devel boost-devel"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (19 preceding siblings ...)
  2022-09-14 20:43 ` oreo639
@ 2022-09-14 20:49 ` oreo639
  2022-09-15  7:32 ` oreo639
                   ` (15 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-14 20:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 34467 bytes --]

From badba51fcf3b3588b3664cf48c8185f5454a5c2e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 01/10] gpgme: update to 1.18.0.

---
 common/shlibs                                 |   2 +-
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   7 +-
 6 files changed, 330 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/common/shlibs b/common/shlibs
index ec58b8c40619..5fddc7dc8ba6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 08eaf9d98852fb3dae8a53b9c120350def3ae88e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 02/10] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  5 ++--
 2 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..dc17b7bcf1e4 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,11 +1,12 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"
-makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel"
+makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel
+ boost-devel"
 short_desc="KDE PIM cryptographic library"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"

From 083f84478cc8f94549918e46bdd0a597558383f6 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 03/10] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From c0c01e71c9d72f32ca85900e7838a1e15f436a69 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 04/10] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..f55bf7570772 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,18 +1,21 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"
 makedepends="mailimporter-devel messagelib-devel kdesignerplugin-devel
  pimcommon-devel libkleo-devel qt5-multimedia-devel kcontacts-devel"
+checkdepends="dbus"
 short_desc="KDE PIM library providing support for mail applications"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/mailcommon-${version}.tar.xz"
 checksum=eb3b2b848574f086c6e9642adfbb61fa0e69e6f857f368d0fa0ec6a9ce15396e
+make_check_pre="dbus-run-session"
+make_check=no # Akonadi: Cannot mix incompatible Qt library (5.15.4) with this library (5.15.5) ( "Process crashed" )
 
 mailcommon-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} ${makedpends}"

From d95bcc99a3fde26955f9bcc8b1c418da2640464a Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 05/10] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 6f8498cb844e9a7526c51b42acff7a539fb189c9 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 06/10] kget: rebuild for gpgme 1.18

---
 .../kget/patches/disable-failing-tests.patch  | 71 +++++++++++++++++++
 srcpkgs/kget/template                         |  2 +-
 2 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kget/patches/disable-failing-tests.patch

diff --git a/srcpkgs/kget/patches/disable-failing-tests.patch b/srcpkgs/kget/patches/disable-failing-tests.patch
new file mode 100644
index 000000000000..b17a17cdbb75
--- /dev/null
+++ b/srcpkgs/kget/patches/disable-failing-tests.patch
@@ -0,0 +1,71 @@
+diff -rup kget-22.04.1.orig/tests/schedulertest.cpp kget-22.04.1/tests/schedulertest.cpp
+--- a/tests/schedulertest.cpp
++++ b/tests/schedulertest.cpp
+@@ -211,50 +211,6 @@ void SchedulerTest::testStopScheduler_da
+     QTest::newRow("no limit, one running, three stopped") << NO_LIMIT << (QList<Job::Status>() << Job::Running << Job::Stopped << Job::Stopped << Job::Stopped);
+ }
+ 
+-void SchedulerTest::testSchedulerStopStart()
+-{
+-    QFETCH(int, limit);
+-    QFETCH(QList<Job::Status>, status);
+-    QFETCH(QList<Job::Status>, finalStatus);
+-
+-    SettingsHelper helper(limit);
+-
+-    Scheduler scheduler;
+-    auto *queue = new TestQueue(&scheduler);
+-    scheduler.addQueue(queue);
+-
+-    //uses an own list instead of the iterators to make sure that the order stays the same
+-    QList<TestJob*> jobs;
+-    for (int i = 0; i < status.size(); ++i) {
+-        auto *job = new TestJob(&scheduler, queue);
+-        job->setStatus(status[i]);
+-        queue->appendPub(job);
+-        jobs << job;
+-    }
+-
+-    scheduler.stop();
+-    scheduler.start();
+-
+-    for (int i = 0; i < status.size(); ++i) {
+-        QCOMPARE(jobs[i]->status(), finalStatus[i]);
+-    }
+-}
+-
+-void SchedulerTest::testSchedulerStopStart_data()
+-{
+-    QTest::addColumn<int>("limit");
+-    QTest::addColumn<QList<Job::Status> >("status");
+-    QTest::addColumn<QList<Job::Status> >("finalStatus");
+-
+-    QTest::newRow("limit 2, two finished, will third be started?") << 2 << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Stopped) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-    QTest::newRow("limit 2, will first two start while last will stay stopped?") << 2 << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Stopped) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Stopped);
+-    QTest::newRow("limit 2, will first two start while last will be stopped?") << 2 << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Running) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Stopped);
+-    QTest::newRow("no limit, two finished, will third be started?") << NO_LIMIT << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Stopped) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-    QTest::newRow("no limit, will all three be started?") << NO_LIMIT << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Stopped) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Running);
+-    QTest::newRow("limit 2, two finished, will third stay running?") << 2 << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-}
+-
+-
+ void SchedulerTest::testSuspendScheduler()
+ {
+     QFETCH(int, limit);
+diff -rup kget-22.04.1.orig/tests/schedulertest.h kget-22.04.1/tests/schedulertest.h
+--- a/tests/schedulertest.h
++++ b/tests/schedulertest.h
+@@ -99,13 +99,6 @@ class SchedulerTest : public QObject
+         void testStopScheduler();
+         void testStopScheduler_data();
+ 
+-        /**
+-         * Stops the scheduler and then starts it again to see if jobs
+-         * are correctly started
+-         */
+-        void testSchedulerStopStart();
+-        void testSchedulerStopStart_data();
+-
+         void testSuspendScheduler();
+         void testSuspendScheduler_data();
+
diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From fe60cb2159452194c83248a030734a9ede19db60 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 07/10] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From b0f3ce56810041d320dd5cd41115457076cf8290 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 08/10] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From 46fadf05d3ab6eb971204b671a251a7f6f9ccf64 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Thu, 8 Sep 2022 17:55:25 -0700
Subject: [PATCH 09/10] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..ee41bc9ab23b 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"
@@ -10,9 +10,12 @@ makedepends="kcalutils-devel knotifyconfig-devel kontactinterface-devel
  messagelib-devel qt5-location-devel qt5-webchannel-devel qt5-webengine-devel"
 depends="kdepim-runtime kmail-account-wizard mariadb akonadi-import-wizard
  pim-data-exporter"
+checkdepends="dbus"
 short_desc="KDE Mail Client"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later, GFDL-1.2-or-later"
 homepage="https://kde.org/applications/en/internet/org.kde.kmail2"
 distfiles="${KDE_SITE}/release-service/${version}/src/kmail-${version}.tar.xz"
 checksum=b88101f47259a5ebfc4ec8e5d0efa19cdff33c67034e9c7082c22c0a11474d74
+make_check_pre="dbus-run-session"
+make_check=no # Akonadi: Cannot mix incompatible Qt library (5.15.4) with this library (5.15.5) ( "Process crashed" )

From deeeda160a21b8d81ec59d48454085e34aa3e3fb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Wed, 14 Sep 2022 04:39:25 -0700
Subject: [PATCH 10/10] libktorrent: fix build failure due to missing boost

---
 srcpkgs/libktorrent/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/libktorrent/template b/srcpkgs/libktorrent/template
index 787e5a7c40ee..2b2b5cc321f6 100644
--- a/srcpkgs/libktorrent/template
+++ b/srcpkgs/libktorrent/template
@@ -1,11 +1,11 @@
 # Template file for 'libktorrent'
 pkgname=libktorrent
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules gettext qt5-host-tools qt5-qmake python3 doxygen"
 makedepends="qt5-devel karchive-devel ksolid-devel kio-devel ki18n-devel
-	kcrash-devel gmp-devel qca-qt5-devel"
+ kcrash-devel gmp-devel qca-qt5-devel boost-devel"
 short_desc="BitTorrent protocol implementation"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
@@ -18,7 +18,7 @@ if [ "$CROSS_BUILD" ]; then
 fi
 
 libktorrent-devel_package() {
-	depends="${sourcepkg}-${version}_${revision} gmp-devel"
+	depends="${sourcepkg}-${version}_${revision} gmp-devel boost-devel"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (20 preceding siblings ...)
  2022-09-14 20:49 ` oreo639
@ 2022-09-15  7:32 ` oreo639
  2022-10-04  9:05 ` oreo639
                   ` (14 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-09-15  7:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 35586 bytes --]

From badba51fcf3b3588b3664cf48c8185f5454a5c2e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 01/11] gpgme: update to 1.18.0.

---
 common/shlibs                                 |   2 +-
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   7 +-
 6 files changed, 330 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/common/shlibs b/common/shlibs
index ec58b8c40619..5fddc7dc8ba6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 08eaf9d98852fb3dae8a53b9c120350def3ae88e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 02/11] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  5 ++--
 2 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..dc17b7bcf1e4 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,11 +1,12 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"
-makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel"
+makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel
+ boost-devel"
 short_desc="KDE PIM cryptographic library"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"

From 083f84478cc8f94549918e46bdd0a597558383f6 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 03/11] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From e3236bf83b110ef47e1623f9ca01f0e8d630d5d4 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 04/11] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..7be673490f58 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,18 +1,26 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"
 makedepends="mailimporter-devel messagelib-devel kdesignerplugin-devel
  pimcommon-devel libkleo-devel qt5-multimedia-devel kcontacts-devel"
+checkdepends="dbus"
 short_desc="KDE PIM library providing support for mail applications"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/mailcommon-${version}.tar.xz"
 checksum=eb3b2b848574f086c6e9642adfbb61fa0e69e6f857f368d0fa0ec6a9ce15396e
+make_check=no # Stalls infinately after tests complete
+
+do_check() {
+	cd build
+	dbus-run-session ctest -E \
+		"(mailcommon-filter-filteractiondecrypt|mailcommon-filter-filteractionencrypt)test"
+}
 
 mailcommon-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} ${makedpends}"

From f66b89048dadca6d524ebc3dc6b8bcd8ade82a67 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 05/11] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From c6129702b5e1e59eaa247110a15daf0ab2759c6b Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 06/11] kget: rebuild for gpgme 1.18

---
 .../kget/patches/disable-failing-tests.patch  | 71 +++++++++++++++++++
 srcpkgs/kget/template                         |  2 +-
 2 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kget/patches/disable-failing-tests.patch

diff --git a/srcpkgs/kget/patches/disable-failing-tests.patch b/srcpkgs/kget/patches/disable-failing-tests.patch
new file mode 100644
index 000000000000..b17a17cdbb75
--- /dev/null
+++ b/srcpkgs/kget/patches/disable-failing-tests.patch
@@ -0,0 +1,71 @@
+diff -rup kget-22.04.1.orig/tests/schedulertest.cpp kget-22.04.1/tests/schedulertest.cpp
+--- a/tests/schedulertest.cpp
++++ b/tests/schedulertest.cpp
+@@ -211,50 +211,6 @@ void SchedulerTest::testStopScheduler_da
+     QTest::newRow("no limit, one running, three stopped") << NO_LIMIT << (QList<Job::Status>() << Job::Running << Job::Stopped << Job::Stopped << Job::Stopped);
+ }
+ 
+-void SchedulerTest::testSchedulerStopStart()
+-{
+-    QFETCH(int, limit);
+-    QFETCH(QList<Job::Status>, status);
+-    QFETCH(QList<Job::Status>, finalStatus);
+-
+-    SettingsHelper helper(limit);
+-
+-    Scheduler scheduler;
+-    auto *queue = new TestQueue(&scheduler);
+-    scheduler.addQueue(queue);
+-
+-    //uses an own list instead of the iterators to make sure that the order stays the same
+-    QList<TestJob*> jobs;
+-    for (int i = 0; i < status.size(); ++i) {
+-        auto *job = new TestJob(&scheduler, queue);
+-        job->setStatus(status[i]);
+-        queue->appendPub(job);
+-        jobs << job;
+-    }
+-
+-    scheduler.stop();
+-    scheduler.start();
+-
+-    for (int i = 0; i < status.size(); ++i) {
+-        QCOMPARE(jobs[i]->status(), finalStatus[i]);
+-    }
+-}
+-
+-void SchedulerTest::testSchedulerStopStart_data()
+-{
+-    QTest::addColumn<int>("limit");
+-    QTest::addColumn<QList<Job::Status> >("status");
+-    QTest::addColumn<QList<Job::Status> >("finalStatus");
+-
+-    QTest::newRow("limit 2, two finished, will third be started?") << 2 << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Stopped) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-    QTest::newRow("limit 2, will first two start while last will stay stopped?") << 2 << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Stopped) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Stopped);
+-    QTest::newRow("limit 2, will first two start while last will be stopped?") << 2 << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Running) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Stopped);
+-    QTest::newRow("no limit, two finished, will third be started?") << NO_LIMIT << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Stopped) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-    QTest::newRow("no limit, will all three be started?") << NO_LIMIT << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Stopped) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Running);
+-    QTest::newRow("limit 2, two finished, will third stay running?") << 2 << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-}
+-
+-
+ void SchedulerTest::testSuspendScheduler()
+ {
+     QFETCH(int, limit);
+diff -rup kget-22.04.1.orig/tests/schedulertest.h kget-22.04.1/tests/schedulertest.h
+--- a/tests/schedulertest.h
++++ b/tests/schedulertest.h
+@@ -99,13 +99,6 @@ class SchedulerTest : public QObject
+         void testStopScheduler();
+         void testStopScheduler_data();
+ 
+-        /**
+-         * Stops the scheduler and then starts it again to see if jobs
+-         * are correctly started
+-         */
+-        void testSchedulerStopStart();
+-        void testSchedulerStopStart_data();
+-
+         void testSuspendScheduler();
+         void testSuspendScheduler_data();
+
diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From 8af9e8557926f80eebf5e05078632aa488c257b4 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 07/11] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From b718404be42cc3f86381377b4e1d97d2c2b9df8d Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 08/11] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From beb4bf691b746ca9d13ac1ddbd3bd5c51c52c6c3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Thu, 8 Sep 2022 17:55:25 -0700
Subject: [PATCH 09/11] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..ccfaa7997980 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"
@@ -10,9 +10,17 @@ makedepends="kcalutils-devel knotifyconfig-devel kontactinterface-devel
  messagelib-devel qt5-location-devel qt5-webchannel-devel qt5-webengine-devel"
 depends="kdepim-runtime kmail-account-wizard mariadb akonadi-import-wizard
  pim-data-exporter"
+checkdepends="dbus"
 short_desc="KDE Mail Client"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later, GFDL-1.2-or-later"
 homepage="https://kde.org/applications/en/internet/org.kde.kmail2"
 distfiles="${KDE_SITE}/release-service/${version}/src/kmail-${version}.tar.xz"
 checksum=b88101f47259a5ebfc4ec8e5d0efa19cdff33c67034e9c7082c22c0a11474d74
+make_check=no # Stalls infinately after tests complete
+
+do_check() {
+	cd build
+	dbus-run-session ctest -E \
+		"(akonadi-sqlite-kmcomposerwin|akonadi-sqlite-tagselectdialog|akonadi-sqlite-kmcommands)test"
+}

From feb4e8758b8a4ed46de8d952122978f7b9fefb04 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Wed, 14 Sep 2022 04:39:25 -0700
Subject: [PATCH 10/11] libktorrent: fix build failure due to missing boost

---
 srcpkgs/libktorrent/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/libktorrent/template b/srcpkgs/libktorrent/template
index 787e5a7c40ee..2b2b5cc321f6 100644
--- a/srcpkgs/libktorrent/template
+++ b/srcpkgs/libktorrent/template
@@ -1,11 +1,11 @@
 # Template file for 'libktorrent'
 pkgname=libktorrent
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules gettext qt5-host-tools qt5-qmake python3 doxygen"
 makedepends="qt5-devel karchive-devel ksolid-devel kio-devel ki18n-devel
-	kcrash-devel gmp-devel qca-qt5-devel"
+ kcrash-devel gmp-devel qca-qt5-devel boost-devel"
 short_desc="BitTorrent protocol implementation"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
@@ -18,7 +18,7 @@ if [ "$CROSS_BUILD" ]; then
 fi
 
 libktorrent-devel_package() {
-	depends="${sourcepkg}-${version}_${revision} gmp-devel"
+	depends="${sourcepkg}-${version}_${revision} gmp-devel boost-devel"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/cmake

From 9d2d09fee57dfe32ff7a0c3f872a4c1b92dce4fb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Wed, 14 Sep 2022 23:44:59 -0700
Subject: [PATCH 11/11] akonadi5: rebuild to fix version mismatch

---
 srcpkgs/akonadi5/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/akonadi5/template b/srcpkgs/akonadi5/template
index 073b4ba37173..c7b2e9b9532e 100644
--- a/srcpkgs/akonadi5/template
+++ b/srcpkgs/akonadi5/template
@@ -1,7 +1,7 @@
 # Template file for 'akonadi5'
 pkgname=akonadi5
 version=22.04.3
-revision=1
+revision=2
 wrksrc="akonadi-${version}"
 build_style=cmake
 build_helper="qemu"
@@ -35,7 +35,7 @@ do_check() {
 	# failing tests are disabled - sqlite tests hang on futex
 	cd build
 	dbus-run-session ctest -E \
-		"(akonadixml-xmldocument|mimetypechecker|AkonadiControl-agenttype|.*sqlite.*)test"
+		"(akonadixml-xmldocument|mimetypechecker|AkonadiServer-dbconfig|entitytreemodel|.*sqlite.*)test"
 }
 
 akonadi5-devel_package() {

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (21 preceding siblings ...)
  2022-09-15  7:32 ` oreo639
@ 2022-10-04  9:05 ` oreo639
  2022-10-18  3:38 ` classabbyamp
                   ` (13 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-10-04  9:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 34303 bytes --]

From e7bde47af5ecdeb29ce3c53f575de1d99e36dc3d Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:19:57 -0700
Subject: [PATCH 01/10] gpgme: update to 1.18.0.

---
 common/shlibs                                 |   2 +-
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   7 +-
 6 files changed, 330 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/common/shlibs b/common/shlibs
index 5d4b0a9899ad..89152e51c29e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -721,7 +721,7 @@ libdconf.so.1 dconf-0.13.90_1
 libassuan.so.0 libassuan-2.0.1_1
 libgpgme.so.11 libgpgme-1.12.0_2
 libgpgmepp.so.6 gpgmepp-1.7.0_3
-libqgpgme.so.7 gpgmeqt-1.7.0_3
+libqgpgme.so.15 gpgmeqt-1.18.0_1
 libgarcon-1.so.0 garcon-0.1.12_1
 libgarcon-gtk2-1.so.0 garcon-0.4.0_1
 libgarcon-gtk3-1.so.0 garcon-0.6.1_1
diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index 8633075a8404..09b08c45ae6a 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
-version=1.15.1
-revision=2
+version=1.18.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
@@ -9,12 +9,13 @@ configure_args="--enable-fd-passing
 hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake"
 makedepends="libassuan-devel qt5-tools-devel"
 depends="gnupg>=2"
+checkdepends="which"
 short_desc="GnuPG Made Easy"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://www.gnupg.org/software/gpgme/index.html"
 distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
-checksum=eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+checksum=361d4eae47ce925dba0ea569af40e7b52c645c4ae2e65e5621bf1b6cdd8b0e9e
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	configure_args+=" ac_cv_sys_file_offset_bits=no"

From 9bb91b2bab637e2d5ac7d64a1c240515d9cb5070 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:20:32 -0700
Subject: [PATCH 02/10] libkleo: rebuild for gpgme 1.18

---
 .../patches/disable-failing-test.patch        | 25 +++++++++++++++++++
 srcpkgs/libkleo/template                      |  5 ++--
 2 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/libkleo/patches/disable-failing-test.patch

diff --git a/srcpkgs/libkleo/patches/disable-failing-test.patch b/srcpkgs/libkleo/patches/disable-failing-test.patch
new file mode 100644
index 000000000000..3095aa90b250
--- /dev/null
+++ b/srcpkgs/libkleo/patches/disable-failing-test.patch
@@ -0,0 +1,25 @@
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -25,13 +25,6 @@
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+ )
+ 
+-ecm_add_test(
+-    keyresolvercoretest.cpp
+-    keyresolvercoretest.qrc
+-    TEST_NAME keyresolvercoretest
+-    LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Test
+-)
+-
+ ecm_add_tests(
+     editdirectoryservicedialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo KF5::WidgetsAddons Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -33,7 +33,6 @@
+ ecm_add_tests(
+     keyselectioncombotest.cpp
+     keyserverconfigtest.cpp
+-    newkeyapprovaldialogtest.cpp
+     LINK_LIBRARIES KF5::Libkleo Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Test
+ )
diff --git a/srcpkgs/libkleo/template b/srcpkgs/libkleo/template
index caad7e4047a5..dc17b7bcf1e4 100644
--- a/srcpkgs/libkleo/template
+++ b/srcpkgs/libkleo/template
@@ -1,11 +1,12 @@
 # Template file for 'libkleo'
 pkgname=libkleo
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools
  gettext kcoreaddons"
-makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel"
+makedepends="kitemmodels-devel kpimtextedit-devel gpgmeqt-devel gpgmepp-devel
+ boost-devel"
 short_desc="KDE PIM cryptographic library"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"

From b260266c116ea79ed397b60ed0299fbee7ab8cfe Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:25 -0700
Subject: [PATCH 03/10] messagelib: rebuild for gpgme 1.18

---
 srcpkgs/messagelib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/messagelib/template b/srcpkgs/messagelib/template
index f42b49ef0dc1..b6064699bcf3 100644
--- a/srcpkgs/messagelib/template
+++ b/srcpkgs/messagelib/template
@@ -1,7 +1,7 @@
 # Template file for 'messagelib'
 pkgname=messagelib
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules qt5-qmake qt5-host-tools python3
  gettext kcoreaddons kconfig"
@@ -15,6 +15,7 @@ license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/messagelib-${version}.tar.xz"
 checksum=50de2bdd2bdba547b8b318a0ad075a1176f496457056988a2709ea94915a7a1b
+make_check=no # Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
 
 #TODO: fix build without qca-qt5
 

From 30b7ccffad1d27f00827747c4ef2ef69f8c4277e Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:38:47 -0700
Subject: [PATCH 04/10] mailcommon: rebuild for gpgme 1.18

---
 srcpkgs/mailcommon/template | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/mailcommon/template b/srcpkgs/mailcommon/template
index 8d1c8d25c6b5..7be673490f58 100644
--- a/srcpkgs/mailcommon/template
+++ b/srcpkgs/mailcommon/template
@@ -1,18 +1,26 @@
 # Template file for 'mailcommon'
 pkgname=mailcommon
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kconfig libxslt qt5-qmake
  gettext qt5-host-tools python3 kgendesignerplugin"
 makedepends="mailimporter-devel messagelib-devel kdesignerplugin-devel
  pimcommon-devel libkleo-devel qt5-multimedia-devel kcontacts-devel"
+checkdepends="dbus"
 short_desc="KDE PIM library providing support for mail applications"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://community.kde.org/KDE_PIM"
 distfiles="${KDE_SITE}/release-service/${version}/src/mailcommon-${version}.tar.xz"
 checksum=eb3b2b848574f086c6e9642adfbb61fa0e69e6f857f368d0fa0ec6a9ce15396e
+make_check=no # Stalls infinately after tests complete
+
+do_check() {
+	cd build
+	dbus-run-session ctest -E \
+		"(mailcommon-filter-filteractiondecrypt|mailcommon-filter-filteractionencrypt)test"
+}
 
 mailcommon-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} ${makedpends}"

From 1c45d86d0f5a4d1789e55bbb5b4278159cc40db5 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:39:14 -0700
Subject: [PATCH 05/10] kdepim-addons: rebuild for gpgme 1.18

---
 srcpkgs/kdepim-addons/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kdepim-addons/template b/srcpkgs/kdepim-addons/template
index 3bac99179a3f..bc4b24db33a7 100644
--- a/srcpkgs/kdepim-addons/template
+++ b/srcpkgs/kdepim-addons/template
@@ -1,7 +1,7 @@
 # Template file for 'kdepim-addons'
 pkgname=kdepim-addons
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 kdoctools kcoreaddons
  kconfig kpackage gettext qt5-qmake qt5-host-tools"

From 51ed837081881be4c2a385a39d334d30725523e3 Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:43:53 -0700
Subject: [PATCH 06/10] kget: rebuild for gpgme 1.18

---
 .../kget/patches/disable-failing-tests.patch  | 71 +++++++++++++++++++
 srcpkgs/kget/template                         |  2 +-
 2 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/kget/patches/disable-failing-tests.patch

diff --git a/srcpkgs/kget/patches/disable-failing-tests.patch b/srcpkgs/kget/patches/disable-failing-tests.patch
new file mode 100644
index 000000000000..b17a17cdbb75
--- /dev/null
+++ b/srcpkgs/kget/patches/disable-failing-tests.patch
@@ -0,0 +1,71 @@
+diff -rup kget-22.04.1.orig/tests/schedulertest.cpp kget-22.04.1/tests/schedulertest.cpp
+--- a/tests/schedulertest.cpp
++++ b/tests/schedulertest.cpp
+@@ -211,50 +211,6 @@ void SchedulerTest::testStopScheduler_da
+     QTest::newRow("no limit, one running, three stopped") << NO_LIMIT << (QList<Job::Status>() << Job::Running << Job::Stopped << Job::Stopped << Job::Stopped);
+ }
+ 
+-void SchedulerTest::testSchedulerStopStart()
+-{
+-    QFETCH(int, limit);
+-    QFETCH(QList<Job::Status>, status);
+-    QFETCH(QList<Job::Status>, finalStatus);
+-
+-    SettingsHelper helper(limit);
+-
+-    Scheduler scheduler;
+-    auto *queue = new TestQueue(&scheduler);
+-    scheduler.addQueue(queue);
+-
+-    //uses an own list instead of the iterators to make sure that the order stays the same
+-    QList<TestJob*> jobs;
+-    for (int i = 0; i < status.size(); ++i) {
+-        auto *job = new TestJob(&scheduler, queue);
+-        job->setStatus(status[i]);
+-        queue->appendPub(job);
+-        jobs << job;
+-    }
+-
+-    scheduler.stop();
+-    scheduler.start();
+-
+-    for (int i = 0; i < status.size(); ++i) {
+-        QCOMPARE(jobs[i]->status(), finalStatus[i]);
+-    }
+-}
+-
+-void SchedulerTest::testSchedulerStopStart_data()
+-{
+-    QTest::addColumn<int>("limit");
+-    QTest::addColumn<QList<Job::Status> >("status");
+-    QTest::addColumn<QList<Job::Status> >("finalStatus");
+-
+-    QTest::newRow("limit 2, two finished, will third be started?") << 2 << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Stopped) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-    QTest::newRow("limit 2, will first two start while last will stay stopped?") << 2 << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Stopped) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Stopped);
+-    QTest::newRow("limit 2, will first two start while last will be stopped?") << 2 << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Running) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Stopped);
+-    QTest::newRow("no limit, two finished, will third be started?") << NO_LIMIT << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Stopped) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-    QTest::newRow("no limit, will all three be started?") << NO_LIMIT << (QList<Job::Status>() << Job::Stopped << Job::Stopped << Job::Stopped) << (QList<Job::Status>() << Job::Running << Job::Running << Job::Running);
+-    QTest::newRow("limit 2, two finished, will third stay running?") << 2 << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running) << (QList<Job::Status>() << Job::Finished << Job::Finished << Job::Running);
+-}
+-
+-
+ void SchedulerTest::testSuspendScheduler()
+ {
+     QFETCH(int, limit);
+diff -rup kget-22.04.1.orig/tests/schedulertest.h kget-22.04.1/tests/schedulertest.h
+--- a/tests/schedulertest.h
++++ b/tests/schedulertest.h
+@@ -99,13 +99,6 @@ class SchedulerTest : public QObject
+         void testStopScheduler();
+         void testStopScheduler_data();
+ 
+-        /**
+-         * Stops the scheduler and then starts it again to see if jobs
+-         * are correctly started
+-         */
+-        void testSchedulerStopStart();
+-        void testSchedulerStopStart_data();
+-
+         void testSuspendScheduler();
+         void testSuspendScheduler_data();
+
diff --git a/srcpkgs/kget/template b/srcpkgs/kget/template
index cdf9e98935f3..1dba435510b4 100644
--- a/srcpkgs/kget/template
+++ b/srcpkgs/kget/template
@@ -1,7 +1,7 @@
 # Template file for 'kget'
 pkgname=kget
 version=22.04.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-qmake qt5-host-tools

From 2c505c0b607dbeb448c8f3431c754210048a16fb Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:48:05 -0700
Subject: [PATCH 07/10] kleopatra: rebuild for gpgme 1.18

---
 srcpkgs/kleopatra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kleopatra/template b/srcpkgs/kleopatra/template
index 9f30cbd5ed23..20e578868c60 100644
--- a/srcpkgs/kleopatra/template
+++ b/srcpkgs/kleopatra/template
@@ -1,7 +1,7 @@
 # Template file for 'kleopatra'
 pkgname=kleopatra
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kdoctools qt5-qmake qt5-host-tools kcoreaddons gettext kconfig"
 makedepends="kcmutils-devel AppStream kitemmodels-devel gpgmeqt-devel libkleo-devel kmime-devel"

From ab767b8272ca5827d14687aa974bf2cb3eaddbce Mon Sep 17 00:00:00 2001
From: oreo639 <31916379+Oreo639@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:49:57 -0700
Subject: [PATCH 08/10] kmail-account-wizard: rebuild for gpgme 1.18

---
 srcpkgs/kmail-account-wizard/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kmail-account-wizard/template b/srcpkgs/kmail-account-wizard/template
index 29e6d92f0251..ea99b3f86fd8 100644
--- a/srcpkgs/kmail-account-wizard/template
+++ b/srcpkgs/kmail-account-wizard/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail-account-wizard'
 pkgname=kmail-account-wizard
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons qt5-qmake qt5-host-tools python3
  gettext"

From 3a15933f043bb5c4fef2802b623e2b0bb8a83d03 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Thu, 8 Sep 2022 17:55:25 -0700
Subject: [PATCH 09/10] kmail: rebuild for gpgme 1.18

---
 srcpkgs/kmail/template | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/kmail/template b/srcpkgs/kmail/template
index dbb6698418f9..ccfaa7997980 100644
--- a/srcpkgs/kmail/template
+++ b/srcpkgs/kmail/template
@@ -1,7 +1,7 @@
 # Template file for 'kmail'
 pkgname=kmail
 version=22.04.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake
  gettext kcmutils kdoctools kconfig kcoreaddons"
@@ -10,9 +10,17 @@ makedepends="kcalutils-devel knotifyconfig-devel kontactinterface-devel
  messagelib-devel qt5-location-devel qt5-webchannel-devel qt5-webengine-devel"
 depends="kdepim-runtime kmail-account-wizard mariadb akonadi-import-wizard
  pim-data-exporter"
+checkdepends="dbus"
 short_desc="KDE Mail Client"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later, GFDL-1.2-or-later"
 homepage="https://kde.org/applications/en/internet/org.kde.kmail2"
 distfiles="${KDE_SITE}/release-service/${version}/src/kmail-${version}.tar.xz"
 checksum=b88101f47259a5ebfc4ec8e5d0efa19cdff33c67034e9c7082c22c0a11474d74
+make_check=no # Stalls infinately after tests complete
+
+do_check() {
+	cd build
+	dbus-run-session ctest -E \
+		"(akonadi-sqlite-kmcomposerwin|akonadi-sqlite-tagselectdialog|akonadi-sqlite-kmcommands)test"
+}

From 45bc691cc2a4ac6a71499bc8dff7b296d633841a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Wed, 14 Sep 2022 23:44:59 -0700
Subject: [PATCH 10/10] akonadi5: rebuild to fix version mismatch

---
 srcpkgs/akonadi5/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/akonadi5/template b/srcpkgs/akonadi5/template
index 073b4ba37173..c7b2e9b9532e 100644
--- a/srcpkgs/akonadi5/template
+++ b/srcpkgs/akonadi5/template
@@ -1,7 +1,7 @@
 # Template file for 'akonadi5'
 pkgname=akonadi5
 version=22.04.3
-revision=1
+revision=2
 wrksrc="akonadi-${version}"
 build_style=cmake
 build_helper="qemu"
@@ -35,7 +35,7 @@ do_check() {
 	# failing tests are disabled - sqlite tests hang on futex
 	cd build
 	dbus-run-session ctest -E \
-		"(akonadixml-xmldocument|mimetypechecker|AkonadiControl-agenttype|.*sqlite.*)test"
+		"(akonadixml-xmldocument|mimetypechecker|AkonadiServer-dbconfig|entitytreemodel|.*sqlite.*)test"
 }
 
 akonadi5-devel_package() {

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (22 preceding siblings ...)
  2022-10-04  9:05 ` oreo639
@ 2022-10-18  3:38 ` classabbyamp
  2022-10-18  3:38 ` [PR PATCH] [Closed]: " classabbyamp
                   ` (12 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: classabbyamp @ 2022-10-18  3:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/38825#issuecomment-1281770830

Comment:
https://github.com/void-linux/void-packages/commit/f2141db4d1307a6f843abdadfb082e320e1dc052

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Closed]: gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (23 preceding siblings ...)
  2022-10-18  3:38 ` classabbyamp
@ 2022-10-18  3:38 ` classabbyamp
  2022-10-18  4:17 ` oreo639
                   ` (11 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: classabbyamp @ 2022-10-18  3:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1151 bytes --]

There's a closed pull request on the void-packages repository

gpgme: update to 1.18.0.
https://github.com/void-linux/void-packages/pull/38825

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (24 preceding siblings ...)
  2022-10-18  3:38 ` [PR PATCH] [Closed]: " classabbyamp
@ 2022-10-18  4:17 ` oreo639
  2022-10-18  4:19 ` classabbyamp
                   ` (10 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-10-18  4:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/38825#issuecomment-1281793636

Comment:
@Johnnynator That is missing the patches (otherwise it returns the wrong error codes).

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (25 preceding siblings ...)
  2022-10-18  4:17 ` oreo639
@ 2022-10-18  4:19 ` classabbyamp
  2022-10-18  4:21 ` [PR PATCH] [Updated] " oreo639
                   ` (9 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: classabbyamp @ 2022-10-18  4:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/38825#issuecomment-1281794445

Comment:
can you rebase this for those patches?

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (26 preceding siblings ...)
  2022-10-18  4:19 ` classabbyamp
@ 2022-10-18  4:21 ` oreo639
  2022-10-18  4:21 ` oreo639
                   ` (8 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-10-18  4:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 18571 bytes --]

From 64e708aacfd29412b357ea9b90939ebbfa9781d5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 17 Oct 2022 21:20:40 -0700
Subject: [PATCH] gpgme: fix returning incorrect error codes

---
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   2 +-
 5 files changed, 326 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index b1cfd5f78657..249d7b472eb9 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
 version=1.18.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: update to 1.18.0.
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (27 preceding siblings ...)
  2022-10-18  4:21 ` [PR PATCH] [Updated] " oreo639
@ 2022-10-18  4:21 ` oreo639
  2022-10-18  4:22 ` [PR PATCH] [Updated] gpgme: fix returning incorrect error codes oreo639
                   ` (7 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-10-18  4:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: update to 1.18.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 18680 bytes --]

From 339ebfd450cab114f84abfecce9a8d4ac2272406 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 17 Oct 2022 21:20:40 -0700
Subject: [PATCH] gpgme: fix returning incorrect error codes

Fix integer overflow on 32-bit tests. This also catches an issue
with gpgme returning the wrong error codes.
---
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   2 +-
 5 files changed, 326 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index b1cfd5f78657..249d7b472eb9 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
 version=1.18.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: fix returning incorrect error codes
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (28 preceding siblings ...)
  2022-10-18  4:21 ` oreo639
@ 2022-10-18  4:22 ` oreo639
  2022-10-18  4:24 ` oreo639
                   ` (6 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-10-18  4:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: fix returning incorrect error codes
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 18682 bytes --]

From 42d478402450edf4fd7284f8d00571e19698e339 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 17 Oct 2022 21:20:40 -0700
Subject: [PATCH] gpgme: fix returning incorrect error codes

Catch integer overflow on 32-bit tests. This also catches an issue
with gpgme returning the wrong error codes.
---
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   2 +-
 5 files changed, 326 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index b1cfd5f78657..249d7b472eb9 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
 version=1.18.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: fix returning incorrect error codes
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (29 preceding siblings ...)
  2022-10-18  4:22 ` [PR PATCH] [Updated] gpgme: fix returning incorrect error codes oreo639
@ 2022-10-18  4:24 ` oreo639
  2022-10-18  4:31 ` classabbyamp
                   ` (5 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-10-18  4:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: fix returning incorrect error codes
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 18680 bytes --]

From 4448788b7c8da59324c5cf586e0fc78443997c66 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 17 Oct 2022 21:20:40 -0700
Subject: [PATCH] gpgme: fix returning incorrect error codes

Catch integer overflow on 32-bit tests. This also fixes an issue
with gpgme returning the wrong error codes.
---
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   2 +-
 5 files changed, 326 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index b1cfd5f78657..249d7b472eb9 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
 version=1.18.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: gpgme: fix returning incorrect error codes
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (30 preceding siblings ...)
  2022-10-18  4:24 ` oreo639
@ 2022-10-18  4:31 ` classabbyamp
  2022-10-18  4:33 ` oreo639
                   ` (4 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: classabbyamp @ 2022-10-18  4:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 205 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/38825#issuecomment-1281801524

Comment:
should be fine to merge after the builders clear, probably

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: gpgme: fix returning incorrect error codes
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (31 preceding siblings ...)
  2022-10-18  4:31 ` classabbyamp
@ 2022-10-18  4:33 ` oreo639
  2022-10-18  4:33 ` oreo639
                   ` (3 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-10-18  4:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/38825#issuecomment-1281802644

Comment:
> kdepim-addons-22.04.1_1: broken, unresolvable shlib `libqgpgme.so.7'
> libkleo-22.04.3_1: broken, unresolvable shlib `libqgpgme.so.7'
> mailcommon-22.04.3_1: broken, unresolvable shlib `libqgpgme.so.7'
> messagelib-22.04.3_1: broken, unresolvable shlib `libqgpgme.so.7'

That is because they are still being rebuilt rn: https://build.voidlinux.org/waterfall

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: gpgme: fix returning incorrect error codes
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (32 preceding siblings ...)
  2022-10-18  4:33 ` oreo639
@ 2022-10-18  4:33 ` oreo639
  2022-10-18  7:07 ` [PR PATCH] [Updated] " oreo639
                   ` (2 subsequent siblings)
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-10-18  4:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/38825#issuecomment-1281802644

Comment:
```
kdepim-addons-22.04.1_1: broken, unresolvable shlib `libqgpgme.so.7'
libkleo-22.04.3_1: broken, unresolvable shlib `libqgpgme.so.7'
mailcommon-22.04.3_1: broken, unresolvable shlib `libqgpgme.so.7'
messagelib-22.04.3_1: broken, unresolvable shlib `libqgpgme.so.7'
```
That is because they are still being rebuilt rn: https://build.voidlinux.org/waterfall

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: fix returning incorrect error codes
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (33 preceding siblings ...)
  2022-10-18  4:33 ` oreo639
@ 2022-10-18  7:07 ` oreo639
  2022-10-18  8:43 ` oreo639
  2022-10-18  9:50 ` [PR PATCH] [Merged]: " classabbyamp
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-10-18  7:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: fix returning incorrect error codes
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 18680 bytes --]

From 802a4659a2f5e224bd8bcdc76539e46ccaa4d22a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 17 Oct 2022 21:20:40 -0700
Subject: [PATCH] gpgme: fix returning incorrect error codes

Catch integer overflow on 32-bit tests. This also fixes an issue
with gpgme returning the wrong error codes.
---
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   2 +-
 5 files changed, 326 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index b1cfd5f78657..249d7b472eb9 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
 version=1.18.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Updated] gpgme: fix returning incorrect error codes
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (34 preceding siblings ...)
  2022-10-18  7:07 ` [PR PATCH] [Updated] " oreo639
@ 2022-10-18  8:43 ` oreo639
  2022-10-18  9:50 ` [PR PATCH] [Merged]: " classabbyamp
  36 siblings, 0 replies; 38+ messages in thread
From: oreo639 @ 2022-10-18  8:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages gpgme
https://github.com/void-linux/void-packages/pull/38825

gpgme: fix returning incorrect error codes
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38825.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gpgme-38825.patch --]
[-- Type: text/x-diff, Size: 18680 bytes --]

From 932219fb39db12bccf41f27c358911da967474eb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 17 Oct 2022 21:20:40 -0700
Subject: [PATCH] gpgme: fix returning incorrect error codes

Catch integer overflow on 32-bit tests. This also fixes an issue
with gpgme returning the wrong error codes.
---
 .../gpgme/patches/0001-tests-log-error.patch  |  51 ++++++
 .../0002-tests-expiration-time-unsigned.patch | 159 ++++++++++++++++++
 .../gpgme/patches/0003-tests-fix-32bit.patch  |  75 +++++++++
 .../gpgme/patches/fix-error-conditions.patch  |  40 +++++
 srcpkgs/gpgme/template                        |   2 +-
 5 files changed, 326 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/gpgme/patches/0001-tests-log-error.patch
 create mode 100644 srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
 create mode 100644 srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
 create mode 100644 srcpkgs/gpgme/patches/fix-error-conditions.patch

diff --git a/srcpkgs/gpgme/patches/0001-tests-log-error.patch b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
new file mode 100644
index 000000000000..50443efe2e7e
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0001-tests-log-error.patch
@@ -0,0 +1,51 @@
+From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 14:56:13 +0200
+Subject: [PATCH] qt,tests: Log the actual error code if the assertion fails
+
+* lang/qt/tests/t-addexistingsubkey.cpp (
+AddExistingSubkeyJobTest::testAddExistingSubkeyAsync,
+AddExistingSubkeyJobTest::testAddExistingSubkeySync,
+AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use
+QCOMPARE instead of QVERIFY for asserting equality.
+--
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 589c90bf..2e654cec 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -168,7 +168,7 @@ private Q_SLOTS:
+         QSignalSpy spy (this, SIGNAL(asyncDone()));
+         QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+     }
+@@ -190,7 +190,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+         QCOMPARE(key.subkey(2).expirationTime(), 0);
+@@ -213,7 +213,7 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QVERIFY(result.code() == GPG_ERR_NO_ERROR);
++        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+         key.update();
+         QCOMPARE(key.numSubkeys(), 3u);
+ 
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
new file mode 100644
index 000000000000..57aef8852a12
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0002-tests-expiration-time-unsigned.patch
@@ -0,0 +1,159 @@
+From f2b48de26b8f8c48c293423eda712831544924f6 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Wed, 17 Aug 2022 15:22:29 +0200
+Subject: [PATCH] qt,tests: Make sure expiration time is interpreted as
+ unsigned number
+
+* lang/qt/tests/t-addexistingsubkey.cpp,
+lang/qt/tests/t-changeexpiryjob.cpp: Convert expiration time to
+uint_least32_t.
+--
+
+This doesn't change the outcome of the tests (they also pass without
+this change because of the expiration dates of the test keys), but it's
+still good practise to treat the expiration time as an unsigned number
+if the assertions check that the expiration time is in some range.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp |  6 +++---
+ lang/qt/tests/t-changeexpiryjob.cpp   | 26 +++++++++++++-------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 2e654cec..87eadf43 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -222,9 +222,9 @@ private Q_SLOTS:
+         // several times
+         const auto allowedDeltaTSeconds = 1;
+         const auto expectedExpirationRange = std::make_pair(
+-            sourceSubkey.expirationTime() - allowedDeltaTSeconds,
+-            sourceSubkey.expirationTime() + allowedDeltaTSeconds);
+-        const auto actualExpiration = key.subkey(2).expirationTime();
++            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+         QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                  ("actual: " + std::to_string(actualExpiration) +
+                   "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
+index 090002f3..3da74d46 100644
+--- a/lang/qt/tests/t-changeexpiryjob.cpp
++++ b/lang/qt/tests/t-changeexpiryjob.cpp
+@@ -70,7 +70,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -101,7 +101,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(1).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -110,7 +110,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -133,7 +133,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto primaryKeyExpiration = key.subkey(0).expirationTime();
++        const auto primaryKeyExpiration = uint_least32_t(key.subkey(0).expirationTime());
+ 
+         {
+             // Create the job
+@@ -164,11 +164,11 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(2).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QCOMPARE(actualExpiration, primaryKeyExpiration);  // unchanged
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -196,7 +196,7 @@ private Q_SLOTS:
+         QVERIFY(!key.isNull());
+         QVERIFY(!key.subkey(0).isNull());
+         QVERIFY(!key.subkey(1).isNull());
+-        const auto subkeyExpiration = key.subkey(1).expirationTime();
++        const auto subkeyExpiration = uint_least32_t(key.subkey(1).expirationTime());
+ 
+         {
+             // Create the job
+@@ -228,7 +228,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(3).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -237,7 +237,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QCOMPARE(actualExpiration, subkeyExpiration);  // unchanged
+             }
+         }
+@@ -291,7 +291,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(4).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -300,7 +300,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -359,7 +359,7 @@ private Q_SLOTS:
+                 newExpirationDate.toSecsSinceEpoch() - 10,
+                 QDateTime::currentDateTime().addDays(5).toSecsSinceEpoch());
+             {
+-                const auto actualExpiration = key.subkey(0).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(0).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                          "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+@@ -368,7 +368,7 @@ private Q_SLOTS:
+                          "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
+             }
+             {
+-                const auto actualExpiration = key.subkey(1).expirationTime();
++                const auto actualExpiration = uint_least32_t(key.subkey(1).expirationTime());
+                 QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+                         ("actual: " + std::to_string(actualExpiration) +
+                           "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
new file mode 100644
index 000000000000..aaaf57582f00
--- /dev/null
+++ b/srcpkgs/gpgme/patches/0003-tests-fix-32bit.patch
@@ -0,0 +1,75 @@
+From 2e7a61b898fccc1c20000b79dee83cd980901fa9 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:55:09 +0200
+Subject: [PATCH] qt,tests: Make test pass on 32-bit systems
+
+* lang/qt/tests/t-addexistingsubkey.cpp
+(AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Handle
+negative expiration date.
+--
+
+On 32-bit systems the expiration date of the test key overflows. This
+will cause the AddExistingSubkeyJob to fail. We expect it to fail with
+an "invalid time" error.
+
+GnuPG-bug-id: 6137
+---
+ lang/qt/tests/t-addexistingsubkey.cpp | 42 ++++++++++++++++++++---------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
+index 87eadf43..c0eee57b 100644
+--- a/lang/qt/tests/t-addexistingsubkey.cpp
++++ b/lang/qt/tests/t-addexistingsubkey.cpp
+@@ -213,24 +213,30 @@ private Q_SLOTS:
+ 
+         const auto result = job->exec(key, sourceSubkey);
+ 
+-        QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
+-        key.update();
+-        QCOMPARE(key.numSubkeys(), 3u);
+-
+-        // allow 1 second different expiration because gpg calculates with
+-        // expiration as difference to current time and takes current time
+-        // several times
+-        const auto allowedDeltaTSeconds = 1;
+-        const auto expectedExpirationRange = std::make_pair(
+-            uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
+-            uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
+-        const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
+-        QVERIFY2(actualExpiration >= expectedExpirationRange.first,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
+-        QVERIFY2(actualExpiration <= expectedExpirationRange.second,
+-                 ("actual: " + std::to_string(actualExpiration) +
+-                  "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        if (sourceSubkey.expirationTime() > 0) {
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
++            key.update();
++            QCOMPARE(key.numSubkeys(), 3u);
++
++            // allow 1 second different expiration because gpg calculates with
++            // expiration as difference to current time and takes current time
++            // several times
++            const auto allowedDeltaTSeconds = 1;
++            const auto expectedExpirationRange = std::make_pair(
++                uint_least32_t(sourceSubkey.expirationTime()) - allowedDeltaTSeconds,
++                uint_least32_t(sourceSubkey.expirationTime()) + allowedDeltaTSeconds);
++            const auto actualExpiration = uint_least32_t(key.subkey(2).expirationTime());
++            QVERIFY2(actualExpiration >= expectedExpirationRange.first,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.first)).c_str());
++            QVERIFY2(actualExpiration <= expectedExpirationRange.second,
++                    ("actual: " + std::to_string(actualExpiration) +
++                    "; expected: " + std::to_string(expectedExpirationRange.second)).c_str());
++        } else {
++            // on 32-bit systems the expiration date of the test key overflows;
++            // in this case we expect an appropriate error code
++            QCOMPARE(result.code(), static_cast<int>(GPG_ERR_INV_TIME));
++        }
+     }
+ 
+ private:
+-- 
+2.11.0
+
diff --git a/srcpkgs/gpgme/patches/fix-error-conditions.patch b/srcpkgs/gpgme/patches/fix-error-conditions.patch
new file mode 100644
index 000000000000..f70e167784ce
--- /dev/null
+++ b/srcpkgs/gpgme/patches/fix-error-conditions.patch
@@ -0,0 +1,40 @@
+From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
+Date: Thu, 18 Aug 2022 10:43:19 +0200
+Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
+
+* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
+logic of string comparisons.
+--
+
+This fixes the problem that the interactor didn't return the proper
+error code if gpg didn't accept the key grip or the expiration date.
+
+GnuPG-bug-id: 6137
+---
+ lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+index 547e613d..8eec7460 100644
+--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
++++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
+@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keygen.flags") == 0) {
+             return FLAGS;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.keygrip")) {
++                   strcmp(args, "keygen.keygrip") == 0) {
+             err = NO_KEY_ERROR;
+             return ERROR;
+         }
+@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
+                 strcmp(args, "keyedit.prompt") == 0) {
+             return QUIT;
+         } else if (status == GPGME_STATUS_GET_LINE &&
+-                   strcmp(args, "keygen.valid")) {
++                   strcmp(args, "keygen.valid") == 0) {
+             err = INV_TIME_ERROR;
+             return ERROR;
+         }
diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template
index b1cfd5f78657..249d7b472eb9 100644
--- a/srcpkgs/gpgme/template
+++ b/srcpkgs/gpgme/template
@@ -1,7 +1,7 @@
 # Template file for 'gpgme'
 pkgname=gpgme
 version=1.18.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--enable-fd-passing
  --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PR PATCH] [Merged]: gpgme: fix returning incorrect error codes
  2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
                   ` (35 preceding siblings ...)
  2022-10-18  8:43 ` oreo639
@ 2022-10-18  9:50 ` classabbyamp
  36 siblings, 0 replies; 38+ messages in thread
From: classabbyamp @ 2022-10-18  9:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

There's a merged pull request on the void-packages repository

gpgme: fix returning incorrect error codes
https://github.com/void-linux/void-packages/pull/38825

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested gpgme with pacman and haven't noticed any issues.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2022-10-18  9:50 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-22  5:58 [PR PATCH] gpgme: update to 1.18.0 oreo639
2022-08-22  6:07 ` [PR PATCH] [Updated] " oreo639
2022-08-22  6:12 ` oreo639
2022-08-22  7:22 ` oreo639
2022-09-08  2:27 ` classabbyamp
2022-09-08  2:28 ` classabbyamp
2022-09-08  2:28 ` classabbyamp
2022-09-08 21:39 ` [PR PATCH] [Updated] " oreo639
2022-09-08 22:36 ` oreo639
2022-09-08 22:52 ` oreo639
2022-09-09  0:56 ` oreo639
2022-09-09  2:27 ` oreo639
2022-09-09  2:35 ` oreo639
2022-09-14 10:56 ` [PR PATCH] [Updated] " oreo639
2022-09-14 11:07 ` oreo639
2022-09-14 11:20 ` oreo639
2022-09-14 11:45 ` oreo639
2022-09-14 12:11 ` oreo639
2022-09-14 12:27 ` oreo639
2022-09-14 19:43 ` oreo639
2022-09-14 20:43 ` oreo639
2022-09-14 20:49 ` oreo639
2022-09-15  7:32 ` oreo639
2022-10-04  9:05 ` oreo639
2022-10-18  3:38 ` classabbyamp
2022-10-18  3:38 ` [PR PATCH] [Closed]: " classabbyamp
2022-10-18  4:17 ` oreo639
2022-10-18  4:19 ` classabbyamp
2022-10-18  4:21 ` [PR PATCH] [Updated] " oreo639
2022-10-18  4:21 ` oreo639
2022-10-18  4:22 ` [PR PATCH] [Updated] gpgme: fix returning incorrect error codes oreo639
2022-10-18  4:24 ` oreo639
2022-10-18  4:31 ` classabbyamp
2022-10-18  4:33 ` oreo639
2022-10-18  4:33 ` oreo639
2022-10-18  7:07 ` [PR PATCH] [Updated] " oreo639
2022-10-18  8:43 ` oreo639
2022-10-18  9:50 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).