[notmuch/f16] Revert of the merge, go back to 0.6.1-2. Broken GMime on F16 prevents the package from bui from buil
Karel Klíč
kklic at fedoraproject.org
Fri Jul 13 11:53:39 UTC 2012
commit 0000211932818d040a6ef9e3e55e8b3a452cf54f
Author: Karel Klic <kklic at redhat.com>
Date: Fri Jul 13 13:53:07 2012 +0200
Revert of the merge, go back to 0.6.1-2. Broken GMime on F16 prevents the package from bui from building successfully.
.gitignore | 4 -
notmuch-0.6.1-gmime.patch | 233 +++++++++++++++++++++++++++++++++++++++++++++
notmuch.spec | 108 ++++-----------------
sources | 2 +-
4 files changed, 256 insertions(+), 91 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ffea596..7432a07 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,2 @@
/notmuch-0.5.tar.gz
/notmuch-0.6.1.tar.gz
-/notmuch-0.9.tar.gz
-/notmuch-0.11.tar.gz
-/notmuch-0.11.1.tar.gz
-/notmuch-0.13.2.tar.gz
diff --git a/notmuch-0.6.1-gmime.patch b/notmuch-0.6.1-gmime.patch
new file mode 100644
index 0000000..d054d67
--- /dev/null
+++ b/notmuch-0.6.1-gmime.patch
@@ -0,0 +1,233 @@
+diff -up notmuch-0.6.1/notmuch-client.h.gmime notmuch-0.6.1/notmuch-client.h
+--- notmuch-0.6.1/notmuch-client.h.gmime 2011-07-17 16:20:51.000000000 +0200
++++ notmuch-0.6.1/notmuch-client.h 2011-07-28 17:24:16.904949635 +0200
+@@ -68,7 +68,7 @@ typedef struct notmuch_show_format {
+ void (*part_start) (GMimeObject *part,
+ int *part_count);
+ void (*part_encstatus) (int status);
+- void (*part_sigstatus) (const GMimeSignatureValidity* validity);
++ void (*part_sigstatus) (GMimeSignatureList *siglist);
+ void (*part_content) (GMimeObject *part);
+ void (*part_end) (GMimeObject *part);
+ const char *part_sep;
+@@ -82,7 +82,7 @@ typedef struct notmuch_show_params {
+ int entire_thread;
+ int raw;
+ int part;
+- GMimeCipherContext* cryptoctx;
++ GMimeCryptoContext* cryptoctx;
+ int decrypt;
+ } notmuch_show_params_t;
+
+diff -up notmuch-0.6.1/notmuch-reply.c.gmime notmuch-0.6.1/notmuch-reply.c
+--- notmuch-0.6.1/notmuch-reply.c.gmime 2011-07-17 16:20:51.000000000 +0200
++++ notmuch-0.6.1/notmuch-reply.c 2011-07-28 17:24:16.904949635 +0200
+@@ -610,13 +610,10 @@ notmuch_reply_command (void *ctx, int ar
+ }
+ } else if ((STRNCMP_LITERAL (argv[i], "--decrypt") == 0)) {
+ if (params.cryptoctx == NULL) {
+- GMimeSession* session = g_object_new(g_mime_session_get_type(), NULL);
+- if (NULL == (params.cryptoctx = g_mime_gpg_context_new(session, "gpg")))
++ if (NULL == (params.cryptoctx = g_mime_gpg_context_new(NULL, "gpg")))
+ fprintf (stderr, "Failed to construct gpg context.\n");
+ else
+ g_mime_gpg_context_set_always_trust((GMimeGpgContext*)params.cryptoctx, FALSE);
+- g_object_unref (session);
+- session = NULL;
+ }
+ } else {
+ fprintf (stderr, "Unrecognized option: %s\n", argv[i]);
+diff -up notmuch-0.6.1/notmuch-show.c.gmime notmuch-0.6.1/notmuch-show.c
+--- notmuch-0.6.1/notmuch-show.c.gmime 2011-07-17 16:20:51.000000000 +0200
++++ notmuch-0.6.1/notmuch-show.c 2011-07-28 17:24:16.905949620 +0200
+@@ -70,7 +70,7 @@ static void
+ format_part_encstatus_json (int status);
+
+ static void
+-format_part_sigstatus_json (const GMimeSignatureValidity* validity);
++format_part_sigstatus_json (GMimeSignatureList *siglist);
+
+ static void
+ format_part_content_json (GMimeObject *part);
+@@ -420,16 +420,14 @@ show_text_part_content (GMimeObject *par
+ }
+
+ static const char*
+-signer_status_to_string (GMimeSignerStatus x)
++signature_status_to_string (GMimeSignatureStatus x)
+ {
+ switch (x) {
+- case GMIME_SIGNER_STATUS_NONE:
+- return "none";
+- case GMIME_SIGNER_STATUS_GOOD:
++ case GMIME_SIGNATURE_STATUS_GOOD:
+ return "good";
+- case GMIME_SIGNER_STATUS_BAD:
++ case GMIME_SIGNATURE_STATUS_BAD:
+ return "bad";
+- case GMIME_SIGNER_STATUS_ERROR:
++ case GMIME_SIGNATURE_STATUS_ERROR:
+ return "error";
+ }
+ return "unknown";
+@@ -524,59 +522,65 @@ format_part_encstatus_json (int status)
+ }
+
+ static void
+-format_part_sigstatus_json (const GMimeSignatureValidity* validity)
++format_part_sigstatus_json (GMimeSignatureList *siglist)
+ {
+ printf (", \"sigstatus\": [");
+
+- if (!validity) {
++ if (!siglist) {
+ printf ("]");
+ return;
+ }
+
+- const GMimeSigner *signer = g_mime_signature_validity_get_signers (validity);
+- int first = 1;
+ void *ctx_quote = talloc_new (NULL);
++ int i;
++ for (i = 0; i < g_mime_signature_list_length (siglist); ++i) {
++ GMimeSignature *signature = g_mime_signature_list_get_signature (siglist, i);
+
+- while (signer) {
+- if (first)
+- first = 0;
+- else
++ if (i > 0)
+ printf (", ");
+-
+ printf ("{");
+
+ /* status */
++ GMimeSignatureStatus status = g_mime_signature_get_status (signature);
+ printf ("\"status\": %s",
+ json_quote_str (ctx_quote,
+- signer_status_to_string (signer->status)));
++ signature_status_to_string (status)));
+
+- if (signer->status == GMIME_SIGNER_STATUS_GOOD)
++ GMimeCertificate *certificate = g_mime_signature_get_certificate (signature);
++ if (status == GMIME_SIGNATURE_STATUS_GOOD)
+ {
+- if (signer->fingerprint)
+- printf (", \"fingerprint\": %s", json_quote_str (ctx_quote, signer->fingerprint));
++ if (certificate)
++ printf (", \"fingerprint\": %s", json_quote_str (ctx_quote, g_mime_certificate_get_fingerprint (certificate)));
+ /* these dates are seconds since the epoch; should we
+ * provide a more human-readable format string? */
+- if (signer->created)
+- printf (", \"created\": %d", (int) signer->created);
+- if (signer->expires)
+- printf (", \"expires\": %d", (int) signer->expires);
++ time_t created = g_mime_signature_get_created (signature);
++ if (created != -1)
++ printf (", \"created\": %d", (int) created);
++ time_t expires = g_mime_signature_get_expires (signature);
++ if (expires != -1)
++ printf (", \"expires\": %d", (int) expires);
+ /* output user id only if validity is FULL or ULTIMATE. */
+ /* note that gmime is using the term "trust" here, which
+ * is WRONG. It's actually user id "validity". */
+- if ((signer->name) && (signer->trust)) {
+- if ((signer->trust == GMIME_SIGNER_TRUST_FULLY) || (signer->trust == GMIME_SIGNER_TRUST_ULTIMATE))
+- printf (", \"userid\": %s", json_quote_str (ctx_quote, signer->name));
++ if (certificate)
++ {
++ const char *name = g_mime_certificate_get_issuer_name (certificate);
++ GMimeCertificateTrust trust = g_mime_certificate_get_trust (certificate);
++ if (name && (trust == GMIME_CERTIFICATE_TRUST_FULLY || trust == GMIME_CERTIFICATE_TRUST_ULTIMATE))
++ printf (", \"userid\": %s", json_quote_str (ctx_quote, name));
+ }
+- } else {
+- if (signer->keyid)
+- printf (", \"keyid\": %s", json_quote_str (ctx_quote, signer->keyid));
+- }
+- if (signer->errors != GMIME_SIGNER_ERROR_NONE) {
+- printf (", \"errors\": %x", signer->errors);
+- }
++ } else if (certificate) {
++ const char *key_id = g_mime_certificate_get_key_id (certificate);
++ if (key_id)
++ printf (", \"keyid\": %s", json_quote_str (ctx_quote, key_id));
++ }
++
++ GMimeSignatureError errors = g_mime_signature_get_errors (signature);
++ if (errors != GMIME_SIGNATURE_ERROR_NONE) {
++ printf (", \"errors\": %x", errors);
++ }
+
+- printf ("}");
+- signer = signer->next;
++ printf ("}");
+ }
+
+ printf ("]");
+@@ -899,13 +903,10 @@ notmuch_show_command (void *ctx, unused
+ } else if ((STRNCMP_LITERAL (argv[i], "--verify") == 0) ||
+ (STRNCMP_LITERAL (argv[i], "--decrypt") == 0)) {
+ if (params.cryptoctx == NULL) {
+- GMimeSession* session = g_object_new(g_mime_session_get_type(), NULL);
+- if (NULL == (params.cryptoctx = g_mime_gpg_context_new(session, "gpg")))
++ if (NULL == (params.cryptoctx = g_mime_gpg_context_new(NULL, "gpg")))
+ fprintf (stderr, "Failed to construct gpg context.\n");
+ else
+ g_mime_gpg_context_set_always_trust((GMimeGpgContext*)params.cryptoctx, FALSE);
+- g_object_unref (session);
+- session = NULL;
+ }
+ if (STRNCMP_LITERAL (argv[i], "--decrypt") == 0)
+ params.decrypt = 1;
+diff -up notmuch-0.6.1/show-message.c.gmime notmuch-0.6.1/show-message.c
+--- notmuch-0.6.1/show-message.c.gmime 2011-07-17 16:20:51.000000000 +0200
++++ notmuch-0.6.1/show-message.c 2011-07-28 17:27:12.295304742 +0200
+@@ -68,15 +68,16 @@ show_message_part (GMimeObject *part,
+ g_mime_multipart_get_count (multipart));
+ } else {
+ GMimeMultipartEncrypted *encrypteddata = GMIME_MULTIPART_ENCRYPTED (part);
+- decryptedpart = g_mime_multipart_encrypted_decrypt (encrypteddata, params->cryptoctx, &err);
++ GMimeDecryptResult *decrypt_result = g_mime_decrypt_result_new ();
++ decryptedpart = g_mime_multipart_encrypted_decrypt (encrypteddata, params->cryptoctx, &decrypt_result, &err);
+ if (decryptedpart) {
+ if ((selected || state->in_zone) && format->part_encstatus)
+ format->part_encstatus (1);
+- const GMimeSignatureValidity *sigvalidity = g_mime_multipart_encrypted_get_signature_validity (encrypteddata);
+- if (!sigvalidity)
+- fprintf (stderr, "Failed to verify signed part: %s\n", (err ? err->message : "no error explanation given"));
++ GMimeSignatureList *siglist = g_mime_decrypt_result_get_signatures (decrypt_result);
++ if (!siglist)
++ fprintf (stderr, "Failed to get signatures: %s\n", (err ? err->message : "no error explanation given"));
+ if ((selected || state->in_zone) && format->part_sigstatus)
+- format->part_sigstatus (sigvalidity);
++ format->part_sigstatus (siglist);
+ } else {
+ fprintf (stderr, "Failed to decrypt part: %s\n", (err ? err->message : "no error explanation given"));
+ if ((selected || state->in_zone) && format->part_encstatus)
+@@ -92,20 +93,14 @@ show_message_part (GMimeObject *part,
+ "Error: %d part(s) for a multipart/signed message (should be exactly 2)\n",
+ g_mime_multipart_get_count (multipart));
+ } else {
+- /* For some reason the GMimeSignatureValidity returned
+- * here is not a const (inconsistent with that
+- * returned by
+- * g_mime_multipart_encrypted_get_signature_validity,
+- * and therefore needs to be properly disposed of.
+- * Hopefully the API will become more consistent. */
+- GMimeSignatureValidity *sigvalidity = g_mime_multipart_signed_verify (GMIME_MULTIPART_SIGNED (part), params->cryptoctx, &err);
+- if (!sigvalidity) {
++ GMimeSignatureList *siglist = g_mime_multipart_signed_verify (GMIME_MULTIPART_SIGNED (part), params->cryptoctx, &err);
++ if (!siglist) {
+ fprintf (stderr, "Failed to verify signed part: %s\n", (err ? err->message : "no error explanation given"));
+ }
+ if ((selected || state->in_zone) && format->part_sigstatus)
+- format->part_sigstatus (sigvalidity);
+- if (sigvalidity)
+- g_mime_signature_validity_free (sigvalidity);
++ format->part_sigstatus (siglist);
++ if (siglist)
++ g_object_unref (siglist);
+ }
+ }
+
diff --git a/notmuch.spec b/notmuch.spec
index 3d57df7..421118c 100644
--- a/notmuch.spec
+++ b/notmuch.spec
@@ -1,15 +1,19 @@
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-
Name: notmuch
-Version: 0.13.2
+Version: 0.6.1
Release: 2%{?dist}
Summary: System for indexing, searching, and tagging email
Group: Applications/Internet
License: GPLv3+
URL: http://notmuchmail.org/
Source0: http://notmuchmail.org/releases/notmuch-%{version}.tar.gz
-BuildRequires: xapian-core-devel gmime-devel libtalloc-devel
-BuildRequires: zlib-devel emacs-el emacs-nox perl python2-devel
+Patch0: notmuch-0.6.1-gmime.patch
+Patch1: notmuch-cve-2011-1103.patch
+BuildRequires: xapian-core-devel
+BuildRequires: gmime-devel
+BuildRequires: libtalloc-devel
+BuildRequires: zlib-devel
+BuildRequires: emacs-el
+BuildRequires: emacs-nox
%description
Fast system for indexing, searching, and tagging email. Even if you
@@ -42,33 +46,23 @@ Summary: Not much support for Emacs
Group: Applications/Editors
BuildArch: noarch
Requires: %{name} = %{version}-%{release}, emacs(bin) >= %{_emacs_version}
-Obsoletes: emacs-notmuch-el < 0.11.1-2
-Provides: emacs-notmuch-el < 0.11.1-2
%description -n emacs-notmuch
%{summary}.
-%package -n python-notmuch
-Summary: Python bindings for notmuch
-Group: Development/Libraries
+%package -n emacs-notmuch-el
+Summary: Elisp source files for Not much support for Emacs
+Group: Applications/Editors
BuildArch: noarch
-Requires: %{name} = %{version}-%{release}
+Requires: emacs-notmuch = %{version}-%{release}
-%description -n python-notmuch
+%description -n emacs-notmuch-el
%{summary}.
-%package mutt
-Summary: Notmuch (of a) helper for Mutt
-Group: Development/Libraries
-BuildArch: noarch
-Requires: %{name} = %{version}-%{release}
-
-%description mutt
-notmuch-mutt provide integration among the Mutt mail user agent and
-the Notmuch mail indexer.
-
%prep
%setup -q
+%patch0 -p1 -b .gmime
+%patch1 -p1 -b .cve-2011-1103
%build
# The %%configure macro cannot be used because notmuch doesn't support
@@ -78,96 +72,38 @@ the Notmuch mail indexer.
--emacslispdir=%{_emacs_sitelispdir}
make %{?_smp_mflags} CFLAGS="%{optflags}"
-# Build the python bindings
-pushd bindings/python
- python setup.py build
-popd
-
-# Build notmuch-mutt
-pushd contrib/notmuch-mutt
- make
-popd
-
%install
make install DESTDIR=%{buildroot}
# Enable dynamic library stripping.
find %{buildroot}%{_libdir} -name *.so* -exec chmod 755 {} \;
-# Install the python bindings and documentation
-pushd bindings/python
- python setup.py install -O1 --skip-build --root %{buildroot}
-popd
-
-# Install notmuch-mutt
-install contrib/notmuch-mutt/notmuch-mutt %{buildroot}%{_bindir}/notmuch-mutt
-install contrib/notmuch-mutt/notmuch-mutt.1 %{buildroot}%{_mandir}/man1/notmuch-mutt.1
-
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
-%doc AUTHORS COPYING COPYING-GPL-3 INSTALL README
+%doc AUTHORS COPYING COPYING-GPL-3 INSTALL README TODO
%{_sysconfdir}/bash_completion.d/notmuch
%{_datadir}/zsh/functions/Completion/Unix/_notmuch
%{_bindir}/notmuch
%{_mandir}/man1/notmuch.1*
-%{_mandir}/man1/notmuch-config.1*
-%{_mandir}/man1/notmuch-count.1*
-%{_mandir}/man1/notmuch-dump.1*
-%{_mandir}/man1/notmuch-new.1*
-%{_mandir}/man1/notmuch-reply.1*
-%{_mandir}/man1/notmuch-restore.1*
-%{_mandir}/man1/notmuch-search.1*
-%{_mandir}/man1/notmuch-setup.1*
-%{_mandir}/man1/notmuch-show.1*
-%{_mandir}/man1/notmuch-tag.1*
-%{_mandir}/man5/notmuch*.5*
-%{_mandir}/man7/notmuch*.7*
-%{_libdir}/libnotmuch.so.3*
+%{_libdir}/libnotmuch.so.1*
%files devel
%{_libdir}/libnotmuch.so
%{_includedir}/*
%files -n emacs-notmuch
-%{_emacs_sitelispdir}/*.el
%{_emacs_sitelispdir}/*.elc
%{_emacs_sitelispdir}/notmuch-logo.png
-%files -n python-notmuch
-%doc bindings/python/README
-%{python_sitelib}/*
-
-%files mutt
-%{_bindir}/notmuch-mutt
-%{_mandir}/man1/notmuch-mutt.1*
+%files -n emacs-notmuch-el
+%{_emacs_sitelispdir}/*.el
%changelog
-* Fri Jul 13 2012 Karel Klíč <kklic at redhat.com> - 0.13.2-2
-- Packaged notmuch-mutt from contrib
-
-* Fri Jul 13 2012 Karel Klíč <kklic at redhat.com> - 0.13.2-1
-- Update to the newest release
-- Merge emacs-notmuch-el into emacs-el to conform to the packaging
- guidelines
-
-* Wed Mar 7 2012 Karel Klíč <kklic at redhat.com> - 0.11.1-1
-- Update to newest release, which fixes CVE-2011-1103
-
-* Mon Jan 30 2012 Stanislav Ochotnicky <sochotnicky at redhat.com> - 0.11-1
-- Latest upstream release
-- Update patch so it applies
-
-* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
-
-* Thu Oct 20 2011 Luke Macken <lmacken at redhat.com> - 0.9-1
-- Latest upstream release
-
-* Tue Aug 09 2011 Luke Macken <lmacken at redhat.com> - 0.6.1-2
-- Create a subpackage for the Python bindings
+* Wed Mar 7 2012 Karel Klíč <kklic at redhat.com> - 0.6.1-2
+- Added patch for CVE-2011-1103: tag information disclosure flaw
* Thu Jul 28 2011 Karel Klíč <kklic at redhat.com> - 0.6.1-1
- Latest upstream release
diff --git a/sources b/sources
index b9f75ac..02f5220 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-13be4cf1ab2be49b42fec87c3cb44a5a notmuch-0.13.2.tar.gz
+a2d5123d68a0f770e5afe3c2af9f35a3 notmuch-0.6.1.tar.gz
More information about the scm-commits
mailing list