public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2017-11-21 19:34 Brian Evans
  0 siblings, 0 replies; 15+ messages in thread
From: Brian Evans @ 2017-11-21 19:34 UTC (permalink / raw
  To: gentoo-commits

commit:     e8c5b876c36e2dd221aa26edd577c296fbef39f8
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 21 18:48:25 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Nov 21 19:34:14 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8c5b876

dev-db/mysql-connector-c: Version bump and fix gcc 7 build

Closes: https://bugs.gentoo.org/638360
Package-Manager: Portage-2.3.15, Repoman-2.3.6

 dev-db/mysql-connector-c/Manifest                  |  1 +
 .../files/20028_all_mysql-5.6-gcc7.patch           | 13 ++++
 .../mysql-connector-c-6.1.11.ebuild                | 82 ++++++++++++++++++++++
 3 files changed, 96 insertions(+)

diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index 08b0e7b13d5..6a895e6d895 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1,3 +1,4 @@
+DIST mysql-connector-c-6.1.11-src.tar.gz 3489345 BLAKE2B 813512520ef660521221565a4466e81d902629d0ee731f746b68eed2b9129ea8361fcabe184537ec8ba91aed5a4b02dfb3450b36524c2e98f81fba148eee0cf1 SHA512 271395c888a93b833e0bbe1840b9987ecdb37d0f1cf89904207cc9aa99ed32e538aee8c9529ff39b6533947159776a8f5aa079da86ed51b1d26b086f4ffdd7c6
 DIST mysql-connector-c-6.1.5-src.tar.gz 3455028 SHA256 278f2b40f3980079bc7ad247cb2bf08967ce56ef79da468ae26ff2e2a560be66 SHA512 be47ed70865744ff9ecb9376972208504327514f03635e54c05e81d324bcf9ba777300a12738d8ca32b95c9c31d734dc9f6ebb7bb24fd11821560a6b0f09bb56 WHIRLPOOL bfdd17908cae63ef5b5006bdf28432bb12738044fe99960fdddab6da527ab41211a48396270a778ce500c5758c2f5d50c1fd850a92c684996612ab7c38637c61
 DIST mysql-connector-c-6.1.6-src.tar.gz 3475044 SHA256 2222433012c415871958b61bc4f3683e1ebe77e3389f698b267058c12533ea78 SHA512 2a3db4aec5b8e5357fa407d6e2b52534f7aa9c0b78c4ebe9a61e2e25dc5f7dc1f1962f6e6fd847107ce53ca369e0babe7118b947a87189495212596348cfd760 WHIRLPOOL 6a0a55a47a88606c12511f9fd155bafcf5d73b1ffa2c4877b838bca018f4a8a8f4427ac6af6e4c567eced7e1108dba4a613255f813ab481e8ea948b3a6cdff33
 DIST mysql-connector-c-6.1.9-src.tar.gz 3494748 SHA256 4e808704443365ad5b649673d03eca8fbebc0a4da9f1f96616c6bd1b1901ab2b SHA512 3127d08428e820044e25ab5ebb741a128325be6ca0fca0300cab33891693e11e57d4ded5a25918a67d23cceb8a2c6ee99879ffb50c31bc4c2e225a9dba9674dc WHIRLPOOL 7f0cb1fa7bb0f77447f4884b567e7881d8d9c1dda2e27250838fe8a51ac4ddcb8f7aa683fe11a3f7f9545f90918b15fe9e033da138c86e5bd4f360164ebaeb2e

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
new file mode 100644
index 00000000000..cf8caedb7f1
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/20028_all_mysql-5.6-gcc7.patch
@@ -0,0 +1,13 @@
+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/mysql-connector-c-6.1.11.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.11.ebuild
new file mode 100644
index 00000000000..c4494ba6484
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-6.1.11.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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 ~ia64 ~ppc64 ~x86"
+
+SUBSLOT="18"
+SLOT="0/${SUBSLOT}"
+IUSE="+ssl static-libs"
+
+CDEPEND="
+	sys-libs/zlib:=[${MULTILIB_USEDEP}]
+	ssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+	"
+RDEPEND="${CDEPEND}
+	!dev-db/mysql[client-libs(+)]
+	!dev-db/mysql-cluster[client-libs(+)]
+	!dev-db/mariadb[client-libs(+)]
+	!dev-db/mariadb-connector-c[mysqlcompat]
+	!dev-db/mariadb-galera[client-libs(+)]
+	!dev-db/percona-server[client-libs(+)]
+	"
+DEPEND="${CDEPEND}"
+
+DOCS=( README )
+PATCHES=(
+	"${FILESDIR}/mysql_com.patch"
+	"${FILESDIR}/20028_all_mysql-5.6-gcc7.patch"
+)
+
+src_prepare() {
+	sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
+	cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+	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=$(usex ssl system bundled)
+		-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
+}


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2017-11-21 19:34 Brian Evans
  0 siblings, 0 replies; 15+ messages in thread
From: Brian Evans @ 2017-11-21 19:34 UTC (permalink / raw
  To: gentoo-commits

commit:     326b50e8bb31240f7e21801b6fce6b6e83b4a316
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 21 18:50:48 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Nov 21 19:34:18 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=326b50e8

dev-db/mysql-connector-c: Drop old

Package-Manager: Portage-2.3.15, Repoman-2.3.6

 dev-db/mysql-connector-c/Manifest                  |  3 -
 .../mysql-connector-c/files/conn-c-includes.patch  | 15 ----
 .../files/openssl-cmake-detection.patch            | 12 ----
 .../mysql-connector-c-6.1.5.ebuild                 | 59 ----------------
 .../mysql-connector-c-6.1.6-r1.ebuild              | 67 ------------------
 .../mysql-connector-c-6.1.6-r2.ebuild              | 76 --------------------
 .../mysql-connector-c-6.1.9-r1.ebuild              | 80 ----------------------
 .../mysql-connector-c-6.1.9.ebuild                 | 73 --------------------
 8 files changed, 385 deletions(-)

diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index 6a895e6d895..f276bb6a0be 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1,4 +1 @@
 DIST mysql-connector-c-6.1.11-src.tar.gz 3489345 BLAKE2B 813512520ef660521221565a4466e81d902629d0ee731f746b68eed2b9129ea8361fcabe184537ec8ba91aed5a4b02dfb3450b36524c2e98f81fba148eee0cf1 SHA512 271395c888a93b833e0bbe1840b9987ecdb37d0f1cf89904207cc9aa99ed32e538aee8c9529ff39b6533947159776a8f5aa079da86ed51b1d26b086f4ffdd7c6
-DIST mysql-connector-c-6.1.5-src.tar.gz 3455028 SHA256 278f2b40f3980079bc7ad247cb2bf08967ce56ef79da468ae26ff2e2a560be66 SHA512 be47ed70865744ff9ecb9376972208504327514f03635e54c05e81d324bcf9ba777300a12738d8ca32b95c9c31d734dc9f6ebb7bb24fd11821560a6b0f09bb56 WHIRLPOOL bfdd17908cae63ef5b5006bdf28432bb12738044fe99960fdddab6da527ab41211a48396270a778ce500c5758c2f5d50c1fd850a92c684996612ab7c38637c61
-DIST mysql-connector-c-6.1.6-src.tar.gz 3475044 SHA256 2222433012c415871958b61bc4f3683e1ebe77e3389f698b267058c12533ea78 SHA512 2a3db4aec5b8e5357fa407d6e2b52534f7aa9c0b78c4ebe9a61e2e25dc5f7dc1f1962f6e6fd847107ce53ca369e0babe7118b947a87189495212596348cfd760 WHIRLPOOL 6a0a55a47a88606c12511f9fd155bafcf5d73b1ffa2c4877b838bca018f4a8a8f4427ac6af6e4c567eced7e1108dba4a613255f813ab481e8ea948b3a6cdff33
-DIST mysql-connector-c-6.1.9-src.tar.gz 3494748 SHA256 4e808704443365ad5b649673d03eca8fbebc0a4da9f1f96616c6bd1b1901ab2b SHA512 3127d08428e820044e25ab5ebb741a128325be6ca0fca0300cab33891693e11e57d4ded5a25918a67d23cceb8a2c6ee99879ffb50c31bc4c2e225a9dba9674dc WHIRLPOOL 7f0cb1fa7bb0f77447f4884b567e7881d8d9c1dda2e27250838fe8a51ac4ddcb8f7aa683fe11a3f7f9545f90918b15fe9e033da138c86e5bd4f360164ebaeb2e

diff --git a/dev-db/mysql-connector-c/files/conn-c-includes.patch b/dev-db/mysql-connector-c/files/conn-c-includes.patch
deleted file mode 100644
index fcde71f3f4e..00000000000
--- a/dev-db/mysql-connector-c/files/conn-c-includes.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -aurN a/include/CMakeLists.txt b/include/CMakeLists.txt
---- a/include/CMakeLists.txt	2015-07-14 13:06:04.424091000 -0400
-+++ b/include/CMakeLists.txt	2015-07-14 13:24:43.434091000 -0400
-@@ -55,6 +55,11 @@
-   byte_order_generic_x86.h
-   little_endian.h
-   big_endian.h
-+  my_thread_local.h
-+  thr_cond.h
-+  thr_lock.h
-+  thr_mutex.h
-+  thr_rwlock.h
-   ${HEADERS_GEN_CONFIGURE}
- )
- 

diff --git a/dev-db/mysql-connector-c/files/openssl-cmake-detection.patch b/dev-db/mysql-connector-c/files/openssl-cmake-detection.patch
deleted file mode 100644
index 3a5f53e7ba3..00000000000
--- a/dev-db/mysql-connector-c/files/openssl-cmake-detection.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -aurN a/cmake/ssl.cmake b/cmake/ssl.cmake
---- a/cmake/ssl.cmake	2014-11-21 00:39:51.000000000 -0500
-+++ b/cmake/ssl.cmake	2015-01-27 08:45:36.771744344 -0500
-@@ -166,7 +166,7 @@
-     # Encoded as MNNFFPPS: major minor fix patch status
-     FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
-       OPENSSL_VERSION_NUMBER
--      REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
-+      REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
-     )
-     STRING(REGEX REPLACE
-       "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"

diff --git a/dev-db/mysql-connector-c/mysql-connector-c-6.1.5.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.5.ebuild
deleted file mode 100644
index 1813980a093..00000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-6.1.5.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-multilib eutils
-
-MULTILIB_WRAPPED_HEADERS+=(
-	/usr/include/mysql/my_config.h
-)
-
-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="~amd64 ~x86"
-
-SLOT="0/18"
-IUSE="+ssl static-libs"
-
-CDEPEND="
-	sys-libs/zlib:=[${MULTILIB_USEDEP}]
-	ssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )
-	"
-RDEPEND="${CDEPEND}
-	!dev-db/mysql[client-libs(+)]
-	!dev-db/mysql-cluster[client-libs(+)]
-	!dev-db/mariadb[client-libs(+)]
-	!dev-db/mariadb-connector-c[mysqlcompat]
-	!dev-db/mariadb-galera[client-libs(+)]
-	!dev-db/percona-server[client-libs(+)]
-	"
-DEPEND="${CDEPEND}"
-
-DOCS=( README Docs/ChangeLog )
-PATCHES=( "${FILESDIR}/openssl-cmake-detection.patch" )
-
-multilib_src_configure() {
-	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=$(usex ssl system bundled)
-	)
-	cmake-utils_src_configure
-}
-
-multilib_src_install_all() {
-	if ! use static-libs ; then
-		find "${ED}" -name "*.a" -delete || die
-	fi
-}

diff --git a/dev-db/mysql-connector-c/mysql-connector-c-6.1.6-r1.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.6-r1.ebuild
deleted file mode 100644
index b7b764fde62..00000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-6.1.6-r1.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-multilib eutils
-
-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="~amd64 ~ia64 ~ppc64 ~x86"
-
-SLOT="0/18"
-IUSE="+ssl static-libs"
-
-CDEPEND="
-	sys-libs/zlib:=[${MULTILIB_USEDEP}]
-	ssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )
-	"
-RDEPEND="${CDEPEND}
-	!dev-db/mysql[client-libs(+)]
-	!dev-db/mysql-cluster[client-libs(+)]
-	!dev-db/mariadb[client-libs(+)]
-	!dev-db/mariadb-connector-c[mysqlcompat]
-	!dev-db/mariadb-galera[client-libs(+)]
-	!dev-db/percona-server[client-libs(+)]
-	"
-DEPEND="${CDEPEND}"
-
-DOCS=( README Docs/ChangeLog )
-
-PATCHES=(
-	"${FILESDIR}/openssl-cmake-detection.patch"
-	"${FILESDIR}/conn-c-includes.patch"
-	"${FILESDIR}/mysql_com.patch"
-)
-
-multilib_src_configure() {
-	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=$(usex ssl system bundled)
-	)
-	cmake-utils_src_configure
-}
-
-multilib_src_install_all() {
-	if ! use static-libs ; then
-		find "${ED}" -name "*.a" -delete || die
-	fi
-}

