diff options
author | 2006-04-26 23:39:43 +0000 | |
---|---|---|
committer | 2006-04-26 23:39:43 +0000 | |
commit | 66b12afbc19dd18aa3a2b73fb94ebcef95481dba (patch) | |
tree | a547bf84ebe2dee2217f0edf3a282c366427211f /dev-python/pycrypto | |
parent | Added -alpha keyword. Doesn't work on alpha. (diff) | |
download | gentoo-2-66b12afbc19dd18aa3a2b73fb94ebcef95481dba.tar.gz gentoo-2-66b12afbc19dd18aa3a2b73fb94ebcef95481dba.tar.bz2 gentoo-2-66b12afbc19dd18aa3a2b73fb94ebcef95481dba.zip |
Fix from upstream for SHA256 #131293 by Ciaran McCreesh.
(Portage version: 2.1_pre9-r4)
Diffstat (limited to 'dev-python/pycrypto')
-rw-r--r-- | dev-python/pycrypto/ChangeLog | 8 | ||||
-rw-r--r-- | dev-python/pycrypto/files/digest-pycrypto-2.0.1-r4 | 2 | ||||
-rw-r--r-- | dev-python/pycrypto/files/digest-pycrypto-2.0.1-r5 | 3 | ||||
-rw-r--r-- | dev-python/pycrypto/files/pycrypto-2.0.1-sha256.patch | 23 | ||||
-rw-r--r-- | dev-python/pycrypto/pycrypto-2.0.1-r5.ebuild | 53 |
5 files changed, 88 insertions, 1 deletions
diff --git a/dev-python/pycrypto/ChangeLog b/dev-python/pycrypto/ChangeLog index 395c135d6e74..3d5c3d8ce9fd 100644 --- a/dev-python/pycrypto/ChangeLog +++ b/dev-python/pycrypto/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-python/pycrypto # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pycrypto/ChangeLog,v 1.38 2006/03/30 18:26:32 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/pycrypto/ChangeLog,v 1.39 2006/04/26 23:39:43 vapier Exp $ + +*pycrypto-2.0.1-r5 (26 Apr 2006) + + 26 Apr 2006; Mike Frysinger <vapier@gentoo.org> + +files/pycrypto-2.0.1-sha256.patch, +pycrypto-2.0.1-r5.ebuild: + Fix from upstream for SHA256 #131293 by Ciaran McCreesh. 30 Mar 2006; Diego Pettenò <flameeyes@gentoo.org> pycrypto-2.0.1-r4.ebuild: diff --git a/dev-python/pycrypto/files/digest-pycrypto-2.0.1-r4 b/dev-python/pycrypto/files/digest-pycrypto-2.0.1-r4 index aa9117b02ce5..4e5b88462ffb 100644 --- a/dev-python/pycrypto/files/digest-pycrypto-2.0.1-r4 +++ b/dev-python/pycrypto/files/digest-pycrypto-2.0.1-r4 @@ -1 +1,3 @@ MD5 4d5674f3898a573691ffb335e8d749cd pycrypto-2.0.1.tar.gz 154292 +RMD160 5ce938a24f77f414e42680c17ef9b6dc8de94a2e pycrypto-2.0.1.tar.gz 154292 +SHA256 b08d4ed54c9403c77778a3803e53a4f33f359b42d94f6f3e14abb1bf4941e6ea pycrypto-2.0.1.tar.gz 154292 diff --git a/dev-python/pycrypto/files/digest-pycrypto-2.0.1-r5 b/dev-python/pycrypto/files/digest-pycrypto-2.0.1-r5 new file mode 100644 index 000000000000..4e5b88462ffb --- /dev/null +++ b/dev-python/pycrypto/files/digest-pycrypto-2.0.1-r5 @@ -0,0 +1,3 @@ +MD5 4d5674f3898a573691ffb335e8d749cd pycrypto-2.0.1.tar.gz 154292 +RMD160 5ce938a24f77f414e42680c17ef9b6dc8de94a2e pycrypto-2.0.1.tar.gz 154292 +SHA256 b08d4ed54c9403c77778a3803e53a4f33f359b42d94f6f3e14abb1bf4941e6ea pycrypto-2.0.1.tar.gz 154292 diff --git a/dev-python/pycrypto/files/pycrypto-2.0.1-sha256.patch b/dev-python/pycrypto/files/pycrypto-2.0.1-sha256.patch new file mode 100644 index 000000000000..8d6b63489fcd --- /dev/null +++ b/dev-python/pycrypto/files/pycrypto-2.0.1-sha256.patch @@ -0,0 +1,23 @@ +http://bugs.gentoo.org/131293 + +=================================================================== +RCS file: /cvsroot/pycrypto/crypto/src/SHA256.c,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -r1.3 -r1.4 +--- pycrypto/crypto/src/SHA256.c 2005/06/10 19:22:55 1.3 ++++ pycrypto/crypto/src/SHA256.c 2005/11/29 16:31:36 1.4 +@@ -136,11 +136,11 @@ + /* append the '1' bit */
+ md->buf[md->curlen++] = 0x80;
+
+- /* if the length is currenlly above 56 bytes we append zeros
++ /* if the length is currently above 56 bytes we append zeros
+ * then compress. Then we can fall back to padding zeros and length
+ * encoding like normal.
+ */
+- if (md->curlen >= 56) {
++ if (md->curlen > 56) {
+ for (; md->curlen < 64;)
+ md->buf[md->curlen++] = 0;
+ sha_compress(md);
diff --git a/dev-python/pycrypto/pycrypto-2.0.1-r5.ebuild b/dev-python/pycrypto/pycrypto-2.0.1-r5.ebuild new file mode 100644 index 000000000000..48c0722e0c93 --- /dev/null +++ b/dev-python/pycrypto/pycrypto-2.0.1-r5.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pycrypto/pycrypto-2.0.1-r5.ebuild,v 1.1 2006/04/26 23:39:43 vapier Exp $ + +inherit eutils distutils toolchain-funcs flag-o-matic + +DESCRIPTION="Python Cryptography Toolkit" +HOMEPAGE="http://www.amk.ca/python/code/crypto.html" +SRC_URI="http://www.amk.ca/files/python/crypto/${P}.tar.gz" + +LICENSE="freedist" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="bindist gmp test" + +RDEPEND="virtual/python + gmp? ( dev-libs/gmp )" +DEPEND="${RDEPEND} + test? ( =dev-python/sancho-0.11-r1 )" + +src_unpack() { + unpack ${A} + cd "${S}" + use bindist && epatch "${FILESDIR}"/${P}-bindist.patch + epatch "${FILESDIR}"/${P}-sha256.patch + epatch "${FILESDIR}"/${P}-gmp.patch + epatch "${FILESDIR}"/pycrypto-2.0.1-uint32.patch + epatch "${FILESDIR}"/${P}-sancho-package-rename.patch +} + +src_compile() { + use gmp \ + && export USE_GMP=1 \ + || export USE_GMP=0 + # sha256 hashes occasionally trigger ssp when built with + # -finline-functions (implied by -O3). + gcc-specs-ssp && append-flags -fno-inline-functions + distutils_src_compile +} + +src_test() { + export PYTHONPATH=$(ls -d "${S}"/build/lib.*/) + python ./test.py || die "test failed" + if use test ; then + local x + cd test + for x in test_*.py ; do + python ${x} || die "${x} failed" + done + fi +} + +DOCS="ACKS ChangeLog PKG-INFO README TODO Doc/pycrypt.tex" |