diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/pyzor | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-python/pyzor')
-rw-r--r-- | dev-python/pyzor/Manifest | 3 | ||||
-rw-r--r-- | dev-python/pyzor/files/pyzor-0.5.0-python26_warnings.patch | 89 | ||||
-rw-r--r-- | dev-python/pyzor/files/pyzord_getopt.patch | 24 | ||||
-rw-r--r-- | dev-python/pyzor/metadata.xml | 14 | ||||
-rw-r--r-- | dev-python/pyzor/pyzor-0.5.0-r2.ebuild | 66 | ||||
-rw-r--r-- | dev-python/pyzor/pyzor-0.7.0.ebuild | 57 | ||||
-rw-r--r-- | dev-python/pyzor/pyzor-1.0.0.ebuild | 67 |
7 files changed, 320 insertions, 0 deletions
diff --git a/dev-python/pyzor/Manifest b/dev-python/pyzor/Manifest new file mode 100644 index 000000000000..2647fd70775d --- /dev/null +++ b/dev-python/pyzor/Manifest @@ -0,0 +1,3 @@ +DIST pyzor-0.5.0.tar.bz2 40654 SHA256 2bf3df9e916861063a73f7b46cb8b27bac6f661fce1362803de9e7921fc155ba SHA512 048c81e373be217808f4e4e8f6adbc1b464891b725b3004031dfa7a82abe234b080c3a87bc9ad61ee1df2bfb78ed0ee78565b49843f09243f72b6315df6877a1 WHIRLPOOL 966090015bfe93d4ef059a1186e97705807769f9341e94a2f5d9c223540effac04209a32cad850c6f405225c00aea55bdf7ac5a6a98e0927824d641ee61e5c80 +DIST pyzor-0.7.0.tar.bz2 78555 SHA256 6d9ca62bd4aa9a0210adb9d4c8ff2b38bb2cd051f1517ce29e88d7fbe4b1026d SHA512 40026fc0276b4cf60fe7dfe30e2d4d4d1f220cf860b8aaef9d983e632a7d87bc8deb3430ded7520a69269ef56550117735a6e3c8d046d4cad7066f8597ead3cd WHIRLPOOL dd8466477e38362fa0a64ec66822ae3820c22f8ae13b40002145b1e688d17c17edfb800eb44679ff961e74b667daa43ef09d8eadb92f683c9e73c9b00fad23b9 +DIST pyzor-1.0.0.tar.gz 126276 SHA256 548bc461c01e790cf8db1f26d9f66b281f3aa3cf5f5a6fd647071360ed663ef1 SHA512 b3fb8b2c5261e187a2ab3a5a3b12d221df7de08766c6bb2ad9990c0f23517534871ecc9d5ad529e79b0d0aef8b2b800728320c57435a8c0d8c3f80a4ba0f7e4a WHIRLPOOL ad92ca30c116b1c22cc49b5643ecb03880ef1911d7f2a59cf9b655ccd5fa5167e0ccdb890d92754ed1b1c0730785c186f6615c569b6bbbc36aed26e2423037b1 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/files/pyzord_getopt.patch b/dev-python/pyzor/files/pyzord_getopt.patch new file mode 100644 index 000000000000..42b6fe4339f6 --- /dev/null +++ b/dev-python/pyzor/files/pyzord_getopt.patch @@ -0,0 +1,24 @@ +--- scripts/pyzord.orig 2002-09-08 06:33:44.000000000 +0300 ++++ scripts/pyzord 2007-07-06 01:31:06.000000000 +0300 +@@ -52,7 +52,11 @@ + # functions above, run below + + debug = 0 +-(options, args) = getopt.getopt(sys.argv[1:], 'dh:', ['homedir=']) ++try: ++ (options, args) = getopt.getopt(sys.argv[1:], 'hd', ['help','homedir=']) ++except getopt.GetoptError, err: ++ print str(err) ++ usage() + if len(args) != 0: + usage() + +@@ -61,7 +65,7 @@ + for (o, v) in options: + if o == '-d': + debug = 1 +- elif o == '-h': ++ elif o in ('-h', '--help'): + usage() + elif o == '--homedir': + specified_homedir = v diff --git a/dev-python/pyzor/metadata.xml b/dev-python/pyzor/metadata.xml new file mode 100644 index 000000000000..b375c29259dc --- /dev/null +++ b/dev-python/pyzor/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>python</herd> + <use> + <flag name="pyzord">enable support for pyzord</flag> + <flag name="mysql">Enables mysql support</flag> + <flag name="redis">Enables redis support</flag> + <flag name="gevent">Enable support for the gevent based handler</flag> + </use> + <upstream> + <remote-id type="github">SpamExperts/pyzor</remote-id> + </upstream> +</pkgmetadata> 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..c1a99942f2ac --- /dev/null +++ b/dev-python/pyzor/pyzor-0.5.0-r2.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 +} diff --git a/dev-python/pyzor/pyzor-0.7.0.ebuild b/dev-python/pyzor/pyzor-0.7.0.ebuild new file mode 100644 index 000000000000..4e4d9dc06cd0 --- /dev/null +++ b/dev-python/pyzor/pyzor-0.7.0.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) +PYHON_REQ_USE="gdbm" + +inherit distutils-r1 + +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 ~sparc ~x86 ~amd64-linux ~x86-linux" + +IUSE="mysql pyzord redis test" + +RDEPEND="mysql? ( $(python_gen_cond_dep '>=dev-python/mysql-python-1.2.5[${PYTHON_USEDEP}]' python2_7) ) + redis? ( ~dev-python/redis-py-2.9.1[${PYTHON_USEDEP}] )" +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" + +# https://sourceforge.net/apps/trac/pyzor/attachment/ticket/196/ +DISTUTILS_IN_SOURCE_BUILD=1 + +REQUIRED_USE="test? ( mysql redis )" + +python_test() { + # https://sourceforge.net/apps/trac/pyzor/ticket/196 + # In this ticket it clearly states the suite is written for py2 + # While it's feasible to make it into a py3 ready state, nah + if ! python_is_python3; then + PYTHONPATH=. "${PYTHON}" ./tests/unit/__init__.py + fi +} + +src_install () { + distutils-r1_src_install + + if use pyzord; then + dodir /usr/sbin + mv "${ED}"usr/bin/pyzord* "${ED}usr/sbin" + else + rm "${ED}"usr/bin/pyzord* + fi +} + +pkg_postinst() { + if use pyzord; then + ewarn "/usr/bin/pyzord has been moved to /usr/sbin" + fi + + einfo "If you want to run the pyzor server you will need to emerge / re-emerge" + einfo "with use flag mysql and or redis. Without either flag provides only the pyzor client" +} diff --git a/dev-python/pyzor/pyzor-1.0.0.ebuild b/dev-python/pyzor/pyzor-1.0.0.ebuild new file mode 100644 index 000000000000..3d4e1b84a98e --- /dev/null +++ b/dev-python/pyzor/pyzor-1.0.0.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) +PYHON_REQ_USE="gdbm" + +inherit distutils-r1 + +MY_PV="1-0-0" +DESCRIPTION="A distributed, collaborative spam detection and filtering network" +HOMEPAGE="https://github.com/SpamExperts/pyzor/" +SRC_URI="https://github.com/SpamExperts/${PN}/archive/release-${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc64 ~x86 ~amd64-linux ~x86-linux" + +IUSE="doc gevent mysql pyzord redis test" + +RDEPEND="mysql? ( $(python_gen_cond_dep '>=dev-python/mysql-python-1.2.5[${PYTHON_USEDEP}]' python2_7) ) + redis? ( ~dev-python/redis-py-2.9.1[${PYTHON_USEDEP}] ) + gevent? ( $(python_gen_cond_dep '~dev-python/gevent-1.0.1[${PYTHON_USEDEP}]' python2_7) )" +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" + +# https://sourceforge.net/apps/trac/pyzor/attachment/ticket/196/ +DISTUTILS_IN_SOURCE_BUILD=1 + +REQUIRED_USE="test? ( mysql redis )" +S="${WORKDIR}/${PN}-release-${MY_PV}" + +python_test() { + # The suite is py2 friendly only + if ! python_is_python3; then + PYTHONPATH=. "${PYTHON}" ./tests/unit/__init__.py + fi +} + +python_compile_all() { + use doc && emake -C docs html +} + +python_install_all() { + use doc && HTML_DOCS=( docs/.build/html/. ) + distutils-r1_python_install_all +} + +src_install () { + distutils-r1_src_install + + if use pyzord; then + dodir /usr/sbin + mv "${D}"usr/bin/pyzord* "${ED}usr/sbin" + else + rm "${D}"usr/bin/pyzord* + fi +} + +pkg_postinst() { + if use pyzord; then + ewarn "/usr/bin/pyzord has been moved to /usr/sbin" + fi + + einfo "If you want to run the pyzor server you will need to emerge / re-emerge" + einfo "with use flag mysql and or redis. Without either flag provides only the pyzor client" +} |