[PATCH 2/3] Revert "configure: add test for gpgconf --create-socketdir"
This reverts commit 12f7d4e61d30fb9a5c99e128ab1aab0bf069cdb4. Since we're not using gpgconf anymore, drop the unneeded test in configure. --- configure | 16 1 file changed, 16 deletions(-) diff --git a/configure b/configure index 46063b5d..f1773044 100755 --- a/configure +++ b/configure @@ -602,19 +602,6 @@ if [ $WITH_DOCS = "1" ] ; then fi fi -have_gpgconf_socketdir=0 -printf "Checking for gpgconf --{create,remove}-socketdir... " -if gpgconf --dump-options > /dev/null ; then -if gpgconf --dump-options | grep -q create-socketdir ; then - printf "Yes.\n" - have_gpgconf_socketdir=1 -else - printf "No.\n" -fi -else -printf "No. (missing or broken gpgconf?)\n" -fi - libdir_in_ldconfig=0 printf "Checking which platform we are on... " @@ -1192,9 +1179,6 @@ NOTMUCH_PYTHON=${python} # Are the ruby development files (and ruby) available? If not skip # building/testing ruby bindings. NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev} - -# Recent enough gnupg to support gpgconf --create-socketdir? -NOTMUCH_HAVE_GPGCONF_SOCKETDIR=${have_gpgconf_socketdir} EOF # Finally, after everything configured, inform the user how to continue. -- 2.11.0 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
[PATCH 3/3] test: move GNUPGHOME to TEST_TMPDIR
We already use this directory for dtach sockets, so it makes sense to put gnupg sockets there as well. There doesn't seem to be a clean way to put a fully functional socket in a different location than GNUPGHOME. --- test/test-lib-common.sh | 1 - test/test-lib.sh| 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh index 03ef1d2d..a96cfbeb 100644 --- a/test/test-lib-common.sh +++ b/test/test-lib-common.sh @@ -158,7 +158,6 @@ export HOME="${TMP_DIRECTORY}/home" mkdir -p "${HOME}" MAIL_DIR="${TMP_DIRECTORY}/mail" -export GNUPGHOME="${TMP_DIRECTORY}/gnupg" export NOTMUCH_CONFIG="${TMP_DIRECTORY}/notmuch-config" mkdir -p "${test}" diff --git a/test/test-lib.sh b/test/test-lib.sh index 86e792a8..518d9c7f 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -270,6 +270,8 @@ die () { GIT_EXIT_OK= # Note: TEST_TMPDIR *NOT* exported! TEST_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/notmuch-test-$$.XX") +# Put GNUPGHOME in TMPDIR to avoid problems with long paths. +export GNUPGHOME="${TEST_TMPDIR}/gnupg" trap 'trap_exit' EXIT trap 'trap_signal' HUP INT TERM -- 2.11.0 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Take two of making gpg using tests more robust.
It turns out the hardcoded use of /run/user in gpg doesn't work out that well in some environments, particularly autobuilders, since creating those directories is typically done by some login session manager like systemd-logind (or pam_systemd to be more precise). This is a more low-tech attempt, simply moving GNUPGHOME into /tmp/ ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
[PATCH 1/3] Revert "test: use gpgconf --create-socketdir if available"
This reverts commit e7b88e8b0a93ca83d807edc00e0c97af54c5b5f1. It turns out that this does not work well in environments without a running systemd (or some other provider of /run/user) --- test/test-lib.sh | 14 -- 1 file changed, 14 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index ba1580cd..86e792a8 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -229,19 +229,10 @@ test_fixed=0 test_broken=0 test_success=0 - -_shutdown_gpg_agent () { -if [ ${NOTMUCH_HAVE_GPGCONF_SOCKETDIR} = 1 ]; then - gpgconf --kill gpg-agent - gpgconf --remove-socketdir -fi -} - _exit_common () { code=$? trap - EXIT set +ex - _shutdown_gpg_agent rm -rf "$TEST_TMPDIR" } @@ -1285,11 +1276,6 @@ test_init_ () { . ./test-lib-common.sh || exit 1 -# we need the setting of GNUPGHOME in test-lib-common.sh -if [ ${NOTMUCH_HAVE_GPGCONF_SOCKETDIR} = 1 ]; then -gpgconf --create-socketdir -fi - emacs_generate_script -- 2.11.0 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 1/2] cli/config: don't try to open config file for 'notmuch help'
On Sun, Feb 26 2017, Jani Nikulawrote: > The help command does not really need to try to open the config > file. So don't. > > --- This series looks good, tests pass, repost of my patch seems to be unmodified (the power of running 2 emacses w/ notmuch rules!) In addition to `make test` I ran the following 3 commands: 104 HOME=/tmp/xyxz ./notmuch help 105 HOME=/tmp/xyxz ./notmuch nre 106 HOME=/tmp/xyxz ./notmuch new 107 HOME=/tmp/xyxz ./notmuch setup and these worked as expected. Tomi > > This will allow better error reporting such as > id:1483570332-11820-1-git-send-email-tomi.oll...@iki.fi while still > ensuring 'notmuch help' succeeds in the absence of config files. > --- > notmuch-client.h | 7 ++- > notmuch-config.c | 12 > notmuch.c| 34 +- > 3 files changed, 31 insertions(+), 22 deletions(-) > > diff --git a/notmuch-client.h b/notmuch-client.h > index 21b087980a17..1099122426af 100644 > --- a/notmuch-client.h > +++ b/notmuch-client.h > @@ -263,10 +263,15 @@ json_quote_str (const void *ctx, const char *str); > > /* notmuch-config.c */ > > +typedef enum { > +NOTMUCH_CONFIG_OPEN = 1 << 0, > +NOTMUCH_CONFIG_CREATE = 1 << 1, > +} notmuch_config_mode_t; > + > notmuch_config_t * > notmuch_config_open (void *ctx, >const char *filename, > - notmuch_bool_t create_new); > + notmuch_config_mode_t config_mode); > > void > notmuch_config_close (notmuch_config_t *config); > diff --git a/notmuch-config.c b/notmuch-config.c > index b202bb1e2299..959410cce7b8 100644 > --- a/notmuch-config.c > +++ b/notmuch-config.c > @@ -322,7 +322,7 @@ out: > notmuch_config_t * > notmuch_config_open (void *ctx, >const char *filename, > - notmuch_bool_t create_new) > + notmuch_config_mode_t config_mode) > { > GError *error = NULL; > size_t tmp; > @@ -356,9 +356,13 @@ notmuch_config_open (void *ctx, > > config->key_file = g_key_file_new (); > > -if (! get_config_from_file (config, create_new)) { > - talloc_free (config); > - return NULL; > +if (config_mode & NOTMUCH_CONFIG_OPEN) { > + notmuch_bool_t create_new = (config_mode & NOTMUCH_CONFIG_CREATE) != 0; > + > + if (! get_config_from_file (config, create_new)) { > + talloc_free (config); > + return NULL; > + } > } > > /* Whenever we know of configuration sections that don't appear in > diff --git a/notmuch.c b/notmuch.c > index b9c320329dd5..8e332ce64410 100644 > --- a/notmuch.c > +++ b/notmuch.c > @@ -33,7 +33,7 @@ typedef int (*command_function_t) (notmuch_config_t > *config, int argc, char *arg > typedef struct command { > const char *name; > command_function_t function; > -notmuch_bool_t create_config; > +notmuch_config_mode_t config_mode; > const char *summary; > } command_t; > > @@ -97,35 +97,35 @@ int notmuch_minimal_options (const char *subcommand_name, > } > > static command_t commands[] = { > -{ NULL, notmuch_command, TRUE, > +{ NULL, notmuch_command, NOTMUCH_CONFIG_OPEN | NOTMUCH_CONFIG_CREATE, >"Notmuch main command." }, > -{ "setup", notmuch_setup_command, TRUE, > +{ "setup", notmuch_setup_command, NOTMUCH_CONFIG_OPEN | > NOTMUCH_CONFIG_CREATE, >"Interactively set up notmuch for first use." }, > -{ "new", notmuch_new_command, FALSE, > +{ "new", notmuch_new_command, NOTMUCH_CONFIG_OPEN, >"Find and import new messages to the notmuch database." }, > -{ "insert", notmuch_insert_command, FALSE, > +{ "insert", notmuch_insert_command, NOTMUCH_CONFIG_OPEN, >"Add a new message into the maildir and notmuch database." }, > -{ "search", notmuch_search_command, FALSE, > +{ "search", notmuch_search_command, NOTMUCH_CONFIG_OPEN, >"Search for messages matching the given search terms." }, > -{ "address", notmuch_address_command, FALSE, > +{ "address", notmuch_address_command, NOTMUCH_CONFIG_OPEN, >"Get addresses from messages matching the given search terms." }, > -{ "show", notmuch_show_command, FALSE, > +{ "show", notmuch_show_command, NOTMUCH_CONFIG_OPEN, >"Show all messages matching the search terms." }, > -{ "count", notmuch_count_command, FALSE, > +{ "count", notmuch_count_command, NOTMUCH_CONFIG_OPEN, >"Count messages matching the search terms." }, > -{ "reply", notmuch_reply_command, FALSE, > +{ "reply", notmuch_reply_command, NOTMUCH_CONFIG_OPEN, >"Construct a reply template for a set of messages." }, > -{ "tag", notmuch_tag_command, FALSE, > +{ "tag", notmuch_tag_command, NOTMUCH_CONFIG_OPEN, >"Add/remove tags for all messages matching the search terms." }, > -{ "dump", notmuch_dump_command, FALSE, > +{ "dump", notmuch_dump_command, NOTMUCH_CONFIG_OPEN, >"Create a
notmuch release 0.23.6 now available
Where to obtain notmuch 0.23.6 === https://notmuchmail.org/releases/notmuch-0.23.6.tar.gz Which can be verified with: https://notmuchmail.org/releases/notmuch-0.23.6.tar.gz.sha1 0be0f43f46898fdc00f460b1e50df0be6700fdfc notmuch-0.23.6.tar.gz https://notmuchmail.org/releases/notmuch-0.23.6.tar.gz.sha1.asc (signed by David Bremner) What's new in notmuch 0.23.6 = Command Line Interface -- Fix read-after-free bug in `notmuch new`. Test Suite -- Use gpgconf --create-socketdir if available. GnuPG has a facility to use sockets in /run or /var/run to avoid problems with long socket paths, but this is not enabled by default for GNUPGHOME other than $HOME/.gnupg. Enable it, if possible. What is notmuch === Notmuch is a system for indexing, searching, reading, and tagging large collections of email messages in maildir or mh format. It uses the Xapian library to provide fast, full-text search with a convenient search syntax. For more about notmuch, see https://notmuchmail.org signature.asc Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH v2] emacs: show: stop display of application/* parts
On Mon, Feb 27 2017, Mark Walterswrote: > Hi > >>> But what will we do if the user has not customized it because she >>> /wants/ to display all possible things inline. I have not seen that this >>> patch is merged into master, and probably, when I have learned about >>> this variable, I think maybe it's better not to do it in the notmuch >>> code. > > Well they can set mm-inline-override-types to > "non-existent/type". Rather a kludge I agree. > >> The problem is that the gnus default is somehow unsafe, and causes bad >> behaviour for people receiving large attachments. > > I agree with this and do think we should block this by default. In > particular, gnus/mm stuff doesn't even check for the existence of unzip > before running it on zip attachments so on my machines which don't have > unzip I get a bodypart insertion error. > > One alternative would be to add a variable > notmuch-mm-inline-override-types which would combine or replace > mm-inline-override-types for notmuch's use. A defcustom would be > clutter, but a variable would mean anyone with unusual requirements > could just setq it. > > What does anyone think? patch is pushed, and that is good (i did not read the above content, so if I am not answering the right guestion, then ignore this ;) > > Best wishes > > Mark > > > > ___ > 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] emacs: show: stop display of application/* parts
Hi >> But what will we do if the user has not customized it because she >> /wants/ to display all possible things inline. I have not seen that this >> patch is merged into master, and probably, when I have learned about >> this variable, I think maybe it's better not to do it in the notmuch >> code. Well they can set mm-inline-override-types to "non-existent/type". Rather a kludge I agree. > The problem is that the gnus default is somehow unsafe, and causes bad > behaviour for people receiving large attachments. I agree with this and do think we should block this by default. In particular, gnus/mm stuff doesn't even check for the existence of unzip before running it on zip attachments so on my machines which don't have unzip I get a bodypart insertion error. One alternative would be to add a variable notmuch-mm-inline-override-types which would combine or replace mm-inline-override-types for notmuch's use. A defcustom would be clutter, but a variable would mean anyone with unusual requirements could just setq it. What does anyone think? Best wishes Mark ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch