pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/py-m2crypto Update to 0.13.1, based on patche...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a6b4e1dc74cb
branches:  trunk
changeset: 506337:a6b4e1dc74cb
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sat Jan 14 23:07:26 2006 +0000

description:
Update to 0.13.1, based on patches from recht@ via tech-pkg.

Additionally, fix it to compile against openssl-0.9.7i, the
current pkgsrc version; due to its way of checking compatibility,
py-m2crypto is extremely picky about constness.
If this works with other versions too, just add them to the pattern.

 Changes since 0.12/0.11
-------------------------
- Patches from Artur Frysiak. Thanks Artur.
  = Allow using a passphrase callback in class SMIME.
  = Added method get0_signers to class PKCS7, which retrieves signers'
    certificates from a PKCS7 blob.
  = Added methods as_pem and save_pem to class X509.
  = Added file version.py.
  = Allow SSL.Context.load_verify_locations to accept both 'cafile' and
    'capath'.
- Fixed BIO.read() not reading until EOF. Thanks to Egil Muller
  for suggestion.
- Honour 'mode' parameter in SSL.Connection.makefile. Thanks again to Egil
  Muller.
- Roger Binns contributed epydoc-generated docs for M2Crypto. Thanks Roger.
- Peter Teniz contributed patches to create X.509 requests and certificates.
  Thanks Peter.
- Updated Medusa to 0.54.
- Make various OpenSSL bignum functions (written long ago) available to Python.

diffstat:

 security/py-m2crypto/Makefile         |  20 ++++++---
 security/py-m2crypto/PLIST            |   5 +-
 security/py-m2crypto/distinfo         |  14 ++++-
 security/py-m2crypto/patches/patch-aa |  61 ++++++++++++++++++++++++++++
 security/py-m2crypto/patches/patch-ac |  74 +++++++++++++++++++++++++++++++++++
 security/py-m2crypto/patches/patch-ad |  13 ++++++
 6 files changed, 175 insertions(+), 12 deletions(-)

diffs (238 lines):

diff -r e902d026340c -r a6b4e1dc74cb security/py-m2crypto/Makefile
--- a/security/py-m2crypto/Makefile     Sat Jan 14 22:32:44 2006 +0000
+++ b/security/py-m2crypto/Makefile     Sat Jan 14 23:07:26 2006 +0000
@@ -1,23 +1,29 @@
-# $NetBSD: Makefile,v 1.13 2005/12/05 20:50:58 rillig Exp $
+# $NetBSD: Makefile,v 1.14 2006/01/14 23:07:26 wiz Exp $
 #
 
-DISTNAME=              m2crypto-0.12
-PKGNAME=               ${PYPKGPREFIX}-m2crypto-0.12
-PKGREVISION=           2
+DISTNAME=              m2crypto-0.13
+PKGNAME=               ${PYPKGPREFIX}-${DISTNAME}.1
 CATEGORIES=            security python
 MASTER_SITES=          http://sandbox.rulemaker.net/ngps/Dist/
 EXTRACT_SUFX=          .zip
 
+PATCH_SITES=           ${MASTER_SITES}
+PATCHFILES=            0.13p1.patch 
+
 MAINTAINER=            tech-pkg%NetBSD.org@localhost
 HOMEPAGE=              http://sandbox.rulemaker.net/ngps/m2/
 COMMENT=               Crypto and SSL toolkit for Python
 
 PYDISTUTILSPKG=                        yes
-PYTHON_VERSIONS_ACCEPTED=      23 22 21
+PYTHON_VERSIONS_ACCEPTED=      24 23 22 21
 
-BUILDLINK_DEPENDS.openssl+=    openssl>=0.9.7b
+# constness is very different between openssl versions,
+# it seems, and 0.9.7i is the version which currently is
+# in pkgsrc and against which I fixed m2crypto to compile.
+# -- wiz 20060115
+BUILDLINK_DEPENDS.openssl+=    openssl-0.9.7i
 
 .include "../../lang/python/extension.mk"
-.include "../../devel/swig-build/buildlink3.mk"
+.include "../../devel/swig/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r e902d026340c -r a6b4e1dc74cb security/py-m2crypto/PLIST
--- a/security/py-m2crypto/PLIST        Sat Jan 14 22:32:44 2006 +0000
+++ b/security/py-m2crypto/PLIST        Sat Jan 14 23:07:26 2006 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2003/09/14 16:43:55 recht Exp $
+@comment $NetBSD: PLIST,v 1.3 2006/01/14 23:07:26 wiz Exp $
 ${PYSITELIB}/M2Crypto/ASN1.py
 ${PYSITELIB}/M2Crypto/ASN1.pyc
 ${PYSITELIB}/M2Crypto/ASN1.pyo
