File: 0002-Relax-GnuPG-version-parsing.patch

package info (click to toggle)
rnp 0.18.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 16,472 kB
  • sloc: cpp: 74,609; python: 5,205; ansic: 5,035; sh: 1,651; makefile: 25
file content (26 lines) | stat: -rw-r--r-- 1,165 bytes parent folder | download
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 9ffdef5..f3ff7e8 100755
--- a/src/tests/cli_tests.py
+++ b/src/tests/cli_tests.py
@@ -860,7 +860,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))]