summaryrefslogtreecommitdiff
path: root/dev-python/xmpppy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/xmpppy
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/xmpppy')
-rw-r--r--dev-python/xmpppy/Manifest5
-rw-r--r--dev-python/xmpppy/files/xmpppy-0.5.0_rc1-ssl_fields.patch28
-rw-r--r--dev-python/xmpppy/files/xmpppy-hashlib_ssl_deprecation.patch69
-rw-r--r--dev-python/xmpppy/metadata.xml16
-rw-r--r--dev-python/xmpppy/xmpppy-0.5.0_rc1-r2.ebuild39
5 files changed, 157 insertions, 0 deletions
diff --git a/dev-python/xmpppy/Manifest b/dev-python/xmpppy/Manifest
new file mode 100644
index 000000000000..9a8f5a6dfec1
--- /dev/null
+++ b/dev-python/xmpppy/Manifest
@@ -0,0 +1,5 @@
+AUX xmpppy-0.5.0_rc1-ssl_fields.patch 1243 BLAKE2B 64ae57e8ae53529d1c5bd36d76195f85574e3c73436d4e09811ee31a7e1f085531d8747174821a9bf5b7ace90ecdb98e871ed6bb1948a7d1cd22bea10da94463 SHA512 4f9065add9da4a1ef66ee13834f0a3f16b9fa8b2ffc5d3938756683ff6ee3b514fd154739e08e471f5ef7eb6331c25abd6c60ec9d56f8a4e1c57521e8510b766
+AUX xmpppy-hashlib_ssl_deprecation.patch 2990 BLAKE2B 42d41ede7f8283ab39f6024a478c082511700a978ff87046efdae7c25116fb4230ddcdf8ca6ebe7dbfaf6bb2e0c5575be700a28caf241314324445fcd08d62ef SHA512 1b085dad2d71daf81d7be877a4710c900895f6725322e52210ad3f3e2eba0ef609119ada5ab6c42a3f880317a66555ba3e13187b06cacd7c454189c4152f67f7
+DIST xmpppy-0.5.0-rc1.tar.gz 84993 BLAKE2B 69cac1653e5bc8a31ed1e88acc89c5f04937d3f1dc618fef85f97167a8f4afbe8ab2d469b718dbd614508214e4074899b7ad4f31c28f6677086c1112f7dfd58f SHA512 53a37d1a8adcdc8a652e4a6efce2a7c35b4c5ef79ee7ae93134ab6d5a74f96647efbd0954eac60c26a2b507fdb7ee3e607427b11fbd1e22290a23793f03b4699
+EBUILD xmpppy-0.5.0_rc1-r2.ebuild 815 BLAKE2B 7efcff6533c512aeeac4e6f982d56072d9e3b2b3db665dc937b58c2f46563da267f8921c15476e3b83e11d4ee595f92eb0df5d586f3d0a5905802cc662fe5eff SHA512 605465389d2a4efb6c698af85f2b2df427995d82213de9847df1097dc80bbe0689fe4eaa2c2feb56a9b44671de96068260a2e4ed3eced5441bb6b2c4a84c8592
+MISC metadata.xml 722 BLAKE2B 146d079cb57b6ba7b69df6b13621ccb3a8af275f104d221f783c3a51ca90b99e9057cf49f9e2ad2f970fea32ecc14e0995eaae31aba7c96d727c5ad5dc51bf20 SHA512 669662f0f5c8f767b221abc07d59eedc4d97762316951bcda01ba249c831a7ef47e90dfd18c22f243e2b8851b7a616128c78036a619ca1a5dd846208e7632773
diff --git a/dev-python/xmpppy/files/xmpppy-0.5.0_rc1-ssl_fields.patch b/dev-python/xmpppy/files/xmpppy-0.5.0_rc1-ssl_fields.patch
new file mode 100644
index 000000000000..a39af1821fdb
--- /dev/null
+++ b/dev-python/xmpppy/files/xmpppy-0.5.0_rc1-ssl_fields.patch
@@ -0,0 +1,28 @@
+Taken from https://bugs.gentoo.org/show_bug.cgi?id=535758
+Kudos to Anton Bolshakov <blshkv@pentoo.ch> for this patch
+
+--- xmpp/transports.py.orig 2015-01-05 15:41:23.000000000 +0800
++++ xmpp/transports.py 2015-01-06 15:52:25.916240681 +0800
+@@ -27,7 +27,7 @@
+ Also exception 'error' is defined to allow capture of this module specific exceptions.
+ """
+
+-import socket,select,base64,dispatcher,sys
++import socket,ssl,select,base64,dispatcher,sys
+ from simplexml import ustr
+ from client import PlugIn
+ from protocol import *
+@@ -314,9 +314,10 @@
+ """ Here we should switch pending_data to hint mode."""
+ tcpsock=self._owner.Connection
+ warnings.filterwarnings("ignore", "socket\.ssl.*ssl\.wrap_socket", DeprecationWarning)
+- tcpsock._sslObj = socket.ssl(tcpsock._sock, None, None)
+- tcpsock._sslIssuer = tcpsock._sslObj.issuer()
+- tcpsock._sslServer = tcpsock._sslObj.server()
++ tcpsock._sslObj = ssl.wrap_socket(tcpsock._sock, None, None)
++ tcpsock._sslIssuer = tcpsock._sslObj.getpeercert().get('issuer')
++ tcpsock._sslServer = tcpsock._sslObj.getpeercert().get('server')
++
+ tcpsock._recv = tcpsock._sslObj.read
+ tcpsock._send = tcpsock._sslObj.write
+
diff --git a/dev-python/xmpppy/files/xmpppy-hashlib_ssl_deprecation.patch b/dev-python/xmpppy/files/xmpppy-hashlib_ssl_deprecation.patch
new file mode 100644
index 000000000000..489de037a488
--- /dev/null
+++ b/dev-python/xmpppy/files/xmpppy-hashlib_ssl_deprecation.patch
@@ -0,0 +1,69 @@
+--- xmpp/auth.py
++++ xmpp/auth.py
+@@ -21,11 +21,16 @@
+
+ from protocol import *
+ from client import PlugIn
+-import sha,base64,random,dispatcher,re
++import base64,random,dispatcher,re
+
+-import md5
+-def HH(some): return md5.new(some).hexdigest()
+-def H(some): return md5.new(some).digest()
++try:
++ from hashlib import md5, sha1
++except ImportError:
++ from md5 import new as md5
++ from sha import new as sha1
++
++def HH(some): return md5(some).hexdigest()
++def H(some): return md5(some).digest()
+ def C(some): return ':'.join(some)
+
+ class NonSASL(PlugIn):
+@@ -54,15 +59,15 @@
+
+ if query.getTag('digest'):
+ self.DEBUG("Performing digest authentication",'ok')
+- query.setTagData('digest',sha.new(owner.Dispatcher.Stream._document_attrs['id']+self.password).hexdigest())
++ query.setTagData('digest',sha1(owner.Dispatcher.Stream._document_attrs['id']+self.password).hexdigest())
+ if query.getTag('password'): query.delChild('password')
+ method='digest'
+ elif query.getTag('token'):
+ token=query.getTagData('token')
+ seq=query.getTagData('sequence')
+ self.DEBUG("Performing zero-k authentication",'ok')
+- hash = sha.new(sha.new(self.password).hexdigest()+token).hexdigest()
+- for foo in xrange(int(seq)): hash = sha.new(hash).hexdigest()
++ hash = sha1(sha1(self.password).hexdigest()+token).hexdigest()
++ for foo in xrange(int(seq)): hash = sha1(hash).hexdigest()
+ query.setTagData('hash',hash)
+ method='0k'
+ else:
+@@ -81,7 +86,7 @@
+ def authComponent(self,owner):
+ """ Authenticate component. Send handshake stanza and wait for result. Returns "ok" on success. """
+ self.handshake=0
+- owner.send(Node(NS_COMPONENT_ACCEPT+' handshake',payload=[sha.new(owner.Dispatcher.Stream._document_attrs['id']+self.password).hexdigest()]))
++ owner.send(Node(NS_COMPONENT_ACCEPT+' handshake',payload=[sha1(owner.Dispatcher.Stream._document_attrs['id']+self.password).hexdigest()]))
+ owner.RegisterHandler('handshake',self.handshakeHandler,xmlns=NS_COMPONENT_ACCEPT)
+ while not self.handshake:
+ self.DEBUG("waiting on handshake",'notify')
+--- xmpp/transports.py
++++ xmpp/transports.py
+@@ -31,6 +31,7 @@
+ from simplexml import ustr
+ from client import PlugIn
+ from protocol import *
++import warnings
+
+ # determine which DNS resolution library is available
+ HAVE_DNSPYTHON = False
+@@ -312,6 +313,7 @@
+ """ Immidiatedly switch socket to TLS mode. Used internally."""
+ """ Here we should switch pending_data to hint mode."""
+ tcpsock=self._owner.Connection
++ warnings.filterwarnings("ignore", "socket\.ssl.*ssl\.wrap_socket", DeprecationWarning)
+ tcpsock._sslObj = socket.ssl(tcpsock._sock, None, None)
+ tcpsock._sslIssuer = tcpsock._sslObj.issuer()
+ tcpsock._sslServer = tcpsock._sslObj.server()
diff --git a/dev-python/xmpppy/metadata.xml b/dev-python/xmpppy/metadata.xml
new file mode 100644
index 000000000000..f972de4d8621
--- /dev/null
+++ b/dev-python/xmpppy/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ xmpppy is a Python library that is targeted to provide easy scripting with
+ Jabber. Similar projects are Twisted Words and jabber.py. This library was
+ not designed from scratch. It inherits some code from jabberpy and have very
+ similar API in many places. Though it is separate project since it have almost
+ completely different architecture and primarily aims to work with jabberd2 -
+ the new Open Source Jabber Server.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">xmpppy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/xmpppy/xmpppy-0.5.0_rc1-r2.ebuild b/dev-python/xmpppy/xmpppy-0.5.0_rc1-r2.ebuild
new file mode 100644
index 000000000000..bdf5748f70d5
--- /dev/null
+++ b/dev-python/xmpppy/xmpppy-0.5.0_rc1-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 eutils
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="Python library providing easy scripting with Jabber"
+HOMEPAGE="http://xmpppy.sourceforge.net/"
+SRC_URI="mirror://sourceforge/xmpppy/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ia64 ~ppc ~ppc64 x86"
+IUSE="doc"
+
+RDEPEND="
+ || (
+ virtual/python-dnspython[${PYTHON_USEDEP}]
+ dev-python/pydns:2[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-hashlib_ssl_deprecation.patch"
+ "${FILESDIR}/${P}-ssl_fields.patch"
+)
+
+python_install_all() {
+ use doc && HTML_DOCS=( doc/. )
+ distutils-r1_python_install_all
+}