diff --git a/dev-db/mysql-connector-c/mysql-connector-c-6.1.6-r2.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.6-r2.ebuild
deleted file mode 100644
index fccb70097d1..00000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-6.1.6-r2.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit cmake-multilib eutils 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 ~ia64 ~ppc64 ~x86"
-
-SUBSLOT="18"
-SLOT="0/${SUBSLOT}"
-IUSE="+ssl static-libs"
-
-CDEPEND="
-	sys-libs/zlib:=[${MULTILIB_USEDEP}]
-	ssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
-	"
-RDEPEND="${CDEPEND}
-	!dev-db/mysql[client-libs(+)]
-	!dev-db/mysql-cluster[client-libs(+)]
-	!dev-db/mariadb[client-libs(+)]
-	!dev-db/mariadb-connector-c[mysqlcompat]
-	!dev-db/mariadb-galera[client-libs(+)]
-	!dev-db/percona-server[client-libs(+)]
-	"
-DEPEND="${CDEPEND}"
-
-DOCS=( README Docs/ChangeLog )
-PATCHES=(
-	"${FILESDIR}/openssl-cmake-detection.patch"
-	"${FILESDIR}/conn-c-includes.patch"
-	"${FILESDIR}/mysql_com.patch"
-)
-
-multilib_src_configure() {
-	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=$(usex ssl system bundled)
-	)
-	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-6.1.9-r1.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.9-r1.ebuild
deleted file mode 100644
index 7a1da326d8a..00000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-6.1.9-r1.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-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 ~ia64 ~ppc64 ~x86"
-
-SUBSLOT="18"
-SLOT="0/${SUBSLOT}"
-IUSE="+ssl static-libs"
-
-CDEPEND="
-	sys-libs/zlib:=[${MULTILIB_USEDEP}]
-	ssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
-	"
-RDEPEND="${CDEPEND}
-	!dev-db/mysql[client-libs(+)]
-	!dev-db/mysql-cluster[client-libs(+)]
-	!dev-db/mariadb[client-libs(+)]
-	!dev-db/mariadb-connector-c[mysqlcompat]
-	!dev-db/mariadb-galera[client-libs(+)]
-	!dev-db/percona-server[client-libs(+)]
-	"
-DEPEND="${CDEPEND}"
-
-DOCS=( README Docs/ChangeLog )
-PATCHES=(
-	"${FILESDIR}/mysql_com.patch" )
-
-src_prepare() {
-	sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
-	cmake-utils_src_prepare
-}
-
-multilib_src_configure() {
-	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=$(usex ssl system bundled)
-		-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-6.1.9.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.9.ebuild
deleted file mode 100644
index 2868be92897..00000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-6.1.9.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-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 ~ia64 ~ppc64 ~x86"
-
-SUBSLOT="18"
-SLOT="0/${SUBSLOT}"
-IUSE="+ssl static-libs"
-
-CDEPEND="
-	sys-libs/zlib:=[${MULTILIB_USEDEP}]
-	ssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
-	"
-RDEPEND="${CDEPEND}
-	!dev-db/mysql[client-libs(+)]
-	!dev-db/mysql-cluster[client-libs(+)]
-	!dev-db/mariadb[client-libs(+)]
-	!dev-db/mariadb-connector-c[mysqlcompat]
-	!dev-db/mariadb-galera[client-libs(+)]
-	!dev-db/percona-server[client-libs(+)]
-	"
-DEPEND="${CDEPEND}"
-
-DOCS=( README Docs/ChangeLog )
-PATCHES=(
-	"${FILESDIR}/mysql_com.patch" )
-
-multilib_src_configure() {
-	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=$(usex ssl system bundled)
-	)
-	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
-}


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2018-05-02 14:34 Brian Evans
  0 siblings, 0 replies; 15+ messages in thread
