gnupg <!nocheck>,
bash-completion (>=1.9.0~),
texinfo
-Standards-Version: 4.1.3
+Standards-Version: 4.3.0
Homepage: https://notmuchmail.org/
Vcs-Git: https://git.notmuchmail.org/git/notmuch -b release
Vcs-Browser: https://git.notmuchmail.org/git/notmuch
Architecture: all
Section: python
Depends: ${misc:Depends}, ${python:Depends}, libnotmuch5 (>= ${source:Version})
+Provides: ${python:Provides}
+XB-Python-Version: ${python:Versions}
Description: Python interface to the notmuch mail search and index library
Notmuch is a system for indexing, searching, reading, and tagging
large collections of email messages in maildir or mh format. It uses
notmuch (>= 0.4),
libmail-box-perl, libmailtools-perl,
libstring-shellquote-perl, libterm-readline-gnu-perl,
- ${misc:Depends}
+ ${misc:Depends},
+ ${perl:Depends},
Recommends: mutt
Enhances: notmuch, mutt
Description: thread-based email index, search and tagging (Mutt interface)
python3_all = py3versions -s | xargs -n1 | xargs -t -I {} env {}
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
%:
dh $@ --with python2,python3,elpa
return false;
if (! messages->is_of_list_type)
- INTERNAL_ERROR("_notmuch_messages_has_next not implimented for msets");
+ INTERNAL_ERROR("_notmuch_messages_has_next not implemented for msets");
return (messages->iterator->next != NULL);
}
#include "talloc-extra.h"
#include "crypto.h"
-#define unused(x) x __attribute__ ((unused))
+#define unused(x) x ## _unused __attribute__ ((unused))
#define STRINGIFY(s) STRINGIFY_(s)
#define STRINGIFY_(s) #s
int
notmuch_setup_command (notmuch_config_t *config,
- unused (int argc), unused (char *argv[]))
+ int argc, char *argv[])
{
char *response = NULL;
size_t response_size = 0;
*/
static int
notmuch_command (notmuch_config_t *config,
- unused(int argc), unused(char *argv[]))
+ unused(int argc), unused(char **argv))
{
char *db_path;
struct stat st;
-#!/bin/bash
+#!/usr/bin/env bash
test_description='notmuch new'
-#!/bin/bash
+#!/usr/bin/env bash
test_description='dump and restore'
-#!/bin/bash
+#!/usr/bin/env bash
test_description='show'
-#!/bin/bash
+#!/usr/bin/env bash
test_description='search'
-#!/bin/bash
+#!/usr/bin/env bash
test_description='search'
-#!/bin/bash
+#!/usr/bin/env bash
test_description='reindex'
-#!/bin/bash
+#!/usr/bin/env bash
test_description='search'
-#!/bin/bash
+#!/usr/bin/env bash
test_description='notmuch new'
-#!/bin/bash
+#!/usr/bin/env bash
test_description='dump and restore'
-#!/bin/bash
+#!/usr/bin/env bash
test_description='tagging'
-#!/bin/bash
+#!/usr/bin/env bash
test_description='reindexing'
-#!/bin/bash
+#!/usr/bin/env bash
test_description='thread subqueries'
expected='#= simple-encrypted@crypto.notmuchmail.org index.decryption=failure
#notmuch-dump batch-tag:3 config,properties,tags
+encrypted +inbox +unread -- id:basic-encrypted@crypto.notmuchmail.org
++encrypted +inbox +unread -- id:encrypted-signed@crypto.notmuchmail.org
+encrypted +inbox +unread -- id:simple-encrypted@crypto.notmuchmail.org'
test_expect_equal \
"$output" \
"$output" \
"$expected"
+goodsig='good_sig:[0][0][0]["crypto"]["signed"]["status"][0]["status"]="good"'
+nosig='no_sig:[0][0][0]["crypto"]!"signed"'
+
+test_begin_subtest "verify signature without a session key stashed when --decrypt=true"
+output=$(notmuch show --format=json --decrypt=true id:encrypted-signed@crypto.notmuchmail.org)
+test_json_nodes <<<"$output" "$goodsig"
+
+test_begin_subtest "do not verify sig without a session key stashed if --decrypt=auto"
+output=$(notmuch show --format=json id:encrypted-signed@crypto.notmuchmail.org)
+test_json_nodes <<<"$output" "$nosig"
+
+test_begin_subtest "verify signature when --decrypt=stash"
+output=$(notmuch show --format=json --decrypt=stash id:encrypted-signed@crypto.notmuchmail.org)
+test_json_nodes <<<"$output" "$goodsig"
+
+test_begin_subtest "verify signature with stashed session key"
+output=$(notmuch show --format=json id:encrypted-signed@crypto.notmuchmail.org)
+test_json_nodes <<<"$output" "$goodsig"
# TODO: test removal of a message from the message store between
# indexing and reindexing.
while read type value
do
case $type in
- '')
- continue ;;
fixed)
- fixed=$(($fixed + $value)) ;;
+ fixed=$((fixed + value)) ;;
success)
- success=$(($success + $value)) ;;
+ success=$((success + value)) ;;
failed)
- failed=$(($failed + $value)) ;;
+ failed=$((failed + value)) ;;
broken)
- broken=$(($broken + $value)) ;;
+ broken=$((broken + value)) ;;
total)
- total=$(($total + $value)) ;;
+ total=$((total + value)) ;;
esac
done <"$file"
done
-pluralize () {
- case $2 in
- 1)
- case $1 in
- test)
- echo test ;;
- failure)
- echo failure ;;
- esac
- ;;
- *)
- case $1 in
- test)
- echo tests ;;
- failure)
- echo failures ;;
- esac
- ;;
- esac
-}
+pluralize_s () { [ "$1" -eq 1 ] && s='' || s='s'; }
echo "Notmuch test suite complete."
-if [ "$fixed" = "0" ] && [ "$failed" = "0" ]; then
- tests=$(pluralize "test" $total)
- printf "All $total $tests "
- if [ "$broken" = "0" ]; then
- echo "passed."
- else
- failures=$(pluralize "failure" $broken)
- echo "behaved as expected ($broken expected $failures)."
- fi;
+
+if [ "$fixed" -eq 0 ] && [ "$failed" -eq 0 ]; then
+ pluralize_s "$total"
+ printf "All $total test$s "
+ if [ "$broken" -eq 0 ]; then
+ echo "passed."
+ else
+ pluralize_s "$broken"
+ echo "behaved as expected ($broken expected failure$s)."
+ fi
else
- echo "$success/$total tests passed."
- if [ "$broken" != "0" ]; then
- tests=$(pluralize "test" $broken)
- echo "$broken broken $tests failed as expected."
- fi
- if [ "$fixed" != "0" ]; then
- tests=$(pluralize "test" $fixed)
- echo "$fixed broken $tests now fixed."
- fi
- if [ "$failed" != "0" ]; then
- tests=$(pluralize "test" $failed)
- echo "$failed $tests failed."
- fi
+ echo "$success/$total tests passed."
+ if [ "$broken" -ne 0 ]; then
+ pluralize_s "$broken"
+ echo "$broken broken test$s failed as expected."
+ fi
+ if [ "$fixed" -ne 0 ]; then
+ pluralize_s "$fixed"
+ echo "$fixed broken test$s now fixed."
+ fi
+ if [ "$failed" -ne 0 ]; then
+ pluralize_s "$failed"
+ echo "$failed test$s failed."
+ fi
fi
-skipped=$(($total - $fixed - $success - $failed - $broken))
-if [ "$skipped" != "0" ]; then
- tests=$(pluralize "test" $skipped)
- echo "$skipped $tests skipped."
+skipped=$((total - fixed - success - failed - broken))
+if [ "$skipped" -ne 0 ]; then
+ pluralize_s "$skipped"
+ echo "$skipped test$s skipped."
fi
# Note that we currently do not consider skipped tests as failing the
# build.
-if [ $success -gt 0 -a $fixed -eq 0 -a $failed -eq 0 ]
+if [ "$success" -gt 0 ] && [ "$fixed" -eq 0 ] && [ "$failed" -eq 0 ]
then
- exit 0
+ exit 0
else
- exit 1
+ exit 1
fi
--- /dev/null
+From: test_suite@notmuchmail.org
+To: test_suite@notmuchmail.org
+Subject: Lyrics
+Date: Wed 29 May 2019 06:09:22 PM EDT
+Message-ID: <encrypted-signed@crypto.notmuchmail.org>
+MIME-Version: 1.0
+Content-Type: multipart/encrypted; boundary="=-=-=";
+ protocol="application/pgp-encrypted"
+
+--=-=-=
+Content-Type: application/pgp-encrypted
+
+Version: 1
+
+--=-=-=
+Content-Type: application/octet-stream
+
+-----BEGIN PGP MESSAGE-----
+
+hIwDxE023q1UqxYBBAC9z781zV7QAInGMKHX6TKU5Xw/OkoWXahpDL88F6Ocm5R9
+7M9z2ocvlyrbgRhqE+nvFeGH/K7rVkBBT6TAcdIe/C8Qzbd3stPPcx1PlunGROj7
+H/WAcmDksK3HkXpHwmInUtzNw1pkhOoLy/sFSbPvtyg8GCUzXbafHAIIo0rB2tLB
+DwGWD3l4WdcyQWuYD9QJKuDIqdWo8E3TTcKkiOAt/6liwPNZ0jGzDeCuSTnWFj6Z
+AiXGeNtD3I1tCN/8T3NjEKOCQ+bdT5Y06dDaL61FpQ23eIuSUgksVxjnkEAb6iPe
+07gjzcyNuGP3WPI/0qu0wtZwpAQxvaNygDsQj/OjR5kn9luBd/VqodM3TWWS8miV
+m0z1tYbqYAQWW6TS7fXlsyXoOxTLW5MCfe3D36VSErL/NJItETklVKzNfKjMmRKx
+CI2ZUzugxPWSLQzOp5yl7iICk8e+vS9TkQw2j0nXAQYLYgmqZMhf4av5GlFv3tQu
+heO4XLT6NBDTHMFTDbgW42kE0N4MDPc29AqVFGImcTHvflF4Vp0qIbSJdIcHwKkU
+5LKqvicAa0lsIoJbsW3lHrzowyjov2vLH/VGd/wIX+MS3KT7cySdyp8HVMcwwyZu
+Y9nrTN/7G1FwKWlcGa4uJNcFFkYlcEymZj1EX2cyrdezPtX7K5vhwBYddptFD+Bn
+IVkghRut3UDeXe83F8OutWiZfK5EVYABq/aP3//hIbQl2o4Dkd3z9m+8LobrIV5s
+NXjAjU5WQOjRLoHBebG2HkMpFsWhXD/Fb/Bb58VOpdI=
+=x12v
+-----END PGP MESSAGE-----
+--=-=-=--