[PATCH 2/3] test: named query tests are broken when missing Xapian FieldProcessor
Named queries don't work without Xapian FieldProcessor. Rather than silently skipping them, we should explictly mark them as broken when building against an older version of Xapian. --- test/T600-named-queries.sh | 33 - 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/test/T600-named-queries.sh b/test/T600-named-queries.sh index 59496c3e..e38dc5bb 100755 --- a/test/T600-named-queries.sh +++ b/test/T600-named-queries.sh @@ -50,21 +50,28 @@ notmuch restore < BEFORE notmuch dump | grep '^#@' > OUTPUT test_expect_equal_file QUERIES.BEFORE OUTPUT -if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -eq 1 ]; then -test_begin_subtest "search named query" -notmuch search query:test > OUTPUT -notmuch search $QUERYSTR > EXPECTED -test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "search named query" +notmuch search query:test > OUTPUT +notmuch search $QUERYSTR > EXPECTED +if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -ne 1 ]; then +test_subtest_known_broken +fi +test_expect_equal_file EXPECTED OUTPUT -test_begin_subtest "search named query with other terms" -notmuch search query:test and subject:Maildir > OUTPUT -notmuch search $QUERYSTR and subject:Maildir > EXPECTED -test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "search named query with other terms" +notmuch search query:test and subject:Maildir > OUTPUT +notmuch search $QUERYSTR and subject:Maildir > EXPECTED +if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -ne 1 ]; then +test_subtest_known_broken +fi +test_expect_equal_file EXPECTED OUTPUT -test_begin_subtest "search nested named query" -notmuch search query:test2 > OUTPUT -notmuch search $QUERYSTR2 > EXPECTED -test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "search nested named query" +notmuch search query:test2 > OUTPUT +notmuch search $QUERYSTR2 > EXPECTED +if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -ne 1 ]; then +test_subtest_known_broken fi +test_expect_equal_file EXPECTED OUTPUT test_done -- 2.15.0 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
[PATCH 3/3] test: retrying lock tests are broken when built against older Xapian
If we're building against a version of Xapian that doesn't offer retrying the lock, we should be honest and describe the tests as broken, rather than marking them as missing a test prerequisite. missing test prerequisites should be for specific components of the test harness that are missing, not for the backend library notmuch uses. --- test/T620-lock.sh | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/T620-lock.sh b/test/T620-lock.sh index 085ffe43..7aaaff2a 100755 --- a/test/T620-lock.sh +++ b/test/T620-lock.sh @@ -2,13 +2,12 @@ test_description="locking" . $(dirname "$0")/test-lib.sh || exit 1 -if [ "${NOTMUCH_HAVE_XAPIAN_DB_RETRY_LOCK}" = "0" ]; then -test_subtest_missing_external_prereq_["lock retry support"]=t -fi - add_email_corpus test_begin_subtest "blocking open" +if [ $NOTMUCH_HAVE_XAPIAN_DB_RETRY_LOCK -ne 1 ]; then +test_subtest_known_broken +fi test_C ${MAIL_DIR} <<'EOF' #include #include @@ -70,6 +69,9 @@ inbox parent unread EOF +if [ $NOTMUCH_HAVE_XAPIAN_DB_RETRY_LOCK -ne 1 ]; then +test_subtest_known_broken +fi test_expect_equal_file EXPECTED OUTPUT test_done -- 2.15.0 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
be more honest about test suite failures due to old libraries
We have several places where tests are skipped or marked as though some test suite prereqs are missing, but in fact are due to building against older versions of libraries that don't support certain features. This series tries to be more honest about some of those tests by marking them as broken, rather than just skipping them. The series still doesn't address T650-regexp-query.sh, which is basically entirely skipped if Xapian doesn't have a field processor, rather than marked as broken. But it's still an improvement in overall test suite honesty over the status quo. ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
[PATCH 1/3] test: searching by absolute date is broken without Xapian FieldProcessor
Previously, the test suite had simply silently skipped the absolute date test if we're using an archaic version of Xapian. For correctness, we should instead mark the test as broken. This also changes from string to numeric comparison when checking NOMTUCH_HAVE_XAPIAN_FIELD_PROCESSOR for consistency with other tests. --- test/T500-search-date.sh | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/T500-search-date.sh b/test/T500-search-date.sh index 5c5b99a0..f84b0962 100755 --- a/test/T500-search-date.sh +++ b/test/T500-search-date.sh @@ -12,11 +12,12 @@ test_begin_subtest "Absolute date range with 'same' operator" output=$(notmuch search date:2010-12-16..! | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2010-12-16 [1/1] Olivier Berger; Essai accentué (inbox unread)" -if [ "${NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR}" = "1" ]; then -test_begin_subtest "Absolute date field" -output=$(notmuch search date:2010-12-16 | notmuch_search_sanitize) -test_expect_equal "$output" "thread:XXX 2010-12-16 [1/1] Olivier Berger; Essai accentué (inbox unread)" +test_begin_subtest "Absolute date field" +output=$(notmuch search date:2010-12-16 | notmuch_search_sanitize) +if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -ne 1 ]; then +test_subtest_known_broken fi +test_expect_equal "$output" "thread:XXX 2010-12-16 [1/1] Olivier Berger; Essai accentué (inbox unread)" test_begin_subtest "Absolute time range with TZ" notmuch search date:18-Nov-2009_02:19:26-0800..2009-11-18_04:49:52-06:00 | notmuch_search_sanitize > OUTPUT -- 2.15.0 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH v2 06/21] crypto: Test restore of cleartext index from stashed session keys
On Mon 2017-12-04 21:59:18 -0400, David Bremner wrote: > Pushed patches 1 to 6. I seem to recall 7 and 8 basically adressed > concerns/suggestions Jamie had, so I'm hoping he can have a quick look > at those. to be fair, i thought Jamie's concerns were correct -- the normalized interface is better. i was only a bit leery about the change introducing an extra delay. But Jamie's concerns were also corroborated by id:87r2szgvik@tethera.net -- maybe you could ask the author of that message to review? :P I think Jamie is currently slammed by non-notmuch work, unfortunately. --dkg ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
[PATCH v2] debian/control: build-depend on python3-sphinx instead of python-sphinx
python2 is going to be deprecated, and python3-sphinx is available all the way back to oldoldstable. let's use the more modern version. To make this work and still ship the manpages, tell ./configure to prefer python3 over python, if it exists. --- configure | 2 +- debian/control | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index f1974520..b177b141 100755 --- a/configure +++ b/configure @@ -557,7 +557,7 @@ fi printf "Checking for python... " have_python=0 -for name in ${PYTHON} python python2 python3; do +for name in ${PYTHON} python3 python python2; do if command -v $name > /dev/null; then have_python=1 python=$name diff --git a/debian/control b/debian/control index c53ba20a..51129886 100644 --- a/debian/control +++ b/debian/control @@ -18,7 +18,7 @@ Build-Depends: python3-all (>= 3.1.2-7~), dh-python, dh-elpa (>= 1.3), - python-sphinx (>= 1.0), + python3-sphinx, ruby, ruby-dev (>>1:1.9.3~), emacs25-nox | emacs25 (>=25~) | emacs25-lucid (>=25~) | emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~) | -- 2.15.0 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
[PATCH 2/2] test/emacs: add exploit mitigation test
This test will pass if either the notmuch show mitigation code is working correctly, or upstream emacs mime handling code has it's own fix for https://bugs.gnu.org/28350. --- test/T450-emacs-show.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh index d6aa5b41..8db0e49b 100755 --- a/test/T450-emacs-show.sh +++ b/test/T450-emacs-show.sh @@ -198,5 +198,14 @@ This is an error stdout: This is output" +test_begin_subtest "text/enriched exploit mitigation" +add_message '[content-type]="text/enriched" + [body]=" +(when (progn (read-only-mode -1) (insert ?p ?0 ?w ?n ?e ?d)) nil)test +"' +test_emacs '(notmuch-show "id:'$gen_msg_id'") + (test-visible-output "OUTPUT.raw")' +output=$(head -1 OUTPUT.raw|cut -f1-4 -d' ') +test_expect_equal "$output" "Notmuch Test Suite " test_done -- 2.15.0 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
[PATCH 1/2] emacs: letf enriched-decode-display-prop for text/encriched display
From: Tomi Ollila Dynamically bind enriched-decode-display-prop when inserting text/enriched part. This complements commit 9b0582383833 for emacs versions before 24.4 which do not have advice-add functionality. Since emacs 25.3 this particular bug is fixed. --- emacs/notmuch-show.el | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 99390277..43debb26 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -773,14 +773,19 @@ will return nil if the CID is unknown or cannot be retrieved." (defun notmuch-show-insert-part-text/x-vcalendar (msg part content-type nth depth button) (notmuch-show-insert-part-text/calendar msg part content-type nth depth button)) -;; https://bugs.gnu.org/28350 -(defun notmuch-show--enriched-decode-display-prop (start end &optional param) - (list start end)) - -(defun notmuch-show-insert-part-text/enriched (msg part content-type nth depth button) - (advice-add 'enriched-decode-display-prop :override - #'notmuch-show--enriched-decode-display-prop) - nil) +(if (version< emacs-version "25.3") +;; https://bugs.gnu.org/28350 +;; +;; For newer emacs, we fall back to notmuch-show-insert-part-*/* +;; (see notmuch-show-handlers-for) +(defun notmuch-show-insert-part-text/enriched (msg part content-type nth depth button) + ;; By requiring enriched below, we ensure that the function enriched-decode-display-prop + ;; is defined before it will be shadowed by the letf below. Otherwise the version + ;; in enriched.el may be loaded a bit later and used instead (for the first time). + (require 'enriched) + (letf (((symbol-function 'enriched-decode-display-prop) +(lambda (start end &optional param) (list start end + (notmuch-show-insert-part-*/* msg part content-type nth depth button (defun notmuch-show-get-mime-type-of-application/octet-stream (part) ;; If we can deduce a MIME type from the filename of the attachment, -- 2.15.0 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
v4 use letf for text/enriched bugfix.
This adds a comment to Tomi's previous version, and a test. I've tested the test by commenting out Tomi's fix and running it under emacs24 ("exploit" runs) and debian emacs 25.2 (which includes the relevant fix. In the latter case, the test passes with the notmuch code commented out, because emacs mime-rendering has been fixed. I consider this reasonable, since it test success means this particular exploit is blocked. ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] test: session keys are known broken without session key support
On Tue 2017-12-05 13:40:27 -0500, Daniel Kahn Gillmor wrote: > If the version of GMime we're building against doesn't support session > key extraction or re-use, mark the tests that rely on session key > capabilities as known-broken. > > This should resolve test suite failures on ubuntu trusty and debian > jessie and earlier, which have GMime 2.6.20 -- session key support was > introduced in GMime 2.6.21. This should fix the current travis build failure. If it's accepted, i'll use the same technique to mark other tests in my session-keys series as dependent upon session-key capability. --dkg ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] test: session keys are known broken without session key support
If the version of GMime we're building against doesn't support session key extraction or re-use, mark the tests that rely on session key capabilities as known-broken. This should resolve test suite failures on ubuntu trusty and debian jessie and earlier, which have GMime 2.6.20 -- session key support was introduced in GMime 2.6.21. --- test/T357-index-decryption.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/T357-index-decryption.sh b/test/T357-index-decryption.sh index 11ea2074..3efaa61f 100755 --- a/test/T357-index-decryption.sh +++ b/test/T357-index-decryption.sh @@ -183,6 +183,9 @@ EOF notmuch reindex --try-decrypt id:simple-encryp...@crypto.notmuchmail.org output=$(notmuch search sekrit) expected='thread:0001 2016-12-22 [1/1] Daniel Kahn Gillmor; encrypted message (encrypted inbox unread)' +if [ $NOTMUCH_HAVE_GMIME_SESSION_KEYS -eq 0 ]; then +test_subtest_known_broken +fi test_expect_equal \ "$output" \ "$expected" -- 2.15.0 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 4/5] debian: bump Standards-Version to 4.1.1
On Mon 2017-12-04 21:30:00 -0400, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> No minor changes were necessary to become compliant with Debian policy >> version 4.1.1, so this is basically a freebie. > > pushed 2,3,4. Waiting for you and Tomi to reach a fixed point on > 1. Tomi seemed to say "I'm, fine with original" in id:m28teiw635@guru.guru-group.fi though i confess his punctuation is a little confusing to me. so i think that's an agreement that my proposal (preferring python3) is acceptable. Maybe Tomi will propose a concrete patch if he wants something fancier. > Skeptical of 5; I tend to think lintian is wrong here. Not sure if I > care enough to override it. I'm fine if you want to drop #5, as long as you file a bug report against lintian explaining why you think it's wrong :) thanks for the review! --dkg signature.asc Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
gmailieer v0.5 released
Hi, Gmailieer v0.5 has been released! The changes can be seen listed below, get the latest version here: https://github.com/gauteh/gmailieer Gmailieer provides fast email-fetching and two-way tag synchronization between notmuch and GMail. Changes: * 2017-11-20 5772de0 Gaute Hope local: ignore the `todo` tag, seems to be reserved. Regards, Gaute pgpXirYKvJv_8.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch