Package: gnupg2 / 2.2.12-1+deb10u1

from-2.2.14/tests-Add-disable-scdaemon-in-gpg-agent.conf.patch Patch series | 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Thu, 21 Feb 2019 12:26:09 +0900
Subject: tests: Add "disable-scdaemon" in gpg-agent.conf.

* tests/openpgp/defs.scm: Add "disable-scdaemon".  Remove
  "scdaemon-program".
* tests/gpgme/gpgme-defs.scm, tests/gpgsm/gpgsm-defs.scm: Likewise.
* tests/inittests, tests/pkits/inittests: Add "disable-scdaemon"

--

Before this change, running "make check" accesses USB device by
scdaemon on host computer.  If there is any smartcard/token available,
it may affect test results.  Because default key choice depends on
smartcard/token availability now and existing tests have nothing about
testing smartcard/token, disabling scdaemon is good.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
(cherry picked from commit 64b7c6fd1945bc206cf56979633dfca8a7494374)
(cherry picked from commit 150d5452318eafa6aa800ff3b87f8f8eb35ed203)
---
 tests/gpgme/gpgme-defs.scm | 3 +--
 tests/gpgsm/gpgsm-defs.scm | 5 +----
 tests/inittests            | 1 +
 tests/openpgp/defs.scm     | 5 +----
 tests/pkits/inittests      | 1 +
 5 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/tests/gpgme/gpgme-defs.scm b/tests/gpgme/gpgme-defs.scm
index 0de589f..bc40b3c 100644
--- a/tests/gpgme/gpgme-defs.scm
+++ b/tests/gpgme/gpgme-defs.scm
@@ -67,8 +67,7 @@
   (create-file
    "gpg-agent.conf"
    (string-append "pinentry-program " (tool 'pinentry))
-   (string-append "scdaemon-program " (tool 'scdaemon))
-   )
+   "disable-scdaemon")
 
   (start-agent)
 
diff --git a/tests/gpgsm/gpgsm-defs.scm b/tests/gpgsm/gpgsm-defs.scm
index f118642..848bc75 100644
--- a/tests/gpgsm/gpgsm-defs.scm
+++ b/tests/gpgsm/gpgsm-defs.scm
@@ -67,10 +67,7 @@
 	       "faked-system-time 1008241200")
   (create-file "gpg-agent.conf"
 	       (string-append "pinentry-program " (tool 'pinentry))
-	       (if (assoc "scdaemon" gpg-components)
-		   (string-append "scdaemon-program " (tool 'scdaemon))
-		   "# No scdaemon available")
-	       )
+	       "disable-scdaemon")
   (start-agent)
   (create-file
    "trustlist.txt"
diff --git a/tests/inittests b/tests/inittests
index 6fbccfb..9090674 100755
--- a/tests/inittests
+++ b/tests/inittests
@@ -85,6 +85,7 @@ EOF
 cat > gpg-agent.conf <<EOF
 no-grab
 pinentry-program /home/wk/work/pinentry/gtk/pinentry-gtk
+disable-scdaemon
 EOF
 
 cat > trustlist.txt <<EOF
diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm
index 7e41d19..94c5beb 100644
--- a/tests/openpgp/defs.scm
+++ b/tests/openpgp/defs.scm
@@ -355,10 +355,7 @@
 	       (if (flag "--extended-key-format" *args*)
 		   "enable-extended-key-format" "#enable-extended-key-format")
 	       (string-append "pinentry-program " (tool 'pinentry))
-	       (if (assoc "scdaemon" gpg-components)
-		   (string-append "scdaemon-program " (tool 'scdaemon))
-		   "# No scdaemon available")
-	       ))
+	       "disable-scdaemon"))
 
 ;; Initialize the test environment, install appropriate configuration
 ;; and start the agent, without any keys.
diff --git a/tests/pkits/inittests b/tests/pkits/inittests
index 4bff0a8..deb1854 100755
--- a/tests/pkits/inittests
+++ b/tests/pkits/inittests
@@ -94,6 +94,7 @@ EOF
 # Fixme: we need to write a dummy pinentry program
 cat > gpg-agent.conf <<EOF
 no-grab
+disable-scdaemon
 EOF
 
 # Mark the root CA trusted