pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/py-crypto Update py-cryoto to 2.4.
details: https://anonhg.NetBSD.org/pkgsrc/rev/2588bc447348
branches: trunk
changeset: 594527:2588bc447348
user: obache <obache%pkgsrc.org@localhost>
date: Sun Oct 30 13:30:36 2011 +0000
description:
Update py-cryoto to 2.4.
2.4
===
* Python 3 support! (Thorsten E. Behrens, Anders Sundman)
PyCrypto now supports every version of Python from 2.1 through 3.2.
* Timing-attack countermeasures in _fastmath: When built against
libgmp version 5 or later, we use mpz_powm_sec instead of mpz_powm.
This should prevent the timing attack described by Geremy Condra at
PyCon 2011:
http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2011-through-the-side-channel-timing-and-implementation-attacks-in-python-4897955
* New hash modules (for Python >= 2.5 only): SHA224, SHA384, and
SHA512 (Frédéric Bertolus)
* Configuration using GNU autoconf. This should help fix a bunch of
build issues.
* Support using MPIR as an alternative to GMP.
* Improve the test command in setup.py, by allowing tests to be
performed on a single sub-package or module only. (Legrandin)
You can now do something like this:
python setup.py test -m Hash.SHA256 --skip-slow-tests
* Fix double-decref of "counter" when Cipher object initialisation
fails (Ryan Kelly)
* Apply patches from Debian's python-crypto 2.3-3 package (Jan
Dittberner, Sebastian Ramacher):
- fix-RSA-generate-exception.patch
- epydoc-exclude-introspect.patch
- no-usr-local.patch
* Fix launchpad bug #702835: "Import key code is not compatible with
GMP library" (Legrandin)
* More tests, better documentation, various bugfixes.
diffstat:
security/py-crypto/Makefile | 29 +++++++++++++++------------
security/py-crypto/PLIST | 38 ++++++++++++++++++++++++++++++------
security/py-crypto/distinfo | 10 +++-----
security/py-crypto/patches/patch-aa | 10 ---------
security/py-crypto/patches/patch-ac | 13 ------------
5 files changed, 51 insertions(+), 49 deletions(-)
diffs (174 lines):
diff -r f4674ea5c7d7 -r 2588bc447348 security/py-crypto/Makefile
--- a/security/py-crypto/Makefile Sun Oct 30 12:08:29 2011 +0000
+++ b/security/py-crypto/Makefile Sun Oct 30 13:30:36 2011 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.21 2011/01/18 12:06:57 drochner Exp $
+# $NetBSD: Makefile,v 1.22 2011/10/30 13:30:36 obache Exp $
#
-DISTNAME= pycrypto-2.3
-PKGNAME= ${PYPKGPREFIX}-crypto-2.3
+DISTNAME= pycrypto-2.4
+PKGNAME= ${DISTNAME:S/^py/${PYPKGPREFIX}-/}
CATEGORIES= security python
MASTER_SITES= http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/
@@ -16,18 +16,21 @@
PKG_DESTDIR_SUPPORT= user-destdir
-SUBST_CLASSES+= python
-SUBST_STAGE.python= post-patch
-SUBST_MESSAGE.python= Fix hardcoded paths
-SUBST_FILES.python= lib/Crypto/Util/RFC1751.py
-SUBST_SED.python= -e 's,@@PYTHON@@,${PYTHONBIN},'
+GNU_CONFIGURE= yes
+
+do-test:
+ ${RUN}cd ${WRKSRC};${SETENV} ${TEST_ENV} ${PYTHONBIN} ${PYSETUP} test
-SUBST_CLASSES+= libdir
-SUBST_STAGE.libdir= post-patch
-SUBST_MESSAGE.libdir= Fix hardcoded libraries directory paths
-SUBST_FILES.libdir+= setup.py
-SUBST_SED.libdir= -e 's,@@LIBDIR@@,${PREFIX}/lib,'
+PLIST_VARS+= py25 py2x
+.include "../../lang/python/pyversion.mk"
+.if empty(PYPKGPREFIX:Mpy24)
+PLIST.py25= yes
+.endif
+.if empty(PYPKGPREFIX:Mpy3?)
+PLIST.py2x= yes
+.endif
+BUILDLINK_API_DEPENDS.gmp+= gmp>=5.0
.include "../../devel/gmp/buildlink3.mk"
.include "../../lang/python/distutils.mk"
.include "../../security/openssl/buildlink3.mk"
diff -r f4674ea5c7d7 -r 2588bc447348 security/py-crypto/PLIST
--- a/security/py-crypto/PLIST Sun Oct 30 12:08:29 2011 +0000
+++ b/security/py-crypto/PLIST Sun Oct 30 13:30:36 2011 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.6 2010/12/05 17:13:09 gls Exp $
+@comment $NetBSD: PLIST,v 1.7 2011/10/30 13:30:36 obache Exp $
${PYSITELIB}/Crypto/Cipher/AES.so
${PYSITELIB}/Crypto/Cipher/ARC2.so
${PYSITELIB}/Crypto/Cipher/ARC4.so
@@ -25,7 +25,16 @@
${PYSITELIB}/Crypto/Hash/SHA.py
${PYSITELIB}/Crypto/Hash/SHA.pyc
${PYSITELIB}/Crypto/Hash/SHA.pyo
+${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA224.py
+${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA224.pyc
+${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA224.pyo
${PYSITELIB}/Crypto/Hash/SHA256.so
+${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA384.py
+${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA384.pyc
+${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA384.pyo
+${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA512.py
+${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA512.pyc
+${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA512.pyo
${PYSITELIB}/Crypto/Hash/__init__.py
${PYSITELIB}/Crypto/Hash/__init__.pyc
${PYSITELIB}/Crypto/Hash/__init__.pyo
@@ -84,9 +93,9 @@
${PYSITELIB}/Crypto/Random/OSRNG/fallback.py
${PYSITELIB}/Crypto/Random/OSRNG/fallback.pyc
${PYSITELIB}/Crypto/Random/OSRNG/fallback.pyo
-${PYSITELIB}/Crypto/Random/OSRNG/nt.py
-${PYSITELIB}/Crypto/Random/OSRNG/nt.pyc
-${PYSITELIB}/Crypto/Random/OSRNG/nt.pyo
+${PLIST.py2x}${PYSITELIB}/Crypto/Random/OSRNG/nt.py
+${PLIST.py2x}${PYSITELIB}/Crypto/Random/OSRNG/nt.pyc
+${PLIST.py2x}${PYSITELIB}/Crypto/Random/OSRNG/nt.pyo
${PYSITELIB}/Crypto/Random/OSRNG/posix.py
${PYSITELIB}/Crypto/Random/OSRNG/posix.pyc
${PYSITELIB}/Crypto/Random/OSRNG/posix.pyo
@@ -156,12 +165,24 @@
${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA.py
${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA.pyc
${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA.pyo
+${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA224.py
+${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA224.pyc
+${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA224.pyo
${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA256.py
${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA256.pyc
${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA256.pyo
+${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA384.py
+${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA384.pyc
+${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA384.pyo
+${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA512.py
+${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA512.pyc
+${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA512.pyo
${PYSITELIB}/Crypto/SelfTest/Protocol/__init__.py
${PYSITELIB}/Crypto/SelfTest/Protocol/__init__.pyc
${PYSITELIB}/Crypto/SelfTest/Protocol/__init__.pyo
+${PYSITELIB}/Crypto/SelfTest/Protocol/test_AllOrNothing.py
+${PYSITELIB}/Crypto/SelfTest/Protocol/test_AllOrNothing.pyc
+${PYSITELIB}/Crypto/SelfTest/Protocol/test_AllOrNothing.pyo
${PYSITELIB}/Crypto/SelfTest/Protocol/test_chaffing.py
${PYSITELIB}/Crypto/SelfTest/Protocol/test_chaffing.pyc
${PYSITELIB}/Crypto/SelfTest/Protocol/test_chaffing.pyo
@@ -259,9 +280,12 @@
${PYSITELIB}/Crypto/Util/number.py
${PYSITELIB}/Crypto/Util/number.pyc
${PYSITELIB}/Crypto/Util/number.pyo
-${PYSITELIB}/Crypto/Util/python_compat.py
-${PYSITELIB}/Crypto/Util/python_compat.pyc
-${PYSITELIB}/Crypto/Util/python_compat.pyo
+${PLIST.py2x}${PYSITELIB}/Crypto/Util/py21compat.py
+${PLIST.py2x}${PYSITELIB}/Crypto/Util/py21compat.pyc
+${PLIST.py2x}${PYSITELIB}/Crypto/Util/py21compat.pyo
+${PYSITELIB}/Crypto/Util/py3compat.py
+${PYSITELIB}/Crypto/Util/py3compat.pyc
+${PYSITELIB}/Crypto/Util/py3compat.pyo
${PYSITELIB}/Crypto/Util/randpool.py
${PYSITELIB}/Crypto/Util/randpool.pyc
${PYSITELIB}/Crypto/Util/randpool.pyo
diff -r f4674ea5c7d7 -r 2588bc447348 security/py-crypto/distinfo
--- a/security/py-crypto/distinfo Sun Oct 30 12:08:29 2011 +0000
+++ b/security/py-crypto/distinfo Sun Oct 30 13:30:36 2011 +0000
@@ -1,8 +1,6 @@
-$NetBSD: distinfo,v 1.5 2010/12/05 17:13:09 gls Exp $
+$NetBSD: distinfo,v 1.6 2011/10/30 13:30:36 obache Exp $
-SHA1 (pycrypto-2.3.tar.gz) = 96b33b77e729893bd0837a09a6aa7a12b5070037
-RMD160 (pycrypto-2.3.tar.gz) = 5b7b15aab3f5e33113ba197a2edd629c72595374
-Size (pycrypto-2.3.tar.gz) = 331476 bytes
-SHA1 (patch-aa) = e486ada26ed3f25f0795c886bc824fecda0cc060
+SHA1 (pycrypto-2.4.tar.gz) = 5a13dd3f0f5ecebd7f579a4510f1cd53c4a4981b
+RMD160 (pycrypto-2.4.tar.gz) = e5e1ae57a10d8a15b911fd7807dadb12e881e866
+Size (pycrypto-2.4.tar.gz) = 382924 bytes
SHA1 (patch-ab) = 2c72b0e70fdebd2e62aff28284afd919e935de08
-SHA1 (patch-ac) = 34efe262c56619c010879e96cfb8b2ae87bd03af
diff -r f4674ea5c7d7 -r 2588bc447348 security/py-crypto/patches/patch-aa
--- a/security/py-crypto/patches/patch-aa Sun Oct 30 12:08:29 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-$NetBSD: patch-aa,v 1.3 2010/12/05 17:13:09 gls Exp $
-
---- lib/Crypto/Util/RFC1751.py.orig 2010-08-27 04:41:55.000000000 +0000
-+++ lib/Crypto/Util/RFC1751.py
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/python
-+#!@@PYTHON@@
- # rfc1751.py : Converts between 128-bit strings and a human-readable
- # sequence of words, as defined in RFC1751: "A Convention for
- # Human-Readable 128-bit Keys", by Daniel L. McDonald.
diff -r f4674ea5c7d7 -r 2588bc447348 security/py-crypto/patches/patch-ac
--- a/security/py-crypto/patches/patch-ac Sun Oct 30 12:08:29 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-ac,v 1.3 2010/12/05 17:13:09 gls Exp $
-
---- setup.py.orig 2010-08-27 04:41:55.000000000 +0000
-+++ setup.py
-@@ -157,7 +157,7 @@ class PCTBuildExt (build_ext):
- self.compiler.include_dirs.insert(0, "src/inc-msvc/")
-
- # Detect libgmp and don't build _fastmath if it is missing.
-- lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib']
-+ lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib', '@@LIBDIR@@']
- if not (self.compiler.find_library_file(lib_dirs, 'gmp')):
- print >>sys.stderr, "warning: GMP library not found; Not building Crypto.PublicKey._fastmath."
- self.__remove_extensions(["Crypto.PublicKey._fastmath"])
Home |
Main Index |
Thread Index |
Old Index