--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Please unblock package notmuch
It contains two bugfixes for bugs that were not reported to Debian,
but probably qualify as at least severity important.
1) The API function notmuch_message_property_get was unusable when
messages had more than two properties, return "not found" for most
queries.
2) The documentation build had a race condition between parallel
invocations of sphinx-build. Sphinx-build caches state using
python's "pickle" facility, and does not lock the on-disk database.
This led to FTBFS about one in 25 times. Since it's a race
condition, that's sensitive to the environment. A minor change I
made in attempting to fix it increased the failure frequence to 1
in 10 times.
I'll attach a debdiff and a git log --patch. The bulk of the diff is
added unit tests for the message_property fix (really a one line fix
to the underlying data structure).
unblock notmuch/0.28.3-1
- -- System Information:
Debian Release: buster/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.19.0-2-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCAAdFiEE3VS2dnyDRXKVCQCp8gKXHaSnniwFAlx/1D4ACgkQ8gKXHaSn
niyOywv+Nj5M2Esilhd2ax+E4qbpQdUg7s+kEYwzR1/P9HL1KowOwiTHo8QSKTlZ
DpEchcNxCrOIuXbRgRVEENBRBoYjqkNyspdLAcka+YSryHUHRHJOTk/Obf4WCqZQ
gAj50zfviA6u/bCQKh7YzbR7eDDwYIt5pES3mbLp56smi+f37uo42JYI+vSjOIyS
IBQYM7kiaPWHnFiUj9Go4udCtS+AM94lruIv8a/V+PrqoGukoS26daIaot5Berxw
7GJm+idU03ROSUG0FpsW8cctRXYPenw4qAoiC1e/vk6pMfBBKXrDwyvE+qyccUHM
d+jn3QAAtmFVpDfj0aSfKgS+PVZfThuEsziZBY4ozU3X0n5MEUaGnJ94UK3zCDDT
LqLNrUH1QEXwCAHdR+XwiGCEJdgDcQJtX0Nb7HzRfelJRfjqk70REevNWSqDO9Di
L25sMvAWK68MW1fopu7JWiKBoBqWQq5gS16ulD2CQYmfkcukwl6XvbeZBnBGmNm2
R8+crQL+
=viAD
-----END PGP SIGNATURE-----
diff -Nru notmuch-0.28.2/bindings/python/notmuch/version.py notmuch-0.28.3/bindings/python/notmuch/version.py
--- notmuch-0.28.2/bindings/python/notmuch/version.py 2019-02-17 07:32:59.000000000 -0400
+++ notmuch-0.28.3/bindings/python/notmuch/version.py 2019-03-05 21:46:41.000000000 -0400
@@ -1,3 +1,3 @@
# this file should be kept in sync with ../../../version
-__VERSION__ = '0.28.2'
+__VERSION__ = '0.28.3'
SOVERSION = '5'
diff -Nru notmuch-0.28.2/debian/changelog notmuch-0.28.3/debian/changelog
--- notmuch-0.28.2/debian/changelog 2019-02-17 07:30:33.000000000 -0400
+++ notmuch-0.28.3/debian/changelog 2019-03-05 15:39:09.000000000 -0400
@@ -1,3 +1,12 @@
+notmuch (0.28.3-1) unstable; urgency=medium
+
+ * New upstream bugfix release.
+ * Fix for bug in message property search
+ * Fix for race condition leading to (very) occasional build failures
+ when building the documentation.
+
+ -- David Bremner <bremner@debian.org> Tue, 05 Mar 2019 15:39:09 -0400
+
notmuch (0.28.2-1) unstable; urgency=medium
* [notmuch-emacs] Invoke gpg from with --batch and --no-tty
diff -Nru notmuch-0.28.2/doc/Makefile.local notmuch-0.28.3/doc/Makefile.local
--- notmuch-0.28.2/doc/Makefile.local 2019-02-17 07:32:59.000000000 -0400
+++ notmuch-0.28.3/doc/Makefile.local 2019-03-05 21:46:41.000000000 -0400
@@ -37,6 +37,14 @@
%.gz: %
rm -f $@ && gzip --stdout $^ > $@
+# Sequentialize the calls to sphinx-build to avoid races with
+# reading/writing cached state. This uses GNU make specific
+# "order-only" prerequisites.
+
+sphinx-html: | $(DOCBUILDDIR)/.roff.stamp
+sphinx-texinfo: | sphinx-html
+sphinx-info: | sphinx-texinfo
+
sphinx-html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html
diff -Nru notmuch-0.28.2/lib/string-map.c notmuch-0.28.3/lib/string-map.c
--- notmuch-0.28.2/lib/string-map.c 2019-02-17 07:32:59.000000000 -0400
+++ notmuch-0.28.3/lib/string-map.c 2019-03-05 21:46:41.000000000 -0400
@@ -106,7 +106,7 @@
map->sorted = true;
}
-static bool
+static int
string_cmp (const char *a, const char *b, bool exact)
{
if (exact)
diff -Nru notmuch-0.28.2/NEWS notmuch-0.28.3/NEWS
--- notmuch-0.28.2/NEWS 2019-02-17 07:32:59.000000000 -0400
+++ notmuch-0.28.3/NEWS 2019-03-05 21:46:41.000000000 -0400
@@ -1,3 +1,17 @@
+Notmuch 0.28.3 (2019-03-05)
+===========================
+
+Library
+-------
+
+Fix a bug with the internal data structure _notmuch_string_map_t used
+by message properties.
+
+Build System
+------------
+
+Serialize calls to sphinx-build to avoid race condition.
+`
Notmuch 0.28.2 (2019-02-17)
===========================
diff -Nru notmuch-0.28.2/test/T610-message-property.sh notmuch-0.28.3/test/T610-message-property.sh
--- notmuch-0.28.2/test/T610-message-property.sh 2019-02-17 07:32:59.000000000 -0400
+++ notmuch-0.28.3/test/T610-message-property.sh 2019-03-05 21:46:41.000000000 -0400
@@ -100,6 +100,41 @@
EOF
test_expect_equal_file EXPECTED OUTPUT
+test_begin_subtest "testing string map binary search (via message properties)"
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
+{
+ char *keys[] = {"a", "b", "c", "d", "e", NULL};
+ for (int i=0; keys[i]; i++)
+ EXPECT0(notmuch_message_add_property (message, keys[i], keys[i]));
+
+ for (int i=0; keys[i]; i++) {
+ EXPECT0(notmuch_message_get_property (message, keys[i], &val));
+ printf("%s = %s\n", keys[i], val);
+ }
+
+ for (int i=0; keys[i]; i++) {
+ EXPECT0(notmuch_message_remove_property (message, keys[i], keys[i]));
+ EXPECT0(notmuch_message_get_property (message, keys[i], &val));
+ printf("%s = %s\n", keys[i], val == NULL ? "NULL" : val);
+ }
+}
+EOF
+cat <<EOF > EXPECTED
+== stdout ==
+a = a
+b = b
+c = c
+d = d
+e = e
+a = NULL
+b = NULL
+c = NULL
+d = NULL
+e = NULL
+== stderr ==
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
test_begin_subtest "notmuch_message_get_properties: empty list"
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
{
diff -Nru notmuch-0.28.2/version notmuch-0.28.3/version
--- notmuch-0.28.2/version 2019-02-17 07:32:59.000000000 -0400
+++ notmuch-0.28.3/version 2019-03-05 21:46:41.000000000 -0400
@@ -1 +1 @@
-0.28.2
+0.28.3
commit 69e047aeeb479f9c62084aa4638ff87b778ca021
Author: David Bremner <david@tethera.net>
Date: Tue Mar 5 15:40:15 2019 -0400
debian: changelog stanza for 0.28.3-1
diff --git a/debian/changelog b/debian/changelog
index 9ed2547e..8afd985b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+notmuch (0.28.3-1) unstable; urgency=medium
+
+ * New upstream bugfix release.
+ * Fix for bug in message property search
+ * Fix for race condition leading to (very) occasional build failures
+ when building the documentation.
+
+ -- David Bremner <bremner@debian.org> Tue, 05 Mar 2019 15:39:09 -0400
+
notmuch (0.28.2-1) unstable; urgency=medium
* [notmuch-emacs] Invoke gpg from with --batch and --no-tty
commit e3dd209a33c205cc47f97fa76e5ce37f308cefb6
Author: David Bremner <david@tethera.net>
Date: Tue Mar 5 15:36:43 2019 -0400
NEWS for 0.28.3
diff --git a/NEWS b/NEWS
index e469ba06..549b1840 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,17 @@
+Notmuch 0.28.3 (2019-03-05)
+===========================
+
+Library
+-------
+
+Fix a bug with the internal data structure _notmuch_string_map_t used
+by message properties.
+
+Build System
+------------
+
+Serialize calls to sphinx-build to avoid race condition.
+`
Notmuch 0.28.2 (2019-02-17)
===========================
commit 1a4a1fe9c501d8d3384b49ad2b78a07518c62230
Author: David Bremner <david@tethera.net>
Date: Tue Mar 5 15:30:52 2019 -0400
bump version to 0.28.3
diff --git a/bindings/python/notmuch/version.py b/bindings/python/notmuch/version.py
index f376f6e6..8217eabf 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.28.2'
+__VERSION__ = '0.28.3'
SOVERSION = '5'
diff --git a/version b/version
index a37255a8..b79f04f4 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-0.28.2
+0.28.3
commit dcf7fca2d9f87fc4d412dbbba8e441d9ff204ffc
Author: David Bremner <david@tethera.net>
Date: Sat Mar 2 23:30:59 2019 -0400
doc: sequentialize calls to sphinx-build
In certain conditions the parallel calls to sphinx-build could
collide, yielding a crash like
Exception occurred:
File "/usr/lib/python3/dist-packages/sphinx/environment.py", line 1261, in get_doctree
doctree = pickle.load(f)
EOFError: Ran out of input
diff --git a/doc/Makefile.local b/doc/Makefile.local
index 16459e35..cb0f1f64 100644
--- a/doc/Makefile.local
+++ b/doc/Makefile.local
@@ -37,6 +37,14 @@ INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info)
%.gz: %
rm -f $@ && gzip --stdout $^ > $@
+# Sequentialize the calls to sphinx-build to avoid races with
+# reading/writing cached state. This uses GNU make specific
+# "order-only" prerequisites.
+
+sphinx-html: | $(DOCBUILDDIR)/.roff.stamp
+sphinx-texinfo: | sphinx-html
+sphinx-info: | sphinx-texinfo
+
sphinx-html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html
commit e88297c072e6bfbeaedc1287ec695ca37537255e
Author: David Bremner <david@tethera.net>
Date: Sat Mar 2 14:10:51 2019 -0400
lib/string_map: fix return type of string_cmp
I can't figure out how checking the sign of a bool ever worked. The
following program demonstrates the problem (i.e. for me it prints 1).
#include <stdio.h>
#include <stdbool.h>
int main(int argc, char **argv) {
bool x;
x = -1;
printf("x = %d\n", x);
}
This seems to be mandated by the C99 standard 6.3.1.2.
diff --git a/lib/string-map.c b/lib/string-map.c
index ad818207..a88404c7 100644
--- a/lib/string-map.c
+++ b/lib/string-map.c
@@ -106,7 +106,7 @@ _notmuch_string_map_sort (notmuch_string_map_t *map)
map->sorted = true;
}
-static bool
+static int
string_cmp (const char *a, const char *b, bool exact)
{
if (exact)
diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh
index 04f0c9be..53a0be3b 100755
--- a/test/T610-message-property.sh
+++ b/test/T610-message-property.sh
@@ -101,7 +101,6 @@ EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "testing string map binary search (via message properties)"
-test_subtest_known_broken
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
{
char *keys[] = {"a", "b", "c", "d", "e", NULL};
commit 09595cf577616f657fdfcd235c4e04d91b3c020a
Author: David Bremner <david@tethera.net>
Date: Tue Mar 5 14:56:29 2019 -0400
lib: Add known broken test for string_map binary search.
Because the string_map functions are not exported, we test via message
properties.
diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh
index 0abef824..04f0c9be 100755
--- a/test/T610-message-property.sh
+++ b/test/T610-message-property.sh
@@ -100,6 +100,42 @@ cat <<'EOF' >EXPECTED
EOF
test_expect_equal_file EXPECTED OUTPUT
+test_begin_subtest "testing string map binary search (via message properties)"
+test_subtest_known_broken
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
+{
+ char *keys[] = {"a", "b", "c", "d", "e", NULL};
+ for (int i=0; keys[i]; i++)
+ EXPECT0(notmuch_message_add_property (message, keys[i], keys[i]));
+
+ for (int i=0; keys[i]; i++) {
+ EXPECT0(notmuch_message_get_property (message, keys[i], &val));
+ printf("%s = %s\n", keys[i], val);
+ }
+
+ for (int i=0; keys[i]; i++) {
+ EXPECT0(notmuch_message_remove_property (message, keys[i], keys[i]));
+ EXPECT0(notmuch_message_get_property (message, keys[i], &val));
+ printf("%s = %s\n", keys[i], val == NULL ? "NULL" : val);
+ }
+}
+EOF
+cat <<EOF > EXPECTED
+== stdout ==
+a = a
+b = b
+c = c
+d = d
+e = e
+a = NULL
+b = NULL
+c = NULL
+d = NULL
+e = NULL
+== stderr ==
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
test_begin_subtest "notmuch_message_get_properties: empty list"
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
{
--- End Message ---