From: Brian Evans @ 2018-05-02 14:34 UTC (permalink / raw
  To: gentoo-commits

commit:     5d874ef4f478adbf245793017b1e6fc02f1e40a8
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed May  2 14:34:28 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed May  2 14:34:28 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d874ef4

dev-db/mysql-connector-c: Add openssl-1.1 compatibility patch

Closes: https://bugs.gentoo.org/606600
Package-Manager: Portage-2.3.31, Repoman-2.3.9

 .../files/6.1.11-openssl-1.1.patch                 | 287 +++++++++++++++++++++
 .../mysql-connector-c-6.1.11-r1.ebuild             |   3 +-
 2 files changed, 289 insertions(+), 1 deletion(-)

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
new file mode 100644
index 00000000000..cbca14de60b
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch
@@ -0,0 +1,287 @@
+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);
+ }
+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),
++              BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL),
++              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/mysql-connector-c-6.1.11-r1.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.11-r1.ebuild
index 0895cd112ad..c865a0fc652 100644
--- a/dev-db/mysql-connector-c/mysql-connector-c-6.1.11-r1.ebuild
+++ b/dev-db/mysql-connector-c/mysql-connector-c-6.1.11-r1.ebuild
@@ -45,6 +45,7 @@ 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() {
@@ -57,7 +58,7 @@ src_prepare() {
 }
 
 multilib_src_configure() {
-	mycmakeargs+=(
+	local mycmakeargs=(
 		-DINSTALL_LAYOUT=RPM
 		-DINSTALL_LIBDIR=$(get_libdir)
 		-DWITH_DEFAULT_COMPILER_OPTIONS=OFF


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2019-08-23  0:24 Thomas Deutschmann
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Deutschmann @ 2019-08-23  0:24 UTC (permalink / raw
  To: gentoo-commits

commit:     5dfeaff018ab1d02b0c8cb80ed0ec1eda7af1f29
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 23 00:16:24 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Aug 23 00:24:13 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5dfeaff0

dev-db/mysql-connector-c: Use relative include path for udf_registration_types.h

Closes: https://bugs.gentoo.org/692644
Package-Manager: Portage-2.3.72, Repoman-2.3.17
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 ...include-path-for-udf_registration_types-h.patch | 24 ++++++++++++++++++++++
 ...2.ebuild => mysql-connector-c-8.0.17-r3.ebuild} |  1 +
 2 files changed, 25 insertions(+)

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
new file mode 100644
index 00000000000..8fabd9952cc
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.17-use-relative-include-path-for-udf_registration_types-h.patch
@@ -0,0 +1,24 @@
+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/mysql-connector-c-8.0.17-r2.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.17-r3.ebuild
similarity index 96%
rename from dev-db/mysql-connector-c/mysql-connector-c-8.0.17-r2.ebuild
rename to dev-db/mysql-connector-c/mysql-connector-c-8.0.17-r3.ebuild
index 3eb18955b0b..f705146ace5 100644
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.17-r2.ebuild
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.17-r3.ebuild
@@ -41,6 +41,7 @@ S="${WORKDIR}/mysql-${PV}"
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-8.0.17-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
 )
 


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2020-01-20 19:26 Thomas Deutschmann
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Deutschmann @ 2020-01-20 19:26 UTC (permalink / raw
  To: gentoo-commits

commit:     06f3a18c17436585c25146f35577d88529d20533
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 20 18:12:28 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Jan 20 19:26:26 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06f3a18c

dev-db/mysql-connector-c: drop old

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                  |   2 -
 ...-8.0.17-always-build-decompress-utilities.patch |  22 --
 .../files/mysql-connector-c-8.0.17-libressl.patch  | 258 ---------------------
 .../mysql-connector-c-8.0.17-r3.ebuild             | 111 ---------
 .../mysql-connector-c-8.0.18.ebuild                | 110 ---------
 5 files changed, 503 deletions(-)

diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index 545daa75efd..810277618eb 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1,4 +1,2 @@
-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.17-always-build-decompress-utilities.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.17-always-build-decompress-utilities.patch
deleted file mode 100644
index 927662705aa..00000000000
--- a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.17-always-build-decompress-utilities.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- 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/files/mysql-connector-c-8.0.17-libressl.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.17-libressl.patch
deleted file mode 100644
index 340f894a895..00000000000
--- a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.17-libressl.patch
+++ /dev/null
@@ -1,258 +0,0 @@
-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-r3.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.17-r3.ebuild
deleted file mode 100644
index 3c047b80fc2..00000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.17-r3.ebuild
+++ /dev/null
@@ -1,111 +0,0 @@
-# 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.17-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_RE2/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.18.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.18.ebuild
deleted file mode 100644
index 6f10fa81b8b..00000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.18.ebuild
+++ /dev/null
@@ -1,110 +0,0 @@
-# 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] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2020-04-30 20:45 Thomas Deutschmann
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Deutschmann @ 2020-04-30 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     78c20fc6a719fdcc951c503a3b998b1e7c9c5046
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 30 19:48:00 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Apr 30 20:44:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78c20fc6

dev-db/mysql-connector-c: bump to v8.0.20

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql-connector-c/Manifest                  |   1 +
 .../files/mysql-connector-c-8.0.20-libressl.patch  | 332 +++++++++++++++++++++
 .../mysql-connector-c-8.0.20.ebuild                | 111 +++++++
 3 files changed, 444 insertions(+)

diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index 810277618eb..f72027980de 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1,2 +1,3 @@
 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-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.20-libressl.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.20-libressl.patch
new file mode 100644
index 00000000000..88f32419239
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.20-libressl.patch
@@ -0,0 +1,332 @@
+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/mysql-connector-c-8.0.20.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.20.ebuild
new file mode 100644
index 00000000000..db0c6dcd3c1
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.20.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 ~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] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2020-07-26  1:46 Thomas Deutschmann
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Deutschmann @ 2020-07-26  1:46 UTC (permalink / raw
  To: gentoo-commits

commit:     1d894c8334d1705f5f748c1306b319ecbd55b7de
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 26 01:29:15 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jul 26 01:46:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d894c83

dev-db/mysql-connector-c: bump to v8.0.21

Package-Manager: Portage-3.0.0, Repoman-2.3.23
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 .../files/mysql-connector-c-8.0.21-libressl.patch  | 356 +++++++++++++++++++++
 .../mysql-connector-c-8.0.21.ebuild                |   3 +-
 2 files changed, 357 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.21-libressl.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.21-libressl.patch
new file mode 100644
index 00000000000..78f3e78fd6d
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.21-libressl.patch
@@ -0,0 +1,356 @@
+From 4aadff7b08f6a69160a44c1742d5a12fb5abc059 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.cc  |  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(-)
+
+diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
+index 52feadeaa..3b8332695 100644
+--- 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
+diff --git a/mysys/my_md5.cc b/mysys/my_md5.cc
+index dea997b25..531696329 100644
+--- 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) {
+diff --git a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
+index 8bf63ce14..02f91b44e 100644
+--- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
++++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
+@@ -325,6 +325,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;
+@@ -348,6 +349,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) {
+@@ -544,10 +546,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();
+@@ -611,7 +615,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 */
+ }
+diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc
+index 13bc6794e..5223169db 100644
+--- a/plugin/x/client/xconnection_impl.cc
++++ b/plugin/x/client/xconnection_impl.cc
+@@ -498,6 +498,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:
+@@ -537,6 +538,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);
+@@ -547,12 +549,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));
+ 
+diff --git a/router/src/http/src/tls_client_context.cc b/router/src/http/src/tls_client_context.cc
+index 297ceee30..7c1157289 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 60ed7e6ca..388ef8f28 100644
+--- 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;
+diff --git a/router/src/http/src/tls_server_context.cc b/router/src/http/src/tls_server_context.cc
+index 0f4472419..707d7de86 100644
+--- 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
+     /*
+diff --git a/sql-common/client.cc b/sql-common/client.cc
+index ffb136b5b..8a0c7b834 100644
+--- a/sql-common/client.cc
++++ b/sql-common/client.cc
+@@ -7766,6 +7766,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);
+@@ -7777,6 +7778,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);
+diff --git a/sql/mysqld.cc b/sql/mysqld.cc
+index 682e8d5ae..96a922d7a 100644
+--- a/sql/mysqld.cc
++++ b/sql/mysqld.cc
+@@ -5109,7 +5109,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
+@@ -5143,12 +5143,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 (TLS_channel::singleton_init(&mysql_main, mysql_main_channel, opt_use_ssl,
+                                   &server_main_callback, opt_initialize))
+     return 1;
+diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
+index 5b1a82d2f..4e2dff865 100644
+--- a/sql/sys_vars.cc
++++ b/sql/sys_vars.cc
+@@ -4474,6 +4474,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) {
+@@ -4484,15 +4485,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",
+diff --git a/vio/viossl.cc b/vio/viossl.cc
+index 0e9594741..3a589c64b 100644
+--- 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",
+diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
+index 6c04029cc..f27221463 100644
+--- a/vio/viosslfactories.cc
++++ b/vio/viosslfactories.cc
+@@ -473,6 +473,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:
+@@ -526,6 +527,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.27.0
+

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.ebuild
index db0c6dcd3c1..2b02e215532 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.ebuild
@@ -42,9 +42,8 @@ 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
+	"${FILESDIR}"/${PN}-8.0.21-libressl.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2020-10-20 18:56 Thomas Deutschmann
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Deutschmann @ 2020-10-20 18:56 UTC (permalink / raw
  To: gentoo-commits

commit:     eca1b01e34c8bec66f213f10397bf7c94abc0f81
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 18:30:42 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 18:55:44 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eca1b01e

dev-db/mysql-connector-c: bump to v8.0.22

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql-connector-c/Manifest                  |   1 +
 ...-8.0.22-always-build-decompress-utilities.patch |  22 ++++
 .../mysql-connector-c-8.0.22.ebuild                | 112 +++++++++++++++++++++
 3 files changed, 135 insertions(+)

diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index d9d45dcf80e..65a983707e5 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1 +1,2 @@
 DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1
+DIST mysql-boost-8.0.22.tar.gz 285934450 BLAKE2B 1ba0c9bb9a0cb74af4842d3b746f8b690c122cfbf2c6d5201ce95e59a257427a8683dd8d5c2be31dfe9ece4761366c1287fa7b841c45db222725bf76b0639bc6 SHA512 792f2ada93ec67a4679228478c6b798e81d9e9f6d13c7f4977cb7682738a4aae3cb483294edc6b2fde16c3960e51af8786216c063ab500840afd39a609e4b612

diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.22-always-build-decompress-utilities.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.22-always-build-decompress-utilities.patch
new file mode 100644
index 00000000000..b0046fd8b22
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.22-always-build-decompress-utilities.patch
@@ -0,0 +1,22 @@
+--- a/utilities/CMakeLists.txt
++++ b/utilities/CMakeLists.txt
+@@ -123,14 +123,11 @@ 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()
+-
++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

diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.22.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.22.ebuild
new file mode 100644
index 00000000000..7502dbf5252
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.22.ebuild
@@ -0,0 +1,112 @@
+# 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:=[${MULTILIB_USEDEP}]
+	app-arch/zstd:=[${MULTILIB_USEDEP}]
+	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.22-always-build-decompress-utilities.patch
+	"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
+	"${FILESDIR}"/${PN}-8.0.21-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
+		-DENABLED_LOCAL_INFILE=ON
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
+		-DWITH_LZ4=system
+		-DWITH_NUMA=OFF
+		-DWITH_SSL=system
+		-DWITH_ZLIB=system
+		-DWITH_ZSTD=system
+		-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] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2021-01-21 22:32 Thomas Deutschmann
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Deutschmann @ 2021-01-21 22:32 UTC (permalink / raw
  To: gentoo-commits

commit:     7da0ebc2efa34b11aa8c18da51db0a3a1415bd62
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 21:45:52 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Jan 21 22:32:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7da0ebc2

dev-db/mysql-connector-c: bump to v8.0.23

Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql-connector-c/Manifest                  |   1 +
 .../files/mysql-connector-c-8.0.23-libressl.patch  | 356 +++++++++++++++++++++
 .../mysql-connector-c-8.0.23.ebuild                | 112 +++++++
 3 files changed, 469 insertions(+)

diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index 02cd082be04..36b6afb16c8 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1 +1,2 @@
 DIST mysql-boost-8.0.22.tar.gz 285934450 BLAKE2B 1ba0c9bb9a0cb74af4842d3b746f8b690c122cfbf2c6d5201ce95e59a257427a8683dd8d5c2be31dfe9ece4761366c1287fa7b841c45db222725bf76b0639bc6 SHA512 792f2ada93ec67a4679228478c6b798e81d9e9f6d13c7f4977cb7682738a4aae3cb483294edc6b2fde16c3960e51af8786216c063ab500840afd39a609e4b612
+DIST mysql-boost-8.0.23.tar.gz 291039175 BLAKE2B 3a7d3e05c774085d6078d0d3effd58d2df47521615356a2aa5efc2ea2ef8457e19ad57a054926ccff0a4752ca71d0464daa7fe9a3ac6c1b1d3bd86a9a82dfc58 SHA512 b8c2e2ac772b7b730f8b3bac7a5afb205da173b3639500606e7d1fac74832a0134027951855a2dc81af015e6158c924927ad63b9e1f2e7c823d45d4c4961c3f8

diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.23-libressl.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.23-libressl.patch
new file mode 100644
index 00000000000..06681d940dd
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.23-libressl.patch
@@ -0,0 +1,356 @@
+From 262f0b8bdc86a755041c19c11b6067afce28dae1 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/6] 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.cc  |  6 +++++-
+ plugin/x/client/xconnection_impl.cc           |  4 ++++
+ router/src/harness/src/tls_client_context.cc  |  2 +-
+ router/src/harness/src/tls_context.cc         |  9 ++++++--
+ router/src/harness/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(-)
+
+diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
+index 52feadeaa..3b8332695 100644
+--- 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
+diff --git a/mysys/my_md5.cc b/mysys/my_md5.cc
+index dea997b25..531696329 100644
+--- 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) {
+diff --git a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
+index 8bf63ce14..02f91b44e 100644
+--- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
++++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
+@@ -325,6 +325,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;
+@@ -348,6 +349,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) {
+@@ -544,10 +546,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();
+@@ -611,7 +615,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 */
+ }
+diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc
+index a78371098..9d3a7b436 100644
+--- a/plugin/x/client/xconnection_impl.cc
++++ b/plugin/x/client/xconnection_impl.cc
+@@ -498,6 +498,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:
+@@ -537,6 +538,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);
+@@ -547,12 +549,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));
+ 
+diff --git a/router/src/harness/src/tls_client_context.cc b/router/src/harness/src/tls_client_context.cc
+index c14b1cb18..81a9425ca 100644
+--- a/router/src/harness/src/tls_client_context.cc
++++ b/router/src/harness/src/tls_client_context.cc
+@@ -61,7 +61,7 @@ stdx::expected<void, std::error_code> TlsClientContext::verify(
+ stdx::expected<void, std::error_code> 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())) {
+     return stdx::make_unexpected(make_tls_error());
+   }
+diff --git a/router/src/harness/src/tls_context.cc b/router/src/harness/src/tls_context.cc
+index e0b97bf2d..8b64b1d01 100644
+--- a/router/src/harness/src/tls_context.cc
++++ b/router/src/harness/src/tls_context.cc
+@@ -115,7 +115,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
+@@ -145,9 +145,11 @@ stdx::expected<void, std::error_code> TlsContext::version_range(
+   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;
+@@ -197,8 +199,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:
+@@ -257,7 +261,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;
+diff --git a/router/src/harness/src/tls_server_context.cc b/router/src/harness/src/tls_server_context.cc
+index c8fc2b5a0..76775e2a0 100644
+--- a/router/src/harness/src/tls_server_context.cc
++++ b/router/src/harness/src/tls_server_context.cc
+@@ -169,7 +169,8 @@ stdx::expected<void, std::error_code> TlsServerContext::init_tmp_dh(
+     }
+ 
+   } 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 79f301fe6..b5e1d126c 100644
+--- a/sql-common/client.cc
++++ b/sql-common/client.cc
+@@ -7987,6 +7987,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);
+@@ -7998,6 +7999,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);
+diff --git a/sql/mysqld.cc b/sql/mysqld.cc
+index cde636761..266a8c3bb 100644
+--- a/sql/mysqld.cc
++++ b/sql/mysqld.cc
+@@ -5035,7 +5035,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
+@@ -5069,12 +5069,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 (TLS_channel::singleton_init(&mysql_main, mysql_main_channel, opt_use_ssl,
+                                   &server_main_callback, opt_initialize))
+     return 1;
+diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
+index 2df3271ff..90942eef0 100644
+--- a/sql/sys_vars.cc
++++ b/sql/sys_vars.cc
+@@ -4614,6 +4614,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) {
+@@ -4624,15 +4625,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",
+diff --git a/vio/viossl.cc b/vio/viossl.cc
+index 0e9594741..3a589c64b 100644
+--- 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",
+diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
+index 21c3510da..70e7d8f8b 100644
+--- 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.30.0
+

diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.23.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.23.ebuild
new file mode 100644
index 00000000000..3b2fc70f9d2
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.23.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2021 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:=[${MULTILIB_USEDEP}]
+	app-arch/zstd:=[${MULTILIB_USEDEP}]
+	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.22-always-build-decompress-utilities.patch
+	"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
+	"${FILESDIR}"/${PN}-8.0.23-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
+		-DENABLED_LOCAL_INFILE=ON
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
+		-DWITH_LZ4=system
+		-DWITH_NUMA=OFF
+		-DWITH_SSL=system
+		-DWITH_ZLIB=system
+		-DWITH_ZSTD=system
+		-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] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2021-06-22 23:49 Thomas Deutschmann
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Deutschmann @ 2021-06-22 23:49 UTC (permalink / raw
  To: gentoo-commits

commit:     c13941a25b42ec73772e396915b96294a51fd778
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 22 23:44:33 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Jun 22 23:44:41 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c13941a2

dev-db/mysql-connector-c: add OpenSSL 3.0.0 support

Closes: https://bugs.gentoo.org/797331
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 ...nector-c-8.0.25-add-OpenSSL-3.0.0-support.patch | 294 +++++++++++++++++++++
 .../mysql-connector-c-8.0.25-r1.ebuild             | 122 +++++++++
 2 files changed, 416 insertions(+)

diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.25-add-OpenSSL-3.0.0-support.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.25-add-OpenSSL-3.0.0-support.patch
new file mode 100644
index 00000000000..f566e0fba5b
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.25-add-OpenSSL-3.0.0-support.patch
@@ -0,0 +1,294 @@
+From 3bf91fabf641f3f5114bf3893de40a31aae36e13 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Tue, 22 Jun 2021 23:56:54 +0200
+Subject: [PATCH 5/5] Add OpenSSL 3.0.0 support
+
+Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
+---
+ cmake/ssl.cmake                               | 59 +++++++++++++------
+ mysys/my_md5.cc                               |  2 +
+ .../bindings/xcom/xcom/xcom_ssl_transport.cc  |  4 ++
+ plugin/x/client/xconnection_impl.cc           |  4 ++
+ sql-common/client.cc                          |  2 +
+ sql/mysqld.cc                                 |  2 +
+ sql/sys_vars.cc                               | 18 +++++-
+ vio/viosslfactories.cc                        |  2 +
+ 8 files changed, 74 insertions(+), 19 deletions(-)
+
+diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
+index 18c95dfac..dd2f7e657 100644
+--- a/cmake/ssl.cmake
++++ b/cmake/ssl.cmake
+@@ -201,34 +201,59 @@ MACRO (MYSQL_CHECK_SSL)
+                  NAMES crypto libcrypto libeay32
+                  HINTS ${OPENSSL_ROOT_DIR}/lib)
+ 
+-    IF(OPENSSL_INCLUDE_DIR)
++    IF(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
+       # Verify version number. Version information looks like:
+       #   #define OPENSSL_VERSION_NUMBER 0x1000103fL
+       # Encoded as MNNFFPPS: major minor fix patch status
+       FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
+         OPENSSL_VERSION_NUMBER
+-        REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
+-        )
+-      STRING(REGEX REPLACE
+-        "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
+-        OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
+-        )
+-      STRING(REGEX REPLACE
+-        "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
+-        OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_NUMBER}"
+-        )
+-      STRING(REGEX REPLACE
+-        "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
+-        OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
++        REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
+         )
++
++      IF(OPENSSL_VERSION_NUMBER)
++        STRING(REGEX REPLACE
++          "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
++          OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
++          )
++        STRING(REGEX REPLACE
++          "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
++          OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_NUMBER}"
++          )
++        STRING(REGEX REPLACE
++          "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
++          OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
++          )
++      ELSE()
++        FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
++          OPENSSL_VERSION_STR
++          REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_STR[\t ]+\"([0-9])+\\.([0-9])+\\.([0-9])+\".*"
++          )
++
++        STRING(REGEX REPLACE
++          "^.*OPENSSL_VERSION_STR[\t ]+\"([0-9]+)\\.[0-9]+\\.[0-9]+\".*$" "\\1"
++          OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_STR}"
++          )
++        STRING(REGEX REPLACE
++          "^.*OPENSSL_VERSION_STR[\t ]+\"[0-9]+\\.([0-9]+)\\.[0-9]+\".*$" "\\1"
++          OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_STR}"
++          )
++        STRING(REGEX REPLACE
++          "^.*OPENSSL_VERSION_STR[\t ]+\"[0-9]+\\.[0-9]+\\.([0-9]+)\".*$" "\\1"
++          OPENSSL_FIX_VERSION "${OPENSSL_VERSION_STR}"
++          )
++      ENDIF()
+     ENDIF()
+-    IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0")
++
++    INCLUDE(CheckSymbolExists)
++
++    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
+@@ -292,8 +317,6 @@ MACRO (MYSQL_CHECK_SSL)
+     MESSAGE(STATUS "OPENSSL_MINOR_VERSION = ${OPENSSL_MINOR_VERSION}")
+     MESSAGE(STATUS "OPENSSL_FIX_VERSION = ${OPENSSL_FIX_VERSION}")
+ 
+-    INCLUDE(CheckSymbolExists)
+-
+     CMAKE_PUSH_CHECK_STATE()
+     SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+     CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
+diff --git a/mysys/my_md5.cc b/mysys/my_md5.cc
+index 86203619f..37ed3c8b2 100644
+--- 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;
++#if defined(OPENSSL_FIPS)
+   fips_mode = FIPS_mode();
++#endif
+   /* If fips mode is ON/STRICT restricted method calls will result into abort,
+    * skipping call. */
+   if (fips_mode == 0) {
+diff --git a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
+index 4ed9f9ac9..895443166 100644
+--- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
++++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
+@@ -325,6 +325,7 @@ error:
+   return 1;
+ }
+ 
++#if defined(OPENSSL_FIPS)
+ #define OPENSSL_ERROR_LENGTH 512
+ static int configure_ssl_fips_mode(const uint fips_mode) {
+   int rc = -1;
+@@ -348,6 +349,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) {
+@@ -544,10 +546,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;
+ 
++#if defined(OPENSSL_FIPS)
+   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();
+diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc
+index c1686c6d5..3ae34fdfd 100644
+--- a/plugin/x/client/xconnection_impl.cc
++++ b/plugin/x/client/xconnection_impl.cc
+@@ -617,6 +617,7 @@ XError Connection_impl::get_ssl_error(const int error_id) {
+   return XError(CR_SSL_CONNECTION_ERROR, buffer);
+ }
+ 
++#if defined(OPENSSL_FIPS)
+ /**
+   Set fips mode in openssl library,
+   When we set fips mode ON/STRICT, it will perform following operations:
+@@ -656,6 +657,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);
+@@ -666,12 +668,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};
+ 
++#if defined(OPENSSL_FIPS)
+   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));
+ 
+diff --git a/sql-common/client.cc b/sql-common/client.cc
+index 1316d54a7..554970378 100644
+--- a/sql-common/client.cc
++++ b/sql-common/client.cc
+@@ -8019,6 +8019,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
+         return 1;
+       break;
+     case MYSQL_OPT_SSL_FIPS_MODE: {
++#if defined(OPENSSL_FIPS)
+       char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
+       ENSURE_EXTENSIONS_PRESENT(&mysql->options);
+       mysql->options.extension->ssl_fips_mode = *static_cast<const uint *>(arg);
+@@ -8030,6 +8031,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);
+diff --git a/sql/mysqld.cc b/sql/mysqld.cc
+index 83643f76a..dfdc23ab7 100644
+--- a/sql/mysqld.cc
++++ b/sql/mysqld.cc
+@@ -5134,12 +5134,14 @@ static void init_ssl() {
+ }
+ 
+ static int init_ssl_communication() {
++#if defined(OPENSSL_FIPS)
+   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 (TLS_channel::singleton_init(&mysql_main, mysql_main_channel, opt_use_ssl,
+                                   &server_main_callback, opt_initialize))
+     return 1;
+diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
+index 3b8473bd1..c22c38305 100644
+--- a/sql/sys_vars.cc
++++ b/sql/sys_vars.cc
+@@ -4614,6 +4614,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));
+ 
++#if defined(OPENSSL_FIPS)
+ 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) {
+@@ -4624,15 +4625,30 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
+     return false;
+   }
+ }
++#endif
+ 
++#if defined(OPENSSL_FIPS)
+ static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", nullptr};
++#else
++static const char *ssl_fips_mode_names[] = {"OFF", 0};
++#endif
+ static Sys_var_enum Sys_ssl_fips_mode(
+     "ssl_fips_mode",
+     "SSL FIPS mode (applies only for OpenSSL); "
++#if defined(OPENSSL_FIPS)
+     "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),
++#if defined(OPENSSL_FIPS)
++    ON_UPDATE(update_fips_mode),
++#else
++    ON_UPDATE(NULL),
++#endif
++    NULL);
+ 
+ static Sys_var_bool Sys_auto_generate_certs(
+     "auto_generate_certs",
+diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
+index c25117bd0..11b466bcf 100644
+--- a/vio/viosslfactories.cc
++++ b/vio/viosslfactories.cc
+@@ -472,6 +472,7 @@ void ssl_start() {
+   }
+ }
+ 
++#if defined(OPENSSL_FIPS)
+ /**
+   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.32.0
+

diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.25-r1.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.25-r1.ebuild
new file mode 100644
index 00000000000..1c00a985792
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.25-r1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+inherit cmake-multilib flag-o-matic
+
+# wrap the config script
+MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://dev.mysql.com/downloads/"
+
+if [[ ${PV} == "9999" ]]; then
+	EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
+
+	inherit git-r3
+else
+	SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+
+	S="${WORKDIR}/mysql-${PV}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0/21"
+IUSE="ldap static-libs"
+
+RDEPEND="
+	>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
+	app-arch/zstd:=[${MULTILIB_USEDEP}]
+	sys-libs/zlib:=[${MULTILIB_USEDEP}]
+	ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
+	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 )
+
+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.25-add-OpenSSL-3.0.0-support.patch
+)
+
+src_prepare() {
+	sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "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_src_prepare
+}
+
+multilib_src_configure() {
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# code is not C++17 ready, bug #786402
+	append-cxxflags -std=c++14
+
+	local mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
+		-DINSTALL_LAYOUT=RPM
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
+		-DENABLED_LOCAL_INFILE=ON
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
+		-DWITH_LZ4=system
+		-DWITH_NUMA=OFF
+		-DWITH_SSL=system
+		-DWITH_ZLIB=system
+		-DWITH_ZSTD=system
+		-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
+		-DSHARED_LIB_PATCH_VERSION="0"
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+		-DWITHOUT_SERVER=ON
+	)
+
+	cmake_src_configure
+}
+
+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] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2021-11-14  3:49 Thomas Deutschmann
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Deutschmann @ 2021-11-14  3:49 UTC (permalink / raw
  To: gentoo-commits

commit:     9486cc4679e8dde3d02a577f43b03570c0609e5e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 13 20:50:09 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 14 03:49:48 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9486cc46

dev-db/mysql-connector-c: bump to v8.0.27

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql-connector-c/Manifest                  |   1 +
 ...nector-c-8.0.27-add-OpenSSL-3.0.0-support.patch | 296 +++++++++++++++++++++
 .../mysql-connector-c-8.0.27.ebuild                | 122 +++++++++
 3 files changed, 419 insertions(+)

diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index 0f9c928a3587..c3a4a68bf2a4 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -2,3 +2,4 @@ DIST mysql-boost-8.0.22.tar.gz 285934450 BLAKE2B 1ba0c9bb9a0cb74af4842d3b746f8b6
 DIST mysql-boost-8.0.23.tar.gz 291039175 BLAKE2B 3a7d3e05c774085d6078d0d3effd58d2df47521615356a2aa5efc2ea2ef8457e19ad57a054926ccff0a4752ca71d0464daa7fe9a3ac6c1b1d3bd86a9a82dfc58 SHA512 b8c2e2ac772b7b730f8b3bac7a5afb205da173b3639500606e7d1fac74832a0134027951855a2dc81af015e6158c924927ad63b9e1f2e7c823d45d4c4961c3f8
 DIST mysql-boost-8.0.25.tar.gz 290265324 BLAKE2B 5393a2a2525a886d9ece19777deae01e6c0b24b9ff5a0a5ffb9075740ed912d0df59a165b6ec9ceb60c7c28f3062cda5cceb4da3a8280f42549984c846f1ce5c SHA512 af653ccff66a9d87221b46ad4f7bcc629700549f758998b9a7fb22e4573b9495a28624e031f016f9ad8fe0dfcf481b82f1ffe224aa48c2d45531570026b26081
 DIST mysql-boost-8.0.26.tar.gz 291285918 BLAKE2B 6198ca8982a8c9df7e6ee4df5e2c1e0d64d2eb4d83cb7265317b58d55f6787c3240c8e40d196f2326ff3d66926ad7dab0705edd92e5a82881ce6ddb7f0c510b9 SHA512 63d47cb52407a816dc9f4330b99924624dfee46e57e7fdce19eff32909dd9e23251e2439d1807b002a1661b547173222c77465a3ca4dbb312414a84927809cfc
+DIST mysql-boost-8.0.27.tar.gz 292184025 BLAKE2B 177209f3c62b0326ca9d021c751a701dec84c1b15c946ab0a68b1b4cf0620468eb3a1df77a918284007a0fde1aaa6a9767d0baed57936612813ef583df51c35e SHA512 6ef2426c0bee46bdf8e2fa5cb159d5ae19f0bed4f7c9bea9b33e0dd922b568c3c68ca063dcbcd7ea6904aaea31877c10064ea10b4bc63fb40d9f31778e3a7891

diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.27-add-OpenSSL-3.0.0-support.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.27-add-OpenSSL-3.0.0-support.patch
new file mode 100644
index 000000000000..fe702159410a
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.27-add-OpenSSL-3.0.0-support.patch
@@ -0,0 +1,296 @@
+From 9936c93ee95a4d62a238aa4515be07ef14267932 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Tue, 22 Jun 2021 23:56:54 +0200
+Subject: [PATCH 6/6] Add OpenSSL 3.0.0 support
+
+Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
+---
+ cmake/ssl.cmake                               | 59 +++++++++++++------
+ mysys/my_md5.cc                               |  2 +
+ .../xcom_network_provider_ssl_native_lib.cc   |  4 ++
+ plugin/x/client/xconnection_impl.cc           |  4 ++
+ sql-common/client.cc                          |  2 +
+ sql/mysqld.cc                                 |  2 +
+ sql/sys_vars.cc                               | 18 +++++-
+ vio/viosslfactories.cc                        |  2 +
+ 8 files changed, 74 insertions(+), 19 deletions(-)
+
+diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
+index 293281cf1..4732d8bf4 100644
+--- a/cmake/ssl.cmake
++++ b/cmake/ssl.cmake
+@@ -205,34 +205,59 @@ MACRO (MYSQL_CHECK_SSL)
+                  NAMES crypto libcrypto libeay32
+                  HINTS ${OPENSSL_ROOT_DIR}/lib)
+ 
+-    IF(OPENSSL_INCLUDE_DIR)
++    IF(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
+       # Verify version number. Version information looks like:
+       #   #define OPENSSL_VERSION_NUMBER 0x1000103fL
+       # Encoded as MNNFFPPS: major minor fix patch status
+       FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
+         OPENSSL_VERSION_NUMBER
+-        REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
+-        )
+-      STRING(REGEX REPLACE
+-        "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
+-        OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
+-        )
+-      STRING(REGEX REPLACE
+-        "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
+-        OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_NUMBER}"
+-        )
+-      STRING(REGEX REPLACE
+-        "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
+-        OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
++        REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
+         )
++
++      IF(OPENSSL_VERSION_NUMBER)
++        STRING(REGEX REPLACE
++          "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
++          OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
++          )
++        STRING(REGEX REPLACE
++          "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
++          OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_NUMBER}"
++          )
++        STRING(REGEX REPLACE
++          "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
++          OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
++          )
++      ELSE()
++        FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
++          OPENSSL_VERSION_STR
++          REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_STR[\t ]+\"([0-9])+\\.([0-9])+\\.([0-9])+\".*"
++          )
++
++        STRING(REGEX REPLACE
++          "^.*OPENSSL_VERSION_STR[\t ]+\"([0-9]+)\\.[0-9]+\\.[0-9]+\".*$" "\\1"
++          OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_STR}"
++          )
++        STRING(REGEX REPLACE
++          "^.*OPENSSL_VERSION_STR[\t ]+\"[0-9]+\\.([0-9]+)\\.[0-9]+\".*$" "\\1"
++          OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_STR}"
++          )
++        STRING(REGEX REPLACE
++          "^.*OPENSSL_VERSION_STR[\t ]+\"[0-9]+\\.[0-9]+\\.([0-9]+)\".*$" "\\1"
++          OPENSSL_FIX_VERSION "${OPENSSL_VERSION_STR}"
++          )
++      ENDIF()
+     ENDIF()
+-    IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0")
++
++    INCLUDE(CheckSymbolExists)
++
++    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
+@@ -296,8 +321,6 @@ MACRO (MYSQL_CHECK_SSL)
+     MESSAGE(STATUS "OPENSSL_MINOR_VERSION = ${OPENSSL_MINOR_VERSION}")
+     MESSAGE(STATUS "OPENSSL_FIX_VERSION = ${OPENSSL_FIX_VERSION}")
+ 
+-    INCLUDE(CheckSymbolExists)
+-
+     CMAKE_PUSH_CHECK_STATE()
+     SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+     CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
+diff --git a/mysys/my_md5.cc b/mysys/my_md5.cc
+index 86203619f..37ed3c8b2 100644
+--- 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;
++#if defined(OPENSSL_FIPS)
+   fips_mode = FIPS_mode();
++#endif
+   /* If fips mode is ON/STRICT restricted method calls will result into abort,
+    * skipping call. */
+   if (fips_mode == 0) {
+diff --git a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/network/xcom_network_provider_ssl_native_lib.cc b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/network/xcom_network_provider_ssl_native_lib.cc
+index 8d4af3c04..de67c9e7c 100644
+--- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/network/xcom_network_provider_ssl_native_lib.cc
++++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/network/xcom_network_provider_ssl_native_lib.cc
+@@ -316,6 +316,7 @@ error:
+   return 1;
+ }
+ 
++#if defined(OPENSSL_FIPS)
+ #define OPENSSL_ERROR_LENGTH 512
+ static int configure_ssl_fips_mode(const int fips_mode) {
+   int rc = -1;
+@@ -339,6 +340,7 @@ static int configure_ssl_fips_mode(const int fips_mode) {
+ EXIT:
+   return rc;
+ }
++#endif
+ 
+ static int configure_ssl_ca(SSL_CTX *ssl_ctx, const char *ca_file,
+                             const char *ca_path) {
+@@ -478,12 +480,14 @@ int Xcom_network_provider_ssl_library::xcom_init_ssl(
+   int verify_server = SSL_VERIFY_NONE;
+   int verify_client = SSL_VERIFY_NONE;
+ 
++#if defined(OPENSSL_FIPS)
+   if (configure_ssl_fips_mode(
+           Network_provider_manager::getInstance().xcom_get_ssl_fips_mode()) !=
+       1) {
+     G_ERROR("Error setting the ssl fips mode");
+     goto error;
+   }
++#endif
+ 
+   SSL_library_init();
+   SSL_load_error_strings();
+diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc
+index aaf37a1b3..753944889 100644
+--- a/plugin/x/client/xconnection_impl.cc
++++ b/plugin/x/client/xconnection_impl.cc
+@@ -617,6 +617,7 @@ XError Connection_impl::get_ssl_error(const int error_id) {
+   return XError(CR_SSL_CONNECTION_ERROR, buffer);
+ }
+ 
++#if defined(OPENSSL_FIPS)
+ /**
+   Set fips mode in openssl library,
+   When we set fips mode ON/STRICT, it will perform following operations:
+@@ -656,6 +657,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);
+@@ -666,12 +668,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};
+ 
++#if defined(OPENSSL_FIPS)
+   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));
+ 
+diff --git a/sql-common/client.cc b/sql-common/client.cc
+index 5de2a1fb9..102e663d9 100644
+--- a/sql-common/client.cc
++++ b/sql-common/client.cc
+@@ -8286,6 +8286,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
+         return 1;
+       break;
+     case MYSQL_OPT_SSL_FIPS_MODE: {
++#if defined(OPENSSL_FIPS)
+       char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
+       ENSURE_EXTENSIONS_PRESENT(&mysql->options);
+       mysql->options.extension->ssl_fips_mode =
+@@ -8298,6 +8299,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);
+diff --git a/sql/mysqld.cc b/sql/mysqld.cc
+index 8105d4b73..b580f1c4d 100644
+--- a/sql/mysqld.cc
++++ b/sql/mysqld.cc
+@@ -5292,12 +5292,14 @@ static void init_ssl() {
+ }
+ 
+ static int init_ssl_communication() {
++#if defined(OPENSSL_FIPS)
+   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 (TLS_channel::singleton_init(&mysql_main, mysql_main_channel, opt_use_ssl,
+                                   &server_main_callback, opt_initialize))
+     return 1;
+diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
+index 4592e4bbb..320f458fd 100644
+--- a/sql/sys_vars.cc
++++ b/sql/sys_vars.cc
+@@ -4799,6 +4799,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));
+ 
++#if defined(OPENSSL_FIPS)
+ 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) {
+@@ -4809,15 +4810,30 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
+     return false;
+   }
+ }
++#endif
+ 
++#if defined(OPENSSL_FIPS)
+ static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", nullptr};
++#else
++static const char *ssl_fips_mode_names[] = {"OFF", 0};
++#endif
+ static Sys_var_enum Sys_ssl_fips_mode(
+     "ssl_fips_mode",
+     "SSL FIPS mode (applies only for OpenSSL); "
++#if defined(OPENSSL_FIPS)
+     "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),
++#if defined(OPENSSL_FIPS)
++    ON_UPDATE(update_fips_mode),
++#else
++    ON_UPDATE(NULL),
++#endif
++    NULL);
+ 
+ static Sys_var_bool Sys_auto_generate_certs(
+     "auto_generate_certs",
+diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
+index 618be1511..b090f6713 100644
+--- a/vio/viosslfactories.cc
++++ b/vio/viosslfactories.cc
+@@ -472,6 +472,7 @@ void ssl_start() {
+   }
+ }
+ 
++#if defined(OPENSSL_FIPS)
+ /**
+   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
+ 
+ /**
+   Toggle FIPS mode, to see whether it is available with the current SSL library.
+-- 
+2.33.1
+

diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.27.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.27.ebuild
new file mode 100644
index 000000000000..d15743a0a393
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.27.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+inherit cmake-multilib flag-o-matic
+
+# wrap the config script
+MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://dev.mysql.com/downloads/"
+
+if [[ ${PV} == "9999" ]]; then
+	EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
+
+	inherit git-r3
+else
+	SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+	S="${WORKDIR}/mysql-${PV}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0/21"
+IUSE="ldap static-libs"
+
+RDEPEND="
+	>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
+	app-arch/zstd:=[${MULTILIB_USEDEP}]
+	sys-libs/zlib:=[${MULTILIB_USEDEP}]
+	ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
+	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 )
+
+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-add-OpenSSL-3.0.0-support.patch
+)
+
+src_prepare() {
+	sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "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_src_prepare
+}
+
+multilib_src_configure() {
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# Code is now requiring C++17 due to https://github.com/mysql/mysql-server/commit/236ab55bedd8c9eacd80766d85edde2a8afacd08
+	append-cxxflags -std=c++17
+
+	local mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
+		-DINSTALL_LAYOUT=RPM
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
+		-DENABLED_LOCAL_INFILE=ON
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
+		-DWITH_LZ4=system
+		-DWITH_NUMA=OFF
+		-DWITH_SSL=system
+		-DWITH_ZLIB=system
+		-DWITH_ZSTD=system
+		-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
+		-DSHARED_LIB_PATCH_VERSION="0"
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+		-DWITHOUT_SERVER=ON
+	)
+
+	cmake_src_configure
+}
+
+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] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2022-03-03 21:22 David Seifert
  0 siblings, 0 replies; 15+ messages in thread
From: David Seifert @ 2022-03-03 21:22 UTC (permalink / raw
  To: gentoo-commits

commit:     f30c3ae397bd27e0df5777819887979e889c7d8d
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  3 21:21:49 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu Mar  3 21:21:49 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f30c3ae3

dev-db/mysql-connector-c: drop 8.0.22, 8.0.23-r1, 8.0.25, 8.0.25-r1, 8.0.26

Bug: https://bugs.gentoo.org/822258
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-db/mysql-connector-c/Manifest                  |   4 -
 ...nector-c-8.0.25-add-OpenSSL-3.0.0-support.patch | 294 ---------------------
 .../mysql-connector-c-8.0.22.ebuild                | 110 --------
 .../mysql-connector-c-8.0.23-r1.ebuild             | 118 ---------
 .../mysql-connector-c-8.0.25-r1.ebuild             | 122 ---------
 .../mysql-connector-c-8.0.25.ebuild                | 121 ---------
 .../mysql-connector-c-8.0.26.ebuild                | 122 ---------
 7 files changed, 891 deletions(-)

diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index c3a4a68bf2a4..c567c6cfb162 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1,5 +1 @@
-DIST mysql-boost-8.0.22.tar.gz 285934450 BLAKE2B 1ba0c9bb9a0cb74af4842d3b746f8b690c122cfbf2c6d5201ce95e59a257427a8683dd8d5c2be31dfe9ece4761366c1287fa7b841c45db222725bf76b0639bc6 SHA512 792f2ada93ec67a4679228478c6b798e81d9e9f6d13c7f4977cb7682738a4aae3cb483294edc6b2fde16c3960e51af8786216c063ab500840afd39a609e4b612
-DIST mysql-boost-8.0.23.tar.gz 291039175 BLAKE2B 3a7d3e05c774085d6078d0d3effd58d2df47521615356a2aa5efc2ea2ef8457e19ad57a054926ccff0a4752ca71d0464daa7fe9a3ac6c1b1d3bd86a9a82dfc58 SHA512 b8c2e2ac772b7b730f8b3bac7a5afb205da173b3639500606e7d1fac74832a0134027951855a2dc81af015e6158c924927ad63b9e1f2e7c823d45d4c4961c3f8
-DIST mysql-boost-8.0.25.tar.gz 290265324 BLAKE2B 5393a2a2525a886d9ece19777deae01e6c0b24b9ff5a0a5ffb9075740ed912d0df59a165b6ec9ceb60c7c28f3062cda5cceb4da3a8280f42549984c846f1ce5c SHA512 af653ccff66a9d87221b46ad4f7bcc629700549f758998b9a7fb22e4573b9495a28624e031f016f9ad8fe0dfcf481b82f1ffe224aa48c2d45531570026b26081
-DIST mysql-boost-8.0.26.tar.gz 291285918 BLAKE2B 6198ca8982a8c9df7e6ee4df5e2c1e0d64d2eb4d83cb7265317b58d55f6787c3240c8e40d196f2326ff3d66926ad7dab0705edd92e5a82881ce6ddb7f0c510b9 SHA512 63d47cb52407a816dc9f4330b99924624dfee46e57e7fdce19eff32909dd9e23251e2439d1807b002a1661b547173222c77465a3ca4dbb312414a84927809cfc
 DIST mysql-boost-8.0.27.tar.gz 292184025 BLAKE2B 177209f3c62b0326ca9d021c751a701dec84c1b15c946ab0a68b1b4cf0620468eb3a1df77a918284007a0fde1aaa6a9767d0baed57936612813ef583df51c35e SHA512 6ef2426c0bee46bdf8e2fa5cb159d5ae19f0bed4f7c9bea9b33e0dd922b568c3c68ca063dcbcd7ea6904aaea31877c10064ea10b4bc63fb40d9f31778e3a7891

diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.25-add-OpenSSL-3.0.0-support.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.25-add-OpenSSL-3.0.0-support.patch
deleted file mode 100644
index f566e0fba5b6..000000000000
--- a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.25-add-OpenSSL-3.0.0-support.patch
+++ /dev/null
@@ -1,294 +0,0 @@
-From 3bf91fabf641f3f5114bf3893de40a31aae36e13 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi@gentoo.org>
-Date: Tue, 22 Jun 2021 23:56:54 +0200
-Subject: [PATCH 5/5] Add OpenSSL 3.0.0 support
-
-Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
----
- cmake/ssl.cmake                               | 59 +++++++++++++------
- mysys/my_md5.cc                               |  2 +
- .../bindings/xcom/xcom/xcom_ssl_transport.cc  |  4 ++
- plugin/x/client/xconnection_impl.cc           |  4 ++
- sql-common/client.cc                          |  2 +
- sql/mysqld.cc                                 |  2 +
- sql/sys_vars.cc                               | 18 +++++-
- vio/viosslfactories.cc                        |  2 +
- 8 files changed, 74 insertions(+), 19 deletions(-)
-
-diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
-index 18c95dfac..dd2f7e657 100644
---- a/cmake/ssl.cmake
-+++ b/cmake/ssl.cmake
-@@ -201,34 +201,59 @@ MACRO (MYSQL_CHECK_SSL)
-                  NAMES crypto libcrypto libeay32
-                  HINTS ${OPENSSL_ROOT_DIR}/lib)
- 
--    IF(OPENSSL_INCLUDE_DIR)
-+    IF(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
-       # Verify version number. Version information looks like:
-       #   #define OPENSSL_VERSION_NUMBER 0x1000103fL
-       # Encoded as MNNFFPPS: major minor fix patch status
-       FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
-         OPENSSL_VERSION_NUMBER
--        REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
--        )
--      STRING(REGEX REPLACE
--        "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
--        OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
--        )
--      STRING(REGEX REPLACE
--        "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
--        OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_NUMBER}"
--        )
--      STRING(REGEX REPLACE
--        "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
--        OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
-+        REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
-         )
-+
-+      IF(OPENSSL_VERSION_NUMBER)
-+        STRING(REGEX REPLACE
-+          "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
-+          OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
-+          )
-+        STRING(REGEX REPLACE
-+          "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
-+          OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_NUMBER}"
-+          )
-+        STRING(REGEX REPLACE
-+          "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
-+          OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
-+          )
-+      ELSE()
-+        FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
-+          OPENSSL_VERSION_STR
-+          REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_STR[\t ]+\"([0-9])+\\.([0-9])+\\.([0-9])+\".*"
-+          )
-+
-+        STRING(REGEX REPLACE
-+          "^.*OPENSSL_VERSION_STR[\t ]+\"([0-9]+)\\.[0-9]+\\.[0-9]+\".*$" "\\1"
-+          OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_STR}"
-+          )
-+        STRING(REGEX REPLACE
-+          "^.*OPENSSL_VERSION_STR[\t ]+\"[0-9]+\\.([0-9]+)\\.[0-9]+\".*$" "\\1"
-+          OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_STR}"
-+          )
-+        STRING(REGEX REPLACE
-+          "^.*OPENSSL_VERSION_STR[\t ]+\"[0-9]+\\.[0-9]+\\.([0-9]+)\".*$" "\\1"
-+          OPENSSL_FIX_VERSION "${OPENSSL_VERSION_STR}"
-+          )
-+      ENDIF()
-     ENDIF()
--    IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0")
-+
-+    INCLUDE(CheckSymbolExists)
-+
-+    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
-@@ -292,8 +317,6 @@ MACRO (MYSQL_CHECK_SSL)
-     MESSAGE(STATUS "OPENSSL_MINOR_VERSION = ${OPENSSL_MINOR_VERSION}")
-     MESSAGE(STATUS "OPENSSL_FIX_VERSION = ${OPENSSL_FIX_VERSION}")
- 
--    INCLUDE(CheckSymbolExists)
--
-     CMAKE_PUSH_CHECK_STATE()
-     SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
-     CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
-diff --git a/mysys/my_md5.cc b/mysys/my_md5.cc
-index 86203619f..37ed3c8b2 100644
---- 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;
-+#if defined(OPENSSL_FIPS)
-   fips_mode = FIPS_mode();
-+#endif
-   /* If fips mode is ON/STRICT restricted method calls will result into abort,
-    * skipping call. */
-   if (fips_mode == 0) {
-diff --git a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
-index 4ed9f9ac9..895443166 100644
---- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
-+++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
-@@ -325,6 +325,7 @@ error:
-   return 1;
- }
- 
-+#if defined(OPENSSL_FIPS)
- #define OPENSSL_ERROR_LENGTH 512
- static int configure_ssl_fips_mode(const uint fips_mode) {
-   int rc = -1;
-@@ -348,6 +349,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) {
-@@ -544,10 +546,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;
- 
-+#if defined(OPENSSL_FIPS)
-   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();
-diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc
-index c1686c6d5..3ae34fdfd 100644
---- a/plugin/x/client/xconnection_impl.cc
-+++ b/plugin/x/client/xconnection_impl.cc
-@@ -617,6 +617,7 @@ XError Connection_impl::get_ssl_error(const int error_id) {
-   return XError(CR_SSL_CONNECTION_ERROR, buffer);
- }
- 
-+#if defined(OPENSSL_FIPS)
- /**
-   Set fips mode in openssl library,
-   When we set fips mode ON/STRICT, it will perform following operations:
-@@ -656,6 +657,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);
-@@ -666,12 +668,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};
- 
-+#if defined(OPENSSL_FIPS)
-   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));
- 
-diff --git a/sql-common/client.cc b/sql-common/client.cc
-index 1316d54a7..554970378 100644
---- a/sql-common/client.cc
-+++ b/sql-common/client.cc
-@@ -8019,6 +8019,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
-         return 1;
-       break;
-     case MYSQL_OPT_SSL_FIPS_MODE: {
-+#if defined(OPENSSL_FIPS)
-       char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
-       ENSURE_EXTENSIONS_PRESENT(&mysql->options);
-       mysql->options.extension->ssl_fips_mode = *static_cast<const uint *>(arg);
-@@ -8030,6 +8031,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);
-diff --git a/sql/mysqld.cc b/sql/mysqld.cc
-index 83643f76a..dfdc23ab7 100644
---- a/sql/mysqld.cc
-+++ b/sql/mysqld.cc
-@@ -5134,12 +5134,14 @@ static void init_ssl() {
- }
- 
- static int init_ssl_communication() {
-+#if defined(OPENSSL_FIPS)
-   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 (TLS_channel::singleton_init(&mysql_main, mysql_main_channel, opt_use_ssl,
-                                   &server_main_callback, opt_initialize))
-     return 1;
-diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
-index 3b8473bd1..c22c38305 100644
---- a/sql/sys_vars.cc
-+++ b/sql/sys_vars.cc
-@@ -4614,6 +4614,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));
- 
-+#if defined(OPENSSL_FIPS)
- 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) {
-@@ -4624,15 +4625,30 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
-     return false;
-   }
- }
-+#endif
- 
-+#if defined(OPENSSL_FIPS)
- static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", nullptr};
-+#else
-+static const char *ssl_fips_mode_names[] = {"OFF", 0};
-+#endif
- static Sys_var_enum Sys_ssl_fips_mode(
-     "ssl_fips_mode",
-     "SSL FIPS mode (applies only for OpenSSL); "
-+#if defined(OPENSSL_FIPS)
-     "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),
-+#if defined(OPENSSL_FIPS)
-+    ON_UPDATE(update_fips_mode),
-+#else
-+    ON_UPDATE(NULL),
-+#endif
-+    NULL);
- 
- static Sys_var_bool Sys_auto_generate_certs(
-     "auto_generate_certs",
-diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
-index c25117bd0..11b466bcf 100644
---- a/vio/viosslfactories.cc
-+++ b/vio/viosslfactories.cc
-@@ -472,6 +472,7 @@ void ssl_start() {
-   }
- }
- 
-+#if defined(OPENSSL_FIPS)
- /**
-   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.32.0
-

diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.22.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.22.ebuild
deleted file mode 100644
index 0cd2c65693f6..000000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.22.ebuild
+++ /dev/null
@@ -1,110 +0,0 @@
-# Copyright 1999-2021 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 static-libs"
-
-RDEPEND="
-	>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
-	app-arch/zstd:=[${MULTILIB_USEDEP}]
-	sys-libs/zlib:=[${MULTILIB_USEDEP}]
-	ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
-	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.22-always-build-decompress-utilities.patch
-	"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.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
-		-DENABLED_LOCAL_INFILE=ON
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
-		-DWITH_LZ4=system
-		-DWITH_NUMA=OFF
-		-DWITH_SSL=system
-		-DWITH_ZLIB=system
-		-DWITH_ZSTD=system
-		-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.23-r1.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.23-r1.ebuild
deleted file mode 100644
index d90ed6a38415..000000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.23-r1.ebuild
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-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/"
-
-if [[ ${PV} == "9999" ]]; then
-	EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
-
-	inherit git-r3
-else
-	SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
-	KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc x86"
-
-	S="${WORKDIR}/mysql-${PV}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0/21"
-IUSE="ldap static-libs"
-
-RDEPEND="
-	>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
-	app-arch/zstd:=[${MULTILIB_USEDEP}]
-	sys-libs/zlib:=[${MULTILIB_USEDEP}]
-	ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
-	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 )
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-8.0.22-always-build-decompress-utilities.patch
-	"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
-)
-
-src_prepare() {
-	sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "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_src_prepare
-}
-
-multilib_src_configure() {
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	local mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
-		-DINSTALL_LAYOUT=RPM
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
-		-DENABLED_LOCAL_INFILE=ON
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
-		-DWITH_LZ4=system
-		-DWITH_NUMA=OFF
-		-DWITH_SSL=system
-		-DWITH_ZLIB=system
-		-DWITH_ZSTD=system
-		-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
-		-DSHARED_LIB_PATCH_VERSION="0"
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITHOUT_SERVER=ON
-	)
-
-	cmake_src_configure
-}
-
-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.25-r1.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.25-r1.ebuild
deleted file mode 100644
index fa385e807a46..000000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.25-r1.ebuild
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-inherit cmake-multilib flag-o-matic
-
-# wrap the config script
-MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-
-DESCRIPTION="C client library for MariaDB/MySQL"
-HOMEPAGE="https://dev.mysql.com/downloads/"
-
-if [[ ${PV} == "9999" ]]; then
-	EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
-
-	inherit git-r3
-else
-	SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-
-	S="${WORKDIR}/mysql-${PV}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0/21"
-IUSE="ldap static-libs"
-
-RDEPEND="
-	>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
-	app-arch/zstd:=[${MULTILIB_USEDEP}]
-	sys-libs/zlib:=[${MULTILIB_USEDEP}]
-	ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
-	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 )
-
-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.25-add-OpenSSL-3.0.0-support.patch
-)
-
-src_prepare() {
-	sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "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_src_prepare
-}
-
-multilib_src_configure() {
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# code is not C++17 ready, bug #786402
-	append-cxxflags -std=c++14
-
-	local mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
-		-DINSTALL_LAYOUT=RPM
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
-		-DENABLED_LOCAL_INFILE=ON
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
-		-DWITH_LZ4=system
-		-DWITH_NUMA=OFF
-		-DWITH_SSL=system
-		-DWITH_ZLIB=system
-		-DWITH_ZSTD=system
-		-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
-		-DSHARED_LIB_PATCH_VERSION="0"
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITHOUT_SERVER=ON
-	)
-
-	cmake_src_configure
-}
-
-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.25.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.25.ebuild
deleted file mode 100644
index a8126e853fd8..000000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.25.ebuild
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-inherit cmake-multilib flag-o-matic
-
-# wrap the config script
-MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-
-DESCRIPTION="C client library for MariaDB/MySQL"
-HOMEPAGE="https://dev.mysql.com/downloads/"
-
-if [[ ${PV} == "9999" ]]; then
-	EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
-
-	inherit git-r3
-else
-	SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
-	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
-
-	S="${WORKDIR}/mysql-${PV}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0/21"
-IUSE="ldap static-libs"
-
-RDEPEND="
-	>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
-	app-arch/zstd:=[${MULTILIB_USEDEP}]
-	sys-libs/zlib:=[${MULTILIB_USEDEP}]
-	ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
-	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 )
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-8.0.22-always-build-decompress-utilities.patch
-	"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
-)
-
-src_prepare() {
-	sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "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_src_prepare
-}
-
-multilib_src_configure() {
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# code is not C++17 ready, bug #786402
-	append-cxxflags -std=c++14
-
-	local mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
-		-DINSTALL_LAYOUT=RPM
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
-		-DENABLED_LOCAL_INFILE=ON
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
-		-DWITH_LZ4=system
-		-DWITH_NUMA=OFF
-		-DWITH_SSL=system
-		-DWITH_ZLIB=system
-		-DWITH_ZSTD=system
-		-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
-		-DSHARED_LIB_PATCH_VERSION="0"
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITHOUT_SERVER=ON
-	)
-
-	cmake_src_configure
-}
-
-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.26.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.26.ebuild
deleted file mode 100644
index fa385e807a46..000000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.26.ebuild
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_ECLASS=cmake
-inherit cmake-multilib flag-o-matic
-
-# wrap the config script
-MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-
-DESCRIPTION="C client library for MariaDB/MySQL"
-HOMEPAGE="https://dev.mysql.com/downloads/"
-
-if [[ ${PV} == "9999" ]]; then
-	EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
-
-	inherit git-r3
-else
-	SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-
-	S="${WORKDIR}/mysql-${PV}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0/21"
-IUSE="ldap static-libs"
-
-RDEPEND="
-	>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
-	app-arch/zstd:=[${MULTILIB_USEDEP}]
-	sys-libs/zlib:=[${MULTILIB_USEDEP}]
-	ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
-	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 )
-
-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.25-add-OpenSSL-3.0.0-support.patch
-)
-
-src_prepare() {
-	sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "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_src_prepare
-}
-
-multilib_src_configure() {
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# code is not C++17 ready, bug #786402
-	append-cxxflags -std=c++14
-
-	local mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
-		-DINSTALL_LAYOUT=RPM
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
-		-DENABLED_LOCAL_INFILE=ON
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
-		-DWITH_LZ4=system
-		-DWITH_NUMA=OFF
-		-DWITH_SSL=system
-		-DWITH_ZLIB=system
-		-DWITH_ZSTD=system
-		-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
-		-DSHARED_LIB_PATCH_VERSION="0"
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITHOUT_SERVER=ON
-	)
-
-	cmake_src_configure
-}
-
-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] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2022-07-15  7:10 Sam James
  0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-07-15  7:10 UTC (permalink / raw
  To: gentoo-commits

commit:     0f7808b289d1eb16cef25c2de6411cc580b97c5c
Author:     brahmajit das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Fri Jul 15 05:52:59 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 15 07:10:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f7808b2

dev-db/mysql-connector-c: Use res_n* functions only on GLIBC

The issue occurs because the package tries to use the res_n* functions
(specifically res_ninit, res_nsearch and res_nclose) from resolv.h which
do not exist when using musl. So we are falling back to non-thread-safe
functions from resolv.h

Closes: https://bugs.gentoo.org/761352
Signed-off-by: brahmajit das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26353
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/mysql-connector-c-8.0.27-res_n.patch     |  49 ++++++++
 .../mysql-connector-c-8.0.27-r1.ebuild             | 123 +++++++++++++++++++++
 2 files changed, 172 insertions(+)

diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.27-res_n.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.27-res_n.patch
new file mode 100644
index 000000000000..34961b8ad9e2
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.27-res_n.patch
@@ -0,0 +1,49 @@
+# Musl doesn't have res_n* functions so we are falling back to the not
+# thread safe ones. Patch made with help from developer Fabian Groffen
+# <grobian@gentoo.org>.
+#
+# Closes: https://bugs.gentoo.org/761352
+# See also: https://github.com/mysql/mysql-server/pull/385
+# See also: https://bugs.mysql.com/bug.php?id=106034
+--- a/libmysql/CMakeLists.txt
++++ b/libmysql/CMakeLists.txt
+@@ -423,6 +423,19 @@ IF(HAS_WARN_FLAG)
+     )
+ ENDIF()
+
++check_symbol_exists(res_ninit "resolv.h" HAVE_RES_NINIT_FUNCTION)
++check_symbol_exists(res_nsearch "resolv.h" HAVE_RES_NSEARCH_FUNCTION)
++check_symbol_exists(res_nclose "resolv.h" HAVE_RES_NCLOSE_FUNCTION)
++IF (HAVE_RES_NINIT_FUNCTION)
++	add_compile_definitions(HAVE_RES_NINIT)
++ENDIF(HAVE_RES_NINIT_FUNCTION)
++IF (HAVE_RES_NSEARCH_FUNCTION)
++	add_compile_definitions(HAVE_RES_NSEARCH)
++ENDIF(HAVE_RES_NSEARCH_FUNCTION)
++IF (HAVE_RES_NCLOSE_FUNCTION)
++	add_compile_definitions(HAVE_RES_NCLOSE)
++ENDIF(HAVE_RES_NCLOSE_FUNCTION)
++
+ # Verify that libmysql_api_test runs OK
+ ADD_CUSTOM_COMMAND(TARGET libmysql_api_test POST_BUILD
+   COMMAND libmysql_api_test
+--- a/libmysql/dns_srv.cc
++++ b/libmysql/dns_srv.cc
+@@ -37,6 +37,17 @@
+ #include <netdb.h>
+ #include <resolv.h>
+
++/* we don't have anything else but the non-thread-safe variants */
++#if !defined(HAVE_RES_NINIT)
++#define res_ninit(X)              (void)X
++#endif
++#if !defined(HAVE_RES_NSEARCH)
++#define res_nsearch(X,D,I,S,B,L)  res_search(D,I,S,B,L)
++#endif
++#if !defined(HAVE_RES_NCLOSE)
++#define res_nclose(X)             (void)X
++#endif
++
+ // POSIX version
+
+ static bool get_dns_srv(Dns_srv_data &data, const char *dnsname, int &error) {

diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.27-r1.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.27-r1.ebuild
new file mode 100644
index 000000000000..7058ba6c50ed
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.27-r1.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+inherit cmake-multilib flag-o-matic
+
+# wrap the config script
+MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://dev.mysql.com/downloads/"
+
+if [[ ${PV} == "9999" ]]; then
+	EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
+
+	inherit git-r3
+else
+	SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+	S="${WORKDIR}/mysql-${PV}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0/21"
+IUSE="ldap static-libs"
+
+RDEPEND="
+	>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
+	app-arch/zstd:=[${MULTILIB_USEDEP}]
+	sys-libs/zlib:=[${MULTILIB_USEDEP}]
+	ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
+	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 )
+
+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-add-OpenSSL-3.0.0-support.patch
+	"${FILESDIR}"/${PN}-8.0.27-res_n.patch
+)
+
+src_prepare() {
+	sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "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_src_prepare
+}
+
+multilib_src_configure() {
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# Code is now requiring C++17 due to https://github.com/mysql/mysql-server/commit/236ab55bedd8c9eacd80766d85edde2a8afacd08
+	append-cxxflags -std=c++17
+
+	local mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
+		-DINSTALL_LAYOUT=RPM
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
+		-DENABLED_LOCAL_INFILE=ON
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
+		-DWITH_LZ4=system
+		-DWITH_NUMA=OFF
+		-DWITH_SSL=system
+		-DWITH_ZLIB=system
+		-DWITH_ZSTD=system
+		-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
+		-DSHARED_LIB_PATCH_VERSION="0"
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+		-DWITHOUT_SERVER=ON
+	)
+
+	cmake_src_configure
+}
+
+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] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2023-11-14 17:30 Andreas Sturmlechner
  0 siblings, 0 replies; 15+ messages in thread
From: Andreas Sturmlechner @ 2023-11-14 17:30 UTC (permalink / raw
  To: gentoo-commits

commit:     93143505f3e280d93534596890d4447ee37b4328
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 13 19:26:16 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Nov 14 17:30:14 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93143505

dev-db/mysql-connector-c: drop 8.0.27-r1, 8.0.31

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-db/mysql-connector-c/Manifest                  |   2 -
 ...nector-c-8.0.27-add-OpenSSL-3.0.0-support.patch | 313 ---------------------
 .../mysql-connector-c-8.0.27-r1.ebuild             | 122 --------
 .../mysql-connector-c-8.0.31.ebuild                | 121 --------
 4 files changed, 558 deletions(-)

diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index 57d2230323e4..bba4363fe6e8 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1,3 +1 @@
-DIST mysql-boost-8.0.27.tar.gz 292184025 BLAKE2B 177209f3c62b0326ca9d021c751a701dec84c1b15c946ab0a68b1b4cf0620468eb3a1df77a918284007a0fde1aaa6a9767d0baed57936612813ef583df51c35e SHA512 6ef2426c0bee46bdf8e2fa5cb159d5ae19f0bed4f7c9bea9b33e0dd922b568c3c68ca063dcbcd7ea6904aaea31877c10064ea10b4bc63fb40d9f31778e3a7891
-DIST mysql-boost-8.0.31.tar.gz 334504577 BLAKE2B 0506472c732351a1055be9bbd81212e95280ae464af95cb5b579777dd8fad4634b099fa2830c3095066daf8c586f1d8cd2316e7268fb0d2577dd706c595c9102 SHA512 87b1678de8c2fd640fd6f3ae58266ea63fe240578330e3296d0e5fc209bbe9b0c22996214b6ca4cce8c0d9cc2f9897f4e6723d835b33fc4342983c82929c3d96
 DIST mysql-boost-8.0.32.tar.gz 436207624 BLAKE2B 8a75fd6fe12d4f870622b3386118737b8f17d116df625ef6187647c870d456823543e0a1e9aa05fff53313c3872df1df23add2508ec735bb7972718fc1e90539 SHA512 937e0d0350cb583bb4de15b080f08ed92b253a6d7c09f13a028855dae154fc84f0c95fb082b818b2fa6fa792cd2d9db8d7dc7a20a2a0d3d2b6839fbd2c821b44

diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.27-add-OpenSSL-3.0.0-support.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.27-add-OpenSSL-3.0.0-support.patch
deleted file mode 100644
index da1907db4633..000000000000
--- a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.27-add-OpenSSL-3.0.0-support.patch
+++ /dev/null
@@ -1,313 +0,0 @@
-From d5bedd07c111676695270cdf35d23f9026a78113 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi@gentoo.org>
-Date: Tue, 22 Jun 2021 23:56:54 +0200
-Subject: [PATCH 6/6] Add OpenSSL 3.0.0 support
-
-Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
----
- cmake/ssl.cmake                               | 59 +++++++++++++------
- mysys/my_md5.cc                               |  2 +
- .../xcom_network_provider_ssl_native_lib.cc   |  4 ++
- plugin/x/client/xconnection_impl.cc           |  4 ++
- sql-common/client.cc                          |  2 +
- sql/mysqld.cc                                 |  2 +
- sql/sys_vars.cc                               | 18 +++++-
- vio/viosslfactories.cc                        |  6 ++
- 8 files changed, 78 insertions(+), 19 deletions(-)
-
-diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
-index 293281cf1..4732d8bf4 100644
---- a/cmake/ssl.cmake
-+++ b/cmake/ssl.cmake
-@@ -205,34 +205,59 @@ MACRO (MYSQL_CHECK_SSL)
-                  NAMES crypto libcrypto libeay32
-                  HINTS ${OPENSSL_ROOT_DIR}/lib)
- 
--    IF(OPENSSL_INCLUDE_DIR)
-+    IF(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
-       # Verify version number. Version information looks like:
-       #   #define OPENSSL_VERSION_NUMBER 0x1000103fL
-       # Encoded as MNNFFPPS: major minor fix patch status
-       FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
-         OPENSSL_VERSION_NUMBER
--        REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
--        )
--      STRING(REGEX REPLACE
--        "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
--        OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
--        )
--      STRING(REGEX REPLACE
--        "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
--        OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_NUMBER}"
--        )
--      STRING(REGEX REPLACE
--        "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
--        OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
-+        REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
-         )
-+
-+      IF(OPENSSL_VERSION_NUMBER)
-+        STRING(REGEX REPLACE
-+          "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
-+          OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
-+          )
-+        STRING(REGEX REPLACE
-+          "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
-+          OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_NUMBER}"
-+          )
-+        STRING(REGEX REPLACE
-+          "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
-+          OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
-+          )
-+      ELSE()
-+        FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
-+          OPENSSL_VERSION_STR
-+          REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_STR[\t ]+\"([0-9])+\\.([0-9])+\\.([0-9])+\".*"
-+          )
-+
-+        STRING(REGEX REPLACE
-+          "^.*OPENSSL_VERSION_STR[\t ]+\"([0-9]+)\\.[0-9]+\\.[0-9]+\".*$" "\\1"
-+          OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_STR}"
-+          )
-+        STRING(REGEX REPLACE
-+          "^.*OPENSSL_VERSION_STR[\t ]+\"[0-9]+\\.([0-9]+)\\.[0-9]+\".*$" "\\1"
-+          OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_STR}"
-+          )
-+        STRING(REGEX REPLACE
-+          "^.*OPENSSL_VERSION_STR[\t ]+\"[0-9]+\\.[0-9]+\\.([0-9]+)\".*$" "\\1"
-+          OPENSSL_FIX_VERSION "${OPENSSL_VERSION_STR}"
-+          )
-+      ENDIF()
-     ENDIF()
--    IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0")
-+
-+    INCLUDE(CheckSymbolExists)
-+
-+    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
-@@ -296,8 +321,6 @@ MACRO (MYSQL_CHECK_SSL)
-     MESSAGE(STATUS "OPENSSL_MINOR_VERSION = ${OPENSSL_MINOR_VERSION}")
-     MESSAGE(STATUS "OPENSSL_FIX_VERSION = ${OPENSSL_FIX_VERSION}")
- 
--    INCLUDE(CheckSymbolExists)
--
-     CMAKE_PUSH_CHECK_STATE()
-     SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
-     CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
-diff --git a/mysys/my_md5.cc b/mysys/my_md5.cc
-index 86203619f..37ed3c8b2 100644
---- 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;
-+#if defined(OPENSSL_FIPS)
-   fips_mode = FIPS_mode();
-+#endif
-   /* If fips mode is ON/STRICT restricted method calls will result into abort,
-    * skipping call. */
-   if (fips_mode == 0) {
-diff --git a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/network/xcom_network_provider_ssl_native_lib.cc b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/network/xcom_network_provider_ssl_native_lib.cc
-index 8d4af3c04..de67c9e7c 100644
---- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/network/xcom_network_provider_ssl_native_lib.cc
-+++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/network/xcom_network_provider_ssl_native_lib.cc
-@@ -316,6 +316,7 @@ error:
-   return 1;
- }
- 
-+#if defined(OPENSSL_FIPS)
- #define OPENSSL_ERROR_LENGTH 512
- static int configure_ssl_fips_mode(const int fips_mode) {
-   int rc = -1;
-@@ -339,6 +340,7 @@ static int configure_ssl_fips_mode(const int fips_mode) {
- EXIT:
-   return rc;
- }
-+#endif
- 
- static int configure_ssl_ca(SSL_CTX *ssl_ctx, const char *ca_file,
-                             const char *ca_path) {
-@@ -478,12 +480,14 @@ int Xcom_network_provider_ssl_library::xcom_init_ssl(
-   int verify_server = SSL_VERIFY_NONE;
-   int verify_client = SSL_VERIFY_NONE;
- 
-+#if defined(OPENSSL_FIPS)
-   if (configure_ssl_fips_mode(
-           Network_provider_manager::getInstance().xcom_get_ssl_fips_mode()) !=
-       1) {
-     G_ERROR("Error setting the ssl fips mode");
-     goto error;
-   }
-+#endif
- 
-   SSL_library_init();
-   SSL_load_error_strings();
-diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc
-index aaf37a1b3..753944889 100644
---- a/plugin/x/client/xconnection_impl.cc
-+++ b/plugin/x/client/xconnection_impl.cc
-@@ -617,6 +617,7 @@ XError Connection_impl::get_ssl_error(const int error_id) {
-   return XError(CR_SSL_CONNECTION_ERROR, buffer);
- }
- 
-+#if defined(OPENSSL_FIPS)
- /**
-   Set fips mode in openssl library,
-   When we set fips mode ON/STRICT, it will perform following operations:
-@@ -656,6 +657,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);
-@@ -666,12 +668,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};
- 
-+#if defined(OPENSSL_FIPS)
-   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));
- 
-diff --git a/sql-common/client.cc b/sql-common/client.cc
-index 5de2a1fb9..102e663d9 100644
---- a/sql-common/client.cc
-+++ b/sql-common/client.cc
-@@ -8286,6 +8286,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
-         return 1;
-       break;
-     case MYSQL_OPT_SSL_FIPS_MODE: {
-+#if defined(OPENSSL_FIPS)
-       char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
-       ENSURE_EXTENSIONS_PRESENT(&mysql->options);
-       mysql->options.extension->ssl_fips_mode =
-@@ -8298,6 +8299,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);
-diff --git a/sql/mysqld.cc b/sql/mysqld.cc
-index 8105d4b73..b580f1c4d 100644
---- a/sql/mysqld.cc
-+++ b/sql/mysqld.cc
-@@ -5292,12 +5292,14 @@ static void init_ssl() {
- }
- 
- static int init_ssl_communication() {
-+#if defined(OPENSSL_FIPS)
-   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 (TLS_channel::singleton_init(&mysql_main, mysql_main_channel, opt_use_ssl,
-                                   &server_main_callback, opt_initialize))
-     return 1;
-diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
-index 4592e4bbb..320f458fd 100644
---- a/sql/sys_vars.cc
-+++ b/sql/sys_vars.cc
-@@ -4799,6 +4799,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));
- 
-+#if defined(OPENSSL_FIPS)
- 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) {
-@@ -4809,15 +4810,30 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
-     return false;
-   }
- }
-+#endif
- 
-+#if defined(OPENSSL_FIPS)
- static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", nullptr};
-+#else
-+static const char *ssl_fips_mode_names[] = {"OFF", 0};
-+#endif
- static Sys_var_enum Sys_ssl_fips_mode(
-     "ssl_fips_mode",
-     "SSL FIPS mode (applies only for OpenSSL); "
-+#if defined(OPENSSL_FIPS)
-     "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),
-+#if defined(OPENSSL_FIPS)
-+    ON_UPDATE(update_fips_mode),
-+#else
-+    ON_UPDATE(NULL),
-+#endif
-+    NULL);
- 
- static Sys_var_bool Sys_auto_generate_certs(
-     "auto_generate_certs",
-diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
-index 618be1511..672fc74ca 100644
---- a/vio/viosslfactories.cc
-+++ b/vio/viosslfactories.cc
-@@ -472,6 +472,7 @@ void ssl_start() {
-   }
- }
- 
-+#if defined(OPENSSL_FIPS)
- /**
-   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
- 
- /**
-   Toggle FIPS mode, to see whether it is available with the current SSL library.
-@@ -532,12 +534,16 @@ uint get_fips_mode() { return FIPS_mode(); }
-   @retval non-zero: FIPS is supported.
- */
- int test_ssl_fips_mode(char *err_string) {
-+#if defined(OPENSSL_FIPS)
-   int ret = FIPS_mode_set(FIPS_mode() == 0 ? 1 : 0);
-   unsigned long err = (ret == 0) ? ERR_get_error() : 0;
- 
-   if (err != 0) {
-     ERR_error_string_n(err, err_string, OPENSSL_ERROR_LENGTH - 1);
-   }
-+#else
-+  int ret = 0;
-+#endif
-   return ret;
- }
- 
--- 
-2.34.0
-

diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.27-r1.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.27-r1.ebuild
deleted file mode 100644
index 124402752491..000000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.27-r1.ebuild
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake-multilib flag-o-matic
-
-# wrap the config script
-MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-
-DESCRIPTION="C client library for MariaDB/MySQL"
-HOMEPAGE="https://dev.mysql.com/downloads/"
-
-if [[ ${PV} == "9999" ]]; then
-	EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
-
-	inherit git-r3
-else
-	SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
-	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
-	S="${WORKDIR}/mysql-${PV}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0/21"
-IUSE="ldap static-libs"
-
-RDEPEND="
-	>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
-	app-arch/zstd:=[${MULTILIB_USEDEP}]
-	sys-libs/zlib:=[${MULTILIB_USEDEP}]
-	ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
-	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 )
-
-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-add-OpenSSL-3.0.0-support.patch
-	"${FILESDIR}"/${PN}-8.0.27-res_n.patch
-)
-
-src_prepare() {
-	sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "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_src_prepare
-}
-
-multilib_src_configure() {
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# Code is now requiring C++17 due to https://github.com/mysql/mysql-server/commit/236ab55bedd8c9eacd80766d85edde2a8afacd08
-	append-cxxflags -std=c++17
-
-	local mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
-		-DINSTALL_LAYOUT=RPM
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
-		-DENABLED_LOCAL_INFILE=ON
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
-		-DWITH_LZ4=system
-		-DWITH_NUMA=OFF
-		-DWITH_SSL=system
-		-DWITH_ZLIB=system
-		-DWITH_ZSTD=system
-		-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
-		-DSHARED_LIB_PATCH_VERSION="0"
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITHOUT_SERVER=ON
-	)
-
-	cmake_src_configure
-}
-
-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.31.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.31.ebuild
deleted file mode 100644
index db6fbd547f17..000000000000
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.31.ebuild
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake-multilib flag-o-matic
-
-# wrap the config script
-MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-
-DESCRIPTION="C client library for MariaDB/MySQL"
-HOMEPAGE="https://dev.mysql.com/downloads/"
-
-if [[ ${PV} == "9999" ]]; then
-	EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
-
-	inherit git-r3
-else
-	SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
-	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
-	S="${WORKDIR}/mysql-${PV}"
-fi
-
-LICENSE="GPL-2"
-SLOT="0/21"
-IUSE="ldap static-libs"
-
-RDEPEND="
-	>=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
-	app-arch/zstd:=[${MULTILIB_USEDEP}]
-	sys-libs/zlib:=[${MULTILIB_USEDEP}]
-	ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
-	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 )
-
-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
-)
-
-src_prepare() {
-	sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "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_src_prepare
-}
-
-multilib_src_configure() {
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# Code is now requiring C++17 due to https://github.com/mysql/mysql-server/commit/236ab55bedd8c9eacd80766d85edde2a8afacd08
-	append-cxxflags -std=c++17
-
-	local mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
-		-DINSTALL_LAYOUT=RPM
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
-		-DENABLED_LOCAL_INFILE=ON
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
-		-DWITH_LZ4=system
-		-DWITH_NUMA=OFF
-		-DWITH_SSL=system
-		-DWITH_ZLIB=system
-		-DWITH_ZSTD=system
-		-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
-		-DSHARED_LIB_PATCH_VERSION="0"
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITHOUT_SERVER=ON
-	)
-
-	cmake_src_configure
-}
-
-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] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/
@ 2024-04-27 12:54 Petr Vaněk
  0 siblings, 0 replies; 15+ messages in thread
