diff options
author | Hanno Boeck <hanno@gentoo.org> | 2013-10-16 21:46:33 +0000 |
---|---|---|
committer | Hanno Boeck <hanno@gentoo.org> | 2013-10-16 21:46:33 +0000 |
commit | feb9e74a5f82e52423191702c1431401a9106aa5 (patch) | |
tree | f9343727d3af658c151fd9a544f93a600e002983 /dev-python/pyzor | |
parent | Fixed bug #487322 (resume support in hostonly mode) and bug #486516 (diff) | |
download | historical-feb9e74a5f82e52423191702c1431401a9106aa5.tar.gz historical-feb9e74a5f82e52423191702c1431401a9106aa5.tar.bz2 historical-feb9e74a5f82e52423191702c1431401a9106aa5.zip |
pyzor: fix python 2.6/2.7 deprecation warnings
Package-Manager: portage-2.2.7/cvs/Linux x86_64
Manifest-Sign-Key: 0xA5880072BBB51E42
Diffstat (limited to 'dev-python/pyzor')
-rw-r--r-- | dev-python/pyzor/ChangeLog | 10 | ||||
-rw-r--r-- | dev-python/pyzor/Manifest | 24 | ||||
-rw-r--r-- | dev-python/pyzor/files/pyzor-0.5.0-python26_warnings.patch | 89 | ||||
-rw-r--r-- | dev-python/pyzor/pyzor-0.5.0-r2.ebuild | 66 |
4 files changed, 186 insertions, 3 deletions
diff --git a/dev-python/pyzor/ChangeLog b/dev-python/pyzor/ChangeLog index 01c0affe253d..68d4263ac8de 100644 --- a/dev-python/pyzor/ChangeLog +++ b/dev-python/pyzor/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-python/pyzor -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pyzor/ChangeLog,v 1.58 2010/07/27 16:49:25 arfrever Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pyzor/ChangeLog,v 1.59 2013/10/16 21:46:22 hanno Exp $ + +*pyzor-0.5.0-r2 (16 Oct 2013) + + 16 Oct 2013; Hanno Boeck <hanno@gentoo.org> +pyzor-0.5.0-r2.ebuild, + +files/pyzor-0.5.0-python26_warnings.patch: + Fix python 2.6/2.7 warnings, patch from Debian/Ubuntu. 27 Jul 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> pyzor-0.5.0-r1.ebuild: diff --git a/dev-python/pyzor/Manifest b/dev-python/pyzor/Manifest index 620090119ac6..96eb12e0b9d6 100644 --- a/dev-python/pyzor/Manifest +++ b/dev-python/pyzor/Manifest @@ -1,5 +1,27 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX pyzor-0.5.0-python26_warnings.patch 2680 SHA256 f1b9f51295788ac40c6396ea12a846f0b01d45fa8d87448d764900b3b167b9ff SHA512 e7a8826dc2b02ff24301b116247344ca221008333fbaf1fb4037ed1eef7e317235070fd6f6b70e4ffec0a44de675b1c6ae09da555d6a23295fd4c81301a13c80 WHIRLPOOL c3bdaeb5e2b312434164ec24b83fb067961cbaf164dc568da138ea397deee75c411edbc0b510ca2bd904c76caec079e46251dee5b8af8ca659c689e181b203f7 AUX pyzord_getopt.patch 640 SHA256 6cc675c7caf935342c3728ef399c2ebdb57029d146903aa36593fa3a34f270a9 SHA512 8c405266251f61b0d4b54d3811512067d90521dc04fb0a2df60fc19d27d818fb00849af0c0469187d60fe2d3c6bdde71fbf8320e22b2d5db5e6226c06cde93db WHIRLPOOL 2fef82cb54b2cd03baf29536e121c84b9f1823c9593278c362624cceb180cbd562d57e8147cb6218ba1ceeffb7d4137d0ec64f94cc1d66e9d93effe4bf29ce95 DIST pyzor-0.5.0.tar.bz2 40654 SHA256 2bf3df9e916861063a73f7b46cb8b27bac6f661fce1362803de9e7921fc155ba SHA512 048c81e373be217808f4e4e8f6adbc1b464891b725b3004031dfa7a82abe234b080c3a87bc9ad61ee1df2bfb78ed0ee78565b49843f09243f72b6315df6877a1 WHIRLPOOL 966090015bfe93d4ef059a1186e97705807769f9341e94a2f5d9c223540effac04209a32cad850c6f405225c00aea55bdf7ac5a6a98e0927824d641ee61e5c80 EBUILD pyzor-0.5.0-r1.ebuild 1420 SHA256 dea4abaec1dfc420dc3cf3ab8211b4ac4512353840c2053ca1bd12a2cdebe0cf SHA512 bb65e8b7bf2da756d3f8baf98b99def7f8680d71f3185c228fa6547a5ffefb70f02f773eb643dac4e04f10ec3f2b7474c5892228c5354197f1211fcb9467ef9d WHIRLPOOL a3a2b0e1cc2666cf4680a9b26ae37f294010698be6dc58d561a81d71a3c8216976da18f48d7845a63feaf21c014a9d61e0595dd04b225feb40de8d42b0caffe1 -MISC ChangeLog 6730 SHA256 82fdf109215ad91187567c47b8a6c854e16856ff7c83d94d61e28eaae4ffbfab SHA512 ecac38a8acfe73c48a48ba8c27d3e71219a8dca3b20c85cc09db49ff9d31e5477b0342f9cacca9381c42545c6968bdaa7ba6e326723107ede7691569ab7158eb WHIRLPOOL 9e446c825f2ca43e85869444951ba482af6cfceed40f70c406e00ee8eae44ca97977b59a26acdeee48bdbbfc04a5e83780f256eb1028b1bc59de2160c5f80295 +EBUILD pyzor-0.5.0-r2.ebuild 1476 SHA256 30d938a9f2898dbd5b62cf5863c13998ebc2975ec66a470189c053a9b1cfa4d5 SHA512 b630cd0137f799385b9b431716fe3a244267c577911ed897ebff449e770fa65d9e62065614b1785aa89060efeed5867e41c8901f5030afc2c492bf8c11a56064 WHIRLPOOL 42f20c84fed99f50fc869b8462ff5ca7406ab9e9db7650b282916ded6403f6e6367fc1ee379ba2400e78479c827fbd84aea307475ec4274571913dab9525c69a +MISC ChangeLog 6932 SHA256 1c50ae36f55c059c0e57bafeac7729097e64ebe1daf3c5e7e32901de3a345840 SHA512 5550a045c8cc479190d577c19ebe3253bcf02811aafc2170140b499c1a5dcdc2756fe7afb7a07497f557f02978e5e65f097c0c276e5c4269a6b8332a7e4dcb95 WHIRLPOOL 9c501aded1e14572cf1b2e7875496998d72253c06ce42bda7a614ebcfa036e36b0dda13287f64faeb861b7bbd1f24ad7e6d3734fe4222d7689b95c1e89f5e8fb MISC metadata.xml 226 SHA256 68c2b94a7055bb8f9fa53e636ebe8ae4f3713233181b75335efadaf903e5c400 SHA512 e0fecccc6c06a362a34ec256e406b7ab51f44d1754a5749fe675a0bdf63a79cfef8106ee52853aa9807fd8e16b145c1d60476b26b6dd57f818d3e80aa1b841a4 WHIRLPOOL 175b3e320432b3ce354f204a7a572d4d6388f01e54b139d7d6147521e913258aba03474179a1b09146dbc1cfb7b73284f06b68e417937bc4aa93a9a58ec265c4 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (GNU/Linux) + +iQIcBAEBCAAGBQJSXwkuAAoJEKWIAHK7tR5CSEwP/1cffT36omjSTuLs4qs6+iRK +rv8BV5ZwQ3ldXFtf9EpvGxfz4bqMs5jklM1JHBJZlEJNSR00b37Tm+Kz0c6xAhkV +A/AasyW9UW394pC/m/D96mbWIw2L30gXmp34xPOX8OKxpJxnDkC67OnT6PSK3y9g +wiU3b1+wUB/E1jq9hKaVc707hL8JrhaGnYkMXdEj1Pf69hlIAeSjaKO7EKDoGec/ +M4QVN3+7Hb07nvtRaVFu9ekK0W00YlaX3RYq5lsFYgulL+uR6nU1Mct3nPJmMW5k +pkCiG3UIf5uALd0Rd5UhyajOt9Bv5RKfQWnnkjvjniq8bxCqIRz6XTid9oTMqJFP +IVJ2KIRiK3OcrJD3dwmLMv/1wlTlfFDWDCqOrcYVZO5i0t9z0tQ0xhg3gpsKMJK/ +YLB7K2kIyOnscraK5scsgg3Wb8qVZ30p+MwvUQOgyelcKhkeWBAG9bGz3gtV48Ii +CqSAXX9PtCHRTqy0s2P6qkTENaHsNBWgaE1Uv8/hIST0KdkNjpykv2rvdqoHTj5f +48komazyBU0VK0lMOUUIPLKbIkDA8a9XD/Adfp7r3xGw76ZxAevLAM2zn+jxHLQu +DplFU/NbLY6vtRBrEc5ubd2yNd8HXQI4Flq/aqzaTVhWV7QVG5z0Ibsta6KIe8OI +B/2Nna91LA6cdBcPXO2V +=4ils +-----END PGP SIGNATURE----- diff --git a/dev-python/pyzor/files/pyzor-0.5.0-python26_warnings.patch b/dev-python/pyzor/files/pyzor-0.5.0-python26_warnings.patch new file mode 100644 index 000000000000..671b994b3a2f --- /dev/null +++ b/dev-python/pyzor/files/pyzor-0.5.0-python26_warnings.patch @@ -0,0 +1,89 @@ +# Description: Fix python2.6 deprecation warnings +# Origin: Ubuntu +# Author: Alessio Treglia <quadrispro@ubuntu.com> +# Bug-Ubuntu: https://bugs.launchpad.net/bugs/394775 +diff -Nur -x '*.orig' -x '*~' pyzor-0.5.0/lib/pyzor/client.py pyzor-0.5.0.new/lib/pyzor/client.py +--- pyzor-0.5.0/lib/pyzor/client.py 2009-04-29 22:53:50.000000000 +0200 ++++ pyzor-0.5.0.new/lib/pyzor/client.py 2009-08-01 12:27:55.749263645 +0200 +@@ -10,7 +10,7 @@ + import tempfile + import mimetools + import multifile +-import sha ++import hashlib + + import pyzor + from pyzor import * +@@ -402,12 +402,12 @@ + del p2 + + saltfile = open(randfile) +- salt = saltfile.read(sha.digest_size) ++ salt = saltfile.read(hashlib.sha1().digest_size) + del saltfile + +- salt_digest = sha.new(salt) ++ salt_digest = hashlib.sha1(salt) + +- pass_digest = sha.new() ++ pass_digest = hashlib.sha1() + pass_digest.update(salt_digest.digest()) + pass_digest.update(p1) + sys.stdout.write("salt,key:\n") +@@ -498,7 +498,7 @@ + if len(offsets) == 0: + return + +- self._digest = sha.new() ++ self._digest = hashlib.sha1() + + if len(offsets) <= self.atomic_num_lines: + self.handle_atomic(fp) +diff -Nur -x '*.orig' -x '*~' pyzor-0.5.0/lib/pyzor/__init__.py pyzor-0.5.0.new/lib/pyzor/__init__.py +--- pyzor-0.5.0/lib/pyzor/__init__.py 2009-04-29 22:53:50.000000000 +0200 ++++ pyzor-0.5.0.new/lib/pyzor/__init__.py 2009-08-01 12:28:20.268413580 +0200 +@@ -8,7 +8,7 @@ + import os.path + import re + import sys +-import sha ++import hashlib + import tempfile + import random + import ConfigParser +@@ -114,7 +114,7 @@ + + class DataDigest(str): + # hex output doubles digest size +- value_size = sha.digest_size * 2 ++ value_size = hashlib.sha1().digest_size * 2 + + def __init__(self, value): + if len(value) != self.value_size: +@@ -285,7 +285,7 @@ + """returns a digest object""" + typecheck(msg, Message) + +- return sha.new(str(msg)) ++ return hashlib.sha1(str(msg)) + + hash_msg = staticmethod(hash_msg) + +@@ -295,7 +295,7 @@ + typecheck(key, long) + typecheck(user, Username) + +- return sha.new("%s:%x" % (Username, key)).hexdigest().lower() ++ return hashlib.sha1("%s:%x" % (Username, key)).hexdigest().lower() + + hash_key = staticmethod(hash_key) + +@@ -316,7 +316,7 @@ + + h_msg = self.hash_msg(msg) + +- return sha.new("%s:%d:%s" % (h_msg.digest(), ts, hashed_key)).hexdigest().lower() ++ return hashlib.sha1("%s:%d:%s" % (h_msg.digest(), ts, hashed_key)).hexdigest().lower() + + sign_msg = classmethod(sign_msg) + diff --git a/dev-python/pyzor/pyzor-0.5.0-r2.ebuild b/dev-python/pyzor/pyzor-0.5.0-r2.ebuild new file mode 100644 index 000000000000..053b7f36be43 --- /dev/null +++ b/dev-python/pyzor/pyzor-0.5.0-r2.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pyzor/pyzor-0.5.0-r2.ebuild,v 1.1 2013/10/16 21:46:22 hanno Exp $ + +EAPI="3" +PYTHON_DEPEND="2" +PYTHON_USE_WITH="gdbm" +PYTHON_USE_WITH_OPT="pyzord" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.*" + +inherit distutils eutils + +DESCRIPTION="A distributed, collaborative spam detection and filtering network" +HOMEPAGE="http://pyzor.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="pyzord" + +DEPEND="" +RDEPEND="" + +DOCS="THANKS UPGRADING" + +src_prepare() { + epatch "${FILESDIR}/pyzord_getopt.patch" + epatch "${FILESDIR}/${P}-python26_warnings.patch" + + # rfc822BodyCleanerTest doesn't work fine. + # Remove it until it's fixed. + sed -i \ + -e '/rfc822BodyCleanerTest/,/self\.assertEqual/d' \ + unittests.py || die "sed in unittest.py failed" +} + +src_test() { + testing() { + PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" unittests.py + } + python_execute_function testing +} + +src_install () { + distutils_src_install + + dohtml docs/usage.html + rm -rf "${ED}usr/share/doc/pyzor" + + if use pyzord; then + dodir /usr/sbin + mv "${ED}"usr/bin/pyzord* "${ED}usr/sbin" + else + rm "${ED}"usr/bin/pyzord* + fi +} + +pkg_postinst() { + distutils_pkg_postinst + + if use pyzord; then + ewarn "/usr/bin/pyzord has been moved to /usr/sbin" + fi +} |