Re: [PATCH] emacs: Add notmuch-show-local-dates option

2020-07-05 Thread Daniel Kahn Gillmor
On Fri 2020-07-03 19:58:23 -0300, David Bremner wrote: > The bikeshed must be blue! Uh, I mean what about narrowish screens (80 > columns or so) and or deeply indented threads? You mean what should happen to messages with headers that are much longer, like: To: David Bremner , Kevin Foley ,

Re: [PATCH] emacs: Add notmuch-show-local-dates option

2020-07-03 Thread Daniel Kahn Gillmor
On Thu 2020-07-02 18:02:34 -0400, Kevin Foley wrote: > Daniel Kahn Gillmor writes: >> and it could take three values: >> >> - nil (default), shows the Date: header as received >> - t, shows the timestamp from the Date: header in local time, >>with the as-re

Re: [PATCH] completion: remove "setup" from the list of possible completions

2020-07-02 Thread Daniel Kahn Gillmor
On Wed 2020-06-24 21:44:01 +1000, Peter Wang wrote: > On Mon, 22 Jun 2020 12:22:50 +0200 Lukasz Stelmach > wrote: >> It was <2020-06-20 sob 12:53>, when Reto wrote: >> > On Fri, Jun 19, 2020 at 12:40:49PM +0200, Łukasz Stelmach wrote: >> >> Having "setup" in the set requires entering three

Re: [PATCH] emacs: Add notmuch-show-local-dates option

2020-07-02 Thread Daniel Kahn Gillmor
This proposed notmuch-show-local-dates feature is a nice one. It renders the Date header in a format that is likely to be more useful to the viewer. I certainly find this more useful than having to do the TZ conversions in my head. But, setting this to t hides the sender's TZ from the viewer --

Re: introduce exception handling at top level of libnotmuch

2020-07-02 Thread Daniel Kahn Gillmor
Hi Bremner, all-- On Mon 2020-06-29 22:14:07 -0300, David Bremner wrote: > I know that some of you are not C++ fans, but at the moment this is > the cleanest fix I can think of to uncaught xapian exceptions causing > calls to the library to die. Floris reminded me of this recently with > the

Re: Newbie: On Outlook Exchange how to use notmuch to connect to it?

2020-07-02 Thread Daniel Kahn Gillmor
On Thu 2020-07-02 10:36:34 +0300, Tomer B wrote: > Hi, I tried searching but the mailing list is huge.. You might try searching at the new mailing list interface: https://nmbug.notmuchmail.org/nmweb/ -- put your search terms in the "terms" box! > I'm a newbie and impressed by notmuch. I want

Re: [PATCH] doc: update name of gmime package to install

2020-07-02 Thread Daniel Kahn Gillmor
On Thu 2020-07-02 10:01:07 -0300, David Bremner wrote: > Tomi Ollila writes: > >> On Fri, Jun 26 2020, David Bremner wrote: >> >>> Fedora still has an old gmime-devel which is 2.6.x. This is no longer >>> supported by notmuch. >>> --- >>> INSTALL | 2 +- >>> configure | 2 +- >>> 2 files

[PATCH 1/2] configure: can gpgme can verify signatures when decrypting with a session key?

2020-07-02 Thread Daniel Kahn Gillmor
If https://dev.gnupg.org/T3464 is unresolved in the version of gpgme we are testing against, then we should know about it, because it affects the behavior of notmuch. Signed-off-by: Daniel Kahn Gillmor --- configure | 78 ++- 1 file changed

[PATCH 2/2] tests: mark sig verification known-broken with session keys on buggy gpgme

2020-07-02 Thread Daniel Kahn Gillmor
We make use of the just-introduced configure test. Signed-off-by: Daniel Kahn Gillmor --- 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 1ac2836a..1ed5f28c 100755 --- a/test/T357-index

Re: crypto test failures on Fedora and OpenSUSE

2020-07-01 Thread Daniel Kahn Gillmor
fy a signature, which is what we see here. --dkg From ae4d7761a15b82eb98b0bcc72af2ae2e8973e1f9 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Wed, 29 May 2019 17:56:01 -0400 Subject: [GPGME PATCH] gpg: Avoid error diagnostics with --override-session-key when verifying * src/engine-gpg.c (gpg_decrypt): o

notmuch mailing list administrivia

