aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-29cli: some keyword options can be supplied with no argumentDaniel Kahn Gillmor
We might change some notmuch command line tools that used to be booleans into keyword arguments. In that case, there are some legacy tools that will expect to be able to do "notmuch foo --bar" instead of "notmuch foo --bar=baz". This patch makes it possible to support that older API, while providing a warning and an encouragement to upgrade.
2017-12-29NEWS: Add nmbug 0.3 release notes to the notmuch 0.26 sectionW. Trevor King
2017-12-29nmbug: Bump to version 0.3W. Trevor King
Changes since 0.2: * Accept failures to unset core.worktree in clone (0a155847, 2017-10-10, unreleased). * Use --no-renames in log (f9189a06, 2016-09-26, v0.24). * Auto-checkout in clone if it wouldn't clobber (7ef3b653, 2017-10-10, unreleased). * Add a 'help' command for folks who don't like --help (9d25c97d, 2014-10-03, v0.20). * Setup a 'config' branch on clone to track origin/config (244f8739, 2015-03-22, v0.20). This branch may be consumed by notmuch-report(1). * Only error for invalid diff lines in tags/ (57225988, 2017-10-16, unreleased). * Ignore # comments in 'notmuch dump ...' output (9bbc54bd, 2016-03-27, v0.22). * Respect 'expect' in _spawn(..., wait=True) (e263c5b1, 2017-10-10, unreleased). * Update URLs in documentation (554b90b5 and 6a833a6e8, 2016-06-02, v0.23).
2017-12-28debian: update libnotmuch5.symbols for 0.26debian/0.26_rc0-10.26_rc0David Bremner
Several added symbols, no SONAME bump.
2017-12-28debian: changelog stanza for 0.26~rc0-1David Bremner
2017-12-28version: bump to 0.26~rc0David Bremner
2017-12-28make release archive: common (or no) timestampsTomi Ollila
The appended file 'version' has the same timestamp as the files added by `git archive`. The original file name and time stamp are no longer saved to the gzip header in resulting $(PACKAGE)-$(VERSION).tar.gz file. When build environment is close enough to another, this may provide mutually reproducible release archive files.
2017-12-28Revert "lib: add thread subqueries."David Bremner
This reverts commit 4f5bbaf7e2cecfe5022ba4b28915cccfb7ccb12d.
2017-12-27python: remove obsolete debian directoryDavid Bremner
It is unlikely this still works since it has not been updated since 2010. The python packages for debian are now built by the top level debian/ packaging.
2017-12-25lib: add thread subqueries.David Bremner
This change allows queries of the form thread:{from:me} and thread:{from:jian} and not thread:{from:dave} This is still somewhat brute-force, but it's a big improvement over both the shell script solution and the previous proposal [1], because it does not build the whole thread structure just generate a query. A further potential optimization is to replace the calls to notmuch with more specialized Xapian code; in particular it's not likely that reading all of the message metadata is a win here. [1]: id:20170820213240.20526-1-david@tethera.net
2017-12-24NEWS: document notmuch reindexDaniel Kahn Gillmor
Describe the introduction of the "reindex" subcommand. This blurb acknowledges Subject: instability under reindexing when multiple copies exist (suggesting that this is something that needn't necessarily hold up a release).
2017-12-24python: add decrypt_policy argument to Database.index_file()Daniel Kahn Gillmor
We adopt a pythonic idiom here with an optional argument, rather than exposing the user to the C indexopts object directly. This now includes a simple test to ensure that the decrypt_policy argument works as expected.
2017-12-24python: Fix method name in docsl-m-h@web.de
Fix a method rename in the docs that was overlooked in 3444c731d27fd42bbbdaae00af6ca48b4525b03b.
2017-12-21test: final named query test works regardless of Xapian FieldProcessorDaniel Kahn Gillmor
This test passes with older versions of Xapian as well, because neither query returns any results. This should resolve the travis build failure at https://travis-ci.org/notmuch/notmuch/builds/318571658 Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2017-12-21lib: return "" rather than NULL from notmuch_thread_get_authorsDavid Bremner
The current behaviour is at best under-documented. The modified test in T470-missing-headers.sh previously relied on printf doing the right thing with NULL, which seems icky. The use of talloc_strdup here is probably overkill, but it avoids having to enforce that thread->authors is never mutated outside _resolve_thread_authors_string.
2017-12-19test: retrying lock tests are broken when built against older XapianDaniel Kahn Gillmor
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.
2017-12-19test: named query tests are broken when missing Xapian FieldProcessorDaniel Kahn Gillmor
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.
2017-12-19test: searching by absolute date is broken without Xapian FieldProcessorDaniel Kahn Gillmor
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.
2017-12-19test: Add test to unset config items with the python bindingsl-m-h@web.de
2017-12-19python: Rename get_config_list to get_configsl-m-h@web.de
The old name has a bit of a feeling of hungarian notation. Also many generators in the core are named with the suffix "s" to indicate iterables: dict.items, dict.keys for example.
2017-12-19test: Add tests for new python bindingsl-m-h@web.de
The tests where adopted from the tests for the corresponding C functions in test/T590-libconfig.sh.
2017-12-19python: turn get_config_list into a generatorl-m-h@web.de
This mimics the behaviour of the underlying C function more closely as it also does not store all values in memory.
2017-12-19python: add default arg to get_config_listl-m-h@web.de
It makes the function a little more intuitive to use and does not diverge much from the original function signature. Also an example is added to the docstring.
2017-12-19python: add bindings to access configl-m-h@web.de
The C functions notmuch_database_get_config, notmuch_database_get_config_list and notmuch_database_set_config are part of the official C bindings. So there should also be some python bindings for them. Also they are the only way to access the named queries introduced in b9bf3f44. The interface of the python functions is designed to be close to the C functions.
2017-12-16nmbug: Only error for invalid diff lines in tags/W. Trevor King
Avoid: Traceback (most recent call last): File "/home/nmbug/bin/nmbug", line 834, in <module> args.func(**kwargs) File "/home/nmbug/bin/nmbug", line 385, in checkout status = get_status() File "/home/nmbug/bin/nmbug", line 580, in get_status maybe_deleted = _diff_index(index=index, filter='D') File "/home/nmbug/bin/nmbug", line 658, in _diff_index for id, tag in _unpack_diff_lines(stream=p.stdout): File "/home/nmbug/bin/nmbug", line 678, in _unpack_diff_lines 'Invalid line in diff: {!r}'.format(line.strip())) ValueError: Invalid line in diff: u'.mailmap' With this commit, folks can commit READMEs, .mailmap, etc. to their nmbug repositories, and 'nmbug diff' and 'status' won't choke on them. If you want to check for this sort of thing, you can set --log-level to info or greater. nmbug will still error if the unrecognized path is under tags/, since that's more likely to be a user error.
2017-12-15test: test regexp based new.ignoreJani Nikula
Just some basics.
2017-12-15cli/new: support /<regex>/ in new.ignoreJani Nikula
Add support for using /<regex>/ style regular expressions in new.ignore, mixed with the old style verbatim file and directory basenames. The regex is matched against the relative path from the database path.
2017-12-14doc: arrange search prefix documentation in a definition listJani Nikula
Having first a list of prefixes followed by detailed descriptions was viable when we didn't have all that many prefixes. Now, arranging the prefix descriptions in a definition list makes more sense. While at it, include all the supported prefix forms, especially some missing regex ones.
2017-12-14cli: add support for only printing the addresses in notmuch addressJani Nikula
The notmuch address output is much more useful for scripts with just the addresses printed. Support this using the --output=address option.
2017-12-13test: expand argument parsing sanity checksJani Nikula
Test the various boolean formats and --no- prefixed boolean and keyword flag arguments.
2017-12-13cli: use the negating boolean support for new and insert --no-hooksJani Nikula
This lets us use the positive hooks variable in code, increasing clarity.
2017-12-13cli: add support for --no- prefixed boolean and keyword flag argumentsJani Nikula
Add transparent support for negating boolean and keyword flag arguments using --no-argument style on the command line. That is, if the option description contains a boolean or a keyword flag argument named "argument", --no-argument will match and negate it. For boolean arguments this obviously means the logical NOT. For keyword flag arguments this means bitwise AND of the bitwise NOT, i.e. masking out the specified bits instead of OR'ing them in. For example, you can use --no-exclude instead of --exclude=false in notmuch show. If we had keyword flag arguments with some flags defaulting to on, say --include=tags in notmuch dump/restore, this would allow --no-include=tags to switch that off while not affecting other flags. As a curiosity, you should be able to warp your brain using --no-exclude=true meaning false and --no-exclude=false meaning true if you wish. Specifying both "argument" and "no-argument" style arguments in the same option description should be avoided. In this case, --no-argument would match whichever is specified first, and --argument would only match "argument".
2017-12-12Standards-Version: bumped to 4.1.2 (no changes needed)Daniel Kahn Gillmor
2017-12-11cli/help,completion: added pointers to notmuch-properties(7)Daniel Kahn Gillmor
2017-12-11nmbug: Auto-checkout in clone if it wouldn't clobberW. Trevor King
We currently auto-checkout after pull and merge to make those more convenient. They're guarded against data-loss with a leading _insist_committed(). This commit adds the same convenience to clone, since in most cases users will have no NMBPREFIX-prefixed tags in their database when they clone. Users that *do* have NMBPREFIX-prefixed tags will get a warning (and I've bumped the default log level to warning so folks who don't set --log-level will see it) like: $ nmbug clone http://nmbug.notmuchmail.org/git/nmbug-tags.git Cloning into '/tmp/nmbug-clone.g9dvd0tv'... Checking connectivity: 16674, done. Branch config set up to track remote branch config from origin. Not checking out to avoid clobbering existing tags: notmuch::0.25, ...
2017-12-11nmbug: Accept failures to unset core.worktree in cloneW. Trevor King
Since 6311cfaf (init: do not set unnecessary core.worktree, 2016-09-25, 2.11.0 [1]), Git has no longer set core.worktree when --separate-git-dir is used. This broke clone with: $ nmbug clone http://nmbug.notmuchmail.org/git/nmbug-tags.git Cloning into '/tmp/nmbug-clone.33gg442e'... Checking connectivity: 16674, done. ['git', '--git-dir', '/home/wking/.nmbug', 'config', '--unset', 'core.worktree'] exited with 5 $ echo $? 1 The initial discussion that lead to the Git change is in [2], and there is some more discussion around this specific change in [3]. There is some useful background on working trees in this 2009 message [4]. There is also a git-worktree(1) since df0b6cfb (worktree: new place for "git prune --worktrees", 2015-06-29, 2.5.0 [5]) which grew the ability to add new worktrees in 799767cc (Merge branch 'es/worktree-add', 2015-07-13, 2.5.0 [6]). Folks relying on core.worktree in the --separate-git-dir case fall into the "former case" in [4], and as Junio pointed out in that message, Git operations like 'add' don't really work there. In nmbug we don't want core.worktree, because our effective working tree is the notmuch database. By accepting failed core.worktree unsets, clone will work with Gits older and younger than 2.11.0. [1]: https://github.com/git/git/commit/6311cfaf93716bcc43dd1151cb1763e3f80d8099 [2]: https://public-inbox.org/git/CALqjkKZO_y0DNcRJjooyZ7Eso7yBMGhvZ6fE92oO4Su7JeCeng@mail.gmail.com/ [3]: https://public-inbox.org/git/87h94d8cwi.fsf@kyleam.com/ [4]: https://public-inbox.org/git/7viqbsw2vn.fsf@alter.siamese.dyndns.org/ [5]: https://github.com/git/git/commit/df0b6cfbda88144714541664fb501146d6465a82 [6]: https://github.com/git/git/commit/799767cc98b2f8e6f82d0de4bef9b5e8fcc16e97 Reported-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2017-12-11nmbug: Respect 'expect' in _spawn(..., wait=True)W. Trevor King
Fixing a bug from 7f2cb3be (nmbug: Translate to Python, 2014-10-03). The bug had no direct impact though, because none of the wait=True callers were setting expect. Also add expected codes to the debug messages, to help log readers understand why nonzero exits are occasionally accepted.
2017-12-08Merge branch 'release'David Bremner
Conflicts: NEWS Add in NEWS from point release
2017-12-08debian: add changelog stanza for 0.25.3-10.25.3David Bremner
2017-12-08debian: disable gdb on alphaDavid Bremner
gdb seems to be broken on more architectures than it works :(.
2017-12-08INSTALL: suggest gmime-3.xDavid Bremner
Since we deprecated support for GMime 2.6...
2017-12-08debian: add versioned depends on libgmimeDavid Bremner
2017-12-08NEWS: news for 0.25.3David Bremner
2017-12-08version: bump to 0.25.3David Bremner
2017-12-08test/emacs: add exploit mitigation testDavid Bremner
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.
2017-12-08emacs: letf enriched-decode-display-prop for text/enriched displayTomi 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.
2017-12-08crypto: signature verification reports valid User IDsDaniel Kahn Gillmor
When i'm trying to understand a message signature, i care that i know who it came from (the "validity" of the identity associated with the key), *not* whether i'm willing to accept the keyholder's other identity assertions (the "trust" associated with the certificate). We've been reporting User ID information based on the "trust" associated with the certificate, because GMime didn't clearly expose the validity of the User IDs. This change relies on fixes made in GMime 3.0.3 and later which include https://github.com/jstedfast/gmime/pull/18.
2017-12-08docs: clean up documentation about decryption policiesDaniel Kahn Gillmor
Now that the range of sensible decryption policies has come into full view, we take a bit of space to document the distinctions. Most people will use either "auto" or "true" -- but we provide "false" and "nostash" to handle use cases that might reasonably be requested. Note also that these can be combined in sensible ways. Like, if your mail comes in regularly to a service that doesn't have access to your secret keys, but does have access to your index, and you feel comfortable adding selected encrypted messages to the index after you've read them, you could stay in "auto" normally, and then when you find yourself reading an indexable message (e.g. one you want to be able to search for in the future, and that you don't mind exposing to whatever entities have access to your inde), you can do: notmuch reindex --decrypt=true id:whatever@example.biz That leaves your default the same (still "auto") but you get the cleartext index and stashed session key benefits for that particular message.
2017-12-08crypto: add --decrypt=nostash to avoid stashing session keysDaniel Kahn Gillmor
Here's the configuration choice for people who want a cleartext index, but don't want stashed session keys. Interestingly, this "nostash" decryption policy is actually the same policy that should be used by "notmuch show" and "notmuch reply", since they never modify the index or database when they are invoked with --decrypt. We take advantage of this parallel to tune the behavior of those programs so that we're not requesting session keys from GnuPG during "show" and "reply" that we would then otherwise just throw away.
2017-12-08crypto: actually stash session keys when decrypt=trueDaniel Kahn Gillmor
If you're going to store the cleartext index of an encrypted message, in most situations you might just as well store the session key. Doing this storage has efficiency and recoverability advantages. Combined with a schedule of regular OpenPGP subkey rotation and destruction, this can also offer security benefits, like "deletable e-mail", which is the store-and-forward analog to "forward secrecy". But wait, i hear you saying, i have a special need to store cleartext indexes but it's really bad for me to store session keys! Maybe (let's imagine) i get lots of e-mails with incriminating photos attached, and i want to be able to search for them by the text in the e-mail, but i don't want someone with access to the index to be actually able to see the photos themselves. Fret not, the next patch in this series will support your wacky uncommon use case.