* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/, dev-db/mysql-connector-c/files/
@ 2015-08-11 19:52 Brian Evans
0 siblings, 0 replies; 9+ messages in thread
From: Brian Evans @ 2015-08-11 19:52 UTC (permalink / raw
To: gentoo-commits
commit: d5582b7db025e9b136fa4a8f9f300cc08c0ef90b
Author: Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 11 19:55:22 2015 +0000
Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Aug 11 19:55:22 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5582b7d
dev-db/mysql-connector-c Add API patch for CLIENT_SECURE_CONNECTION symbol
Restore CLIENT_SECURE_CONNECTION symbol which was changed to CLIENT_RESERVED2
Filed upstream bug https://bugs.mysql.com/bug.php?id=78028
Package-Manager: portage-2.2.20
dev-db/mysql-connector-c/files/mysql_com.patch | 31 ++++++++++++++++++++++
....6.ebuild => mysql-connector-c-6.1.6-r1.ebuild} | 3 ++-
2 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/dev-db/mysql-connector-c/files/mysql_com.patch b/dev-db/mysql-connector-c/files/mysql_com.patch
new file mode 100644
index 0000000..36a7d5a
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql_com.patch
@@ -0,0 +1,31 @@
+--- a/include/mysql_com.h 2014-06-10 23:10:43.000000000 -0400
++++ b/include/mysql_com.h 2015-08-11 15:20:54.487091000 -0400
+@@ -179,7 +171,7 @@
+ #define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */
+ #define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */
+ #define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */
+-#define CLIENT_RESERVED2 32768 /* Old flag for 4.1 authentication */
++#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */
+ #define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */
+ #define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */
+ #define CLIENT_PS_MULTI_RESULTS (1UL << 18) /* Multi-results in PS-protocol */
+@@ -226,7 +216,7 @@
+ | CLIENT_IGNORE_SIGPIPE \
+ | CLIENT_TRANSACTIONS \
+ | CLIENT_RESERVED \
+- | CLIENT_RESERVED2 \
++ | CLIENT_SECURE_CONNECTION \
+ | CLIENT_MULTI_STATEMENTS \
+ | CLIENT_MULTI_RESULTS \
+ | CLIENT_PS_MULTI_RESULTS \
+--- a/libmysql/client_settings.h 2015-02-25 16:09:49.000000000 -0500
++++ b/libmysql/client_settings.h 2015-08-11 15:44:10.804091000 -0400
+@@ -31,7 +31,7 @@
+ CLIENT_LONG_FLAG | \
+ CLIENT_TRANSACTIONS | \
+ CLIENT_PROTOCOL_41 | \
+- CLIENT_RESERVED2 | \
++ CLIENT_SECURE_CONNECTION | \
+ CLIENT_MULTI_RESULTS | \
+ CLIENT_PS_MULTI_RESULTS | \
+ CLIENT_PLUGIN_AUTH | \
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-6.1.6.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.6-r1.ebuild
similarity index 95%
rename from dev-db/mysql-connector-c/mysql-connector-c-6.1.6.ebuild
rename to dev-db/mysql-connector-c/mysql-connector-c-6.1.6-r1.ebuild
index 9c8061a..969af88 100644
--- a/dev-db/mysql-connector-c/mysql-connector-c-6.1.6.ebuild
+++ b/dev-db/mysql-connector-c/mysql-connector-c-6.1.6-r1.ebuild
@@ -43,7 +43,8 @@ DOCS=( README Docs/ChangeLog )
src_prepare() {
epatch "${FILESDIR}/openssl-cmake-detection.patch" \
- "${FILESDIR}/conn-c-includes.patch"
+ "${FILESDIR}/conn-c-includes.patch" \
+ "${FILESDIR}/mysql_com.patch"
epatch_user
}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/, dev-db/mysql-connector-c/files/
@ 2019-06-11 19:09 Brian Evans
0 siblings, 0 replies; 9+ messages in thread
From: Brian Evans @ 2019-06-11 19:09 UTC (permalink / raw
To: gentoo-commits
commit: 0b50c01c2f9491ad6e63e8b93324ab90090005ab
Author: Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 11 19:00:32 2019 +0000
Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Jun 11 19:00:32 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b50c01c
dev-db/mysql-connector-c: Version bump to 8.0.16
Closes: https://bugs.gentoo.org/687588
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>
dev-db/mysql-connector-c/Manifest | 1 +
.../mysql-connector-c/files/8.0.16-libressl.patch | 279 +++++++++++++++++++++
.../mysql-connector-c-8.0.16.ebuild | 92 +++++++
3 files changed, 372 insertions(+)
diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index f276bb6a0be..91a4121bd4d 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1 +1,2 @@
+DIST mysql-boost-8.0.16.tar.gz 145939027 BLAKE2B f8e94c6aa686a3f3a2fd231676070760081c6bbf0d652ce09e9bfb6f9dc86fc96dba5739ac8721bfd55c947e44c7de4c37ff5f8bb56db5e08484cf586e143add SHA512 4de08d74637d1fef4f570148e66c8ddf2b59d1c0a49d715ca632da7f572645b65ec5f7c115aaf0bd179b0a9f1ba2bc40357c371f170a674118159d99b2c49516
DIST mysql-connector-c-6.1.11-src.tar.gz 3489345 BLAKE2B 813512520ef660521221565a4466e81d902629d0ee731f746b68eed2b9129ea8361fcabe184537ec8ba91aed5a4b02dfb3450b36524c2e98f81fba148eee0cf1 SHA512 271395c888a93b833e0bbe1840b9987ecdb37d0f1cf89904207cc9aa99ed32e538aee8c9529ff39b6533947159776a8f5aa079da86ed51b1d26b086f4ffdd7c6
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
new file mode 100644
index 00000000000..af21a1e6f2f
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/8.0.16-libressl.patch
@@ -0,0 +1,279 @@
+From ddaeb4c8ae76473263ebe1f711814eb977b0abbe Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <steils@gentoo.org>
+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/viosslfactories.cc | 2 +-
+ 12 files changed, 29 insertions(+), 19 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/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.21.0
+
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.16.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.16.ebuild
new file mode 100644
index 00000000000..861e78121dc
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.16.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-multilib
+
+# wrap the config script
+MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://dev.mysql.com/downloads/"
+LICENSE="GPL-2"
+
+SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${PV}.tar.gz"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+
+SLOT="0/21"
+IUSE="ldap libressl +ssl static-libs"
+
+RDEPEND="
+ sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
+ ssl? (
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ )
+ "
+DEPEND="${RDEPEND}"
+
+DOCS=( README )
+
+S="${WORKDIR}/mysql-${PV}"
+
+PATCHES=( "${FILESDIR}/8.0.16-libressl.patch" )
+
+src_prepare() {
+ sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
+
+ # All these are for the server only
+ sed -i \
+ -e '/MYSQL_CHECK_LIBEVENT/d' \
+ -e '/MYSQL_CHECK_RAPIDJSON/d' \
+ -e '/MYSQL_CHECK_ICU/d' \
+ -e '/MYSQL_CHECK_RE2/d' \
+ -e '/MYSQL_CHECK_LZ4/d' \
+ -e '/MYSQL_CHECK_EDITLINE/d' \
+ -e '/MYSQL_CHECK_CURL/d' \
+ -e '/ADD_SUBDIRECTORY(man)/d' \
+ -e '/ADD_SUBDIRECTORY(share)/d' \
+ -e '/INCLUDE(cmake\/boost/d' \
+ CMakeLists.txt || die
+
+ # Skip building clients
+ echo > client/CMakeLists.txt || die
+
+ # Forcefully disable auth plugin
+ if ! use ldap ; then
+ sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
+ echo > libmysql/authentication_ldap/CMakeLists.txt || die
+ fi
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DINSTALL_LAYOUT=RPM
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DWITH_DEFAULT_COMPILER_OPTIONS=OFF
+ -DWITH_DEFAULT_FEATURE_SET=OFF
+ -DENABLED_LOCAL_INFILE=ON
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
+ -DWITH_ZLIB=system
+ -DWITH_SSL=$(usex ssl system wolfssl)
+ -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
+ -DSHARED_LIB_PATCH_VERSION="0"
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DWITHOUT_SERVER=ON
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+}
+
+multilib_src_install_all() {
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/, dev-db/mysql-connector-c/files/
@ 2019-08-02 14:38 Thomas Deutschmann
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Deutschmann @ 2019-08-02 14:38 UTC (permalink / raw
To: gentoo-commits
commit: c6112871c2e83ad7d1bd64b277386eb2c5efa089
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 2 14:22:45 2019 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Aug 2 14:38:45 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6112871
dev-db/mysql-connector-c: bump to v8.0.17
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
dev-db/mysql-connector-c/Manifest | 1 +
.../files/mysql-connector-c-8.0.17-libressl.patch | 258 +++++++++++++++++++++
.../mysql-connector-c-8.0.17.ebuild | 92 ++++++++
3 files changed, 351 insertions(+)
diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index 91a4121bd4d..da74276fc3e 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1,2 +1,3 @@
DIST mysql-boost-8.0.16.tar.gz 145939027 BLAKE2B f8e94c6aa686a3f3a2fd231676070760081c6bbf0d652ce09e9bfb6f9dc86fc96dba5739ac8721bfd55c947e44c7de4c37ff5f8bb56db5e08484cf586e143add SHA512 4de08d74637d1fef4f570148e66c8ddf2b59d1c0a49d715ca632da7f572645b65ec5f7c115aaf0bd179b0a9f1ba2bc40357c371f170a674118159d99b2c49516
+DIST mysql-boost-8.0.17.tar.gz 189322239 BLAKE2B f9f46e5fdc3e9869b203626bc09edfbcdbabcd68eba43f9c6a33b9a52cffb3a32f39704c6d22a66899aac16fa2efb271c5dc7af7522768b45542ac8dc615cd8a SHA512 a278ee263670cb1f79d67c4b87c4b88632569c3b20a4297a6e77d550155db20902f22992ea851cf59ea523bb97d5e08707e3457f71a678e9f1ac2fa4ca5b7a2d
DIST mysql-connector-c-6.1.11-src.tar.gz 3489345 BLAKE2B 813512520ef660521221565a4466e81d902629d0ee731f746b68eed2b9129ea8361fcabe184537ec8ba91aed5a4b02dfb3450b36524c2e98f81fba148eee0cf1 SHA512 271395c888a93b833e0bbe1840b9987ecdb37d0f1cf89904207cc9aa99ed32e538aee8c9529ff39b6533947159776a8f5aa079da86ed51b1d26b086f4ffdd7c6
diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.17-libressl.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.17-libressl.patch
new file mode 100644
index 00000000000..340f894a895
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.17-libressl.patch
@@ -0,0 +1,258 @@
+From: Stefan Strogin <steils@gentoo.org>
+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.
+
+
+--- a/cmake/ssl.cmake
++++ b/cmake/ssl.cmake
+@@ -304,13 +304,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
+--- 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 */
+--- a/mysys/my_md5.cc
++++ b/mysys/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,
+--- 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;
+--- a/plugin/x/client/xconnection_impl.cc
++++ b/plugin/x/client/xconnection_impl.cc
+@@ -523,7 +523,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:
+@@ -573,7 +573,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) {
+--- 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");
+ }
+--- a/router/src/http/src/tls_context.cc
++++ b/router/src/http/src/tls_context.cc
+@@ -93,7 +93,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
+@@ -123,9 +123,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
+@@ -172,8 +174,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:
+--- a/router/src/http/src/tls_server_context.cc
++++ b/router/src/http/src/tls_server_context.cc
+@@ -170,7 +170,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
+ /*
+--- a/sql-common/client.cc
++++ b/sql-common/client.cc
+@@ -7602,7 +7602,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 = *static_cast<const uint *>(arg);
+--- a/sql/mysqld.cc
++++ b/sql/mysqld.cc
+@@ -4795,7 +4795,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
+@@ -4831,7 +4831,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) {
+--- a/sql/sys_vars.cc
++++ b/sql/sys_vars.cc
+@@ -4377,7 +4377,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) {
+@@ -4390,7 +4390,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};
+@@ -4398,7 +4398,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",
+@@ -4406,7 +4406,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),
+--- 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",
+--- 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:
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.17.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.17.ebuild
new file mode 100644
index 00000000000..db884fd4848
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.17.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-multilib
+
+# wrap the config script
+MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://dev.mysql.com/downloads/"
+LICENSE="GPL-2"
+
+SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${PV}.tar.gz"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+
+SLOT="0/21"
+IUSE="ldap libressl +ssl static-libs"
+
+RDEPEND="
+ sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
+ ssl? (
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ )
+ "
+DEPEND="${RDEPEND}"
+
+DOCS=( README )
+
+S="${WORKDIR}/mysql-${PV}"
+
+PATCHES=( "${FILESDIR}"/${PN}-8.0.17-libressl.patch )
+
+src_prepare() {
+ sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
+
+ # All these are for the server only
+ sed -i \
+ -e '/MYSQL_CHECK_LIBEVENT/d' \
+ -e '/MYSQL_CHECK_RAPIDJSON/d' \
+ -e '/MYSQL_CHECK_ICU/d' \
+ -e '/MYSQL_CHECK_RE2/d' \
+ -e '/MYSQL_CHECK_LZ4/d' \
+ -e '/MYSQL_CHECK_EDITLINE/d' \
+ -e '/MYSQL_CHECK_CURL/d' \
+ -e '/ADD_SUBDIRECTORY(man)/d' \
+ -e '/ADD_SUBDIRECTORY(share)/d' \
+ -e '/INCLUDE(cmake\/boost/d' \
+ CMakeLists.txt || die
+
+ # Skip building clients
+ echo > client/CMakeLists.txt || die
+
+ # Forcefully disable auth plugin
+ if ! use ldap ; then
+ sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
+ echo > libmysql/authentication_ldap/CMakeLists.txt || die
+ fi
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DINSTALL_LAYOUT=RPM
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DWITH_DEFAULT_COMPILER_OPTIONS=OFF
+ -DWITH_DEFAULT_FEATURE_SET=OFF
+ -DENABLED_LOCAL_INFILE=ON
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
+ -DWITH_ZLIB=system
+ -DWITH_SSL=$(usex ssl system wolfssl)
+ -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
+ -DSHARED_LIB_PATCH_VERSION="0"
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DWITHOUT_SERVER=ON
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+}
+
+multilib_src_install_all() {
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/, dev-db/mysql-connector-c/files/
@ 2019-08-22 20:02 Thomas Deutschmann
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Deutschmann @ 2019-08-22 20:02 UTC (permalink / raw
To: gentoo-commits
commit: 93dc56e0b40fe411ad82b3990f85bd5adf562dad
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 22 19:38:53 2019 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Aug 22 19:45:26 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93dc56e0
dev-db/mysql-connector-c: rev bump
- Always install {lz4,zlib}_decompress
- Avoid file collisions
Closes: https://bugs.gentoo.org/692580
Package-Manager: Portage-2.3.72, Repoman-2.3.17
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
...-8.0.17-always-build-decompress-utilities.patch | 22 ++++++++++++++++++++++
...1.ebuild => mysql-connector-c-8.0.17-r2.ebuild} | 15 +++++++++++++--
2 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.17-always-build-decompress-utilities.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.17-always-build-decompress-utilities.patch
new file mode 100644
index 00000000000..927662705aa
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.17-always-build-decompress-utilities.patch
@@ -0,0 +1,22 @@
+--- a/utilities/CMakeLists.txt
++++ b/utilities/CMakeLists.txt
+@@ -101,15 +101,11 @@ MYSQL_ADD_EXECUTABLE(perror perror.cc)
+ ADD_DEPENDENCIES(perror GenError)
+ TARGET_LINK_LIBRARIES(perror mysys)
+
+-IF (BUILD_BUNDLED_LZ4)
+- MYSQL_ADD_EXECUTABLE(lz4_decompress lz4_decompress.cc)
+- TARGET_LINK_LIBRARIES(lz4_decompress ${LZ4_LIBRARY} mysys)
+-ENDIF()
++MYSQL_ADD_EXECUTABLE(lz4_decompress lz4_decompress.cc)
++TARGET_LINK_LIBRARIES(lz4_decompress ${LZ4_LIBRARY} mysys)
+
+-IF (BUILD_BUNDLED_ZLIB OR NOT OPENSSL_EXECUTABLE_HAS_ZLIB)
+- MYSQL_ADD_EXECUTABLE(zlib_decompress zlib_decompress.cc)
+- TARGET_LINK_LIBRARIES(zlib_decompress ${ZLIB_LIBRARY} mysys)
+-ENDIF()
++MYSQL_ADD_EXECUTABLE(zlib_decompress zlib_decompress.cc)
++TARGET_LINK_LIBRARIES(zlib_decompress ${ZLIB_LIBRARY} mysys)
+
+ IF(WITH_INNOBASE_STORAGE_ENGINE)
+
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.17-r1.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.17-r2.ebuild
similarity index 85%
rename from dev-db/mysql-connector-c/mysql-connector-c-8.0.17-r1.ebuild
rename to dev-db/mysql-connector-c/mysql-connector-c-8.0.17-r2.ebuild
index c99bb77dd8a..3eb18955b0b 100644
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.17-r1.ebuild
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.17-r2.ebuild
@@ -19,6 +19,7 @@ SLOT="0/21"
IUSE="ldap libressl static-libs"
RDEPEND="
+ >=app-arch/lz4-0_p131:=
sys-libs/zlib:=[${MULTILIB_USEDEP}]
ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
@@ -26,11 +27,22 @@ RDEPEND="
"
DEPEND="${RDEPEND}"
+# Avoid file collisions, #692580
+RDEPEND+=" !<dev-db/mysql-5.6.45-r1"
+RDEPEND+=" !=dev-db/mysql-5.7.23*"
+RDEPEND+=" !=dev-db/mysql-5.7.24*"
+RDEPEND+=" !=dev-db/mysql-5.7.25*"
+RDEPEND+=" !=dev-db/mysql-5.7.26-r0"
+RDEPEND+=" !=dev-db/mysql-5.7.27-r0"
+
DOCS=( README )
S="${WORKDIR}/mysql-${PV}"
-PATCHES=( "${FILESDIR}"/${PN}-8.0.17-libressl.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.0.17-always-build-decompress-utilities.patch
+ "${FILESDIR}"/${PN}-8.0.17-libressl.patch
+)
src_prepare() {
sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
@@ -42,7 +54,6 @@ src_prepare() {
-e '/MYSQL_CHECK_RAPIDJSON/d' \
-e '/MYSQL_CHECK_ICU/d' \
-e '/MYSQL_CHECK_RE2/d' \
- -e '/MYSQL_CHECK_LZ4/d' \
-e '/MYSQL_CHECK_EDITLINE/d' \
-e '/MYSQL_CHECK_CURL/d' \
-e '/ADD_SUBDIRECTORY(man)/d' \
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/, dev-db/mysql-connector-c/files/
@ 2019-10-16 21:40 Thomas Deutschmann
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Deutschmann @ 2019-10-16 21:40 UTC (permalink / raw
To: gentoo-commits
commit: 7b872573074ef024d52cfa359f75fb46253748a5
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 16 21:22:31 2019 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Oct 16 21:40:33 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b872573
dev-db/mysql-connector-c: bump to v8.0.18
Package-Manager: Portage-2.3.77, Repoman-2.3.17
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
dev-db/mysql-connector-c/Manifest | 1 +
...-8.0.18-always-build-decompress-utilities.patch | 34 +++++++
.../mysql-connector-c-8.0.18.ebuild | 110 +++++++++++++++++++++
3 files changed, 145 insertions(+)
diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index 8ca24c1f198..c716740b2d3 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1,2 +1,3 @@
DIST mysql-boost-8.0.17.tar.gz 189322239 BLAKE2B f9f46e5fdc3e9869b203626bc09edfbcdbabcd68eba43f9c6a33b9a52cffb3a32f39704c6d22a66899aac16fa2efb271c5dc7af7522768b45542ac8dc615cd8a SHA512 a278ee263670cb1f79d67c4b87c4b88632569c3b20a4297a6e77d550155db20902f22992ea851cf59ea523bb97d5e08707e3457f71a678e9f1ac2fa4ca5b7a2d
+DIST mysql-boost-8.0.18.tar.gz 194953221 BLAKE2B e3622cccd8f60487a5e643e522e9cdc763d63ad2a5eda86a7a7db37f48a4e1288fea88ef7097c6c4b51bd5e8fd8ba26a5b8aea3501ae847180066e2d0aa2b5dc SHA512 180091ad3e74e2afa28ecb914850e6b4e8c92b8981f32b161f53381b92120d87dbd2c2fc073feb2543bb71702bac7368e9fb992821cfd3e3ca888019423b89f5
DIST mysql-connector-c-6.1.11-src.tar.gz 3489345 BLAKE2B 813512520ef660521221565a4466e81d902629d0ee731f746b68eed2b9129ea8361fcabe184537ec8ba91aed5a4b02dfb3450b36524c2e98f81fba148eee0cf1 SHA512 271395c888a93b833e0bbe1840b9987ecdb37d0f1cf89904207cc9aa99ed32e538aee8c9529ff39b6533947159776a8f5aa079da86ed51b1d26b086f4ffdd7c6
diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.18-always-build-decompress-utilities.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.18-always-build-decompress-utilities.patch
new file mode 100644
index 00000000000..af0b31e89a3
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.18-always-build-decompress-utilities.patch
@@ -0,0 +1,34 @@
+--- a/utilities/CMakeLists.txt
++++ b/utilities/CMakeLists.txt
+@@ -110,21 +110,16 @@ MYSQL_ADD_EXECUTABLE(perror
+ DEPENDENCIES GenError
+ LINK_LIBRARIES mysys
+ )
+-IF(BUILD_BUNDLED_LZ4)
+- MYSQL_ADD_EXECUTABLE(lz4_decompress
+- lz4_decompress.cc
+- COMPONENT Server
+- LINK_LIBRARIES ${LZ4_LIBRARY} mysys
+- )
+-ENDIF()
+-
+-IF(BUILD_BUNDLED_ZLIB OR NOT OPENSSL_EXECUTABLE_HAS_ZLIB)
+- MYSQL_ADD_EXECUTABLE(zlib_decompress
+- zlib_decompress.cc
+- COMPONENT Server
+- LINK_LIBRARIES ${ZLIB_LIBRARY} mysys
+- )
+-ENDIF()
++MYSQL_ADD_EXECUTABLE(lz4_decompress
++ lz4_decompress.cc
++ COMPONENT Server
++ LINK_LIBRARIES ${LZ4_LIBRARY} mysys
++ )
++MYSQL_ADD_EXECUTABLE(zlib_decompress
++ zlib_decompress.cc
++ COMPONENT Server
++ LINK_LIBRARIES ${ZLIB_LIBRARY} mysys
++ )
+
+ # All targets below belong to COMPONENT Server and depend on InnoDB.
+ IF(WITHOUT_SERVER)
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.18.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.18.ebuild
new file mode 100644
index 00000000000..6f10fa81b8b
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.18.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-multilib
+
+# wrap the config script
+MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://dev.mysql.com/downloads/"
+LICENSE="GPL-2"
+
+SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${PV}.tar.gz"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+SLOT="0/21"
+IUSE="ldap libressl static-libs"
+
+RDEPEND="
+ >=app-arch/lz4-0_p131:=
+ sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ "
+DEPEND="${RDEPEND}"
+
+# Avoid file collisions, #692580
+RDEPEND+=" !<dev-db/mysql-5.6.45-r1"
+RDEPEND+=" !=dev-db/mysql-5.7.23*"
+RDEPEND+=" !=dev-db/mysql-5.7.24*"
+RDEPEND+=" !=dev-db/mysql-5.7.25*"
+RDEPEND+=" !=dev-db/mysql-5.7.26-r0"
+RDEPEND+=" !=dev-db/mysql-5.7.27-r0"
+RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1"
+
+DOCS=( README )
+
+S="${WORKDIR}/mysql-${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.0.18-always-build-decompress-utilities.patch
+ "${FILESDIR}"/${PN}-8.0.17-use-relative-include-path-for-udf_registration_types-h.patch
+ #"${FILESDIR}"/${PN}-8.0.17-libressl.patch
+)
+
+src_prepare() {
+ sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
+
+ # All these are for the server only.
+ # Disable rpm call which would trigger sandbox, #692368
+ sed -i \
+ -e '/MYSQL_CHECK_LIBEVENT/d' \
+ -e '/MYSQL_CHECK_RAPIDJSON/d' \
+ -e '/MYSQL_CHECK_ICU/d' \
+ -e '/MYSQL_CHECK_EDITLINE/d' \
+ -e '/MYSQL_CHECK_CURL/d' \
+ -e '/ADD_SUBDIRECTORY(man)/d' \
+ -e '/ADD_SUBDIRECTORY(share)/d' \
+ -e '/INCLUDE(cmake\/boost/d' \
+ -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+ CMakeLists.txt || die
+
+ # Skip building clients
+ echo > client/CMakeLists.txt || die
+
+ # Forcefully disable auth plugin
+ if ! use ldap ; then
+ sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
+ echo > libmysql/authentication_ldap/CMakeLists.txt || die
+ fi
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DINSTALL_LAYOUT=RPM
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DWITH_DEFAULT_COMPILER_OPTIONS=OFF
+ -DWITH_DEFAULT_FEATURE_SET=OFF
+ -DENABLED_LOCAL_INFILE=ON
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
+ -DWITH_ZLIB=system
+ -DWITH_SSL=system
+ -DWITH_NUMA=OFF
+ -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
+ -DSHARED_LIB_PATCH_VERSION="0"
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DWITHOUT_SERVER=ON
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+}
+
+multilib_src_install_all() {
+ doman \
+ man/my_print_defaults.1 \
+ man/perror.1 \
+ man/zlib_decompress.1
+
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/, dev-db/mysql-connector-c/files/
@ 2020-01-20 19:26 Thomas Deutschmann
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Deutschmann @ 2020-01-20 19:26 UTC (permalink / raw
To: gentoo-commits
commit: 518c23ba49e0623d758c8420234b937bcde4276d
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 20 18:10:47 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Jan 20 19:26:25 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=518c23ba
dev-db/mysql-connector-c: bump to v8.0.19
Closes: https://bugs.gentoo.org/697934
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
dev-db/mysql-connector-c/Manifest | 1 +
...onnector-c-8.0.19-do-not-install-comp_err.patch | 12 +
.../files/mysql-connector-c-8.0.19-libressl.patch | 297 +++++++++++++++++++++
.../mysql-connector-c-8.0.19.ebuild | 111 ++++++++
4 files changed, 421 insertions(+)
diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index c716740b2d3..545daa75efd 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1,3 +1,4 @@
DIST mysql-boost-8.0.17.tar.gz 189322239 BLAKE2B f9f46e5fdc3e9869b203626bc09edfbcdbabcd68eba43f9c6a33b9a52cffb3a32f39704c6d22a66899aac16fa2efb271c5dc7af7522768b45542ac8dc615cd8a SHA512 a278ee263670cb1f79d67c4b87c4b88632569c3b20a4297a6e77d550155db20902f22992ea851cf59ea523bb97d5e08707e3457f71a678e9f1ac2fa4ca5b7a2d
DIST mysql-boost-8.0.18.tar.gz 194953221 BLAKE2B e3622cccd8f60487a5e643e522e9cdc763d63ad2a5eda86a7a7db37f48a4e1288fea88ef7097c6c4b51bd5e8fd8ba26a5b8aea3501ae847180066e2d0aa2b5dc SHA512 180091ad3e74e2afa28ecb914850e6b4e8c92b8981f32b161f53381b92120d87dbd2c2fc073feb2543bb71702bac7368e9fb992821cfd3e3ca888019423b89f5
+DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
DIST mysql-connector-c-6.1.11-src.tar.gz 3489345 BLAKE2B 813512520ef660521221565a4466e81d902629d0ee731f746b68eed2b9129ea8361fcabe184537ec8ba91aed5a4b02dfb3450b36524c2e98f81fba148eee0cf1 SHA512 271395c888a93b833e0bbe1840b9987ecdb37d0f1cf89904207cc9aa99ed32e538aee8c9529ff39b6533947159776a8f5aa079da86ed51b1d26b086f4ffdd7c6
diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-do-not-install-comp_err.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-do-not-install-comp_err.patch
new file mode 100644
index 00000000000..94329eeeb3c
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-do-not-install-comp_err.patch
@@ -0,0 +1,12 @@
+diff --git a/utilities/CMakeLists.txt b/utilities/CMakeLists.txt
+index c855f8ab..0ebef451 100644
+--- a/utilities/CMakeLists.txt
++++ b/utilities/CMakeLists.txt
+@@ -27,6 +27,7 @@ IF(NOT CMAKE_CROSSCOMPILING)
+ comp_err.cc
+ COMPONENT Server
+ LINK_LIBRARIES mysys
++ SKIP_INSTALL
+ )
+ ENDIF()
+
diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-libressl.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-libressl.patch
new file mode 100644
index 00000000000..1fc949ae856
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-libressl.patch
@@ -0,0 +1,297 @@
+--- a/cmake/ssl.cmake
++++ b/cmake/ssl.cmake
+@@ -229,13 +229,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
+--- a/mysys/my_md5.cc
++++ b/mysys/my_md5.cc
+@@ -56,7 +56,9 @@ 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;
++#ifndef LIBRESSL_VERSION_NUMBER
+ fips_mode = FIPS_mode();
++#endif
+ /* If fips mode is ON/STRICT restricted method calls will result into abort,
+ * skipping call. */
+ if (fips_mode == 0) {
+--- 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
+@@ -329,6 +329,7 @@ error:
+ return 1;
+ }
+
++#ifndef LIBRESSL_VERSION_NUMBER
+ #define OPENSSL_ERROR_LENGTH 512
+ static int configure_ssl_fips_mode(const uint fips_mode) {
+ int rc = -1;
+@@ -352,6 +353,7 @@ static int configure_ssl_fips_mode(const uint fips_mode) {
+ EXIT:
+ return rc;
+ }
++#endif
+
+ static int configure_ssl_ca(SSL_CTX *ssl_ctx, const char *ca_file,
+ const char *ca_path) {
+@@ -555,10 +557,12 @@ 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 LIBRESSL_VERSION_NUMBER
+ if (configure_ssl_fips_mode(ssl_fips_mode) != 1) {
+ G_ERROR("Error setting the ssl fips mode");
+ goto error;
+ }
++#endif
+
+ SSL_library_init();
+ SSL_load_error_strings();
+@@ -622,7 +626,7 @@ error:
+ void xcom_cleanup_ssl() {
+ if (!xcom_use_ssl()) return;
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ ERR_remove_thread_state(0);
+ #endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+ }
+--- a/plugin/x/client/xconnection_impl.cc
++++ b/plugin/x/client/xconnection_impl.cc
+@@ -520,6 +520,7 @@ XError Connection_impl::get_ssl_error(const int error_id) {
+ return XError(CR_SSL_CONNECTION_ERROR, buffer);
+ }
+
++#ifndef LIBRESSL_VERSION_NUMBER
+ /**
+ Set fips mode in openssl library,
+ When we set fips mode ON/STRICT, it will perform following operations:
+@@ -559,6 +560,7 @@ int set_fips_mode(const uint32_t fips_mode,
+ EXIT:
+ return rc;
+ }
++#endif
+
+ XError Connection_impl::activate_tls() {
+ if (nullptr == m_vio) return get_socket_error(SOCKET_ECONNRESET);
+@@ -569,12 +571,14 @@ XError Connection_impl::activate_tls() {
+ if (!m_context->m_ssl_config.is_configured())
+ return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED, true};
+
++#ifndef LIBRESSL_VERSION_NUMBER
+ char err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
+ if (set_fips_mode(
+ static_cast<uint32_t>(m_context->m_ssl_config.m_ssl_fips_mode),
+ err_string) != 1) {
+ return XError{CR_SSL_CONNECTION_ERROR, err_string, true};
+ }
++#endif
+ auto ssl_ctx_flags = process_tls_version(
+ details::null_when_empty(m_context->m_ssl_config.m_tls_version));
+
+--- 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");
+ }
+--- a/router/src/http/src/tls_context.cc
++++ b/router/src/http/src/tls_context.cc
+@@ -91,7 +91,7 @@ static 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
+@@ -120,9 +120,11 @@ void TlsContext::version_range(TlsVersion min_version, TlsVersion max_version) {
+ switch (min_version) {
+ default:
+ // unknown, leave all disabled
++#ifdef TLS1_3_VERSION
+ // fallthrough
+ case TlsVersion::TLS_1_3:
+ opts |= SSL_OP_NO_TLSv1_2;
++#endif
+ // fallthrough
+ case TlsVersion::TLS_1_2:
+ opts |= SSL_OP_NO_TLSv1_1;
+@@ -170,8 +172,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:
+@@ -230,7 +234,8 @@ TlsContext::InfoCallback TlsContext::info_callback() const {
+ }
+
+ int TlsContext::security_level() const {
+-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0)
++#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \
++ !defined(LIBRESSL_VERSION_NUMBER)
+ return SSL_CTX_get_security_level(ssl_ctx_.get());
+ #else
+ return 0;
+--- a/router/src/http/src/tls_server_context.cc
++++ b/router/src/http/src/tls_server_context.cc
+@@ -166,7 +166,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
+ /*
+--- a/sql-common/client.cc
++++ b/sql-common/client.cc
+@@ -7730,7 +7730,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
+ #endif
+ break;
+ case MYSQL_OPT_SSL_FIPS_MODE: {
+-#if defined(HAVE_OPENSSL)
++#if defined(HAVE_OPENSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+ char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
+ ENSURE_EXTENSIONS_PRESENT(&mysql->options);
+ mysql->options.extension->ssl_fips_mode = *static_cast<const uint *>(arg);
+--- a/sql/mysqld.cc
++++ b/sql/mysqld.cc
+@@ -4818,7 +4818,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
+@@ -4854,12 +4854,14 @@ static void init_ssl() {
+ }
+
+ static int init_ssl_communication() {
++#ifndef 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) {
+ LogErr(ERROR_LEVEL, ER_SSL_FIPS_MODE_ERROR, ssl_err_string);
+ return 1;
+ }
++#endif
+ if (SslAcceptorContext::singleton_init(opt_use_ssl)) return 1;
+
+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
+--- a/sql/sys_vars.cc
++++ b/sql/sys_vars.cc
+@@ -4417,6 +4417,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 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) {
+@@ -4427,15 +4428,30 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
+ return false;
+ }
+ }
++#endif
+
++#if 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};
++#endif
+ static Sys_var_enum Sys_ssl_fips_mode(
+ "ssl_fips_mode",
+ "SSL FIPS mode (applies only for OpenSSL); "
++#ifndef LIBRESSL_VERSION_NUMBER
+ "permitted values are: OFF, ON, STRICT",
++#else
++ "permitted values are: OFF",
++#endif
+ 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), ON_UPDATE(update_fips_mode), NULL);
++ ON_CHECK(NULL),
++#ifndef LIBRESSL_VERSION_NUMBER
++ ON_UPDATE(update_fips_mode),
++#else
++ ON_UPDATE(NULL),
++#endif
++ NULL);
+
+ #if defined(HAVE_OPENSSL)
+ static Sys_var_bool Sys_auto_generate_certs(
+--- a/vio/viossl.cc
++++ b/vio/viossl.cc
+@@ -45,7 +45,7 @@
+ BIO_set_callback_ex was added in openSSL 1.1.1
+ For older openSSL, use the deprecated BIO_set_callback.
+ */
+-#if OPENSSL_VERSION_NUMBER >= 0x10101000L
++#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER)
+ #define HAVE_BIO_SET_CALLBACK_EX
+ #endif
+
+@@ -637,7 +637,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
+ #if !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)
+@@ -645,7 +645,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",
+--- a/vio/viosslfactories.cc
++++ b/vio/viosslfactories.cc
+@@ -420,6 +420,7 @@ void ssl_start() {
+ }
+ }
+
++#ifndef LIBRESSL_VERSION_NUMBER
+ /**
+ Set fips mode in openssl library,
+ When we set fips mode ON/STRICT, it will perform following operations:
+@@ -473,6 +474,7 @@ EXIT:
+ @returns openssl current fips mode
+ */
+ uint get_fips_mode() { return FIPS_mode(); }
++#endif
+
+ long process_tls_version(const char *tls_version) {
+ const char *separator = ",";
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.19.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.19.ebuild
new file mode 100644
index 00000000000..4064f2093f9
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.19.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-multilib
+
+# wrap the config script
+MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://dev.mysql.com/downloads/"
+LICENSE="GPL-2"
+
+SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${PV}.tar.gz"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+SLOT="0/21"
+IUSE="ldap libressl static-libs"
+
+RDEPEND="
+ >=app-arch/lz4-0_p131:=
+ sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ "
+DEPEND="${RDEPEND}"
+
+# Avoid file collisions, #692580
+RDEPEND+=" !<dev-db/mysql-5.6.45-r1"
+RDEPEND+=" !=dev-db/mysql-5.7.23*"
+RDEPEND+=" !=dev-db/mysql-5.7.24*"
+RDEPEND+=" !=dev-db/mysql-5.7.25*"
+RDEPEND+=" !=dev-db/mysql-5.7.26-r0"
+RDEPEND+=" !=dev-db/mysql-5.7.27-r0"
+RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1"
+
+DOCS=( README )
+
+S="${WORKDIR}/mysql-${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.0.18-always-build-decompress-utilities.patch
+ "${FILESDIR}"/${PN}-8.0.17-use-relative-include-path-for-udf_registration_types-h.patch
+ "${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
+ "${FILESDIR}"/${PN}-8.0.19-libressl.patch
+)
+
+src_prepare() {
+ sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
+
+ # All these are for the server only.
+ # Disable rpm call which would trigger sandbox, #692368
+ sed -i \
+ -e '/MYSQL_CHECK_LIBEVENT/d' \
+ -e '/MYSQL_CHECK_RAPIDJSON/d' \
+ -e '/MYSQL_CHECK_ICU/d' \
+ -e '/MYSQL_CHECK_EDITLINE/d' \
+ -e '/MYSQL_CHECK_CURL/d' \
+ -e '/ADD_SUBDIRECTORY(man)/d' \
+ -e '/ADD_SUBDIRECTORY(share)/d' \
+ -e '/INCLUDE(cmake\/boost/d' \
+ -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+ CMakeLists.txt || die
+
+ # Skip building clients
+ echo > client/CMakeLists.txt || die
+
+ # Forcefully disable auth plugin
+ if ! use ldap ; then
+ sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
+ echo > libmysql/authentication_ldap/CMakeLists.txt || die
+ fi
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DINSTALL_LAYOUT=RPM
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DWITH_DEFAULT_COMPILER_OPTIONS=OFF
+ -DWITH_DEFAULT_FEATURE_SET=OFF
+ -DENABLED_LOCAL_INFILE=ON
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
+ -DWITH_ZLIB=system
+ -DWITH_SSL=system
+ -DWITH_NUMA=OFF
+ -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
+ -DSHARED_LIB_PATCH_VERSION="0"
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DWITHOUT_SERVER=ON
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+}
+
+multilib_src_install_all() {
+ doman \
+ man/my_print_defaults.1 \
+ man/perror.1 \
+ man/zlib_decompress.1
+
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/, dev-db/mysql-connector-c/files/
@ 2020-08-09 21:01 Thomas Deutschmann
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Deutschmann @ 2020-08-09 21:01 UTC (permalink / raw
To: gentoo-commits
commit: dace53dd7c5acd6588fe11e7a92a04b272bd0217
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 9 20:59:25 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Aug 9 20:59:25 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dace53dd
dev-db/mysql-connector-c: drop old
Closes: https://github.com/gentoo/gentoo/pull/17061
Package-Manager: Portage-3.0.2, Repoman-2.3.23
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
dev-db/mysql-connector-c/Manifest | 3 -
.../files/20028_all_mysql-5.6-gcc7.patch | 13 -
.../files/6.1.11-openssl-1.1.patch | 300 -------------------
...include-path-for-udf_registration_types-h.patch | 24 --
.../files/mysql-connector-c-8.0.19-libressl.patch | 297 ------------------
.../files/mysql-connector-c-8.0.20-libressl.patch | 332 ---------------------
dev-db/mysql-connector-c/files/mysql_com.patch | 31 --
.../mysql-connector-c-6.1.11-r2.ebuild | 83 ------
.../mysql-connector-c-8.0.19.ebuild | 111 -------
.../mysql-connector-c-8.0.20.ebuild | 111 -------
10 files changed, 1305 deletions(-)
diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index 73055a9d392..d9d45dcf80e 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1,4 +1 @@
-DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
-DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99
DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1
-DIST mysql-connector-c-6.1.11-src.tar.gz 3489345 BLAKE2B 813512520ef660521221565a4466e81d902629d0ee731f746b68eed2b9129ea8361fcabe184537ec8ba91aed5a4b02dfb3450b36524c2e98f81fba148eee0cf1 SHA512 271395c888a93b833e0bbe1840b9987ecdb37d0f1cf89904207cc9aa99ed32e538aee8c9529ff39b6533947159776a8f5aa079da86ed51b1d26b086f4ffdd7c6
diff --git a/dev-db/mysql-connector-c/files/20028_all_mysql-5.6-gcc7.patch b/dev-db/mysql-connector-c/files/20028_all_mysql-5.6-gcc7.patch
deleted file mode 100644
index cf8caedb7f1..00000000000
--- a/dev-db/mysql-connector-c/files/20028_all_mysql-5.6-gcc7.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/sql-common/client_authentication.cc b/sql-common/client_authentication.cc
-index eaeb2d4..035ecd2 100644
---- a/sql-common/client_authentication.cc
-+++ b/sql-common/client_authentication.cc
-@@ -84,7 +84,7 @@ RSA *rsa_init(MYSQL *mysql)
-
- if (mysql->options.extension != NULL &&
- mysql->options.extension->server_public_key_path != NULL &&
-- mysql->options.extension->server_public_key_path != '\0')
-+ mysql->options.extension->server_public_key_path[0] != '\0')
- {
- pub_key_file= fopen(mysql->options.extension->server_public_key_path,
- "r");
diff --git a/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch b/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch
deleted file mode 100644
index 3459206e4f7..00000000000
--- a/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch
+++ /dev/null
@@ -1,300 +0,0 @@
-From 7961393dd45e4ad1cdc7544b4bba2e98a5d2760c Mon Sep 17 00:00:00 2001
-From: eroen <eroen@occam.eroen.eu>
-Date: Fri, 20 Jan 2017 14:43:53 +0100
-Subject: [PATCH] Don't use deprecated API with openssl 1.1
-
-If openssl 1.1.0 is built with `--api=1.1 disable-deprecated`, using
-deprecated APIs causes build errors.
-
-X-Gentoo-Bug: 606600
-X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=606600
----
- mysys_ssl/my_aes_openssl.cc | 54 ++++++++++++++++++++++++++++++++-------------
- sql-common/client.c | 16 ++++++++++++--
- vio/viossl.c | 8 +++++++
- vio/viosslfactories.c | 23 +++++++++++++++++++
- 4 files changed, 84 insertions(+), 17 deletions(-)
-
-diff --git a/mysys_ssl/my_aes_openssl.cc b/mysys_ssl/my_aes_openssl.cc
-index 261ba8a..59a95e3 100644
---- a/mysys_ssl/my_aes_openssl.cc
-+++ b/mysys_ssl/my_aes_openssl.cc
-@@ -22,6 +22,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
- #include <openssl/evp.h>
- #include <openssl/err.h>
- #include <openssl/bio.h>
-+#include <openssl/opensslv.h>
-+
-+#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L)
-+#undef OPENSSL_VERSION_NUMBER
-+#define OPENSSL_VERSION_NUMBER 0x1000107fL
-+#endif
-
- /*
- xplugin needs BIO_new_bio_pair, but the server does not.
-@@ -122,7 +128,7 @@ int my_aes_encrypt(const unsigned char *source, uint32 source_length,
- enum my_aes_opmode mode, const unsigned char *iv,
- bool padding)
- {
-- EVP_CIPHER_CTX ctx;
-+ EVP_CIPHER_CTX *ctx;
- const EVP_CIPHER *cipher= aes_evp_type(mode);
- int u_len, f_len;
- /* The real key to be used for encryption */
-@@ -132,23 +138,31 @@ int my_aes_encrypt(const unsigned char *source, uint32 source_length,
- if (!cipher || (EVP_CIPHER_iv_length(cipher) > 0 && !iv))
- return MY_AES_BAD_DATA;
-
-- if (!EVP_EncryptInit(&ctx, cipher, rkey, iv))
-+ if (!EVP_EncryptInit(ctx, cipher, rkey, iv))
- goto aes_error; /* Error */
-- if (!EVP_CIPHER_CTX_set_padding(&ctx, padding))
-+ if (!EVP_CIPHER_CTX_set_padding(ctx, padding))
- goto aes_error; /* Error */
-- if (!EVP_EncryptUpdate(&ctx, dest, &u_len, source, source_length))
-+ if (!EVP_EncryptUpdate(ctx, dest, &u_len, source, source_length))
- goto aes_error; /* Error */
-
-- if (!EVP_EncryptFinal(&ctx, dest + u_len, &f_len))
-+ if (!EVP_EncryptFinal(ctx, dest + u_len, &f_len))
- goto aes_error; /* Error */
-
-- EVP_CIPHER_CTX_cleanup(&ctx);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+ EVP_CIPHER_CTX_cleanup(ctx);
-+#else
-+ EVP_CIPHER_CTX_free(ctx);
-+#endif
- return u_len + f_len;
-
- aes_error:
- /* need to explicitly clean up the error if we want to ignore it */
- ERR_clear_error();
-- EVP_CIPHER_CTX_cleanup(&ctx);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+ EVP_CIPHER_CTX_cleanup(ctx);
-+#else
-+ EVP_CIPHER_CTX_free(ctx);
-+#endif
- return MY_AES_BAD_DATA;
- }
-
-@@ -159,7 +173,7 @@ int my_aes_decrypt(const unsigned char *source, uint32 source_length,
- bool padding)
- {
-
-- EVP_CIPHER_CTX ctx;
-+ EVP_CIPHER_CTX *ctx;
- const EVP_CIPHER *cipher= aes_evp_type(mode);
- int u_len, f_len;
-
-@@ -170,24 +184,34 @@ int my_aes_decrypt(const unsigned char *source, uint32 source_length,
- if (!cipher || (EVP_CIPHER_iv_length(cipher) > 0 && !iv))
- return MY_AES_BAD_DATA;
-
-- EVP_CIPHER_CTX_init(&ctx);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+ EVP_CIPHER_CTX_init(ctx);
-+#endif
-
-- if (!EVP_DecryptInit(&ctx, aes_evp_type(mode), rkey, iv))
-+ if (!EVP_DecryptInit(ctx, aes_evp_type(mode), rkey, iv))
- goto aes_error; /* Error */
-- if (!EVP_CIPHER_CTX_set_padding(&ctx, padding))
-+ if (!EVP_CIPHER_CTX_set_padding(ctx, padding))
- goto aes_error; /* Error */
-- if (!EVP_DecryptUpdate(&ctx, dest, &u_len, source, source_length))
-+ if (!EVP_DecryptUpdate(ctx, dest, &u_len, source, source_length))
- goto aes_error; /* Error */
-- if (!EVP_DecryptFinal_ex(&ctx, dest + u_len, &f_len))
-+ if (!EVP_DecryptFinal_ex(ctx, dest + u_len, &f_len))
- goto aes_error; /* Error */
-
-- EVP_CIPHER_CTX_cleanup(&ctx);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+ EVP_CIPHER_CTX_cleanup(ctx);
-+#else
-+ EVP_CIPHER_CTX_free(ctx);
-+#endif
- return u_len + f_len;
-
- aes_error:
- /* need to explicitly clean up the error if we want to ignore it */
- ERR_clear_error();
-- EVP_CIPHER_CTX_cleanup(&ctx);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+ EVP_CIPHER_CTX_cleanup(ctx);
-+#else
-+ EVP_CIPHER_CTX_free(ctx);
-+#endif
- return MY_AES_BAD_DATA;
- }
-
-diff --git a/sql-common/client.c b/sql-common/client.c
-index 9e88e9f..fe7daf7 100644
---- a/sql-common/client.c
-+++ b/sql-common/client.c
-@@ -86,6 +86,14 @@ my_bool net_flush(NET *net);
- # include <sys/un.h>
- #endif
-
-+#ifdef HAVE_OPENSSL
-+#include <openssl/opensslv.h>
-+#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L)
-+#undef OPENSSL_VERSION_NUMBER
-+#define OPENSSL_VERSION_NUMBER 0x1000107fL
-+#endif
-+#endif
-+
- #ifndef _WIN32
- #include <errno.h>
- #define SOCKET_ERROR -1
-@@ -2685,7 +2693,7 @@ static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const c
- {
- SSL *ssl;
- X509 *server_cert= NULL;
-- char *cn= NULL;
-+ const char *cn= NULL;
- int cn_loc= -1;
- ASN1_STRING *cn_asn1= NULL;
- X509_NAME_ENTRY *cn_entry= NULL;
-@@ -2757,7 +2765,11 @@ static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const c
- goto error;
- }
-
-- cn= (char *) ASN1_STRING_data(cn_asn1);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+ cn= (const char *) ASN1_STRING_data(cn_asn1);
-+#else
-+ cn= (const char *) ASN1_STRING_get0_data(cn_asn1);
-+#endif
-
- // There should not be any NULL embedded in the CN
- if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn))
-diff --git a/vio/viossl.c b/vio/viossl.c
-index 5622cb7..94b0f09 100644
---- a/vio/viossl.c
-+++ b/vio/viossl.c
-@@ -24,6 +24,12 @@
-
- #ifdef HAVE_OPENSSL
-
-+#include <openssl/opensslv.h>
-+#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L)
-+#undef OPENSSL_VERSION_NUMBER
-+#define OPENSSL_VERSION_NUMBER 0x1000107fL
-+#endif
-+
- #ifndef DBUG_OFF
-
- static void
-@@ -310,8 +316,10 @@ void vio_ssl_delete(Vio *vio)
- }
-
- #ifndef HAVE_YASSL
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- ERR_remove_thread_state(0);
- #endif
-+#endif
-
- vio_delete(vio);
- }
-@@ -427,7 +427,12 @@
- for (j = 0; j < n; j++)
- {
- SSL_COMP *c = sk_SSL_COMP_value(ssl_comp_methods, j);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- DBUG_PRINT("info", (" %d: %s\n", c->id, c->name));
-+#else /* OPENSSL_VERSION_NUMBER < 0x10100000L */
-+ DBUG_PRINT("info",
-+ (" %d: %s\n", SSL_COMP_get_id(c), SSL_COMP_get0_name(c)));
-+#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
- }
- }
- #endif
-diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
-index da5449a..87b30c3 100644
---- a/vio/viosslfactories.c
-+++ b/vio/viosslfactories.c
-@@ -16,6 +16,14 @@
- #include "vio_priv.h"
-
- #ifdef HAVE_OPENSSL
-+#include <openssl/bn.h>
-+#include <openssl/dh.h>
-+#include <openssl/opensslv.h>
-+
-+#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L)
-+#undef OPENSSL_VERSION_NUMBER
-+#define OPENSSL_VERSION_NUMBER 0x1000107fL
-+#endif
-
- #define TLS_VERSION_OPTION_SIZE 256
- #define SSL_CIPHER_LIST_SIZE 4096
-@@ -121,10 +129,18 @@ static DH *get_dh2048(void)
- DH *dh;
- if ((dh=DH_new()))
- {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL);
- dh->g=BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL);
- if (! dh->p || ! dh->g)
- {
-+#else
-+ if (! DH_set0_pqg(dh,
-+ BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL),
-+ NULL,
-+ BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL)))
-+ {
-+#endif
- DH_free(dh);
- dh=0;
- }
-@@ -247,6 +263,8 @@ typedef struct CRYPTO_dynlock_value
- } openssl_lock_t;
-
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+
- /* Array of locks used by openssl internally for thread synchronization.
- The number of locks is equal to CRYPTO_num_locks.
- */
-@@ -389,9 +407,11 @@ static void deinit_lock_callback_functions()
- {
- set_lock_callback_functions(FALSE);
- }
-+#endif
-
- void vio_ssl_end()
- {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- int i= 0;
-
- if (ssl_initialized) {
-@@ -409,6 +429,7 @@ void vio_ssl_end()
-
- ssl_initialized= FALSE;
- }
-+#endif
- }
-
- #endif //OpenSSL specific
-@@ -419,6 +440,7 @@ void ssl_start()
- {
- ssl_initialized= TRUE;
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- SSL_library_init();
- OpenSSL_add_all_algorithms();
- SSL_load_error_strings();
-@@ -427,6 +449,7 @@ void ssl_start()
- init_ssl_locks();
- init_lock_callback_functions();
- #endif
-+#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
- }
- }
-
---
-2.11.0
-
diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.17-use-relative-include-path-for-udf_registration_types-h.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.17-use-relative-include-path-for-udf_registration_types-h.patch
deleted file mode 100644
index 8fabd9952cc..00000000000
--- a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.17-use-relative-include-path-for-udf_registration_types-h.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-https://bugs.gentoo.org/692644
-
---- a/include/mysql.h.pp
-+++ b/include/mysql.h.pp
-@@ -175,7 +175,7 @@ struct rand_struct {
- unsigned long seed1, seed2, max_value;
- double max_value_dbl;
- };
--#include <mysql/udf_registration_types.h>
-+#include "mysql/udf_registration_types.h"
- enum Item_result {
- INVALID_RESULT = -1,
- STRING_RESULT = 0,
---- a/include/mysql_com.h
-+++ b/include/mysql_com.h
-@@ -1002,7 +1002,7 @@ struct rand_struct {
- };
-
- /* Include the types here so existing UDFs can keep compiling */
--#include <mysql/udf_registration_types.h>
-+#include "mysql/udf_registration_types.h"
-
- /**
- @addtogroup group_cs_compresson_constants Constants when using compression
diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-libressl.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-libressl.patch
deleted file mode 100644
index 1fc949ae856..00000000000
--- a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-libressl.patch
+++ /dev/null
@@ -1,297 +0,0 @@
---- a/cmake/ssl.cmake
-+++ b/cmake/ssl.cmake
-@@ -229,13 +229,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
---- a/mysys/my_md5.cc
-+++ b/mysys/my_md5.cc
-@@ -56,7 +56,9 @@ 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;
-+#ifndef LIBRESSL_VERSION_NUMBER
- fips_mode = FIPS_mode();
-+#endif
- /* If fips mode is ON/STRICT restricted method calls will result into abort,
- * skipping call. */
- if (fips_mode == 0) {
---- 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
-@@ -329,6 +329,7 @@ error:
- return 1;
- }
-
-+#ifndef LIBRESSL_VERSION_NUMBER
- #define OPENSSL_ERROR_LENGTH 512
- static int configure_ssl_fips_mode(const uint fips_mode) {
- int rc = -1;
-@@ -352,6 +353,7 @@ static int configure_ssl_fips_mode(const uint fips_mode) {
- EXIT:
- return rc;
- }
-+#endif
-
- static int configure_ssl_ca(SSL_CTX *ssl_ctx, const char *ca_file,
- const char *ca_path) {
-@@ -555,10 +557,12 @@ 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 LIBRESSL_VERSION_NUMBER
- if (configure_ssl_fips_mode(ssl_fips_mode) != 1) {
- G_ERROR("Error setting the ssl fips mode");
- goto error;
- }
-+#endif
-
- SSL_library_init();
- SSL_load_error_strings();
-@@ -622,7 +626,7 @@ error:
- void xcom_cleanup_ssl() {
- if (!xcom_use_ssl()) return;
-
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- ERR_remove_thread_state(0);
- #endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
- }
---- a/plugin/x/client/xconnection_impl.cc
-+++ b/plugin/x/client/xconnection_impl.cc
-@@ -520,6 +520,7 @@ XError Connection_impl::get_ssl_error(const int error_id) {
- return XError(CR_SSL_CONNECTION_ERROR, buffer);
- }
-
-+#ifndef LIBRESSL_VERSION_NUMBER
- /**
- Set fips mode in openssl library,
- When we set fips mode ON/STRICT, it will perform following operations:
-@@ -559,6 +560,7 @@ int set_fips_mode(const uint32_t fips_mode,
- EXIT:
- return rc;
- }
-+#endif
-
- XError Connection_impl::activate_tls() {
- if (nullptr == m_vio) return get_socket_error(SOCKET_ECONNRESET);
-@@ -569,12 +571,14 @@ XError Connection_impl::activate_tls() {
- if (!m_context->m_ssl_config.is_configured())
- return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED, true};
-
-+#ifndef LIBRESSL_VERSION_NUMBER
- char err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
- if (set_fips_mode(
- static_cast<uint32_t>(m_context->m_ssl_config.m_ssl_fips_mode),
- err_string) != 1) {
- return XError{CR_SSL_CONNECTION_ERROR, err_string, true};
- }
-+#endif
- auto ssl_ctx_flags = process_tls_version(
- details::null_when_empty(m_context->m_ssl_config.m_tls_version));
-
---- 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");
- }
---- a/router/src/http/src/tls_context.cc
-+++ b/router/src/http/src/tls_context.cc
-@@ -91,7 +91,7 @@ static 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
-@@ -120,9 +120,11 @@ void TlsContext::version_range(TlsVersion min_version, TlsVersion max_version) {
- switch (min_version) {
- default:
- // unknown, leave all disabled
-+#ifdef TLS1_3_VERSION
- // fallthrough
- case TlsVersion::TLS_1_3:
- opts |= SSL_OP_NO_TLSv1_2;
-+#endif
- // fallthrough
- case TlsVersion::TLS_1_2:
- opts |= SSL_OP_NO_TLSv1_1;
-@@ -170,8 +172,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:
-@@ -230,7 +234,8 @@ TlsContext::InfoCallback TlsContext::info_callback() const {
- }
-
- int TlsContext::security_level() const {
--#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0)
-+#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \
-+ !defined(LIBRESSL_VERSION_NUMBER)
- return SSL_CTX_get_security_level(ssl_ctx_.get());
- #else
- return 0;
---- a/router/src/http/src/tls_server_context.cc
-+++ b/router/src/http/src/tls_server_context.cc
-@@ -166,7 +166,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
- /*
---- a/sql-common/client.cc
-+++ b/sql-common/client.cc
-@@ -7730,7 +7730,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
- #endif
- break;
- case MYSQL_OPT_SSL_FIPS_MODE: {
--#if defined(HAVE_OPENSSL)
-+#if defined(HAVE_OPENSSL) && !defined(LIBRESSL_VERSION_NUMBER)
- char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
- ENSURE_EXTENSIONS_PRESENT(&mysql->options);
- mysql->options.extension->ssl_fips_mode = *static_cast<const uint *>(arg);
---- a/sql/mysqld.cc
-+++ b/sql/mysqld.cc
-@@ -4818,7 +4818,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
-@@ -4854,12 +4854,14 @@ static void init_ssl() {
- }
-
- static int init_ssl_communication() {
-+#ifndef 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) {
- LogErr(ERROR_LEVEL, ER_SSL_FIPS_MODE_ERROR, ssl_err_string);
- return 1;
- }
-+#endif
- if (SslAcceptorContext::singleton_init(opt_use_ssl)) return 1;
-
- #if OPENSSL_VERSION_NUMBER < 0x10100000L
---- a/sql/sys_vars.cc
-+++ b/sql/sys_vars.cc
-@@ -4417,6 +4417,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 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) {
-@@ -4427,15 +4428,30 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
- return false;
- }
- }
-+#endif
-
-+#if 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};
-+#endif
- static Sys_var_enum Sys_ssl_fips_mode(
- "ssl_fips_mode",
- "SSL FIPS mode (applies only for OpenSSL); "
-+#ifndef LIBRESSL_VERSION_NUMBER
- "permitted values are: OFF, ON, STRICT",
-+#else
-+ "permitted values are: OFF",
-+#endif
- 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), ON_UPDATE(update_fips_mode), NULL);
-+ ON_CHECK(NULL),
-+#ifndef LIBRESSL_VERSION_NUMBER
-+ ON_UPDATE(update_fips_mode),
-+#else
-+ ON_UPDATE(NULL),
-+#endif
-+ NULL);
-
- #if defined(HAVE_OPENSSL)
- static Sys_var_bool Sys_auto_generate_certs(
---- a/vio/viossl.cc
-+++ b/vio/viossl.cc
-@@ -45,7 +45,7 @@
- BIO_set_callback_ex was added in openSSL 1.1.1
- For older openSSL, use the deprecated BIO_set_callback.
- */
--#if OPENSSL_VERSION_NUMBER >= 0x10101000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER)
- #define HAVE_BIO_SET_CALLBACK_EX
- #endif
-
-@@ -637,7 +637,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
- #if !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)
-@@ -645,7 +645,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",
---- a/vio/viosslfactories.cc
-+++ b/vio/viosslfactories.cc
-@@ -420,6 +420,7 @@ void ssl_start() {
- }
- }
-
-+#ifndef LIBRESSL_VERSION_NUMBER
- /**
- Set fips mode in openssl library,
- When we set fips mode ON/STRICT, it will perform following operations:
-@@ -473,6 +474,7 @@ EXIT:
- @returns openssl current fips mode
- */
- uint get_fips_mode() { return FIPS_mode(); }
-+#endif
-
- long process_tls_version(const char *tls_version) {
- const char *separator = ",";
diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.20-libressl.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.20-libressl.patch
deleted file mode 100644
index 88f32419239..00000000000
--- a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.20-libressl.patch
+++ /dev/null
@@ -1,332 +0,0 @@
-From 2108922a8292d74874ede834158c208d81c3cf76 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi@gentoo.org>
-Date: Thu, 30 Apr 2020 20:01:48 +0200
-Subject: [PATCH 5/5] Add LibreSSL support
-
-Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
----
- cmake/ssl.cmake | 5 +++--
- mysys/my_md5.cc | 2 ++
- .../bindings/xcom/xcom/xcom_ssl_transport.c | 6 +++++-
- plugin/x/client/xconnection_impl.cc | 4 ++++
- router/src/http/src/tls_client_context.cc | 2 +-
- router/src/http/src/tls_context.cc | 9 ++++++--
- router/src/http/src/tls_server_context.cc | 3 ++-
- sql-common/client.cc | 2 ++
- sql/mysqld.cc | 4 +++-
- sql/sys_vars.cc | 21 +++++++++++++++++--
- vio/viossl.cc | 8 +++----
- vio/viosslfactories.cc | 2 ++
- 12 files changed, 54 insertions(+), 14 deletions(-)
-
---- a/cmake/ssl.cmake
-+++ b/cmake/ssl.cmake
-@@ -222,13 +222,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
---- a/mysys/my_md5.cc
-+++ b/mysys/my_md5.cc
-@@ -56,7 +56,9 @@ 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;
-+#ifndef LIBRESSL_VERSION_NUMBER
- fips_mode = FIPS_mode();
-+#endif
- /* If fips mode is ON/STRICT restricted method calls will result into abort,
- * skipping call. */
- if (fips_mode == 0) {
---- 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
-@@ -329,6 +329,7 @@ error:
- return 1;
- }
-
-+#ifndef LIBRESSL_VERSION_NUMBER
- #define OPENSSL_ERROR_LENGTH 512
- static int configure_ssl_fips_mode(const uint fips_mode) {
- int rc = -1;
-@@ -352,6 +353,7 @@ static int configure_ssl_fips_mode(const uint fips_mode) {
- EXIT:
- return rc;
- }
-+#endif
-
- static int configure_ssl_ca(SSL_CTX *ssl_ctx, const char *ca_file,
- const char *ca_path) {
-@@ -555,10 +557,12 @@ 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 LIBRESSL_VERSION_NUMBER
- if (configure_ssl_fips_mode(ssl_fips_mode) != 1) {
- G_ERROR("Error setting the ssl fips mode");
- goto error;
- }
-+#endif
-
- SSL_library_init();
- SSL_load_error_strings();
-@@ -622,7 +626,7 @@ error:
- void xcom_cleanup_ssl() {
- if (!xcom_use_ssl()) return;
-
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- ERR_remove_thread_state(0);
- #endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
- }
---- a/plugin/x/client/xconnection_impl.cc
-+++ b/plugin/x/client/xconnection_impl.cc
-@@ -511,6 +511,7 @@ XError Connection_impl::get_ssl_error(const int error_id) {
- return XError(CR_SSL_CONNECTION_ERROR, buffer);
- }
-
-+#ifndef LIBRESSL_VERSION_NUMBER
- /**
- Set fips mode in openssl library,
- When we set fips mode ON/STRICT, it will perform following operations:
-@@ -550,6 +551,7 @@ int set_fips_mode(const uint32_t fips_mode,
- EXIT:
- return rc;
- }
-+#endif
-
- XError Connection_impl::activate_tls() {
- if (nullptr == m_vio) return get_socket_error(SOCKET_ECONNRESET);
-@@ -560,12 +562,14 @@ XError Connection_impl::activate_tls() {
- if (!m_context->m_ssl_config.is_configured())
- return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED, true};
-
-+#ifndef LIBRESSL_VERSION_NUMBER
- char err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
- if (set_fips_mode(
- static_cast<uint32_t>(m_context->m_ssl_config.m_ssl_fips_mode),
- err_string) != 1) {
- return XError{CR_SSL_CONNECTION_ERROR, err_string, true};
- }
-+#endif
- auto ssl_ctx_flags = process_tls_version(
- details::null_when_empty(m_context->m_ssl_config.m_tls_version));
-
---- 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");
- }
---- a/router/src/http/src/tls_context.cc
-+++ b/router/src/http/src/tls_context.cc
-@@ -91,7 +91,7 @@ static 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
-@@ -120,9 +120,11 @@ void TlsContext::version_range(TlsVersion min_version, TlsVersion max_version) {
- switch (min_version) {
- default:
- // unknown, leave all disabled
-+#ifdef TLS1_3_VERSION
- // fallthrough
- case TlsVersion::TLS_1_3:
- opts |= SSL_OP_NO_TLSv1_2;
-+#endif
- // fallthrough
- case TlsVersion::TLS_1_2:
- opts |= SSL_OP_NO_TLSv1_1;
-@@ -170,8 +172,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:
-@@ -230,7 +234,8 @@ TlsContext::InfoCallback TlsContext::info_callback() const {
- }
-
- int TlsContext::security_level() const {
--#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0)
-+#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \
-+ !defined(LIBRESSL_VERSION_NUMBER)
- return SSL_CTX_get_security_level(ssl_ctx_.get());
- #else
- return 0;
---- a/router/src/http/src/tls_server_context.cc
-+++ b/router/src/http/src/tls_server_context.cc
-@@ -167,7 +167,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
- /*
---- a/sql-common/client.cc
-+++ b/sql-common/client.cc
-@@ -7752,6 +7752,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
- return 1;
- break;
- case MYSQL_OPT_SSL_FIPS_MODE: {
-+#if !defined(LIBRESSL_VERSION_NUMBER)
- char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
- ENSURE_EXTENSIONS_PRESENT(&mysql->options);
- mysql->options.extension->ssl_fips_mode = *static_cast<const uint *>(arg);
-@@ -7763,6 +7764,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
- "Set Fips mode ON/STRICT failed, detail: '%s'.", ssl_err_string);
- return 1;
- }
-+#endif
- } break;
- case MYSQL_OPT_SSL_MODE:
- ENSURE_EXTENSIONS_PRESENT(&mysql->options);
---- a/sql/mysqld.cc
-+++ b/sql/mysqld.cc
-@@ -4857,7 +4857,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
-@@ -4891,12 +4891,14 @@ static void init_ssl() {
- }
-
- static int init_ssl_communication() {
-+#ifndef 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) {
- LogErr(ERROR_LEVEL, ER_SSL_FIPS_MODE_ERROR, ssl_err_string);
- return 1;
- }
-+#endif
- if (SslAcceptorContext::singleton_init(opt_use_ssl)) return 1;
-
- #if OPENSSL_VERSION_NUMBER < 0x10100000L
---- a/sql/sys_vars.cc
-+++ b/sql/sys_vars.cc
-@@ -4459,6 +4459,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 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) {
-@@ -4469,15 +4470,31 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
- return false;
- }
- }
-+#endif
-+
-+#if 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};
-+#endif
-
--static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", nullptr};
- static Sys_var_enum Sys_ssl_fips_mode(
- "ssl_fips_mode",
- "SSL FIPS mode (applies only for OpenSSL); "
-+#ifndef LIBRESSL_VERSION_NUMBER
- "permitted values are: OFF, ON, STRICT",
-+#else
-+ "permitted values are: OFF",
-+#endif
- 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(nullptr), ON_UPDATE(update_fips_mode), nullptr);
-+ ON_CHECK(NULL),
-+#ifndef LIBRESSL_VERSION_NUMBER
-+ ON_UPDATE(update_fips_mode),
-+#else
-+ ON_UPDATE(NULL),
-+#endif
-+ NULL);
-
- static Sys_var_bool Sys_auto_generate_certs(
- "auto_generate_certs",
---- a/vio/viossl.cc
-+++ b/vio/viossl.cc
-@@ -45,7 +45,7 @@
- BIO_set_callback_ex was added in openSSL 1.1.1
- For older openSSL, use the deprecated BIO_set_callback.
- */
--#if OPENSSL_VERSION_NUMBER >= 0x10101000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER)
- #define HAVE_BIO_SET_CALLBACK_EX
- #endif
-
-@@ -634,8 +634,8 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
-
- #if !defined(DBUG_OFF)
- {
-- STACK_OF(SSL_COMP) *ssl_comp_methods = nullptr;
-- ssl_comp_methods = SSL_COMP_get_compression_methods();
-+ STACK_OF(SSL_COMP) *ssl_comp_methods = NULL;
-+ 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)
-@@ -643,7 +643,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",
---- a/vio/viosslfactories.cc
-+++ b/vio/viosslfactories.cc
-@@ -472,6 +472,7 @@ void ssl_start() {
- }
- }
-
-+#ifndef LIBRESSL_VERSION_NUMBER
- /**
- Set fips mode in openssl library,
- When we set fips mode ON/STRICT, it will perform following operations:
-@@ -525,6 +526,7 @@ EXIT:
- @returns openssl current fips mode
- */
- uint get_fips_mode() { return FIPS_mode(); }
-+#endif
-
- long process_tls_version(const char *tls_version) {
- const char *separator = ",";
---
-2.26.2
-
diff --git a/dev-db/mysql-connector-c/files/mysql_com.patch b/dev-db/mysql-connector-c/files/mysql_com.patch
deleted file mode 100644
index 36a7d5a2379..00000000000
--- a/dev-db/mysql-connector-c/files/mysql_com.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/include/mysql_com.h 2014-06-10 23:10:43.000000000 -0400
-+++ b/include/mysql_com.h 2015-08-11 15:20:54.487091000 -0400
-@@ -179,7 +171,7 @@
- #define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */
- #define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */
- #define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */
--#define CLIENT_RESERVED2 32768 /* Old flag for 4.1 authentication */
-+#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */
- #define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */
- #define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */
- #define CLIENT_PS_MULTI_RESULTS (1UL << 18) /* Multi-results in PS-protocol */
-@@ -226,7 +216,7 @@
- | CLIENT_IGNORE_SIGPIPE \
- | CLIENT_TRANSACTIONS \
- | CLIENT_RESERVED \
-- | CLIENT_RESERVED2 \
-+ | CLIENT_SECURE_CONNECTION \
- | CLIENT_MULTI_STATEMENTS \
- | CLIENT_MULTI_RESULTS \
- | CLIENT_PS_MULTI_RESULTS \
---- a/libmysql/client_settings.h 2015-02-25 16:09:49.000000000 -0500
-+++ b/libmysql/client_settings.h 2015-08-11 15:44:10.804091000 -0400
-@@ -31,7 +31,7 @@
- CLIENT_LONG_FLAG | \
- CLIENT_TRANSACTIONS | \
- CLIENT_PROTOCOL_41 | \
-- CLIENT_RESERVED2 | \
-+ CLIENT_SECURE_CONNECTION | \
- CLIENT_MULTI_RESULTS | \
- CLIENT_PS_MULTI_RESULTS | \
- CLIENT_PLUGIN_AUTH | \
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-6.1.11-r2.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.11-r2.ebuild
deleted file mode 100644
index 90eb839cd3e..00000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-6.1.11-r2.ebuild
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake-multilib
-
-MULTILIB_WRAPPED_HEADERS+=(
- /usr/include/mysql/my_config.h
-)
-
-# wrap the config script
-MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-
-DESCRIPTION="C client library for MariaDB/MySQL"
-HOMEPAGE="https://dev.mysql.com/downloads/connector/c/"
-LICENSE="GPL-2"
-
-SRC_URI="https://dev.mysql.com/get/Downloads/Connector-C/${P}-src.tar.gz"
-S="${WORKDIR}/${P}-src"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
-
-SUBSLOT="18"
-SLOT="0/${SUBSLOT}"
-IUSE="libressl static-libs"
-
-CDEPEND="
- sys-libs/zlib:=[${MULTILIB_USEDEP}]
- libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
- !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
- "
-RDEPEND="${CDEPEND}
- !dev-db/mariadb-connector-c[mysqlcompat]
- "
-DEPEND="${CDEPEND}"
-
-DOCS=( README )
-PATCHES=(
- "${FILESDIR}/mysql_com.patch"
- "${FILESDIR}/20028_all_mysql-5.6-gcc7.patch"
- "${FILESDIR}/6.1.11-openssl-1.1.patch"
-)
-
-src_prepare() {
- sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
- if use libressl ; then
- sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
- "${S}/cmake/ssl.cmake" || die
- fi
- cmake-utils_src_prepare
-}
-
-multilib_src_configure() {
- local mycmakeargs=(
- -DINSTALL_LAYOUT=RPM
- -DINSTALL_LIBDIR=$(get_libdir)
- -DWITH_DEFAULT_COMPILER_OPTIONS=OFF
- -DWITH_DEFAULT_FEATURE_SET=OFF
- -DENABLED_LOCAL_INFILE=ON
- -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DWITH_ZLIB=system
- -DENABLE_DTRACE=OFF
- -DWITH_SSL=system
- -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
- -DSHARED_LIB_PATCH_VERSION="0"
- )
- cmake-utils_src_configure
-}
-
-multilib_src_install_all() {
- if ! use static-libs ; then
- find "${ED}" -name "*.a" -delete || die
- fi
-}
-
-pkg_preinst() {
- if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
- elog "Due to ABI changes when switching between different client libraries,"
- elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
- elog "Please run: revdep-rebuild --library libmysqlclient.so.${SUBSLOT}"
- ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
- fi
-}
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.19.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.19.ebuild
deleted file mode 100644
index b48adece2a6..00000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.19.ebuild
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake-multilib
-
-# wrap the config script
-MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-
-DESCRIPTION="C client library for MariaDB/MySQL"
-HOMEPAGE="https://dev.mysql.com/downloads/"
-LICENSE="GPL-2"
-
-SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${PV}.tar.gz"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
-
-SLOT="0/21"
-IUSE="ldap libressl static-libs"
-
-RDEPEND="
- >=app-arch/lz4-0_p131:=
- sys-libs/zlib:=[${MULTILIB_USEDEP}]
- ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
- libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
- !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
- "
-DEPEND="${RDEPEND}"
-
-# Avoid file collisions, #692580
-RDEPEND+=" !<dev-db/mysql-5.6.45-r1"
-RDEPEND+=" !=dev-db/mysql-5.7.23*"
-RDEPEND+=" !=dev-db/mysql-5.7.24*"
-RDEPEND+=" !=dev-db/mysql-5.7.25*"
-RDEPEND+=" !=dev-db/mysql-5.7.26-r0"
-RDEPEND+=" !=dev-db/mysql-5.7.27-r0"
-RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1"
-
-DOCS=( README )
-
-S="${WORKDIR}/mysql-${PV}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-8.0.18-always-build-decompress-utilities.patch
- "${FILESDIR}"/${PN}-8.0.17-use-relative-include-path-for-udf_registration_types-h.patch
- "${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
- "${FILESDIR}"/${PN}-8.0.19-libressl.patch
-)
-
-src_prepare() {
- sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
-
- # All these are for the server only.
- # Disable rpm call which would trigger sandbox, #692368
- sed -i \
- -e '/MYSQL_CHECK_LIBEVENT/d' \
- -e '/MYSQL_CHECK_RAPIDJSON/d' \
- -e '/MYSQL_CHECK_ICU/d' \
- -e '/MYSQL_CHECK_EDITLINE/d' \
- -e '/MYSQL_CHECK_CURL/d' \
- -e '/ADD_SUBDIRECTORY(man)/d' \
- -e '/ADD_SUBDIRECTORY(share)/d' \
- -e '/INCLUDE(cmake\/boost/d' \
- -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
- CMakeLists.txt || die
-
- # Skip building clients
- echo > client/CMakeLists.txt || die
-
- # Forcefully disable auth plugin
- if ! use ldap ; then
- sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
- echo > libmysql/authentication_ldap/CMakeLists.txt || die
- fi
-
- cmake-utils_src_prepare
-}
-
-multilib_src_configure() {
- local mycmakeargs=(
- -DINSTALL_LAYOUT=RPM
- -DINSTALL_LIBDIR=$(get_libdir)
- -DWITH_DEFAULT_COMPILER_OPTIONS=OFF
- -DWITH_DEFAULT_FEATURE_SET=OFF
- -DENABLED_LOCAL_INFILE=ON
- -DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
- -DWITH_ZLIB=system
- -DWITH_SSL=system
- -DWITH_NUMA=OFF
- -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
- -DSHARED_LIB_PATCH_VERSION="0"
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- -DWITHOUT_SERVER=ON
- )
- cmake-utils_src_configure
-}
-
-multilib_src_install() {
- cmake-utils_src_install
-}
-
-multilib_src_install_all() {
- doman \
- man/my_print_defaults.1 \
- man/perror.1 \
- man/zlib_decompress.1
-
- if ! use static-libs ; then
- find "${ED}" -name "*.a" -delete || die
- fi
-}
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.20.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.20.ebuild
deleted file mode 100644
index db0c6dcd3c1..00000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.20.ebuild
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake-multilib
-
-# wrap the config script
-MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-
-DESCRIPTION="C client library for MariaDB/MySQL"
-HOMEPAGE="https://dev.mysql.com/downloads/"
-LICENSE="GPL-2"
-
-SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${PV}.tar.gz"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
-
-SLOT="0/21"
-IUSE="ldap libressl static-libs"
-
-RDEPEND="
- >=app-arch/lz4-0_p131:=
- sys-libs/zlib:=[${MULTILIB_USEDEP}]
- ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
- libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
- !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
- "
-DEPEND="${RDEPEND}"
-
-# Avoid file collisions, #692580
-RDEPEND+=" !<dev-db/mysql-5.6.45-r1"
-RDEPEND+=" !=dev-db/mysql-5.7.23*"
-RDEPEND+=" !=dev-db/mysql-5.7.24*"
-RDEPEND+=" !=dev-db/mysql-5.7.25*"
-RDEPEND+=" !=dev-db/mysql-5.7.26-r0"
-RDEPEND+=" !=dev-db/mysql-5.7.27-r0"
-RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1"
-
-DOCS=( README )
-
-S="${WORKDIR}/mysql-${PV}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-8.0.18-always-build-decompress-utilities.patch
- "${FILESDIR}"/${PN}-8.0.17-use-relative-include-path-for-udf_registration_types-h.patch
- "${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
- "${FILESDIR}"/${PN}-8.0.20-libressl.patch
-)
-
-src_prepare() {
- sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
-
- # All these are for the server only.
- # Disable rpm call which would trigger sandbox, #692368
- sed -i \
- -e '/MYSQL_CHECK_LIBEVENT/d' \
- -e '/MYSQL_CHECK_RAPIDJSON/d' \
- -e '/MYSQL_CHECK_ICU/d' \
- -e '/MYSQL_CHECK_EDITLINE/d' \
- -e '/MYSQL_CHECK_CURL/d' \
- -e '/ADD_SUBDIRECTORY(man)/d' \
- -e '/ADD_SUBDIRECTORY(share)/d' \
- -e '/INCLUDE(cmake\/boost/d' \
- -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
- CMakeLists.txt || die
-
- # Skip building clients
- echo > client/CMakeLists.txt || die
-
- # Forcefully disable auth plugin
- if ! use ldap ; then
- sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
- echo > libmysql/authentication_ldap/CMakeLists.txt || die
- fi
-
- cmake-utils_src_prepare
-}
-
-multilib_src_configure() {
- local mycmakeargs=(
- -DINSTALL_LAYOUT=RPM
- -DINSTALL_LIBDIR=$(get_libdir)
- -DWITH_DEFAULT_COMPILER_OPTIONS=OFF
- -DWITH_DEFAULT_FEATURE_SET=OFF
- -DENABLED_LOCAL_INFILE=ON
- -DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
- -DWITH_ZLIB=system
- -DWITH_SSL=system
- -DWITH_NUMA=OFF
- -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
- -DSHARED_LIB_PATCH_VERSION="0"
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- -DWITHOUT_SERVER=ON
- )
- cmake-utils_src_configure
-}
-
-multilib_src_install() {
- cmake-utils_src_install
-}
-
-multilib_src_install_all() {
- doman \
- man/my_print_defaults.1 \
- man/perror.1 \
- man/zlib_decompress.1
-
- if ! use static-libs ; then
- find "${ED}" -name "*.a" -delete || die
- fi
-}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/, dev-db/mysql-connector-c/files/
@ 2020-08-19 10:37 Thomas Deutschmann
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Deutschmann @ 2020-08-19 10:37 UTC (permalink / raw
To: gentoo-commits
commit: 381aa46351b1d3d78dd3af10dd0bdc6c844ff70a
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 19 10:35:35 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Aug 19 10:37:04 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=381aa463
dev-db/mysql-connector-c: survive malformed charset files
Bug: https://bugs.gentoo.org/737002
Package-Manager: Portage-3.0.3, Repoman-3.0.0
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
...ctor-c-8.0.21-survive-malformed-charset-files.patch | 18 ++++++++++++++++++
....0.21.ebuild => mysql-connector-c-8.0.21-r1.ebuild} | 1 +
2 files changed, 19 insertions(+)
diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.21-survive-malformed-charset-files.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.21-survive-malformed-charset-files.patch
new file mode 100644
index 00000000000..72799f009c8
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.21-survive-malformed-charset-files.patch
@@ -0,0 +1,18 @@
+Description: don't crash on malformed charset files
+Origin: https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1877504/comments/19
+Bug: https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1884809
+Bug: https://bugs.gentoo.org/737002
+Forwarded: workaround, not needed
+
+--- a/mysys/charset.cc
++++ b/mysys/charset.cc
+@@ -922,7 +922,7 @@ size_t escape_quotes_for_mysql(CHARSET_I
+
+ void charset_uninit() {
+ for (CHARSET_INFO *cs : all_charsets) {
+- if (cs && cs->coll->uninit) {
++ if (cs && cs->coll && cs->coll->uninit) {
+ cs->coll->uninit(cs);
+ }
+ }
+
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.21.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.21-r1.ebuild
similarity index 97%
rename from dev-db/mysql-connector-c/mysql-connector-c-8.0.21.ebuild
rename to dev-db/mysql-connector-c/mysql-connector-c-8.0.21-r1.ebuild
index c6e4dad56ed..2cd9add1964 100644
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.21.ebuild
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.21-r1.ebuild
@@ -44,6 +44,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-8.0.18-always-build-decompress-utilities.patch
"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
"${FILESDIR}"/${PN}-8.0.21-libressl.patch
+ "${FILESDIR}"/${PN}-8.0.21-survive-malformed-charset-files.patch
)
src_prepare() {
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/, dev-db/mysql-connector-c/files/
@ 2023-04-09 5:31 Sam James
0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2023-04-09 5:31 UTC (permalink / raw
To: gentoo-commits
commit: 016648eda578932e93becd587cbc9bc4e376c9e3
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Apr 7 19:55:08 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 9 05:27:14 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=016648ed
dev-db/mysql-connector-c: Build fixes
* Adds -DWITH_BUILD_ID=OFF to workaround various build issues
* Patches the source to work with musl
Upstream-PR: https://github.com/mysql/mysql-server/pull/455
Closes: https://bugs.gentoo.org/886474
Closes: https://bugs.gentoo.org/903415
Closes: https://bugs.gentoo.org/885035
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/30517
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/mysql-connector-c-8.0.32-musl.patch | 25 ++++++++++++++++++++++
.../mysql-connector-c-8.0.32-r1.ebuild | 2 ++
2 files changed, 27 insertions(+)
diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.32-musl.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.32-musl.patch
new file mode 100644
index 000000000000..252c5eeda32e
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.32-musl.patch
@@ -0,0 +1,25 @@
+https://github.com/mysql/mysql-server/pull/454
+
+From c875f049cb3571da1b9b5bcae50caccc5ee47cfb Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Fri, 7 Apr 2023 12:47:51 -0700
+Subject: [PATCH] sql/memory: Fix the musl build
+
+_SC_LEVEL1_DCACHE_LINESIZE is not specific to linux, but to glibc.
+---
+ sql/memory/aligned_atomic.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sql/memory/aligned_atomic.h b/sql/memory/aligned_atomic.h
+index d13d45b9deea..bd19c0cf4d6f 100644
+--- a/sql/memory/aligned_atomic.h
++++ b/sql/memory/aligned_atomic.h
+@@ -76,7 +76,7 @@ static inline size_t _cache_line_size() {
+ return line_size;
+ }
+
+-#elif defined(__linux__)
++#elif defined(__GLIBC__)
+ static inline size_t _cache_line_size() {
+ long size = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
+ if (size == -1) return 64;
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.32-r1.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.32-r1.ebuild
index 57568257e26e..59782a42d7ae 100644
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.32-r1.ebuild
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.32-r1.ebuild
@@ -51,6 +51,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-8.0.22-always-build-decompress-utilities.patch
"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
"${FILESDIR}"/${PN}-8.0.27-res_n.patch
+ "${FILESDIR}"/${PN}-8.0.32-musl.patch
)
src_prepare() {
@@ -103,6 +104,7 @@ multilib_src_configure() {
-DSHARED_LIB_PATCH_VERSION="0"
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DWITHOUT_SERVER=ON
+ -DWITH_BUILD_ID=OFF
)
cmake_src_configure
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-04-09 5:31 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-22 20:02 [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/, dev-db/mysql-connector-c/files/ Thomas Deutschmann
-- strict thread matches above, loose matches on Subject: below --
2023-04-09 5:31 Sam James
2020-08-19 10:37 Thomas Deutschmann
2020-08-09 21:01 Thomas Deutschmann
2020-01-20 19:26 Thomas Deutschmann
2019-10-16 21:40 Thomas Deutschmann
2019-08-02 14:38 Thomas Deutschmann
2019-06-11 19:09 Brian Evans
2015-08-11 19:52 Brian Evans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox