Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/cryptography/files/, dev-python/cryptography/
Date: Wed, 02 Mar 2016 03:18:37
Message-Id: 1456888701.223f004279c64d8abffa2e3a051f9f8e23131f1e.floppym@gentoo
1 commit: 223f004279c64d8abffa2e3a051f9f8e23131f1e
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 2 03:16:53 2016 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 2 03:18:21 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=223f0042
7
8 dev-python/cryptography: Backport openssl 1.0.2g fix to stable ebuild
9
10 The replaces the patch by zx2c4 with a more flexible patch
11 from upstream. This ensures that the package can build against any
12 version of openssl in the tree.
13
14 Package-Manager: portage-2.2.27_p64
15
16 dev-python/cryptography/cryptography-1.1.2.ebuild | 4 ++-
17 ...cryptography-1.2.2-openssl-1.0.2g-mem_buf.patch | 29 ++++++++++++++++++----
18 2 files changed, 27 insertions(+), 6 deletions(-)
19
20 diff --git a/dev-python/cryptography/cryptography-1.1.2.ebuild b/dev-python/cryptography/cryptography-1.1.2.ebuild
21 index 0556b6a..cfd7541 100644
22 --- a/dev-python/cryptography/cryptography-1.1.2.ebuild
23 +++ b/dev-python/cryptography/cryptography-1.1.2.ebuild
24 @@ -1,4 +1,4 @@
25 -# Copyright 1999-2015 Gentoo Foundation
26 +# Copyright 1999-2016 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 # $Id$
29
30 @@ -43,6 +43,8 @@ DEPEND="${RDEPEND}
31
32 DOCS=( AUTHORS.rst CONTRIBUTING.rst README.rst )
33
34 +PATCHES=( "${FILESDIR}/${PN}-1.2.2-openssl-1.0.2g-mem_buf.patch" )
35 +
36 python_test() {
37 py.test -v -v -x || die "Tests fail with ${EPYTHON}"
38 }
39
40 diff --git a/dev-python/cryptography/files/cryptography-1.2.2-openssl-1.0.2g-mem_buf.patch b/dev-python/cryptography/files/cryptography-1.2.2-openssl-1.0.2g-mem_buf.patch
41 index 64d270b..fbe690e 100644
42 --- a/dev-python/cryptography/files/cryptography-1.2.2-openssl-1.0.2g-mem_buf.patch
43 +++ b/dev-python/cryptography/files/cryptography-1.2.2-openssl-1.0.2g-mem_buf.patch
44 @@ -1,12 +1,31 @@
45 -diff -ru cryptography-1.2.2/src/_cffi_src/openssl/bio.py cryptography-1.2.2-fixed/src/_cffi_src/openssl/bio.py
46 ---- cryptography-1.2.2/src/_cffi_src/openssl/bio.py 2016-01-29 20:26:11.000000000 +0100
47 -+++ cryptography-1.2.2-fixed/src/_cffi_src/openssl/bio.py 2016-03-01 20:32:25.172776288 +0100
48 -@@ -99,7 +99,7 @@
49 +From df779dfec9ce87b79e48448aea3c597a4716b29e Mon Sep 17 00:00:00 2001
50 +From: Paul Kehrer <paul.l.kehrer@×××××.com>
51 +Date: Tue, 1 Mar 2016 14:22:32 -0600
52 +Subject: [PATCH] move BIO_new_mem_buf to macros to handle 1.0.2g signature
53 + change
54 +
55 +---
56 + src/_cffi_src/openssl/bio.py | 3 ++-
57 + 1 file changed, 2 insertions(+), 1 deletion(-)
58 +
59 +diff --git a/src/_cffi_src/openssl/bio.py b/src/_cffi_src/openssl/bio.py
60 +index ac86683..6439e63 100644
61 +--- a/src/_cffi_src/openssl/bio.py
62 ++++ b/src/_cffi_src/openssl/bio.py
63 +@@ -99,7 +99,6 @@
64 BIO *BIO_next(BIO *);
65 BIO *BIO_find_type(BIO *, int);
66 BIO_METHOD *BIO_s_mem(void);
67 -BIO *BIO_new_mem_buf(void *, int);
68 -+BIO *BIO_new_mem_buf(const void *, int);
69 BIO_METHOD *BIO_s_file(void);
70 BIO *BIO_new_file(const char *, const char *);
71 BIO *BIO_new_fp(FILE *, int);
72 +@@ -127,6 +126,8 @@
73 + """
74 +
75 + MACROS = """
76 ++/* BIO_new_mem_buf became const void * in 1.0.2g */
77 ++BIO *BIO_new_mem_buf(void *, int);
78 + long BIO_set_fd(BIO *, long, int);
79 + long BIO_get_fd(BIO *, char *);
80 + long BIO_set_mem_eof_return(BIO *, int);