]> git.cworth.org Git - notmuch/commitdiff
Merge tag 'debian/0.29.3-1' into debian/buster-backports
authorDavid Bremner <david@tethera.net>
Wed, 27 May 2020 14:49:10 +0000 (11:49 -0300)
committerDavid Bremner <david@tethera.net>
Wed, 27 May 2020 14:49:10 +0000 (11:49 -0300)
notmuch Debian 0.29.3-1 upload (same as 0.29.3)

12 files changed:
NEWS
bindings/python/notmuch/version.py
configure
debian/changelog
debian/control
debian/python3-notmuch.install [deleted file]
debian/rules
lib/config.cc
notmuch-dump.c
test/T750-gzip.sh
util/gmime-extra.c
version

diff --git a/NEWS b/NEWS
index e0271e700e097e7a622405dcb1298944ec19bd1c..66bb69f1558852662c723a5994785a2e5305bf5d 100644 (file)
--- 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)
 ===========================
 
index ca9e6a8c3f825f9b812035dc106f676ae6baa4f8..e688b56520f7a4cef5ac998820a005a0417a6b7f 100644 (file)
@@ -1,3 +1,3 @@
 # this file should be kept in sync with ../../../version
-__VERSION__ = '0.29.1'
+__VERSION__ = '0.29.3'
 SOVERSION = '5'
index 8b80f0e0890ff54ee0f80b136af601d09bab9a0e..6e73b22ef68d044f63074bbd7b9a1775a23e12af 100755 (executable)
--- 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 \
index 582c48b632f4d2e381c54912ab7178d29c3fcb79..6a3ae2a83e554801738c5251a4894e4f0e9d42da 100644 (file)
@@ -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.
index 31d6471c28b29dee9a19e567e57196493302afee..84be657dd7e266bbab551e730d115eae2ed63dab 100644 (file)
@@ -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 (file)
index 4606faa..0000000
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/python3*
index d056edb623944822730fcb7ca13ad40457e27daa..5a378f6e6fc4285c9a08139b9f2b8beb383fda9f 100755 (executable)
@@ -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
index da71c16e5adcea711bfa7ed6eab264caf7379a78..a8bcdf831b453d93c4f8b4a43c2b7dd0d43e8cda 100644 (file)
@@ -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;
 }
 
index ef2f02dfeb5cb5cc470da3462f75d6122f488f95..70cdb0c21718f8f0738760a0ed8d3e5a0486f44f 100644 (file)
@@ -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);
index 5b678fa1eda29960473549b9223067ba39c7c388..fac41d399bb7309203770b8f30a6a3265f827412 100755 (executable)
@@ -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
index 7562d9062a20ab1b1a2a9c917c3d4e9b56afe7f5..d1bb1d47ea72930d756c0b89ee9fe5e1ec731530 100644 (file)
@@ -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 25939d35c738f04e70e1c42f05a75592c48bd67d..5540b6e009b9bd3a28dca918eef3d6187e15fad8 100644 (file)
--- a/version
+++ b/version
@@ -1 +1 @@
-0.29.1
+0.29.3