+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)
===========================
------------
Serialize calls to sphinx-build to avoid race condition.
-`
+
Notmuch 0.28.2 (2019-02-17)
===========================
# this file should be kept in sync with ../../../version
-__VERSION__ = '0.29.1'
+__VERSION__ = '0.29.3'
SOVERSION = '5'
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 \
+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.
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),
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
+++ /dev/null
-usr/lib/python3*
#!/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 \
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
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;
}
{
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);
talloc_free (list->current_val);
list->current_val = talloc_strdup (list, strval.c_str ());
+ talloc_free (key);
return list->current_val;
}
}
}
- 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);
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
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;