aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2020-05-27 11:49:10 -0300
committerDavid Bremner <david@tethera.net>2020-05-27 11:49:10 -0300
commitad61f8e34d0201eeb1e7008c5e574a47e0345f91 (patch)
tree88328a4a3f51ddf1310ae422dfb175935042e9a4
parent58e860521808e65b33e958cfa5eba1565c669e5c (diff)
parenta59ef7d02cb229c2ec3569024918024003568aea (diff)
Merge tag 'debian/0.29.3-1' into debian/buster-backports
notmuch Debian 0.29.3-1 upload (same as 0.29.3)
-rw-r--r--NEWS26
-rw-r--r--bindings/python/notmuch/version.py2
-rwxr-xr-xconfigure2
-rw-r--r--debian/changelog23
-rw-r--r--debian/control14
-rw-r--r--debian/python3-notmuch.install1
-rwxr-xr-xdebian/rules13
-rw-r--r--lib/config.cc9
-rw-r--r--notmuch-dump.c6
-rwxr-xr-xtest/T750-gzip.sh7
-rw-r--r--util/gmime-extra.c4
-rw-r--r--version2
12 files changed, 77 insertions, 32 deletions
diff --git a/NEWS b/NEWS
index e0271e70..66bb69f1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,27 @@
+Notmuch 0.29.3 (2019-11-27)
+===========================
+
+General
+-------
+
+Fix for use-after-free in notmuch_config_list_{key,val}.
+
+Fix for double close of file in notmuch-dump.
+
+Debian
+------
+
+Drop python2 support from shipped debian packaging.
+
+Notmuch 0.29.2 (2019-10-19)
+===========================
+
+General
+-------
+
+Fix for file descriptor leak when opening gzipped mail files. Thanks
+to James Troup for the bug report and the fix.
+
Notmuch 0.29.1 (2019-06-11)
===========================
@@ -114,7 +138,7 @@ Build System
------------
Serialize calls to sphinx-build to avoid race condition.
-`
+
Notmuch 0.28.2 (2019-02-17)
===========================
diff --git a/bindings/python/notmuch/version.py b/bindings/python/notmuch/version.py
index ca9e6a8c..e688b565 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.29.1'
+__VERSION__ = '0.29.3'
SOVERSION = '5'
diff --git a/configure b/configure
index 8b80f0e0..6e73b22e 100755
--- a/configure
+++ b/configure
@@ -529,7 +529,7 @@ int main () {
return 0;
}
EOF
- if ! TEMP_GPG=$(mktemp -d); then
+ if ! TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XXXXXX"); then
printf 'No.\nCould not make tempdir for testing session-key support.\n'
errors=$((errors + 1))
elif ${CC} ${CFLAGS} ${gmime_cflags} _check_session_keys.c ${gmime_ldflags} -o _check_session_keys \
diff --git a/debian/changelog b/debian/changelog
index 582c48b6..6a3ae2a8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,26 @@
+notmuch (0.29.3-1) unstable; urgency=medium
+
+ * New upstream bugfix release.
+ - fix use-after-free bug in libnotmuch
+ - fix double close of file in "notmuch dump"
+
+ -- David Bremner <bremner@debian.org> Wed, 27 Nov 2019 08:19:57 -0400
+
+notmuch (0.29.2-2) experimental; urgency=medium
+
+ * Drop python-notmuch binary package.
+ * Drop python2 build-dependency (Closes: #937161).
+ * Convert to pybuild for python bindings
+
+ -- David Bremner <bremner@debian.org> Sat, 02 Nov 2019 18:21:06 -0300
+
+notmuch (0.29.2-1) unstable; urgency=medium
+
+ * New upstream bug fix release: fix file descriptor leak with gzipped
+ files. Thanks to James Troup for reporting and the fix.
+
+ -- David Bremner <bremner@debian.org> Sat, 19 Oct 2019 07:23:21 -0300
+
notmuch (0.29.1-2~bpo10+1) buster-backports; urgency=medium
* Rebuild for buster-backports.
diff --git a/debian/control b/debian/control
index 31d6471c..84be657d 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,6 @@ Build-Depends:
libgmime-3.0-dev (>= 3.0.3~),
libtalloc-dev,
libz-dev,
- python-all (>= 2.6.6-3~),
python3-all (>= 3.1.2-7~),
dh-python,
dh-elpa (>= 1.3),
@@ -73,19 +72,6 @@ Description: thread-based email index, search and tagging (development)
This package provides the necessary development libraries and header
files to allow you to develop new software using libnotmuch.
-Package: python-notmuch
-Architecture: all
-Section: python
-Depends: ${misc:Depends}, ${python:Depends}, libnotmuch5 (>= ${source:Version})
-Description: Python interface to the notmuch mail search and index library
- Notmuch is a system for indexing, searching, reading, and tagging
- large collections of email messages in maildir or mh format. It uses
- the Xapian library to provide fast, full-text search with a very
- convenient search syntax.
- .
- This package provides a Python interface to the notmuch
- functionality, directly interfacing with a shared notmuch library.
-
Package: python3-notmuch
Architecture: all
Section: python
diff --git a/debian/python3-notmuch.install b/debian/python3-notmuch.install
deleted file mode 100644
index 4606faae..00000000
--- a/debian/python3-notmuch.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/python3*
diff --git a/debian/rules b/debian/rules
index d056edb6..5a378f6e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,9 +1,9 @@
#!/usr/bin/make -f
-python3_all = py3versions -s | xargs -n1 | xargs -t -I {} env {}
+export PYBUILD_NAME=notmuch
%:
- dh $@ --with python2,python3,elpa
+ dh $@ --with python3,elpa
override_dh_auto_configure:
BASHCMD=/bin/bash ./configure --prefix=/usr \
@@ -17,20 +17,17 @@ override_dh_auto_configure:
override_dh_auto_build:
dh_auto_build -- V=1
- dh_auto_build --sourcedirectory bindings/python
- cd bindings/python && $(python3_all) setup.py build
+ dh_auto_build --buildsystem=pybuild --sourcedirectory bindings/python
$(MAKE) -C contrib/notmuch-mutt
override_dh_auto_clean:
dh_auto_clean
- dh_auto_clean --sourcedirectory bindings/python
- cd bindings/python && $(python3_all) setup.py clean -a
+ dh_auto_clean --buildsystem=pybuild --sourcedirectory bindings/python
dh_auto_clean --sourcedirectory bindings/ruby
$(MAKE) -C contrib/notmuch-mutt clean
override_dh_auto_install:
dh_auto_install
- dh_auto_install --sourcedirectory bindings/python
- cd bindings/python && $(python3_all) setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp
+ dh_auto_install --buildsystem=pybuild --sourcedirectory bindings/python
$(MAKE) -C contrib/notmuch-mutt DESTDIR=$(CURDIR)/debian/tmp install
dh_auto_install --sourcedirectory bindings/ruby
diff --git a/lib/config.cc b/lib/config.cc
index da71c16e..a8bcdf83 100644
--- a/lib/config.cc
+++ b/lib/config.cc
@@ -150,13 +150,17 @@ notmuch_config_list_valid (notmuch_config_list_t *metadata)
return true;
}
+static inline char * _key_from_iterator (notmuch_config_list_t *list) {
+ return talloc_strdup (list, (*list->iterator).c_str () + CONFIG_PREFIX.length ());
+}
+
const char *
notmuch_config_list_key (notmuch_config_list_t *list)
{
if (list->current_key)
talloc_free (list->current_key);
- list->current_key = talloc_strdup (list, (*list->iterator).c_str () + CONFIG_PREFIX.length ());
+ list->current_key = _key_from_iterator (list);
return list->current_key;
}
@@ -166,7 +170,7 @@ notmuch_config_list_value (notmuch_config_list_t *list)
{
std::string strval;
notmuch_status_t status;
- const char *key = notmuch_config_list_key (list);
+ char *key = _key_from_iterator (list);
/* TODO: better error reporting?? */
status = _metadata_value (list->notmuch, key, strval);
@@ -177,6 +181,7 @@ notmuch_config_list_value (notmuch_config_list_t *list)
talloc_free (list->current_val);
list->current_val = talloc_strdup (list, strval.c_str ());
+ talloc_free (key);
return list->current_val;
}
diff --git a/notmuch-dump.c b/notmuch-dump.c
index ef2f02df..70cdb0c2 100644
--- a/notmuch-dump.c
+++ b/notmuch-dump.c
@@ -329,13 +329,15 @@ notmuch_database_dump (notmuch_database_t *notmuch,
}
}
- if (gzclose_w (output) != Z_OK) {
+ ret = gzclose_w (output);
+ if (ret) {
fprintf (stderr, "Error closing %s: %s\n", name_for_error,
gzerror (output, NULL));
ret = EXIT_FAILURE;
output = NULL;
goto DONE;
- }
+ } else
+ output = NULL;
if (output_file_name) {
ret = rename (tempname, output_file_name);
diff --git a/test/T750-gzip.sh b/test/T750-gzip.sh
index 5b678fa1..fac41d39 100755
--- a/test/T750-gzip.sh
+++ b/test/T750-gzip.sh
@@ -167,4 +167,11 @@ This is just a test message (#7)
EOF
test_expect_equal_file EXPECTED OUTPUT
+# there are more than 200 messages in this corpus
+add_email_corpus lkml
+test_begin_subtest "new doesn't run out of file descriptors with many gzipped files"
+ulimit -n 200
+gzip --recursive ${MAIL_DIR}
+test_expect_success "notmuch new"
+
test_done
diff --git a/util/gmime-extra.c b/util/gmime-extra.c
index 7562d906..d1bb1d47 100644
--- a/util/gmime-extra.c
+++ b/util/gmime-extra.c
@@ -27,7 +27,9 @@ _gzfile_maybe_filter (GMimeStream *file_stream) {
return NULL;
/* ignore filter id */
- (void)g_mime_stream_filter_add ((GMimeStreamFilter *)gzstream, gzfilter);
+ (void) g_mime_stream_filter_add ((GMimeStreamFilter *) gzstream, gzfilter);
+ g_object_unref (gzfilter);
+ g_object_unref (file_stream);
return gzstream;
} else {
return file_stream;
diff --git a/version b/version
index 25939d35..5540b6e0 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-0.29.1
+0.29.3