[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / 3e / c33a2e175e93a79d7b2dc7de7521bdc2d647de
1 Return-Path: <dkg@fifthhorseman.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id B53966DE02D9\r
6  for <notmuch@notmuchmail.org>; Fri,  8 Jul 2016 03:13:49 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.06\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.06 tagged_above=-999 required=5 tests=[AWL=0.060]\r
12  autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id jw1BAxRuWCC6 for <notmuch@notmuchmail.org>;\r
16  Fri,  8 Jul 2016 03:13:41 -0700 (PDT)\r
17 Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118])\r
18  by arlo.cworth.org (Postfix) with ESMTP id 4EE826DE0350\r
19  for <notmuch@notmuchmail.org>; Fri,  8 Jul 2016 03:13:12 -0700 (PDT)\r
20 Received: from fifthhorseman.net (unknown [88.128.80.54])\r
21  by che.mayfirst.org (Postfix) with ESMTPSA id 82B97F99A\r
22  for <notmuch@notmuchmail.org>; Fri,  8 Jul 2016 06:13:11 -0400 (EDT)\r
23 Received: by fifthhorseman.net (Postfix, from userid 1000)\r
24  id 9EF4A211C9; Fri,  8 Jul 2016 11:27:34 +0200 (CEST)\r
25 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
26 To: Notmuch Mail <notmuch@notmuchmail.org>\r
27 Subject: [PATCH v4 06/16] Prefer gpg2 in the test suite if available\r
28 Date: Fri,  8 Jul 2016 11:27:17 +0200\r
29 Message-Id: <1467970047-8013-7-git-send-email-dkg@fifthhorseman.net>\r
30 X-Mailer: git-send-email 2.8.1\r
31 In-Reply-To: <1467970047-8013-1-git-send-email-dkg@fifthhorseman.net>\r
32 References: <1467970047-8013-1-git-send-email-dkg@fifthhorseman.net>\r
33 X-BeenThere: notmuch@notmuchmail.org\r
34 X-Mailman-Version: 2.1.20\r
35 Precedence: list\r
36 List-Id: "Use and development of the notmuch mail system."\r
37  <notmuch.notmuchmail.org>\r
38 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
39  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
41 List-Post: <mailto:notmuch@notmuchmail.org>\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
43 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
44  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
45 X-List-Received-Date: Fri, 08 Jul 2016 10:13:49 -0000\r
46 \r
47 Now that the notmuch client prefers gpg2 if available, having the test\r
48 suite use the same preference makes it more likely to validate as\r
49 expected.\r
50 \r
51 Be warned that the final test in T350-crypto.sh fails with an infinite\r
52 loop in gpg if you're using an unpatched GnuPG 2.1.10, due to an\r
53 upstream GnuPG bug: https://bugs.gnupg.org/gnupg/issue2187.  In\r
54 debian, this is resolved in 2.1.10-3\r
55 ---\r
56  test/README         |  2 +-\r
57  test/T030-config.sh |  2 +-\r
58  test/T040-setup.sh  |  2 +-\r
59  test/T350-crypto.sh | 16 ++++++++--------\r
60  test/test-lib.sh    | 10 +++++++++-\r
61  5 files changed, 20 insertions(+), 12 deletions(-)\r
62 \r
63 diff --git a/test/README b/test/README\r
64 index 104a120..b4489da 100644\r
65 --- a/test/README\r
66 +++ b/test/README\r
67 @@ -23,7 +23,7 @@ that you know if you break anything.\r
68    - emacs(1)\r
69    - emacsclient(1)\r
70    - gdb(1)\r
71 -  - gpg(1)\r
72 +  - gpg(1) or gpg2(1)\r
73    - python(1)\r
74  \r
75  If your system lacks these tools or have older, non-upgreable versions\r
76 diff --git a/test/T030-config.sh b/test/T030-config.sh\r
77 index 0915abd..9eb9294 100755\r
78 --- a/test/T030-config.sh\r
79 +++ b/test/T030-config.sh\r
80 @@ -54,7 +54,7 @@ new.tags=unread;inbox;\r
81  new.ignore=\r
82  search.exclude_tags=\r
83  maildir.synchronize_flags=true\r
84 -crypto.gpg_path=gpg\r
85 +crypto.gpg_path=$GPG\r
86  foo.string=this is another string value\r
87  foo.list=this;is another;list value;\r
88  built_with.compact=something\r
89 diff --git a/test/T040-setup.sh b/test/T040-setup.sh\r
90 index 021f2d0..afc7bc0 100755\r
91 --- a/test/T040-setup.sh\r
92 +++ b/test/T040-setup.sh\r
93 @@ -29,7 +29,7 @@ new.tags=foo;bar;\r
94  new.ignore=\r
95  search.exclude_tags=baz;\r
96  maildir.synchronize_flags=true\r
97 -crypto.gpg_path=gpg\r
98 +crypto.gpg_path=$GPG\r
99  built_with.compact=something\r
100  built_with.field_processor=something\r
101  built_with.retry_lock=something"\r
102 diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh\r
103 index 3656cce..4bc15bc 100755\r
104 --- a/test/T350-crypto.sh\r
105 +++ b/test/T350-crypto.sh\r
106 @@ -12,11 +12,11 @@ add_gnupg_home ()\r
107      local output\r
108      [ -d ${GNUPGHOME} ] && return\r
109      mkdir -m 0700 "$GNUPGHOME"\r
110 -    gpg --no-tty --import <$TEST_DIRECTORY/gnupg-secret-key.asc >"$GNUPGHOME"/import.log 2>&1\r
111 +    $GPG --no-tty --import <$TEST_DIRECTORY/gnupg-secret-key.asc >"$GNUPGHOME"/import.log 2>&1\r
112      test_debug "cat $GNUPGHOME/import.log"\r
113 -    if (gpg --quick-random --version >/dev/null 2>&1) ; then\r
114 +    if ($GPG --quick-random --version >/dev/null 2>&1) ; then\r
115         echo quick-random >> "$GNUPGHOME"/gpg.conf\r
116 -    elif (gpg --debug-quick-random --version >/dev/null 2>&1) ; then\r
117 +    elif ($GPG --debug-quick-random --version >/dev/null 2>&1) ; then\r
118         echo debug-quick-random >> "$GNUPGHOME"/gpg.conf\r
119      fi\r
120      echo no-emit-version >> "$GNUPGHOME"/gpg.conf\r
121 @@ -26,7 +26,7 @@ add_gnupg_home ()\r
122  \r
123  add_gnupg_home\r
124  # get key fingerprint\r
125 -FINGERPRINT=$(gpg --no-tty --list-secret-keys --with-colons --fingerprint | grep '^fpr:' | cut -d: -f10)\r
126 +FINGERPRINT=$($GPG --no-tty --list-secret-keys --with-colons --fingerprint | grep '^fpr:' | cut -d: -f10)\r
127  \r
128  test_expect_success 'emacs delivery of signed message' \\r
129  'emacs_fcc_message \\r
130 @@ -67,8 +67,8 @@ test_expect_equal_json \\r
131  \r
132  test_begin_subtest "signature verification with full owner trust"\r
133  # give the key full owner trust\r
134 -echo "${FINGERPRINT}:6:" | gpg --no-tty --import-ownertrust >>"$GNUPGHOME"/trust.log 2>&1\r
135 -gpg --no-tty --check-trustdb >>"$GNUPGHOME"/trust.log 2>&1\r
136 +echo "${FINGERPRINT}:6:" | $GPG --no-tty --import-ownertrust >>"$GNUPGHOME"/trust.log 2>&1\r
137 +$GPG --no-tty --check-trustdb >>"$GNUPGHOME"/trust.log 2>&1\r
138  output=$(notmuch show --format=json --verify subject:"test signed message 001" \\r
139      | notmuch_json_show_sanitize \\r
140      | sed -e 's|"created": [1234567890]*|"created": 946728000|')\r
141 @@ -325,8 +325,8 @@ Notmuch Test Suite key revocation (automated) $(date '+%F_%T%z')\r
142  y\r
143  \r
144  " \\r
145 -    | gpg --no-tty --quiet --command-fd 0 --armor --gen-revoke "0x${FINGERPRINT}!" 2>/dev/null \\r
146 -    | gpg --no-tty --quiet --import\r
147 +    | $GPG --no-tty --quiet --command-fd 0 --armor --gen-revoke "0x${FINGERPRINT}!" 2>/dev/null \\r
148 +    | $GPG --no-tty --quiet --import\r
149  output=$(notmuch show --format=json --verify subject:"test signed message 001" \\r
150      | notmuch_json_show_sanitize \\r
151      | sed -e 's|"created": [1234567890]*|"created": 946728000|')\r
152 diff --git a/test/test-lib.sh b/test/test-lib.sh\r
153 index aac0343..5c14d1e 100644\r
154 --- a/test/test-lib.sh\r
155 +++ b/test/test-lib.sh\r
156 @@ -86,6 +86,13 @@ unset GREP_OPTIONS\r
157  # For emacsclient\r
158  unset ALTERNATE_EDITOR\r
159  \r
160 +# choose the preferred GnuPG binary:\r
161 +if command -v gpg2 > /dev/null; then\r
162 +    GPG=gpg2\r
163 +else\r
164 +    GPG=gpg\r
165 +fi\r
166 +\r
167  # Convenience\r
168  #\r
169  # A regexp to match 5 and 40 hexdigits\r
170 @@ -1172,6 +1179,7 @@ test_emacs () {\r
171                                 $load_emacs_tests \\r
172                                 --eval '(setq server-name \"$server_name\")' \\r
173                                 --eval '(server-start)' \\r
174 +                               --eval '(setq epg-gpg-program \"$GPG\")' \\r
175                                 --eval '(orphan-watchdog $$)'" || return\r
176                 EMACS_SERVER="$server_name"\r
177                 # wait until the emacs server is up\r
178 @@ -1368,7 +1376,7 @@ test_declare_external_prereq dtach\r
179  test_declare_external_prereq emacs\r
180  test_declare_external_prereq ${TEST_EMACSCLIENT}\r
181  test_declare_external_prereq gdb\r
182 -test_declare_external_prereq gpg\r
183 +test_declare_external_prereq gpg2 || test_declare_external_prereq gpg\r
184  test_declare_external_prereq openssl\r
185  test_declare_external_prereq gpgsm\r
186  test_declare_external_prereq ${NOTMUCH_PYTHON}\r
187 -- \r
188 2.8.1\r
189 \r