diff options
Diffstat (limited to 'app-crypt/gpgme/files')
-rw-r--r-- | app-crypt/gpgme/files/gpgme-1.18.0-tests-start-stop-agent-use-command-v.patch | 27 | ||||
-rw-r--r-- | app-crypt/gpgme/files/gpgme-1.23.1-tests-gnupg-no-tofu.patch | 26 |
2 files changed, 53 insertions, 0 deletions
diff --git a/app-crypt/gpgme/files/gpgme-1.18.0-tests-start-stop-agent-use-command-v.patch b/app-crypt/gpgme/files/gpgme-1.18.0-tests-start-stop-agent-use-command-v.patch new file mode 100644 index 000000000000..aeae35f45636 --- /dev/null +++ b/app-crypt/gpgme/files/gpgme-1.18.0-tests-start-stop-agent-use-command-v.patch @@ -0,0 +1,27 @@ +Sent upstream to gnupg-devel@ but not yet in archive. + +From: Sam James <sam@gentoo.org> +Date: Mon, 15 Aug 2022 19:29:06 +0100 +Subject: [PATCH] tests/start-stop-agent: use 'command -v' instead of 'which' + +`which` is an external command which isn't required by POSIX. + +Debian and other distributions (like Gentoo!) are looking +to drop it from their base set of packages. + +Switch to `command -v` which should always work instead. + +Note we already use `command -v` at the start of this test anyway. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/tests/start-stop-agent ++++ b/tests/start-stop-agent +@@ -15,7 +15,7 @@ fi + + GPG_AGENT_INFO= + export GPG_AGENT_INFO +-GPG_AGENT=$(which gpg-agent) ++GPG_AGENT=$(command -v gpg-agent) + + token=$(echo "gpgme-$(pwd)" | tr ' ' '_') + diff --git a/app-crypt/gpgme/files/gpgme-1.23.1-tests-gnupg-no-tofu.patch b/app-crypt/gpgme/files/gpgme-1.23.1-tests-gnupg-no-tofu.patch new file mode 100644 index 000000000000..831f68c8ea18 --- /dev/null +++ b/app-crypt/gpgme/files/gpgme-1.23.1-tests-gnupg-no-tofu.patch @@ -0,0 +1,26 @@ +https://dev.gnupg.org/T6778 +--- a/lang/python/tests/support.py ++++ b/lang/python/tests/support.py +@@ -46,13 +46,15 @@ def is_gpg_version(version): + + + def have_tofu_support(ctx, some_uid): +- keys = list( +- ctx.keylist( +- some_uid, +- mode=(gpg.constants.keylist.mode.LOCAL | +- gpg.constants.keylist.mode.WITH_TOFU))) +- return len(keys) > 0 +- ++ try: ++ keys = list( ++ ctx.keylist( ++ some_uid, ++ mode=(gpg.constants.keylist.mode.LOCAL | ++ gpg.constants.keylist.mode.WITH_TOFU))) ++ return len(keys) > 0 ++ except gpg.errors.GPGMEError: ++ return False + + # Skip the Python tests for GnuPG < 2.1.12. Prior versions do not + # understand the command line flags that we assume exist. C.f. issue |