summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kundrát <jkt@gentoo.org>2017-02-13 13:04:12 +0100
committerMichael Palimaka <kensington@gentoo.org>2017-02-13 23:16:09 +1100
commit1b1b1915959ed5c90de477e4a3c277b7363c93b9 (patch)
tree2082434fbff16ee87624dc78d0262bb26c0c6f3b /mail-client
parentflag-o-matic.eclass: Mark has_m64() as dead. (diff)
downloadgentoo-1b1b1915959ed5c90de477e4a3c277b7363c93b9.tar.gz
gentoo-1b1b1915959ed5c90de477e4a3c277b7363c93b9.tar.bz2
gentoo-1b1b1915959ed5c90de477e4a3c277b7363c93b9.zip
mail-client/trojita: Fix build aginst new `gpg`
Patch is already upstream. Gentoo-Bug: 605824
Diffstat (limited to 'mail-client')
-rw-r--r--mail-client/trojita/files/trojita-0.7-gpg-tests.patch27
-rw-r--r--mail-client/trojita/trojita-0.7-r2.ebuild5
2 files changed, 31 insertions, 1 deletions
diff --git a/mail-client/trojita/files/trojita-0.7-gpg-tests.patch b/mail-client/trojita/files/trojita-0.7-gpg-tests.patch
new file mode 100644
index 00000000000..db41ee577e8
--- /dev/null
+++ b/mail-client/trojita/files/trojita-0.7-gpg-tests.patch
@@ -0,0 +1,27 @@
+commit be8fd5831afa0a04f14cd6206e6576f03ee59558
+Author: Amaury Pouly <amaury.pouly@gmail.com>
+Date: Sat Sep 17 16:40:46 2016 +0100
+
+ Fix GPG test
+
+ At least GnuPG, when run with both --fingerprint and --with-colons will output
+ the fingerprint of the public key and the subkey. The command below will thus
+ output two fingerprints and the delete command will fail because it cannot
+ find the second fingerprint (which is a subkey and not a public key). It seems
+ that a safe approach is to consider only the first fingerprint line.
+
+ Change-Id: I4c6aa79e4473bca146aa087728a5652d91586a81
+
+diff --git a/tests/Cryptography/keygen.sh b/tests/Cryptography/keygen.sh
+index c94c0ab..98c69ca 100755
+--- a/tests/Cryptography/keygen.sh
++++ b/tests/Cryptography/keygen.sh
+@@ -115,7 +115,7 @@ $TAIL" > crypto_test_data.h
+ echo -n "key *\nexpire\nseconds=1\nsave\n" | ${GPG} --no-tty --quiet --command-fd 0 --edit-key "expired@test.trojita.flaska.net"
+
+ # extract fingerprint of key to be deleted
+-FINGERPRINT="$(${GPG} --quiet --no-tty --list-keys --with-colons --fingerprint unknown@test.trojita.flaska.net | grep fpr | cut -d : -f 10)"
++FINGERPRINT="$(${GPG} --quiet --no-tty --list-keys --with-colons --fingerprint unknown@test.trojita.flaska.net | grep fpr | head -n 1 | cut -d : -f 10)"
+
+ # delete key
+ yes | DISPLAY="" ${GPG} --quiet --batch --no-tty --delete-secret-and-public-key --yes --command-fd 0 --passphrase-fd 0 "${FINGERPRINT}"
diff --git a/mail-client/trojita/trojita-0.7-r2.ebuild b/mail-client/trojita/trojita-0.7-r2.ebuild
index 308c9fd73e2..8f2c535eef9 100644
--- a/mail-client/trojita/trojita-0.7-r2.ebuild
+++ b/mail-client/trojita/trojita-0.7-r2.ebuild
@@ -43,7 +43,10 @@ DEPEND="${RDEPEND}
DOCS=( README LICENSE )
-PATCHES=( "${FILESDIR}/${P}-gpgme.patch" )
+PATCHES=(
+ "${FILESDIR}/${P}-gpgme.patch"
+ "${FILESDIR}/${P}-gpg-tests.patch"
+ )
src_prepare() {
cmake-utils_src_prepare