From 6db8b422d91a75b7c16f013f10f41d1109ce5866 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Mon, 15 Feb 2021 16:43:50 -0400 Subject: [PATCH 1/7] fix build failure with glib 2.67 Based on a patch from Michael J Gruber [1]. As of glib 2.67 (more specifically [2]), including "gmime-extra.h" inside an extern "C" block causes build failures, because glib is using C++ features. Observing that "gmime-extra.h" is no longer needed in notmuch-private.h, which can simply delete that include, but we have to correspondingly move the includes which might include it (in particular crypto.h) out of the extern "C" block also. This seems less fragile than only moving gmime-extra, and relying on preprocessor sentinels to keep the deeper includes from happening. Move to the include to the outside of the extern block. [1]: id:aee618a3d41f7889a7449aa16893e992325a909a.1613055071.git.git@grubix.eu [2]: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1715 --- lib/notmuch-private.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index 57ec7f72..41aff342 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -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 @@ -47,14 +53,6 @@ NOTMUCH_BEGIN_DECLS #include -#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 From a37d5f5976de07b36141aa6b4a98cf913a3cf2fe Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 14 Feb 2021 20:55:55 -0400 Subject: [PATCH 2/7] test: Fix race condition in T568-lib-thread.sh The assignment of thread-ids is (apparently) non-deterministic in a way that mostly seems to show up on multicore machines. In my tests the number is different from that previously assumed by this test about 15% of the time on a 50 thread (25 core) Xeon. Since message id's are fixed, use a message known to be in the thread of interest to pick out the correct thread-id. --- test/T568-lib-thread.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/T568-lib-thread.sh b/test/T568-lib-thread.sh index ac13d986..088e66dd 100755 --- a/test/T568-lib-thread.sh +++ b/test/T568-lib-thread.sh @@ -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 < EXPECTED == stdout == 1 -0000000000000009 +${thread_num} == stderr == EOF test_expect_equal_file EXPECTED OUTPUT From 2ab95d813c8a6bd7ed48600a354a98804a2f4d94 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 18 Feb 2021 07:17:22 -0400 Subject: [PATCH 3/7] version: update to 0.31.4 --- bindings/python-cffi/version.txt | 2 +- bindings/python/notmuch/version.py | 2 +- version.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/python-cffi/version.txt b/bindings/python-cffi/version.txt index 8239f42d..a8a02172 100644 --- a/bindings/python-cffi/version.txt +++ b/bindings/python-cffi/version.txt @@ -1 +1 @@ -0.31.3 +0.31.4 diff --git a/bindings/python/notmuch/version.py b/bindings/python/notmuch/version.py index 0be316c2..6f6372ab 100644 --- a/bindings/python/notmuch/version.py +++ b/bindings/python/notmuch/version.py @@ -1,3 +1,3 @@ # this file should be kept in sync with ../../../version -__VERSION__ = '0.31.3' +__VERSION__ = '0.31.4' SOVERSION = '5' diff --git a/version.txt b/version.txt index 8239f42d..a8a02172 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.31.3 +0.31.4 From 42b2201c11f822999d8e2f6e0dd86088dfb1c87e Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 18 Feb 2021 07:21:48 -0400 Subject: [PATCH 4/7] NEWS: news for 0.31.4 --- NEWS | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/NEWS b/NEWS index 6484567e..6e88ebd9 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,16 @@ +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) =========================== From 9f2796438f92a3169d1be1b43a8a1354b3c71eb8 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 18 Feb 2021 07:23:24 -0400 Subject: [PATCH 5/7] debian: changelog for 0.31.4-1 --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 222b06f4..ec3de63d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +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 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) From 346b999ae6f1af6a8dbe7ef960c15adf18e6a15c Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 18 Feb 2021 07:52:39 -0400 Subject: [PATCH 6/7] doc: bump copyright year --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 11bed51d..1a5c217b 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -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__) From 3a3208bb7b8bfca1c0bcaa5b45b6ef71aa768612 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 18 Feb 2021 07:53:00 -0400 Subject: [PATCH 7/7] debian: drop patches we should by synced up with the tarball again --- debian/patches/debian-changes | 47 ----------------------------------- debian/patches/series | 1 - 2 files changed, 48 deletions(-) delete mode 100644 debian/patches/debian-changes delete mode 100644 debian/patches/series diff --git a/debian/patches/debian-changes b/debian/patches/debian-changes deleted file mode 100644 index 55aa7de9..00000000 --- a/debian/patches/debian-changes +++ /dev/null @@ -1,47 +0,0 @@ -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.3.orig/Makefile.global -+++ notmuch-0.31.3/Makefile.global -@@ -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 ---- notmuch-0.31.3.orig/Makefile.local -+++ notmuch-0.31.3/Makefile.local -@@ -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) ---- notmuch-0.31.3.orig/NEWS -+++ notmuch-0.31.3/NEWS -@@ -1,4 +1,5 @@ - Notmuch 0.31.3 (2020-12-25) -+=========================== - - Bindings - -------- diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index 7bb82529..00000000 --- a/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -debian-changes