@@ -87,6 +87,9 @@
 ${PYSITELIB}/M2Crypto/__init__.pyc
 ${PYSITELIB}/M2Crypto/__init__.pyo
 ${PYSITELIB}/M2Crypto/__m2crypto.so
+${PYSITELIB}/M2Crypto/_version.py
+${PYSITELIB}/M2Crypto/_version.pyc
+${PYSITELIB}/M2Crypto/_version.pyo
 ${PYSITELIB}/M2Crypto/callback.py
 ${PYSITELIB}/M2Crypto/callback.pyc
 ${PYSITELIB}/M2Crypto/callback.pyo
diff -r e902d026340c -r a6b4e1dc74cb security/py-m2crypto/distinfo
--- a/security/py-m2crypto/distinfo     Sat Jan 14 22:32:44 2006 +0000
+++ b/security/py-m2crypto/distinfo     Sat Jan 14 23:07:26 2006 +0000
@@ -1,5 +1,11 @@
-$NetBSD: distinfo,v 1.3 2005/02/24 13:10:12 agc Exp $
+$NetBSD: distinfo,v 1.4 2006/01/14 23:07:26 wiz Exp $
 
-SHA1 (m2crypto-0.12.zip) = 33755f36d3d43d4c89281fcc57571eb99e275a3d
-RMD160 (m2crypto-0.12.zip) = c005e8b7e77651bbeb7d2df9267d0b2940ace0fb
-Size (m2crypto-0.12.zip) = 397229 bytes
+SHA1 (m2crypto-0.13.zip) = 53b722f6ca9a3661c42c18360b158f3e7ac5b5c2
+RMD160 (m2crypto-0.13.zip) = b2477dff6f49a80ab5508f18837009b4a634a0df
+Size (m2crypto-0.13.zip) = 410759 bytes
+SHA1 (0.13p1.patch) = e3a097459626f7f016d9f1e118776fa7c97d6328
+RMD160 (0.13p1.patch) = 3ed0aacb7f2d09208e9a6d70a69fbb96fe9c3ad0
+Size (0.13p1.patch) = 1645 bytes
+SHA1 (patch-aa) = bd3195f30548525ae8b3fa13010d39a63bb2abd7
+SHA1 (patch-ac) = ec2d96afcd36157babeb7baa5f5d1c7e2102a57d
+SHA1 (patch-ad) = d19867bfe01323772de76dbe0711d29c33505d2d
diff -r e902d026340c -r a6b4e1dc74cb security/py-m2crypto/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/py-m2crypto/patches/patch-aa     Sat Jan 14 23:07:26 2006 +0000
@@ -0,0 +1,61 @@
+$NetBSD: patch-aa,v 1.1 2006/01/14 23:07:26 wiz Exp $
+
+--- setup.py.orig      2004-03-28 11:06:59.000000000 +0000
++++ setup.py
+@@ -12,56 +12,6 @@ import os, shutil
+ from distutils.core import setup, Extension
+ from distutils.command import build_ext
+ 
+-# This copy of swig_sources is from Python 2.2.
+-
+-def swig_sources (self, sources):
+-
+-    """Walk the list of source files in 'sources', looking for SWIG
+-    interface (.i) files.  Run SWIG on all that are found, and
+-    return a modified 'sources' list with SWIG source files replaced
+-    by the generated C (or C++) files.
+-    """
+-
+-    new_sources = []
+-    swig_sources = []
+-    swig_targets = {}
+-
+-    # XXX this drops generated C/C++ files into the source tree, which
+-    # is fine for developers who want to distribute the generated
+-    # source -- but there should be an option to put SWIG output in
+-    # the temp dir.
+-
+-    if self.swig_cpp:
+-        target_ext = '.cpp'
+-    else:
+-        target_ext = '.c'
+-
+-    for source in sources:
+-        (base, ext) = os.path.splitext(source)
+-        if ext == ".i":             # SWIG interface file
+-            new_sources.append(base + target_ext)
+-            swig_sources.append(source)
+-            swig_targets[source] = new_sources[-1]
+-        else:
+-            new_sources.append(source)
+-
+-    if not swig_sources:
+-        return new_sources
+-
+-    swig = self.find_swig()
+-    swig_cmd = [swig, "-python", "-ISWIG"]
+-    if self.swig_cpp:
+-        swig_cmd.append("-c++")
+-
+-    for source in swig_sources:
+-        target = swig_targets[source]
+-        self.announce("swigging %s to %s" % (source, target))
+-        self.spawn(swig_cmd + ["-o", target, source])
+-
+-    return new_sources
+-
+-build_ext.build_ext.swig_sources = swig_sources
+-
+ my_inc = os.path.join(os.getcwd(), 'SWIG')
+ 
+ if os.name == 'nt':
diff -r e902d026340c -r a6b4e1dc74cb security/py-m2crypto/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/py-m2crypto/patches/patch-ac     Sat Jan 14 23:07:26 2006 +0000
@@ -0,0 +1,74 @@
+$NetBSD: patch-ac,v 1.1 2006/01/14 23:07:26 wiz Exp $
+
+--- SWIG/_ssl.i.orig   2004-03-25 04:41:11.000000000 +0000
++++ SWIG/_ssl.i
+@@ -18,7 +18,7 @@
+ %apply Pointer NONNULL { RSA * };
+ %apply Pointer NONNULL { PyObject *pyfunc };
+ 
+-%name(ssl_get_error) extern int SSL_get_error(SSL *, int);
++%name(ssl_get_error) extern int SSL_get_error(const SSL *, int);
+ %name(ssl_get_state) extern const char *SSL_state_string(const SSL *);
+ %name(ssl_get_state_v) extern const char *SSL_state_string_long(const SSL *);
+ %name(ssl_get_alert_type) extern const char *SSL_alert_type_string(int);
+@@ -34,13 +34,13 @@
+ %name(ssl_ctx_new) extern SSL_CTX *SSL_CTX_new(SSL_METHOD *);
+ %name(ssl_ctx_free) extern void SSL_CTX_free(SSL_CTX *);
+ %name(ssl_ctx_set_verify_depth) extern void SSL_CTX_set_verify_depth(SSL_CTX *, int);
+-%name(ssl_ctx_get_verify_depth) extern int SSL_CTX_get_verify_depth(SSL_CTX *);
+-%name(ssl_ctx_get_verify_mode) extern int SSL_CTX_get_verify_mode(SSL_CTX *);
++%name(ssl_ctx_get_verify_depth) extern int SSL_CTX_get_verify_depth(const SSL_CTX *);
++%name(ssl_ctx_get_verify_mode) extern int SSL_CTX_get_verify_mode(const SSL_CTX *);
+ %name(ssl_ctx_set_cipher_list) extern int SSL_CTX_set_cipher_list(SSL_CTX *, const char *);
+ %name(ssl_ctx_add_session) extern int SSL_CTX_add_session(SSL_CTX *, SSL_SESSION *);
+ %name(ssl_ctx_remove_session) extern int SSL_CTX_remove_session(SSL_CTX *, SSL_SESSION *);
+ %name(ssl_ctx_set_session_timeout) extern long SSL_CTX_set_timeout(SSL_CTX *, long);
+-%name(ssl_ctx_get_session_timeout) extern long SSL_CTX_get_timeout(SSL_CTX *);
++%name(ssl_ctx_get_session_timeout) extern long SSL_CTX_get_timeout(const SSL_CTX *);
+ 
+ %name(bio_new_ssl) extern BIO *BIO_new_ssl(SSL_CTX *, int);
+ 
+@@ -54,29 +54,29 @@
+ %name(ssl_shutdown) extern int SSL_shutdown(SSL *);
+ %name(ssl_do_handshake) extern int SSL_do_handshake(SSL *);
+ %name(ssl_renegotiate) extern int SSL_renegotiate(SSL *);
+-%name(ssl_pending) extern int SSL_pending(SSL *);
++%name(ssl_pending) extern int SSL_pending(const SSL *);
+ 
+-%name(ssl_get_peer_cert) extern X509 *SSL_get_peer_certificate(SSL *);
+-%name(ssl_get_current_cipher) extern SSL_CIPHER *SSL_get_current_cipher(SSL *);
+-%name(ssl_get_verify_mode) extern int SSL_get_verify_mode(SSL *);
+-%name(ssl_get_verify_depth) extern int SSL_get_verify_depth(SSL *);
+-%name(ssl_get_verify_result) extern long SSL_get_verify_result(SSL *);
+-%name(ssl_get_ssl_ctx) extern SSL_CTX *SSL_get_SSL_CTX(SSL *);
+-%name(ssl_get_default_session_timeout) extern long SSL_get_default_timeout(SSL *);
++%name(ssl_get_peer_cert) extern X509 *SSL_get_peer_certificate(const SSL *);
++%name(ssl_get_current_cipher) extern SSL_CIPHER *SSL_get_current_cipher(const SSL *);
++%name(ssl_get_verify_mode) extern int SSL_get_verify_mode(const SSL *);
++%name(ssl_get_verify_depth) extern int SSL_get_verify_depth(const SSL *);
++%name(ssl_get_verify_result) extern long SSL_get_verify_result(const SSL *);
++%name(ssl_get_ssl_ctx) extern SSL_CTX *SSL_get_SSL_CTX(const SSL *);
++%name(ssl_get_default_session_timeout) extern long SSL_get_default_timeout(const SSL *);
+ 
+ %name(ssl_set_cipher_list) extern int SSL_set_cipher_list(SSL *, const char *);
+-%name(ssl_get_cipher_list) extern const char *SSL_get_cipher_list(SSL *, int);
++%name(ssl_get_cipher_list) extern const char *SSL_get_cipher_list(const SSL *, int);
+ 
+-%name(ssl_cipher_get_name) extern const char *SSL_CIPHER_get_name(SSL_CIPHER *);
+-%name(ssl_cipher_get_version) extern char *SSL_CIPHER_get_version(SSL_CIPHER *);
++%name(ssl_cipher_get_name) extern const char *SSL_CIPHER_get_name(const SSL_CIPHER *);
++%name(ssl_cipher_get_version) extern char *SSL_CIPHER_get_version(const SSL_CIPHER *);
+ 
+-%name(ssl_get_session) extern SSL_SESSION *SSL_get_session(SSL *);
++%name(ssl_get_session) extern SSL_SESSION *SSL_get_session(const SSL *);
+ %name(ssl_get1_session) extern SSL_SESSION *SSL_get1_session(SSL *);
+ %name(ssl_set_session) extern int SSL_set_session(SSL *, SSL_SESSION *);
+ %name(ssl_session_free) extern void SSL_SESSION_free(SSL_SESSION *);
+-%name(ssl_session_print) extern int SSL_SESSION_print(BIO *, SSL_SESSION *);
++%name(ssl_session_print) extern int SSL_SESSION_print(BIO *, const SSL_SESSION *);
+ %name(ssl_session_set_timeout) extern long SSL_SESSION_set_timeout(SSL_SESSION *, long);
+-%name(ssl_session_get_timeout) extern long SSL_SESSION_get_timeout(SSL_SESSION *);
++%name(ssl_session_get_timeout) extern long SSL_SESSION_get_timeout(const SSL_SESSION *);
+ 
+ %constant int ssl_error_none              = SSL_ERROR_NONE;
+ %constant int ssl_error_ssl               = SSL_ERROR_SSL;
diff -r e902d026340c -r a6b4e1dc74cb security/py-m2crypto/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/py-m2crypto/patches/patch-ad     Sat Jan 14 23:07:26 2006 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1 2006/01/14 23:07:26 wiz Exp $
+
+--- SWIG/_x509.i.orig  2004-03-21 12:37:46.000000000 +0000
++++ SWIG/_x509.i
+@@ -43,7 +43,7 @@
+ %name(x509_name_entry_free) extern void X509_NAME_ENTRY_free( X509_NAME_ENTRY *);
+ %name(x509_name_entry_create_by_nid) extern X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID( X509_NAME_ENTRY **, int, int, unsigned char *, int);
+ %name(x509_name_entry_set_object) extern int X509_NAME_ENTRY_set_object( X509_NAME_ENTRY *, ASN1_OBJECT *);
+-%name(x509_name_entry_set_data) extern int X509_NAME_ENTRY_set_data( X509_NAME_ENTRY *, int, unsigned char *, int);
++%name(x509_name_entry_set_data) extern int X509_NAME_ENTRY_set_data( X509_NAME_ENTRY *, int, const unsigned char *, int);
+ %name(x509_name_entry_get_object) extern ASN1_OBJECT *X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *);
+ %name(x509_name_entry_get_data) extern ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *);
+ 



Home | Main Index | Thread Index | Old Index