diff options
author | Justin Lecher <jlec@gentoo.org> | 2013-02-20 10:46:25 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2013-02-20 10:46:25 +0000 |
commit | c880f7f177acd5e9760974f20985ec296b823714 (patch) | |
tree | 078368edaf59716eedb9c97bf53b01e1aa696b5b /net-im/gajim | |
parent | dev-python/notify-python: Move to new python eclasses (diff) | |
download | gentoo-2-c880f7f177acd5e9760974f20985ec296b823714.tar.gz gentoo-2-c880f7f177acd5e9760974f20985ec296b823714.tar.bz2 gentoo-2-c880f7f177acd5e9760974f20985ec296b823714.zip |
net-im/gajim: Update Patch, thanks Suloev Dmitry for the fix; move to new python eclasses
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 70EB7916)
Diffstat (limited to 'net-im/gajim')
-rw-r--r-- | net-im/gajim/ChangeLog | 10 | ||||
-rw-r--r-- | net-im/gajim/files/gajim-0.15.2-CVE-2012-5524.patch | 152 | ||||
-rw-r--r-- | net-im/gajim/gajim-0.15.2-r2.ebuild (renamed from net-im/gajim/gajim-0.15.2-r1.ebuild) | 2 | ||||
-rw-r--r-- | net-im/gajim/gajim-0.15.2-r3.ebuild | 119 |
4 files changed, 210 insertions, 73 deletions
diff --git a/net-im/gajim/ChangeLog b/net-im/gajim/ChangeLog index 5151983b1815..2d7cf494b76b 100644 --- a/net-im/gajim/ChangeLog +++ b/net-im/gajim/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-im/gajim # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/gajim/ChangeLog,v 1.162 2013/02/19 16:42:22 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/gajim/ChangeLog,v 1.163 2013/02/20 10:46:25 jlec Exp $ + +*gajim-0.15.2-r3 (20 Feb 2013) +*gajim-0.15.2-r2 (20 Feb 2013) + + 20 Feb 2013; Justin Lecher <jlec@gentoo.org> -gajim-0.15.2-r1.ebuild, + +gajim-0.15.2-r2.ebuild, +gajim-0.15.2-r3.ebuild, + files/gajim-0.15.2-CVE-2012-5524.patch: + Update Patch, thanks Suloev Dmitry for the fix; move to new python eclasses *gajim-0.15.2-r1 (19 Feb 2013) diff --git a/net-im/gajim/files/gajim-0.15.2-CVE-2012-5524.patch b/net-im/gajim/files/gajim-0.15.2-CVE-2012-5524.patch index 8cb0b976bcc4..5249ce80da54 100644 --- a/net-im/gajim/files/gajim-0.15.2-CVE-2012-5524.patch +++ b/net-im/gajim/files/gajim-0.15.2-CVE-2012-5524.patch @@ -1,71 +1,81 @@ -Index: src/common/connection.py
-===================================================================
---- src/common/connection.py (revision 14377)
-+++ src/common/connection.py (revision 14379)
-@@ -1312,19 +1312,22 @@
- errnum = con.Connection.ssl_errnum
- except AttributeError:
-- errnum = -1 # we don't have an errnum
-- if errnum > 0 and str(errnum) not in gajim.config.get_per('accounts',
-- self.name, 'ignore_ssl_errors').split():
-- text = _('The authenticity of the %s certificate could be invalid.'
-- ) % hostname
-- if errnum in ssl_error:
-- text += _('\nSSL Error: <b>%s</b>') % ssl_error[errnum]
-- else:
-- text += _('\nUnknown SSL error: %d') % errnum
-- gajim.nec.push_incoming_event(SSLErrorEvent(None, conn=self,
-- error_text=text, error_num=errnum,
-- cert=con.Connection.ssl_cert_pem,
-- fingerprint=con.Connection.ssl_fingerprint_sha1,
-- certificate=con.Connection.ssl_certificate))
-- return True
-+ errnum = [] # we don't have an errnum
-+ i = 0
-+ for er in errnum:
-+ if er > 0 and str(er) not in gajim.config.get_per('accounts',
-+ self.name, 'ignore_ssl_errors').split():
-+ text = _('The authenticity of the %s certificate could be '
-+ 'invalid.') % hostname
-+ if er in ssl_error:
-+ text += _('\nSSL Error: <b>%s</b>') % ssl_error[er]
-+ else:
-+ text += _('\nUnknown SSL error: %d') % er
-+ gajim.nec.push_incoming_event(SSLErrorEvent(None, conn=self,
-+ error_text=text, error_num=er,
-+ cert=con.Connection.ssl_cert_pem[i],
-+ fingerprint=con.Connection.ssl_fingerprint_sha1[i],
-+ certificate=con.Connection.ssl_certificate[i]))
-+ return True
-+ i += 1
- if hasattr(con.Connection, 'ssl_fingerprint_sha1'):
- saved_fingerprint = gajim.config.get_per('accounts', self.name,
-@@ -1332,12 +1335,15 @@
- if saved_fingerprint:
- # Check sha1 fingerprint
-- if con.Connection.ssl_fingerprint_sha1 != saved_fingerprint:
-+ if con.Connection.ssl_fingerprint_sha1[-1] != saved_fingerprint:
- gajim.nec.push_incoming_event(FingerprintErrorEvent(None,
-- conn=self, certificate=con.Connection.ssl_certificate,
-- new_fingerprint=con.Connection.ssl_fingerprint_sha1))
-+ conn=self,
-+ certificate=con.Connection.ssl_certificate,
-+ new_fingerprint=con.Connection.ssl_fingerprint_sha1[
-+ -1]))
- return True
- else:
- gajim.config.set_per('accounts', self.name,
-- 'ssl_fingerprint_sha1', con.Connection.ssl_fingerprint_sha1)
-+ 'ssl_fingerprint_sha1',
-+ con.Connection.ssl_fingerprint_sha1[-1])
- if not check_X509.check_certificate(con.Connection.ssl_certificate,
- hostname) and '100' not in gajim.config.get_per('accounts',
-@@ -1348,6 +1354,6 @@
- gajim.nec.push_incoming_event(SSLErrorEvent(None, conn=self,
- error_text=txt, error_num=100,
-- cert=con.Connection.ssl_cert_pem,
-- fingerprint=con.Connection.ssl_fingerprint_sha1,
-+ cert=con.Connection.ssl_cert_pem[-1],
-+ fingerprint=con.Connection.ssl_fingerprint_sha1[-1],
- certificate=con.Connection.ssl_certificate))
- return True
+ src/common/connection.py | 50 +++++++++++++++++++++++++++--------------------- + 1 file changed, 28 insertions(+), 22 deletions(-) + +diff --git a/src/common/connection.py b/src/common/connection.py +index 8240652..6d3037a 100644 +--- a/src/common/connection.py ++++ b/src/common/connection.py +@@ -1309,36 +1309,42 @@ class Connection(CommonConnection, ConnectionHandlers): + hostname = gajim.config.get_per('accounts', self.name, 'hostname') + self.connection = con + try: +- errnum = con.Connection.ssl_errnum ++ errnum = [con.Connection.ssl_errnum] + except AttributeError: +- errnum = -1 # we don't have an errnum +- if errnum > 0 and str(errnum) not in gajim.config.get_per('accounts', +- self.name, 'ignore_ssl_errors').split(): +- text = _('The authenticity of the %s certificate could be invalid.' +- ) % hostname +- if errnum in ssl_error: +- text += _('\nSSL Error: <b>%s</b>') % ssl_error[errnum] +- else: +- text += _('\nUnknown SSL error: %d') % errnum +- gajim.nec.push_incoming_event(SSLErrorEvent(None, conn=self, +- error_text=text, error_num=errnum, +- cert=con.Connection.ssl_cert_pem, +- fingerprint=con.Connection.ssl_fingerprint_sha1, +- certificate=con.Connection.ssl_certificate)) +- return True ++ errnum = [] # we don't have an errnum ++ i = 0 ++ for er in errnum: ++ if er > 0 and str(er) not in gajim.config.get_per('accounts', ++ self.name, 'ignore_ssl_errors').split(): ++ text = _('The authenticity of the %s certificate could be ' ++ 'invalid.') % hostname ++ if er in ssl_error: ++ text += _('\nSSL Error: <b>%s</b>') % ssl_error[er] ++ else: ++ text += _('\nUnknown SSL error: %d') % er ++ gajim.nec.push_incoming_event(SSLErrorEvent(None, conn=self, ++ error_text=text, error_num=er, ++ cert=con.Connection.ssl_cert_pem[i], ++ fingerprint=con.Connection.ssl_fingerprint_sha1[i], ++ certificate=con.Connection.ssl_certificate[i])) ++ return True ++ i += 1 + if hasattr(con.Connection, 'ssl_fingerprint_sha1'): + saved_fingerprint = gajim.config.get_per('accounts', self.name, + 'ssl_fingerprint_sha1') + if saved_fingerprint: + # Check sha1 fingerprint +- if con.Connection.ssl_fingerprint_sha1 != saved_fingerprint: ++ if con.Connection.ssl_fingerprint_sha1[-1] != saved_fingerprint: + gajim.nec.push_incoming_event(FingerprintErrorEvent(None, +- conn=self, certificate=con.Connection.ssl_certificate, +- new_fingerprint=con.Connection.ssl_fingerprint_sha1)) ++ conn=self, ++ certificate=con.Connection.ssl_certificate, ++ new_fingerprint=con.Connection.ssl_fingerprint_sha1[ ++ -1])) + return True + else: + gajim.config.set_per('accounts', self.name, +- 'ssl_fingerprint_sha1', con.Connection.ssl_fingerprint_sha1) ++ 'ssl_fingerprint_sha1', ++ con.Connection.ssl_fingerprint_sha1[-1]) + if not check_X509.check_certificate(con.Connection.ssl_certificate, + hostname) and '100' not in gajim.config.get_per('accounts', + self.name, 'ignore_ssl_errors').split(): +@@ -1347,8 +1353,8 @@ class Connection(CommonConnection, ConnectionHandlers): + hostname + gajim.nec.push_incoming_event(SSLErrorEvent(None, conn=self, + error_text=txt, error_num=100, +- cert=con.Connection.ssl_cert_pem, +- fingerprint=con.Connection.ssl_fingerprint_sha1, ++ cert=con.Connection.ssl_cert_pem[-1], ++ fingerprint=con.Connection.ssl_fingerprint_sha1[-1], + certificate=con.Connection.ssl_certificate)) + return True + diff --git a/net-im/gajim/gajim-0.15.2-r1.ebuild b/net-im/gajim/gajim-0.15.2-r2.ebuild index 30527d446c76..311cdf0d9c1f 100644 --- a/net-im/gajim/gajim-0.15.2-r1.ebuild +++ b/net-im/gajim/gajim-0.15.2-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/gajim/gajim-0.15.2-r1.ebuild,v 1.1 2013/02/19 16:42:22 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/gajim/gajim-0.15.2-r2.ebuild,v 1.1 2013/02/20 10:46:25 jlec Exp $ EAPI=4 diff --git a/net-im/gajim/gajim-0.15.2-r3.ebuild b/net-im/gajim/gajim-0.15.2-r3.ebuild new file mode 100644 index 000000000000..ccf46663b477 --- /dev/null +++ b/net-im/gajim/gajim-0.15.2-r3.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/gajim/gajim-0.15.2-r3.ebuild,v 1.1 2013/02/20 10:46:25 jlec Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python{2_6,2_7} ) +PYTHON_REQ_USE="sqlite xml" + +AUTOTOOLS_AUTORECONF=true + +inherit autotools-utils python-r1 versionator + +DESCRIPTION="Jabber client written in PyGTK" +HOMEPAGE="http://www.gajim.org/" +SRC_URI=" + http://www.gajim.org/downloads/$(get_version_component_range 1-2)/${P}.tar.bz2 + test? ( http://dev.gentoo.org/~jlec/distfiles/${PN}-tests-${PV}.tar.xz )" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="avahi crypt dbus gnome kde idle jingle libnotify networkmanager nls spell +srv test X xhtml" + +REQUIRED_USE=" + libnotify? ( dbus ) + avahi? ( dbus )" + +COMMON_DEPEND=" + dev-python/pygtk:2[${PYTHON_USEDEP}] + x11-libs/gtk+:2" +DEPEND="${COMMON_DEPEND} + >=dev-util/intltool-0.40.1 + virtual/pkgconfig + >=sys-devel/gettext-0.17-r1" +RDEPEND="${COMMON_DEPEND} + dev-python/pyasn1[${PYTHON_USEDEP}] + dev-python/pyopenssl[${PYTHON_USEDEP}] + crypt? ( + app-crypt/gnupg + dev-python/pycrypto[${PYTHON_USEDEP}] + ) + dbus? ( + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-libs/dbus-glib + libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] ) + avahi? ( net-dns/avahi[dbus,gtk,python] ) + ) + gnome? ( + dev-python/libgnome-python + dev-python/gnome-keyring-python + dev-python/egg-python + ) + idle? ( x11-libs/libXScrnSaver ) + jingle? ( net-libs/farstream:0.1[python] ) + kde? ( kde-base/kwallet ) + networkmanager? ( + dev-python/dbus-python[${PYTHON_USEDEP}] + net-misc/networkmanager + ) + spell? ( app-text/gtkspell:2 ) + srv? ( + || ( + dev-python/libasyncns-python + net-dns/bind-tools ) + ) + xhtml? ( dev-python/docutils )" + +RESTRICT="test" + +PATCHES=( + "${FILESDIR}"/${P}-CVE-2012-5524.patch + ) + +src_prepare() { + echo "src/command_system/mapping.py" >> po/POTFILES.in + echo '#!/bin/sh' > config/py-compile + autotools-utils_src_prepare + python_copy_sources +} + +src_configure() { + configuration() { + local myeconfargs=( + $(use_enable nls) + $(use_with X x) + --docdir="/usr/share/doc/${PF}" + --libdir="$(python_get_sitedir)" + --enable-site-packages + ) + run_in_build_dir autotools-utils_src_configure + } + python_foreach_impl configuration +} + +src_compile() { + compilation() { + run_in_build_dir autotools-utils_src_compile + } + python_foreach_impl compilation +} + +src_test() { + testing() { + run_in_build_dir ${PYTHON} test/runtests.py --verbose 3 || die + } + python_foreach_impl testing +} + +src_install() { + installation() { + run_in_build_dir autotools-utils_src_install + python_optimize "${ED}"/$(python_get_sitedir) + } + python_foreach_impl installation + + rm "${D}/usr/share/doc/${PF}/README.html" || die + dohtml README.html +} |