aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-03-25Merge branch 'release'David Bremner
wildcard search fixes, plus release busywork
2017-03-25debian: start changelog for 0.24.1-1David Bremner
2017-03-25version: bump to 0.24.1David Bremner
The release is not yet finalized, but start the busywork needed.
2017-03-25tests: add compatibility layerMikhail
Make test-lib-common.sh load test-lib-<$PLATFORM>.sh to create additional shim for platform specifics. Use test-lib-FREEBSD.sh to call GNU utilities instead of native ones. - amended by db following Tomi's suggestions
2017-03-24lib: only trigger phrase processing for regexp fields when neededDavid Bremner
The argument is that if the string passed to the field processor has no spaces, then the added quotes won't have any benefit except for disabling wildcards. But disabling wildcards doesn't seem very useful in the normal Xapian query parser, since they're stripped before generating terms anyway. It does mean that the query 'from:"foo*"' will not be precisely equivalent to 'from:foo' as it is for the non field-processor version.
2017-03-24test: add known broken tests wildcard search in from and subjectDavid Bremner
This was broken by the addition of regexp searching. The detection of wildcards is not currently done in the recursive call to parse_query, because of quoting issues.
2017-03-22debian rename libnotmuch4 to libnotmuch5David Bremner
follow the SONAME bump
2017-03-22python: bump SOVERSION to 5David Bremner
Otherwise hilarity ensues when the python bindings try to use the new API against the old shared library.
2017-03-22lib: make notmuch_query_add_tag_exclude return a status valueDavid Bremner
Since this is an ABI breaking change, but we already bumped the SONAME for the next release
2017-03-22lib: replace deprecated n_q_count_threads with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We re-use the name for a status returning version, and deprecate the _st name.
2017-03-22lib: replace deprecated n_q_count_messages with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We re-use the name for a status returning version, and deprecate the _st name. One or two remaining uses of the (removed) non-status returning version fixed at the same time
2017-03-22lib: replace deprecated n_q_search_messages with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We re-use the name for a status returning version, and deprecate the _st name.
2017-03-22lib: replace n_query_search_threads with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We finally remove the deprecated API, and rename the status returning version to the simpler name. The status returning is kept as a deprecated alias.
2017-03-22lib: bump SONAME to libnotmuch5David Bremner
We plan a sequence of ABI breaking changes. Put the SONAME change in a separate commit to make reordering easier.
2017-03-19debian: changelog stanza for 0.23.7-2debian/0.23.7-2David Bremner
2017-03-19lib/message.cc: fix Coverity finding (use after free)Tomi Ollila
The object where pointer to `data` was received was deleted before it was used in _notmuch_string_list_append(). Relevant Coverity messages follow: 3: extract Assigning: data = std::__cxx11::string(message->doc.()).c_str(), which extracts wrapped state from temporary of type std::__cxx11::string. 4: dtor_free The internal representation of temporary of type std::__cxx11::string is freed by its destructor. 5: use after free: Wrapper object use after free (WRAPPER_ESCAPE) Using internal representation of destroyed object local data. (cherry picked from commit 06adc276682d1d5f73d78df2e898ad4191eb4499)
2017-03-18rename libutil.a to libnotmuch_util.aDavid Bremner
Apparently some systems (MacOS?) have a system library called libutil and the name conflict causes problems. Since this library is quite notmuch specific, rename it to something less generic.
2017-03-18Merge branch 'release'David Bremner
Merge in memory fixes
2017-03-18lib/message.cc: fix Coverity finding (use after free)Tomi Ollila
The object where pointer to `data` was received was deleted before it was used in _notmuch_string_list_append(). Relevant Coverity messages follow: 3: extract Assigning: data = std::__cxx11::string(message->doc.()).c_str(), which extracts wrapped state from temporary of type std::__cxx11::string. 4: dtor_free The internal representation of temporary of type std::__cxx11::string is freed by its destructor. 5: use after free: Wrapper object use after free (WRAPPER_ESCAPE) Using internal representation of destroyed object local data.
2017-03-18cli/show: unref crlf filter.David Bremner
Mimic the handling of the other filter g_objects. This cleans up a fair sized memory leak.
2017-03-18cli/show: fix usage of g_mime_content_type_to_stringDavid Bremner
It returns an "allocated string", which needs to be freed.
2017-03-18cli/show: fix some memory leaks in format_part_textDavid Bremner
Mimic Jeff Stedfast's changes to format_headers_sprinter, clean up use of internet_address_list_to_string and g_mime_message_get_date_as_string.
2017-03-18fix memory leaks in notmuch-show.c:format_headers_sprinter()Jeffrey Stedfast
Internet_address_list_to_string() and g_mime_message_get_date_as_string() return allocated string buffers and not const, so from what I can tell from taking a look at the sprinter-sexp.c’s sexp_string() function, the code leaks the recipients_string as well as the date string.
2017-03-18perf-test/mem: add simple memory tests for notmuch searchDavid Bremner
Just copy and replace from the show tests. Currently these show no major leaks.
2017-03-18perf-test: add simple memory tests for notmuch-showDavid Bremner
These are probably too slow to run with the full corpus
2017-03-18perf-test: use 'eval' in memory_runDavid Bremner
This allows the use of redirection in the tests
2017-03-15test-databases: use wget or curl to download test databasesTomi Ollila
Often Linux systems are shipped with wget(1) by default (and no curl). Many BSDs, macOS, and e.g. some Linux minimal/container images comes with curl(1) (and no wget). Attempting to download with curl if wget is not available increases the likelihood for this to succeed.
2017-03-15lib: clamp return value of g_mime_utils_header_decode_date to >=0David Bremner
For reasons not completely understood at this time, gmime (as of 2.6.22) is returning a date before 1900 on bad date input. Since this confuses some other software, we clamp such dates to 0, i.e. 1970-01-01.
2017-03-15lib: add known broken test for parsing bad dates.David Bremner
This reproduces the symptoms of bug report id:20150422065630.6330.90536@hoothoot
2017-03-13emacs: use epg-gpg-programJohn Byrnes
Adjusted notmuch-crypto gpg call-process function to respect the GPG program set by the EasyPG epg-gpg-program variable. This is to correct a problem observed on NixOS where only gpg2 is installed by default. The Notmuch Emacs frontend fails when trying to access someone's key to verify their signature when it cannot find the GPG binary.
2017-03-12Merge branch 'release'David Bremner
final 0.24 release
2017-03-12build: replace remaining uses of SHA1_FILE0.24David Bremner
oops. If only there was some editor facility that allowed replacing all instances of a string.
2017-03-12debian: changelog stanza for 0.24-1David Bremner
2017-03-12NEWS: set release dateDavid Bremner
2017-03-12version: bump to 0.24David Bremner
2017-03-12fix out of tree testsTomi Ollila
Use $NOTMUCH_SRCDIR/ instead of $TEST_DIRECTORY/../ (in those 2 places) where reference to source directory instead of build directory is required.
2017-03-12fix out of tree buildTomi Ollila
In addition to use ${srcdir} and deliver ${NOTMUCH_SRCDIR} where needed, source from ruby bindings had to be copied to the out-of-tree target directory -- if the source files in source directory were referenced in build and there were also built object files there, those could have been considered as target files (and then not found when attempting to create bindings/ruby/notmuch.so).
2017-03-12configure: add ${NOTMUCH_SRCDIR} -- absolute path to notmuch sourceTomi Ollila
The ${srcdir} -- usually relative path to notmuch source -- works fine in current ./configure and all makefiles. To have simple access to notmuch source in tests and out of tree builds holding absolute path to the source directory is useful.
2017-03-10lib/database: reduce try block scope to things that really need itJani Nikula
No need to maintain the pure C stuff within a try block, it's arguably confusing. This also reduces indent for a bunch of code. No functional changes.
2017-03-10test: atomicity.py: improve exit probability on failureTomi Ollila
Some gdb python exceptions on some os environments (e.g. macOS Sierra, non-codesigned gdb) do not make gdb exit (but to drop down to nonexistent command line?). Mitigate this chance by explict SystemExit on all exceptions. The contents of output file 'gdb.out' is unchanged.
2017-03-10support make goals after initial {'', dist, data}clean goal(s)Tomi Ollila
Now make goal combinations starting with *clean goals, ending with *clean coals, and having non-*clean goals in between should work. What does not expected to work are non-*clean - *clean - *non-clean goal combinations. Also, if first goals are *clean goals, re-creation of Makefile.config is inhibited when Makefile.config exists and ./configure is newer.
2017-03-10cli: do not initialize zero values with designated initializersJani Nikula
Let the language initialize defaults to zero when some values are initialized to non-zero values. No functional changes.
2017-03-10cli: simplify mime node walkJani Nikula
The function is more straighforward to read when it's clear that the only non-NULL return is at one place. No functional changes.
2017-03-10cli/show: move formatter structs closer to where they're neededJani Nikula
The formatter structs are only needed for the formatter array initialization. Move them closer to use. This also lets us drop some forward declarations. No functional changes.
2017-03-10cli/show: group --entire-thread option handling into one placeJani Nikula
The --entire-thread option handling is split around, making the logic harder to follow than necessary. Put it in one place. While at it, make the true/false values match notmuch_bool_t values for simplicity. No functional changes.
2017-03-10cli/show: rename format_sel to simply formatJani Nikula
Now that the format pointer is a temporary variable, and named formatter, shorten format_sel to format. No functional changes.
2017-03-10cli/show: use a table for choosing the formatterJani Nikula
Continue detangling format pointer and format selection variables. No functional changes.
2017-03-10cli/show: consistently use format_sel for checking the formatJani Nikula
The mixed use of the format pointer and the format selection variables is confusing. Add more clarity by using format_sel alone. No functional changes.
2017-03-10cli/show: remove unused raw member from show parameters structJani Nikula
The raw member has been unused since b1130bc71c02 ("show: Convert raw format to the new self-recursive style, properly support interior parts"). Good riddance. No functional changes.
2017-03-10cli/show: detangle overloading of params.part for single message displayJani Nikula
The use of params.part has become rather convoluted in notmuch show. Add another variable for selecting single message display to make the code easier to read. No functional changes.