1 |
commit: 1b1b1915959ed5c90de477e4a3c277b7363c93b9 |
2 |
Author: Jan Kundrát <jkt <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 13 12:04:12 2017 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 13 12:16:09 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b1b1915 |
7 |
|
8 |
mail-client/trojita: Fix build aginst new `gpg` |
9 |
|
10 |
Patch is already upstream. |
11 |
|
12 |
Gentoo-Bug: 605824 |
13 |
|
14 |
.../trojita/files/trojita-0.7-gpg-tests.patch | 27 ++++++++++++++++++++++ |
15 |
mail-client/trojita/trojita-0.7-r2.ebuild | 5 +++- |
16 |
2 files changed, 31 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/mail-client/trojita/files/trojita-0.7-gpg-tests.patch b/mail-client/trojita/files/trojita-0.7-gpg-tests.patch |
19 |
new file mode 100644 |
20 |
index 0000000000..db41ee577e |
21 |
--- /dev/null |
22 |
+++ b/mail-client/trojita/files/trojita-0.7-gpg-tests.patch |
23 |
@@ -0,0 +1,27 @@ |
24 |
+commit be8fd5831afa0a04f14cd6206e6576f03ee59558 |
25 |
+Author: Amaury Pouly <amaury.pouly@×××××.com> |
26 |
+Date: Sat Sep 17 16:40:46 2016 +0100 |
27 |
+ |
28 |
+ Fix GPG test |
29 |
+ |
30 |
+ At least GnuPG, when run with both --fingerprint and --with-colons will output |
31 |
+ the fingerprint of the public key and the subkey. The command below will thus |
32 |
+ output two fingerprints and the delete command will fail because it cannot |
33 |
+ find the second fingerprint (which is a subkey and not a public key). It seems |
34 |
+ that a safe approach is to consider only the first fingerprint line. |
35 |
+ |
36 |
+ Change-Id: I4c6aa79e4473bca146aa087728a5652d91586a81 |
37 |
+ |
38 |
+diff --git a/tests/Cryptography/keygen.sh b/tests/Cryptography/keygen.sh |
39 |
+index c94c0ab..98c69ca 100755 |
40 |
+--- a/tests/Cryptography/keygen.sh |
41 |
++++ b/tests/Cryptography/keygen.sh |
42 |
+@@ -115,7 +115,7 @@ $TAIL" > crypto_test_data.h |
43 |
+ echo -n "key *\nexpire\nseconds=1\nsave\n" | ${GPG} --no-tty --quiet --command-fd 0 --edit-key "expired@×××××××××××××××××××.net" |
44 |
+ |
45 |
+ # extract fingerprint of key to be deleted |
46 |
+-FINGERPRINT="$(${GPG} --quiet --no-tty --list-keys --with-colons --fingerprint unknown@×××××××××××××××××××.net | grep fpr | cut -d : -f 10)" |
47 |
++FINGERPRINT="$(${GPG} --quiet --no-tty --list-keys --with-colons --fingerprint unknown@×××××××××××××××××××.net | grep fpr | head -n 1 | cut -d : -f 10)" |
48 |
+ |
49 |
+ # delete key |
50 |
+ yes | DISPLAY="" ${GPG} --quiet --batch --no-tty --delete-secret-and-public-key --yes --command-fd 0 --passphrase-fd 0 "${FINGERPRINT}" |
51 |
|
52 |
diff --git a/mail-client/trojita/trojita-0.7-r2.ebuild b/mail-client/trojita/trojita-0.7-r2.ebuild |
53 |
index 308c9fd73e..8f2c535eef 100644 |
54 |
--- a/mail-client/trojita/trojita-0.7-r2.ebuild |
55 |
+++ b/mail-client/trojita/trojita-0.7-r2.ebuild |
56 |
@@ -43,7 +43,10 @@ DEPEND="${RDEPEND} |
57 |
|
58 |
DOCS=( README LICENSE ) |
59 |
|
60 |
-PATCHES=( "${FILESDIR}/${P}-gpgme.patch" ) |
61 |
+PATCHES=( |
62 |
+ "${FILESDIR}/${P}-gpgme.patch" |
63 |
+ "${FILESDIR}/${P}-gpg-tests.patch" |
64 |
+ ) |
65 |
|
66 |
src_prepare() { |
67 |
cmake-utils_src_prepare |