From 7bc9c63c9da678a7e6fceb095d56c634afd22c56 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 15 Dec 2019 18:09:03 +0000 Subject: gentoo resync : 15.12.2019 --- dev-db/mysql-connector-c/Manifest | 1 - .../mysql-connector-c/files/8.0.16-libressl.patch | 302 --------------------- 2 files changed, 303 deletions(-) delete mode 100644 dev-db/mysql-connector-c/files/8.0.16-libressl.patch (limited to 'dev-db/mysql-connector-c') diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest index b6835584d118..047c69e54ad9 100644 --- a/dev-db/mysql-connector-c/Manifest +++ b/dev-db/mysql-connector-c/Manifest @@ -1,6 +1,5 @@ AUX 20028_all_mysql-5.6-gcc7.patch 603 BLAKE2B f03dc2e39dca4496cc084b427daa60014464876df456bf290a5de3431b481691a35ac9ac00d71cc86931efe3bca70dae012bedefc6d29ad7fec2feeb07cce014 SHA512 f9dab813418f38f3a877b8672cdec153d6f0f289144c35277e8275cc7a58195f974b7bf76b74f8dd2403643b1199f5e6d6bcde661ce5f79f614ff10347b52278 AUX 6.1.11-openssl-1.1.patch 8987 BLAKE2B 8bd00bb778e086cbdcd04b6ac904f36bd64bbbb332f913129eb3acbaf6da4d044fdc65523626a9fed47d6bf5859826af489bd9ae7ae51664c613c966a88708ba SHA512 46af56504ed2a69ce74a5e2040ee8b3355f5ac48fb80e4668b635f01a2650d07f50dd098ad43239e8b35a80e975a5a9549bd1b1a9c1a0612ed9e4750b537bb76 -AUX 8.0.16-libressl.patch 12591 BLAKE2B add6c31d6ea29af0b97e4f4558a006de899bf33a75ac37b20c4feb539a568a9bdec20db6bf6f3e5a64488af8740fba566d3166ea7f339f98f7c9df738bb63c71 SHA512 49ac3e698be404eb13771e3850a6b37c1f839fda1d710be7f53369d457236e14423e6d8877dfa0a580c0e700cc4c33f3fa2b5e87c9ad14e8f88899451a51a91e AUX mysql-connector-c-8.0.17-always-build-decompress-utilities.patch 819 BLAKE2B 424a30a5217aa4b1005d1991e90e75f033092c87cfadf0d2298d8f2a6819bafa24f5f1149d00ea252afb71f004069e9b4b406e801438d0f15a8077d5bcbc1561 SHA512 bf839e2a126066b78a64a7876b319507fd049cdc3a8b2855d8df27ae0c74a93f4b66d7d1db534552107cbe293a1913d51bd25ce945a6bdc47e785b3a6c3608df AUX mysql-connector-c-8.0.17-libressl.patch 10106 BLAKE2B 5ed9b5f77f35c5079ac13d855ec9de0f67769d9de20029876026064986a7c79671b607a19c6afe3cbcdc9ab14527e5618a213b4aa8953f10349e80b0ef7c21ea SHA512 7e692de4260f2a846008eca3bf8f4f59b61d2780743ded9a08d2245baf73ece360cb8b25ab4a3518b706b7dcc2915f3628122930b973ab27ec3e7bfbf120c3ed AUX mysql-connector-c-8.0.17-use-relative-include-path-for-udf_registration_types-h.patch 684 BLAKE2B 10007011b38462ffa8b539f9ac531c715fcead4e6bb1d1c04ea8055decc0aa6eda8b22e3967d91773316d04062ca231cf8561ce72ab2b5aaeaf37a0bb425c7f5 SHA512 d0e60dff5faa7b6c71878803d598b46266021029c874c8f6834d496de10ddf42d3b806fae3c6d532c1890cb5f491bbd69235bd1ac919848011a9ca57c465ce1c diff --git a/dev-db/mysql-connector-c/files/8.0.16-libressl.patch b/dev-db/mysql-connector-c/files/8.0.16-libressl.patch deleted file mode 100644 index 079211dd86f7..000000000000 --- a/dev-db/mysql-connector-c/files/8.0.16-libressl.patch +++ /dev/null @@ -1,302 +0,0 @@ -From 521750b438d96bef234b338901ff74f239b68061 Mon Sep 17 00:00:00 2001 -From: Stefan Strogin -Date: Sat, 8 Jun 2019 15:52:26 +0300 -Subject: [PATCH] Fix build with LibreSSL - -- Fix version checks as OPENSSL_VERSION_NUMBER in OpenSSL is always - 0x20000000L. -- FIPS support is removed from LibreSSL, do not use it. -- Check for TLS1_3_VERSION define, not OpenSSL/LibreSSL version. - Theoretically even OpenSSL >=1.1.1 can be built with TLS 1.3 disabled. ---- - cmake/ssl.cmake | 5 +++-- - extra/libevent/openssl-compat.h | 5 ++++- - mysys_ssl/my_md5.cc | 2 +- - .../src/bindings/xcom/xcom/xcom_ssl_transport.c | 4 ++-- - plugin/x/client/xconnection_impl.cc | 4 ++-- - router/src/http/src/tls_client_context.cc | 2 +- - router/src/http/src/tls_context.cc | 6 +++++- - router/src/http/src/tls_server_context.cc | 3 ++- - sql-common/client.cc | 3 ++- - sql/mysqld.cc | 4 ++-- - sql/sys_vars.cc | 8 ++++---- - vio/viossl.cc | 4 ++-- - vio/viosslfactories.cc | 2 +- - 13 files changed, 31 insertions(+), 21 deletions(-) - -diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake -index be3411a8916..95ed535f08a 100644 ---- a/cmake/ssl.cmake -+++ b/cmake/ssl.cmake -@@ -313,13 +313,14 @@ MACRO (MYSQL_CHECK_SSL) - OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}" - ) - ENDIF() -- IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0") -+ CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION) -+ IF(HAVE_TLS1_3_VERSION) - ADD_DEFINITIONS(-DHAVE_TLSv13) - ENDIF() - IF(OPENSSL_INCLUDE_DIR AND - OPENSSL_LIBRARY AND - CRYPTO_LIBRARY AND -- OPENSSL_MAJOR_VERSION STREQUAL "1" -+ OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1" - ) - SET(OPENSSL_FOUND TRUE) - FIND_PROGRAM(OPENSSL_EXECUTABLE openssl -diff --git a/extra/libevent/openssl-compat.h b/extra/libevent/openssl-compat.h -index 69afc716e25..deb21d6ad77 100644 ---- a/extra/libevent/openssl-compat.h -+++ b/extra/libevent/openssl-compat.h -@@ -24,7 +24,6 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name) - #define BIO_set_init(b, val) (b)->init = (val) - #define BIO_set_data(b, val) (b)->ptr = (val) - #define BIO_set_shutdown(b, val) (b)->shutdown = (val) --#define BIO_get_init(b) (b)->init - #define BIO_get_data(b) (b)->ptr - #define BIO_get_shutdown(b) (b)->shutdown - -@@ -32,4 +31,8 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name) - - #endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) -+#define BIO_get_init(b) (b)->init -+#endif -+ - #endif /* OPENSSL_COMPAT_H */ -diff --git a/mysys_ssl/my_md5.cc b/mysys_ssl/my_md5.cc -index 095fcb4eafb..0bdc885a96d 100644 ---- a/mysys_ssl/my_md5.cc -+++ b/mysys_ssl/my_md5.cc -@@ -56,7 +56,7 @@ static void my_md5_hash(unsigned char *digest, unsigned const char *buf, - int compute_md5_hash(char *digest, const char *buf, int len) { - int retval = 0; - int fips_mode = 0; --#if !defined(HAVE_WOLFSSL) -+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) - fips_mode = FIPS_mode(); - #endif /* HAVE_WOLFSSL */ - /* If fips mode is ON/STRICT restricted method calls will result into abort, -diff --git a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c -index 67c151b207b..6a18a717b23 100644 ---- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c -+++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c -@@ -297,7 +297,7 @@ error: - return 1; - } - --#ifndef HAVE_WOLFSSL -+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) - #define OPENSSL_ERROR_LENGTH 512 - static int configure_ssl_fips_mode(const uint fips_mode) { - int rc = -1; -@@ -521,7 +521,7 @@ int xcom_init_ssl(const char *server_key_file, const char *server_cert_file, - int verify_server = SSL_VERIFY_NONE; - int verify_client = SSL_VERIFY_NONE; - --#ifndef HAVE_WOLFSSL -+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) - if (configure_ssl_fips_mode(ssl_fips_mode) != 1) { - G_ERROR("Error setting the ssl fips mode"); - goto error; -diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc -index cab1836c34f..4ba28d8fb5f 100644 ---- a/plugin/x/client/xconnection_impl.cc -+++ b/plugin/x/client/xconnection_impl.cc -@@ -489,7 +489,7 @@ XError Connection_impl::get_ssl_error(const int error_id) { - return XError(CR_SSL_CONNECTION_ERROR, buffer); - } - --#ifndef HAVE_WOLFSSL -+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) - /** - Set fips mode in openssl library, - When we set fips mode ON/STRICT, it will perform following operations: -@@ -539,7 +539,7 @@ XError Connection_impl::activate_tls() { - if (!m_context->m_ssl_config.is_configured()) - return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED}; - --#ifndef HAVE_WOLFSSL -+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) - char err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; - if (set_fips_mode((int)m_context->m_ssl_config.m_ssl_fips_mode, err_string) != - 1) { -diff --git a/router/src/http/src/tls_client_context.cc b/router/src/http/src/tls_client_context.cc -index f9dff94d837..ae7413b43e9 100644 ---- a/router/src/http/src/tls_client_context.cc -+++ b/router/src/http/src/tls_client_context.cc -@@ -54,7 +54,7 @@ void TlsClientContext::verify(TlsVerify verify) { - - void TlsClientContext::cipher_suites(const std::string &ciphers) { - // TLSv1.3 ciphers are controlled via SSL_CTX_set_ciphersuites() --#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1) -+#ifdef TLS1_3_VERSION - if (1 != SSL_CTX_set_ciphersuites(ssl_ctx_.get(), ciphers.c_str())) { - throw TlsError("set-cipher-suites"); - } -diff --git a/router/src/http/src/tls_context.cc b/router/src/http/src/tls_context.cc -index bae36860fea..2cdc31274b6 100644 ---- a/router/src/http/src/tls_context.cc -+++ b/router/src/http/src/tls_context.cc -@@ -92,7 +92,7 @@ static constexpr int o11x_version(TlsVersion version) { - return TLS1_1_VERSION; - case TlsVersion::TLS_1_2: - return TLS1_2_VERSION; --#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1) -+#ifdef TLS1_3_VERSION - case TlsVersion::TLS_1_3: - return TLS1_3_VERSION; - #endif -@@ -122,9 +122,11 @@ void TlsContext::version_range(TlsVersion min_version, TlsVersion max_version) { - default: - // unknown, leave all disabled - // fallthrough -+#ifdef TLS1_3_VERSION - case TlsVersion::TLS_1_3: - opts |= SSL_OP_NO_TLSv1_2; - // fallthrough -+#endif - case TlsVersion::TLS_1_2: - opts |= SSL_OP_NO_TLSv1_1; - // fallthrough -@@ -171,8 +173,10 @@ TlsVersion TlsContext::min_version() const { - return TlsVersion::TLS_1_1; - case TLS1_2_VERSION: - return TlsVersion::TLS_1_2; -+#ifdef TLS1_3_VERSION - case TLS1_3_VERSION: - return TlsVersion::TLS_1_3; -+#endif - case 0: - return TlsVersion::AUTO; - default: -diff --git a/router/src/http/src/tls_server_context.cc b/router/src/http/src/tls_server_context.cc -index 4f3fa39cd28..ecc9755979b 100644 ---- a/router/src/http/src/tls_server_context.cc -+++ b/router/src/http/src/tls_server_context.cc -@@ -162,7 +162,8 @@ void TlsServerContext::init_tmp_dh(const std::string &dh_params) { - } - - } else { --#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) -+#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \ -+ !defined(LIBRESSL_VERSION_NUMBER) - dh2048.reset(DH_get_2048_256()); - #else - /* -diff --git a/sql-common/client.cc b/sql-common/client.cc -index d6d977970b7..af68f04104d 100644 ---- a/sql-common/client.cc -+++ b/sql-common/client.cc -@@ -7515,7 +7515,8 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option, - #endif - break; - case MYSQL_OPT_SSL_FIPS_MODE: { --#if defined(HAVE_OPENSSL) && !defined(HAVE_WOLFSSL) -+#if defined(HAVE_OPENSSL) && \ -+ !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) - char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; - ENSURE_EXTENSIONS_PRESENT(&mysql->options); - mysql->options.extension->ssl_fips_mode = *(uint *)arg; -diff --git a/sql/mysqld.cc b/sql/mysqld.cc -index 13479e3c474..904bae80f8f 100644 ---- a/sql/mysqld.cc -+++ b/sql/mysqld.cc -@@ -4640,7 +4640,7 @@ static int init_thread_environment() { - - static PSI_memory_key key_memory_openssl = PSI_NOT_INSTRUMENTED; - --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) - #define FILE_LINE_ARGS - #else - #define FILE_LINE_ARGS , const char *, int -@@ -4676,7 +4676,7 @@ static void init_ssl() { - } - - static int init_ssl_communication() { --#ifndef HAVE_WOLFSSL -+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) - char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; - int ret_fips_mode = set_fips_mode(opt_ssl_fips_mode, ssl_err_string); - if (ret_fips_mode != 1) { -diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc -index b511c453f1e..8952922c1ff 100644 ---- a/sql/sys_vars.cc -+++ b/sql/sys_vars.cc -@@ -4282,7 +4282,7 @@ static Sys_var_ulong Sys_max_execution_time( - HINT_UPDATEABLE SESSION_VAR(max_execution_time), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1)); - --#ifndef HAVE_WOLFSSL -+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) - static bool update_fips_mode(sys_var *, THD *, enum_var_type) { - char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; - if (set_fips_mode(opt_ssl_fips_mode, ssl_err_string) != 1) { -@@ -4295,7 +4295,7 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) { - } - #endif - --#ifdef HAVE_WOLFSSL -+#if defined(HAVE_WOLFSSL) || defined(LIBRESSL_VERSION_NUMBER) - static const char *ssl_fips_mode_names[] = {"OFF", 0}; - #else - static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", 0}; -@@ -4303,7 +4303,7 @@ static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", 0}; - static Sys_var_enum Sys_ssl_fips_mode( - "ssl_fips_mode", - "SSL FIPS mode (applies only for OpenSSL); " --#ifndef HAVE_WOLFSSL -+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) - "permitted values are: OFF, ON, STRICT", - #else - "permitted values are: OFF", -@@ -4311,7 +4311,7 @@ static Sys_var_enum Sys_ssl_fips_mode( - GLOBAL_VAR(opt_ssl_fips_mode), CMD_LINE(REQUIRED_ARG, OPT_SSL_FIPS_MODE), - ssl_fips_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG, - ON_CHECK(NULL), --#ifndef HAVE_WOLFSSL -+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) - ON_UPDATE(update_fips_mode), - #else - ON_UPDATE(NULL), -diff --git a/vio/viossl.cc b/vio/viossl.cc -index 97335eef321..e34b973f59e 100644 ---- a/vio/viossl.cc -+++ b/vio/viossl.cc -@@ -507,7 +507,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, - #if !defined(HAVE_WOLFSSL) && !defined(DBUG_OFF) - { - STACK_OF(SSL_COMP) *ssl_comp_methods = NULL; -- ssl_comp_methods = SSL_COMP_get_compression_methods(); -+ ssl_comp_methods = (STACK_OF(SSL_COMP) *)SSL_COMP_get_compression_methods(); - n = sk_SSL_COMP_num(ssl_comp_methods); - DBUG_PRINT("info", ("Available compression methods:\n")); - if (n == 0) -@@ -515,7 +515,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, - else - for (j = 0; j < n; j++) { - SSL_COMP *c = sk_SSL_COMP_value(ssl_comp_methods, j); --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) - DBUG_PRINT("info", (" %d: %s\n", c->id, c->name)); - #else /* OPENSSL_VERSION_NUMBER < 0x10100000L */ - DBUG_PRINT("info", -diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc -index 1a88dc3ed1d..a273c9991e7 100644 ---- a/vio/viosslfactories.cc -+++ b/vio/viosslfactories.cc -@@ -429,7 +429,7 @@ void ssl_start() { - } - } - --#ifndef HAVE_WOLFSSL -+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) - /** - Set fips mode in openssl library, - When we set fips mode ON/STRICT, it will perform following operations: --- -2.22.0 - -- cgit v1.2.3