2020-07-01 Thread Daniel Kahn Gillmor
Hi folks-- David Bremner, Carl Worth, and i did some maintenance work today. We hope that what we did was to successfully move the notmuch mailing list to a mailman3 instance. Please let us know if you have any problems with it (such as not receiving this message, ha ha). (feel free to send

difficulties with notmuch2 python bindings for alot

2020-06-09 Thread Daniel Kahn Gillmor
Hi all-- I see over on github that alot is trying to port to the notmuch2 bindings, and having a few problems with it: https://github.com/pazz/alot/pull/1511 alot is an important consumer of the notmuch python bindings, and it would be really great to see them successfully transition to the

[PATCH] add NEWS for 0.30

2020-06-01 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- NEWS | 35 +++ 1 file changed, 35 insertions(+) diff --git a/NEWS b/NEWS index 14db7f6f..1921127f 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,41 @@ Notmuch 0.30 (2020-06-01) = +S/MIME

Re: [PATCH] tests/ruby: Ensure that test works for out-of-tree builds

2020-05-26 Thread Daniel Kahn Gillmor
On Tue 2020-05-26 13:06:02 -0400, Daniel Kahn Gillmor wrote: > --- > 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 792b1cb9..78a90862 100644 > --- a/test/test-lib.sh > +++ b/test/

Re: python-cffi and ruby test suites fail in out-of-tree builds

2020-05-26 Thread Daniel Kahn Gillmor
On Sat 2020-05-23 21:52:18 +0200, Floris Bruynooghe wrote: > modified test/T391-python-cffi.sh > @@ -8,7 +8,7 @@ fi > > > test_begin_subtest "python cffi tests" > -pytest_dir=$NOTMUCH_SRCDIR/bindings/python-cffi/build/stage > +pytest_dir=$NOTMUCH_BUILDDIR/bindings/python-cffi/build/stage >

[PATCH] tests/ruby: Ensure that test works for out-of-tree builds

2020-05-26 Thread Daniel Kahn Gillmor
--- 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 792b1cb9..78a90862 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -1081,7 +1081,7 @@ test_python() { } test_ruby() { -MAIL_DIR=$MAIL_DIR

doc build warnings when building out-of-tree

2020-05-26 Thread Daniel Kahn Gillmor
When building out-of-tree, the documentation (both manpages and info files) are incomplete, but they do not explicitly fail. build logs follow from doing "mkdir build && ../configure && make". If there's a way to make these warnings into hard failures, i think that would be good -- we don't want

Re: [PATCH] tests: fix test_json_nodes() in out-of-tree builds

2020-05-26 Thread Daniel Kahn Gillmor
On Sun 2020-05-24 20:59:29 +0300, Tomi Ollila wrote: > On Thu, May 21 2020, Daniel Kahn Gillmor wrote: > >> In out-of-tree builds, $TEST_DIRECTORY doesn't contain >> json_check_nodes.py. This caused 27 tests to fail in such an >> environment. > > are you shure the

Re: [PATCH] python-cffi: enable out-of-tree builds

2020-05-26 Thread Daniel Kahn Gillmor
On Thu 2020-05-21 21:03:59 -0400, Daniel Kahn Gillmor wrote: > This is a simple hack to enable out-of-tree builds, a concern raised > by Tomi in id:m24kzjib9a@guru.guru-group.fi > > This change at least enables "make check" to complete without error, > but I'm sure it

Re: [PATCH] emacs: split-window-sensibly in tree mode with open message

2020-05-23 Thread Daniel Kahn Gillmor
On Fri 2020-05-22 19:58:19 +0100, Mark Walters wrote: > As far as I can see the split-window-sensibly version splits the > window into two equal parts, whereas the split-window-vertically > version (deliberately) makes the message pane bigger than the thread > pane. I find this argument

python-cffi and ruby test suites fail in out-of-tree builds

2020-05-21 Thread Daniel Kahn Gillmor
Hey folks-- I just did a bit of testing and cleanup for out-of-tree builds (see the minor patches that should have landed on the list in the last hour or two). For me, "make check" in an out-of-tree build works fine now, with the exception of T391-python-cffi.sh and T395-ruby.sh. I'm afraid i

[PATCH] tests: fix test_json_nodes() in out-of-tree builds

2020-05-21 Thread Daniel Kahn Gillmor
In out-of-tree builds, $TEST_DIRECTORY doesn't contain json_check_nodes.py. This caused 27 tests to fail in such an environment. Signed-off-by: Daniel Kahn Gillmor --- 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

Re: [PATCH 3/5] build: optionally build python-cffi bindings

2020-05-21 Thread Daniel Kahn Gillmor
On Mon 2019-11-04 23:26:25 +0200, Tomi Ollila wrote: > how bad does out-of-tree build break with this -- do we need to do > the same as with ruby bindings (copy sources -- do we still do so)? or does > python provide better alternative..? I've just posted

[PATCH] python-cffi: enable out-of-tree builds

2020-05-21 Thread Daniel Kahn Gillmor
by: Daniel Kahn Gillmor --- configure | 8 1 file changed, 8 insertions(+) diff --git a/configure b/configure index 37368bda..f0472e8e 100755 --- a/configure +++ b/configure @@ -70,6 +70,14 @@ if [ "$srcdir" != "." ]; then mkdir bindings/ruby cp -a "$sr

Re: test suite: FIXED messages are misordered with tests

2020-05-21 Thread Daniel Kahn Gillmor
On Fri 2020-05-22 00:57:14 +0300, Tomi Ollila wrote: > We've accumulated quite a bit of mess during these years to the test > system, which makes it harder to do larger adjustments (and not (yet) > mentioning even larger refactorings...). The last significant refactoring was probably when

[PATCH 2/2 v3] smime: tests of X.509 certificate validity are known-broken on GMime < 3.2.7

2020-05-21 Thread Daniel Kahn Gillmor
uld fail early, during ./configure. To break out these specific User ID checks from other checks, i had to split some tests into two parts, and reuse $output across the two subtests. Signed-off-by: Daniel Kahn Gillmor --- configure | 83 +- t

Re: [PATCH 2/2 v2] smime: tests of X.509 certificate validity are known-broken on GMime < 3.2.7

2020-05-21 Thread Daniel Kahn Gillmor
Thanks for the review, and for the poke about out-of-tree builds on IRC, Bremner. Another revision is coming in a minute. Notes below… On Thu 2020-05-21 20:29:05 -0300, David Bremner wrote: > I find these long lines with !! in the middle pretty surprising. Is > there some reason for this style?

Re: [PATCH] emacs: split-window-sensibly in tree mode with open message

2020-05-21 Thread Daniel Kahn Gillmor
On Sat 2020-05-02 20:11:09 -0400, Radu Butoi wrote: > This uses the standard Emacs function `split-window-sensibly` to split a > window horizontally or vertically depending on space when opening a > message in tree view. By default, split-width-threshold is 160 columns > (and -height- is nil), so

Re: [PATCH] emacs: add notmuch-expr, sexp-style queries

2020-05-21 Thread Daniel Kahn Gillmor
On Wed 2020-05-13 20:00:24 +1000, Tom Fitzhenry wrote: > notmuch-expr allows you to write notmuch search queries in sexp style like: > > (notmuch-expr > '(and > (to "emacs-devel") > "info manual" > (or > (not (is "spam")) > (is "important" > > which will generate the

Re: [PATCH] emacs docstrings: consistent indentation, newlines, periods

2020-05-21 Thread Daniel Kahn Gillmor
On Mon 2020-05-04 00:21:36 +0300, Tomi Ollila wrote: > Fixed emacs docstrings to be consistent. No functional change. > > - removed some (accidental) indentation > - removed some trailing newlines > - added trailing periods where missing (some exclusions) This all looks good to me, except for the

Re: waiting tag

2020-05-21 Thread Daniel Kahn Gillmor
On Mon 2020-05-04 09:25:59 +0200, Gregor Zattler wrote: > * Keegan Carruthers-Smith [2020-05-03; 22:37]: >> notmuch tag -waiting -- tag:waiting and 'thread:{tag:new}' > > but this removes the waiting tag if there is some response > to some message in the thread, not necessary to the message >

Re: test suite: FIXED messages are misordered with tests

2020-05-21 Thread Daniel Kahn Gillmor
On Thu 2020-05-21 00:16:48 +0300, Tomi Ollila wrote: > (just tested this latest works) Thanks for looking into this, Tomi! Do you have a patch to propose? --dkg signature.asc Description: PGP signature ___ notmuch mailing list

Re: test suite: FIXED messages are misordered with tests

2020-05-19 Thread Daniel Kahn Gillmor
On Tue 2020-05-12 20:14:07 -0300, David Bremner wrote: > Daniel Kahn Gillmor writes: >> >> Clearly, that FIXED should come *after* the "T356-protected-headers:" >> separator. >> > > Can you reproduce this without running the tests in parallel? Yep:

[PATCH v2 3/9] cli: include wrapped part of PKCS#7 SignedData in the MIME tree

2020-05-12 Thread Daniel Kahn Gillmor
Unwrap a PKCS#7 SignedData part unconditionally when the cli is traversing the MIME tree, and return it as a "child" of what would otherwise be a leaf in the tree. Unfortunately, this also breaks the JSON output. We will fix that next. Signed-off-by: Daniel Kahn Gillmor --- m

Handle PKCS#7 S/MIME messages v2

2020-05-12 Thread Daniel Kahn Gillmor
This revision of the PKCS#7 S/MIME handling series is based on (and very similar to) the series sent on the thread starting at id:20200430201328.725651-1-...@fifthhorseman.net However, it is rebased after more gracefully handling the subtle errors in X.509 certificate validity when built against

[PATCH v2 1/9] lib: index PKCS7 SignedData parts

2020-05-12 Thread Daniel Kahn Gillmor
w. Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 57 ++ test/T355-smime.sh | 2 -- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index 158ba5cf..bbf13dc5 100644 --- a/lib/index.cc +++ b/li

[PATCH v2 2/9] smime: Identify encrypted S/MIME parts during indexing

2020-05-12 Thread Daniel Kahn Gillmor
We don't handle them correctly yet, but we can at least mark them as being encrypted. Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 4 test/T355-smime.sh | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/index.cc b/lib/index.cc index bbf13dc5..f029b334

[PATCH v2 4/9] cli/show: If a leaf part has children, show them instead of omitting

2020-05-12 Thread Daniel Kahn Gillmor
-onepart-signed@protected-headers.example. Signed-off-by: Daniel Kahn Gillmor --- notmuch-show.c | 11 ++- test/T355-smime.sh | 6 +++--- test/T356-protected-headers.sh | 3 +-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/notmuch-show.c b

[PATCH v2 5/9] cli/reply: Ignore PKCS#7 wrapper parts when replying

2020-05-12 Thread Daniel Kahn Gillmor
When composing a reply, no one wants to see this line in the proposed message: Non-text part: application/pkcs7-mime So we hide it, the same way we hide PGP/MIME cruft. Signed-off-by: Daniel Kahn Gillmor --- notmuch-reply.c| 5 +++-- test/T355-smime.sh | 1 - 2 files changed, 3

[PATCH v2 7/9] crypto: handle PKCS#7 envelopedData in _notmuch_crypto_decrypt

2020-05-12 Thread Daniel Kahn Gillmor
, but that will happen in the following changes. Signed-off-by: Daniel Kahn Gillmor --- util/crypto.c | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/util/crypto.c b/util/crypto.c index fbd5f011..c09f467b 100644 --- a/util/crypto.c +++ b/util

[PATCH v2 6/9] crypto: Make _notmuch_crypto_decrypt take a GMimeObject

2020-05-12 Thread Daniel Kahn Gillmor
. Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 8 mime-node.c | 3 +-- util/crypto.c | 6 +++--- util/crypto.h | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index f029b334..da9a3abe 100644 --- a/lib/index.cc +++ b/lib/index.cc

[PATCH v2 9/9] smime: Index cleartext of envelopedData when requested

2020-05-12 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 5 +++-- test/T355-smime.sh | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index da9a3abe..826aa341 100644 --- a/lib/index.cc +++ b/lib/index.cc @@ -656,8 +656,9 @@ _index_pkcs7_part

[PATCH v2 8/9] smime: Pass PKCS#7 envelopedData to node_decrypt_and_verify

2020-05-12 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- mime-node.c| 6 ++ test/T355-smime.sh | 2 -- test/T356-protected-headers.sh | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mime-node.c b/mime-node.c index c2ee858d..f552e03a 100644 --- a/mime-no

[PATCH 2/2 v2] smime: tests of X.509 certificate validity are known-broken on GMime < 3.2.7

2020-05-12 Thread Daniel Kahn Gillmor
uld fail early, during ./configure. To break out these specific User ID checks from other checks, i had to split some tests into two parts, and reuse $output across the two subtests. Signed-off-by: Daniel Kahn Gillmor --- configure | 79 ++ t

Re: [PATCH 1/2 v2] test-lib: mark function variables as local

2020-05-12 Thread Daniel Kahn Gillmor
On Sat 2020-05-09 08:47:10 -0300, David Bremner wrote: > I'm confused about where to apply 2/2. If I apply it on top of (updated) > master, it causes test failures. If I apply after the rest of the > patches in this thread then presumably there is some interval where the > build is broken (if only

test suite: FIXED messages are misordered with tests

2020-05-12 Thread Daniel Kahn Gillmor
I'm debugging/diagnosing/trying to clean up some "FIXED" known-broken tests right now. Sometimes, depending on circumstances i can't predict (race conditions?), I see funny output like: ~~~ Use "make V=1" to see the details for passing and known broken tests. INFO: using 2m timeout for tests

[PATCH] configure: report GMime minimum version in ./configure output

2020-05-12 Thread Daniel Kahn Gillmor
We already report the minimum version for Glib, zlib, and Xapian development libraries. For consistency, report it for GMime as well. Signed-off-by: Daniel Kahn Gillmor --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 92e5bd1b

Re: [PATCH 1/2 v2] test-lib: mark function variables as local

2020-05-10 Thread Daniel Kahn Gillmor
On Sat 2020-05-09 08:47:10 -0300, David Bremner wrote: > I'm confused about where to apply 2/2. If I apply it on top of (updated) > master, it causes test failures. If I apply after the rest of the > patches in this thread then presumably there is some interval where the > build is broken (if only

[PATCH 1/2 v2] test-lib: mark function variables as local

2020-05-08 Thread Daniel Kahn Gillmor
-lib.sh so that they do not get clobbered when used outside test-lib. We also move the local variable declarations to beginning of each function, to avoid weird gotchas with local variable declarations as described in https://tldp.org/LDP/abs/html/localvar.html. Signed-off-by: Daniel Kahn Gillmor ---

Re: [PATCH 1/2] test-lib: mark function variables as local

2020-05-08 Thread Daniel Kahn Gillmor
On Thu 2020-05-07 10:31:38 +0300, Tomi Ollila wrote: > Good stuff > > robustness comment IMO: > > There is slight difference when writing > > local foo=`false` > > and > > local foo; foo=`false` > > > former does not "fail"; latter does, thanks for pointing this out. On IRC, jindraj

Re: [PATCH] notmuch(1): clarify documentation about --option/value separators

2020-05-08 Thread Daniel Kahn Gillmor
On Thu 2020-05-07 16:40:26 -0700, Carl Worth wrote: > On Thu, May 07 2020, Daniel Kahn Gillmor wrote: >> +separator. Except for boolean options (wihch would be ambiguous), a > > Misspelling of "which". And while I'm here, strictly speaking Boolean is > generally capita

[PATCH] notmuch(1): clarify documentation about --option/value separators

2020-05-07 Thread Daniel Kahn Gillmor
of the manual. Signed-off-by: Daniel Kahn Gillmor --- doc/man1/notmuch.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/man1/notmuch.rst b/doc/man1/notmuch.rst index d2cd8da5..3dcc646c 100644 --- a/doc/man1/notmuch.rst +++ b/doc/man1/notmuch.rst @@ -128,9 +128,9 @@ OPTION

[PATCH 2/2] smime: tests of X.509 certificate validity are known-broken on GMime < 3.2.7

2020-05-06 Thread Daniel Kahn Gillmor
uld fail early, during ./configure. To break out these specific User ID checks from other checks, i had to split some tests into two parts, and reuse $output across the two subtests. Signed-off-by: Daniel Kahn Gillmor --- configure | 79 ++ t

[PATCH 1/2] test-lib: mark function variables as local

2020-05-06 Thread Daniel Kahn Gillmor
-lib.sh so that they do not get clobbered when used outside test-lib. Signed-off-by: Daniel Kahn Gillmor --- test/test-lib.sh | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 5c8eab7c..e8fea

Re: Handle PKCS#7 S/MIME messages

2020-05-04 Thread Daniel Kahn Gillmor
Hi Tomi-- On Sat 2020-05-02 00:15:57 +0300, Tomi Ollila wrote: > I did not see anything suspicious in code, but > > I got these test failures: > > in ubuntu 19.10 native environment, and > > in debian 10 (podman) container running in fedora 31 system > > > T355-smime: Testing S/MIME signature

[PATCH 7/9] crypto: handle PKCS#7 envelopedData in _notmuch_crypto_decrypt

2020-04-30 Thread Daniel Kahn Gillmor
, but that will happen in the following changes. Signed-off-by: Daniel Kahn Gillmor --- util/crypto.c | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/util/crypto.c b/util/crypto.c index fbd5f011..c09f467b 100644 --- a/util/crypto.c +++ b/util

[PATCH 3/9] cli: include wrapped part of PKCS#7 SignedData in the MIME tree

2020-04-30 Thread Daniel Kahn Gillmor
Unwrap a PKCS#7 SignedData part unconditionally when the cli is traversing the MIME tree, and return it as a "child" of what would otherwise be a leaf in the tree. Unfortunately, this also breaks the JSON output. We will fix that next. Signed-off-by: Daniel Kahn Gillmor --- m

[PATCH 6/9] crypto: Make _notmuch_crypto_decrypt take a GMimeObject

2020-04-30 Thread Daniel Kahn Gillmor
. Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 8 mime-node.c | 3 +-- util/crypto.c | 6 +++--- util/crypto.h | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index f029b334..da9a3abe 100644 --- a/lib/index.cc +++ b/lib/index.cc

[PATCH 2/9] smime: Identify encrypted S/MIME parts during indexing

2020-04-30 Thread Daniel Kahn Gillmor
We don't handle them correctly yet, but we can at least mark them as being encrypted. Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 4 test/T355-smime.sh | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/index.cc b/lib/index.cc index bbf13dc5..f029b334

[PATCH 4/9] cli/show: If a leaf part has children, show them instead of omitting

2020-04-30 Thread Daniel Kahn Gillmor
-onepart-signed@protected-headers.example. Signed-off-by: Daniel Kahn Gillmor --- notmuch-show.c | 11 ++- test/T355-smime.sh | 2 -- test/T356-protected-headers.sh | 1 - 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/notmuch-show.c b/notmuch

[PATCH 9/9] smime: Index cleartext of envelopedData when requested

2020-04-30 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 5 +++-- test/T355-smime.sh | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index da9a3abe..826aa341 100644 --- a/lib/index.cc +++ b/lib/index.cc @@ -656,8 +656,9 @@ _index_pkcs7_part

Handle PKCS#7 S/MIME messages

2020-04-30 Thread Daniel Kahn Gillmor
This series applies after the "Add tests for S/MIME PKCS#7 messages" series, which was introduced in id:20200428185723.660184-1-...@fifthhorseman.net With this series applied, notmuch handles standard PKCS#7 S/MIME messages (using GnuPG's gpgsm as a backend, as mediated by GMime's use of GPGME)

[PATCH 1/9] lib: index PKCS7 SignedData parts

2020-04-30 Thread Daniel Kahn Gillmor
w. Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 57 ++ test/T355-smime.sh | 2 -- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index 158ba5cf..bbf13dc5 100644 --- a/lib/index.cc +++ b/li

[PATCH 5/9] cli/reply: Ignore PKCS#7 wrapper parts when replying

2020-04-30 Thread Daniel Kahn Gillmor
When composing a reply, no one wants to see this line in the proposed message: Non-text part: application/pkcs7-mime So we hide it, the same way we hide PGP/MIME cruft. Signed-off-by: Daniel Kahn Gillmor --- notmuch-reply.c| 5 +++-- test/T355-smime.sh | 1 - 2 files changed, 3

[PATCH 8/9] smime: Pass PKCS#7 envelopedData to node_decrypt_and_verify

2020-04-30 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- mime-node.c| 6 ++ test/T355-smime.sh | 2 -- test/T356-protected-headers.sh | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mime-node.c b/mime-node.c index c2ee858d..f552e03a 100644 --- a/mime-node.c

[PATCH 07/15 v2] test: Allow tests to have both gpg and gpgsm active at once

2020-04-30 Thread Daniel Kahn Gillmor
Without this fix, we couldn't run both add_gnupg_home and add_gpgsm_home in the same test script. Signed-off-by: Daniel Kahn Gillmor --- test/test-lib.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index ac1b9315..1baa2d20

[PATCH 08/15 v2] tests/smime: include secret key material for Bob

2020-04-30 Thread Daniel Kahn Gillmor
passphrase into no passphrase at all on import). Signed-off-by: Daniel Kahn Gillmor --- test/smime/bob.p12 | 58 ++ test/test-lib.sh | 2 ++ 2 files changed, 60 insertions(+) create mode 100644 test/smime/bob.p12 diff --git a/test/smime/bob.p12 b/test/smi

[PATCH 03/15 v2] tests/smime: Include the Sample LAMPS Certificate Authority

2020-04-30 Thread Daniel Kahn Gillmor
.html#name-certificate-authority-certi Signed-off-by: Daniel Kahn Gillmor --- test/smime/README | 2 ++ test/smime/ca.crt | 20 test/test-lib.sh | 2 ++ 3 files changed, 24 insertions(+) create mode 100644 test/smime/ca.crt diff --git a/test/smime/README b/test/smime

Re: [PATCH 15/15] tests: disable CRL checks from gpgsm

2020-04-30 Thread Daniel Kahn Gillmor
On Wed 2020-04-29 23:12:33 +0300, Tomi Ollila wrote: > Rest of the series look tolerable to me. That one missing > "inconsistent quotes" is inconsistent with added quotes > in one of the changes in previous email (which just did that) > > Otherwise OK (provided that tests pass) > (except that

Re: [PATCH 07/15] test: Allow tests to have both gpg and gpgsm active at once

2020-04-30 Thread Daniel Kahn Gillmor
On Wed 2020-04-29 23:02:19 +0300, Tomi Ollila wrote: > On Tue, Apr 28 2020, Daniel Kahn Gillmor wrote: > >> Without this fix, we couldn't run both add_gnupg_home and >> add_gpgsm_home in the same test script. >> >> Signed-off-by: Daniel Kahn Gillmor >> --- >

Re: Inconsistencies in handling command flags: `--flag=value` different than `--flag value`

2020-04-30 Thread Daniel Kahn Gillmor
On Wed 2020-04-29 08:33:24 -0700, Jameson Graef Rollins wrote: > On Tue, Apr 28 2020, Daniel Kahn Gillmor wrote: >> One final way we could normalize everything and make it less >> idiosyncratic, with shorter, simpler man pages: deprecate and then drop >> the --boolo

Re: [PATCH 08/15] tests/smime: include secret key material for Bob

2020-04-30 Thread Daniel Kahn Gillmor
On Wed 2020-04-29 23:05:03 +0300, Tomi Ollila wrote: > Now that I started w/ consistenly quotes -- "$NOTMUCH_SRCDIR/..." > > Or maybe not, is this variable consistently unquoted -- or something ;) there are lots of places where NOTMUCH_SRCDIR is unquoted, and some where it is. I guess i should

Re: [PATCH 03/15] tests/smime: Include the Sample LAMPS Certificate Authority

2020-04-30 Thread Daniel Kahn Gillmor
On Tue 2020-04-28 22:43:10 -0300, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> This CA is useful for test suites and the like, but is not an >> actually-secure CA, because its secret key material is also published. >> >> I plan to use it for its intend

Re: Inconsistencies in handling command flags: `--flag=value` different than `--flag value`

2020-04-28 Thread Daniel Kahn Gillmor
On Mon 2020-04-27 22:21:36 +0300, Ciprian Dorin Craciun wrote: > On Mon, Apr 27, 2020 at 9:21 PM Tomi Ollila wrote: >>> [dkg wrote:] >>> release, remove the suggestion to use a whitespace separator from the >>> documentation, and eventually phase it out entirely in some future >>> release. >> >>

[PATCH 05/15] tests/smime: Use gpgsm instead of openssl for mml creation of S/MIME msgs

2020-04-28 Thread Daniel Kahn Gillmor
openssl's smime subcommand. See https://dev.gnupg.org/T4878 for more details. Signed-off-by: Daniel Kahn Gillmor --- test/T355-smime.sh | 4 ++-- test/test-lib.el | 10 -- test/test-lib.sh | 6 +- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/test/T355-smime.sh b

[PATCH 03/15] tests/smime: Include the Sample LAMPS Certificate Authority

2020-04-28 Thread Daniel Kahn Gillmor
.html#name-certificate-authority-certi Signed-off-by: Daniel Kahn Gillmor --- test/smime/README | 2 ++ test/smime/ca.crt | 20 test/test-lib.sh | 2 ++ 3 files changed, 24 insertions(+) create mode 100644 test/smime/ca.crt diff --git a/test/smime/README b/test/smime/README

[PATCH 04/15] tests/smime: consistently quote $GNUPGHOME

2020-04-28 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- test/test-lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 1ffedb25..31f37ed7 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -132,13 +132,13 @@ add_gnupg_home

[PATCH 14/15] test/protected-headers: Add tests for S/MIME protected headers

2020-04-28 Thread Daniel Kahn Gillmor
Recognize the protected subject for S/MIME example protected header messages. Signed-off-by: Daniel Kahn Gillmor --- test/T356-protected-headers.sh | 38 +++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/test/T356-protected-headers.sh b/test/T356

[PATCH 15/15] tests: disable CRL checks from gpgsm

2020-04-28 Thread Daniel Kahn Gillmor
d messages are already handled correctly (one-part PKCS#7 messages will get fixed later). Signed-off-by: Daniel Kahn Gillmor --- test/T356-protected-headers.sh | 2 +- test/test-lib.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/T356-protected-headers

[PATCH 11/15] tests/smime: Test indexing cleartext of envelopedData

2020-04-28 Thread Daniel Kahn Gillmor
These tests describe some simple behavior we would expect to work if we were to correctly index the cleartext of encrypted S/MIME messages (PKCS#7 envelopedData). Of course, they don't currently pass, so we mark them known-broken. Signed-off-by: Daniel Kahn Gillmor --- test/T355-smime.sh | 22

[PATCH 07/15] test: Allow tests to have both gpg and gpgsm active at once

2020-04-28 Thread Daniel Kahn Gillmor
Without this fix, we couldn't run both add_gnupg_home and add_gpgsm_home in the same test script. Signed-off-by: Daniel Kahn Gillmor --- test/test-lib.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index ac1b9315..d9997b27

[PATCH 13/15] tests/smime: add tests for S/MIME SignedData

2020-04-28 Thread Daniel Kahn Gillmor
properly quote and attribute content? Signed-off-by: Daniel Kahn Gillmor --- test/T355-smime.sh | 77 + test/corpora/pkcs7/smime-onepart-signed.eml | 51 ++ 2 files changed, 128 insertions(+) create mode 100644 test/corpora/pkcs7/smime

[PATCH 12/15] test-lib.sh: add test_valid_json

2020-04-28 Thread Daniel Kahn Gillmor
This test does exactly what it says on the tin. It expects JSON data to be parseable by Python, at least. Signed-off-by: Daniel Kahn Gillmor --- test/test-lib.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/test/test-lib.sh b/test/test-lib.sh index dd7fdfaa..6f47994e 100644

[PATCH 06/15] tests/smime: avoid copying the key+cert.pem around

2020-04-28 Thread Daniel Kahn Gillmor
No functional change. We no longer need to identify the key and cert to mml-mode when sending an S/MIME message, so making a copy of key+cert.pem to test_suite.pem is superfluous. Get rid of the extra file. Signed-off-by: Daniel Kahn Gillmor --- test/T355-smime.sh | 6 ++ 1 file changed

[PATCH 09/15] tests: Add S/MIME messages to protected-headers corpus

2020-04-28 Thread Daniel Kahn Gillmor
of the corpus, though. We should have that trailing whitespace, so I've made this commit with --no-verify. Signed-off-by: Daniel Kahn Gillmor --- .../smime-enc+legacy-disp.eml | 50 + .../smime-multipart-signed.eml| 68 .../smime-onepart

[PATCH 02/15] tests/smime: Always use --batch with gpgsm

2020-04-28 Thread Daniel Kahn Gillmor
GnuPG's gpgsm, like gpg, should always be used with --batch when it is invoked in a non-interactive environment. Signed-off-by: Daniel Kahn Gillmor --- test/test-lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 6a62b5c1

[PATCH 08/15] tests/smime: include secret key material for Bob

2020-04-28 Thread Daniel Kahn Gillmor
passphrase into no passphrase at all on import). Signed-off-by: Daniel Kahn Gillmor --- test/smime/bob.p12 | 58 ++ test/test-lib.sh | 2 ++ 2 files changed, 60 insertions(+) create mode 100644 test/smime/bob.p12 diff --git a/test/smime/bob.p12 b/test/smi

Add tests for S/MIME PKCS#7 messages

2020-04-28 Thread Daniel Kahn Gillmor
S/MIME messages that use PKCS#7 are not currently well-handled by notmuch. This series introduces a set of tests that cover such messages, most of which are initially broken. A future (shorter) series will resolve these tests. Some S/MIME messages *are* handled correctly by notmuch already: in

[PATCH 01/15] tests: move add_gpgsm_home to test-lib.sh

2020-04-28 Thread Daniel Kahn Gillmor
This allows us to test S/MIME messages in other tests. Signed-off-by: Daniel Kahn Gillmor --- test/T355-smime.sh | 13 - test/test-lib.sh | 13 + 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/T355-smime.sh b/test/T355-smime.sh index 11a4d6cd

[PATCH 10/15] tests/smime: Verify cryptographic message status

2020-04-28 Thread Daniel Kahn Gillmor
When consuming a signed+encrypted S/MIME message generated by emacs, we expect to see the same cryptographic properties for the message as a whole. This is not done correctly yet, so the test is marked as known broken. Signed-off-by: Daniel Kahn Gillmor --- test/T355-smime.sh | 9 + 1

Re: Inconsistencies in handling command flags: `--flag=value` different than `--flag value`

2020-04-27 Thread Daniel Kahn Gillmor
On Mon 2020-04-27 14:53:07 -0300, David Bremner wrote: > Quoting notmuch(1) > >OPTION SYNTAX >All options accepting an argument can be used with '=' >or ':' as a separator. For the cases where it's not ambiguous >(in particular excluding boolean options), a space can

Re: [PATCH] util/zlib-extra: de-inline gzerror_str

2020-04-27 Thread Daniel Kahn Gillmor
On Mon 2020-04-27 09:28:08 -0300, David Bremner wrote: > It turns out the behaviour of inline functions in C header files is > not a good idea, and can cause linking problems if the compiler > decides not to inline them. In principle this is solvable by using a > "static inline" declaration, but

Re: Weird tagging issue

2020-03-29 Thread Daniel Kahn Gillmor
On Sun 2020-03-29 17:53:01 -0700, Carl Worth wrote: > On Mon, Mar 30 2020, Brian May wrote: >> This applies to all 4 of those messages. Yes, they all look like they >> have the same Message-ID > > 4 different messages all with the same message ID definitely violates a > core assumption of notmuch

Re: Weird tagging issue

2020-03-29 Thread Daniel Kahn Gillmor
Hi Brian-- whew, what a mess! I'm having a hard time identifying a specific problem, but I did notice this surprising sequence: On Mon 2020-03-30 08:03:20 +1100, Brian May wrote: > subgraph "cluster_id:pr-wspdigital/bupaoshc/8...@bitbucket.org" { > "pr-wspdigital/bupaoshc/8...@bitbucket.org"

Re: [PATCH] debian: Add packaging for python3-notmuch2

2020-03-24 Thread Daniel Kahn Gillmor
On Fri 2020-01-10 18:16:37 -0500, Daniel Kahn Gillmor wrote: > I took one more step at debugging the newly-built modules to try to > understand why the non-stripped versions might differ, and noticed that > the debugging info in each module itself is different. in particular, > in th

Re: [PATCH] nmbug: explicitly prefer python3

2020-03-24 Thread Daniel Kahn Gillmor
On Thu 2020-03-12 18:57:51 +0200, Tomi Ollila wrote: > I've been running nmbug with a wrapper that runs python 2.7 (since default > python in that particular machine is python 2.6 -- which doesn't work with > nmbug (or it may but that is complicated, i'm not sure...). > > So, to me just doing

Re: Weird tagging issue

2020-03-22 Thread Daniel Kahn Gillmor
On Sun 2020-03-22 22:12:14 -0300, David Bremner wrote: > I think dkg and I agreed a few years ago we should ship [draw-thread] > as one of our devel tools, but then I didn't follow through. So I'd be > interested in knowing if it works for you. fwiw, i still think it's worth shipping it in devel/

Re: Weird tagging issue

2020-03-20 Thread Daniel Kahn Gillmor
Hi Brian-- On Fri 2020-03-20 11:06:55 +1100, Brian May wrote: > Brian May writes: > >> I am having a problem with certain messages, in that I remove the tag >> and it still shows up in search results. > > I just recreated the entire database, and I still get the same problem. This sounds really

[PATCH 1/2] mime-node: rename decrypted_child to unwrapped_child

2020-03-18 Thread Daniel Kahn Gillmor
unwrappings as well as multipart/encrypted decryptions. This change is just a naming change, it has no effect on function. Signed-off-by: Daniel Kahn Gillmor --- mime-node.c | 10 +- notmuch-client.h | 6 -- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/mime

[PATCH 2/2] mime-node: Clean up unwrapped MIME parts correctly.

2020-03-18 Thread Daniel Kahn Gillmor
We clean it up by analogy with cleaning up the signature list associated with a MIME node. Signed-off-by: Daniel Kahn Gillmor --- mime-node.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/mime-node.c b/mime-node.c index 2a823dfd..ff6805bf 100644 --- a/mime-node.c

  1   2   3   4   5   6   7   8   9   10   >