SHA256
1
0
forked from pool/libvmime

Accepting request 110162 from devel:libraries:c_c++

- Update to new SVN snapshot rev 603 (ZCP 7.0.6 dependency)
* Set Diffie-Hellman prime size (bug SF#3434852)

OBS-URL: https://build.opensuse.org/request/show/110162
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvmime?expand=0&rev=2
This commit is contained in:
Stephan Kulow 2012-03-22 11:34:38 +00:00 committed by Git OBS Bridge
parent aa26830cff
commit 2535eddad7
8 changed files with 140 additions and 69 deletions

BIN
libvmime-0.9.1+.tar.bz2 (Stored with Git LFS)

Binary file not shown.

BIN
libvmime-0.9.1+svn603.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,37 +0,0 @@
From: Jan Engelhardt <jengelh@medozas.de>
Date: 2011-10-07 00:06:10.890341952 +0200
Upstream: tbd
build: resolve build error with libgnutls-3.x
The gnutls/extra.h include is gone in libgnutls 3.x, and it
does not seem like we need it for libgnutls 2.x anyway,
so just remove it.
GNUTLS_E_LZO_INIT_FAILED was removed too.. can probably live
without in gnutls2.
---
src/net/tls/TLSSession.cpp | 2 --
1 file changed, 2 deletions(-)
Index: vmime/src/net/tls/TLSSession.cpp
===================================================================
--- vmime.orig/src/net/tls/TLSSession.cpp
+++ vmime/src/net/tls/TLSSession.cpp
@@ -22,7 +22,6 @@
//
#include <gnutls/gnutls.h>
-#include <gnutls/extra.h>
#include "vmime/config.hpp"
@@ -318,7 +317,6 @@ void TLSSession::throwTLSException(const
ERROR(GNUTLS_E_INIT_LIBEXTRA)
ERROR(GNUTLS_E_LIBRARY_VERSION_MISMATCH)
ERROR(GNUTLS_E_NO_TEMPORARY_RSA_PARAMS)
- ERROR(GNUTLS_E_LZO_INIT_FAILED)
ERROR(GNUTLS_E_NO_COMPRESSION_ALGORITHMS)
ERROR(GNUTLS_E_NO_CIPHER_SUITES)
ERROR(GNUTLS_E_OPENPGP_GETKEY_FAILED)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Mar 16 12:33:11 UTC 2012 - jengelh@medozas.de
- Update to new SVN snapshot rev 603 (ZCP 7.0.6 dependency)
* Set Diffie-Hellman prime size (bug SF#3434852)
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jun 30 14:59:15 UTC 2011 - jengelh@medozas.de Thu Jun 30 14:59:15 UTC 2011 - jengelh@medozas.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package libvmime # spec file for package libvmime
# #
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -15,38 +15,51 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: libvmime
%define lname libvmime-0_9_2-0
Summary: Library for working with MIME messages and IMAP/POP/SMTP
Version: 0.9.2
Release: 0
Group: Development/Libraries/C and C++
URL: http://vmime.sf.net/
License: GPL-3.0+
Name: libvmime
%define lname libvmime-0_9_2-0
Summary: Library for working with MIME messages and IMAP/POP/SMTP
License: GPL-3.0+
Group: Development/Libraries/C and C++
Version: 0.9.2
Release: 0
Url: http://vmime.sf.net/
#Svn-Clone: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk
#Source: http://downloads.sf.net/vmime/%name-%version.tar.bz2 #Source: http://downloads.sf.net/vmime/%name-%version.tar.bz2
Source: %name-0.9.1+.tar.bz2 Source: %name-0.9.1+svn603.tar.bz2
Source2: spice_source.sh Source2: spice_source.sh
#Svn-Clone: https://vmime.svn.sourceforge.net/svnroot/vmime Patch1: libvmime-nodatetime.diff
Patch1: libvmime-nodatetime.diff
# PATCH-WORKAROUND-UPSTREAM libvmime-sotag.diff # PATCH-WORKAROUND-UPSTREAM libvmime-sotag.diff
Patch2: libvmime-sotag.diff Patch2: libvmime-sotag.diff
# PATCH-FEATURE-UPSTREAM vmime-0.8.1-charset-catch.diff x -- ZCP team will deal with this in time # PATCH-FEATURE-UPSTREAM vmime-0.8.1-charset-catch.diff x -- ZCP team will deal with this in time
Patch3: vmime-0.8.1-charset-catch.diff Patch3: vmime-0.8.1-charset-catch.diff
# PATCH-FIX-UPSTREAM libvmime-libgnutls28.diff Patch4: vmime-0.9.2-header-value-on-next-line.diff
Patch4: libvmime-libgnutls28.diff Patch5: vmime-mixed-qp-in-parameter.diff
BuildRoot: %_tmppath/%name-%version-build Patch6: vmime-0.9.2-qp-in-buffers.diff
BuildRequires: autoconf, automake, gcc-c++, libgsasl-devel, libtool BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libgcrypt-devel, pkgconfig, postfix, scons, xz BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: libgcrypt-devel
BuildRequires: libgsasl-devel
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: postfix
BuildRequires: scons
BuildRequires: xz
%if 0%{?suse_version} >= 1100 %if 0%{?suse_version} >= 1100
BuildRequires: gettext-tools, libgnutls-devel, libselinux-devel BuildRequires: gettext-tools
BuildRequires: libgnutls-devel
BuildRequires: libselinux-devel
%else %else
%if 0%{?suse_version} > 0 %if 0%{?suse_version} > 0
BuildRequires: gnutls-devel BuildRequires: gnutls-devel
%endif %endif
%endif %endif
%if 0%{?fedora_version} > 0 %if 0%{?fedora_version} > 0
BuildRequires: gettext, gnutls-devel BuildRequires: gettext
BuildRequires: gnutls-devel
%endif %endif
%description %description
@ -59,8 +72,8 @@ over the Internet. The library offers all the features to build a
complete mail client. complete mail client.
%package -n %lname %package -n %lname
Summary: Library for working with MIME messages and IMAP/POP/SMTP Summary: Library for working with MIME messages and IMAP/POP/SMTP
Group: System/Libraries Group: System/Libraries
%description -n %lname %description -n %lname
VMime is a powerful C++ class library for working with MIME messages VMime is a powerful C++ class library for working with MIME messages
@ -72,9 +85,9 @@ over the Internet. The library offers all the features to build a
complete mail client. complete mail client.
%package devel %package devel
Summary: Library for working with MIME messages and IMAP/POP/SMTP Summary: Library for working with MIME messages and IMAP/POP/SMTP
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %lname = %version Requires: %lname = %version
%description devel %description devel
VMime is a powerful C++ class library for working with MIME messages VMime is a powerful C++ class library for working with MIME messages
@ -87,7 +100,7 @@ complete mail client.
%prep %prep
%setup -qn vmime %setup -qn vmime
%patch -P 1 -P 2 -P 3 -P 4 -p1 %patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -p1
%build %build
# sendmail's awesome location. # sendmail's awesome location.

View File

@ -0,0 +1,45 @@
diff -Nurb libvmime-0.9.2.orig/src/headerField.cpp libvmime-0.9.2.patched/src/headerField.cpp
--- libvmime-0.9.2.orig/src/headerField.cpp 2010-05-20 05:33:45.000000000 -0700
+++ libvmime-0.9.2.patched/src/headerField.cpp 2011-08-29 12:10:08.438497914 -0700
@@ -157,14 +157,12 @@
{
contentsEnd = pos;
pos += 2;
- break;
}
else if (c == '\n')
{
contentsEnd = pos;
++pos;
- break;
- }
+ } else {
while (pos < end)
{
@@ -186,24 +184,13 @@
++pos;
}
+ }
// Handle the case of folded lines
if (buffer[pos] == ' ' || buffer[pos] == '\t')
{
// This is a folding white-space: we keep it as is and
// we continue with contents parsing...
-
- // If the line contains only space characters, we assume it is
- // the end of the headers. This is not strictly standard-compliant
- // but, hey, we can't fail when parsing some malformed mails...
- while (pos < end && (buffer[pos] == ' ' || buffer[pos] == '\t'))
- ++pos;
-
- if ((pos < end && buffer[pos] == '\n') ||
- (pos + 1 < end && buffer[pos] == '\r' && buffer[pos + 1] == '\n'))
- {
- break;
- }
}
else
{

View File

@ -0,0 +1,16 @@
--- svn/src/wordEncoder.cpp (revision 603)
+++ svn/src/wordEncoder.cpp (working copy)
@@ -239,6 +239,13 @@
if (buffer.find_first_of("\n\r") != string::npos)
return true;
+ // If the string contains a QP string, we need to encode this.
+ // Not a 100% check, but we'd only get more encoded strings.
+ std::string::size_type pos = buffer.find("=?");
+ std::string::size_type end = buffer.find("?=");
+ if (pos != string::npos && end != string::npos && end > pos)
+ return true;
+
return false;
}

View File

@ -0,0 +1,28 @@
Index: svn/src/parameter.cpp
===================================================================
--- svn/src/parameter.cpp (revision 597)
+++ svn/src/parameter.cpp (working copy)
@@ -239,8 +239,21 @@
{
value << t.getWholeBuffer();
- if (!foundCharsetChunk)
- ch = t.getWordAt(0)->getCharset();
+ if (!foundCharsetChunk) {
+ // this is still wrong. each word can have it's
+ // own charset, and can be mixed (eg. iso-8859-1
+ // and iso-2022-jp), but very unlikely.
+ // real fix is to have parameters store a
+ // vmime::text in stead of a vmime::word in
+ // m_value. but that changes the interface
+ for (size_t i = 0; i < t.getWordCount(); i++) {
+ if (t.getWordAt(i)->getCharset() != ch && ch == charsets::US_ASCII) {
+ ch = t.getWordAt(i)->getCharset();
+ break;
+ }
+ }
+
+ }
}
}
}