diff --git a/.cvsignore b/.cvsignore index bf8d1f0..51df5ad 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pycrypto-2.0.tar.gz +pycrypto-2.0.1.tar.gz diff --git a/python-crypto-64bit-unclean.patch b/python-crypto-64bit-unclean.patch deleted file mode 100644 index 41486a0..0000000 --- a/python-crypto-64bit-unclean.patch +++ /dev/null @@ -1,75 +0,0 @@ -diff -Naur pycrypto-2.0.org/src/RIPEMD.c pycrypto-2.0/src/RIPEMD.c ---- pycrypto-2.0.org/src/RIPEMD.c 2005-05-05 14:28:28.000000000 +0200 -+++ pycrypto-2.0/src/RIPEMD.c 2005-05-05 14:39:12.000000000 +0200 -@@ -25,6 +25,8 @@ - #include - #endif - -+#include -+ - #include "Python.h" - - #define MODULE_NAME RIPEMD -@@ -100,11 +102,7 @@ - } - - typedef unsigned char byte; /* unsigned 8-bit integer */ --#ifdef __alpha__ --typedef unsigned int word; /* unsigned 32-bit integer */ --#else --typedef unsigned long word; /* unsigned 32-bit integer */ --#endif -+typedef uint32_t word; /* unsigned 32-bit integer */ - typedef unsigned char BYTE; - #define RMD_DATASIZE 64 - #define RMD_DIGESTSIZE 20 -diff -Naur pycrypto-2.0.org/src/SHA256.c pycrypto-2.0/src/SHA256.c ---- pycrypto-2.0.org/src/SHA256.c 2005-05-05 14:28:28.000000000 +0200 -+++ pycrypto-2.0/src/SHA256.c 2005-05-05 14:41:37.000000000 +0200 -@@ -9,22 +9,23 @@ - * Revised Code: Complies to SHA-256 standard now. - * - * Tom St Denis -- http://tomstdenis.home.dhs.org -- * */ -+ * */ -+#include - #include "Python.h" - #define MODULE_NAME SHA256 - #define DIGEST_SIZE 32 - - typedef unsigned char U8; --typedef unsigned int U32; -+typedef uint32_t U32; - - typedef struct { -- unsigned long state[8], length, curlen; -- unsigned char buf[64]; -+ U32 state[8], length, curlen; -+ U8 buf[64]; - } - hash_state; - - /* the K array */ --static const unsigned long K[64] = { -+static const U32 K[64] = { - 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, 0x3956c25bUL, - 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, 0xd807aa98UL, 0x12835b01UL, - 0x243185beUL, 0x550c7dc3UL, 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, -@@ -53,7 +54,7 @@ - /* compress 512-bits */ - static void sha_compress(hash_state * md) - { -- unsigned long S[8], W[64], t0, t1; -+ U32 S[8], W[64], t0, t1; - int i; - - /* copy state into S */ -@@ -104,7 +105,7 @@ - md->state[7] = 0x5BE0CD19UL; - } - --void sha_process(hash_state * md, unsigned char *buf, int len) -+void sha_process(hash_state * md, unsigned char *buf, U32 len) - { - while (len--) { - /* copy byte */ diff --git a/python-crypto.spec b/python-crypto.spec index b6ce82f..a55f2f6 100644 --- a/python-crypto.spec +++ b/python-crypto.spec @@ -3,14 +3,13 @@ Summary: Cryptography library for Python Name: python-crypto -Version: 2.0 -Release: 4 +Version: 2.0.1 +Release: 1%{?dist} License: Python License (CNRI Python License) Group: Development/Libraries URL: http://www.amk.ca/python/code/crypto.html -Source: http://www.amk.ca/files/python/crypto/pycrypto-2.0.tar.gz +Source: http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz Patch0: %{name}-x86_64-buildfix.patch -Patch1: %{name}-64bit-unclean.patch BuildRequires: python >= 2.2 BuildRequires: python-devel >= 2.2 BuildRequires: gmp-devel >= 4.1 @@ -22,33 +21,31 @@ Python-crypto is a collection of both secure hash functions (such as MD5 and SHA), and various encryption algorithms (AES, DES, IDEA, RSA, ElGamal, etc.). -# The pre section. + %prep -%setup -n pycrypto-2.0 -q +%setup -n pycrypto-%{version} -q %ifarch x86_64 %patch0 -b .patch0 %endif -%patch1 -b .patch1 -p 1 -# The build section. + %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build -# The install section. + %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT - find -name "*.py"|xargs %{__perl} -pi -e "s:/usr/local/bin/python:%{__python}:" -# The clean section. + %clean rm -rf $RPM_BUILD_ROOT -# The files section. + %files %defattr(-,root,root,-) -%doc README TODO ACKS ChangeLog LICENSE Doc Demo +%doc README TODO ACKS ChangeLog LICENSE Doc %{python_sitearch}/Crypto/*.py %{python_sitearch}/Crypto/*.pyc %ghost %{python_sitearch}/Crypto/*.pyo @@ -77,7 +74,14 @@ rm -rf $RPM_BUILD_ROOT %dir %{python_sitearch}/Crypto/PublicKey/ %dir %{python_sitearch}/Crypto/Util/ + %changelog +* Wed Aug 17 2005 Thorsten Leemhuis - 0:2.0.1-1 +- Update to 2.0.1 +- Use Dist +- Drop python-crypto-64bit-unclean.patch, similar patch was applied + upstream + * Thu May 05 2005 Thorsten Leemhuis - 0:2.0-4 - add python-crypto-64bit-unclean.patch (#156173) diff --git a/sources b/sources index 6eba0d0..48224a6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -55f9875c554ede75ad605d2c7504d94f pycrypto-2.0.tar.gz +4d5674f3898a573691ffb335e8d749cd pycrypto-2.0.1.tar.gz