From: Petr Vaněk @ 2024-04-27 12:54 UTC (permalink / raw
  To: gentoo-commits

commit:     65e810c9b1123f6c07d92328dfdf1e60498bc392
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Mon Apr  8 14:37:50 2024 +0000
Commit:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Sat Apr 27 12:53:24 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65e810c9

dev-db/mysql-connector-c: add 8.0.36

Changes:
- musl patch upstreamed, see [1-3]
- mysql.info not present any more, see [4]
- lz4 patch updated

[1] https://github.com/mysql/mysql-server/commit/dc6b9e2556bf247cda80670b824cb24b271946f2
[2] https://bugs.mysql.com/bug.php?id=110808
[3] https://github.com/mysql/mysql-server/pull/455
[4] https://github.com/mysql/mysql-server/commit/18b2dd3ddfbe06bef9a378f1a87e63d494514b0b

Closes: https://bugs.gentoo.org/893912
Closes: https://bugs.gentoo.org/900667
Closes: https://bugs.gentoo.org/759058
Closes: https://bugs.gentoo.org/882743
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36160
Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>

 dev-db/mysql-connector-c/Manifest                  |   1 +
 ...-8.0.36-always-build-decompress-utilities.patch |  23 ++++
 .../mysql-connector-c-8.0.36.ebuild                | 123 +++++++++++++++++++++
 3 files changed, 147 insertions(+)

diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index bba4363fe6e8..b1933a7ac25c 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1 +1,2 @@
 DIST mysql-boost-8.0.32.tar.gz 436207624 BLAKE2B 8a75fd6fe12d4f870622b3386118737b8f17d116df625ef6187647c870d456823543e0a1e9aa05fff53313c3872df1df23add2508ec735bb7972718fc1e90539 SHA512 937e0d0350cb583bb4de15b080f08ed92b253a6d7c09f13a028855dae154fc84f0c95fb082b818b2fa6fa792cd2d9db8d7dc7a20a2a0d3d2b6839fbd2c821b44
+DIST mysql-boost-8.0.36.tar.gz 438154682 BLAKE2B 066c9dd7f2804ad29808c3bfcf5eae53466f7c40cf1386a9c1f26a0b45dcc3eda8d9618de36e8008e5e4d58b726d6c8ca85aec8d1eda8981f5a49e495b32f046 SHA512 a6c1c009a322b7e7aa2aa607573060414c847c77d48f44a24058ffb89673621f2ebbcc1a4448fa841a87ff721159cc8eaf44a57721c7dc233c130691c16a9d4a

diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.36-always-build-decompress-utilities.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.36-always-build-decompress-utilities.patch
new file mode 100644
index 000000000000..9c8e654ba280
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.36-always-build-decompress-utilities.patch
@@ -0,0 +1,23 @@
+diff --git a/utilities/CMakeLists.txt b/utilities/CMakeLists.txt
+index da34524..96c7299 100644
+--- a/utilities/CMakeLists.txt
++++ b/utilities/CMakeLists.txt
+@@ -124,13 +124,11 @@ MYSQL_ADD_EXECUTABLE(perror
+   DEPENDENCIES GenError
+   LINK_LIBRARIES mysys
+   )
+-IF(WITH_LZ4 STREQUAL "bundled")
+-  MYSQL_ADD_EXECUTABLE(lz4_decompress
+-    lz4_decompress.cc
+-    COMPONENT Server
+-    LINK_LIBRARIES ext::lz4 mysys
+-    )
+-ENDIF()
++MYSQL_ADD_EXECUTABLE(lz4_decompress
++  lz4_decompress.cc
++  COMPONENT Server
++  LINK_LIBRARIES ext::lz4 mysys
++  )
+ 
+ MYSQL_ADD_EXECUTABLE(zlib_decompress
+   zlib_decompress.cc

diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.36.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.36.ebuild
new file mode 100644
index 000000000000..724061855292
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.36.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib flag-o-matic
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://dev.mysql.com/downloads/"
+
+if [[ ${PV} == "9999" ]]; then
+	EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
+
+	inherit git-r3
+else
+	SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+	S="${WORKDIR}/mysql-${PV}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0/21"
+IUSE="ldap static-libs"
+
+RDEPEND="
+	>=app-arch/lz4-1.9.4:=[${MULTILIB_USEDEP}]
+	app-arch/zstd:=[${MULTILIB_USEDEP}]
+	dev-libs/openssl:=[${MULTILIB_USEDEP}]
+	>=sys-libs/zlib-1.2.13:=[${MULTILIB_USEDEP}]
+	ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}"
+# Avoid file collisions, #692580
+RDEPEND+="
+	!<dev-db/mysql-5.6.45-r1
+	!=dev-db/mysql-5.7.23*
+	!=dev-db/mysql-5.7.24*
+	!=dev-db/mysql-5.7.25*
+	!=dev-db/mysql-5.7.26-r0
+	!=dev-db/mysql-5.7.27-r0
+	!<dev-db/percona-server-5.7.26.29-r1
+"
+
+DOCS=( README )
+
+# Wrap the config script
+MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-8.0.36-always-build-decompress-utilities.patch
+	"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
+	"${FILESDIR}"/${PN}-8.0.27-res_n.patch
+)
+
+src_prepare() {
+	sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "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_src_prepare
+}
+
+multilib_src_configure() {
+	# Code is now requiring C++17 due to https://github.com/mysql/mysql-server/commit/236ab55bedd8c9eacd80766d85edde2a8afacd08
+	append-cxxflags -std=c++17
+
+	local mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
+		-DINSTALL_LAYOUT=RPM
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
+		-DENABLED_LOCAL_INFILE=ON
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
+		# Automagically uses LLD with not using LTO (bug #710272, #775845)
+		-DUSE_LD_LLD=OFF
+		-DWITH_LZ4=system
+		-DWITH_NUMA=OFF
+		-DWITH_SSL=system
+		-DWITH_ZLIB=system
+		-DWITH_ZSTD=system
+		-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
+		-DSHARED_LIB_PATCH_VERSION="0"
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+		-DWITHOUT_SERVER=ON
+		-DWITH_BUILD_ID=OFF
+	)
+
+	cmake_src_configure
+}
+
+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] 15+ messages in thread

end of thread, other threads:[~2024-04-27 12:54 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-02 14:34 [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/, dev-db/mysql-connector-c/ Brian Evans
  -- strict thread matches above, loose matches on Subject: below --
2024-04-27 12:54 Petr Vaněk
2023-11-14 17:30 Andreas Sturmlechner
2022-07-15  7:10 Sam James
2022-03-03 21:22 David Seifert
2021-11-14  3:49 Thomas Deutschmann
2021-06-22 23:49 Thomas Deutschmann
2021-01-21 22:32 Thomas Deutschmann
2020-10-20 18:56 Thomas Deutschmann
2020-07-26  1:46 Thomas Deutschmann
2020-04-30 20:45 Thomas Deutschmann
2020-01-20 19:26 Thomas Deutschmann
2019-08-23  0:24 Thomas Deutschmann
2017-11-21 19:34 Brian Evans
2017-11-21 19:34 Brian Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox