Re: [pkg-gnupg-maint] Bug#842291: notmuch processes frequently stuck in select()

2016-11-25 Thread Werner Koch
On Wed, 23 Nov 2016 18:19, d...@fifthhorseman.net said:

>  0) turn off CRL updates entirely during s/mime signature verification

The gpgsm option is --disable-crl-checks.  

>  1) do s/mime signature verification without CRL updates, but schedule
> CRL checks to happen in the background for dirmngr, so that future
> verifications will reflect the cert validity

As above but use 

  dirmngr-client--url --load-crl URLOFCRL

You need to known the URL of the CRL, though.

>  2) have dirmngr avoid checking CRLs that it knows it has already
> updated recently

A CRL carries a next-update date which is homored by dirmngr.  Further
dirmngr doesn't avoids to download a CRL unless 30 minutes have passed
since the lassed download.

>  3) tell dirmngr to use much shorter CRL fetch timeouts

gpgsm -k  --enable-crl-check --force-crl-refresh  USERID

> that's a 20-second lag between each failed check, adding up to 80

That seems to be caused by DNS lookups.  For example ADNS keeps on
trying even if it has received an ENETUNREACH and thus no UDP query
packet has been sent out.   We will very likely replace ADNS by a more
flexible library in the next GnuPG version.


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.


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


Re: [PATCH v2 4/9] notmuch-emacs-mua: add --hello parameter

2016-11-25 Thread Tomi Ollila
On Mon, Nov 21 2016, Jani Nikula  wrote:

> If the --hello parameter is given, display the notmuch hello buffer
> instead of the message composition buffer if no message composition
> parameters are given.

+1 for --hello option

Tomi

>
> Signed-off-by: Jani Nikula 
> ---
>  doc/man1/notmuch-emacs-mua.rst | 4 
>  emacs/notmuch-emacs-mua| 8 +++-
>  2 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/doc/man1/notmuch-emacs-mua.rst b/doc/man1/notmuch-emacs-mua.rst
> index b80aa5f9b2e5..87787e20e531 100644
> --- a/doc/man1/notmuch-emacs-mua.rst
> +++ b/doc/man1/notmuch-emacs-mua.rst
> @@ -33,6 +33,10 @@ Supported options for **emacs-mua** include
>  ``-i, --body=``\ 
>  Specify a file to include into the body of the message.
>  
> +``--hello``
> +Go to the Notmuch hello screen instead of the message composition
> +window if no message composition parameters are given.
> +
>  ``--no-window-system``
>  Even if a window system is available, use the current terminal.
>  
> diff --git a/emacs/notmuch-emacs-mua b/emacs/notmuch-emacs-mua
> index 98103972f400..a521497784ec 100755
> --- a/emacs/notmuch-emacs-mua
> +++ b/emacs/notmuch-emacs-mua
> @@ -40,6 +40,7 @@ AUTO_DAEMON=
>  CREATE_FRAME=
>  ELISP=
>  MAILTO=
> +HELLO=
>  
>  # Short options compatible with mutt(1).
>  while getopts :s:c:b:i:h opt; do
> @@ -63,7 +64,7 @@ while getopts :s:c:b:i:h opt; do
>   opt=${opt%%=*}
>   ;;
>   # Long options without arguments.
> - 
> --help|--print|--no-window-system|--client|--auto-daemon|--create-frame)
> + 
> --help|--print|--no-window-system|--client|--auto-daemon|--create-frame|--hello)
>   ;;
>   *)
>   echo "$0: unknown long option ${opt}, or argument 
> mismatch." >&2
> @@ -112,6 +113,9 @@ while getopts :s:c:b:i:h opt; do
>   --create-frame)
>   CREATE_FRAME="-c"
>   ;;
> + --hello)
> + HELLO=1
> + ;;
>   *)
>   # We should never end up here.
>   echo "$0: internal error (option ${opt})." >&2
> @@ -146,6 +150,8 @@ if [ -n "${MAILTO}" ]; then
>   exit 1
>  fi
>  ELISP="(browse-url-mail \"${MAILTO}\")"
> +elif [ -z "${ELISP}" -a -n "${HELLO}" ]; then
> +ELISP="(notmuch)"
>  else
>  ELISP="(notmuch-mua-new-mail) ${ELISP}"
>  fi
> -- 
> 2.1.4
>
> ___
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH v2 8/9] build: install notmuch-emacs-mua.desktop file with emacs

2016-11-25 Thread Tomi Ollila
On Mon, Nov 21 2016, Jani Nikula  wrote:

> There is really no need to have a separate install target for the
> desktop file. Just install the desktop file with emacs, with a
> configure option to opt out.

This and the following patch could check with something like

if command -v desktop-file-install >/dev/null && 
   command -v update-desktop-database >/dev/null; then
WITH_DESKTOP=1
else
WITH_DESKTOP=0
fi

So that poor n00b users (relatively speaking) installing notmuch-emacs
e.g. on server systems (or on any other system that does not have these
magic commands) don't get install failure.

Alternatively errors of these could be silently ignored, but then
one is left with extra "$(DESTDIR)$(desktop_dir)" directory.

Tomi

> ---
>  configure| 13 +
>  emacs/Makefile.local |  5 ++---
>  2 files changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/configure b/configure
> index f0fc466eead5..27afc8076c81 100755
> --- a/configure
> +++ b/configure
> @@ -70,6 +70,7 @@ LIBDIR=
>  WITH_DOCS=1
>  WITH_API_DOCS=1
>  WITH_EMACS=1
> +WITH_DESKTOP=1
>  WITH_BASH=1
>  WITH_RUBY=1
>  WITH_ZSH=1
> @@ -141,6 +142,7 @@ Some features can be disabled (--with-feature=no is 
> equivalent to
>   --without-docs  Do not install documentation
>   --without-api-docs  Do not install API man page
>   --without-emacs Do not install lisp file
> + --without-desktop   Do not install desktop file
>   --without-ruby  Do not install ruby bindings
>   --without-zsh-completionDo not install zsh completions files
>   --without-retry-lockDo not use blocking xapian opens, even 
> if available
> @@ -209,6 +211,14 @@ for option; do
>   fi
>  elif [ "${option}" = '--without-emacs' ] ; then
>   WITH_EMACS=0
> +elif [ "${option%%=*}" = '--with-desktop' ]; then
> + if [ "${option#*=}" = 'no' ]; then
> + WITH_DESKTOP=0
> + else
> + WITH_DESKTOP=1
> + fi
> +elif [ "${option}" = '--without-desktop' ] ; then
> + WITH_DESKTOP=0
>  elif [ "${option%%=*}" = '--with-bash-completion' ]; then
>   if [ "${option#*=}" = 'no' ]; then
>   WITH_BASH=0
> @@ -1123,6 +1133,9 @@ VALGRIND_CFLAGS = ${valgrind_cflags}
>  # Support for emacs
>  WITH_EMACS = ${WITH_EMACS}
>  
> +# Support for desktop file
> +WITH_DESKTOP = ${WITH_DESKTOP}
> +
>  # Support for bash completion
>  WITH_BASH = ${WITH_BASH}
>  
> diff --git a/emacs/Makefile.local b/emacs/Makefile.local
> index b47577ac1110..ffa8421ebd45 100644
> --- a/emacs/Makefile.local
> +++ b/emacs/Makefile.local
> @@ -96,10 +96,9 @@ endif
>   install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)"
>   mkdir -p "$(DESTDIR)$(prefix)/bin/"
>   install $(emacs_mua) "$(DESTDIR)$(prefix)/bin"
> -
> -.PHONY: install-desktop
> -install-desktop:
> +ifeq ($(WITH_DESKTOP),1)
>   mkdir -p "$(DESTDIR)$(desktop_dir)"
>   desktop-file-install --mode 0644 --dir "$(DESTDIR)$(desktop_dir)" 
> $(emacs_mua_desktop)
> +endif
>  
>  CLEAN := $(CLEAN) $(emacs_bytecode) $(dir)/notmuch-version.el 
> $(dir)/notmuch-pkg.el
> -- 
> 2.1.4
>
> ___
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: provide elpa packages

2016-11-25 Thread Tomi Ollila
On Sat, Nov 19 2016, David Bremner  wrote:

> This is an answer to the discussion we were having on irc the other day about 
> easily installing the emacs front-end for a single user.
>
> For users of package.el supporting emacs (iirc, emacs 24.1+), you can
>
> 1) make elpa
> 2) From within emacs M-x package-install-file  
> the-tarball-produced-in-step-1 
>
> That's it, no modifications of paths etc... required.
>
> [PATCH 1/2] build: Move variable definitions to Makefile.global
>
> This looks big, but it's just code movement. Of course with makefiles
> moving things around is not without peril, so test builds in various
> corner cases (e.g. not current Debian) would be a good idea

Series LGTM (especially Makefile.global)

Worked without hiccups on SL6.2)

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


Re: provide elpa packages

2016-11-25 Thread Tomi Ollila
On Fri, Nov 25 2016, Tomi Ollila  wrote:

> On Sat, Nov 19 2016, David Bremner  wrote:
>
>> This is an answer to the discussion we were having on irc the other day 
>> about easily installing the emacs front-end for a single user.
>>
>> For users of package.el supporting emacs (iirc, emacs 24.1+), you can
>>
>> 1) make elpa
>> 2) From within emacs M-x package-install-file  
>> the-tarball-produced-in-step-1 
>>
>> That's it, no modifications of paths etc... required.
>>
>> [PATCH 1/2] build: Move variable definitions to Makefile.global
>>
>> This looks big, but it's just code movement. Of course with makefiles
>> moving things around is not without peril, so test builds in various
>> corner cases (e.g. not current Debian) would be a good idea
>
> Series LGTM (especially Makefile.global)

(you could amend copying Makefile.global for out of tree builds -- or use
include $(srcdir)/Makefile.global)

>
> Worked without hiccups on SL6.2)
>
> Tomi
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 1/2] fix out of tree build for ruby bindings

2016-11-25 Thread Tomi Ollila
From: Tomi Ollila 

Ruby bindings source files had to be copied to the out-of-tree
target directory -- final obstacle avoiding that was that if
there were built object files in source directory, new target object
files were not built (caused link failure, fortunately).
---

The ruby-part fix of id:1479146030-17083-1-git-send-email-tomi.oll...@iki.fi

 bindings/Makefile.local  |  2 +-
 bindings/ruby/extconf.rb | 12 +++-
 configure|  6 ++
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/bindings/Makefile.local b/bindings/Makefile.local
index 11d11d4..61fe412 100644
--- a/bindings/Makefile.local
+++ b/bindings/Makefile.local
@@ -8,7 +8,7 @@ ifeq ($(HAVE_RUBY_DEV),1)
cd $(dir)/ruby && \
EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS)" \
LIBNOTMUCH="../../lib/$(LINKER_NAME)" \
-   ruby extconf.rb --vendor
+   SRCDIR=$(srcdir) ruby extconf.rb --vendor
$(MAKE) -C $(dir)/ruby
 endif
 
diff --git a/bindings/ruby/extconf.rb b/bindings/ruby/extconf.rb
index ddaa684..ed57d33 100644
--- a/bindings/ruby/extconf.rb
+++ b/bindings/ruby/extconf.rb
@@ -1,11 +1,21 @@
 #!/usr/bin/env ruby
 # coding: utf-8
 # Copyright 2010, 2011, 2012 Ali Polatel 
+# Out of tree build update: 2016 Tomi Ollila
 # Distributed under the terms of the GNU General Public License v3
 
 require 'mkmf'
 
-dir = File.join('..', '..', 'lib')
+# ENV['SRCDIR'] is build system's vision of source dir...
+srcroot = ENV['SRCDIR']
+# ...so fix it; expect hardcoded ../.. to work
+if srcroot == '.'
+  srcroot = File.join('..', '..')
+elsif srcroot[0] != '/'
+  srcroot = File.join('..', '..', srcroot)
+end
+
+dir = File.join(srcroot, 'lib')
 
 # includes
 $INCFLAGS = "-I#{dir} #{$INCFLAGS}"
diff --git a/configure b/configure
index f0fc466..22767c5 100755
--- a/configure
+++ b/configure
@@ -42,6 +42,12 @@ if [ "$srcdir" != "." ]; then
 # Emacs only likes to generate compiled files next to the .el files
 # by default so copy these as well (which is not ideal).
 cp -a "$srcdir"/emacs/*.el emacs
+
+# We were not able to create fully working Makefile using ruby mkmf.rb
+# so ruby bindings source files are copied as well (ditto -- not ideal).
+mkdir bindings/ruby
+cp -a "$srcdir"/bindings/ruby/*.[ch] bindings/ruby
+cp -a "$srcdir"/bindings/ruby/extconf.rb bindings/ruby
 fi
 
 # Set several defaults (optionally specified by the user in
-- 
2.10.0

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


[PATCH 2/2] fix (rest of the) out of tree build

2016-11-25 Thread Tomi Ollila
From: Tomi Ollila 

With working tests (on various Linux systems).
---

V3 of id:1479146030-17083-1-git-send-email-tomi.oll...@iki.fi

 configure   | 6 --
 test/test-lib-common.sh | 7 +++
 test/test-lib.sh| 4 ++--
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 22767c5..03dddce 100755
--- a/configure
+++ b/configure
@@ -348,8 +348,8 @@ int main(void) {
 return 0;
 }
 EOF
-if ${CC} ${CFLAGS} _libversion.c -o _libversion > /dev/null 2>&1 && \
-   ./_libversion > _libversion.sh && . ./_libversion.sh
+if ${CC} ${CFLAGS} -I"$srcdir" _libversion.c -o _libversion > /dev/null 2>&1 \
+   && ./_libversion > _libversion.sh && . ./_libversion.sh
 then
 printf "OK.\n"
 else
@@ -1165,6 +1165,8 @@ cat > sh.config < OUTPUT
 }
 
@@ -1217,7 +1217,7 @@ test_C () {
 exec_file="test${test_count}"
 test_file="${exec_file}.c"
 cat > ${test_file}
-${TEST_CC} ${TEST_CFLAGS} -I${TEST_DIRECTORY} -I${TEST_DIRECTORY}/../lib 
-o ${exec_file} ${test_file} -L${TEST_DIRECTORY}/../lib/ -lnotmuch -ltalloc
+${TEST_CC} ${TEST_CFLAGS} -I${TEST_DIRECTORY} -I${SOURCE_DIRECTORY}/lib -o 
${exec_file} ${test_file} -L${TEST_DIRECTORY}/../lib/ -lnotmuch -ltalloc
 echo "== stdout ==" > OUTPUT.stdout
 echo "== stderr ==" > OUTPUT.stderr
 ./${exec_file} "$@" 1>>OUTPUT.stdout 2>>OUTPUT.stderr
-- 
2.10.0

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


[PATCH] cli/new: document new exit code

2016-11-25 Thread David Bremner
It seems important to give the numeric return code for people writing
scripts. Hopefully deviations from this convention are rare.
---
 doc/man1/notmuch-new.rst | 8 
 1 file changed, 8 insertions(+)

diff --git a/doc/man1/notmuch-new.rst b/doc/man1/notmuch-new.rst
index 787ed78..7f0b223 100644
--- a/doc/man1/notmuch-new.rst
+++ b/doc/man1/notmuch-new.rst
@@ -43,6 +43,14 @@ Supported options for **new** include
 ``--quiet``
 Do not print progress or results.
 
+EXIT STATUS
+===
+
+This command supports the following special exit status code
+
+``75 (EX_TEMPFAIL)``
+A temporary failure occured; the user is invited to retry.
+
 SEE ALSO
 
 
-- 
2.10.2

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