mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-26 20:57:58 +01:00
Merge branch 'debian/bullseye' into debian/buster-backports
Update to current Debian stable
This commit is contained in:
commit
7059f0ed5d
20 changed files with 280 additions and 43 deletions
|
@ -36,7 +36,6 @@ endif
|
|||
endif
|
||||
|
||||
UPSTREAM_TAG=$(subst ~,_,$(VERSION))
|
||||
DEB_TAG=debian/$(UPSTREAM_TAG)-1
|
||||
|
||||
RELEASE_HOST=notmuchmail.org
|
||||
RELEASE_DIR=/srv/notmuchmail.org/www/releases
|
||||
|
|
|
@ -73,12 +73,11 @@ release: verify-source-tree-and-version
|
|||
$(MAKE) VERSION=$(VERSION) $(SHA256_FILE) $(DETACHED_SIG_FILE)
|
||||
ln -sf $(TAR_FILE) $(DEB_TAR_FILE)
|
||||
pristine-tar commit $(DEB_TAR_FILE) $(UPSTREAM_TAG)
|
||||
git tag -s -m "$(PACKAGE) Debian $(VERSION)-1 upload (same as $(VERSION))" $(DEB_TAG)
|
||||
mkdir -p releases
|
||||
mv $(TAR_FILE) $(SHA256_FILE) $(DETACHED_SIG_FILE) releases
|
||||
$(MAKE) VERSION=$(VERSION) release-message > $(PACKAGE)-$(VERSION).announce
|
||||
ifeq ($(REALLY_UPLOAD),yes)
|
||||
git push origin $(VERSION) $(DEB_TAG) release pristine-tar
|
||||
git push origin $(VERSION) release pristine-tar
|
||||
cd releases && scp $(TAR_FILE) $(SHA256_FILE) $(DETACHED_SIG_FILE) $(RELEASE_HOST):$(RELEASE_DIR)
|
||||
ssh $(RELEASE_HOST) "rm -f $(RELEASE_DIR)/LATEST-$(PACKAGE)-* ; ln -s $(TAR_FILE) $(RELEASE_DIR)/LATEST-$(TAR_FILE)"
|
||||
rsync --verbose --delete --recursive doc/_build/html/ $(RELEASE_HOST):$(DOC_DIR)
|
||||
|
@ -90,7 +89,6 @@ pre-release:
|
|||
$(MAKE) VERSION=$(VERSION) clean
|
||||
$(MAKE) VERSION=$(VERSION) test
|
||||
git tag -s -m "$(PACKAGE) $(VERSION) release" $(UPSTREAM_TAG)
|
||||
git tag -s -m "$(PACKAGE) Debian $(VERSION)-1 upload (same as $(VERSION))" $(DEB_TAG)
|
||||
$(MAKE) VERSION=$(VERSION) $(SHA256_FILE) $(DETACHED_SIG_FILE)
|
||||
ln -sf $(TAR_FILE) $(DEB_TAR_FILE)
|
||||
pristine-tar commit $(DEB_TAR_FILE) $(UPSTREAM_TAG)
|
||||
|
|
31
NEWS
31
NEWS
|
@ -1,3 +1,34 @@
|
|||
Notmuch 0.31.4 (2021-02-18)
|
||||
===========================
|
||||
|
||||
Library
|
||||
-------
|
||||
|
||||
Fix include bug triggered by glib 2.67.
|
||||
|
||||
Test
|
||||
----
|
||||
|
||||
Fix race condition in T568-lib-thread.
|
||||
|
||||
Notmuch 0.31.3 (2020-12-25)
|
||||
===========================
|
||||
|
||||
Bindings
|
||||
--------
|
||||
|
||||
Fix for exclude tags in notmuch2 bindings.
|
||||
|
||||
Build
|
||||
-----
|
||||
|
||||
Portability update for T360-symbol-hiding
|
||||
|
||||
Library
|
||||
-------
|
||||
|
||||
Fix for memory error in notmuch_database_get_config_list
|
||||
|
||||
Notmuch 0.31.2 (2020-11-08)
|
||||
===========================
|
||||
|
||||
|
|
|
@ -578,7 +578,7 @@ class Database(base.NotmuchObject):
|
|||
if exclude_tags is not None:
|
||||
for tag in exclude_tags:
|
||||
if isinstance(tag, str):
|
||||
tag = str.encode('utf-8')
|
||||
tag = tag.encode('utf-8')
|
||||
capi.lib.notmuch_query_add_tag_exclude(query_p, tag)
|
||||
return querymod.Query(self, query_p)
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
0.31.2
|
||||
0.31.4
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# this file should be kept in sync with ../../../version
|
||||
__VERSION__ = '0.31.2'
|
||||
__VERSION__ = '0.31.4'
|
||||
SOVERSION = '5'
|
||||
|
|
45
debian/changelog
vendored
45
debian/changelog
vendored
|
@ -1,3 +1,48 @@
|
|||
notmuch (0.31.4-2) unstable; urgency=medium
|
||||
|
||||
* Cherry pick upstream commit 3f4de98e7c8, which fixes a bug where
|
||||
duplicate message-ids can cause multiple thread-ids for some message
|
||||
documents.
|
||||
* Add build-dependency on xapian-tools, for new test
|
||||
|
||||
-- David Bremner <bremner@debian.org> Mon, 28 Jun 2021 22:48:02 -0300
|
||||
|
||||
notmuch (0.31.4-1) unstable; urgency=medium
|
||||
|
||||
* New upstream bugfix release
|
||||
- Fix include bug triggered by glib 2.67
|
||||
- Fix race condition in T568-lib-thread
|
||||
|
||||
-- David Bremner <bremner@debian.org> Thu, 18 Feb 2021 07:23:00 -0400
|
||||
|
||||
notmuch (0.31.3-2) unstable; urgency=medium
|
||||
|
||||
* Don't install gdb on hppa (skip gdb based tests)
|
||||
|
||||
-- David Bremner <bremner@debian.org> Sat, 26 Dec 2020 15:14:07 -0400
|
||||
|
||||
notmuch (0.31.3-1) unstable; urgency=medium
|
||||
|
||||
* New upstream bugfix release
|
||||
* Second fix for T360, fix regression on ppc64el
|
||||
* Fix for exclude tags in notmuch2 python bindings
|
||||
* Fix for memory error in notmuch_database_get_config_list
|
||||
|
||||
-- David Bremner <bremner@debian.org> Fri, 25 Dec 2020 11:48:37 -0400
|
||||
|
||||
notmuch (0.31.2-5) unstable; urgency=medium
|
||||
|
||||
* Use readelf instead of nm in T360, hopefully build in ppc64
|
||||
|
||||
-- David Bremner <bremner@debian.org> Sun, 13 Dec 2020 08:24:23 -0400
|
||||
|
||||
notmuch (0.31.2-4) unstable; urgency=medium
|
||||
|
||||
* Move prerequisite to file targets from phony ones. Thanks to
|
||||
Lucas Nussbaum for the report. (Closes: #976934).
|
||||
|
||||
-- David Bremner <bremner@debian.org> Thu, 10 Dec 2020 21:02:20 -0400
|
||||
|
||||
notmuch (0.31.2-3~bpo10+2) buster-backports; urgency=medium
|
||||
|
||||
* Re-upload with binaries for NEW package.
|
||||
|
|
5
debian/control
vendored
5
debian/control
vendored
|
@ -6,7 +6,7 @@ Uploaders:
|
|||
Jameson Graef Rollins <jrollins@finestructure.net>,
|
||||
David Bremner <bremner@debian.org>,
|
||||
Build-Conflicts:
|
||||
gdb [ia64 mips mips64el],
|
||||
gdb [ia64 mips mips64el hppa],
|
||||
gdb-minimal,
|
||||
ruby1.8,
|
||||
Build-Depends:
|
||||
|
@ -19,7 +19,7 @@ Build-Depends:
|
|||
dpkg-dev (>= 1.17.14),
|
||||
dtach (>= 0.8) <!nocheck>,
|
||||
emacs-nox | emacs-gtk | emacs-lucid | emacs25-nox | emacs25 (>=25~) | emacs25-lucid (>=25~) | emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~),
|
||||
gdb [!ia64 !mips !mips64el !kfreebsd-any !alpha] <!nocheck>,
|
||||
gdb [!ia64 !mips !mips64el !kfreebsd-any !alpha !hppa] <!nocheck>,
|
||||
gnupg <!nocheck>,
|
||||
gpgsm <!nocheck>,
|
||||
libgmime-3.0-dev (>= 3.0.3~),
|
||||
|
@ -37,6 +37,7 @@ Build-Depends:
|
|||
ruby,
|
||||
ruby-dev (>>1:1.9.3~),
|
||||
texinfo,
|
||||
xapian-tools <!nocheck>,
|
||||
Standards-Version: 4.4.1
|
||||
Homepage: https://notmuchmail.org/
|
||||
Vcs-Git: https://git.notmuchmail.org/git/notmuch -b release
|
||||
|
|
136
debian/patches/debian-changes
vendored
Normal file
136
debian/patches/debian-changes
vendored
Normal file
|
@ -0,0 +1,136 @@
|
|||
This is an autogenerated patch header for a single-debian-patch file. The
|
||||
delta against upstream is either kept as a single patch, or maintained
|
||||
in some VCS, and exported as a single patch instead of more manageable
|
||||
atomic patches.
|
||||
|
||||
--- notmuch-0.31.4.orig/lib/add-message.cc
|
||||
+++ notmuch-0.31.4/lib/add-message.cc
|
||||
@@ -407,14 +407,17 @@ static notmuch_status_t
|
||||
_notmuch_database_link_message (notmuch_database_t *notmuch,
|
||||
notmuch_message_t *message,
|
||||
notmuch_message_file_t *message_file,
|
||||
- bool is_ghost)
|
||||
+ bool is_ghost,
|
||||
+ bool is_new)
|
||||
{
|
||||
void *local = talloc_new (NULL);
|
||||
notmuch_status_t status;
|
||||
const char *thread_id = NULL;
|
||||
|
||||
/* Check if the message already had a thread ID */
|
||||
- if (notmuch->features & NOTMUCH_FEATURE_GHOSTS) {
|
||||
+ if (! is_new) {
|
||||
+ thread_id = notmuch_message_get_thread_id (message);
|
||||
+ } else if (notmuch->features & NOTMUCH_FEATURE_GHOSTS) {
|
||||
if (is_ghost)
|
||||
thread_id = notmuch_message_get_thread_id (message);
|
||||
} else {
|
||||
@@ -539,7 +542,7 @@ notmuch_database_index_file (notmuch_dat
|
||||
}
|
||||
|
||||
ret = _notmuch_database_link_message (notmuch, message,
|
||||
- message_file, is_ghost);
|
||||
+ message_file, is_ghost, is_new);
|
||||
if (ret)
|
||||
goto DONE;
|
||||
|
||||
--- notmuch-0.31.4.orig/test/T357-index-decryption.sh
|
||||
+++ notmuch-0.31.4/test/T357-index-decryption.sh
|
||||
@@ -112,12 +112,10 @@ test_expect_equal \
|
||||
"$expected"
|
||||
|
||||
# try inserting it with decryption, should appear as a single copy
|
||||
-# (note: i think thread id skips 4 because of duplicate message-id
|
||||
-# insertion, above)
|
||||
test_begin_subtest "message cleartext is present with insert --decrypt=true"
|
||||
notmuch insert --folder=sent --decrypt=true <<<"$contents"
|
||||
-output=$(notmuch search wumpus)
|
||||
-expected='thread:0000000000000005 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (encrypted inbox unread)'
|
||||
+output=$(notmuch search wumpus | notmuch_search_sanitize)
|
||||
+expected='thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (encrypted inbox unread)'
|
||||
test_expect_equal \
|
||||
"$output" \
|
||||
"$expected"
|
||||
@@ -127,9 +125,9 @@ test_expect_equal \
|
||||
test_begin_subtest 'tagging all messages'
|
||||
test_expect_success 'notmuch tag +blarney "encrypted message"'
|
||||
test_begin_subtest "verify that tags have not changed"
|
||||
-output=$(notmuch search tag:blarney)
|
||||
-expected='thread:0000000000000001 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 001 (blarney encrypted inbox)
|
||||
-thread:0000000000000005 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (blarney encrypted inbox unread)'
|
||||
+output=$(notmuch search tag:blarney | notmuch_search_sanitize)
|
||||
+expected='thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 001 (blarney encrypted inbox)
|
||||
+thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (blarney encrypted inbox unread)'
|
||||
test_expect_equal \
|
||||
"$output" \
|
||||
"$expected"
|
||||
@@ -138,14 +136,14 @@ test_expect_equal \
|
||||
test_begin_subtest 'reindex old messages'
|
||||
test_expect_success 'notmuch reindex --decrypt=true tag:encrypted and not property:index.decryption=success'
|
||||
test_begin_subtest "reindexed encrypted message, including cleartext"
|
||||
-output=$(notmuch search wumpus)
|
||||
+output=$(notmuch search wumpus | notmuch_search_sanitize)
|
||||
test_expect_equal \
|
||||
"$output" \
|
||||
"$expected"
|
||||
|
||||
# and the same search, but by property ($expected is untouched):
|
||||
test_begin_subtest "emacs search by property for both messages"
|
||||
-output=$(notmuch search property:index.decryption=success)
|
||||
+output=$(notmuch search property:index.decryption=success | notmuch_search_sanitize)
|
||||
test_expect_equal \
|
||||
"$output" \
|
||||
"$expected"
|
||||
@@ -154,7 +152,7 @@ test_expect_equal \
|
||||
test_begin_subtest 'reindex in auto mode'
|
||||
test_expect_success 'notmuch reindex tag:encrypted and property:index.decryption=success'
|
||||
test_begin_subtest "reindexed encrypted messages, should not have changed"
|
||||
-output=$(notmuch search wumpus)
|
||||
+output=$(notmuch search wumpus | notmuch_search_sanitize)
|
||||
test_expect_equal \
|
||||
"$output" \
|
||||
"$expected"
|
||||
@@ -188,9 +186,9 @@ test_expect_equal \
|
||||
|
||||
# ensure that the tags remain even when we are dropping the cleartext.
|
||||
test_begin_subtest "verify that tags remain without cleartext"
|
||||
-output=$(notmuch search tag:blarney)
|
||||
-expected='thread:0000000000000001 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 001 (blarney encrypted inbox)
|
||||
-thread:0000000000000005 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (blarney encrypted inbox unread)'
|
||||
+output=$(notmuch search tag:blarney | notmuch_search_sanitize)
|
||||
+expected='thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 001 (blarney encrypted inbox)
|
||||
+thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (blarney encrypted inbox unread)'
|
||||
test_expect_equal \
|
||||
"$output" \
|
||||
"$expected"
|
||||
@@ -199,7 +197,7 @@ test_begin_subtest "index cleartext with
|
||||
test_expect_success "notmuch reindex --decrypt=nostash tag:blarney"
|
||||
|
||||
test_begin_subtest "Ensure that the indexed terms are present"
|
||||
-output=$(notmuch search wumpus)
|
||||
+output=$(notmuch search wumpus | notmuch_search_sanitize)
|
||||
test_expect_equal \
|
||||
"$output" \
|
||||
"$expected"
|
||||
--- notmuch-0.31.4.orig/test/T670-duplicate-mid.sh
|
||||
+++ notmuch-0.31.4/test/T670-duplicate-mid.sh
|
||||
@@ -6,6 +6,19 @@ add_message '[id]="duplicate"' '[subject
|
||||
add_message '[id]="duplicate"' '[subject]="message 2" [filename]=copy2'
|
||||
|
||||
add_message '[id]="duplicate"' '[subject]="message 0" [filename]=copy0'
|
||||
+
|
||||
+test_begin_subtest 'at most 1 thread-id per xapian document'
|
||||
+db=${MAIL_DIR}/.notmuch/xapian
|
||||
+for doc in $(xapian-delve -1 -t '' "$db" | grep '^[1-9]'); do
|
||||
+ xapian-delve -1 -r "$doc" "$db" | grep -c '^G'
|
||||
+done > OUTPUT.raw
|
||||
+sort -u < OUTPUT.raw > OUTPUT
|
||||
+cat <<EOF > EXPECTED
|
||||
+0
|
||||
+1
|
||||
+EOF
|
||||
+test_expect_equal_file EXPECTED OUTPUT
|
||||
+
|
||||
test_begin_subtest 'search: first indexed subject preserved'
|
||||
cat <<EOF > EXPECTED
|
||||
thread:XXX 2001-01-05 [1/1(3)] Notmuch Test Suite; message 1 (inbox unread)
|
1
debian/patches/series
vendored
Normal file
1
debian/patches/series
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
debian-changes
|
|
@ -43,7 +43,7 @@ INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info)
|
|||
rm -f $@ && gzip --no-name --stdout $^ > $@
|
||||
|
||||
ifeq ($(WITH_EMACS),1)
|
||||
$(DOCBUILDDIR)/.roff.stamp sphinx-html sphinx-texinfo: docstring.stamp
|
||||
$(DOCBUILDDIR)/.roff.stamp $(DOCBUILDDIR)/.html.stamp $(DOCBUILDDIR)/.texi.stamp : docstring.stamp
|
||||
endif
|
||||
|
||||
sphinx-html: $(DOCBUILDDIR)/.html.stamp
|
||||
|
|
|
@ -14,7 +14,7 @@ master_doc = 'index'
|
|||
|
||||
# General information about the project.
|
||||
project = u'notmuch'
|
||||
copyright = u'2009-2020, Carl Worth and many others'
|
||||
copyright = u'2009-2021, Carl Worth and many others'
|
||||
|
||||
location = os.path.dirname(__file__)
|
||||
|
||||
|
|
|
@ -407,14 +407,17 @@ static notmuch_status_t
|
|||
_notmuch_database_link_message (notmuch_database_t *notmuch,
|
||||
notmuch_message_t *message,
|
||||
notmuch_message_file_t *message_file,
|
||||
bool is_ghost)
|
||||
bool is_ghost,
|
||||
bool is_new)
|
||||
{
|
||||
void *local = talloc_new (NULL);
|
||||
notmuch_status_t status;
|
||||
const char *thread_id = NULL;
|
||||
|
||||
/* Check if the message already had a thread ID */
|
||||
if (notmuch->features & NOTMUCH_FEATURE_GHOSTS) {
|
||||
if (! is_new) {
|
||||
thread_id = notmuch_message_get_thread_id (message);
|
||||
} else if (notmuch->features & NOTMUCH_FEATURE_GHOSTS) {
|
||||
if (is_ghost)
|
||||
thread_id = notmuch_message_get_thread_id (message);
|
||||
} else {
|
||||
|
@ -539,7 +542,7 @@ notmuch_database_index_file (notmuch_database_t *notmuch,
|
|||
}
|
||||
|
||||
ret = _notmuch_database_link_message (notmuch, message,
|
||||
message_file, is_ghost);
|
||||
message_file, is_ghost, is_new);
|
||||
if (ret)
|
||||
goto DONE;
|
||||
|
||||
|
|
|
@ -133,8 +133,15 @@ notmuch_database_get_config_list (notmuch_database_t *notmuch,
|
|||
*out = list;
|
||||
|
||||
DONE:
|
||||
if (status && list)
|
||||
talloc_free (list);
|
||||
if (status) {
|
||||
if (list) {
|
||||
talloc_free (list);
|
||||
if (status != NOTMUCH_STATUS_XAPIAN_EXCEPTION)
|
||||
_notmuch_config_list_destroy (list);
|
||||
}
|
||||
} else {
|
||||
talloc_set_destructor (list, _notmuch_config_list_destroy);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,12 @@
|
|||
|
||||
#include "notmuch.h"
|
||||
|
||||
#include "xutil.h"
|
||||
#include "error_util.h"
|
||||
#include "string-util.h"
|
||||
#include "crypto.h"
|
||||
#include "repair.h"
|
||||
|
||||
NOTMUCH_BEGIN_DECLS
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -47,14 +53,6 @@ NOTMUCH_BEGIN_DECLS
|
|||
|
||||
#include <talloc.h>
|
||||
|
||||
#include "gmime-extra.h"
|
||||
|
||||
#include "xutil.h"
|
||||
#include "error_util.h"
|
||||
#include "string-util.h"
|
||||
#include "crypto.h"
|
||||
#include "repair.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
# define DEBUG_DATABASE_SANITY 1
|
||||
# define DEBUG_THREADING 1
|
||||
|
|
|
@ -112,12 +112,10 @@ test_expect_equal \
|
|||
"$expected"
|
||||
|
||||
# try inserting it with decryption, should appear as a single copy
|
||||
# (note: i think thread id skips 4 because of duplicate message-id
|
||||
# insertion, above)
|
||||
test_begin_subtest "message cleartext is present with insert --decrypt=true"
|
||||
notmuch insert --folder=sent --decrypt=true <<<"$contents"
|
||||
output=$(notmuch search wumpus)
|
||||
expected='thread:0000000000000005 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (encrypted inbox unread)'
|
||||
output=$(notmuch search wumpus | notmuch_search_sanitize)
|
||||
expected='thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (encrypted inbox unread)'
|
||||
test_expect_equal \
|
||||
"$output" \
|
||||
"$expected"
|
||||
|
@ -127,9 +125,9 @@ test_expect_equal \
|
|||
test_begin_subtest 'tagging all messages'
|
||||
test_expect_success 'notmuch tag +blarney "encrypted message"'
|
||||
test_begin_subtest "verify that tags have not changed"
|
||||
output=$(notmuch search tag:blarney)
|
||||
expected='thread:0000000000000001 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 001 (blarney encrypted inbox)
|
||||
thread:0000000000000005 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (blarney encrypted inbox unread)'
|
||||
output=$(notmuch search tag:blarney | notmuch_search_sanitize)
|
||||
expected='thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 001 (blarney encrypted inbox)
|
||||
thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (blarney encrypted inbox unread)'
|
||||
test_expect_equal \
|
||||
"$output" \
|
||||
"$expected"
|
||||
|
@ -138,14 +136,14 @@ test_expect_equal \
|
|||
test_begin_subtest 'reindex old messages'
|
||||
test_expect_success 'notmuch reindex --decrypt=true tag:encrypted and not property:index.decryption=success'
|
||||
test_begin_subtest "reindexed encrypted message, including cleartext"
|
||||
output=$(notmuch search wumpus)
|
||||
output=$(notmuch search wumpus | notmuch_search_sanitize)
|
||||
test_expect_equal \
|
||||
"$output" \
|
||||
"$expected"
|
||||
|
||||
# and the same search, but by property ($expected is untouched):
|
||||
test_begin_subtest "emacs search by property for both messages"
|
||||
output=$(notmuch search property:index.decryption=success)
|
||||
output=$(notmuch search property:index.decryption=success | notmuch_search_sanitize)
|
||||
test_expect_equal \
|
||||
"$output" \
|
||||
"$expected"
|
||||
|
@ -154,7 +152,7 @@ test_expect_equal \
|
|||
test_begin_subtest 'reindex in auto mode'
|
||||
test_expect_success 'notmuch reindex tag:encrypted and property:index.decryption=success'
|
||||
test_begin_subtest "reindexed encrypted messages, should not have changed"
|
||||
output=$(notmuch search wumpus)
|
||||
output=$(notmuch search wumpus | notmuch_search_sanitize)
|
||||
test_expect_equal \
|
||||
"$output" \
|
||||
"$expected"
|
||||
|
@ -188,9 +186,9 @@ test_expect_equal \
|
|||
|
||||
# ensure that the tags remain even when we are dropping the cleartext.
|
||||
test_begin_subtest "verify that tags remain without cleartext"
|
||||
output=$(notmuch search tag:blarney)
|
||||
expected='thread:0000000000000001 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 001 (blarney encrypted inbox)
|
||||
thread:0000000000000005 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (blarney encrypted inbox unread)'
|
||||
output=$(notmuch search tag:blarney | notmuch_search_sanitize)
|
||||
expected='thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 001 (blarney encrypted inbox)
|
||||
thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (blarney encrypted inbox unread)'
|
||||
test_expect_equal \
|
||||
"$output" \
|
||||
"$expected"
|
||||
|
@ -199,7 +197,7 @@ test_begin_subtest "index cleartext without keeping session keys"
|
|||
test_expect_success "notmuch reindex --decrypt=nostash tag:blarney"
|
||||
|
||||
test_begin_subtest "Ensure that the indexed terms are present"
|
||||
output=$(notmuch search wumpus)
|
||||
output=$(notmuch search wumpus | notmuch_search_sanitize)
|
||||
test_expect_equal \
|
||||
"$output" \
|
||||
"$expected"
|
||||
|
|
|
@ -26,8 +26,9 @@ test_begin_subtest 'checking output'
|
|||
test_expect_equal "$result" "$output"
|
||||
|
||||
test_begin_subtest 'comparing existing to exported symbols'
|
||||
nm -P $NOTMUCH_BUILDDIR/lib/libnotmuch.so | awk '$2 == "T" && $1 ~ "^notmuch" {print $1}' | sort | uniq > ACTUAL
|
||||
sed -n 's/^\(notmuch_[a-zA-Z0-9_]*\)[[:blank:]]*(.*/\1/p' $NOTMUCH_SRCDIR/lib/notmuch.h | sort | uniq > EXPORTED
|
||||
readelf -Ws $NOTMUCH_BUILDDIR/lib/libnotmuch.so | sed -e 's/\[[^]]*\]//' |\
|
||||
awk '$4 == "FUNC" && $5 == "GLOBAL" && $7 != "UND" {print $8}' | sort -u > ACTUAL
|
||||
sed -n 's/^\(notmuch_[a-zA-Z0-9_]*\)[[:blank:]]*(.*/\1/p' $NOTMUCH_SRCDIR/lib/notmuch.h | sort -u > EXPORTED
|
||||
test_expect_equal_file EXPORTED ACTUAL
|
||||
|
||||
test_done
|
||||
|
|
|
@ -8,6 +8,11 @@ add_email_corpus
|
|||
test_begin_subtest "building database"
|
||||
test_expect_success "NOTMUCH_NEW"
|
||||
|
||||
test_begin_subtest "finding thread"
|
||||
THREAD=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
|
||||
count=$(notmuch count $THREAD)
|
||||
test_expect_equal "$count" "7"
|
||||
|
||||
cat <<'EOF' > c_tail
|
||||
if (stat) {
|
||||
const char *stat_str = notmuch_database_status_string (db);
|
||||
|
@ -30,7 +35,7 @@ int main (int argc, char** argv)
|
|||
notmuch_thread_t *thread = NULL;
|
||||
notmuch_threads_t *threads = NULL;
|
||||
notmuch_query_t *query = NULL;
|
||||
const char *id = "thread:0000000000000009";
|
||||
const char *id = "${THREAD}";
|
||||
|
||||
stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg);
|
||||
if (stat != NOTMUCH_STATUS_SUCCESS) {
|
||||
|
@ -52,10 +57,11 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
|
|||
printf("%d\n%s\n", thread != NULL, id2);
|
||||
}
|
||||
EOF
|
||||
thread_num=${THREAD#thread:}
|
||||
cat <<EOF > EXPECTED
|
||||
== stdout ==
|
||||
1
|
||||
0000000000000009
|
||||
${thread_num}
|
||||
== stderr ==
|
||||
EOF
|
||||
test_expect_equal_file EXPECTED OUTPUT
|
||||
|
|
|
@ -6,6 +6,19 @@ add_message '[id]="duplicate"' '[subject]="message 1" [filename]=copy1'
|
|||
add_message '[id]="duplicate"' '[subject]="message 2" [filename]=copy2'
|
||||
|
||||
add_message '[id]="duplicate"' '[subject]="message 0" [filename]=copy0'
|
||||
|
||||
test_begin_subtest 'at most 1 thread-id per xapian document'
|
||||
db=${MAIL_DIR}/.notmuch/xapian
|
||||
for doc in $(xapian-delve -1 -t '' "$db" | grep '^[1-9]'); do
|
||||
xapian-delve -1 -r "$doc" "$db" | grep -c '^G'
|
||||
done > OUTPUT.raw
|
||||
sort -u < OUTPUT.raw > OUTPUT
|
||||
cat <<EOF > EXPECTED
|
||||
0
|
||||
1
|
||||
EOF
|
||||
test_expect_equal_file EXPECTED OUTPUT
|
||||
|
||||
test_begin_subtest 'search: first indexed subject preserved'
|
||||
cat <<EOF > EXPECTED
|
||||
thread:XXX 2001-01-05 [1/1(3)] Notmuch Test Suite; message 1 (inbox unread)
|
||||
|
|
|
@ -1 +1 @@
|
|||
0.31.2
|
||||
0.31.4
|
||||
|
|
Loading…
Reference in a new issue