diff options
author | Stig Palmquist <stig@stig.io> | 2022-01-11 13:44:56 +0100 |
---|---|---|
committer | Stig Palmquist <stig@stig.io> | 2022-01-11 14:47:18 +0100 |
commit | b0770408976ec309f70e19dd78599bf8f2ad7145 (patch) | |
tree | 5f5cbdaec894441a3c57aed52b69996314f47367 /pkgs/applications/networking/mailreaders | |
parent | 3ddd5f9d4536cbc45e09fff14613b31fccd3ae19 (diff) |
notmuch: fix test with gnupg 2.3
Diffstat (limited to 'pkgs/applications/networking/mailreaders')
-rw-r--r-- | pkgs/applications/networking/mailreaders/notmuch/default.nix | 5 | ||||
-rw-r--r-- | pkgs/applications/networking/mailreaders/notmuch/test-fix-support-for-gpgsm-in-gnupg-2.3.patch | 28 |
2 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix index 5641598ec37f9..dbbfddcb2c01a 100644 --- a/pkgs/applications/networking/mailreaders/notmuch/default.nix +++ b/pkgs/applications/networking/mailreaders/notmuch/default.nix @@ -18,6 +18,11 @@ stdenv.mkDerivation rec { sha256 = "wfLO7kf2iXESItcgWvKj/npKnYwy5OCyStZviN9qR9M="; }; + patches = [ + # https://nmbug.notmuchmail.org/nmweb/show/87o84iza9r.fsf%40starbuck.i-did-not-set--mail-host-address--so-tickle-me + ./test-fix-support-for-gpgsm-in-gnupg-2.3.patch + ]; + nativeBuildInputs = [ pkg-config doxygen # (optional) api docs diff --git a/pkgs/applications/networking/mailreaders/notmuch/test-fix-support-for-gpgsm-in-gnupg-2.3.patch b/pkgs/applications/networking/mailreaders/notmuch/test-fix-support-for-gpgsm-in-gnupg-2.3.patch new file mode 100644 index 0000000000000..91c77df70109b --- /dev/null +++ b/pkgs/applications/networking/mailreaders/notmuch/test-fix-support-for-gpgsm-in-gnupg-2.3.patch @@ -0,0 +1,28 @@ +From a642ad542e3d3f34e949c5c66923ca8a6e6cbbd8 Mon Sep 17 00:00:00 2001 +From: Stig Palmquist <stig@stig.io> +Date: Tue, 11 Jan 2022 13:23:13 +0100 +Subject: [PATCH] test: fix support for gpgsm in gnupg 2.3 + +gpgsm --list-keys output changed the label for fingerprints from +"fingerprint: " to "sha[12] fpr: " breaking tests with gnupg 2.3. this +adds support for both. +--- + test/test-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/test-lib.sh b/test/test-lib.sh +index 6bc0b723..3de608f9 100644 +--- a/test/test-lib.sh ++++ b/test/test-lib.sh +@@ -145,7 +145,7 @@ add_gpgsm_home () { + mkdir -p -m 0700 "$GNUPGHOME" + gpgsm --batch --no-tty --no-common-certs-import --pinentry-mode=loopback --passphrase-fd 3 \ + --disable-dirmngr --import >"$GNUPGHOME"/import.log 2>&1 3<<<'' <$NOTMUCH_SRCDIR/test/smime/0xE0972A47.p12 +- fpr=$(gpgsm --batch --list-key test_suite@notmuchmail.org | sed -n 's/.*fingerprint: //p') ++ fpr=$(gpgsm --batch --list-key test_suite@notmuchmail.org | sed -n 's/.*\(fingerprint\|sha1 fpr\): //p') + echo "$fpr S relax" >> "$GNUPGHOME/trustlist.txt" + gpgsm --quiet --batch --no-tty --no-common-certs-import --disable-dirmngr --import < $NOTMUCH_SRCDIR/test/smime/ca.crt + echo "4D:E0:FF:63:C0:E9:EC:01:29:11:C8:7A:EE:DA:3A:9A:7F:6E:C1:0D S" >> "$GNUPGHOME/trustlist.txt" +-- +2.34.1 + |