blob: a1f00acb56beb5f43552fda2e4ee790904d71795 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Date: Fri, 10 May 2024 15:56:16 -0400
Subject: Relax GnuPG version parsing
The sequoia implementation of the /usr/bin/gpg interface (gpg-sq)
doesn't use a literal "(GnuPG)" in the version string.
Avoid spurious test failures like https://bugs.debian.org/1070866 when
gpg-from-sq is installed.
---
src/tests/cli_tests.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tests/cli_tests.py b/src/tests/cli_tests.py
index 5a414a2..f0e8749 100755
--- a/src/tests/cli_tests.py
+++ b/src/tests/cli_tests.py
@@ -840,7 +840,7 @@ def gpg_check_features():
GPG_AEAD_EAX = re.match(r'(?s)^.*AEAD:.*EAX.*', out) is not None
GPG_AEAD_OCB = re.match(r'(?s)^.*AEAD:.*OCB.*', out) is not None
# Version 2.3.0-beta1598 and up drops support of 64-bit block algos
- match = re.match(r'(?s)^.*gpg \(GnuPG\) (\d+)\.(\d+)\.(\d+)(-beta(\d+))?.*$', out)
+ match = re.match(r'(?s)^.*gpg \(GnuPG[^\)]*\) (\d+)\.(\d+)\.(\d+)(-beta(\d+))?.*$', out)
if not match:
raise_err('Failed to parse GnuPG version.')
ver = [int(match.group(1)), int(match.group(2)), int(match.group(3))]
|