Hello community, here is the log from the commit of package python-m2crypto for openSUSE:Factory checked in at Wed Apr 21 01:55:14 CEST 2010. -------- --- python-m2crypto/python-m2crypto.changes 2009-02-27 10:21:29.000000000 +0100 +++ /mounts/work_src_done/STABLE/python-m2crypto/python-m2crypto.changes 2010-04-20 10:46:39.000000000 +0200 @@ -1,0 +2,17 @@ +Tue Apr 20 08:46:03 UTC 2010 - lnussel@suse.de + +- add some upstream patches to fix openssl 1.0 build + +------------------------------------------------------------------- +Tue Mar 30 14:09:38 CEST 2010 - matejcik@suse.cz + +- update to 0.20.2 + * PGP subpackage is deprecated + * m2urllib now closes sockets properly + * port is now integer in ProxyHTTPSConnection + * many bugfixes + * test coverage up to 80% +- enabled test suite in %check phase + (requires python-setuptools and openssl binary to run) + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- M2Crypto-0.19.1.tar.bz2 New: ---- 0001-Support-OpenSSL-1.0.-Thanks-to-Miloslav-Trmac-for-fig.diff 0002-Bug-12910-make-httpslib.ProxyHTTPSConnection-work-wit.diff 0003-Bug-12935-0.20-started-releasing-Python-locks-even-ar.diff M2Crypto-0.20.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-m2crypto.spec ++++++ --- /var/tmp/diff_new_pack.9VYya3/_old 2010-04-21 01:55:01.000000000 +0200 +++ /var/tmp/diff_new_pack.9VYya3/_new 2010-04-21 01:55:01.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package python-m2crypto (Version 0.19.1) +# spec file for package python-m2crypto (Version 0.20.2) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,15 +19,18 @@ Name: python-m2crypto -BuildRequires: openssl-devel python-devel swig +BuildRequires: openssl openssl-devel python-devel python-setuptools swig Url: http://chandlerproject.org/bin/view/Projects/MeTooCrypto License: X11/MIT, ZPLv2, BSD3 Group: Development/Languages/Python AutoReqProv: on -Version: 0.19.1 +Version: 0.20.2 Release: 1 Summary: Crypto and SSL toolkit for Python Source0: M2Crypto-%{version}.tar.bz2 +Patch0: 0001-Support-OpenSSL-1.0.-Thanks-to-Miloslav-Trmac-for-fig.diff +Patch1: 0002-Bug-12910-make-httpslib.ProxyHTTPSConnection-work-wit.diff +Patch2: 0003-Bug-12935-0.20-started-releasing-Python-locks-even-ar.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %{py_requires} @@ -54,6 +57,9 @@ %prep %setup -n M2Crypto-%{version} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build export CFLAGS="$RPM_OPT_FLAGS" @@ -63,6 +69,9 @@ export CFLAGS="$RPM_OPT_FLAGS" python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES +%check +python setup.py test + %clean rm -rf $RPM_BUILD_ROOT ++++++ 0001-Support-OpenSSL-1.0.-Thanks-to-Miloslav-Trmac-for-fig.diff ++++++ ++++ 711 lines (skipped) ++++++ 0002-Bug-12910-make-httpslib.ProxyHTTPSConnection-work-wit.diff ++++++
From 62db455f762e924b60abe980cf26b7c0879e3eae Mon Sep 17 00:00:00 2001 From: Ludwig Nussel
Date: Tue, 20 Apr 2010 10:40:27 +0200 Subject: [PATCH 2/3] Bug 12910, make httpslib.ProxyHTTPSConnection work with Python 2.3.
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@722 2715db39-9adf-0310-9c64-84f055769b4b --- M2Crypto/httpslib.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/M2Crypto/httpslib.py b/M2Crypto/httpslib.py index 9862862..c1bfd78 100644 --- a/M2Crypto/httpslib.py +++ b/M2Crypto/httpslib.py @@ -145,7 +145,10 @@ class ProxyHTTPSConnection(HTTPSConnection): self._real_host = host self._real_port = int(port) rest = urlunsplit((None, None, path, query, fragment)) - HTTPSConnection.putrequest(self, method, rest, skip_host, skip_accept_encoding) + if sys.version_info < (2,4): + HTTPSConnection.putrequest(self, method, rest, skip_host) + else: + HTTPSConnection.putrequest(self, method, rest, skip_host, skip_accept_encoding) def putheader(self, header, value): # Store the auth header if passed in. -- 1.6.4.2 ++++++ 0003-Bug-12935-0.20-started-releasing-Python-locks-even-ar.diff ++++++
From 9fa011a27ae35425e7731341b8a4df7a875c3100 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel
Date: Tue, 20 Apr 2010 10:41:06 +0200 Subject: [PATCH 3/3] Bug 12935, 0.20 started releasing Python locks even around some operations that interacted with the Python runtime, potentially causing crashes and other weirdness, fix by Miloslav Trmac.
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@723 2715db39-9adf-0310-9c64-84f055769b4b --- SWIG/_dsa.i | 15 ++++++++++----- SWIG/_ec.i | 9 ++++++--- SWIG/_evp.i | 9 ++++++--- SWIG/_pkcs7.i | 8 +++++--- SWIG/_rsa.i | 9 ++++++--- 5 files changed, 33 insertions(+), 17 deletions(-) diff --git a/SWIG/_dsa.i b/SWIG/_dsa.i index 81e9795..a35dd88 100644 --- a/SWIG/_dsa.i +++ b/SWIG/_dsa.i @@ -155,13 +155,14 @@ PyObject *dsa_set_g(DSA *dsa, PyObject *value) { } %} -%threadallow dsa_read_params; %inline %{ DSA *dsa_read_params(BIO *f, PyObject *pyfunc) { DSA *ret; Py_INCREF(pyfunc); + Py_BEGIN_ALLOW_THREADS ret = PEM_read_bio_DSAparams(f, NULL, passphrase_callback, (void *)pyfunc); + Py_END_ALLOW_THREADS Py_DECREF(pyfunc); return ret; } @@ -174,27 +175,29 @@ int dsa_write_params_bio(DSA* dsa, BIO* f) { } %} -%threadallow dsa_write_key_bio; %inline %{ int dsa_write_key_bio(DSA* dsa, BIO* f, EVP_CIPHER *cipher, PyObject *pyfunc) { int ret; Py_INCREF(pyfunc); + Py_BEGIN_ALLOW_THREADS ret = PEM_write_bio_DSAPrivateKey(f, dsa, cipher, NULL, 0, passphrase_callback, (void *)pyfunc); + Py_END_ALLOW_THREADS Py_DECREF(pyfunc); return ret; } %} -%threadallow dsa_write_key_bio_no_cipher; %inline %{ int dsa_write_key_bio_no_cipher(DSA* dsa, BIO* f, PyObject *pyfunc) { int ret; Py_INCREF(pyfunc); + Py_BEGIN_ALLOW_THREADS ret = PEM_write_bio_DSAPrivateKey(f, dsa, NULL, NULL, 0, passphrase_callback, (void *)pyfunc); + Py_END_ALLOW_THREADS Py_DECREF(pyfunc); return ret; } @@ -207,25 +210,27 @@ int dsa_write_pub_key_bio(DSA* dsa, BIO* f) { } %} -%threadallow dsa_read_key; %inline %{ DSA *dsa_read_key(BIO *f, PyObject *pyfunc) { DSA *ret; Py_INCREF(pyfunc); + Py_BEGIN_ALLOW_THREADS ret = PEM_read_bio_DSAPrivateKey(f, NULL, passphrase_callback, (void *)pyfunc); + Py_END_ALLOW_THREADS Py_DECREF(pyfunc); return ret; } %} -%threadallow dsa_read_pub_key; %inline %{ DSA *dsa_read_pub_key(BIO *f, PyObject *pyfunc) { DSA *ret; Py_INCREF(pyfunc); + Py_BEGIN_ALLOW_THREADS ret = PEM_read_bio_DSA_PUBKEY(f, NULL, passphrase_callback, (void *)pyfunc); + Py_END_ALLOW_THREADS Py_DECREF(pyfunc); return ret; } diff --git a/SWIG/_ec.i b/SWIG/_ec.i index a9383c1..f0e52bd 100644 --- a/SWIG/_ec.i +++ b/SWIG/_ec.i @@ -205,39 +205,42 @@ int ec_key_write_pubkey(EC_KEY *key, BIO *f) { } %} -%threadallow ec_key_read_bio; %inline %{ EC_KEY *ec_key_read_bio(BIO *f, PyObject *pyfunc) { EC_KEY *ret; Py_INCREF(pyfunc); + Py_BEGIN_ALLOW_THREADS ret = PEM_read_bio_ECPrivateKey(f, NULL, passphrase_callback, (void *)pyfunc); + Py_END_ALLOW_THREADS Py_DECREF(pyfunc); return ret; } %} -%threadallow ec_key_write_bio; %inline %{ int ec_key_write_bio(EC_KEY *key, BIO *f, EVP_CIPHER *cipher, PyObject *pyfunc) { int ret; Py_INCREF(pyfunc); + Py_BEGIN_ALLOW_THREADS ret = PEM_write_bio_ECPrivateKey(f, key, cipher, NULL, 0, passphrase_callback, (void *)pyfunc); + Py_END_ALLOW_THREADS Py_DECREF(pyfunc); return ret; } %} -%threadallow ec_key_write_bio_no_cipher; %inline %{ int ec_key_write_bio_no_cipher(EC_KEY *key, BIO *f, PyObject *pyfunc) { int ret; Py_INCREF(pyfunc); + Py_BEGIN_ALLOW_THREADS ret = PEM_write_bio_ECPrivateKey(f, key, NULL, NULL, 0, passphrase_callback, (void *)pyfunc); + Py_END_ALLOW_THREADS Py_DECREF(pyfunc); return ret; } diff --git a/SWIG/_evp.i b/SWIG/_evp.i index d58160c..2d2189a 100644 --- a/SWIG/_evp.i +++ b/SWIG/_evp.i @@ -463,39 +463,42 @@ int verify_final(EVP_MD_CTX *ctx, PyObject *blob, EVP_PKEY *pkey) { } %} -%threadallow pkey_write_pem_no_cipher; %inline %{ int pkey_write_pem_no_cipher(EVP_PKEY *pkey, BIO *f, PyObject *pyfunc) { int ret; Py_INCREF(pyfunc); + Py_BEGIN_ALLOW_THREADS ret = PEM_write_bio_PKCS8PrivateKey(f, pkey, NULL, NULL, 0, passphrase_callback, (void *)pyfunc); + Py_END_ALLOW_THREADS Py_DECREF(pyfunc); return ret; } %} -%threadallow pkey_write_pem; %inline %{ int pkey_write_pem(EVP_PKEY *pkey, BIO *f, EVP_CIPHER *cipher, PyObject *pyfunc) { int ret; Py_INCREF(pyfunc); + Py_BEGIN_ALLOW_THREADS ret = PEM_write_bio_PKCS8PrivateKey(f, pkey, cipher, NULL, 0, passphrase_callback, (void *)pyfunc); + Py_END_ALLOW_THREADS Py_DECREF(pyfunc); return ret; } %} -%threadallow pkey_read_pem; %inline %{ EVP_PKEY *pkey_read_pem(BIO *f, PyObject *pyfunc) { EVP_PKEY *pk; Py_INCREF(pyfunc); + Py_BEGIN_ALLOW_THREADS pk = PEM_read_bio_PrivateKey(f, NULL, passphrase_callback, (void *)pyfunc); + Py_END_ALLOW_THREADS Py_DECREF(pyfunc); return pk; } diff --git a/SWIG/_pkcs7.i b/SWIG/_pkcs7.i index 4256acf..9aba4b5 100644 --- a/SWIG/_pkcs7.i +++ b/SWIG/_pkcs7.i @@ -101,10 +101,9 @@ PKCS7 *pkcs7_sign1(X509 *x509, EVP_PKEY *pkey, STACK_OF(X509) *stack, BIO *bio, } %} -%threadallow pkcs7_verify1; %inline %{ PyObject *pkcs7_verify1(PKCS7 *pkcs7, STACK_OF(X509) *stack, X509_STORE *store, BIO *data, int flags) { - int outlen; + int res, outlen; char *outbuf; BIO *bio; PyObject *ret; @@ -113,7 +112,10 @@ PyObject *pkcs7_verify1(PKCS7 *pkcs7, STACK_OF(X509) *stack, X509_STORE *store, PyErr_SetString(PyExc_MemoryError, "pkcs7_verify1"); return NULL; } - if (!PKCS7_verify(pkcs7, stack, store, data, bio, flags)) { + Py_BEGIN_ALLOW_THREADS + res = PKCS7_verify(pkcs7, stack, store, data, bio, flags); + Py_END_ALLOW_THREADS + if (!res) { PyErr_SetString(_pkcs7_err, ERR_reason_error_string(ERR_get_error())); BIO_free(bio); return NULL; diff --git a/SWIG/_rsa.i b/SWIG/_rsa.i index 3fba66d..af91c5c 100644 --- a/SWIG/_rsa.i +++ b/SWIG/_rsa.i @@ -48,39 +48,42 @@ void rsa_init(PyObject *rsa_err) { } %} -%threadallow rsa_read_key; %inline %{ RSA *rsa_read_key(BIO *f, PyObject *pyfunc) { RSA *rsa; Py_INCREF(pyfunc); + Py_BEGIN_ALLOW_THREADS rsa = PEM_read_bio_RSAPrivateKey(f, NULL, passphrase_callback, (void *)pyfunc); + Py_END_ALLOW_THREADS Py_DECREF(pyfunc); return rsa; } %} -%threadallow rsa_write_key; %inline %{ int rsa_write_key(RSA *rsa, BIO *f, EVP_CIPHER *cipher, PyObject *pyfunc) { int ret; Py_INCREF(pyfunc); + Py_BEGIN_ALLOW_THREADS ret = PEM_write_bio_RSAPrivateKey(f, rsa, cipher, NULL, 0, passphrase_callback, (void *)pyfunc); + Py_END_ALLOW_THREADS Py_DECREF(pyfunc); return ret; } %} -%threadallow rsa_write_key_no_cipher; %inline %{ int rsa_write_key_no_cipher(RSA *rsa, BIO *f, PyObject *pyfunc) { int ret; Py_INCREF(pyfunc); + Py_BEGIN_ALLOW_THREADS ret = PEM_write_bio_RSAPrivateKey(f, rsa, NULL, NULL, 0, passphrase_callback, (void *)pyfunc); + Py_END_ALLOW_THREADS Py_DECREF(pyfunc); return ret; } -- 1.6.4.2 ++++++ M2Crypto-0.19.1.tar.bz2 -> M2Crypto-0.20.2.tar.bz2 ++++++ ++++ 5791 lines of diff (skipped) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org