Hello community,
here is the log from the commit of package notmuch for openSUSE:Factory checked in at 2019-04-18 09:56:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/notmuch (Old)
and /work/SRC/openSUSE:Factory/.notmuch.new.17052 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "notmuch"
Thu Apr 18 09:56:12 2019 rev:17 rq:694843 version:0.28.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/notmuch/notmuch.changes 2019-03-11 11:17:01.453304604 +0100
+++ /work/SRC/openSUSE:Factory/.notmuch.new.17052/notmuch.changes 2019-04-18 09:56:13.629333839 +0200
@@ -1,0 +2,17 @@
+Tue Apr 16 12:53:03 UTC 2019 - Adam Majer
+
+- Update unnecessarily specific BuildRequires
+
+-------------------------------------------------------------------
+Tue Apr 16 09:41:39 UTC 2019 - Dan Čermák
+
+- Add 0001-CLI-reindex-fix-memory-leak.patch:
+ Fix a memory leak in the reindexing code,
+ taken from the message ID: 20190416014616.31623-2-david@tethera.net
+
+-------------------------------------------------------------------
+Thu Apr 11 10:16:28 UTC 2019 - Dan Čermák
+
+- Install the info pages, run the tests during build
+
+-------------------------------------------------------------------
New:
----
0001-CLI-reindex-fix-memory-leak.patch
database-v1.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ notmuch.spec ++++++
--- /var/tmp/diff_new_pack.1ZEEyr/_old 2019-04-18 09:56:14.225334214 +0200
+++ /var/tmp/diff_new_pack.1ZEEyr/_new 2019-04-18 09:56:14.229334217 +0200
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -22,20 +22,33 @@
Summary: The mail indexer
License: GPL-3.0-or-later
Group: Productivity/Networking/Email/Utilities
-Url: http://notmuchmail.org
-Source0: http://notmuchmail.org/releases/%{name}-%{version}.tar.gz
-Source1: http://notmuchmail.org/releases/%{name}-%{version}.tar.gz.sha256
-Source2: http://notmuchmail.org/releases/%{name}-%{version}.tar.gz.sha256.asc
-Source3: notmuch.keyring
+Url: https://notmuchmail.org
+Source0: %{url}/releases/%{name}-%{version}.tar.gz
+Source1: %{url}/releases/%{name}-%{version}.tar.gz.sha256
+Source2: %{url}/releases/%{name}-%{version}.tar.gz.sha256.asc
+Source3: %{url}/releases/test-databases/database-v1.tar.xz
+Source4: notmuch.keyring
+
+# FIXME: will be probably included in notmuch > 0.28.3, drop patch then
+# PATCH-FIX-UPSTREAM 0001-CLI-reindex-fix-memory-leak.patch 20190416014616.31623-2-david@tethera.net
+Patch0: 0001-CLI-reindex-fix-memory-leak.patch
%{bcond_without python}
%{bcond_without python3}
%{bcond_without emacs}
-#FIXME: at they are not enabled
+#FIXME: at the moment they are not enabled
%{bcond_with ruby}
%{bcond_with go}
+# dtach is not present on Leap 42 or SLE <= 12
+# cannot run the tests there
+%if 0%{?suse_version} == 1315
+%{bcond_with tests}
+%else
+%{bcond_without tests}
+%endif
+
%define libversion 5
BuildRequires: libxapian-devel
@@ -47,6 +60,19 @@
%endif
BuildRequires: python3-Sphinx
BuildRequires: pkgconfig(talloc)
+# info pages
+BuildRequires: makeinfo
+Requires(post): %{install_info_prereq}
+Requires(preun):%{install_info_prereq}
+
+# testsuite
+%if %{with tests}
+BuildRequires: dtach
+BuildRequires: gdb
+BuildRequires: libgcrypt-cavs
+BuildRequires: man
+BuildRequires: valgrind-devel
+%endif # {with tests}
%if %{with emacs}
BuildRequires: emacs-el
@@ -104,6 +130,15 @@
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation/Man
+Requires: %{name} = %{version}-%{release}
+
+%description doc
+This package contains the info pages for %{name}.
+
+
%package -n libnotmuch%{libversion}
Summary: A shared library for %{name}
Group: Productivity/Networking/Email/Utilities
@@ -159,29 +194,31 @@
%endif
%prep
-%setup -q
+%autosetup
%build
#hand-made configure script
#zsh completion is a part of zsh itself
export CFLAGS="%{optflags}"
+export CXXFLAGS="%{optflags}"
./configure \
%if %{without emacs}
--without-emacs \
%endif
- --without-zsh-completion \
--prefix=%{_prefix} \
- --libdir=%{_libdir} \
+ --sysconfdir=%{_sysconfdir} \
+ --datadir=%{_datadir} \
--includedir=%{_includedir} \
+ --libdir=%{_libdir} \
+ --libexecdir=%{_libexecdir} \
+ --localstatedir=%{_localstatedir} \
--mandir=%{_mandir} \
- --sysconfdir=%{_sysconfdir}
+ --infodir=%{_infodir} \
+ --disable-dependency-tracking \
+ --without-zsh-completion
-# OpenSUSE Leap 15.0 and above include the make_build macro
-%if 0%{?suse_version} >= 1500
-%make_build
-%else
-make
-%endif
+%{?make_build}
+%{?!make_build: make}
#TODO: bindings - go, ruby
pushd bindings
@@ -220,11 +257,38 @@
popd
%endif
+%check
+%if %{with tests}
+cp %{SOURCE3} test/test-databases
+
+# this test fails on PPC64 & PPC64LE
+# upstream knows about that
+%ifarch %power64
+export NOTMUCH_SKIP_TESTS="T360-symbol-hiding"
+%endif # power64
+# FIXME: why does this test fail only on armv7l?
+%ifarch %arm
+export NOTMUCH_SKIP_TESTS="T600-named-queries"
+%endif # arm
+
+# FIXME: T357-index-decryption throws std::bad_alloc on Leap 15.0 & 15.1
+%if 0%{?sle_version} >= 150000 && 0%{?is_opensuse}
+export NOTMUCH_SKIP_TESTS="T357-index-decryption ${NOTMUCH_SKIP_TESTS}"
+%endif # Leap 15.x
+
+make check
+%endif # {with tests}
+
%post -n libnotmuch%{libversion} -p /sbin/ldconfig
%postun -n libnotmuch%{libversion} -p /sbin/ldconfig
+%post doc
+%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
+
+%preun doc
+%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
+
%files
-%defattr(-,root,root)
%doc AUTHORS NEWS README
%license COPYING COPYING-GPL-3
%{_bindir}/%{name}
@@ -235,29 +299,28 @@
%{_mandir}/man7/%{name}-properties.7*
%files -n libnotmuch%{libversion}
-%defattr(-,root,root)
%{_libdir}/libnotmuch.so.%{libversion}*
%files devel
-%defattr(-,root,root)
%{_includedir}/%{name}.h
%{_libdir}/libnotmuch.so
+%files doc
+%{_infodir}/%{name}.info.*
+%{_infodir}/%{name}-*.info.*
+
%if %{with python}
%files -n python-%{name}
-%defattr(-,root,root)
%doc bindings/python/README
%{python_sitelib}/%{name}/
%{python_sitelib}/%{name}*egg-info
%files -n python-%{name}-doc
-%defattr(-,root,root)
%doc bindings/python/docs/build/dirhtml/
%endif
%if %{with python3}
%files -n python3-%{name}
-%defattr(-,root,root)
%doc bindings/python/README
%{python3_sitelib}/%{name}/
%{python3_sitelib}/%{name}*egg-info
@@ -265,7 +328,6 @@
%if %{with emacs}
%files emacs
-%defattr(-,root,root)
%{_datadir}/emacs/site-lisp/
%exclude %{_datadir}/applications/
%endif
++++++ 0001-CLI-reindex-fix-memory-leak.patch ++++++
From a9305cb9bcd8e4b720b71d19d9987397cade0fab Mon Sep 17 00:00:00 2001
From: David Bremner
Date: Mon, 15 Apr 2019 22:46:15 -0300
Subject: [PATCH] CLI/reindex: fix memory leak
Since message is owned by messages, it was held for the entire run of
the program. This in turn means that the Xapian::Document objects are
not freed, and thus one ends up with (effectively) a copy of one's
entire mailstore in memory when running
notmuch reindex '*'
Thanks to Olly Betts for the patient help debugging, and the
suggestion of a fix.
---
notmuch-reindex.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/notmuch-reindex.c b/notmuch-reindex.c
index d8589120..fefa7c63 100644
--- a/notmuch-reindex.c
+++ b/notmuch-reindex.c
@@ -71,6 +71,7 @@ reindex_query (notmuch_database_t *notmuch, const char *query_string,
ret = notmuch_message_reindex(message, indexopts);
if (ret != NOTMUCH_STATUS_SUCCESS)
break;
+ notmuch_message_destroy (message);
}
if (!ret)
--
2.21.0