1 |
commit: d8579d0f043e8eefe774b8aec6a21316e0a6c527 |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 29 20:50:02 2017 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 29 20:50:27 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8579d0f |
7 |
|
8 |
net-nds/openldap: Add patch to build with libressl-2.5.4 and call to epatch_user |
9 |
|
10 |
Patch pulled from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219781 |
11 |
|
12 |
Gentoo-Bug: 622464 |
13 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
14 |
|
15 |
.../openldap/files/openldap-2.4.45-libressl.patch | 65 ++++++++++++++++++++++ |
16 |
net-nds/openldap/openldap-2.4.45.ebuild | 5 ++ |
17 |
2 files changed, 70 insertions(+) |
18 |
|
19 |
diff --git a/net-nds/openldap/files/openldap-2.4.45-libressl.patch b/net-nds/openldap/files/openldap-2.4.45-libressl.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..20a65a4e0fd |
22 |
--- /dev/null |
23 |
+++ b/net-nds/openldap/files/openldap-2.4.45-libressl.patch |
24 |
@@ -0,0 +1,65 @@ |
25 |
+--- libraries/libldap/tls_o.c.orig 2017-06-04 16:31:28 UTC |
26 |
++++ libraries/libldap/tls_o.c |
27 |
+@@ -47,7 +47,7 @@ |
28 |
+ #include <ssl.h> |
29 |
+ #endif |
30 |
+ |
31 |
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000 |
32 |
++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) |
33 |
+ #define ASN1_STRING_data(x) ASN1_STRING_get0_data(x) |
34 |
+ #endif |
35 |
+ |
36 |
+@@ -157,7 +157,7 @@ tlso_init( void ) |
37 |
+ (void) tlso_seed_PRNG( lo->ldo_tls_randfile ); |
38 |
+ #endif |
39 |
+ |
40 |
+-#if OPENSSL_VERSION_NUMBER < 0x10100000 |
41 |
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) |
42 |
+ SSL_load_error_strings(); |
43 |
+ SSL_library_init(); |
44 |
+ OpenSSL_add_all_digests(); |
45 |
+@@ -205,7 +205,7 @@ static void |
46 |
+ tlso_ctx_ref( tls_ctx *ctx ) |
47 |
+ { |
48 |
+ tlso_ctx *c = (tlso_ctx *)ctx; |
49 |
+-#if OPENSSL_VERSION_NUMBER < 0x10100000 |
50 |
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) |
51 |
+ #define SSL_CTX_up_ref(ctx) CRYPTO_add( &(ctx->references), 1, CRYPTO_LOCK_SSL_CTX ) |
52 |
+ #endif |
53 |
+ SSL_CTX_up_ref( c ); |
54 |
+@@ -464,7 +464,7 @@ tlso_session_my_dn( tls_session *sess, struct berval * |
55 |
+ if (!x) return LDAP_INVALID_CREDENTIALS; |
56 |
+ |
57 |
+ xn = X509_get_subject_name(x); |
58 |
+-#if OPENSSL_VERSION_NUMBER < 0x10100000 |
59 |
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) |
60 |
+ der_dn->bv_len = i2d_X509_NAME( xn, NULL ); |
61 |
+ der_dn->bv_val = xn->bytes->data; |
62 |
+ #else |
63 |
+@@ -500,7 +500,7 @@ tlso_session_peer_dn( tls_session *sess, struct berval |
64 |
+ return LDAP_INVALID_CREDENTIALS; |
65 |
+ |
66 |
+ xn = X509_get_subject_name(x); |
67 |
+-#if OPENSSL_VERSION_NUMBER < 0x10100000 |
68 |
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) |
69 |
+ der_dn->bv_len = i2d_X509_NAME( xn, NULL ); |
70 |
+ der_dn->bv_val = xn->bytes->data; |
71 |
+ #else |
72 |
+@@ -721,7 +721,7 @@ struct tls_data { |
73 |
+ Sockbuf_IO_Desc *sbiod; |
74 |
+ }; |
75 |
+ |
76 |
+-#if OPENSSL_VERSION_NUMBER < 0x10100000 |
77 |
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) |
78 |
+ #define BIO_set_init(b, x) b->init = x |
79 |
+ #define BIO_set_data(b, x) b->ptr = x |
80 |
+ #define BIO_clear_flags(b, x) b->flags &= ~(x) |
81 |
+@@ -822,7 +822,7 @@ tlso_bio_puts( BIO *b, const char *str ) |
82 |
+ return tlso_bio_write( b, str, strlen( str ) ); |
83 |
+ } |
84 |
+ |
85 |
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000 |
86 |
++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) |
87 |
+ struct bio_method_st { |
88 |
+ int type; |
89 |
+ const char *name; |
90 |
|
91 |
diff --git a/net-nds/openldap/openldap-2.4.45.ebuild b/net-nds/openldap/openldap-2.4.45.ebuild |
92 |
index e81d3543054..0ead191e540 100644 |
93 |
--- a/net-nds/openldap/openldap-2.4.45.ebuild |
94 |
+++ b/net-nds/openldap/openldap-2.4.45.ebuild |
95 |
@@ -344,10 +344,15 @@ src_prepare() { |
96 |
# bug #420959 |
97 |
epatch "${FILESDIR}"/${PN}-2.4.31-gcc47.patch |
98 |
|
99 |
+ # bug #622464 |
100 |
+ epatch "${FILESDIR}"/${PN}-2.4.45-libressl.patch |
101 |
+ |
102 |
# unbundle lmdb |
103 |
epatch "${FILESDIR}"/${PN}-2.4.42-mdb-unbundle.patch |
104 |
rm -rf "${S}"/libraries/liblmdb |
105 |
|
106 |
+ epatch_user |
107 |
+ |
108 |
cd "${S}"/build || die |
109 |
einfo "Making sure upstream build strip does not do stripping too early" |
110 |
sed -i.orig \ |