Re: [PATCH 3/3] test/crypto: add_gnupg_home should have ultimate trust on "its own" key

2019-05-07 Thread Daniel Kahn Gillmor
On Tue 2019-05-07 06:50:29 -0300, David Bremner wrote:
> Daniel Kahn Gillmor  writes:
>
>> The typical use case for gpg is that if you control a secret key, you
>> mark it with "ultimate" ownertrust.
>>
>> The opaque --import-ownertrust mechanism is GnuPG's standard mechanism
>> to set up ultimate ownertrust (the ":6:" means "ultimate", for
>> whatever reason).
>
> I've pushed this series. Note that there is some extra burbling from gpg
> for me
>
> gpg: checking the trustdb
> gpg: marginals needed: 3  completes needed: 1  trust model: pgp
> gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u

i think that id:20190507130135.14898-1-...@fifthhorseman.net should
address this burbling.  thanks for calling it out. keeping the spew
to more managable levels is a laudatory goal.

   --dkg


signature.asc
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: bug#35370: notmuch-emacs: avoiding deprecated message-default-charset

2019-05-07 Thread Eli Zaretskii
> From: Noam Postavsky 
> Cc: Daniel Kahn Gillmor ,  da...@tethera.net,  
> notmuch@notmuchmail.org,  35...@debbugs.gnu.org
> Date: Tue, 07 May 2019 08:26:59 -0400
> 
> > Just remove any uses of it.  Why are you using it now?
> 
> Should we remove the remaining uses of it from Emacs too?

I think so, but I'd be happier if someone from the Gnus folks could
eyeball this patch.

Lars, any comments/objections?
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] test: avoid unnecessary extraction of the test fingerprint

2019-05-07 Thread Daniel Kahn Gillmor
FINGERPRINT is already exported by add_gnupg_home, so this is
unnecessary.  This change also happens to get rid of the superfluous
check-trustdb spew from the test suite that looked like this:

gpg: checking the trustdb
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u

Signed-off-by: Daniel Kahn Gillmor 
---
 test/T357-index-decryption.sh | 2 --
 1 file changed, 2 deletions(-)

diff --git a/test/T357-index-decryption.sh b/test/T357-index-decryption.sh
index c9cd5e30..8a2d4c02 100755
--- a/test/T357-index-decryption.sh
+++ b/test/T357-index-decryption.sh
@@ -8,8 +8,6 @@ test_description='indexing decrypted mail'
 ##
 
 add_gnupg_home
-# get key fingerprint
-FINGERPRINT=$(gpg --no-tty --list-secret-keys --with-colons --fingerprint | 
grep '^fpr:' | cut -d: -f10)
 
 # create a test encrypted message
 test_begin_subtest 'emacs delivery of encrypted message'
-- 
2.20.1

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] test: let the OS choose a port for smtp-dummy

2019-05-07 Thread Daniel Kahn Gillmor
On Tue 2019-05-07 07:20:49 -0300, David Bremner wrote:
> This should avoid potential collisions if we start running multiple
> smtp-dummy processes in parallel.

This is excellent, simple, and clearly the right thing to do.  I've
reviewed it, and am running it on my own development branch with no
problems.  Thanks, Bremner!

please merge.

   --dkg


signature.asc
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: parallelize test suite

2019-05-07 Thread David Bremner
"Rollins, Jameson"  writes:

> This is a simple patch series that will run the entire test suite in
> parallel if either the moreutils or GNU parallel utility is
> available.  On my 8-core machine the full test suite will now run in
> under 20 seconds, which is a pretty huge improvement.

I've taken the plunge and merged this series to master. I also posted an
update to smtp-dummy following Tomi's suggestion to bind to port 0.

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] test: let the OS choose a port for smtp-dummy

2019-05-07 Thread David Bremner
This should avoid potential collisions if we start running multiple
smtp-dummy processes in parallel.
---
 test/smtp-dummy.c | 15 ++-
 test/test-lib.sh  |  2 +-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/test/smtp-dummy.c b/test/smtp-dummy.c
index 71992edd..a7c1fe4f 100644
--- a/test/smtp-dummy.c
+++ b/test/smtp-dummy.c
@@ -129,6 +129,7 @@ main (int argc, char *argv[])
 int reuse;
 int background;
 int ret = 0;
+socklen_t addrlen;
 
 progname = argv[0];
 
@@ -191,7 +192,7 @@ main (int argc, char *argv[])
 
 memset (, 0, sizeof (addr));
 addr.sin_family = AF_INET;
-addr.sin_port = htons (25025);
+addr.sin_port = 0;
 addr.sin_addr = *(struct in_addr *) hostinfo->h_addr;
 err = bind (sock, (struct sockaddr *) , sizeof (addr));
 if (err) {
@@ -202,6 +203,18 @@ main (int argc, char *argv[])
goto DONE;
 }
 
+addrlen = sizeof (addr);
+err = getsockname (sock, (struct sockaddr *) , );
+if (err) {
+   fprintf (stderr, "Error: getsockname() failed: %s\n",
+strerror (errno));
+   close (sock);
+   ret = 1;
+   goto DONE;
+}
+
+printf ("smtp_dummy_port='%d'\n", ntohs (addr.sin_port));
+
 err = listen (sock, 1);
 if (err) {
fprintf (stderr, "Error: listen() failed: %s\n",
diff --git a/test/test-lib.sh b/test/test-lib.sh
index f5d367aa..507886ba 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -326,7 +326,7 @@ emacs_deliver_message ()
"(let ((message-send-mail-function 'message-smtpmail-send-it)
(mail-host-address \"example.com\")
   (smtpmail-smtp-server \"localhost\")
-  (smtpmail-smtp-service \"25025\"))
+  (smtpmail-smtp-service \"${smtp_dummy_port}\"))
   (notmuch-mua-mail)
   (message-goto-to)
   (insert \"test_su...@notmuchmail.org\nDate: 01 Jan 2000 12:00:00 
-\")
-- 
2.20.1

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 3/3] test/crypto: add_gnupg_home should have ultimate trust on "its own" key

2019-05-07 Thread David Bremner
Daniel Kahn Gillmor  writes:

> The typical use case for gpg is that if you control a secret key, you
> mark it with "ultimate" ownertrust.
>
> The opaque --import-ownertrust mechanism is GnuPG's standard mechanism
> to set up ultimate ownertrust (the ":6:" means "ultimate", for
> whatever reason).

I've pushed this series. Note that there is some extra burbling from gpg
for me

gpg: checking the trustdb
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] util/crypto: improve comment

2019-05-07 Thread David Bremner
Daniel Kahn Gillmor  writes:

> The comment line here lingers from when we were using some fancy
> version checking about session keys.  Correct it to match the current
> state.

pushed,

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] emacs: drop use of message-default-charset

2019-05-07 Thread David Bremner
Daniel Kahn Gillmor  writes:

> Apparently, message-default-charset is deprecated, which causes the
> following warning messages during the build:
>
>   In notmuch-maildir-setup-message-for-saving:
>   emacs/notmuch-maildir-fcc.el:172:31:Warning: ‘message-default-charset’ is an
>   obsolete variable (as of 26.1); The default charset comes from the
>   language environment
>
> In discussion with emacs upstream over on
> https://debbugs.gnu.org/35370, it appears that we can just drop this
> entirely and things should still work with emacs 25.

pushed

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 1/2] emacs: Move notmuch-search-interactive-region to notmuch-lib as notmuch-interactive-region

2019-05-07 Thread David Bremner


pushed this one patch to master.

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch