summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmadeusz Żołnowski <aidecoe@gentoo.org>2012-02-29 07:41:24 +0000
committerAmadeusz Żołnowski <aidecoe@gentoo.org>2012-02-29 07:41:24 +0000
commit330573e3c7389b97af1a9b74206aaf677fa1fc8e (patch)
tree3c7beaaadd4ce8af1efd473bba533ebfa2b21e16 /net-mail/notmuch
parentnet-mail/notmuch: Depend on >=glib-2.22. (diff)
downloadhistorical-330573e3c7389b97af1a9b74206aaf677fa1fc8e.tar.gz
historical-330573e3c7389b97af1a9b74206aaf677fa1fc8e.tar.bz2
historical-330573e3c7389b97af1a9b74206aaf677fa1fc8e.zip
net-mail/notmuch-0.10.2: Fixes bug #406175 and bug #406177.
Fixes bug #406175 (security fix for Emacs UI) and bug #406177 (Python bindings tests used to fail). I have backported patches from 0.11.1 and 0.11 releases. Package-Manager: portage-2.1.10.48/cvs/Linux x86_64
Diffstat (limited to 'net-mail/notmuch')
-rw-r--r--net-mail/notmuch/ChangeLog12
-rw-r--r--net-mail/notmuch/Manifest20
-rw-r--r--net-mail/notmuch/files/0.10.2-emacsui-mml-tags-quoting-fix.patch56
-rw-r--r--net-mail/notmuch/files/0.10.2-emacsui-mml-tags-quoting-test.patch49
-rw-r--r--net-mail/notmuch/files/0.10.2-lib-call-g_mime_init-db-open.patch55
-rw-r--r--net-mail/notmuch/notmuch-0.10.2-r2.ebuild129
6 files changed, 312 insertions, 9 deletions
diff --git a/net-mail/notmuch/ChangeLog b/net-mail/notmuch/ChangeLog
index 9e15bac62fff..6283064bc0f6 100644
--- a/net-mail/notmuch/ChangeLog
+++ b/net-mail/notmuch/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for net-mail/notmuch
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-mail/notmuch/ChangeLog,v 1.27 2012/02/29 07:36:13 aidecoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-mail/notmuch/ChangeLog,v 1.28 2012/02/29 07:41:23 aidecoe Exp $
+
+*notmuch-0.10.2-r2 (29 Feb 2012)
+
+ 29 Feb 2012; Amadeusz Żołnowski <aidecoe@gentoo.org>
+ +files/0.10.2-emacsui-mml-tags-quoting-fix.patch,
+ +files/0.10.2-emacsui-mml-tags-quoting-test.patch,
+ +files/0.10.2-lib-call-g_mime_init-db-open.patch, +notmuch-0.10.2-r2.ebuild:
+ Fixes bug #406175 (security fix for Emacs UI) and bug #406177 (Python
+ bindings tests used to fail). I have backported patches from 0.11.1 and 0.11
+ releases.
28 Feb 2012; Amadeusz Żołnowski <aidecoe@gentoo.org> notmuch-0.10.2.ebuild,
notmuch-0.10.2-r1.ebuild, notmuch-0.11.1-r1.ebuild, notmuch-0.11.1-r2.ebuild:
diff --git a/net-mail/notmuch/Manifest b/net-mail/notmuch/Manifest
index 0123e212a708..f8b170032ab3 100644
--- a/net-mail/notmuch/Manifest
+++ b/net-mail/notmuch/Manifest
@@ -1,24 +1,28 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
+AUX 0.10.2-emacsui-mml-tags-quoting-fix.patch 1741 RMD160 0650c8f427f1138f76af6f0921f38386df01db1f SHA1 32252fa4e8f26da37e1f27d92756a8bef18fd3e9 SHA256 acaedefdc6ecbdf921c146ed6e110416cd7cfff09cf985376a0ee94755075306
+AUX 0.10.2-emacsui-mml-tags-quoting-test.patch 1737 RMD160 9f88c67c2ab2e5d5360da77ae19d3901bcc5958e SHA1 e6a8d7d1c9186b652916996176ef0c462b0f8af4 SHA256 e5eaecf2a794f9239d47a021d84a4726de458ca93f04ff27bb9b20c5c8773a9c
AUX 0.10.2-fix-test-build.patch 3709 RMD160 3f63fbb83bed50f7a011778a46f4404e63bc8c2a SHA1 30925abc3d463d5d5cf176945def321684fc7645 SHA256 4b7820e537de6f23028b7d02d2482425b4e678522deca29fe70560757f2d4227
+AUX 0.10.2-lib-call-g_mime_init-db-open.patch 1783 RMD160 3cbe79c3aefc9e658d6b8e5a4a13e95ad3adea2e SHA1 293dce6041642d02cbcc33585c4f4fa76b15a1e1 SHA256 257491740a4f751799f6d24b406dc84efa2925cac85dd9eb3cda43924d9a1243
AUX 50notmuch-gentoo.el 291 RMD160 7e036b8700f50cde6c3b27622193ddf08812229b SHA1 cc087fe76f750e84171a6ddef9dc10139b8450cc SHA256 68c0ecfd3d10246fb65ec48b097c1b477ce33f44014f602f903c16b752ba7d3b
DIST notmuch-0.10.2.tar.gz 408872 RMD160 82a3fb751340d8c58bd5e32110cfd77d273c46f6 SHA1 3064c1722d30c71f287e1ab63ac13a5847e20c14 SHA256 2ba5ba9b32e62180d7d5f2bc3f89360aede72319e57962ffeffa98cd1c37f0f7
DIST notmuch-0.11.1.tar.gz 439099 RMD160 2b525ccb0c4919da36aeed3d645be173eb8d867a SHA1 05694ae8762076bf91d63b199e72a12e5ce012b0 SHA256 d9896ae295fd8e5471c49b0ba39872ccfdfc3488a8e7ba6fd68ba1686bc52706
EBUILD notmuch-0.10.2-r1.ebuild 2667 RMD160 52fdcb4b53b0c52fa621d6dc7a30e38a1936c6a7 SHA1 46db96e6d060f00202005994d2fd6f04d38fa364 SHA256 19c8912b8bade6ee50fb4a6986827c3034f0c8dcf18d2cfb73b5be636b941649
+EBUILD notmuch-0.10.2-r2.ebuild 2838 RMD160 c48025a1528219ad45bfd57621639db9de7ce3b5 SHA1 cffcb1fe1ce1a0679e2f53ad952a74b5c6cc9079 SHA256 f825d8f03e87da4d5c6fb7ce55840cfe819c68bb0b406017cc1e51880fbb26e4
EBUILD notmuch-0.10.2.ebuild 3212 RMD160 da6f78ac87fd0e1446b83e15fa5512ca05319e98 SHA1 e9a30019f38676ff63ed8a661230374b3e0e8d49 SHA256 0400a170970ac1374d4ecc08afb03ba2550212a8880e6398a87e90e303e6c4dc
EBUILD notmuch-0.11.1-r1.ebuild 3195 RMD160 2145ca86f24cbc9b1c38a2c1c0911839af9c944c SHA1 97f23a48a380005a23e1ff701cf271de071db339 SHA256 bb18116954f861d434cc153924dd9b02219bbbff4f39a4fb55a2005a8a7b0104
EBUILD notmuch-0.11.1-r2.ebuild 2647 RMD160 a24de9ddd15fc835397e34463629808f22c09471 SHA1 c59c847870ba218de1106ea98f3d5027e11d6dfc SHA256 75c77a7df8cf907ac42f1c5f951b16863c9fae3e9f3ba138359b2262f0004ffc
-MISC ChangeLog 7620 RMD160 d0efe90c186a841fb140f64e0136cd113d354a24 SHA1 3003c7ffff8f6925bbee3fa6877c658100825238 SHA256 cbdc89d207959b8de4e5c5551e732ace957298076aca3d5d99cf674c7a5cc30f
+MISC ChangeLog 8059 RMD160 310c2a93e1b1f6b1dd945f4f689d657c072a2c16 SHA1 3750af9f0c94ee06dc53b7a16da4d81b6ca3964f SHA256 f36dada238c249126e90a632de3fecfc7d8df449f86a3c3ef43febf981be7c04
MISC metadata.xml 1003 RMD160 12fa19220fd58eade62c7aafc6a3c2bf5adb6ca5 SHA1 8be789b19b3140dc24694d5c535a7d8a4e8c4b0a SHA256 48f0e1b14cf9bd31f53f6bb481570ec1f067308e067913edbcea50a986b875bc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
-iQEcBAEBAgAGBQJPTdV8AAoJEPATRTHh2/q12wEH/jImcO8MB5UB4yJlJbZxcDi3
-4lE8yVGd2SQJZgDoUYzNdt+5QIi6rSt9fP6qNFYN+RIvdDC67sTxUu2Fw+tG1+w5
-wvLF9peOevtl2f41rUCm6TjUk1AepgyJhFua5/wL4Wchdqw6Px6Bk1WZwgvqkLA0
-zE6LemnTTrOzKs4MjjwOIUC8sQLsr9+dIYUsyHuwTBrYciNn7UrA6obrQvTgfF5T
-+b9axV3ro9beU0oEGabZoAk8tX81H7/ArOZT2RE+3xUJ67nGV3/lTOA3jXnODfia
-pggL9YhwbpbpKv3ayyEKIWfozk2BMHLmaVPisxZPUidfU6YNpABPThS+TwNS7Z4=
-=15Rg
+iQEcBAEBAgAGBQJPTdapAAoJEPATRTHh2/q1qCUH/1oa2hzCH3H7hXdsBKMBI3lW
+MCP0+C1+zadoUExkepHuIWKsIRT2rVpmLVMEi2ahi8gvpof+jhk3pa9UozflgHuh
+kvPs2l3RNCRvCyC1RAqpL4xXiUmPjiLZ+qqY8A8xUZFlE1nOqhKEzlH6sparmxHT
+sKPDRLhShLTKg6PedaZQroAd/zJ2u7AjIXFOPOYg4d3ZfXk75MHes5UE4gkDezBc
+XNfIv02lXyJ0KhuInRzoTlDUxvro1mX9wQTinGAhQQmMCBehKqhCiinTEFSNBjdr
+GwkSzCUcdZrcgzdnu6Q5Pn5wfg3mDK9u4gp4cEcC/zIgnj0mynoXXCtGqZQUh7U=
+=blQr
-----END PGP SIGNATURE-----
diff --git a/net-mail/notmuch/files/0.10.2-emacsui-mml-tags-quoting-fix.patch b/net-mail/notmuch/files/0.10.2-emacsui-mml-tags-quoting-fix.patch
new file mode 100644
index 000000000000..e6d8099f8d4e
--- /dev/null
+++ b/net-mail/notmuch/files/0.10.2-emacsui-mml-tags-quoting-fix.patch
@@ -0,0 +1,56 @@
+From 52a5f9e1756a5f69570bf694fe3e384cbef84eb9 Mon Sep 17 00:00:00 2001
+From: Aaron Ecay <aaronecay@gmail.com>
+Date: Fri, 3 Feb 2012 11:24:08 +0100
+Subject: [PATCH 2/4] emacs: quote MML tags in replies
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Emacs message-mode uses certain text strings to indicate how to attach
+files to outgoing mail. If these are present in the text of an email,
+and a user is tricked into replying to the message, the user’s files
+could be exposed.
+
+Edited-by: Pieter Praet <pieter@praet.org>: Rebased to release branch.
+
+Conflicts:
+
+ NEWS
+---
+ emacs/notmuch-mua.el | 7 ++++++-
+ test/emacs | 1 -
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
+index 8824b08..a123c71 100644
+--- a/emacs/notmuch-mua.el
++++ b/emacs/notmuch-mua.el
+@@ -109,7 +109,12 @@ list."
+ (insert body))
+ (set-buffer-modified-p nil)
+
+- (message-goto-body))
++ (message-goto-body)
++ ;; Original message may contain (malicious) MML tags. We must
++ ;; properly quote them in the reply. Note that using `point-max'
++ ;; instead of `mark' here is wrong. The buffer may include user's
++ ;; signature which should not be MML-quoted.
++ (mml-quote-region (point) (point-max)))
+
+ (defun notmuch-mua-forward-message ()
+ (message-forward)
+diff --git a/test/emacs b/test/emacs
+index a8f4be4..ad8941c 100755
+--- a/test/emacs
++++ b/test/emacs
+@@ -253,7 +253,6 @@ EOF
+ test_expect_equal_file OUTPUT EXPECTED
+
+ test_begin_subtest "Quote MML tags in reply"
+-test_subtest_known_broken
+ message_id='test-emacs-mml-quoting@message.id'
+ add_message [id]="$message_id" \
+ "[subject]='$test_subtest_name'" \
+--
+1.7.8.4
+
diff --git a/net-mail/notmuch/files/0.10.2-emacsui-mml-tags-quoting-test.patch b/net-mail/notmuch/files/0.10.2-emacsui-mml-tags-quoting-test.patch
new file mode 100644
index 000000000000..b293814d1a9e
--- /dev/null
+++ b/net-mail/notmuch/files/0.10.2-emacsui-mml-tags-quoting-test.patch
@@ -0,0 +1,49 @@
+From 1c34ca30118ee8c7fb08228bfb211ff1a7f4f260 Mon Sep 17 00:00:00 2001
+From: Aaron Ecay <aaronecay@gmail.com>
+Date: Fri, 3 Feb 2012 11:24:07 +0100
+Subject: [PATCH 1/4] test: add tests for quoting of MML tags in replies
+
+The test is broken at this time; the next commit will introduce a fix.
+
+Edited-by: Pieter Praet <pieter@praet.org>:
+ Rebased to release branch, moved expected output into the actual test,
+ and fixed "Fcc:" line.
+---
+ test/emacs | 21 +++++++++++++++++++++
+ 1 files changed, 21 insertions(+), 0 deletions(-)
+
+diff --git a/test/emacs b/test/emacs
+index 75a0a74..a8f4be4 100755
+--- a/test/emacs
++++ b/test/emacs
+@@ -252,6 +252,27 @@ On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> w
+ EOF
+ test_expect_equal_file OUTPUT EXPECTED
+
++test_begin_subtest "Quote MML tags in reply"
++test_subtest_known_broken
++message_id='test-emacs-mml-quoting@message.id'
++add_message [id]="$message_id" \
++ "[subject]='$test_subtest_name'" \
++ '[body]="<#part disposition=inline>"'
++test_emacs "(notmuch-show \"id:$message_id\")
++ (notmuch-show-reply)
++ (test-output)"
++cat <<EOF >EXPECTED
++From: Notmuch Test Suite <test_suite@notmuchmail.org>
++To:
++Subject: Re: Quote MML tags in reply
++In-Reply-To: <test-emacs-mml-quoting@message.id>
++Fcc: ${MAIL_DIR}/sent
++--text follows this line--
++On Tue, 05 Jan 2001 15:43:57 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
++> <#!part disposition=inline>
++EOF
++test_expect_equal_file OUTPUT EXPECTED
++
+ test_begin_subtest "Save attachment from within emacs using notmuch-show-save-attachments"
+ # save as archive to test that Emacs does not re-compress .gz
+ test_emacs '(let ((standard-input "\"attachment1.gz\""))
+--
+1.7.8.4
+
diff --git a/net-mail/notmuch/files/0.10.2-lib-call-g_mime_init-db-open.patch b/net-mail/notmuch/files/0.10.2-lib-call-g_mime_init-db-open.patch
new file mode 100644
index 000000000000..7521e39b0358
--- /dev/null
+++ b/net-mail/notmuch/files/0.10.2-lib-call-g_mime_init-db-open.patch
@@ -0,0 +1,55 @@
+From 5f4dad1b12e224f06576e5ed9e71b3f9f16a13f1 Mon Sep 17 00:00:00 2001
+From: Kazuo Teramoto <kaz.rag@gmail.com>
+Date: Sat, 31 Dec 2011 02:37:41 -0200
+Subject: [PATCH 3/3] lib: call g_mime_init() from notmuch_database_open()
+
+As reported in
+id:"CAEbOPGyuHnz4BPtDutnTPUHcP3eYcRCRkXhYoJR43RUMw671+g@mail.gmail.com"
+sometimes gmime tries to access a NULL pointer, e.g. g_mime_iconv_open()
+tries to access iconv_cache that is NULL if g_mime_init() is not called.
+This causes notmuch to segfault when calling gmime functions.
+
+Calling g_mime_init() initializes iconv_cache and others variables needed
+by gmime, making sure they are initialized when notmuch calls gmime
+functions.
+---
+ lib/database.cc | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+diff --git a/lib/database.cc b/lib/database.cc
+index 98f101e..df6c8d0 100644
+--- a/lib/database.cc
++++ b/lib/database.cc
+@@ -28,6 +28,8 @@
+ #include <glib.h> /* g_free, GPtrArray, GHashTable */
+ #include <glib-object.h> /* g_type_init */
+
++#include <gmime/gmime.h> /* g_mime_init */
++
+ using namespace std;
+
+ #define ARRAY_SIZE(arr) (sizeof (arr) / sizeof (arr[0]))
+@@ -581,6 +583,7 @@ notmuch_database_open (const char *path,
+ struct stat st;
+ int err;
+ unsigned int i, version;
++ static int initialized = 0;
+
+ if (asprintf (&notmuch_path, "%s/%s", path, ".notmuch") == -1) {
+ notmuch_path = NULL;
+@@ -604,6 +607,12 @@ notmuch_database_open (const char *path,
+ /* Initialize the GLib type system and threads */
+ g_type_init ();
+
++ /* Initialize gmime */
++ if (! initialized) {
++ g_mime_init (0);
++ initialized = 1;
++ }
++
+ notmuch = talloc (NULL, notmuch_database_t);
+ notmuch->exception_reported = FALSE;
+ notmuch->path = talloc_strdup (notmuch, path);
+--
+1.7.8.4
+
diff --git a/net-mail/notmuch/notmuch-0.10.2-r2.ebuild b/net-mail/notmuch/notmuch-0.10.2-r2.ebuild
new file mode 100644
index 000000000000..7ed4b01fd586
--- /dev/null
+++ b/net-mail/notmuch/notmuch-0.10.2-r2.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/notmuch/notmuch-0.10.2-r2.ebuild,v 1.1 2012/02/29 07:41:23 aidecoe Exp $
+
+EAPI=4
+
+PYTHON_DEPEND="python? 2:2.6"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="2.[45] 3.*"
+
+inherit elisp-common distutils
+inherit autotools-utils
+
+DESCRIPTION="The mail indexer"
+HOMEPAGE="http://notmuchmail.org/"
+SRC_URI="${HOMEPAGE}/releases/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+REQUIRED_USE="test? ( crypt emacs )"
+IUSE="bash-completion crypt debug doc emacs python test vim zsh-completion"
+
+CDEPEND="
+ >=dev-libs/glib-2.22
+ dev-libs/gmime:2.4
+ dev-libs/xapian
+ doc? ( python? ( dev-python/sphinx ) )
+ sys-libs/talloc
+ debug? ( dev-util/valgrind )
+ emacs? ( >=virtual/emacs-23 )
+ x86? ( >=dev-libs/xapian-1.2.7-r2 )
+ vim? ( || ( >=app-editors/vim-7.0 >=app-editors/gvim-7.0 ) )
+ "
+DEPEND="${CDEPEND}
+ dev-util/pkgconfig
+ test? ( app-misc/dtach sys-devel/gdb )
+ "
+RDEPEND="${CDEPEND}
+ crypt? ( app-crypt/gnupg )
+ zsh-completion? ( app-shells/zsh )
+ "
+
+PATCHES=(
+ "${FILESDIR}/${PV}-fix-test-build.patch"
+ "${FILESDIR}/${PV}-emacsui-mml-tags-quoting-test.patch"
+ "${FILESDIR}/${PV}-emacsui-mml-tags-quoting-fix.patch"
+ "${FILESDIR}/${PV}-lib-call-g_mime_init-db-open.patch"
+ )
+DOCS=( AUTHORS NEWS README TODO )
+SITEFILE="50${PN}-gentoo.el"
+
+bindings() {
+ if use $1; then
+ pushd bindings/$1 || die
+ shift
+ $@
+ popd || die
+ fi
+}
+
+pkg_setup() {
+ if use emacs; then
+ elisp-need-emacs 23 || die "Emacs version too low"
+ fi
+ use python && python_pkg_setup
+}
+
+src_prepare() {
+ autotools-utils_src_prepare
+ bindings python distutils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --bashcompletiondir="${ROOT}/usr/share/bash-completion"
+ --emacslispdir="${ROOT}/${SITELISP}/${PN}"
+ --emacsetcdir="${ROOT}/${SITEETC}/${PN}"
+ --zshcompletiondir="${ROOT}/usr/share/zsh/site-functions"
+ $(use_with bash-completion)
+ $(use_with emacs)
+ $(use_with zsh-completion)
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+ bindings python distutils_src_compile
+
+ if use doc; then
+ pydocs() {
+ pushd docs || die
+ emake html
+ mv html ../python || die
+ popd || die
+ }
+ LD_LIBRARY_PATH="${WORKDIR}/${PF}_build/lib" bindings python pydocs
+ fi
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if use emacs; then
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
+ fi
+
+ if use vim; then
+ insinto /usr/share/vim/vimfiles
+ doins -r vim/plugin vim/syntax
+ fi
+
+ DOCS="" bindings python distutils_src_install
+
+ if use doc; then
+ bindings python dohtml -r python
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ use python && distutils_pkg_postinst
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+ use python && distutils_pkg_postrm
+}