aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-07-14lib: catch Xapian exceptions in n_m_add_tagDavid Bremner
This is mostly just (horizontal) code movement due to wrapping everything in a try / catch.
2020-07-14test: add known broken test for n_m_add_tag with closed dbDavid Bremner
Exception will be caught in next commit.
2020-07-14lib: catch Xapian exceptions in n_m_count_filesDavid Bremner
This will require some care for the caller to check the sign, and not just add error returns into a running total.
2020-07-14test: add known broken test for n_m_count_filesDavid Bremner
This will be fixed in the next commit.
2020-07-14lib: catch Xapian exceptions in n_m_get_tagsDavid Bremner
This allows the function to return an error value rather than crashing.
2020-07-14test: add known broken test for n_m_get_tagsDavid Bremner
This will be fixed in the next commit.
2020-07-14lib: use LOG_XAPIAN_EXCEPTION in n_m_get_dateDavid Bremner
This should not change functionality, but does slightly reduce code duplication. Perhaps more importantly it allows consistent changes to all of the similar exception handling in message.cc.
2020-07-14lib: add regression test for n_m_get_date; clarify APIDavid Bremner
This function catches Xapian exceptions. The test is intended to make sure it stays that way.
2020-07-13test: add known broken for n_m_get_flag on closed dbDavid Bremner
Exception caught in next commit. Note that FLAG_GHOST is the only one that triggers the I/O code path.
2020-07-13lib: catch exceptions in n_m_get_filenamesDavid Bremner
This is essentially copied from the change to notmuch_message_get_filename
2020-07-13test: add known broken test for n_m_get_filenamesDavid Bremner
This will be fixed in the next commit
2020-07-13lib/n_m_g_filename: catch Xapian exceptions, document NULL returnDavid Bremner
This is the same machinery as applied for notmuch_message_get_{thread,message}_id
2020-07-13lib: add known broken test for notmuch_message_get_filenameDavid Bremner
This will be fixed in the next commit
2020-07-13lib/n_m_get_replies: doc return, initial regression testDavid Bremner
We need to to set a query and retrieve the threads to meaningfully test this function.
2020-07-13test: add regression test for n_m_get_headerDavid Bremner
This function already catches Xapian exceptions, and we want to make sure it stays that way.
2020-07-13lib/message: use LOG_XAPIAN_EXCEPTION in n_m_get_headerDavid Bremner
This is just for consistency, and a small reduction in the amount of boilerplate.
2020-07-13test: drop use of assert in closed db testsDavid Bremner
Instead of printing the same static string for each test, can replace the assert with something simpler (or at least easier to integrate into the test suite).
2020-07-13test: remove unused backup_database callsDavid Bremner
Since these backups are never restored, they should be safe to remove.
2020-07-11debian: drop ValueRangeProcessor symbolsDavid Bremner
These are not used since b90d852
2020-07-11test: drop upgrade from v1 testsDavid Bremner
These are less crucial since we stopped generating new database versions and relied primarily on features. They also rely on a pre-generated v1 database which happens to be chert format. This backend is not supported by Xapian 1.5. Also drop the tool gen-testdb.sh, which is currently broken, due to changes in the testing infrastructure.
2020-07-11lib: migrate from Xapian ValueRangeProcessor to RangeProcessorDavid Bremner
This will be mandatory as of Xapian 1.5. The API is also more consistent with the FieldProcessor API, which helps code re-use a bit. Note that this switches to using the built-in Xapian support for prefixes on ranges (i.e. deleted code at beginning of ParseTimeRangeProcessor::operator(), added prefix to constructor). Another side effect of the migration is that we are generating smaller queries, using one OP_VALUE_RANGE instead of an AND of two OP_VALUE_* queries.
2020-07-11lib: migrate to post Xapian 1.3.4 compact supportDavid Bremner
The old API was deprecated in Xapian 1.3.4 and (will be) removed in 1.5.0
2020-07-11doc: make gzipped man pages reproducibleJonas Witschel
gzip includes the name of the uncompressed file and its modification timestamp into the compressed archive. The latter makes it hard to reproduce the generated files bit for bit at a later time, so omit this information from the archive using the "--no-name" option. This is a reproducibility best practice, see https://wiki.debian.org/ReproducibleBuilds/TimestampsInGzipHeaders
2020-07-10Merge branch 'release'David Bremner
2020-07-10NEWS: update date for releasedebian/0.30-1archive/debian/0.30-10.30David Bremner
2020-07-10debian: changelog for 0.30David Bremner
2020-07-10version: set to 0.30David Bremner
2020-07-03lib/message: catch exception in n_m_get_thread_idDavid Bremner
This allows us to return an error value from the library.
2020-07-03test: add known broken test for n_m_get_thread_id on closed dbDavid Bremner
This will be fixed in the next commit.
2020-07-03lib: catch error from closed db in n_m_get_message_idDavid Bremner
By catching it at the library top level, we can return an error value.
2020-07-03test: add known broken test for error handling on closed databaseDavid Bremner
Based on id:87d05je1j6.fsf@powell.devork.be
2020-07-03build: produce signatures for release candidate tarballs.debian/0.30_rc3-10.30_rc3David Bremner
Today Defalos on #notmuch asked for a signed tarball for 0.30~rc2. This is a minimal change to support this in the future. The question of automagically uploading will need more thought; currently I like the fact that tags from pre-releases are only pushed manually.
2020-07-03test: fix python 3.8.4 related regression in T210-rawDavid Bremner
It seems (at least in 3.8.4~rc1-1 on Debian) that set_content requires at least one line.
2020-07-03debian: changelog fo 0.30~rc3-1David Bremner
2020-07-03version: bump to 0.30~rc3David Bremner
2020-07-03bindings/python-cffi: copy version file into bindings dirDavid Bremner
Attempt to avoid breaking "pip install ." As far as I can tell, we need to have a copy (not just a relative symlink) of the version file.
2020-07-03doc: update install suggestions for fedora derivativesDavid Bremner
Fedora still has an old gmime-devel which is 2.6.x. This is no longer supported by notmuch. Also apparently dnf is a better choice than yum.
2020-07-02tests: mark sig verification known-broken with session keys on buggy gpgmeDaniel Kahn Gillmor
We make use of the just-introduced configure test. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-07-02configure: can gpgme can verify signatures when decrypting with a session key?Daniel Kahn Gillmor
If https://dev.gnupg.org/T3464 is unresolved in the version of gpgme we are testing against, then we should know about it, because it affects the behavior of notmuch. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-06-26test: mark two tests broken on machines with 32 bit time_tDavid Bremner
I haven't traced the code path as exhaustively for the SMIME test, but the expiry date in question is larger then representable in a signed 32 bit integer.
2020-06-26configure: detect 64 bit time_tDavid Bremner
Certain tests involving timestamps > 32 bits cannot pass with the current libnotmuch API. We will avoid this issue for now by disabling those tests on "old" architectures with 32 bit time_t.
2020-06-26Makefile.global: drop -std=gnu99. C11 (or later) compiler requiredTomi Ollila
Since October 2018 building notmuch has actually required compiler that knows C11. Also this -std=gnu99 was not used in code compiled by configure, so in theory this could have caused problems... ...but no related reports have been sent, perhaps ever. Both gcc and clang has been shipping compilers supporting C11 (or later) by default for more than four years now. Therefore, just dropping -std=gnu99 (and not checking C11 compatibility for now, for simplicity) is easiest to do, and removes inconsistency between configure and build time compilations.
2020-06-19python-cffi: read version from notmuch version fileFloris Bruynooghe
This keeps it in sync with the main notmuch version which is less confusing to users.
2020-06-16debian: changelog stanza for 0.30~rc2-1debian/0.30_rc2-1archive/debian/0.30_rc2-1David Bremner
2020-06-16version: update to 0.30~rc2David Bremner
2020-06-16debian/copyright: update to match AUTHORSDavid Bremner
2020-06-16update AUTHORSDavid Bremner
Yay, we gained a new author, thanks Anton.
2020-06-16Support aborting the atomic contextFloris Bruynooghe
Since it is possible to use an atomic context to abort a number of changes support this usage. Because the only way to actually abort the transaction is to close the database this must also do so. Amended by db: Note the limitation requiring close is a limitation of the underlying notmuch API, which should be fixed in a future notmuch release.
2020-06-16Make messages returned by Thread objects ownedFloris Bruynooghe
This reverses the logic of StandaloneMessage to instead create a OwnedMessage. Only the Thread class allows retrieving messages more then once so it can explicitly create such messages. The added test fails with SIGABRT without the fix for the message re-use in threads being present.
2020-06-16python/notmuch2: do not destroy messages owned by a queryAnton Khirnov
Any messages retrieved from a query - either directly via search_messages() or indirectly via thread objects - are owned by that query. Retrieving the same message (i.e. corresponding to the same message ID / database object) several times will always yield the same C object. The caller is allowed to destroy message objects owned by a query before the query itself - which can save memory for long-lived queries. However, that message must then never be retrieved again from that query. The python-notmuch2 bindings will currently destroy every message object in Message._destroy(), which will lead to an invalid free if the same message is then retrieved again. E.g. the following python program leads to libtalloc abort()ing: import notmuch2 db = notmuch2.Database(mode = notmuch2.Database.MODE.READ_ONLY) t = next(db.threads('*')) msgs = list(zip(t.toplevel(), t.toplevel())) msgs = list(zip(t.toplevel(), t.toplevel())) Fix this issue by creating a subclass of Message, which is used for "standalone" message which have to be freed by the caller. Message class is then used only for messages descended from a query, which do not need to be freed by the caller.