From 6637f64866ca9a3a286a5667a11c54eaf8843d62 Mon Sep 17 00:00:00 2001 From: sthen Date: Sat, 24 Jul 2021 20:02:04 +0000 Subject: [PATCH] update to py-M2Crypto-0.38.0, tweak/ok tb@ --- security/py-M2Crypto/Makefile | 6 ++-- security/py-M2Crypto/distinfo | 4 +-- .../py-M2Crypto/patches/patch-SWIG__bio_i | 34 ------------------- ...rypto_BIO_py => patch-src_M2Crypto_BIO_py} | 8 ++--- .../py-M2Crypto/patches/patch-src_SWIG__bio_i | 17 ++++++++++ ...atch-SWIG__evp_i => patch-src_SWIG__evp_i} | 8 ++--- ...ompat_i => patch-src_SWIG__lib11_compat_i} | 8 ++--- ...atch-SWIG__lib_i => patch-src_SWIG__lib_i} | 10 +++--- ...atch-SWIG__ssl_i => patch-src_SWIG__ssl_i} | 8 ++--- ...G__threads_i => patch-src_SWIG__threads_i} | 8 ++--- ...at_h => patch-src_SWIG_libcrypto-compat_h} | 8 ++--- security/py-M2Crypto/pkg/PLIST | 4 +-- 12 files changed, 54 insertions(+), 69 deletions(-) delete mode 100644 security/py-M2Crypto/patches/patch-SWIG__bio_i rename security/py-M2Crypto/patches/{patch-M2Crypto_BIO_py => patch-src_M2Crypto_BIO_py} (91%) create mode 100644 security/py-M2Crypto/patches/patch-src_SWIG__bio_i rename security/py-M2Crypto/patches/{patch-SWIG__evp_i => patch-src_SWIG__evp_i} (73%) rename security/py-M2Crypto/patches/{patch-SWIG__lib11_compat_i => patch-src_SWIG__lib11_compat_i} (56%) rename security/py-M2Crypto/patches/{patch-SWIG__lib_i => patch-src_SWIG__lib_i} (74%) rename security/py-M2Crypto/patches/{patch-SWIG__ssl_i => patch-src_SWIG__ssl_i} (73%) rename security/py-M2Crypto/patches/{patch-SWIG__threads_i => patch-src_SWIG__threads_i} (92%) rename security/py-M2Crypto/patches/{patch-SWIG_libcrypto-compat_h => patch-src_SWIG_libcrypto-compat_h} (59%) diff --git a/security/py-M2Crypto/Makefile b/security/py-M2Crypto/Makefile index 0621cb9182b..604380524e8 100644 --- a/security/py-M2Crypto/Makefile +++ b/security/py-M2Crypto/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.31 2021/05/03 11:47:33 jasper Exp $ +# $OpenBSD: Makefile,v 1.32 2021/07/24 20:02:04 sthen Exp $ COMMENT = crypto and ssl toolkit for python -MODPY_EGG_VERSION = 0.37.1 +MODPY_EGG_VERSION = 0.38.0 DISTNAME = M2Crypto-${MODPY_EGG_VERSION} PKGNAME = py-${DISTNAME} @@ -27,4 +27,6 @@ MAKE_ENV = SWIG_FEATURES=-I/usr/include BUILD_DEPENDS = devel/swig +# XXX tests need "parameterized", dep was added in 0.37.0 + .include diff --git a/security/py-M2Crypto/distinfo b/security/py-M2Crypto/distinfo index 59215e2838e..15cda43c4c9 100644 --- a/security/py-M2Crypto/distinfo +++ b/security/py-M2Crypto/distinfo @@ -1,2 +1,2 @@ -SHA256 (M2Crypto-0.37.1.tar.gz) = 5OQvBot4zL8RPl0Kcq5fSA9sOs5JQLkeT/9VmM//b7M= -SIZE (M2Crypto-0.37.1.tar.gz) = 1247031 +SHA256 (M2Crypto-0.38.0.tar.gz) = mfImCjCQHJSajcbV+CzVMS/7iryS52YzuvIxu7yy3ss= +SIZE (M2Crypto-0.38.0.tar.gz) = 1241269 diff --git a/security/py-M2Crypto/patches/patch-SWIG__bio_i b/security/py-M2Crypto/patches/patch-SWIG__bio_i deleted file mode 100644 index 685c3b3f3ad..00000000000 --- a/security/py-M2Crypto/patches/patch-SWIG__bio_i +++ /dev/null @@ -1,34 +0,0 @@ -$OpenBSD: patch-SWIG__bio_i,v 1.4 2018/04/25 16:51:05 jasper Exp $ - -BIO_meth_new() and BIO_meth_free() are non-static in LibreSSL - -Index: SWIG/_bio.i ---- SWIG/_bio.i.orig -+++ SWIG/_bio.i -@@ -293,8 +293,12 @@ int bio_should_write(BIO* a) { - } - - /* Macros for things not defined before 1.1.0 */ --#if OPENSSL_VERSION_NUMBER < 0x10100000L --static BIO_METHOD * -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) -+ -+#if !defined(LIBRESSL_VERSION_NUMBER) -+static -+#endif -+BIO_METHOD * - BIO_meth_new( int type, const char *name ) - { - BIO_METHOD *method = malloc( sizeof(BIO_METHOD) ); -@@ -306,7 +310,10 @@ BIO_meth_new( int type, const char *name ) - return method; - } - --static void -+#if !defined(LIBRESSL_VERSION_NUMBER) -+static -+#endif -+void - BIO_meth_free( BIO_METHOD *meth ) - { - if ( meth == NULL ) { diff --git a/security/py-M2Crypto/patches/patch-M2Crypto_BIO_py b/security/py-M2Crypto/patches/patch-src_M2Crypto_BIO_py similarity index 91% rename from security/py-M2Crypto/patches/patch-M2Crypto_BIO_py rename to security/py-M2Crypto/patches/patch-src_M2Crypto_BIO_py index 151059ff398..a6cd9bcb304 100644 --- a/security/py-M2Crypto/patches/patch-M2Crypto_BIO_py +++ b/security/py-M2Crypto/patches/patch-src_M2Crypto_BIO_py @@ -1,4 +1,4 @@ -$OpenBSD: patch-M2Crypto_BIO_py,v 1.2 2018/04/25 16:49:20 jasper Exp $ +$OpenBSD: patch-src_M2Crypto_BIO_py,v 1.1 2021/07/24 20:02:04 sthen Exp $ Partially revert https://gitlab.com/m2crypto/m2crypto/commit/738cd0bf3dc2ee619f598290d5bf4c2190987f16: @@ -19,9 +19,9 @@ IOError: [Errno 9] Bad file descriptor https://gitlab.com/m2crypto/m2crypto/issues/211 -Index: M2Crypto/BIO.py ---- M2Crypto/BIO.py.orig -+++ M2Crypto/BIO.py +Index: src/M2Crypto/BIO.py +--- src/M2Crypto/BIO.py.orig ++++ src/M2Crypto/BIO.py @@ -235,8 +235,9 @@ class File(BIO): # # https://docs.python.org/3.3/c-api/file.html diff --git a/security/py-M2Crypto/patches/patch-src_SWIG__bio_i b/security/py-M2Crypto/patches/patch-src_SWIG__bio_i new file mode 100644 index 00000000000..37cdf87eba7 --- /dev/null +++ b/security/py-M2Crypto/patches/patch-src_SWIG__bio_i @@ -0,0 +1,17 @@ +$OpenBSD: patch-src_SWIG__bio_i,v 1.1 2021/07/24 20:02:04 sthen Exp $ + +LibreSSL doesn't have BIO_get_init() + +Index: src/SWIG/_bio.i +--- src/SWIG/_bio.i.orig ++++ src/SWIG/_bio.i +@@ -330,6 +330,9 @@ BIO_meth_free( BIO_METHOD *meth ) + #define BIO_clear_flags(b, x) b->flags &= ~(x) + #define BIO_get_data(b) b->ptr + #endif ++#if defined(LIBRESSL_VERSION_NUMBER) ++#define BIO_get_init(b) (b)->init ++#endif + + /* implment custom BIO_s_pyfd */ + diff --git a/security/py-M2Crypto/patches/patch-SWIG__evp_i b/security/py-M2Crypto/patches/patch-src_SWIG__evp_i similarity index 73% rename from security/py-M2Crypto/patches/patch-SWIG__evp_i rename to security/py-M2Crypto/patches/patch-src_SWIG__evp_i index d64b9a97e6c..2043b40ea74 100644 --- a/security/py-M2Crypto/patches/patch-SWIG__evp_i +++ b/security/py-M2Crypto/patches/patch-src_SWIG__evp_i @@ -1,10 +1,10 @@ -$OpenBSD: patch-SWIG__evp_i,v 1.1 2017/10/09 05:57:38 ajacoutot Exp $ +$OpenBSD: patch-src_SWIG__evp_i,v 1.1 2021/07/24 20:02:04 sthen Exp $ Fix build with LibreSSL -Index: SWIG/_evp.i ---- SWIG/_evp.i.orig -+++ SWIG/_evp.i +Index: src/SWIG/_evp.i +--- src/SWIG/_evp.i.orig ++++ src/SWIG/_evp.i @@ -19,7 +19,7 @@ Copyright (c) 2009-2010 Heikki Toivonen. All rights re #include #include diff --git a/security/py-M2Crypto/patches/patch-SWIG__lib11_compat_i b/security/py-M2Crypto/patches/patch-src_SWIG__lib11_compat_i similarity index 56% rename from security/py-M2Crypto/patches/patch-SWIG__lib11_compat_i rename to security/py-M2Crypto/patches/patch-src_SWIG__lib11_compat_i index 25a4cc6e707..5eee4d69273 100644 --- a/security/py-M2Crypto/patches/patch-SWIG__lib11_compat_i +++ b/security/py-M2Crypto/patches/patch-src_SWIG__lib11_compat_i @@ -1,10 +1,10 @@ -$OpenBSD: patch-SWIG__lib11_compat_i,v 1.1 2017/10/09 05:57:38 ajacoutot Exp $ +$OpenBSD: patch-src_SWIG__lib11_compat_i,v 1.1 2021/07/24 20:02:04 sthen Exp $ Fix build with LibreSSL -Index: SWIG/_lib11_compat.i ---- SWIG/_lib11_compat.i.orig -+++ SWIG/_lib11_compat.i +Index: src/SWIG/_lib11_compat.i +--- src/SWIG/_lib11_compat.i.orig ++++ src/SWIG/_lib11_compat.i @@ -8,7 +8,7 @@ */ diff --git a/security/py-M2Crypto/patches/patch-SWIG__lib_i b/security/py-M2Crypto/patches/patch-src_SWIG__lib_i similarity index 74% rename from security/py-M2Crypto/patches/patch-SWIG__lib_i rename to security/py-M2Crypto/patches/patch-src_SWIG__lib_i index 329a5a163b7..b311fbc4ff9 100644 --- a/security/py-M2Crypto/patches/patch-SWIG__lib_i +++ b/security/py-M2Crypto/patches/patch-src_SWIG__lib_i @@ -1,10 +1,10 @@ -$OpenBSD: patch-SWIG__lib_i,v 1.5 2021/05/03 11:47:34 jasper Exp $ +$OpenBSD: patch-src_SWIG__lib_i,v 1.1 2021/07/24 20:02:04 sthen Exp $ Fix build with LibreSSL -Index: SWIG/_lib.i ---- SWIG/_lib.i.orig -+++ SWIG/_lib.i +Index: src/SWIG/_lib.i +--- src/SWIG/_lib.i.orig ++++ src/SWIG/_lib.i @@ -21,7 +21,7 @@ %{ @@ -14,7 +14,7 @@ Index: SWIG/_lib.i typedef void (*OPENSSL_sk_freefunc)(void *); typedef void *(*OPENSSL_sk_copyfunc)(const void *); typedef struct stack_st OPENSSL_STACK; -@@ -536,7 +536,7 @@ int passphrase_callback(char *buf, int num, int v, voi +@@ -532,7 +532,7 @@ int passphrase_callback(char *buf, int num, int v, voi %inline %{ void lib_init() { diff --git a/security/py-M2Crypto/patches/patch-SWIG__ssl_i b/security/py-M2Crypto/patches/patch-src_SWIG__ssl_i similarity index 73% rename from security/py-M2Crypto/patches/patch-SWIG__ssl_i rename to security/py-M2Crypto/patches/patch-src_SWIG__ssl_i index e2bd5de0400..c657ce67295 100644 --- a/security/py-M2Crypto/patches/patch-SWIG__ssl_i +++ b/security/py-M2Crypto/patches/patch-src_SWIG__ssl_i @@ -1,10 +1,10 @@ -$OpenBSD: patch-SWIG__ssl_i,v 1.10 2020/07/17 17:47:30 jasper Exp $ +$OpenBSD: patch-src_SWIG__ssl_i,v 1.1 2021/07/24 20:02:04 sthen Exp $ Fix build with LibreSSL -Index: SWIG/_ssl.i ---- SWIG/_ssl.i.orig -+++ SWIG/_ssl.i +Index: src/SWIG/_ssl.i +--- src/SWIG/_ssl.i.orig ++++ src/SWIG/_ssl.i @@ -265,7 +265,7 @@ void ssl_init(PyObject *ssl_err, PyObject *ssl_timeout } diff --git a/security/py-M2Crypto/patches/patch-SWIG__threads_i b/security/py-M2Crypto/patches/patch-src_SWIG__threads_i similarity index 92% rename from security/py-M2Crypto/patches/patch-SWIG__threads_i rename to security/py-M2Crypto/patches/patch-src_SWIG__threads_i index 917b6b1c7d9..439193b181e 100644 --- a/security/py-M2Crypto/patches/patch-SWIG__threads_i +++ b/security/py-M2Crypto/patches/patch-src_SWIG__threads_i @@ -1,10 +1,10 @@ -$OpenBSD: patch-SWIG__threads_i,v 1.1 2017/10/09 05:57:38 ajacoutot Exp $ +$OpenBSD: patch-src_SWIG__threads_i,v 1.1 2021/07/24 20:02:04 sthen Exp $ Fix build with LibreSSL -Index: SWIG/_threads.i ---- SWIG/_threads.i.orig -+++ SWIG/_threads.i +Index: src/SWIG/_threads.i +--- src/SWIG/_threads.i.orig ++++ src/SWIG/_threads.i @@ -5,7 +5,7 @@ #include #include diff --git a/security/py-M2Crypto/patches/patch-SWIG_libcrypto-compat_h b/security/py-M2Crypto/patches/patch-src_SWIG_libcrypto-compat_h similarity index 59% rename from security/py-M2Crypto/patches/patch-SWIG_libcrypto-compat_h rename to security/py-M2Crypto/patches/patch-src_SWIG_libcrypto-compat_h index d3eae0fc21e..54469abf908 100644 --- a/security/py-M2Crypto/patches/patch-SWIG_libcrypto-compat_h +++ b/security/py-M2Crypto/patches/patch-src_SWIG_libcrypto-compat_h @@ -1,10 +1,10 @@ -$OpenBSD: patch-SWIG_libcrypto-compat_h,v 1.1 2017/10/09 05:57:38 ajacoutot Exp $ +$OpenBSD: patch-src_SWIG_libcrypto-compat_h,v 1.1 2021/07/24 20:02:04 sthen Exp $ Fix build with LibreSSL -Index: SWIG/libcrypto-compat.h ---- SWIG/libcrypto-compat.h.orig -+++ SWIG/libcrypto-compat.h +Index: src/SWIG/libcrypto-compat.h +--- src/SWIG/libcrypto-compat.h.orig ++++ src/SWIG/libcrypto-compat.h @@ -1,7 +1,7 @@ #ifndef LIBCRYPTO_COMPAT_H #define LIBCRYPTO_COMPAT_H diff --git a/security/py-M2Crypto/pkg/PLIST b/security/py-M2Crypto/pkg/PLIST index b5735f57e30..08e5c208211 100644 --- a/security/py-M2Crypto/pkg/PLIST +++ b/security/py-M2Crypto/pkg/PLIST @@ -1,11 +1,11 @@ -@comment $OpenBSD: PLIST,v 1.10 2021/05/03 11:47:34 jasper Exp $ +@comment $OpenBSD: PLIST,v 1.11 2021/07/24 20:02:04 sthen Exp $ @pkgpath security/py-M2Crypto lib/python${MODPY_VERSION}/site-packages/M2Crypto/ lib/python${MODPY_VERSION}/site-packages/M2Crypto-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/ lib/python${MODPY_VERSION}/site-packages/M2Crypto-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/PKG-INFO lib/python${MODPY_VERSION}/site-packages/M2Crypto-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/SOURCES.txt lib/python${MODPY_VERSION}/site-packages/M2Crypto-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/dependency_links.txt -lib/python${MODPY_VERSION}/site-packages/M2Crypto-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/requires.txt +lib/python${MODPY_VERSION}/site-packages/M2Crypto-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/not-zip-safe lib/python${MODPY_VERSION}/site-packages/M2Crypto-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt lib/python${MODPY_VERSION}/site-packages/M2Crypto/ASN1.py lib/python${MODPY_VERSION}/site-packages/M2Crypto/AuthCookie.py