public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-10-16 16:23 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-10-16 16:23 UTC (permalink / raw
  To: gentoo-commits

commit:     1b14a8ec3aec4dd63d0770e5a9aea0b830e2fb38
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 16 16:19:15 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Oct 16 16:23:17 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b14a8ec

dev-db/mysql: small changes

- Build system will always check for dev-libs/protobuf when USE=server

- Make sure to subscribe to protobuf's subslot when USE=rocksdb

- Don't install files in /usr/share/doc/${P}/scripts -- they are
  already installed in /usr/share/mysql

- Sync style with dev-db/percona-server ebuild

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

 dev-db/mysql/Manifest                              |   2 +-
 dev-db/mysql/metadata.xml                          |   1 +
 ...sql-5.7.23-r1.ebuild => mysql-5.7.23-r2.ebuild} | 142 ++++++++++++---------
 3 files changed, 87 insertions(+), 58 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index c5d769125da..7641b811b68 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,4 +3,4 @@ DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa3492688
 DIST mysql-5.6.41.tar.gz 32111985 BLAKE2B 5ccad59333525b354db4fa892857e237cddf8fe1a4d289c6e410c31d6142a71d3ce4dab8d954fa9932ec1f83b50e8eccd5845e082deaaa56f1c0c5e21b2ce6c0 SHA512 a62d7a68c6bb49de33f8c9e634bce53cb453a87238e92967115e8e928fa9ed291727b8bd5a5271a0b5b634d957eb310c745edfb14b6be1deb9099bb757aa2cff
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d
-DIST mysql-extras-20181013-2117Z.tar.bz2 326504 BLAKE2B 5df10abacafc6835536742b10fc268d76ed39818ed704fca21e3b0d5241152640557a37ad1c0a87173223763efd6f6cba87c2e203088227738cb6eb9f4224beb SHA512 03d3ef9add033699dc6d8b6120d1fb323268a2e2b8ec9f375edfeb1c6b3878724db091bf4ae78462872efa81d1bb2e23f8ff4f6e0831d2ce8efd30465e415fa9
+DIST mysql-extras-20181016-1606Z.tar.bz2 327537 BLAKE2B 885b21b9f576844edf7e850cb8c7484fdadb469297adcbcd885ed0d12bb4a24324f26c4546a1fa077502f7f306b436ed48667fbfccce11be8873ff723f435b85 SHA512 b6fb00c2971cf91f0765b08b4f0449179eb5701b0eb92a184103f1129f365fee2271d27150c30a3f2fb3c2e8b669f77e65a54956f2862c6d3fe6be49e4bc0f88

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index c20a8004a28..2ec6490392c 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -13,6 +13,7 @@ dev-db/mariadb
 <use>
   <flag name="cjk">Add CJK support for InnoDB fulltext search using <pkg>app-text/mecab</pkg></flag>
   <flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages (not recommended)</flag>
+  <flag name="experimental">Build experimental features aka "rapid" plugins</flag>
   <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>
   <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
   <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>

diff --git a/dev-db/mysql/mysql-5.7.23-r1.ebuild b/dev-db/mysql/mysql-5.7.23-r2.ebuild
similarity index 91%
rename from dev-db/mysql/mysql-5.7.23-r1.ebuild
rename to dev-db/mysql/mysql-5.7.23-r2.ebuild
index d9f2fd4117b..ef6b22685df 100644
--- a/dev-db/mysql/mysql-5.7.23-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.23-r2.ebuild
@@ -2,21 +2,21 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20181013-2117Z"
+MY_EXTRAS_VER="20181016-1606Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
 # Keeping eutils in EAPI=6 for emktemp in pkg_config
 
-inherit eutils flag-o-matic prefix toolchain-funcs \
-	user cmake-utils multilib-minimal
+inherit cmake-utils eutils flag-o-matic linux-info \
+	prefix toolchain-funcs user multilib-minimal
 
 SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
 	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
 	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
 
 # Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
 	SRC_URI="${SRC_URI}
 		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
 		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
@@ -26,8 +26,8 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="0/18"
-IUSE="cjk client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
-	+server static static-libs systemtap tcmalloc test yassl"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test yassl"
 
 # Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
 RESTRICT="libressl? ( test )"
@@ -65,7 +65,7 @@ PATCHES=(
 # Be warned, *DEPEND are version-dependant
 # These are used for both runtime and compiletime
 # MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="net-misc/curl
+COMMON_DEPEND="net-misc/curl:=
 	>=sys-apps/sed-4
 	>=sys-apps/texinfo-4.7-r1
 	sys-libs/ncurses:0=
@@ -82,6 +82,11 @@ COMMON_DEPEND="net-misc/curl
 	server? (
 		>=app-arch/lz4-0_p131:=
 		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
 		numa? ( sys-process/numactl )
 	)
 	systemtap? ( >=dev-util/systemtap-1.3:0= )
@@ -98,10 +103,13 @@ COMMON_DEPEND="net-misc/curl
 	)
 "
 DEPEND="${COMMON_DEPEND}
-	dev-libs/protobuf
 	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
 	virtual/yacc
-	server? ( dev-libs/libevent )
+	server? (
+		dev-libs/libevent
+		experimental? ( net-libs/rpcsvc-proto )
+	)
 	static? ( sys-libs/ncurses[static-libs] )
 "
 RDEPEND="${COMMON_DEPEND}
@@ -150,13 +158,13 @@ mysql_init_vars() {
 			export PREVIOUS_DATADIR
 		fi
 	else
-		if [[ ${EBUILD_PHASE} == "config" ]]; then
+		if [[ ${EBUILD_PHASE} == "config" ]] ; then
 			local new_MY_DATADIR
 			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
 				| sed -ne '/datadir/s|^--datadir=||p' \
 				| tail -n1`
 
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
 				ewarn "MySQL MY_DATADIR has changed"
 				ewarn "from ${MY_DATADIR}"
 				ewarn "to ${new_MY_DATADIR}"
@@ -170,6 +178,17 @@ mysql_init_vars() {
 	export MY_DATADIR
 }
 
+pkg_pretend() {
+	if use numa ; then
+		local CONFIG_CHECK="~NUMA"
+
+		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+		check_extra_config
+	fi
+}
+
 pkg_setup() {
 	if [[ ${MERGE_TYPE} != binary ]] ; then
 		local GCC_MAJOR_SET=$(gcc-major-version)
@@ -183,6 +202,7 @@ pkg_setup() {
 			die
 		fi
 	fi
+
 	if has test ${FEATURES} && \
 		use server && ! has userpriv ${FEATURES} ; then
 			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
@@ -233,10 +253,10 @@ pkg_postinst() {
 
 	# Note about configuration change
 	einfo
-	elog "This version of mysql reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/${PN}.d."
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
 	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
 	elog "You may have as many files as needed and they are read alphabetically."
 	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
 	einfo
@@ -251,30 +271,38 @@ src_unpack() {
 }
 
 src_prepare() {
+	cmake-utils_src_prepare
+
 	if use jemalloc ; then
 		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
 	fi
-	if use tcmalloc; then
+
+	if use tcmalloc ; then
 		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
 	fi
+
 	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
 	if [[ -d "${S}/support-files/SELinux" ]] ; then
 		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
 	fi
 
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/libevent \
+		"${S}"/zlib \
+		|| die
+
 	if use libressl ; then
 		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
 			"${S}/cmake/ssl.cmake" || die
 	fi
 
 	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	cmake-utils_src_prepare
 }
 
 src_configure(){
-	# bug 508724 mariadb cannot use ld.gold
-	tc-ld-disable-gold
 	# Bug #114895, bug #110149
 	filter-flags "-O" "-O[01]"
 
@@ -332,7 +360,6 @@ multilib_src_configure() {
 		# The build forces this to be defined when cross-compiling. We pass it
 		# all the time for simplicity and to make sure it is actually correct.
 		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_RAPID=OFF
 		-DWITH_CURL=system
 		-DWITH_BOOST="${S}/boost"
 		-DWITH_PROTOBUF=system
@@ -355,7 +382,7 @@ multilib_src_configure() {
 
 	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
 	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi; then
+	if multilib_is_native_abi ; then
 		mycmakeargs+=(
 			-DENABLE_DTRACE=$(usex systemtap)
 		)
@@ -368,15 +395,15 @@ multilib_src_configure() {
 	fi
 
 	if multilib_is_native_abi && use server ; then
-
 		mycmakeargs+=(
 			-DWITH_LIBEVENT=system
 			-DWITH_LZ4=system
 			-DWITH_MECAB=$(usex cjk system OFF)
 			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
 		)
 
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
 			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
 			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
 			ewarn "You MUST file bugs without these variables set."
@@ -411,7 +438,7 @@ multilib_src_configure() {
 			mycmakeargs+=( -DENABLED_PROFILING=ON )
 		fi
 
-		if use static; then
+		if use static ; then
 			mycmakeargs+=( -DWITH_PIC=1 )
 		fi
 
@@ -424,10 +451,10 @@ multilib_src_configure() {
 			-DWITH_FEDERATED_STORAGE_ENGINE=1
 			-DWITH_HEAP_STORAGE_ENGINE=1
 			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
 			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
 			-DWITH_MYISAM_STORAGE_ENGINE=1
 			-DWITH_PARTITION_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
 		)
 
 	else
@@ -481,7 +508,7 @@ src_test() {
 	# localhost. Also causes weird failures.
 	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
 
-	if [[ $UID -eq 0 ]]; then
+	if [[ $UID -eq 0 ]] ; then
 		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
 	fi
 	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
@@ -515,6 +542,15 @@ src_test() {
 			_disable_test "$t" "False positives in Gentoo"
 	done
 
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
 	if ! use latin1 ; then
 		# The following tests will fail if DEFAULT_CHARSET
 		# isn't set to latin1:
@@ -646,31 +682,21 @@ multilib_src_install_all() {
 		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
 			"${FILESDIR}/${mycnf_src}" \
 			> "${TMPDIR}/my.cnf.ok" || die
+
 		if use prefix ; then
 			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
 				"${TMPDIR}/my.cnf.ok" || die
 		fi
+
 		if use latin1 ; then
 			sed -i \
 				-e "/character-set/s|utf8|latin1|g" \
 				"${TMPDIR}/my.cnf.ok" || die
 		fi
-		eprefixify "${TMPDIR}/my.cnf.ok"
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
 
-		einfo "Including support files and sample configurations"
-		docinto "support-files"
-		local script
-		for script in \
-			"${S}"/support-files/magic
-		do
-			[[ -f "$script" ]] && dodoc "${script}"
-		done
+		eprefixify "${TMPDIR}/my.cnf.ok"
 
-		docinto "scripts"
-		for script in "${S}"/scripts/mysql* ; do
-			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
-		done
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
 	fi
 
 	#Remove mytop if perl is not selected
@@ -698,14 +724,14 @@ pkg_config() {
 		die "Minimal builds do NOT include the MySQL server"
 	fi
 
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
 		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
 		MY_DATADIR_s="${MY_DATADIR_s%%/}"
 		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
 		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
 
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
-			if [[ -d "${MY_DATADIR_s}" ]]; then
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
+			if [[ -d "${MY_DATADIR_s}" ]] ; then
 				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
 				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
 			else
@@ -715,7 +741,7 @@ pkg_config() {
 			fi
 		else
 			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]]; then
+			if [[ -d "${MY_DATADIR_s}" ]] ; then
 				ewarn "Attempting to use ${MY_DATADIR_s}"
 			else
 				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
@@ -728,14 +754,14 @@ pkg_config() {
 	local pwd2="b"
 	local maxtry=15
 
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
 		local tmp_mysqld_password_source=
 
-		for tmp_mysqld_password_source in mysql client; do
+		for tmp_mysqld_password_source in mysql client ; do
 			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
 			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
 					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
 					MYSQL_ROOT_PASSWORD=
 					continue
@@ -747,7 +773,7 @@ pkg_config() {
 		done
 
 		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
 			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
 		fi
 
@@ -760,15 +786,17 @@ pkg_config() {
 	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
 	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
 
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
 		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
 		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
 	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then
 		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
 		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
 	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then
 		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
 		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
 	fi
@@ -784,7 +812,7 @@ pkg_config() {
 	# localhost. Also causes weird failures.
 	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
 
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
 
 		einfo "Please provide a password for the mysql 'root' user now"
 		einfo "or through the ${HOME}/.my.cnf file."
@@ -823,11 +851,11 @@ pkg_config() {
 
 	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
 	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]]; then
+	if [[ ! -d "${PID_DIR}" ]] ; then
 		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
 	fi
 
-	if [[ ! -d "${MY_DATADIR}" ]]; then
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
 		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
 	fi
 
@@ -846,7 +874,7 @@ pkg_config() {
 	einfo "Command: ${cmd[*]}"
 	su -s /bin/sh -c "${cmd[*]}" mysql \
 		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [ $? -ne 0 ]; then
+	if [[ $? -ne 0 ]] ; then
 		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
 		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
 	fi
@@ -881,7 +909,7 @@ pkg_config() {
 	done
 	eend $rc
 
-	if ! [[ -S "${socket}" ]]; then
+	if ! [[ -S "${socket}" ]] ; then
 		die "Completely failed to start up mysqld with: ${mysqld}"
 	fi
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2024-07-04  0:29 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2024-07-04  0:29 UTC (permalink / raw
  To: gentoo-commits

commit:     be1418af7967301deee501267fbb72e6bba1841b
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Wed Jun  5 15:14:50 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jul  4 00:09:27 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be1418af

dev-db/mysql: add 8.0.37

Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/37036
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/Manifest            |    1 +
 dev-db/mysql/mysql-8.0.37.ebuild | 1281 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1282 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 3efcb891c8b1..83b7c67873ba 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -9,3 +9,4 @@ DIST mysql-boost-8.0.31.tar.gz 334504577 BLAKE2B 0506472c732351a1055be9bbd81212e
 DIST mysql-boost-8.0.32.tar.gz 436207624 BLAKE2B 8a75fd6fe12d4f870622b3386118737b8f17d116df625ef6187647c870d456823543e0a1e9aa05fff53313c3872df1df23add2508ec735bb7972718fc1e90539 SHA512 937e0d0350cb583bb4de15b080f08ed92b253a6d7c09f13a028855dae154fc84f0c95fb082b818b2fa6fa792cd2d9db8d7dc7a20a2a0d3d2b6839fbd2c821b44
 DIST mysql-boost-8.0.34.tar.gz 439550780 BLAKE2B f50701b7e97e6cec21d6ce0f80f07a8df68a14c637a67841c06f578be8ed01d216dcb3b859a29f1befd4223b99e60675d6fa70f4b227bf6af81804e2c43161d4 SHA512 e5e79ac6870c214cf62c8e2830106d60e09d2e6df30654b84bb5d26864b4eabe777468a223e6ee4c1e22b7f6ec086c73e85e3f4c1fa66912b0e59b606ab46cd6
 DIST mysql-boost-8.0.36.tar.gz 438154682 BLAKE2B 066c9dd7f2804ad29808c3bfcf5eae53466f7c40cf1386a9c1f26a0b45dcc3eda8d9618de36e8008e5e4d58b726d6c8ca85aec8d1eda8981f5a49e495b32f046 SHA512 a6c1c009a322b7e7aa2aa607573060414c847c77d48f44a24058ffb89673621f2ebbcc1a4448fa841a87ff721159cc8eaf44a57721c7dc233c130691c16a9d4a
+DIST mysql-boost-8.0.37.tar.gz 445594692 BLAKE2B 105521985ec8c622a28b5e0f7f13e519b2d91af6ce7c2b483cf1c096aa79f156cc59eabb6281b485d6f558eb6e20a95d5edc349bbd72d1c4a2591eef59270f4c SHA512 4c6033d4f96990d3f324f0d5733273425ddf7cc11660e110e0dc848da6cfa47b7565c1eb0b5d1e08878a0ea2c7d1eb85b400ccca28e5b4383f7e9216ba3e1660

diff --git a/dev-db/mysql/mysql-8.0.37.ebuild b/dev-db/mysql/mysql-8.0.37.ebuild
new file mode 100644
index 000000000000..27ef30ae8d8c
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.37.ebuild
@@ -0,0 +1,1281 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit check-reqs cmake edo flag-o-matic linux-info multiprocessing prefix toolchain-funcs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+# Patch version
+PATCH_SET=( https://github.com/parona-source/mysql-server/releases/download/mysql-8.0.36-patches-01/mysql-8.0.36-patches-01.tar.xz )
+
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+HOMEPAGE="https://www.mysql.com/"
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${MY_PV}.tar.gz"
+SRC_URI+=" https://cdn.mysql.com/archives/mysql-$(ver_cut 1-2)/mysql-boost-${MY_PV}.tar.gz"
+SRC_URI+=" https://downloads.mysql.com/archives/MySQL-$(ver_cut 1-2)/${PN}-boost-${MY_PV}.tar.gz"
+SRC_URI+=" ${PATCH_SET[@]}"
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+LICENSE="GPL-2"
+SLOT="8.0"
+# -ppc for bug #761715
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	cjk? ( server )
+	jemalloc? ( server )
+	numa? ( server )
+	profiling? ( server )
+	router? ( server )
+	tcmalloc? ( server )"
+
+# Be warned, *DEPEND are version-dependent
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	>=app-arch/lz4-1.9.4:=
+	>=app-arch/zstd-1.2.0:=
+	>=dev-libs/openssl-1.0.0:=
+	sys-libs/ncurses:=
+	>=sys-libs/zlib-1.2.13:=
+	server? (
+		dev-libs/icu:=
+		dev-libs/libevent:=[ssl,threads(+)]
+		net-libs/libtirpc:=
+		cjk? ( app-text/mecab )
+		jemalloc? ( dev-libs/jemalloc:= )
+		kernel_linux? (
+			dev-libs/libaio
+			sys-process/procps
+		)
+		numa? ( sys-process/numactl )
+		tcmalloc? ( dev-util/google-perftools:= )
+	)
+"
+
+# https://bugs.gentoo.org/623962
+# tests set TZ for tests leading to failures on musl if sys-libs/timezone-data isnt installed
+DEPEND="
+	${COMMON_DEPEND}
+	app-alternatives/yacc
+	server? ( net-libs/rpcsvc-proto )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/Expect
+		dev-perl/JSON
+		sys-libs/timezone-data
+	)
+"
+RDEPEND="
+	${COMMON_DEPEND}
+	!dev-db/mariadb
+	!dev-db/mariadb-galera
+	!dev-db/percona-server
+	!dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:5.7
+	selinux? ( sec-policy/selinux-mysql )
+	!prefix? (
+		acct-group/mysql acct-user/mysql
+		dev-db/mysql-init-scripts
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+PATCHES=(
+	"${WORKDIR}"/mysql-patches
+	# Needed due to bundled boost-1.77, this fix is included in boost-1.81
+	"${FILESDIR}"/mysql-8.0.36-boost-clang-fix.patch
+)
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="3G"
+
+			if has test ${FEATURES} ; then
+				CHECKREQS_DISK_BUILD="10G"
+
+				if use elibc_musl; then
+					# <parona@protonmail.com> i've seen it take 17GB on musl with FEATURES="test" USE="perl server"
+					CHECKREQS_DISK_BUILD="18G"
+				fi
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="3G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="10G"
+
+			if use elibc_musl; then
+				# <parona@protonmail.com> i've seen it take 17GB on musl with FEATURES="test" USE="perl server"
+				CHECKREQS_DISK_BUILD="18G"
+			fi
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			if [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] ; then
+				die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+			fi
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux && use numa ; then
+			linux-info_get_any_version
+
+			local CONFIG_CHECK="~NUMA"
+
+			local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+			WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+			check_extra_config
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+	# Avoid rpm call which would trigger sandbox, #692368
+	sed -i \
+		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+		CMakeLists.txt || die
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove man pages for client-lib tools we don't install
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	# Code is now requiring C++17 due to https://github.com/mysql/mysql-server/commit/236ab55bedd8c9eacd80766d85edde2a8afacd08
+	append-cxxflags -std=c++17
+
+	if has sandbox ${FEATURES} ; then
+		# bug #823656
+		append-cppflags -DGTEST_NO_DEATH_TEST=1
+	fi
+
+	local mycmakeargs=(
+		-Wno-dev # less noise
+
+		# Building everything as shared breaks upstream assumptions.
+		# For example bundled abseil is excpected to be static and is therefore not installed.
+		# Breaking the assumption leading the mysql to being built against bundled abseil,
+		# but then dynamically linked against system abseil once installed.
+		-DBUILD_SHARED_LIBS=OFF
+
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+
+		-DROUTER_INSTALL_LOGROTATEDIR="${EPREFIX}/etc/logrotate.d"
+		-DROUTER_INSTALL_DOCDIR="share/doc/${PF}"
+
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+
+		# Enables -Werror
+		-DMYSQL_MAINTAINER_MODE=OFF
+
+		# Causes issues on musl bug #922808
+		-DWITH_BUILD_ID=OFF
+
+		# Using bundled editline to get CTRL+C working
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+		-DWITH_ROUTER=$(usex router ON OFF)
+	)
+
+	if use debug; then
+		# Debug build type used extensively to add preprocessor definitions
+		local -x CMAKE_BUILD_TYPE="Debug"
+	else
+		# debug hack wrt #497532
+		mycmakeargs+=(
+			-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usev !debug '-DNDEBUG' )"
+			-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usev !debug '-DNDEBUG' )"
+		)
+	fi
+
+	if tc-is-lto ; then
+		mycmakeargs+=( -DWITH_LTO=ON )
+	else
+		mycmakeargs+=( -DWITH_LTO=OFF )
+	fi
+
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+	mycmakeargs+=(
+		-DWITH_ICU=system
+		-DWITH_LZ4=system
+		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+		-DWITH_RAPIDJSON=bundled
+		-DWITH_ZSTD=system
+	)
+
+	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+		ewarn "You MUST file bugs without these variables set."
+		ewarn "Tests will probably fail!"
+
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+		)
+	elif use latin1 ; then
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=latin1
+			-DDEFAULT_COLLATION=latin1_swedish_ci
+		)
+	else
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=utf8mb4
+			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+		)
+	fi
+
+	if use server ; then
+		mycmakeargs+=(
+			-DWITH_EXTRA_CHARSETS=all
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_LIBEVENT=system
+			# Cannot handle protobuf >23 bug #912797
+			# 05/06/2024: protobuf has been updated,
+			# but it cannot handle abseil when building against system
+			# Currently bundles protobuf-25.1
+			-DWITH_PROTOBUF=bundled
+			-DWITH_NUMA=$(usex numa ON OFF)
+		)
+
+		if use jemalloc ; then
+			mycmakeargs+=( -DWITH_JEMALLOC=ON )
+		elif use tcmalloc ; then
+			mycmakeargs+=( -DWITH_TCMALLOC=ON )
+		fi
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_SYSTEMD=no
+		)
+	fi
+
+	cmake_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && USE='perl server' FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild digest clean test install
+src_test() {
+	_disable_test() {
+		local rawtestname bug reason
+		rawtestname="${1}" ; shift
+		bug="${1}" ; shift
+		reason="${@}"
+
+		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+		echo "${rawtestname} : BUG#${bug} ${reason}" >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_tests
+
+	einfo "Official test instructions:"
+	einfo "ulimit -n 16500 && USE='perl server' FEATURES='test userpriv' ebuild ..."
+
+	if ! use server ; then
+		ewarn "Skipping server tests due to minimal build!"
+		return 0
+	fi
+
+	# Ensure that parallel runs don't die
+	local -x MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	local -x MTR_PARALLEL=${MTR_PARALLEL:-$(makeopts_jobs)}
+	einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+
+	# Disable unit tests, run them separately with eclass defaults
+	local -x MTR_UNIT_TESTS=0
+
+	# Increase test timeouts
+	# bug #923649
+	# https://github.com/gentoo/gentoo/pull/35002#issuecomment-1926101030
+	local -x MTR_SUITE_TIMEOUT=$(( 60 * 40 )) # minutes
+	local -x MTR_TESTCASE_TIMEOUT=60 # minutes
+
+	# Include config for tests, this is for scenarios where mysql wasn't installed previously or if the
+	# configuration was from an older version.
+	sed \
+		-e "s/@GENTOO_PORTAGE_EPREFIX@/${EPREFIX}/" \
+		-e "s/@DATADIR@/${MY_DATADIR}/" \
+		"${FILESDIR}"/my.cnf-8.0.distro-client \
+		"${FILESDIR}"/my.cnf-8.0.distro-server \
+			> "${T}"/my.cnf || die
+	local -X PATH_CONFIG_FILE="${T}/my.cnf"
+
+	# Create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def" || die
+
+	local -a disabled_tests=(
+		"auth_sec.atomic_rename_user;103512;Depends on user running test"
+		"auth_sec.keyring_file_data_qa;0;Won't work with user privileges"
+		"auth_sec.openssl_without_fips;94718;Known test failure"
+
+		"gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.st_symdifference;5452;Known rounding error with latest AMD processors (PS)"
+
+		"innodb.alter_kill;0;Known test failure -- no upstream bug yet"
+
+		"main.derived_limit;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.explain_tree;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.gis-precise;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.mysql_load_data_local_dir;0;Known test failure -- no upstream bug yet"
+		"main.select_icp_mrr;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_dupsweed;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_dupsweed_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_dupsweed_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_firstmatch;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_firstmatch_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_firstmatch_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_all_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"perfschema.statement_digest_query_sample;0;Test will fail on slow hardware"
+
+		"rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch;0;Unstable test"
+		"rpl_gtid.rpl_multi_source_mtr_includes;97844;Unstable test"
+		"main.partition_datatype;0;Unstable test"
+
+		"sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware"
+
+		"x.connection;0;Known failure - no upstream bug yet"
+		"main.slow_log;0;Known failure - no upstream bug yet"
+
+		"sys_vars.build_id_basic;0;Requires -DWITH_BUILD_ID=ON"
+	)
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# No need to force dep app-arch/zip for one test
+		disabled_tests+=(
+			"innodb.discarded_partition_create;0;Requires app-arch/zip"
+			"innodb.partition_upgrade_create;0;Requires app-arch/zip"
+		)
+	fi
+
+	if has_version ">=dev-libs/openssl-3.2" ; then
+		# https://bugs.mysql.com/bug.php?id=113258
+		# Fails still with 8.0.37
+		disabled_tests+=(
+			"rpl.rpl_tlsv13;0;CCM8 ciphers have a lower security level with OpenSSL 3.2"
+			"auth_sec.wl15800_ciphers_tlsv13;0;CCM8 ciphers have a lower security level with OpenSSL 3.2"
+		)
+	fi
+
+	if use debug; then
+		disabled_tests+=(
+			"innodb.dblwr_unencrypt;0;Known test failure -- no upstream bug yet"
+		)
+	fi
+
+	local test_infos_str test_infos_arr
+	for test_infos_str in "${disabled_tests[@]}" ; do
+		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+			die "Invalid test data set, not matching format: ${test_infos_str}"
+		fi
+
+		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+	done
+	unset test_infos_str test_infos_arr
+
+	local -a CMAKE_SKIP_TESTS=(
+		# timing test, can be unreliable
+		"routertest_harness_net_ts_timer"
+
+		# Could not get local host address: Name or service not known(errno: -2)
+		"routertest_component_bootstrap"
+		"routertest_component_bootstrap_account"
+		"routertest_component_bootstrap_clusterset"
+		"routertest_component_config_overwrites"
+		"routertest_component_rest_api_enable"
+		"routertest_component_routing"
+		"routertest_component_sd_notify"
+		"routertest_component_state_file"
+		"routertest_integration_routing_direct"
+		"routertest_integration_routing_reuse"
+		"routertest_integration_routing_sharing"
+		"routertest_integration_routing_sharing_constrained_pools"
+		"routertest_integration_routing_sharing_restart"
+
+		# TODO: ???
+		"pfs_host-oom"
+		"pfs_user-oom"
+		"pfs"
+	)
+
+	if use debug; then
+		CMAKE_SKIP_TESTS+=(
+			# binary_log::transaction::compression::Payload_event_buffer_istream::~Payload_event_buffer_istream(): Assertion `!m_outstanding_error' failed.
+			"payload_event_buffer_istream"
+		)
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage, please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage, please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	# Enable force restart to ensure success when tests don't cleanup sufficiently.
+	# Anything touching gtid_executed is negatively affected if you have unlucky ordering
+	nonfatal edo perl mysql-test-run.pl \
+		--force --force-restart \
+		--vardir="${T}/var-tests" --tmpdir="${T}/tmp-tests" \
+		--skip-test=tokudb --skip-test-list="${T}/disabled.def" \
+		--retry-failure=0 --max-test-fail=0
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ ${retstatus_tests} -eq 0 ]] || failures="${failures} tests"
+
+	cmake_src_test
+
+	[[ -z "${failures}" ]] || die "Test failures: ${failures}"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	cmake_src_install
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	mycnf_src="my.cnf-8.0.distro-server"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR}/${mycnf_src}" \
+		> "${TMPDIR}/my.cnf.ok" || die
+
+	if use prefix ; then
+		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8mb4|latin1|g" \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	eprefixify "${TMPDIR}/my.cnf.ok"
+
+	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+	if use router ; then
+		rm -rf \
+			"${ED}/usr/LICENSE.router" \
+			"${ED}/usr/README.router" \
+			"${ED}/usr/run" \
+			"${ED}/usr/var" \
+			|| die
+	fi
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	# NOTE: $MY_LOGDIR contains $EPREFIX by default
+	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		einfo
+		elog "You might want to run:"
+		elog "  \"emerge --config =${CATEGORY}/${PF}\""
+		elog "if this is a new install."
+		einfo
+	else
+		einfo
+		elog "Upgrade process for ${PN}-8.x has changed. Please read"
+		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+		einfo
+	fi
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	local -a config_files
+
+	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+	fi
+
+	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+	fi
+
+	if [[ ${#config_files[@]} -gt 0 ]] ; then
+		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+			local user_answer
+
+			echo
+			einfo "Please select default authentication plugin (enter number or plugin name):"
+			einfo "1) caching_sha2_password [MySQL 8.0 default]"
+			einfo "2) mysql_native_password [MySQL 5.7 default]"
+			einfo
+			einfo "For details see:"
+			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+			read -p "    >" user_answer
+			echo
+
+			case "${user_answer}" in
+				1|caching_sha2_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+					;;
+				2|mysql_native_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+					;;
+				'')
+					die "No authentication plugin selected!"
+					;;
+				*)
+					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+					;;
+			esac
+
+			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
+			unset user_answer
+		fi
+
+		local cfg_option cfg_option_tabs cfg_section
+		for config_file in "${config_files[@]}" ; do
+			cfg_option="default-authentication-plugin"
+			cfg_section="mysqld"
+			cfg_option_tabs="\t\t"
+			if [[ "${config_file}" == *client.cnf ]] ; then
+				cfg_option="default-auth"
+				cfg_section="client"
+				cfg_option_tabs="\t\t\t\t"
+			fi
+
+			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+			else
+				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+			fi
+		done
+		unset cfg_option cfg_option_tabs cfg_section
+	fi
+	unset config_files config_file
+
+	echo
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		grep -E -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2024-07-01 18:55 Mike Gilbert
  0 siblings, 0 replies; 393+ messages in thread
From: Mike Gilbert @ 2024-07-01 18:55 UTC (permalink / raw
  To: gentoo-commits

commit:     0185586782e2b19ff1c9e357f54b2f2f7fb2dfdf
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  1 18:32:08 2024 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Jul  1 18:53:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01855867

dev-db/mysql: update SRC_URI

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.41.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.41.ebuild b/dev-db/mysql/mysql-5.7.41.ebuild
index 3efb6229af13..ded1631d3809 100644
--- a/dev-db/mysql/mysql-5.7.41.ebuild
+++ b/dev-db/mysql/mysql-5.7.41.ebuild
@@ -9,7 +9,7 @@ inherit check-reqs cmake flag-o-matic linux-info \
 	multiprocessing prefix toolchain-funcs multilib-minimal
 
 # Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.36-patches-01.tar.xz"
+PATCH_SET="mirror://gentoo/51/${PN}-5.7.36-patches-01.tar.xz"
 
 SRC_URI="https://cdn.mysql.com/Downloads/MySQL-$(ver_cut 1-2)/${PN}-boost-${PV}.tar.gz
 	https://cdn.mysql.com/archives/mysql-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2024-06-14  8:16 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2024-06-14  8:16 UTC (permalink / raw
  To: gentoo-commits

commit:     f60d837dc772b6b629720cfcb0dc0b01eeaa598a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 14 08:15:31 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 14 08:15:31 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f60d837d

dev-db/mysql: Stabilize 8.0.36 amd64, #919815

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.36.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.36.ebuild b/dev-db/mysql/mysql-8.0.36.ebuild
index 91b033ef3d2f..724501d96d0c 100644
--- a/dev-db/mysql/mysql-8.0.36.ebuild
+++ b/dev-db/mysql/mysql-8.0.36.ebuild
@@ -24,7 +24,7 @@ S="${WORKDIR}/mysql"
 LICENSE="GPL-2"
 SLOT="8.0"
 # -ppc for bug #761715
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
 IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
 RESTRICT="!test? ( test )"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2024-03-04  4:57 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2024-03-04  4:57 UTC (permalink / raw
  To: gentoo-commits

commit:     708b6937017fa683259645bb00fb729dc1cb8a80
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar  4 04:56:37 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar  4 04:56:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=708b6937

dev-db/mysql: filter LTO for legacy 5.7.x branch

ODR violations.

Closes: https://bugs.gentoo.org/855242
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.41.ebuild | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dev-db/mysql/mysql-5.7.41.ebuild b/dev-db/mysql/mysql-5.7.41.ebuild
index 016aa962043a..3efb6229af13 100644
--- a/dev-db/mysql/mysql-5.7.41.ebuild
+++ b/dev-db/mysql/mysql-5.7.41.ebuild
@@ -261,6 +261,9 @@ src_prepare() {
 }
 
 src_configure() {
+	# Filter LTO for legacy branch with ODR violations (bug #855242)
+	filter-lto
+
 	# Bug #114895, bug #110149
 	filter-flags "-O" "-O[01]"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2024-01-24  6:55 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2024-01-24  6:55 UTC (permalink / raw
  To: gentoo-commits

commit:     8d0bb288f480f0df7422a9d9b306709787350d83
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Tue Jan 23 20:11:28 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 24 06:54:40 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d0bb288

dev-db/mysql: migrate checking for enabled lto, to tc-is-lto

This toolchain func was recently added, and vis a lot more reliable than
get-flagq. mysql attempts to manually handle some edge case, for example
if the active flags contain `-flto -fno-lto` then tc-is-lto gets it
correct but with is-flagq we have to manually check both. On the other
hand, mysql doesn't handle detecting -flto=8.

Using tc-is-lto is the preferred way to handle this from now on. We
would rather use this wherever possible.

Drops a bit of pointless logging. We don't need an `einfo` to tell us
that make.conf is being respected.

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.27-r1.ebuild | 13 ++++---------
 dev-db/mysql/mysql-8.0.31-r2.ebuild | 13 ++++---------
 dev-db/mysql/mysql-8.0.32-r2.ebuild | 13 ++++---------
 dev-db/mysql/mysql-8.0.34.ebuild    |  9 ++-------
 4 files changed, 14 insertions(+), 34 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.27-r1.ebuild b/dev-db/mysql/mysql-8.0.27-r1.ebuild
index 8a28bc5b2b53..fb831d0ded5e 100644
--- a/dev-db/mysql/mysql-8.0.27-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.27-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="8"
@@ -238,15 +238,10 @@ src_configure() {
 		-DWITH_ROUTER=$(usex router ON OFF)
 	)
 
-	if is-flagq -fno-lto ; then
-		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
-		mycmakeargs+=( -DWITH_LTO=OFF )
-	elif is-flagq -flto ; then
-		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
-		myconf+=( -DWITH_LTO=ON )
+	if tc-is-lto ; then
+		mycmakeargs+=( -DWITH_LTO=ON )
 	else
-		# Disable automagic
-		myconf+=( -DWITH_LTO=OFF )
+		mycmakeargs+=( -DWITH_LTO=OFF )
 	fi
 
 	if use test ; then

diff --git a/dev-db/mysql/mysql-8.0.31-r2.ebuild b/dev-db/mysql/mysql-8.0.31-r2.ebuild
index c93dec93051e..854e55432dfc 100644
--- a/dev-db/mysql/mysql-8.0.31-r2.ebuild
+++ b/dev-db/mysql/mysql-8.0.31-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -238,15 +238,10 @@ src_configure() {
 		-DWITH_ROUTER=$(usex router ON OFF)
 	)
 
-	if is-flagq -fno-lto ; then
-		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
-		mycmakeargs+=( -DWITH_LTO=OFF )
-	elif is-flagq -flto ; then
-		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
-		myconf+=( -DWITH_LTO=ON )
+	if tc-is-lto ; then
+		mycmakeargs+=( -DWITH_LTO=ON )
 	else
-		# Disable automagic
-		myconf+=( -DWITH_LTO=OFF )
+		mycmakeargs+=( -DWITH_LTO=OFF )
 	fi
 
 	if use test ; then

diff --git a/dev-db/mysql/mysql-8.0.32-r2.ebuild b/dev-db/mysql/mysql-8.0.32-r2.ebuild
index c2f3cdba598b..4f6fa4715c82 100644
--- a/dev-db/mysql/mysql-8.0.32-r2.ebuild
+++ b/dev-db/mysql/mysql-8.0.32-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -246,15 +246,10 @@ src_configure() {
 		-DWITH_ROUTER=$(usex router ON OFF)
 	)
 
-	if is-flagq -fno-lto ; then
-		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
-		mycmakeargs+=( -DWITH_LTO=OFF )
-	elif is-flagq -flto ; then
-		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
-		myconf+=( -DWITH_LTO=ON )
+	if tc-is-lto ; then
+		mycmakeargs+=( -DWITH_LTO=ON )
 	else
-		# Disable automagic
-		myconf+=( -DWITH_LTO=OFF )
+		mycmakeargs+=( -DWITH_LTO=OFF )
 	fi
 
 	if use test ; then

diff --git a/dev-db/mysql/mysql-8.0.34.ebuild b/dev-db/mysql/mysql-8.0.34.ebuild
index 074d23884b7c..2b86120d9b9a 100644
--- a/dev-db/mysql/mysql-8.0.34.ebuild
+++ b/dev-db/mysql/mysql-8.0.34.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -257,14 +257,9 @@ src_configure() {
 		)
 	fi
 
-	if is-flagq -fno-lto ; then
-		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
-		mycmakeargs+=( -DWITH_LTO=OFF )
-	elif is-flagq -flto ; then
-		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+	if tc-is-lto ; then
 		mycmakeargs+=( -DWITH_LTO=ON )
 	else
-		# Disable automagic
 		mycmakeargs+=( -DWITH_LTO=OFF )
 	fi
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-12-17 12:39 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2023-12-17 12:39 UTC (permalink / raw
  To: gentoo-commits

commit:     5d9b158c6fdf408485b52070fcb04e6dc3189c52
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 17 12:38:42 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 17 12:38:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d9b158c

dev-db/mysql: fix DoubleEmptyLine

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.34.ebuild | 1 -
 1 file changed, 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.34.ebuild b/dev-db/mysql/mysql-8.0.34.ebuild
index 43fb2e5f98f0..074d23884b7c 100644
--- a/dev-db/mysql/mysql-8.0.34.ebuild
+++ b/dev-db/mysql/mysql-8.0.34.ebuild
@@ -246,7 +246,6 @@ src_configure() {
 		-DWITH_ROUTER=$(usex router ON OFF)
 	)
 
-
 	if use debug; then
 		# Debug build type used extensively to add preprocessor definitions
 		local -x CMAKE_BUILD_TYPE="Debug"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-11-27 15:43 Andreas Sturmlechner
  0 siblings, 0 replies; 393+ messages in thread
From: Andreas Sturmlechner @ 2023-11-27 15:43 UTC (permalink / raw
  To: gentoo-commits

commit:     436278da1afd00ea7f476c2b889e55906ff001ea
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 15 19:10:23 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Nov 27 15:43:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=436278da

dev-db/mysql: drop 5.7.36-r1, 5.7.40

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

 dev-db/mysql/Manifest               |    2 -
 dev-db/mysql/mysql-5.7.36-r1.ebuild | 1286 -----------------------------------
 dev-db/mysql/mysql-5.7.40.ebuild    | 1285 ----------------------------------
 3 files changed, 2573 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 3eb9d7cdd660..0672320ea6b4 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -2,8 +2,6 @@ DIST mysql-5.7.36-patches-01.tar.xz 6396 BLAKE2B ed9783f207d40fc220992c4193bdd8e
 DIST mysql-8.0.27-patches-03.tar.xz 9864 BLAKE2B 03136477a97a5bff0c5f1cbc7921a77d9b36e148e94f80463f00f0efd1a6859af4595f9cf15aa492bce043fdc9d6c6328bd64102f8b0127eacbc7795b1785ecb SHA512 8c00c8fef2b01389f59138eaa29399d8a9ce7930b6bdfb7689d1d7bf14a32fbb10a2b8dbe91933b805899ef3af0cf0bda704d4be14249991b381054bcc496058
 DIST mysql-8.0.31-patches-01.tar.xz 5464 BLAKE2B c067bf311c83d4aa0f48d56621997bc58820fa0b41bd708eae04b0b54b89d549c5c1b84ca93adcbbdcb008199510ea667a12b1bcd44bf6b6df02062b4551d0a2 SHA512 95af6bb5aa0c407f0a1014f33523608b0df0797fd7fbdbba8a19985258a7c04788d7587c8f67cd1745284522c58297931c8827e31f77e8c89baaeff71a5e0ddc
 DIST mysql-8.0.34-patches-01.tar.xz 9304 BLAKE2B e80dd1fab00fb183e0b980763a9b6c3b879357b776b2acc9709527e5d6e2549f801835936433e55fcde2820201edb3dead5d95f31ef617ef9542d2a0bd95efca SHA512 1ac196d609fabd9c978bc8dd3564a45f0d681c292215d8979604d7e402c622d70a1c66ed191ded081c597042298c43154a9bb09bb4566e7fe97991f67d91d999
-DIST mysql-boost-5.7.36.tar.gz 52968383 BLAKE2B 4d5e4fcf8d56f4a1d1d54ee889d432ee3265f55ff9c0ecf6fe216e67790a49ed052b94457680daef4cb42df29f14db7b0e678e0f0443c20b7e2324c772c24313 SHA512 a95580efd5b87776ee7f1aae9b50d50d88c70a48c16e7a2d8c6ada0b1cadc5ec6074a859291a65caa1b50a00e08a9e350df342bb0c6ef74edaf21055331c081b
-DIST mysql-boost-5.7.40.tar.gz 53255386 BLAKE2B 1c367dd4d65a42713fb09943c4518c9be375210fee4e8e6b7b889dc32f0b429a98f132498ba8e6423d288f2936a97ec6c5098411d5f28adc608d04deeb068b24 SHA512 5c49ef65c00658786117cc489d80a6ed7517759b010fb4530508649ab6b4079bb8f1dbc70cefe5d179e1a003960d296b85210b161be4f8f18756a578a1a11365
 DIST mysql-boost-5.7.41.tar.gz 53266489 BLAKE2B 7201d6c53cf711bd121464fc85260e1799f7195f45706b91f3cb8d605fe2bd2639d532b4045a336645a553d9b0b1131cc45140a19483902e5dc37d3e2479b6f5 SHA512 88e1cc4864616ed92880a3f02285763aac2ddfc1cdeeff07e1502c97bbdfd31c9ed9d02f8f6381a352857a85241e4e4eb6bc0d978e3928a68ef49362f670482a
 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

diff --git a/dev-db/mysql/mysql-5.7.36-r1.ebuild b/dev-db/mysql/mysql-5.7.36-r1.ebuild
deleted file mode 100644
index 8e880d8cd753..000000000000
--- a/dev-db/mysql/mysql-5.7.36-r1.ebuild
+++ /dev/null
@@ -1,1286 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs multilib-minimal
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${P}-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-$(ver_cut 1-2)/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-$(ver_cut 1-2)/${PN}-boost-${PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="
-	sys-libs/ncurses:0=
-	client-libs? (
-		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
-		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
-	)
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-		>=dev-libs/openssl-1.0.0:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		virtual/libcrypt:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=[ssl]
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-"
-
-DEPEND="
-	${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	app-alternatives/yacc
-	server? (
-		dev-libs/libevent:=[ssl]
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-
-RDEPEND="
-	${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:8.0
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? (
-		!prefix? (
-			acct-group/mysql acct-user/mysql
-			dev-db/mysql-init-scripts
-		)
-	)
-"
-
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="3G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="3G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/extra/libevent \
-		"${S}"/zlib \
-		|| die
-
-	# Don't clash with dev-db/mysql-connector-c
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# code is not C++17 ready, bug #786402
-	append-cxxflags -std=c++14
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	local mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in \
-		auth_sec.keyring_udf \
-		innodb.alter_kill \
-		innodb.innodb-multiple-tablespaces \
-		innodb.import_compress_encrypt \
-		perfschema.privilege_table_io \
-	; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
-	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in \
-		main.xa_prepared_binlog_off \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_non_direct_stm_mixing_engines \
-	; do
-		_disable_test "$t" "Unstable test"
-	done
-
-	for t in \
-		gis.geometry_class_attri_prop \
-		gis.geometry_property_function_issimple \
-		gis.gis_bugs_crashes \
-		gis.spatial_op_testingfunc_mix \
-		gis.spatial_analysis_functions_buffer \
-		gis.spatial_analysis_functions_distance \
-		gis.spatial_utility_function_distance_sphere \
-		gis.spatial_utility_function_simplify \
-		gis.spatial_analysis_functions_centroid \
-		main.with_recursive \
-	; do
-		_disable_test "$t" "Known rounding error with latest AMD processors"
-	done
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
-	fi
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.mysqldump_bugs \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	if has_version ">=dev-libs/openssl-3" ; then
-		# >=dev-libs/openssl-3 defaults to security level 1 which disallow
-		# TLSv1/1.1 but tests will require TLSv1/1.1.
-		einfo "Set OpenSSL configuration for test suite ..."
-		cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
-		openssl_conf = default_conf
-
-		[ req ]
-		default_bits			= 2048
-		default_keyfile 		= privkey.pem
-		distinguished_name		= req_distinguished_name
-
-		[ req_distinguished_name ]
-		countryName			= Country Name (2 letter code)
-		countryName_default		= AU
-		countryName_min			= 2
-		countryName_max			= 2
-
-		stateOrProvinceName		= State or Province Name (full name)
-		stateOrProvinceName_default	= Some-State
-
-		localityName			= Locality Name (eg, city)
-
-		0.organizationName		= Organization Name (eg, company)
-		0.organizationName_default	= Internet Widgits Pty Ltd
-
-		organizationalUnitName		= Organizational Unit Name (eg, section)
-
-		commonName			= Common Name (e.g. server FQDN or YOUR name)
-		commonName_max			= 64
-
-		emailAddress			= Email Address
-		emailAddress_max		= 64
-
-		[default_conf]
-		ssl_conf = ssl_sect
-
-		[ssl_sect]
-		system_default = system_default_sect
-
-		[system_default_sect]
-		CipherString = DEFAULT@SECLEVEL=0
-		EOF
-
-		local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
-	fi
-
-	if has_version '>=dev-libs/openssl-1.1.1' ; then
-		# Tests are expecting <openssl-1.1.1 default cipher
-		for t in \
-			auth_sec.cert_verify \
-			auth_sec.mysql_ssl_connection \
-			auth_sec.openssl_cert_generation \
-			auth_sec.ssl_auto_detect \
-			auth_sec.ssl_mode \
-			auth_sec.tls \
-			binlog.binlog_grant_alter_user \
-			encryption.innodb_onlinealter_encryption \
-			main.grant_alter_user_qa \
-			main.grant_user_lock_qa \
-			main.mysql_ssl_default \
-			main.openssl_1 \
-			main.plugin_auth_sha256 \
-			main.plugin_auth_sha256_2 \
-			main.plugin_auth_sha256_server_default \
-			main.plugin_auth_sha256_server_default_tls \
-			main.plugin_auth_sha256_tls \
-			main.ssl \
-			main.ssl_8k_key \
-			main.ssl_bug75311 \
-			main.ssl_ca \
-			main.ssl_cipher \
-			main.ssl_compress \
-			main.ssl_crl \
-			main.ssl_ecdh \
-			main.ssl_verify_identity \
-			x.connection_tls_version \
-			x.connection_openssl \
-		; do
-			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ ${retstatus_tests} -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "${failures}" ]] || die "Test failures: ${failures}"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-	cmake_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		grep -E -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}

diff --git a/dev-db/mysql/mysql-5.7.40.ebuild b/dev-db/mysql/mysql-5.7.40.ebuild
deleted file mode 100644
index 984edbf4fc08..000000000000
--- a/dev-db/mysql/mysql-5.7.40.ebuild
+++ /dev/null
@@ -1,1285 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs multilib-minimal
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.36-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-$(ver_cut 1-2)/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-$(ver_cut 1-2)/${PN}-boost-${PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="
-	sys-libs/ncurses:0=
-	client-libs? (
-		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
-		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
-	)
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-		>=dev-libs/openssl-1.0.0:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		virtual/libcrypt:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=[ssl]
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-"
-
-DEPEND="
-	${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	app-alternatives/yacc
-	server? (
-		dev-libs/libevent:=[ssl]
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-
-RDEPEND="
-	${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:8.0
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? (
-		!prefix? (
-			acct-group/mysql acct-user/mysql
-			dev-db/mysql-init-scripts
-		)
-	)
-"
-
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="3G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="3G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/extra/libevent \
-		|| die
-
-	# Don't clash with dev-db/mysql-connector-c
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# code is not C++17 ready, bug #786402
-	append-cxxflags -std=c++14
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	local mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in \
-		auth_sec.keyring_udf \
-		innodb.alter_kill \
-		innodb.innodb-multiple-tablespaces \
-		innodb.import_compress_encrypt \
-		perfschema.privilege_table_io \
-	; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
-	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in \
-		main.xa_prepared_binlog_off \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_non_direct_stm_mixing_engines \
-	; do
-		_disable_test "$t" "Unstable test"
-	done
-
-	for t in \
-		gis.geometry_class_attri_prop \
-		gis.geometry_property_function_issimple \
-		gis.gis_bugs_crashes \
-		gis.spatial_op_testingfunc_mix \
-		gis.spatial_analysis_functions_buffer \
-		gis.spatial_analysis_functions_distance \
-		gis.spatial_utility_function_distance_sphere \
-		gis.spatial_utility_function_simplify \
-		gis.spatial_analysis_functions_centroid \
-		main.with_recursive \
-	; do
-		_disable_test "$t" "Known rounding error with latest AMD processors"
-	done
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
-	fi
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.mysqldump_bugs \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	if has_version ">=dev-libs/openssl-3" ; then
-		# >=dev-libs/openssl-3 defaults to security level 1 which disallow
-		# TLSv1/1.1 but tests will require TLSv1/1.1.
-		einfo "Set OpenSSL configuration for test suite ..."
-		cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
-		openssl_conf = default_conf
-
-		[ req ]
-		default_bits			= 2048
-		default_keyfile 		= privkey.pem
-		distinguished_name		= req_distinguished_name
-
-		[ req_distinguished_name ]
-		countryName			= Country Name (2 letter code)
-		countryName_default		= AU
-		countryName_min			= 2
-		countryName_max			= 2
-
-		stateOrProvinceName		= State or Province Name (full name)
-		stateOrProvinceName_default	= Some-State
-
-		localityName			= Locality Name (eg, city)
-
-		0.organizationName		= Organization Name (eg, company)
-		0.organizationName_default	= Internet Widgits Pty Ltd
-
-		organizationalUnitName		= Organizational Unit Name (eg, section)
-
-		commonName			= Common Name (e.g. server FQDN or YOUR name)
-		commonName_max			= 64
-
-		emailAddress			= Email Address
-		emailAddress_max		= 64
-
-		[default_conf]
-		ssl_conf = ssl_sect
-
-		[ssl_sect]
-		system_default = system_default_sect
-
-		[system_default_sect]
-		CipherString = DEFAULT@SECLEVEL=0
-		EOF
-
-		local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
-	fi
-
-	if has_version '>=dev-libs/openssl-1.1.1' ; then
-		# Tests are expecting <openssl-1.1.1 default cipher
-		for t in \
-			auth_sec.cert_verify \
-			auth_sec.mysql_ssl_connection \
-			auth_sec.openssl_cert_generation \
-			auth_sec.ssl_auto_detect \
-			auth_sec.ssl_mode \
-			auth_sec.tls \
-			binlog.binlog_grant_alter_user \
-			encryption.innodb_onlinealter_encryption \
-			main.grant_alter_user_qa \
-			main.grant_user_lock_qa \
-			main.mysql_ssl_default \
-			main.openssl_1 \
-			main.plugin_auth_sha256 \
-			main.plugin_auth_sha256_2 \
-			main.plugin_auth_sha256_server_default \
-			main.plugin_auth_sha256_server_default_tls \
-			main.plugin_auth_sha256_tls \
-			main.ssl \
-			main.ssl_8k_key \
-			main.ssl_bug75311 \
-			main.ssl_ca \
-			main.ssl_cipher \
-			main.ssl_compress \
-			main.ssl_crl \
-			main.ssl_ecdh \
-			main.ssl_verify_identity \
-			x.connection_tls_version \
-			x.connection_openssl \
-		; do
-			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ ${retstatus_tests} -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "${failures}" ]] || die "Test failures: ${failures}"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-	cmake_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		grep -E -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-10-14  8:34 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2023-10-14  8:34 UTC (permalink / raw
  To: gentoo-commits

commit:     dc244bfc220f48b2d7fb240e3b1517a47ba63d08
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Fri Sep  8 00:56:52 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 14 08:30:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc244bfc

dev-db/mysql: add 8.0.34

Spent time getting tests to pass as well. I can verify that USE="cjk cracklib numa perl profiling router server"
pass with gcc-13. I had some testing with other flags as well and didn't see issues other than
USE="debug" with having failing tests last I checked.

Opted out of fixing some stuff as they would fit better with 8.1 like removing and updating deprecated configurations.

Closes: https://bugs.gentoo.org/895256
Closes: https://bugs.gentoo.org/912797
Closes: https://bugs.gentoo.org/905209
Closes: https://bugs.gentoo.org/891369
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32749
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-8.0.34.ebuild | 1220 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1222 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index b4d529d8a44a..3eb9d7cdd660 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,9 +1,11 @@
 DIST mysql-5.7.36-patches-01.tar.xz 6396 BLAKE2B ed9783f207d40fc220992c4193bdd8e96523f69414daa756f1f30306c1aedff9e96216ba2294a4c41eefbaf39c8bb37784bf1e7cce656c93f829c9cf0682fa6d SHA512 b0fbd41ebb2d32067e6c81707dffa91fece2d368f4b2fa47951492936509972d425b64d7613748c42b31cf9ba9dab697efeff70debe7268855a90d322d3f3158
 DIST mysql-8.0.27-patches-03.tar.xz 9864 BLAKE2B 03136477a97a5bff0c5f1cbc7921a77d9b36e148e94f80463f00f0efd1a6859af4595f9cf15aa492bce043fdc9d6c6328bd64102f8b0127eacbc7795b1785ecb SHA512 8c00c8fef2b01389f59138eaa29399d8a9ce7930b6bdfb7689d1d7bf14a32fbb10a2b8dbe91933b805899ef3af0cf0bda704d4be14249991b381054bcc496058
 DIST mysql-8.0.31-patches-01.tar.xz 5464 BLAKE2B c067bf311c83d4aa0f48d56621997bc58820fa0b41bd708eae04b0b54b89d549c5c1b84ca93adcbbdcb008199510ea667a12b1bcd44bf6b6df02062b4551d0a2 SHA512 95af6bb5aa0c407f0a1014f33523608b0df0797fd7fbdbba8a19985258a7c04788d7587c8f67cd1745284522c58297931c8827e31f77e8c89baaeff71a5e0ddc
+DIST mysql-8.0.34-patches-01.tar.xz 9304 BLAKE2B e80dd1fab00fb183e0b980763a9b6c3b879357b776b2acc9709527e5d6e2549f801835936433e55fcde2820201edb3dead5d95f31ef617ef9542d2a0bd95efca SHA512 1ac196d609fabd9c978bc8dd3564a45f0d681c292215d8979604d7e402c622d70a1c66ed191ded081c597042298c43154a9bb09bb4566e7fe97991f67d91d999
 DIST mysql-boost-5.7.36.tar.gz 52968383 BLAKE2B 4d5e4fcf8d56f4a1d1d54ee889d432ee3265f55ff9c0ecf6fe216e67790a49ed052b94457680daef4cb42df29f14db7b0e678e0f0443c20b7e2324c772c24313 SHA512 a95580efd5b87776ee7f1aae9b50d50d88c70a48c16e7a2d8c6ada0b1cadc5ec6074a859291a65caa1b50a00e08a9e350df342bb0c6ef74edaf21055331c081b
 DIST mysql-boost-5.7.40.tar.gz 53255386 BLAKE2B 1c367dd4d65a42713fb09943c4518c9be375210fee4e8e6b7b889dc32f0b429a98f132498ba8e6423d288f2936a97ec6c5098411d5f28adc608d04deeb068b24 SHA512 5c49ef65c00658786117cc489d80a6ed7517759b010fb4530508649ab6b4079bb8f1dbc70cefe5d179e1a003960d296b85210b161be4f8f18756a578a1a11365
 DIST mysql-boost-5.7.41.tar.gz 53266489 BLAKE2B 7201d6c53cf711bd121464fc85260e1799f7195f45706b91f3cb8d605fe2bd2639d532b4045a336645a553d9b0b1131cc45140a19483902e5dc37d3e2479b6f5 SHA512 88e1cc4864616ed92880a3f02285763aac2ddfc1cdeeff07e1502c97bbdfd31c9ed9d02f8f6381a352857a85241e4e4eb6bc0d978e3928a68ef49362f670482a
 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
+DIST mysql-boost-8.0.34.tar.gz 439550780 BLAKE2B f50701b7e97e6cec21d6ce0f80f07a8df68a14c637a67841c06f578be8ed01d216dcb3b859a29f1befd4223b99e60675d6fa70f4b227bf6af81804e2c43161d4 SHA512 e5e79ac6870c214cf62c8e2830106d60e09d2e6df30654b84bb5d26864b4eabe777468a223e6ee4c1e22b7f6ec086c73e85e3f4c1fa66912b0e59b606ab46cd6

diff --git a/dev-db/mysql/mysql-8.0.34.ebuild b/dev-db/mysql/mysql-8.0.34.ebuild
new file mode 100644
index 000000000000..043436bb5bf4
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.34.ebuild
@@ -0,0 +1,1220 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit check-reqs cmake edo flag-o-matic linux-info multiprocessing prefix toolchain-funcs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+# Patch version
+PATCH_SET=( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-8.0.34-patches-01.tar.xz )
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${MY_PV}.tar.gz"
+SRC_URI+=" https://cdn.mysql.com/archives/mysql-$(ver_cut 1-2)/mysql-boost-${MY_PV}.tar.gz"
+SRC_URI+=" https://downloads.mysql.com/archives/MySQL-$(ver_cut 1-2)/${PN}-boost-${MY_PV}.tar.gz"
+SRC_URI+=" ${PATCH_SET[@]}"
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+LICENSE="GPL-2"
+SLOT="8.0"
+# -ppc for bug #761715
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	cjk? ( server )
+	jemalloc? ( server )
+	numa? ( server )
+	profiling? ( server )
+	router? ( server )
+	tcmalloc? ( server )"
+
+# Be warned, *DEPEND are version-dependent
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	>=app-arch/lz4-1.9.4:=
+	>=app-arch/zstd-1.2.0:=
+	>=dev-libs/openssl-1.0.0:=
+	sys-libs/ncurses:=
+	>=sys-libs/zlib-1.2.13:=
+	server? (
+		dev-libs/icu:=
+		dev-libs/libevent:=[ssl,threads(+)]
+		net-libs/libtirpc:=
+		cjk? ( app-text/mecab:= )
+		jemalloc? ( dev-libs/jemalloc:= )
+		kernel_linux? (
+			dev-libs/libaio:=
+			sys-process/procps:=
+		)
+		numa? ( sys-process/numactl )
+		tcmalloc? ( dev-util/google-perftools:= )
+	)
+"
+DEPEND="
+	${COMMON_DEPEND}
+	app-alternatives/yacc
+	server? ( net-libs/rpcsvc-proto )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/Expect
+		dev-perl/JSON
+	)
+"
+RDEPEND="
+	${COMMON_DEPEND}
+	!dev-db/mariadb
+	!dev-db/mariadb-galera
+	!dev-db/percona-server
+	!dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:5.7
+	selinux? ( sec-policy/selinux-mysql )
+	!prefix? (
+		acct-group/mysql acct-user/mysql
+		dev-db/mysql-init-scripts
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+PATCHES=(
+	"${WORKDIR}"/mysql-patches
+)
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="3G"
+
+			if has test ${FEATURES} ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="3G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			if [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] ; then
+				die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+			fi
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux && use numa ; then
+			linux-info_get_any_version
+
+			local CONFIG_CHECK="~NUMA"
+
+			local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+			WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+			check_extra_config
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+	# Avoid rpm call which would trigger sandbox, #692368
+	sed -i \
+		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+		CMakeLists.txt || die
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove man pages for client-lib tools we don't install
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	# Code is now requiring C++17 due to https://github.com/mysql/mysql-server/commit/236ab55bedd8c9eacd80766d85edde2a8afacd08
+	append-cxxflags -std=c++17
+
+	# Broken with FORTIFY_SOURCE=3
+	# Our toolchain sets F_S=2 by default w/ >= -O2, so we need
+	# to unset F_S first, then explicitly set 2, to negate any default
+	# and anything set by the user if they're choosing 3 (or if they've
+	# modified GCC to set 3).
+	#
+	# bug #891259
+	if tc-enables-fortify-source ; then
+		filter-flags -D_FORTIFY_SOURCE=3
+		append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
+	fi
+
+	if has sandbox ${FEATURES} ; then
+		# bug #823656
+		append-cppflags -DGTEST_NO_DEATH_TEST=1
+	fi
+
+	local mycmakeargs=(
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+
+		-DROUTER_INSTALL_LOGROTATEDIR="${EPREFIX}/etc/logrotate.d"
+		-DROUTER_INSTALL_DOCDIR="share/doc/${PF}"
+
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+
+		# Using bundled editline to get CTRL+C working
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+		-DWITH_ROUTER=$(usex router ON OFF)
+	)
+
+
+	if use debug; then
+		# Debug build type used extensively to add preprocessor definitions
+		local -x CMAKE_BUILD_TYPE="Debug"
+	else
+		# debug hack wrt #497532
+		mycmakeargs+=(
+			-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usev !debug '-DNDEBUG' )"
+			-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usev !debug '-DNDEBUG' )"
+		)
+	fi
+
+	if is-flagq -fno-lto ; then
+		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
+		mycmakeargs+=( -DWITH_LTO=OFF )
+	elif is-flagq -flto ; then
+		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+		mycmakeargs+=( -DWITH_LTO=ON )
+	else
+		# Disable automagic
+		mycmakeargs+=( -DWITH_LTO=OFF )
+	fi
+
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+	mycmakeargs+=(
+		-DWITH_ICU=system
+		-DWITH_LZ4=system
+		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+		-DWITH_RAPIDJSON=bundled
+		-DWITH_ZSTD=system
+	)
+
+	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+		ewarn "You MUST file bugs without these variables set."
+		ewarn "Tests will probably fail!"
+
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+		)
+	elif use latin1 ; then
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=latin1
+			-DDEFAULT_COLLATION=latin1_swedish_ci
+		)
+	else
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=utf8mb4
+			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+		)
+	fi
+
+	if use server ; then
+		mycmakeargs+=(
+			-DWITH_EXTRA_CHARSETS=all
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_LIBEVENT=system
+			# Cannot handle protobuf >23 bug #912797
+			-DWITH_PROTOBUF=bundled
+			-DWITH_NUMA=$(usex numa ON OFF)
+		)
+
+		if use jemalloc ; then
+			mycmakeargs+=( -DWITH_JEMALLOC=ON )
+		elif use tcmalloc ; then
+			mycmakeargs+=( -DWITH_TCMALLOC=ON )
+		fi
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_SYSTEMD=no
+		)
+	fi
+
+	cmake_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && USE='perl server' FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild digest clean test install
+src_test() {
+	_disable_test() {
+		local rawtestname bug reason
+		rawtestname="${1}" ; shift
+		bug="${1}" ; shift
+		reason="${@}"
+
+		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+		echo "${rawtestname} : BUG#${bug} ${reason}" >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_tests
+
+	einfo "Official test instructions:"
+	einfo "ulimit -n 16500 && USE='perl server' FEATURES='test userpriv' ebuild ..."
+
+	if ! use server ; then
+		ewarn "Skipping server tests due to minimal build!"
+		return 0
+	fi
+
+	# Ensure that parallel runs don't die
+	local -x MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	local -x MTR_PARALLEL=${MTR_PARALLEL:-$(makeopts_jobs)}
+	einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+
+	# Disable unit tests, run them separately with eclass defaults
+	local -x MTR_UNIT_TESTS=0
+
+	# Create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def" || die
+
+	local -a disabled_tests=(
+		"auth_sec.atomic_rename_user;103512;Depends on user running test"
+		"auth_sec.keyring_file_data_qa;0;Won't work with user privileges"
+		"auth_sec.openssl_without_fips;94718;Known test failure"
+
+		"gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)"
+		"gis.st_symdifference;5452;Known rounding error with latest AMD processors (PS)"
+
+		"innodb.alter_kill;0;Known test failure -- no upstream bug yet"
+
+		"main.derived_limit;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.explain_tree;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.gis-precise;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.mysql_load_data_local_dir;0;Known test failure -- no upstream bug yet"
+		"main.select_icp_mrr;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_dupsweed;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_dupsweed_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_dupsweed_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_firstmatch;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_firstmatch_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_firstmatch_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"perfschema.statement_digest_query_sample;0;Test will fail on slow hardware"
+
+		"rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch;0;Unstable test"
+
+		"sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware"
+
+		"x.connection;0;Known failure - no upstream bug yet"
+	)
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# No need to force dep app-arch/zip for one test
+		disabled_tests+=(
+			"innodb.discarded_partition_create;0;Requires app-arch/zip"
+			"innodb.partition_upgrade_create;0;Requires app-arch/zip"
+		)
+	fi
+
+	local test_infos_str test_infos_arr
+	for test_infos_str in "${disabled_tests[@]}" ; do
+		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+			die "Invalid test data set, not matching format: ${test_infos_str}"
+		fi
+
+		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+	done
+	unset test_infos_str test_infos_arr
+
+	local -a CMAKE_SKIP_TESTS=(
+		# timing test, can be unreliable
+		"routertest_harness_net_ts_timer"
+
+		# Could not get local host address: Name or service not known(errno: -2)
+		"routertest_component_bootstrap"
+		"routertest_component_bootstrap_account"
+		"routertest_component_bootstrap_clusterset"
+		"routertest_component_config_overwrites"
+		"routertest_component_rest_api_enable"
+		"routertest_component_routing"
+		"routertest_component_sd_notify"
+		"routertest_component_state_file"
+		"routertest_integration_routing_direct"
+		"routertest_integration_routing_reuse"
+		"routertest_integration_routing_sharing"
+		"routertest_integration_routing_sharing_constrained_pools"
+		"routertest_integration_routing_sharing_restart"
+
+		# FIXME: suffers from broken DEATH_TESTS's
+		"routertest_router_certificate_generator"
+	)
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage, please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage, please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	# Enable force restart to ensure success when tests don't cleanup sufficiently.
+	# Anything touching gtid_executed is negatively affected if you have unlucky ordering
+	nonfatal edo perl mysql-test-run.pl \
+		--force --force-restart \
+		--vardir="${T}/var-tests" --tmpdir="${T}/tmp-tests" \
+		--skip-test=tokudb --skip-test-list="${T}/disabled.def" \
+		--retry-failure=0
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ ${retstatus_tests} -eq 0 ]] || failures="${failures} tests"
+
+	cmake_src_test
+
+	[[ -z "${failures}" ]] || die "Test failures: ${failures}"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	cmake_src_install
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	mycnf_src="my.cnf-8.0.distro-server"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR}/${mycnf_src}" \
+		> "${TMPDIR}/my.cnf.ok" || die
+
+	if use prefix ; then
+		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8mb4|latin1|g" \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	eprefixify "${TMPDIR}/my.cnf.ok"
+
+	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+	if use router ; then
+		rm -rf \
+			"${ED}/usr/LICENSE.router" \
+			"${ED}/usr/README.router" \
+			"${ED}/usr/run" \
+			"${ED}/usr/var" \
+			|| die
+	fi
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	# NOTE: $MY_LOGDIR contains $EPREFIX by default
+	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		einfo
+		elog "You might want to run:"
+		elog "  \"emerge --config =${CATEGORY}/${PF}\""
+		elog "if this is a new install."
+		einfo
+	else
+		einfo
+		elog "Upgrade process for ${PN}-8.x has changed. Please read"
+		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+		einfo
+	fi
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	local -a config_files
+
+	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+	fi
+
+	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+	fi
+
+	if [[ ${#config_files[@]} -gt 0 ]] ; then
+		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+			local user_answer
+
+			echo
+			einfo "Please select default authentication plugin (enter number or plugin name):"
+			einfo "1) caching_sha2_password [MySQL 8.0 default]"
+			einfo "2) mysql_native_password [MySQL 5.7 default]"
+			einfo
+			einfo "For details see:"
+			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+			read -p "    >" user_answer
+			echo
+
+			case "${user_answer}" in
+				1|caching_sha2_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+					;;
+				2|mysql_native_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+					;;
+				'')
+					die "No authentication plugin selected!"
+					;;
+				*)
+					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+					;;
+			esac
+
+			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
+			unset user_answer
+		fi
+
+		local cfg_option cfg_option_tabs cfg_section
+		for config_file in "${config_files[@]}" ; do
+			cfg_option="default-authentication-plugin"
+			cfg_section="mysqld"
+			cfg_option_tabs="\t\t"
+			if [[ "${config_file}" == *client.cnf ]] ; then
+				cfg_option="default-auth"
+				cfg_section="client"
+				cfg_option_tabs="\t\t\t\t"
+			fi
+
+			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+			else
+				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+			fi
+		done
+		unset cfg_option cfg_option_tabs cfg_section
+	fi
+	unset config_files config_file
+
+	echo
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		grep -E -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-10-14  8:34 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2023-10-14  8:34 UTC (permalink / raw
  To: gentoo-commits

commit:     ca28939e0ef96b8296007e96961c9f1c745ad2d1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 14 08:17:43 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 14 08:30:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca28939e

dev-db/mysql: test tweaks

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.34.ebuild | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dev-db/mysql/mysql-8.0.34.ebuild b/dev-db/mysql/mysql-8.0.34.ebuild
index 043436bb5bf4..43fb2e5f98f0 100644
--- a/dev-db/mysql/mysql-8.0.34.ebuild
+++ b/dev-db/mysql/mysql-8.0.34.ebuild
@@ -428,16 +428,20 @@ src_test() {
 		"main.subquery_sj_firstmatch_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet"
 		"main.subquery_sj_firstmatch_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
 		"main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
+		"main.subquery_sj_all_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
 		"main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet"
 		"main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet"
 		"main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet"
 		"perfschema.statement_digest_query_sample;0;Test will fail on slow hardware"
 
 		"rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch;0;Unstable test"
+		"rpl_gtid.rpl_multi_source_mtr_includes;97844;Unstable test"
+		"main.partition_datatype;0;Unstable test"
 
 		"sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware"
 
 		"x.connection;0;Known failure - no upstream bug yet"
+		"main.slow_log;0;Known failure - no upstream bug yet"
 	)
 
 	if ! hash zip 1>/dev/null 2>&1 ; then
@@ -481,6 +485,11 @@ src_test() {
 
 		# FIXME: suffers from broken DEATH_TESTS's
 		"routertest_router_certificate_generator"
+
+		# TODO: ???
+		"pfs_host-oom"
+		"pfs_user-oom"
+		"pfs"
 	)
 
 	# Try to increase file limits to increase test coverage


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-08-06 11:49 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2023-08-06 11:49 UTC (permalink / raw
  To: gentoo-commits

commit:     4edc739c2a9e4aa6f14b2489dc4bf19693542081
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  6 11:45:32 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug  6 11:48:43 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4edc739c

dev-db/mysql: use tc-enables-fortify-source

Better than fragile optimisation level checking.

Bug: https://bugs.gentoo.org/841770
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.32-r2.ebuild | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.32-r2.ebuild b/dev-db/mysql/mysql-8.0.32-r2.ebuild
index 2f830014963c..c2f3cdba598b 100644
--- a/dev-db/mysql/mysql-8.0.32-r2.ebuild
+++ b/dev-db/mysql/mysql-8.0.32-r2.ebuild
@@ -199,9 +199,7 @@ src_configure() {
 	# modified GCC to set 3).
 	#
 	# bug #891259
-	if is-flagq '-O[23]' || is-flagq '-Ofast' ; then
-		# We can't unconditionally do this b/c we fortify needs
-		# some level of optimisation.
+	if tc-enables-fortify-source ; then
 		filter-flags -D_FORTIFY_SOURCE=3
 		append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
 	fi


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-08-02 16:41 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2023-08-02 16:41 UTC (permalink / raw
  To: gentoo-commits

commit:     576e722a685d1a4ac54c6ae0d47967e22c79e9ba
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  2 16:41:31 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug  2 16:41:31 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=576e722a

dev-db/mysql: Stabilize 5.7.40 x86, #878907

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.40.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.40.ebuild b/dev-db/mysql/mysql-5.7.40.ebuild
index f859ba53f97c..984edbf4fc08 100644
--- a/dev-db/mysql/mysql-5.7.40.ebuild
+++ b/dev-db/mysql/mysql-5.7.40.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-07-15 11:45 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2023-07-15 11:45 UTC (permalink / raw
  To: gentoo-commits

commit:     8d9829c6b23d2c4627b3a9237bb767a007f997fc
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 11:45:12 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 15 11:45:12 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d9829c6

dev-db/mysql: Stabilize 5.7.41 arm, #910090

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.41.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.41.ebuild b/dev-db/mysql/mysql-5.7.41.ebuild
index 66b75bf99886..e06cf85e23a5 100644
--- a/dev-db/mysql/mysql-5.7.41.ebuild
+++ b/dev-db/mysql/mysql-5.7.41.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-07-15 11:45 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2023-07-15 11:45 UTC (permalink / raw
  To: gentoo-commits

commit:     3dfa307232577bf4cf8cc7c4e206f34c21facf6c
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 11:45:09 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 15 11:45:09 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dfa3072

dev-db/mysql: Stabilize 5.7.41 ppc64, #910090

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.41.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.41.ebuild b/dev-db/mysql/mysql-5.7.41.ebuild
index 984edbf4fc08..66b75bf99886 100644
--- a/dev-db/mysql/mysql-5.7.41.ebuild
+++ b/dev-db/mysql/mysql-5.7.41.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-07-15 11:45 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2023-07-15 11:45 UTC (permalink / raw
  To: gentoo-commits

commit:     42bba74f7f2d06792d028e012d8b960d289d41a8
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 11:45:06 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 15 11:45:06 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42bba74f

dev-db/mysql: Stabilize 5.7.41 x86, #910090

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.41.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.41.ebuild b/dev-db/mysql/mysql-5.7.41.ebuild
index f859ba53f97c..984edbf4fc08 100644
--- a/dev-db/mysql/mysql-5.7.41.ebuild
+++ b/dev-db/mysql/mysql-5.7.41.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-07-15 11:45 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2023-07-15 11:45 UTC (permalink / raw
  To: gentoo-commits

commit:     59fb7f74d50cf82323be347b31ef6f6ff67b15b0
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 11:45:04 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 15 11:45:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59fb7f74

dev-db/mysql: Stabilize 5.7.41 amd64, #910090

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.41.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.41.ebuild b/dev-db/mysql/mysql-5.7.41.ebuild
index d7f06681b0d1..f859ba53f97c 100644
--- a/dev-db/mysql/mysql-5.7.41.ebuild
+++ b/dev-db/mysql/mysql-5.7.41.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-07-15 10:11 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2023-07-15 10:11 UTC (permalink / raw
  To: gentoo-commits

commit:     4895b626ebb2dd4c0f1faedc9a1a6007ddc01d75
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 09:55:08 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 15 09:55:08 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4895b626

dev-db/mysql: Stabilize 5.7.41 arm64, #910090

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.41.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.41.ebuild b/dev-db/mysql/mysql-5.7.41.ebuild
index db0b86f4f344..d7f06681b0d1 100644
--- a/dev-db/mysql/mysql-5.7.41.ebuild
+++ b/dev-db/mysql/mysql-5.7.41.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+KEYWORDS="~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-05-06 14:01 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2023-05-06 14:01 UTC (permalink / raw
  To: gentoo-commits

commit:     0868b499da1d5b0cd75752fe9735285f814ca7a7
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat May  6 14:01:04 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat May  6 14:01:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0868b499

dev-db/mysql: Stabilize 8.0.32-r2 x86, #894488

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.32-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.32-r2.ebuild b/dev-db/mysql/mysql-8.0.32-r2.ebuild
index 7d0f75557eb2..e4c32058a0e4 100644
--- a/dev-db/mysql/mysql-8.0.32-r2.ebuild
+++ b/dev-db/mysql/mysql-8.0.32-r2.ebuild
@@ -25,7 +25,7 @@ S="${WORKDIR}/mysql"
 LICENSE="GPL-2"
 SLOT="8.0"
 # -ppc, -riscv for bug #761715
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="?? ( tcmalloc jemalloc )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-05-06 14:01 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2023-05-06 14:01 UTC (permalink / raw
  To: gentoo-commits

commit:     d6bbdbb9f937f184e6980d696d671a7be84595a4
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat May  6 14:01:08 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat May  6 14:01:08 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6bbdbb9

dev-db/mysql: Stabilize 8.0.32-r2 ppc64, #894488

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.32-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.32-r2.ebuild b/dev-db/mysql/mysql-8.0.32-r2.ebuild
index e4c32058a0e4..fdfd0ad2418d 100644
--- a/dev-db/mysql/mysql-8.0.32-r2.ebuild
+++ b/dev-db/mysql/mysql-8.0.32-r2.ebuild
@@ -25,7 +25,7 @@ S="${WORKDIR}/mysql"
 LICENSE="GPL-2"
 SLOT="8.0"
 # -ppc, -riscv for bug #761715
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="?? ( tcmalloc jemalloc )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-05-06 14:01 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2023-05-06 14:01 UTC (permalink / raw
  To: gentoo-commits

commit:     7b8abe160e0119cedf8f63093d1ca04516b64055
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat May  6 14:01:00 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat May  6 14:01:00 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b8abe16

dev-db/mysql: Stabilize 8.0.32-r2 arm, #894488

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.32-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.32-r2.ebuild b/dev-db/mysql/mysql-8.0.32-r2.ebuild
index 1a476651a056..7d0f75557eb2 100644
--- a/dev-db/mysql/mysql-8.0.32-r2.ebuild
+++ b/dev-db/mysql/mysql-8.0.32-r2.ebuild
@@ -25,7 +25,7 @@ S="${WORKDIR}/mysql"
 LICENSE="GPL-2"
 SLOT="8.0"
 # -ppc, -riscv for bug #761715
-KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="?? ( tcmalloc jemalloc )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-04-02 19:30 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2023-04-02 19:30 UTC (permalink / raw
  To: gentoo-commits

commit:     1f11b7f62bed2dcf071bc91af765ec195d9f12ca
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  2 19:30:13 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sun Apr  2 19:30:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f11b7f6

dev-db/mysql: Stabilize 8.0.32-r2 amd64, #894488

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.32-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.32-r2.ebuild b/dev-db/mysql/mysql-8.0.32-r2.ebuild
index 948c8a60be5d..125199fb771f 100644
--- a/dev-db/mysql/mysql-8.0.32-r2.ebuild
+++ b/dev-db/mysql/mysql-8.0.32-r2.ebuild
@@ -25,7 +25,7 @@ S="${WORKDIR}/mysql"
 LICENSE="GPL-2"
 SLOT="8.0"
 # -ppc, -riscv for bug #761715
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="?? ( tcmalloc jemalloc )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-04-02 19:30 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2023-04-02 19:30 UTC (permalink / raw
  To: gentoo-commits

commit:     be4cecd2ea90bcb411236acedc7497332b49d30e
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  2 19:30:18 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sun Apr  2 19:30:18 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be4cecd2

dev-db/mysql: Stabilize 8.0.32-r2 arm64, #894488

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.32-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.32-r2.ebuild b/dev-db/mysql/mysql-8.0.32-r2.ebuild
index 125199fb771f..db22ee953b44 100644
--- a/dev-db/mysql/mysql-8.0.32-r2.ebuild
+++ b/dev-db/mysql/mysql-8.0.32-r2.ebuild
@@ -25,7 +25,7 @@ S="${WORKDIR}/mysql"
 LICENSE="GPL-2"
 SLOT="8.0"
 # -ppc, -riscv for bug #761715
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="?? ( tcmalloc jemalloc )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-02-14  0:29 Mike Gilbert
  0 siblings, 0 replies; 393+ messages in thread
From: Mike Gilbert @ 2023-02-14  0:29 UTC (permalink / raw
  To: gentoo-commits

commit:     c0a22ddcd4d827e11f06fe8d21d8b50a81d9755b
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 13 20:03:59 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Feb 14 00:29:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0a22ddc

dev-db/mysql: adjust libevent dependency

Bug: https://bugs.gentoo.org/869722
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 dev-db/mysql/{mysql-8.0.27.ebuild => mysql-8.0.27-r1.ebuild}    | 2 +-
 dev-db/mysql/{mysql-8.0.31-r1.ebuild => mysql-8.0.31-r2.ebuild} | 2 +-
 dev-db/mysql/{mysql-8.0.32-r1.ebuild => mysql-8.0.32-r2.ebuild} | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.27.ebuild b/dev-db/mysql/mysql-8.0.27-r1.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-8.0.27.ebuild
rename to dev-db/mysql/mysql-8.0.27-r1.ebuild
index 87825505d12d..49eaa7361454 100644
--- a/dev-db/mysql/mysql-8.0.27.ebuild
+++ b/dev-db/mysql/mysql-8.0.27-r1.ebuild
@@ -53,7 +53,7 @@ COMMON_DEPEND="
 	>=dev-libs/openssl-1.0.0:0=
 	server? (
 		dev-libs/icu:=
-		dev-libs/libevent:=[ssl,threads]
+		dev-libs/libevent:=[ssl,threads(+)]
 		>=dev-libs/protobuf-3.8:=
 		net-libs/libtirpc:=
 		cjk? ( app-text/mecab:= )

diff --git a/dev-db/mysql/mysql-8.0.31-r1.ebuild b/dev-db/mysql/mysql-8.0.31-r2.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-8.0.31-r1.ebuild
rename to dev-db/mysql/mysql-8.0.31-r2.ebuild
index a762b9d3dd53..678927c238f6 100644
--- a/dev-db/mysql/mysql-8.0.31-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.31-r2.ebuild
@@ -46,7 +46,7 @@ COMMON_DEPEND="
 	>=dev-libs/openssl-1.0.0:0=
 	server? (
 		dev-libs/icu:=
-		dev-libs/libevent:=[ssl,threads]
+		dev-libs/libevent:=[ssl,threads(+)]
 		>=dev-libs/protobuf-3.8:=
 		net-libs/libtirpc:=
 		cjk? ( app-text/mecab:= )

diff --git a/dev-db/mysql/mysql-8.0.32-r1.ebuild b/dev-db/mysql/mysql-8.0.32-r2.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-8.0.32-r1.ebuild
rename to dev-db/mysql/mysql-8.0.32-r2.ebuild
index 2d758413cf3e..948c8a60be5d 100644
--- a/dev-db/mysql/mysql-8.0.32-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.32-r2.ebuild
@@ -46,7 +46,7 @@ COMMON_DEPEND="
 	>=sys-libs/zlib-1.2.13:=
 	server? (
 		dev-libs/icu:=
-		dev-libs/libevent:=[ssl,threads]
+		dev-libs/libevent:=[ssl,threads(+)]
 		>=dev-libs/protobuf-3.8:=
 		net-libs/libtirpc:=
 		cjk? ( app-text/mecab:= )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-02-14  0:29 Mike Gilbert
  0 siblings, 0 replies; 393+ messages in thread
From: Mike Gilbert @ 2023-02-14  0:29 UTC (permalink / raw
  To: gentoo-commits

commit:     19dea3e3d4a60ab03b66c81cc7990de6fba5b8d9
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 13 20:04:19 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Feb 14 00:29:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19dea3e3

dev-db/mysql: drop 8.0.31

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.31.ebuild | 1223 --------------------------------------
 1 file changed, 1223 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.31.ebuild b/dev-db/mysql/mysql-8.0.31.ebuild
deleted file mode 100644
index 691ab60e8a63..000000000000
--- a/dev-db/mysql/mysql-8.0.31.ebuild
+++ /dev/null
@@ -1,1223 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-CMAKE_MAKEFILE_GENERATOR=emake
-inherit check-reqs cmake flag-o-matic linux-info multiprocessing prefix toolchain-funcs
-
-MY_PV="${PV//_pre*}"
-MY_P="${PN}-${MY_PV}"
-
-# Patch version
-PATCH_SET=( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patches-01.tar.xz )
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${MY_PV}.tar.gz"
-SRC_URI+=" https://cdn.mysql.com/archives/mysql-$(ver_cut 1-2)/mysql-boost-${MY_PV}.tar.gz"
-SRC_URI+=" https://downloads.mysql.com/archives/MySQL-$(ver_cut 1-2)/${PN}-boost-${MY_PV}.tar.gz"
-SRC_URI+=" ${PATCH_SET[@]}"
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-LICENSE="GPL-2"
-SLOT="8.0"
-# -ppc, -riscv for bug #761715
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="?? ( tcmalloc jemalloc )
-	cjk? ( server )
-	jemalloc? ( server )
-	numa? ( server )
-	profiling? ( server )
-	router? ( server )
-	tcmalloc? ( server )"
-
-# Be warned, *DEPEND are version-dependent
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	>=app-arch/lz4-0_p131:=
-	app-arch/zstd:=
-	sys-libs/ncurses:0=
-	>=sys-libs/zlib-1.2.3:0=
-	>=dev-libs/openssl-1.0.0:0=
-	server? (
-		dev-libs/icu:=
-		dev-libs/libevent:=[ssl,threads]
-		>=dev-libs/protobuf-3.8:=
-		net-libs/libtirpc:=
-		cjk? ( app-text/mecab:= )
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-		tcmalloc? ( dev-util/google-perftools:0= )
-	)
-"
-
-DEPEND="
-	${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	app-alternatives/yacc
-	server? ( net-libs/rpcsvc-proto )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-
-RDEPEND="
-	${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:5.7
-	selinux? ( sec-policy/selinux-mysql )
-	!prefix? (
-		acct-group/mysql acct-user/mysql
-		dev-db/mysql-init-scripts
-	)
-"
-
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-PATCHES=(
-	"${WORKDIR}"/mysql-patches
-)
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="3G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="3G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
-}
-
-src_prepare() {
-	# Avoid rpm call which would trigger sandbox, #692368
-	sed -i \
-		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
-		CMakeLists.txt || die
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove man pages for client-lib tools we don't install
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	# Code is now requiring C++17 due to https://github.com/mysql/mysql-server/commit/236ab55bedd8c9eacd80766d85edde2a8afacd08
-	append-cxxflags -std=c++17
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	local mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usev !debug '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usev !debug '-DNDEBUG')"
-
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-
-		# Using bundled editline to get CTRL+C working
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-		-DWITH_ROUTER=$(usex router ON OFF)
-	)
-
-	if is-flagq -fno-lto ; then
-		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
-		mycmakeargs+=( -DWITH_LTO=OFF )
-	elif is-flagq -flto ; then
-		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
-		myconf+=( -DWITH_LTO=ON )
-	else
-		# Disable automagic
-		myconf+=( -DWITH_LTO=OFF )
-	fi
-
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-
-	mycmakeargs+=(
-		-DWITH_ICU=system
-		-DWITH_LZ4=system
-		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
-		-DWITH_RAPIDJSON=bundled
-		-DWITH_ZSTD=system
-	)
-
-	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
-		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-		ewarn "You MUST file bugs without these variables set."
-		ewarn "Tests will probably fail!"
-
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-		)
-	elif use latin1 ; then
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=latin1
-			-DDEFAULT_COLLATION=latin1_swedish_ci
-		)
-	else
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=utf8mb4
-			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
-		)
-	fi
-
-	if use server ; then
-		mycmakeargs+=(
-			-DWITH_EXTRA_CHARSETS=all
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_LIBEVENT=system
-			-DWITH_PROTOBUF=system
-			-DWITH_NUMA=$(usex numa ON OFF)
-		)
-
-		if use jemalloc ; then
-			mycmakeargs+=( -DWITH_JEMALLOC=ON )
-		elif use tcmalloc ; then
-			mycmakeargs+=( -DWITH_TCMALLOC=ON )
-		fi
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_SYSTEMD=no
-		)
-	fi
-
-	cmake_src_configure
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='perl server' \
-# FEATURES='test userpriv' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname bug reason
-		rawtestname="${1}" ; shift
-		bug="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
-		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-
-	local -a disabled_tests
-	disabled_tests+=( "auth_sec.atomic_rename_user;103512;Depends on user running test" )
-	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
-	disabled_tests+=( "auth_sec.openssl_without_fips;94718;Known test failure" )
-	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.st_symdifference;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "innodb.alter_kill;0;Known test failure -- no upstream bug yet" )
-	disabled_tests+=( "main.derived_limit;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.explain_tree;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.gis-precise;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure -- no upstream bug yet" )
-	disabled_tests+=( "main.select_icp_mrr;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_dupsweed;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_dupsweed_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_dupsweed_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_firstmatch;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_firstmatch_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_firstmatch_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "perfschema.statement_digest_query_sample;0;Test will fail on slow hardware")
-	disabled_tests+=( "rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch;0;Unstable test" )
-	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
-	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
-	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
-	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
-		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
-	fi
-
-	if has_version ">=dev-libs/openssl-3" ; then
-		# >=dev-libs/openssl-3 defaults to security level 1 which disallow
-		# TLSv1/1.1 but tests will require TLSv1/1.1.
-		einfo "Set OpenSSL configuration for test suite ..."
-		cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
-		openssl_conf = default_conf
-
-		[ req ]
-		default_bits			= 2048
-		default_keyfile 		= privkey.pem
-		distinguished_name		= req_distinguished_name
-
-		[ req_distinguished_name ]
-		countryName			= Country Name (2 letter code)
-		countryName_default		= AU
-		countryName_min			= 2
-		countryName_max			= 2
-
-		stateOrProvinceName		= State or Province Name (full name)
-		stateOrProvinceName_default	= Some-State
-
-		localityName			= Locality Name (eg, city)
-
-		0.organizationName		= Organization Name (eg, company)
-		0.organizationName_default	= Internet Widgits Pty Ltd
-
-		organizationalUnitName		= Organizational Unit Name (eg, section)
-
-		commonName			= Common Name (e.g. server FQDN or YOUR name)
-		commonName_max			= 64
-
-		emailAddress			= Email Address
-		emailAddress_max		= 64
-
-		[default_conf]
-		ssl_conf = ssl_sect
-
-		[ssl_sect]
-		system_default = system_default_sect
-
-		[system_default_sect]
-		CipherString = DEFAULT@SECLEVEL=0
-		EOF
-
-		local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
-
-		disabled_tests+=( "x.connection_tls_version;0;Not compatible with OpenSSL 3.x error messages" )
-	fi
-
-	local test_infos_str test_infos_arr
-	for test_infos_str in "${disabled_tests[@]}" ; do
-		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
-		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
-			die "Invalid test data set, not matching format: ${test_infos_str}"
-		fi
-
-		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
-	done
-	unset test_infos_str test_infos_arr
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ ${retstatus_tests} -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "${failures}" ]] || die "Test failures: ${failures}"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	cmake_src_install
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	mycnf_src="my.cnf-8.0.distro-server"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR}/${mycnf_src}" \
-		> "${TMPDIR}/my.cnf.ok" || die
-
-	if use prefix ; then
-		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8mb4|latin1|g" \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	eprefixify "${TMPDIR}/my.cnf.ok"
-
-	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-
-	if use router ; then
-		rm -rf \
-			"${ED}/usr/LICENSE.router" \
-			"${ED}/usr/README.router" \
-			"${ED}/usr/run" \
-			"${ED}/usr/var" \
-			|| die
-	fi
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	# NOTE: $MY_LOGDIR contains $EPREFIX by default
-	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-
-	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-		einfo
-		elog "You might want to run:"
-		elog "  \"emerge --config =${CATEGORY}/${PF}\""
-		elog "if this is a new install."
-		einfo
-	else
-		einfo
-		elog "Upgrade process for ${PN}-8.x has changed. Please read"
-		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
-		einfo
-	fi
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	local -a config_files
-
-	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
-	fi
-
-	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
-	fi
-
-	if [[ ${#config_files[@]} -gt 0 ]] ; then
-		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
-			local user_answer
-
-			echo
-			einfo "Please select default authentication plugin (enter number or plugin name):"
-			einfo "1) caching_sha2_password [MySQL 8.0 default]"
-			einfo "2) mysql_native_password [MySQL 5.7 default]"
-			einfo
-			einfo "For details see:"
-			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
-			read -p "    >" user_answer
-			echo
-
-			case "${user_answer}" in
-				1|caching_sha2_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
-					;;
-				2|mysql_native_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
-					;;
-				'')
-					die "No authentication plugin selected!"
-					;;
-				*)
-					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
-					;;
-			esac
-
-			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
-
-			unset user_answer
-		fi
-
-		local cfg_option cfg_option_tabs cfg_section
-		for config_file in "${config_files[@]}" ; do
-			cfg_option="default-authentication-plugin"
-			cfg_section="mysqld"
-			cfg_option_tabs="\t\t"
-			if [[ "${config_file}" == *client.cnf ]] ; then
-				cfg_option="default-auth"
-				cfg_section="client"
-				cfg_option_tabs="\t\t\t\t"
-			fi
-
-			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
-				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
-					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
-			else
-				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
-					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
-			fi
-		done
-		unset cfg_option cfg_option_tabs cfg_section
-	fi
-	unset config_files config_file
-
-	echo
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		grep -E -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-02-01  9:11 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2023-02-01  9:11 UTC (permalink / raw
  To: gentoo-commits

commit:     969e7ab751a14745852e813f5fabe67fe7c50494
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  1 09:11:41 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Wed Feb  1 09:11:41 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=969e7ab7

dev-db/mysql: Stabilize 5.7.40 arm64, #878907

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.40.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.40.ebuild b/dev-db/mysql/mysql-5.7.40.ebuild
index 19f47c417c89..e6f6729f1851 100644
--- a/dev-db/mysql/mysql-5.7.40.ebuild
+++ b/dev-db/mysql/mysql-5.7.40.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-01-18 22:44 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2023-01-18 22:44 UTC (permalink / raw
  To: gentoo-commits

commit:     d8b66ec573bf3e7e6a2012ac16caa23075790e15
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 18 22:38:49 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 18 22:38:57 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8b66ec5

dev-db/mysql: drop spurious 'info' page (README)

Drop file which causes collision w/ mysql-connector-c++. It's only
a tiny README, not a GNU info page.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/{mysql-8.0.32.ebuild => mysql-8.0.32-r1.ebuild} | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dev-db/mysql/mysql-8.0.32.ebuild b/dev-db/mysql/mysql-8.0.32-r1.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-8.0.32.ebuild
rename to dev-db/mysql/mysql-8.0.32-r1.ebuild
index bc8d37b0bb72..2d758413cf3e 100644
--- a/dev-db/mysql/mysql-8.0.32.ebuild
+++ b/dev-db/mysql/mysql-8.0.32-r1.ebuild
@@ -555,6 +555,9 @@ src_test() {
 src_install() {
 	cmake_src_install
 
+	# Not a GNU info file, more like a tiny README.
+	rm "${ED}"/usr/share/info/mysql.info || die
+
 	# Make sure the vars are correctly initialized
 	mysql_init_vars
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-01-13 15:02 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2023-01-13 15:02 UTC (permalink / raw
  To: gentoo-commits

commit:     c89198de4a730d749b16592bc62a22f58658a472
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 15:02:38 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 13 15:02:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c89198de

dev-db/mysql: Stabilize 8.0.31 arm64, #878909

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.31.ebuild b/dev-db/mysql/mysql-8.0.31.ebuild
index fb6f94da2337..691ab60e8a63 100644
--- a/dev-db/mysql/mysql-8.0.31.ebuild
+++ b/dev-db/mysql/mysql-8.0.31.ebuild
@@ -25,7 +25,7 @@ S="${WORKDIR}/mysql"
 LICENSE="GPL-2"
 SLOT="8.0"
 # -ppc, -riscv for bug #761715
-KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="?? ( tcmalloc jemalloc )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-01-13 15:02 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2023-01-13 15:02 UTC (permalink / raw
  To: gentoo-commits

commit:     fc68abee73426f430452b0e2e111e043ae6640b6
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 15:02:34 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 13 15:02:34 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc68abee

dev-db/mysql: Stabilize 8.0.31 arm, #878909

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.31.ebuild b/dev-db/mysql/mysql-8.0.31.ebuild
index b75c2578bdb9..fb6f94da2337 100644
--- a/dev-db/mysql/mysql-8.0.31.ebuild
+++ b/dev-db/mysql/mysql-8.0.31.ebuild
@@ -25,7 +25,7 @@ S="${WORKDIR}/mysql"
 LICENSE="GPL-2"
 SLOT="8.0"
 # -ppc, -riscv for bug #761715
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="?? ( tcmalloc jemalloc )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-01-13 15:02 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2023-01-13 15:02 UTC (permalink / raw
  To: gentoo-commits

commit:     ad823cb3c3ebf85078df14d974111fbbf2757c48
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 15:02:02 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 13 15:02:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad823cb3

dev-db/mysql: Stabilize 8.0.31 ppc64, #878909

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.31.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.31.ebuild b/dev-db/mysql/mysql-8.0.31.ebuild
index d9fb4237812f..b75c2578bdb9 100644
--- a/dev-db/mysql/mysql-8.0.31.ebuild
+++ b/dev-db/mysql/mysql-8.0.31.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -25,7 +25,7 @@ S="${WORKDIR}/mysql"
 LICENSE="GPL-2"
 SLOT="8.0"
 # -ppc, -riscv for bug #761715
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="?? ( tcmalloc jemalloc )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2023-01-03  6:23 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2023-01-03  6:23 UTC (permalink / raw
  To: gentoo-commits

commit:     e1f8fd4c3409ced8801787046937541001fbca1c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  3 06:22:06 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan  3 06:22:48 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1f8fd4c

dev-db/mysql: Stabilize 5.7.40 amd64, #878907

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.40.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.40.ebuild b/dev-db/mysql/mysql-5.7.40.ebuild
index a5986730396c..e22e7215d2bc 100644
--- a/dev-db/mysql/mysql-5.7.40.ebuild
+++ b/dev-db/mysql/mysql-5.7.40.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-12-02 20:25 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2022-12-02 20:25 UTC (permalink / raw
  To: gentoo-commits

commit:     f6ee79c7e5e9e9bb86ccec720b910792f594403e
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  2 20:25:20 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Dec  2 20:25:20 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6ee79c7

dev-db/mysql: Stabilize 8.0.31 x86, #878909

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.31.ebuild b/dev-db/mysql/mysql-8.0.31.ebuild
index f34f46ee8443..07ab584ef2a4 100644
--- a/dev-db/mysql/mysql-8.0.31.ebuild
+++ b/dev-db/mysql/mysql-8.0.31.ebuild
@@ -25,7 +25,7 @@ S="${WORKDIR}/mysql"
 LICENSE="GPL-2"
 SLOT="8.0"
 # -ppc, -riscv for bug #761715
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="?? ( tcmalloc jemalloc )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-12-02  8:02 Arthur Zamarin
  0 siblings, 0 replies; 393+ messages in thread
From: Arthur Zamarin @ 2022-12-02  8:02 UTC (permalink / raw
  To: gentoo-commits

commit:     1a8b6eb71728da3f5a56a8218298ba1fb72a3bd2
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  2 08:02:12 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Dec  2 08:02:12 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a8b6eb7

dev-db/mysql: Stabilize 8.0.31 amd64, #878909

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.31.ebuild b/dev-db/mysql/mysql-8.0.31.ebuild
index 2afca38d6e20..f34f46ee8443 100644
--- a/dev-db/mysql/mysql-8.0.31.ebuild
+++ b/dev-db/mysql/mysql-8.0.31.ebuild
@@ -25,7 +25,7 @@ S="${WORKDIR}/mysql"
 LICENSE="GPL-2"
 SLOT="8.0"
 # -ppc, -riscv for bug #761715
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="?? ( tcmalloc jemalloc )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-10-31 15:49 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-10-31 15:49 UTC (permalink / raw
  To: gentoo-commits

commit:     42a334de6f64a2ab607a16f481fc9b9a138e786f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 31 15:48:51 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 31 15:48:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42a334de

dev-db/mysql: destabilize 8.0.31

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.31.ebuild b/dev-db/mysql/mysql-8.0.31.ebuild
index 4ec0a186573f..2afca38d6e20 100644
--- a/dev-db/mysql/mysql-8.0.31.ebuild
+++ b/dev-db/mysql/mysql-8.0.31.ebuild
@@ -25,7 +25,7 @@ S="${WORKDIR}/mysql"
 LICENSE="GPL-2"
 SLOT="8.0"
 # -ppc, -riscv for bug #761715
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="?? ( tcmalloc jemalloc )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-10-31 15:45 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-10-31 15:45 UTC (permalink / raw
  To: gentoo-commits

commit:     1a861d90107cffce78bc4d88c0bcface92d90844
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 31 15:45:08 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 31 15:45:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a861d90

dev-db/mysql: add 8.0.31

Bug: https://bugs.gentoo.org/859388
Bug: https://bugs.gentoo.org/877593
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-8.0.31.ebuild | 1223 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1225 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index bb390ff9eeb7..bf5385fdf8bd 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,5 +1,7 @@
 DIST mysql-5.7.36-patches-01.tar.xz 6396 BLAKE2B ed9783f207d40fc220992c4193bdd8e96523f69414daa756f1f30306c1aedff9e96216ba2294a4c41eefbaf39c8bb37784bf1e7cce656c93f829c9cf0682fa6d SHA512 b0fbd41ebb2d32067e6c81707dffa91fece2d368f4b2fa47951492936509972d425b64d7613748c42b31cf9ba9dab697efeff70debe7268855a90d322d3f3158
 DIST mysql-8.0.27-patches-03.tar.xz 9864 BLAKE2B 03136477a97a5bff0c5f1cbc7921a77d9b36e148e94f80463f00f0efd1a6859af4595f9cf15aa492bce043fdc9d6c6328bd64102f8b0127eacbc7795b1785ecb SHA512 8c00c8fef2b01389f59138eaa29399d8a9ce7930b6bdfb7689d1d7bf14a32fbb10a2b8dbe91933b805899ef3af0cf0bda704d4be14249991b381054bcc496058
+DIST mysql-8.0.31-patches-01.tar.xz 5464 BLAKE2B c067bf311c83d4aa0f48d56621997bc58820fa0b41bd708eae04b0b54b89d549c5c1b84ca93adcbbdcb008199510ea667a12b1bcd44bf6b6df02062b4551d0a2 SHA512 95af6bb5aa0c407f0a1014f33523608b0df0797fd7fbdbba8a19985258a7c04788d7587c8f67cd1745284522c58297931c8827e31f77e8c89baaeff71a5e0ddc
 DIST mysql-boost-5.7.36.tar.gz 52968383 BLAKE2B 4d5e4fcf8d56f4a1d1d54ee889d432ee3265f55ff9c0ecf6fe216e67790a49ed052b94457680daef4cb42df29f14db7b0e678e0f0443c20b7e2324c772c24313 SHA512 a95580efd5b87776ee7f1aae9b50d50d88c70a48c16e7a2d8c6ada0b1cadc5ec6074a859291a65caa1b50a00e08a9e350df342bb0c6ef74edaf21055331c081b
 DIST mysql-boost-5.7.40.tar.gz 53255386 BLAKE2B 1c367dd4d65a42713fb09943c4518c9be375210fee4e8e6b7b889dc32f0b429a98f132498ba8e6423d288f2936a97ec6c5098411d5f28adc608d04deeb068b24 SHA512 5c49ef65c00658786117cc489d80a6ed7517759b010fb4530508649ab6b4079bb8f1dbc70cefe5d179e1a003960d296b85210b161be4f8f18756a578a1a11365
 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

diff --git a/dev-db/mysql/mysql-8.0.31.ebuild b/dev-db/mysql/mysql-8.0.31.ebuild
new file mode 100644
index 000000000000..4ec0a186573f
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.31.ebuild
@@ -0,0 +1,1223 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_MAKEFILE_GENERATOR=emake
+inherit check-reqs cmake flag-o-matic linux-info multiprocessing prefix toolchain-funcs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+# Patch version
+PATCH_SET=( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patches-01.tar.xz )
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${MY_PV}.tar.gz"
+SRC_URI+=" https://cdn.mysql.com/archives/mysql-$(ver_cut 1-2)/mysql-boost-${MY_PV}.tar.gz"
+SRC_URI+=" https://downloads.mysql.com/archives/MySQL-$(ver_cut 1-2)/${PN}-boost-${MY_PV}.tar.gz"
+SRC_URI+=" ${PATCH_SET[@]}"
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+LICENSE="GPL-2"
+SLOT="8.0"
+# -ppc, -riscv for bug #761715
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling router selinux +server tcmalloc test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	cjk? ( server )
+	jemalloc? ( server )
+	numa? ( server )
+	profiling? ( server )
+	router? ( server )
+	tcmalloc? ( server )"
+
+# Be warned, *DEPEND are version-dependent
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	>=app-arch/lz4-0_p131:=
+	app-arch/zstd:=
+	sys-libs/ncurses:0=
+	>=sys-libs/zlib-1.2.3:0=
+	>=dev-libs/openssl-1.0.0:0=
+	server? (
+		dev-libs/icu:=
+		dev-libs/libevent:=[ssl,threads]
+		>=dev-libs/protobuf-3.8:=
+		net-libs/libtirpc:=
+		cjk? ( app-text/mecab:= )
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		tcmalloc? ( dev-util/google-perftools:0= )
+	)
+"
+
+DEPEND="
+	${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	virtual/yacc
+	server? ( net-libs/rpcsvc-proto )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+
+RDEPEND="
+	${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:5.7
+	selinux? ( sec-policy/selinux-mysql )
+	!prefix? (
+		acct-group/mysql acct-user/mysql
+		dev-db/mysql-init-scripts
+	)
+"
+
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+PATCHES=(
+	"${WORKDIR}"/mysql-patches
+)
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="3G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="3G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+	# Avoid rpm call which would trigger sandbox, #692368
+	sed -i \
+		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+		CMakeLists.txt || die
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove man pages for client-lib tools we don't install
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	# Code is now requiring C++17 due to https://github.com/mysql/mysql-server/commit/236ab55bedd8c9eacd80766d85edde2a8afacd08
+	append-cxxflags -std=c++17
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	local mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usev !debug '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usev !debug '-DNDEBUG')"
+
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+
+		# Using bundled editline to get CTRL+C working
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+		-DWITH_ROUTER=$(usex router ON OFF)
+	)
+
+	if is-flagq -fno-lto ; then
+		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
+		mycmakeargs+=( -DWITH_LTO=OFF )
+	elif is-flagq -flto ; then
+		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+		myconf+=( -DWITH_LTO=ON )
+	else
+		# Disable automagic
+		myconf+=( -DWITH_LTO=OFF )
+	fi
+
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+	mycmakeargs+=(
+		-DWITH_ICU=system
+		-DWITH_LZ4=system
+		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+		-DWITH_RAPIDJSON=bundled
+		-DWITH_ZSTD=system
+	)
+
+	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+		ewarn "You MUST file bugs without these variables set."
+		ewarn "Tests will probably fail!"
+
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+		)
+	elif use latin1 ; then
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=latin1
+			-DDEFAULT_COLLATION=latin1_swedish_ci
+		)
+	else
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=utf8mb4
+			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+		)
+	fi
+
+	if use server ; then
+		mycmakeargs+=(
+			-DWITH_EXTRA_CHARSETS=all
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_LIBEVENT=system
+			-DWITH_PROTOBUF=system
+			-DWITH_NUMA=$(usex numa ON OFF)
+		)
+
+		if use jemalloc ; then
+			mycmakeargs+=( -DWITH_JEMALLOC=ON )
+		elif use tcmalloc ; then
+			mycmakeargs+=( -DWITH_TCMALLOC=ON )
+		fi
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_SYSTEMD=no
+		)
+	fi
+
+	cmake_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='perl server' \
+# FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname bug reason
+		rawtestname="${1}" ; shift
+		bug="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+
+	local -a disabled_tests
+	disabled_tests+=( "auth_sec.atomic_rename_user;103512;Depends on user running test" )
+	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
+	disabled_tests+=( "auth_sec.openssl_without_fips;94718;Known test failure" )
+	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.st_symdifference;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "innodb.alter_kill;0;Known test failure -- no upstream bug yet" )
+	disabled_tests+=( "main.derived_limit;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.explain_tree;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.gis-precise;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure -- no upstream bug yet" )
+	disabled_tests+=( "main.select_icp_mrr;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_dupsweed;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_dupsweed_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_dupsweed_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_firstmatch;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_firstmatch_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_firstmatch_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "perfschema.statement_digest_query_sample;0;Test will fail on slow hardware")
+	disabled_tests+=( "rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch;0;Unstable test" )
+	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
+		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
+	fi
+
+	if has_version ">=dev-libs/openssl-3" ; then
+		# >=dev-libs/openssl-3 defaults to security level 1 which disallow
+		# TLSv1/1.1 but tests will require TLSv1/1.1.
+		einfo "Set OpenSSL configuration for test suite ..."
+		cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
+		openssl_conf = default_conf
+
+		[ req ]
+		default_bits			= 2048
+		default_keyfile 		= privkey.pem
+		distinguished_name		= req_distinguished_name
+
+		[ req_distinguished_name ]
+		countryName			= Country Name (2 letter code)
+		countryName_default		= AU
+		countryName_min			= 2
+		countryName_max			= 2
+
+		stateOrProvinceName		= State or Province Name (full name)
+		stateOrProvinceName_default	= Some-State
+
+		localityName			= Locality Name (eg, city)
+
+		0.organizationName		= Organization Name (eg, company)
+		0.organizationName_default	= Internet Widgits Pty Ltd
+
+		organizationalUnitName		= Organizational Unit Name (eg, section)
+
+		commonName			= Common Name (e.g. server FQDN or YOUR name)
+		commonName_max			= 64
+
+		emailAddress			= Email Address
+		emailAddress_max		= 64
+
+		[default_conf]
+		ssl_conf = ssl_sect
+
+		[ssl_sect]
+		system_default = system_default_sect
+
+		[system_default_sect]
+		CipherString = DEFAULT@SECLEVEL=0
+		EOF
+
+		local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
+
+		disabled_tests+=( "x.connection_tls_version;0;Not compatible with OpenSSL 3.x error messages" )
+	fi
+
+	local test_infos_str test_infos_arr
+	for test_infos_str in "${disabled_tests[@]}" ; do
+		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+			die "Invalid test data set, not matching format: ${test_infos_str}"
+		fi
+
+		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+	done
+	unset test_infos_str test_infos_arr
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ ${retstatus_tests} -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "${failures}" ]] || die "Test failures: ${failures}"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	cmake_src_install
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	mycnf_src="my.cnf-8.0.distro-server"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR}/${mycnf_src}" \
+		> "${TMPDIR}/my.cnf.ok" || die
+
+	if use prefix ; then
+		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8mb4|latin1|g" \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	eprefixify "${TMPDIR}/my.cnf.ok"
+
+	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+	if use router ; then
+		rm -rf \
+			"${ED}/usr/LICENSE.router" \
+			"${ED}/usr/README.router" \
+			"${ED}/usr/run" \
+			"${ED}/usr/var" \
+			|| die
+	fi
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	# NOTE: $MY_LOGDIR contains $EPREFIX by default
+	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		einfo
+		elog "You might want to run:"
+		elog "  \"emerge --config =${CATEGORY}/${PF}\""
+		elog "if this is a new install."
+		einfo
+	else
+		einfo
+		elog "Upgrade process for ${PN}-8.x has changed. Please read"
+		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+		einfo
+	fi
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	local -a config_files
+
+	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+	fi
+
+	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+	fi
+
+	if [[ ${#config_files[@]} -gt 0 ]] ; then
+		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+			local user_answer
+
+			echo
+			einfo "Please select default authentication plugin (enter number or plugin name):"
+			einfo "1) caching_sha2_password [MySQL 8.0 default]"
+			einfo "2) mysql_native_password [MySQL 5.7 default]"
+			einfo
+			einfo "For details see:"
+			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+			read -p "    >" user_answer
+			echo
+
+			case "${user_answer}" in
+				1|caching_sha2_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+					;;
+				2|mysql_native_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+					;;
+				'')
+					die "No authentication plugin selected!"
+					;;
+				*)
+					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+					;;
+			esac
+
+			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
+			unset user_answer
+		fi
+
+		local cfg_option cfg_option_tabs cfg_section
+		for config_file in "${config_files[@]}" ; do
+			cfg_option="default-authentication-plugin"
+			cfg_section="mysqld"
+			cfg_option_tabs="\t\t"
+			if [[ "${config_file}" == *client.cnf ]] ; then
+				cfg_option="default-auth"
+				cfg_section="client"
+				cfg_option_tabs="\t\t\t\t"
+			fi
+
+			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+			else
+				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+			fi
+		done
+		unset cfg_option cfg_option_tabs cfg_section
+	fi
+	unset config_files config_file
+
+	echo
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		grep -E -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-10-31 15:45 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-10-31 15:45 UTC (permalink / raw
  To: gentoo-commits

commit:     aa0f272d5a3612f52f2e918d92f18eff718890d0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 31 15:45:07 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 31 15:45:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa0f272d

dev-db/mysql: add 5.7.40

Bug: https://bugs.gentoo.org/859388
Bug: https://bugs.gentoo.org/877593
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/Manifest            |    1 +
 dev-db/mysql/mysql-5.7.40.ebuild | 1285 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1286 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 17d7fae4b8e1..bb390ff9eeb7 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,5 @@
 DIST mysql-5.7.36-patches-01.tar.xz 6396 BLAKE2B ed9783f207d40fc220992c4193bdd8e96523f69414daa756f1f30306c1aedff9e96216ba2294a4c41eefbaf39c8bb37784bf1e7cce656c93f829c9cf0682fa6d SHA512 b0fbd41ebb2d32067e6c81707dffa91fece2d368f4b2fa47951492936509972d425b64d7613748c42b31cf9ba9dab697efeff70debe7268855a90d322d3f3158
 DIST mysql-8.0.27-patches-03.tar.xz 9864 BLAKE2B 03136477a97a5bff0c5f1cbc7921a77d9b36e148e94f80463f00f0efd1a6859af4595f9cf15aa492bce043fdc9d6c6328bd64102f8b0127eacbc7795b1785ecb SHA512 8c00c8fef2b01389f59138eaa29399d8a9ce7930b6bdfb7689d1d7bf14a32fbb10a2b8dbe91933b805899ef3af0cf0bda704d4be14249991b381054bcc496058
 DIST mysql-boost-5.7.36.tar.gz 52968383 BLAKE2B 4d5e4fcf8d56f4a1d1d54ee889d432ee3265f55ff9c0ecf6fe216e67790a49ed052b94457680daef4cb42df29f14db7b0e678e0f0443c20b7e2324c772c24313 SHA512 a95580efd5b87776ee7f1aae9b50d50d88c70a48c16e7a2d8c6ada0b1cadc5ec6074a859291a65caa1b50a00e08a9e350df342bb0c6ef74edaf21055331c081b
+DIST mysql-boost-5.7.40.tar.gz 53255386 BLAKE2B 1c367dd4d65a42713fb09943c4518c9be375210fee4e8e6b7b889dc32f0b429a98f132498ba8e6423d288f2936a97ec6c5098411d5f28adc608d04deeb068b24 SHA512 5c49ef65c00658786117cc489d80a6ed7517759b010fb4530508649ab6b4079bb8f1dbc70cefe5d179e1a003960d296b85210b161be4f8f18756a578a1a11365
 DIST mysql-boost-8.0.27.tar.gz 292184025 BLAKE2B 177209f3c62b0326ca9d021c751a701dec84c1b15c946ab0a68b1b4cf0620468eb3a1df77a918284007a0fde1aaa6a9767d0baed57936612813ef583df51c35e SHA512 6ef2426c0bee46bdf8e2fa5cb159d5ae19f0bed4f7c9bea9b33e0dd922b568c3c68ca063dcbcd7ea6904aaea31877c10064ea10b4bc63fb40d9f31778e3a7891

diff --git a/dev-db/mysql/mysql-5.7.40.ebuild b/dev-db/mysql/mysql-5.7.40.ebuild
new file mode 100644
index 000000000000..8daf02105f3c
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.40.ebuild
@@ -0,0 +1,1285 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs multilib-minimal
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.36-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-$(ver_cut 1-2)/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-$(ver_cut 1-2)/${PN}-boost-${PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="5.7/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+	sys-libs/ncurses:0=
+	client-libs? (
+		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
+		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
+	)
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+		>=dev-libs/openssl-1.0.0:0=
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		virtual/libcrypt:=
+		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=[ssl]
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+	)
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+"
+
+DEPEND="
+	${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
+	virtual/yacc
+	server? (
+		dev-libs/libevent:=[ssl]
+		experimental? ( net-libs/rpcsvc-proto )
+	)
+	static? ( sys-libs/ncurses[static-libs] )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+
+RDEPEND="
+	${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:8.0
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
+	server? (
+		!prefix? (
+			acct-group/mysql acct-user/mysql
+			dev-db/mysql-init-scripts
+		)
+	)
+"
+
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="3G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="3G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/extra/libevent \
+		|| die
+
+	# Don't clash with dev-db/mysql-connector-c
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# code is not C++17 ready, bug #786402
+	append-cxxflags -std=c++14
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI, bug 530132
+	if multilib_is_native_abi ; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
+			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static ; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in \
+		auth_sec.keyring_udf \
+		innodb.alter_kill \
+		innodb.innodb-multiple-tablespaces \
+		innodb.import_compress_encrypt \
+		perfschema.privilege_table_io \
+	; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
+	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+	for t in \
+		main.xa_prepared_binlog_off \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_non_direct_stm_mixing_engines \
+	; do
+		_disable_test "$t" "Unstable test"
+	done
+
+	for t in \
+		gis.geometry_class_attri_prop \
+		gis.geometry_property_function_issimple \
+		gis.gis_bugs_crashes \
+		gis.spatial_op_testingfunc_mix \
+		gis.spatial_analysis_functions_buffer \
+		gis.spatial_analysis_functions_distance \
+		gis.spatial_utility_function_distance_sphere \
+		gis.spatial_utility_function_simplify \
+		gis.spatial_analysis_functions_centroid \
+		main.with_recursive \
+	; do
+		_disable_test "$t" "Known rounding error with latest AMD processors"
+	done
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
+	fi
+
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.mysqldump_bugs \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	if has_version ">=dev-libs/openssl-3" ; then
+		# >=dev-libs/openssl-3 defaults to security level 1 which disallow
+		# TLSv1/1.1 but tests will require TLSv1/1.1.
+		einfo "Set OpenSSL configuration for test suite ..."
+		cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
+		openssl_conf = default_conf
+
+		[ req ]
+		default_bits			= 2048
+		default_keyfile 		= privkey.pem
+		distinguished_name		= req_distinguished_name
+
+		[ req_distinguished_name ]
+		countryName			= Country Name (2 letter code)
+		countryName_default		= AU
+		countryName_min			= 2
+		countryName_max			= 2
+
+		stateOrProvinceName		= State or Province Name (full name)
+		stateOrProvinceName_default	= Some-State
+
+		localityName			= Locality Name (eg, city)
+
+		0.organizationName		= Organization Name (eg, company)
+		0.organizationName_default	= Internet Widgits Pty Ltd
+
+		organizationalUnitName		= Organizational Unit Name (eg, section)
+
+		commonName			= Common Name (e.g. server FQDN or YOUR name)
+		commonName_max			= 64
+
+		emailAddress			= Email Address
+		emailAddress_max		= 64
+
+		[default_conf]
+		ssl_conf = ssl_sect
+
+		[ssl_sect]
+		system_default = system_default_sect
+
+		[system_default_sect]
+		CipherString = DEFAULT@SECLEVEL=0
+		EOF
+
+		local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
+	fi
+
+	if has_version '>=dev-libs/openssl-1.1.1' ; then
+		# Tests are expecting <openssl-1.1.1 default cipher
+		for t in \
+			auth_sec.cert_verify \
+			auth_sec.mysql_ssl_connection \
+			auth_sec.openssl_cert_generation \
+			auth_sec.ssl_auto_detect \
+			auth_sec.ssl_mode \
+			auth_sec.tls \
+			binlog.binlog_grant_alter_user \
+			encryption.innodb_onlinealter_encryption \
+			main.grant_alter_user_qa \
+			main.grant_user_lock_qa \
+			main.mysql_ssl_default \
+			main.openssl_1 \
+			main.plugin_auth_sha256 \
+			main.plugin_auth_sha256_2 \
+			main.plugin_auth_sha256_server_default \
+			main.plugin_auth_sha256_server_default_tls \
+			main.plugin_auth_sha256_tls \
+			main.ssl \
+			main.ssl_8k_key \
+			main.ssl_bug75311 \
+			main.ssl_ca \
+			main.ssl_cipher \
+			main.ssl_compress \
+			main.ssl_crl \
+			main.ssl_ecdh \
+			main.ssl_verify_identity \
+			x.connection_tls_version \
+			x.connection_openssl \
+		; do
+			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ ${retstatus_tests} -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "${failures}" ]] || die "Test failures: ${failures}"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+	cmake_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		eprefixify "${TMPDIR}/my.cnf.ok"
+
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		grep -E -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-07-29  2:47 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-07-29  2:47 UTC (permalink / raw
  To: gentoo-commits

commit:     f167fbdf6e29f83e2a2b54d586787a24003c0a69
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 29 02:37:28 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 29 02:42:35 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f167fbdf

dev-db/mysql: add github upstream metadata

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/metadata.xml | 45 ++++++++++++++++++++++++---------------------
 1 file changed, 24 insertions(+), 21 deletions(-)

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index d24d13207210..6ee2f3d235f6 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -1,25 +1,28 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-  <maintainer type="project">
-    <email>mysql-bugs@gentoo.org</email>
-    <name>MySQL</name>
-  </maintainer>
-<!-- 
-Please note that this list is shared between the following packages:
-dev-db/mysql
-dev-db/mariadb
--->
-<use>
-  <flag name="cjk">Add CJK support for InnoDB fulltext search using <pkg>app-text/mecab</pkg></flag>
-  <flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages (not recommended)</flag>
-  <flag name="experimental">Build experimental features aka "rapid" plugins</flag>
-  <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
-  <flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
-  <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
-  <flag name="router">Build the MySQL router program</flag>
-  <flag name="server">Build the server program</flag>
-  <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
-  <flag name="test">Install upstream testsuites for end use.</flag>
-</use>
+	<maintainer type="project">
+		<email>mysql-bugs@gentoo.org</email>
+		<name>MySQL</name>
+	</maintainer>
+	<!-- 
+		Please note that this list is shared between the following packages:
+		dev-db/mysql
+		dev-db/mariadb
+	-->
+	<use>
+		<flag name="cjk">Add CJK support for InnoDB fulltext search using <pkg>app-text/mecab</pkg></flag>
+		<flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages (not recommended)</flag>
+		<flag name="experimental">Build experimental features aka "rapid" plugins</flag>
+		<flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
+		<flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
+		<flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
+		<flag name="router">Build the MySQL router program</flag>
+		<flag name="server">Build the server program</flag>
+		<flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
+		<flag name="test">Install upstream testsuites for end use.</flag>
+	</use>
+	<upstream>
+		<remote-id type="github">mysql/mysql-server</remote-id>
+	</upstream>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-06-13 12:18 Jakov Smolić
  0 siblings, 0 replies; 393+ messages in thread
From: Jakov Smolić @ 2022-06-13 12:18 UTC (permalink / raw
  To: gentoo-commits

commit:     d35c7f29b46f5809b2172e9a6ef048dccf615a67
Author:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 13 12:17:53 2022 +0000
Commit:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Mon Jun 13 12:17:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d35c7f29

dev-db/mysql: keyword 8.0.27 for ~riscv

Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.27.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.27.ebuild b/dev-db/mysql/mysql-8.0.27.ebuild
index 2f17c0db2513..18c7bf808582 100644
--- a/dev-db/mysql/mysql-8.0.27.ebuild
+++ b/dev-db/mysql/mysql-8.0.27.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	tcmalloc? ( server )"
 
 # -ppc, -riscv for bug #761715
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ppc64 -riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-06-13 12:16 Jakov Smolić
  0 siblings, 0 replies; 393+ messages in thread
From: Jakov Smolić @ 2022-06-13 12:16 UTC (permalink / raw
  To: gentoo-commits

commit:     540978ddc9df9a8b41a73bf52f86fdcb88fccc55
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 13 12:13:22 2022 +0000
Commit:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Mon Jun 13 12:15:55 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=540978dd

dev-db/mysql: add support for RISC-V

a) fix atomic link issue
b) implement cycle accuracy timer
c) use Largest_lock_free_type_selector

Bug: https://bugs.gentoo.org/761715
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>

 dev-db/mysql/Manifest            | 2 +-
 dev-db/mysql/mysql-8.0.27.ebuild | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 142174a9a37a..17d7fae4b8e1 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,4 @@
 DIST mysql-5.7.36-patches-01.tar.xz 6396 BLAKE2B ed9783f207d40fc220992c4193bdd8e96523f69414daa756f1f30306c1aedff9e96216ba2294a4c41eefbaf39c8bb37784bf1e7cce656c93f829c9cf0682fa6d SHA512 b0fbd41ebb2d32067e6c81707dffa91fece2d368f4b2fa47951492936509972d425b64d7613748c42b31cf9ba9dab697efeff70debe7268855a90d322d3f3158
-DIST mysql-8.0.27-patches-02.tar.xz 7204 BLAKE2B 1a3548f8b48b63a1d38cd9826f8ed2daf3d396276e8887e0a02a73fb91e544e1d0f1da9560351f03d3345d2ea5e8f61e5a9df2bce80558143bd3bc2558372232 SHA512 86c660d67d883fb84e6a38c39994bc30669c18b1d5bdedf908f112c7ebb59f0acf23903e6a81f01de1e6862a8cb779c7b537659ff18b090306eacf668dea47f8
+DIST mysql-8.0.27-patches-03.tar.xz 9864 BLAKE2B 03136477a97a5bff0c5f1cbc7921a77d9b36e148e94f80463f00f0efd1a6859af4595f9cf15aa492bce043fdc9d6c6328bd64102f8b0127eacbc7795b1785ecb SHA512 8c00c8fef2b01389f59138eaa29399d8a9ce7930b6bdfb7689d1d7bf14a32fbb10a2b8dbe91933b805899ef3af0cf0bda704d4be14249991b381054bcc496058
 DIST mysql-boost-5.7.36.tar.gz 52968383 BLAKE2B 4d5e4fcf8d56f4a1d1d54ee889d432ee3265f55ff9c0ecf6fe216e67790a49ed052b94457680daef4cb42df29f14db7b0e678e0f0443c20b7e2324c772c24313 SHA512 a95580efd5b87776ee7f1aae9b50d50d88c70a48c16e7a2d8c6ada0b1cadc5ec6074a859291a65caa1b50a00e08a9e350df342bb0c6ef74edaf21055331c081b
 DIST mysql-boost-8.0.27.tar.gz 292184025 BLAKE2B 177209f3c62b0326ca9d021c751a701dec84c1b15c946ab0a68b1b4cf0620468eb3a1df77a918284007a0fde1aaa6a9767d0baed57936612813ef583df51c35e SHA512 6ef2426c0bee46bdf8e2fa5cb159d5ae19f0bed4f7c9bea9b33e0dd922b568c3c68ca063dcbcd7ea6904aaea31877c10064ea10b4bc63fb40d9f31778e3a7891

diff --git a/dev-db/mysql/mysql-8.0.27.ebuild b/dev-db/mysql/mysql-8.0.27.ebuild
index 88957adeb167..2f17c0db2513 100644
--- a/dev-db/mysql/mysql-8.0.27.ebuild
+++ b/dev-db/mysql/mysql-8.0.27.ebuild
@@ -12,12 +12,12 @@ MY_PV="${PV//_pre*}"
 MY_P="${PN}-${MY_PV}"
 
 # Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.27-patches-02.tar.xz"
+PATCH_SET=( https://dev.gentoo.org/~{whissi,dlan}/dist/mysql/${PN}-8.0.27-patches-03.tar.xz )
 
 SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
 	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
 	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
-	${PATCH_SET}"
+	${PATCH_SET[@]}"
 
 HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-05-15  1:00 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-05-15  1:00 UTC (permalink / raw
  To: gentoo-commits

commit:     a869c04a831adce59d1162bbd87d1755e2faba12
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May  7 06:54:25 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 15 01:00:11 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a869c04a

dev-db/mysql: egrep -> grep -E

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.36-r1.ebuild | 2 +-
 dev-db/mysql/mysql-8.0.27.ebuild    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.36-r1.ebuild b/dev-db/mysql/mysql-5.7.36-r1.ebuild
index ecda1ce67a3d..ee5bc3f04468 100644
--- a/dev-db/mysql/mysql-5.7.36-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.36-r1.ebuild
@@ -1147,7 +1147,7 @@ pkg_config() {
 		log-slave-updates \
 	; do
 		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+		grep -E -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
 	done
 
 	# Prepare timezones, see

diff --git a/dev-db/mysql/mysql-8.0.27.ebuild b/dev-db/mysql/mysql-8.0.27.ebuild
index a6a52bcee87b..d59053a50265 100644
--- a/dev-db/mysql/mysql-8.0.27.ebuild
+++ b/dev-db/mysql/mysql-8.0.27.ebuild
@@ -1084,7 +1084,7 @@ pkg_config() {
 		log-slave-updates \
 	; do
 		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+		grep -E -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
 	done
 
 	# Prepare timezones, see


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-03-09 15:55 David Seifert
  0 siblings, 0 replies; 393+ messages in thread
From: David Seifert @ 2022-03-09 15:55 UTC (permalink / raw
  To: gentoo-commits

commit:     435ce6a3c3f7b090e3328d56653b5131f9376d89
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  9 15:55:05 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Mar  9 15:55:05 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=435ce6a3

dev-db/mysql: drop 5.7.32, 5.7.33, 5.7.34, 5.7.34-r1, 5.7.35

Closes: https://github.com/gentoo/gentoo/pull/24462
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-db/mysql/Manifest               |    9 -
 dev-db/mysql/mysql-5.7.32.ebuild    | 1230 ---------------------------------
 dev-db/mysql/mysql-5.7.33.ebuild    | 1236 ---------------------------------
 dev-db/mysql/mysql-5.7.34-r1.ebuild | 1262 ----------------------------------
 dev-db/mysql/mysql-5.7.34.ebuild    | 1239 ---------------------------------
 dev-db/mysql/mysql-5.7.35.ebuild    | 1293 -----------------------------------
 6 files changed, 6269 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 4d99d89cbd95..142174a9a37a 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,13 +1,4 @@
-DIST mysql-5.7.32-patches-01.tar.xz 6660 BLAKE2B 5c63158615398bdcc4480a0e1b058f491b39ffc7ee33767b425f3b254555411031f64d865e1924afe8aa3926e4cba18049f1219a0a8acc702bc5e011c94fa947 SHA512 bf5e0d27af81e599005268ee243af4cd93f6df95c32cccb268a749322b4e5f73a2ce5d51f0ad1b0e1f2cf4702b8a05e4b2e0b73110fd4aac61f2a0f51bf4952e
-DIST mysql-5.7.33-patches-01.tar.xz 6672 BLAKE2B cfa410f9ba5a4ba7e43923e7b5940c2dc6a9356b49230ebaea24bd7eef8a9639fc746e917c22241e19c830b81252e95f38e2c9d6054494de700bae46011fb2f4 SHA512 b16bb9531c44f1c5ec9c08aee6c1f5f5d2e3fe59a0039a54f6c050660a18f7c78b955e7eea7bef4e7dccfcdaa81464e0d8e47ac7d0e40ecb90187865a8a0412e
-DIST mysql-5.7.34-patches-01.tar.xz 6676 BLAKE2B b925880bfbb991fcba81964ff658a2ecab38da637a6093270a724ab8e405ab092d5fb9684f53f44d001e34287366df234b841d9ebcae62d49becdb93a3c3e324 SHA512 80a89f4b4a7ecc04f3115c6aaa0b0013e38c2813fa6dea095e826ef3944298715a48e0deacb691d23526b1524b207c83176290faea2461d3fcd94edabe3d8943
-DIST mysql-5.7.34-patches-02.tar.xz 6408 BLAKE2B fdb36247832b6282af94ce2f61b5dd77f6b45f9efca4b438ecd5fed8d810d9d51547d0ae3de085e7f5dcc8795b4bc4f1210902495b92859e1d5aec3048256ef3 SHA512 f0513eb7f0c9e415aa972a53af668939934ea4f4fa438f468f32a46ccc2aa3b84ba8edd999e4786256ada34851ad64c81e9dd0e36c2a21da641987dfd18635c3
-DIST mysql-5.7.35-patches-01.tar.xz 6408 BLAKE2B ddead9d6f5570f23433ffaef0188a8e93c0220b3d59ae24b870927e9e5908619f357725c1ab2d16905f39dd9d5f6cd23d3aabf6a1df2abdc865683f603912b8f SHA512 6374536299c691fd12a3f8b7cd27291e6f3b0b6d159284b2866caaed6a7f124439c16e659e6da5aae9e72d613de2a1e1b80066c961e122e90ad644e9a32633cc
 DIST mysql-5.7.36-patches-01.tar.xz 6396 BLAKE2B ed9783f207d40fc220992c4193bdd8e96523f69414daa756f1f30306c1aedff9e96216ba2294a4c41eefbaf39c8bb37784bf1e7cce656c93f829c9cf0682fa6d SHA512 b0fbd41ebb2d32067e6c81707dffa91fece2d368f4b2fa47951492936509972d425b64d7613748c42b31cf9ba9dab697efeff70debe7268855a90d322d3f3158
 DIST mysql-8.0.27-patches-02.tar.xz 7204 BLAKE2B 1a3548f8b48b63a1d38cd9826f8ed2daf3d396276e8887e0a02a73fb91e544e1d0f1da9560351f03d3345d2ea5e8f61e5a9df2bce80558143bd3bc2558372232 SHA512 86c660d67d883fb84e6a38c39994bc30669c18b1d5bdedf908f112c7ebb59f0acf23903e6a81f01de1e6862a8cb779c7b537659ff18b090306eacf668dea47f8
-DIST mysql-boost-5.7.32.tar.gz 52882168 BLAKE2B dd112fa1d8bd29d86fba076675b5b7c9c98b6fb876aed45a00e8a25be716102fc9aa688b7170bef07b1c9f9751737277774d8fb2c64c21e181ecae58f89b4a8a SHA512 33a617d040efd065ea1c2ad84be537f851480abd5cc8a6879b7f170bc4e6db9432bd03f2a6bc680b71f17839c508cab0e7ef1a3aba032197da1b7943c916c77a
-DIST mysql-boost-5.7.33.tar.gz 52912380 BLAKE2B bca09314ae73932f6095799faa016998e65655cf5ea74d5596dcdc785e77014fe0b29a6c123e8618771f4a20a19978df00f7b79eea329aeb4b536ae71a4bef94 SHA512 1d1e1e5934fb17ff731fea45b88d4af6a394c2fbf0177a87803b18cb0eb4fb8d4939f82fc22b6cbc2af64022a44e206cd23e2e88ce11cc119c3ea22129d54e7a
-DIST mysql-boost-5.7.34.tar.gz 52891142 BLAKE2B 986fe106d73495ea9acb837f699ef2b1ffd123d9728b61da42f990d670569f1f7c12dc0a8611c3a7b6e3ed7be9fc277e1a977fa6c6d06f7d156a2f492951d9c7 SHA512 4eab7e90477b75643df743d806d5abcfb56572a2aa003a354980287c9148209f4fb7f0158ba969fb0462c32e49fcb4cf2a79f0330ab1bd2b243725dbf6f31d6d
-DIST mysql-boost-5.7.35.tar.gz 52959014 BLAKE2B 02cbc2201176773516479636ab40828a98bbc6bc1e90060e36d36af5c20a84b4b415d6e467328890ecff044834c81458fff8b717fd8942196dcf35e0ae85f298 SHA512 2469c8e13a236aee327bc0828804ba189e3abf78b6e0b3ef65b2343210f9c0cd5313d18b57ae3b76ca1487dc1d70854c8a12e6da61a6fffbce95854dcc792482
 DIST mysql-boost-5.7.36.tar.gz 52968383 BLAKE2B 4d5e4fcf8d56f4a1d1d54ee889d432ee3265f55ff9c0ecf6fe216e67790a49ed052b94457680daef4cb42df29f14db7b0e678e0f0443c20b7e2324c772c24313 SHA512 a95580efd5b87776ee7f1aae9b50d50d88c70a48c16e7a2d8c6ada0b1cadc5ec6074a859291a65caa1b50a00e08a9e350df342bb0c6ef74edaf21055331c081b
 DIST mysql-boost-8.0.27.tar.gz 292184025 BLAKE2B 177209f3c62b0326ca9d021c751a701dec84c1b15c946ab0a68b1b4cf0620468eb3a1df77a918284007a0fde1aaa6a9767d0baed57936612813ef583df51c35e SHA512 6ef2426c0bee46bdf8e2fa5cb159d5ae19f0bed4f7c9bea9b33e0dd922b568c3c68ca063dcbcd7ea6904aaea31877c10064ea10b4bc63fb40d9f31778e3a7891

diff --git a/dev-db/mysql/mysql-5.7.32.ebuild b/dev-db/mysql/mysql-5.7.32.ebuild
deleted file mode 100644
index 613c2cbc0a55..000000000000
--- a/dev-db/mysql/mysql-5.7.32.ebuild
+++ /dev/null
@@ -1,1230 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs multilib-minimal
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.32-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="
-	sys-libs/ncurses:0=
-	client-libs? (
-		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
-		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
-	)
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-		>=dev-libs/openssl-1.0.0:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=[ssl]
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	virtual/yacc
-	server? (
-		dev-libs/libevent:=[ssl]
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:8.0
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? (
-		!prefix? (
-			acct-group/mysql acct-user/mysql
-			dev-db/mysql-init-scripts
-		)
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="3G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="3G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/extra/libevent \
-		"${S}"/zlib \
-		|| die
-
-	# Don't clash with dev-db/mysql-connector-c
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in \
-		auth_sec.keyring_udf \
-		innodb.import_compress_encrypt \
-	; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
-	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in \
-		main.xa_prepared_binlog_off \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_non_direct_stm_mixing_engines \
-	; do
-		_disable_test "$t" "Unstable test"
-	done
-
-	for t in \
-		gis.geometry_class_attri_prop \
-		gis.geometry_property_function_issimple \
-		gis.gis_bugs_crashes \
-		gis.spatial_op_testingfunc_mix \
-		gis.spatial_analysis_functions_buffer \
-		gis.spatial_analysis_functions_distance \
-		gis.spatial_utility_function_distance_sphere \
-		gis.spatial_utility_function_simplify \
-		gis.spatial_analysis_functions_centroid \
-		main.with_recursive \
-	; do
-		_disable_test "$t" "Known rounding error with latest AMD processors"
-	done
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
-	fi
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	if has_version '>=dev-libs/openssl-1.1.1' ; then
-		# Tests are expecting <openssl-1.1.1 default cipher
-		for t in \
-			auth_sec.cert_verify \
-			auth_sec.mysql_ssl_connection \
-			auth_sec.openssl_cert_generation \
-			auth_sec.ssl_auto_detect \
-			auth_sec.ssl_mode \
-			auth_sec.tls \
-			binlog.binlog_grant_alter_user \
-			encryption.innodb_onlinealter_encryption \
-			main.grant_alter_user_qa \
-			main.grant_user_lock_qa \
-			main.mysql_ssl_default \
-			main.openssl_1 \
-			main.plugin_auth_sha256_tls \
-			main.ssl \
-			main.ssl_8k_key \
-			main.ssl_bug75311 \
-			main.ssl_ca \
-			main.ssl_cipher \
-			main.ssl_compress \
-			main.ssl_crl \
-			main.ssl_ecdh \
-			main.ssl_verify_identity \
-			x.connection_tls_version \
-			x.connection_openssl \
-		; do
-			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-	cmake_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}

diff --git a/dev-db/mysql/mysql-5.7.33.ebuild b/dev-db/mysql/mysql-5.7.33.ebuild
deleted file mode 100644
index 6a24a16ccfe2..000000000000
--- a/dev-db/mysql/mysql-5.7.33.ebuild
+++ /dev/null
@@ -1,1236 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs multilib-minimal
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.33-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="
-	sys-libs/ncurses:0=
-	client-libs? (
-		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
-		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
-	)
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-		>=dev-libs/openssl-1.0.0:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=[ssl]
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	virtual/yacc
-	server? (
-		dev-libs/libevent:=[ssl]
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:8.0
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? (
-		!prefix? (
-			acct-group/mysql acct-user/mysql
-			dev-db/mysql-init-scripts
-		)
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="3G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="3G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/extra/libevent \
-		"${S}"/zlib \
-		|| die
-
-	# Don't clash with dev-db/mysql-connector-c
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in \
-		auth_sec.keyring_udf \
-		innodb.import_compress_encrypt \
-		perfschema.privilege_table_io \
-	; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
-	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in \
-		main.xa_prepared_binlog_off \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_non_direct_stm_mixing_engines \
-	; do
-		_disable_test "$t" "Unstable test"
-	done
-
-	for t in \
-		gis.geometry_class_attri_prop \
-		gis.geometry_property_function_issimple \
-		gis.gis_bugs_crashes \
-		gis.spatial_op_testingfunc_mix \
-		gis.spatial_analysis_functions_buffer \
-		gis.spatial_analysis_functions_distance \
-		gis.spatial_utility_function_distance_sphere \
-		gis.spatial_utility_function_simplify \
-		gis.spatial_analysis_functions_centroid \
-		main.with_recursive \
-	; do
-		_disable_test "$t" "Known rounding error with latest AMD processors"
-	done
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
-	fi
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.mysqldump_bugs \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	if has_version '>=dev-libs/openssl-1.1.1' ; then
-		# Tests are expecting <openssl-1.1.1 default cipher
-		for t in \
-			auth_sec.cert_verify \
-			auth_sec.mysql_ssl_connection \
-			auth_sec.openssl_cert_generation \
-			auth_sec.ssl_auto_detect \
-			auth_sec.ssl_mode \
-			auth_sec.tls \
-			binlog.binlog_grant_alter_user \
-			encryption.innodb_onlinealter_encryption \
-			main.grant_alter_user_qa \
-			main.grant_user_lock_qa \
-			main.mysql_ssl_default \
-			main.openssl_1 \
-			main.plugin_auth_sha256 \
-			main.plugin_auth_sha256_2 \
-			main.plugin_auth_sha256_server_default \
-			main.plugin_auth_sha256_server_default_tls \
-			main.plugin_auth_sha256_tls \
-			main.ssl \
-			main.ssl_8k_key \
-			main.ssl_bug75311 \
-			main.ssl_ca \
-			main.ssl_cipher \
-			main.ssl_compress \
-			main.ssl_crl \
-			main.ssl_ecdh \
-			main.ssl_verify_identity \
-			x.connection_tls_version \
-			x.connection_openssl \
-		; do
-			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-	cmake_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}

diff --git a/dev-db/mysql/mysql-5.7.34-r1.ebuild b/dev-db/mysql/mysql-5.7.34-r1.ebuild
deleted file mode 100644
index 239a883dba68..000000000000
--- a/dev-db/mysql/mysql-5.7.34-r1.ebuild
+++ /dev/null
@@ -1,1262 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs multilib-minimal
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.34-patches-02.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="
-	sys-libs/ncurses:0=
-	client-libs? (
-		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
-		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
-	)
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-		>=dev-libs/openssl-1.0.0:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=[ssl]
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-"
-
-DEPEND="
-	${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	virtual/yacc
-	server? (
-		dev-libs/libevent:=[ssl]
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-
-RDEPEND="
-	${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:8.0
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? (
-		!prefix? (
-			acct-group/mysql acct-user/mysql
-			dev-db/mysql-init-scripts
-		)
-	)
-"
-
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="3G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="3G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/extra/libevent \
-		"${S}"/zlib \
-		|| die
-
-	# Don't clash with dev-db/mysql-connector-c
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# code is not C++17 ready, bug #786402
-	append-cxxflags -std=c++14
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# >=dev-libs/openssl-3 defaults to security level 1 which disallow
-	# TLSv1/1.1 but tests will require TLSv1/1.1.
-	einfo "Set OpenSSL configuration for test suite ..."
-	cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
-	openssl_conf = default_conf
-
-	[default_conf]
-	ssl_conf = ssl_sect
-
-	[ssl_sect]
-	system_default = system_default_sect
-
-	[system_default_sect]
-	CipherString = DEFAULT@SECLEVEL=0
-	EOF
-
-	local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in \
-		auth_sec.keyring_udf \
-		innodb.import_compress_encrypt \
-		perfschema.privilege_table_io \
-	; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
-	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in \
-		main.xa_prepared_binlog_off \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_non_direct_stm_mixing_engines \
-	; do
-		_disable_test "$t" "Unstable test"
-	done
-
-	for t in \
-		gis.geometry_class_attri_prop \
-		gis.geometry_property_function_issimple \
-		gis.gis_bugs_crashes \
-		gis.spatial_op_testingfunc_mix \
-		gis.spatial_analysis_functions_buffer \
-		gis.spatial_analysis_functions_distance \
-		gis.spatial_utility_function_distance_sphere \
-		gis.spatial_utility_function_simplify \
-		gis.spatial_analysis_functions_centroid \
-		main.with_recursive \
-	; do
-		_disable_test "$t" "Known rounding error with latest AMD processors"
-	done
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
-	fi
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.mysqldump_bugs \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	if has_version '>=dev-libs/openssl-1.1.1' ; then
-		# Tests are expecting <openssl-1.1.1 default cipher
-		for t in \
-			auth_sec.cert_verify \
-			auth_sec.mysql_ssl_connection \
-			auth_sec.openssl_cert_generation \
-			auth_sec.ssl_auto_detect \
-			auth_sec.ssl_mode \
-			auth_sec.tls \
-			binlog.binlog_grant_alter_user \
-			encryption.innodb_onlinealter_encryption \
-			main.grant_alter_user_qa \
-			main.grant_user_lock_qa \
-			main.mysql_ssl_default \
-			main.openssl_1 \
-			main.plugin_auth_sha256 \
-			main.plugin_auth_sha256_2 \
-			main.plugin_auth_sha256_server_default \
-			main.plugin_auth_sha256_server_default_tls \
-			main.plugin_auth_sha256_tls \
-			main.ssl \
-			main.ssl_8k_key \
-			main.ssl_bug75311 \
-			main.ssl_ca \
-			main.ssl_cipher \
-			main.ssl_compress \
-			main.ssl_crl \
-			main.ssl_ecdh \
-			main.ssl_verify_identity \
-			x.connection_tls_version \
-			x.connection_openssl \
-		; do
-			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-	cmake_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}

diff --git a/dev-db/mysql/mysql-5.7.34.ebuild b/dev-db/mysql/mysql-5.7.34.ebuild
deleted file mode 100644
index 74040f453b7d..000000000000
--- a/dev-db/mysql/mysql-5.7.34.ebuild
+++ /dev/null
@@ -1,1239 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs multilib-minimal
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.34-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="
-	sys-libs/ncurses:0=
-	client-libs? (
-		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
-		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
-	)
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-		>=dev-libs/openssl-1.0.0:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=[ssl]
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	virtual/yacc
-	server? (
-		dev-libs/libevent:=[ssl]
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:8.0
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? (
-		!prefix? (
-			acct-group/mysql acct-user/mysql
-			dev-db/mysql-init-scripts
-		)
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="3G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="3G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/extra/libevent \
-		"${S}"/zlib \
-		|| die
-
-	# Don't clash with dev-db/mysql-connector-c
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# code is not C++17 ready, bug #786402
-	append-cxxflags -std=c++14
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in \
-		auth_sec.keyring_udf \
-		innodb.import_compress_encrypt \
-		perfschema.privilege_table_io \
-	; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
-	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in \
-		main.xa_prepared_binlog_off \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_non_direct_stm_mixing_engines \
-	; do
-		_disable_test "$t" "Unstable test"
-	done
-
-	for t in \
-		gis.geometry_class_attri_prop \
-		gis.geometry_property_function_issimple \
-		gis.gis_bugs_crashes \
-		gis.spatial_op_testingfunc_mix \
-		gis.spatial_analysis_functions_buffer \
-		gis.spatial_analysis_functions_distance \
-		gis.spatial_utility_function_distance_sphere \
-		gis.spatial_utility_function_simplify \
-		gis.spatial_analysis_functions_centroid \
-		main.with_recursive \
-	; do
-		_disable_test "$t" "Known rounding error with latest AMD processors"
-	done
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
-	fi
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.mysqldump_bugs \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	if has_version '>=dev-libs/openssl-1.1.1' ; then
-		# Tests are expecting <openssl-1.1.1 default cipher
-		for t in \
-			auth_sec.cert_verify \
-			auth_sec.mysql_ssl_connection \
-			auth_sec.openssl_cert_generation \
-			auth_sec.ssl_auto_detect \
-			auth_sec.ssl_mode \
-			auth_sec.tls \
-			binlog.binlog_grant_alter_user \
-			encryption.innodb_onlinealter_encryption \
-			main.grant_alter_user_qa \
-			main.grant_user_lock_qa \
-			main.mysql_ssl_default \
-			main.openssl_1 \
-			main.plugin_auth_sha256 \
-			main.plugin_auth_sha256_2 \
-			main.plugin_auth_sha256_server_default \
-			main.plugin_auth_sha256_server_default_tls \
-			main.plugin_auth_sha256_tls \
-			main.ssl \
-			main.ssl_8k_key \
-			main.ssl_bug75311 \
-			main.ssl_ca \
-			main.ssl_cipher \
-			main.ssl_compress \
-			main.ssl_crl \
-			main.ssl_ecdh \
-			main.ssl_verify_identity \
-			x.connection_tls_version \
-			x.connection_openssl \
-		; do
-			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-	cmake_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}

diff --git a/dev-db/mysql/mysql-5.7.35.ebuild b/dev-db/mysql/mysql-5.7.35.ebuild
deleted file mode 100644
index 6415ac60efcc..000000000000
--- a/dev-db/mysql/mysql-5.7.35.ebuild
+++ /dev/null
@@ -1,1293 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs multilib-minimal
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.35-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="
-	sys-libs/ncurses:0=
-	client-libs? (
-		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
-		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
-	)
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-		>=dev-libs/openssl-1.0.0:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=[ssl]
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-"
-
-DEPEND="
-	${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	virtual/yacc
-	server? (
-		dev-libs/libevent:=[ssl]
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-
-RDEPEND="
-	${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:8.0
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? (
-		!prefix? (
-			acct-group/mysql acct-user/mysql
-			dev-db/mysql-init-scripts
-		)
-	)
-"
-
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="3G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="3G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/extra/libevent \
-		"${S}"/zlib \
-		|| die
-
-	# Don't clash with dev-db/mysql-connector-c
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# code is not C++17 ready, bug #786402
-	append-cxxflags -std=c++14
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in \
-		auth_sec.keyring_udf \
-		innodb.alter_kill \
-		innodb.innodb-multiple-tablespaces \
-		innodb.import_compress_encrypt \
-		perfschema.privilege_table_io \
-	; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
-	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in \
-		main.xa_prepared_binlog_off \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_non_direct_stm_mixing_engines \
-	; do
-		_disable_test "$t" "Unstable test"
-	done
-
-	for t in \
-		gis.geometry_class_attri_prop \
-		gis.geometry_property_function_issimple \
-		gis.gis_bugs_crashes \
-		gis.spatial_op_testingfunc_mix \
-		gis.spatial_analysis_functions_buffer \
-		gis.spatial_analysis_functions_distance \
-		gis.spatial_utility_function_distance_sphere \
-		gis.spatial_utility_function_simplify \
-		gis.spatial_analysis_functions_centroid \
-		main.with_recursive \
-	; do
-		_disable_test "$t" "Known rounding error with latest AMD processors"
-	done
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
-	fi
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.mysqldump_bugs \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	if has_version ">=dev-libs/openssl-3" ; then
-		# >=dev-libs/openssl-3 defaults to security level 1 which disallow
-		# TLSv1/1.1 but tests will require TLSv1/1.1.
-		einfo "Set OpenSSL configuration for test suite ..."
-		cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
-		openssl_conf = default_conf
-
-		[ req ]
-		default_bits			= 2048
-		default_keyfile 		= privkey.pem
-		distinguished_name		= req_distinguished_name
-
-		[ req_distinguished_name ]
-		countryName			= Country Name (2 letter code)
-		countryName_default		= AU
-		countryName_min			= 2
-		countryName_max			= 2
-
-		stateOrProvinceName		= State or Province Name (full name)
-		stateOrProvinceName_default	= Some-State
-
-		localityName			= Locality Name (eg, city)
-
-		0.organizationName		= Organization Name (eg, company)
-		0.organizationName_default	= Internet Widgits Pty Ltd
-
-		organizationalUnitName		= Organizational Unit Name (eg, section)
-
-		commonName			= Common Name (e.g. server FQDN or YOUR name)
-		commonName_max			= 64
-
-		emailAddress			= Email Address
-		emailAddress_max		= 64
-
-		[default_conf]
-		ssl_conf = ssl_sect
-
-		[ssl_sect]
-		system_default = system_default_sect
-
-		[system_default_sect]
-		CipherString = DEFAULT@SECLEVEL=0
-		EOF
-
-		local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
-	fi
-
-	if has_version '>=dev-libs/openssl-1.1.1' ; then
-		# Tests are expecting <openssl-1.1.1 default cipher
-		for t in \
-			auth_sec.cert_verify \
-			auth_sec.mysql_ssl_connection \
-			auth_sec.openssl_cert_generation \
-			auth_sec.ssl_auto_detect \
-			auth_sec.ssl_mode \
-			auth_sec.tls \
-			binlog.binlog_grant_alter_user \
-			encryption.innodb_onlinealter_encryption \
-			main.grant_alter_user_qa \
-			main.grant_user_lock_qa \
-			main.mysql_ssl_default \
-			main.openssl_1 \
-			main.plugin_auth_sha256 \
-			main.plugin_auth_sha256_2 \
-			main.plugin_auth_sha256_server_default \
-			main.plugin_auth_sha256_server_default_tls \
-			main.plugin_auth_sha256_tls \
-			main.ssl \
-			main.ssl_8k_key \
-			main.ssl_bug75311 \
-			main.ssl_ca \
-			main.ssl_cipher \
-			main.ssl_compress \
-			main.ssl_crl \
-			main.ssl_ecdh \
-			main.ssl_verify_identity \
-			x.connection_tls_version \
-			x.connection_openssl \
-		; do
-			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-	cmake_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-03-03 21:22 David Seifert
  0 siblings, 0 replies; 393+ messages in thread
From: David Seifert @ 2022-03-03 21:22 UTC (permalink / raw
  To: gentoo-commits

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

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

Closes: https://github.com/gentoo/gentoo/pull/24381
Bug: https://bugs.gentoo.org/822258
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-db/mysql/Manifest               |    9 -
 dev-db/mysql/mysql-8.0.22.ebuild    | 1156 ---------------------------------
 dev-db/mysql/mysql-8.0.23.ebuild    | 1158 ---------------------------------
 dev-db/mysql/mysql-8.0.25-r1.ebuild | 1193 ----------------------------------
 dev-db/mysql/mysql-8.0.25.ebuild    | 1164 ---------------------------------
 dev-db/mysql/mysql-8.0.26.ebuild    | 1227 -----------------------------------
 6 files changed, 5907 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index e922b317d818..4d99d89cbd95 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -4,19 +4,10 @@ DIST mysql-5.7.34-patches-01.tar.xz 6676 BLAKE2B b925880bfbb991fcba81964ff658a2e
 DIST mysql-5.7.34-patches-02.tar.xz 6408 BLAKE2B fdb36247832b6282af94ce2f61b5dd77f6b45f9efca4b438ecd5fed8d810d9d51547d0ae3de085e7f5dcc8795b4bc4f1210902495b92859e1d5aec3048256ef3 SHA512 f0513eb7f0c9e415aa972a53af668939934ea4f4fa438f468f32a46ccc2aa3b84ba8edd999e4786256ada34851ad64c81e9dd0e36c2a21da641987dfd18635c3
 DIST mysql-5.7.35-patches-01.tar.xz 6408 BLAKE2B ddead9d6f5570f23433ffaef0188a8e93c0220b3d59ae24b870927e9e5908619f357725c1ab2d16905f39dd9d5f6cd23d3aabf6a1df2abdc865683f603912b8f SHA512 6374536299c691fd12a3f8b7cd27291e6f3b0b6d159284b2866caaed6a7f124439c16e659e6da5aae9e72d613de2a1e1b80066c961e122e90ad644e9a32633cc
 DIST mysql-5.7.36-patches-01.tar.xz 6396 BLAKE2B ed9783f207d40fc220992c4193bdd8e96523f69414daa756f1f30306c1aedff9e96216ba2294a4c41eefbaf39c8bb37784bf1e7cce656c93f829c9cf0682fa6d SHA512 b0fbd41ebb2d32067e6c81707dffa91fece2d368f4b2fa47951492936509972d425b64d7613748c42b31cf9ba9dab697efeff70debe7268855a90d322d3f3158
-DIST mysql-8.0.22-patches-02.tar.xz 7580 BLAKE2B a50704c3c58b1f67ca86edb233544137927b0ae5fdf302687b48f6fd30fbbd26798e8ef8282662586b25a7240b47278b44f944a8ca59f1a198bc228dd74459c9 SHA512 59f864452e9fdebe4d3990eff8b756e9bbfad58da216b74fa8b7e8391cb0d9d543ca2828591b9ed1ee276c1dec9e1851a8c2683507f0a326c85054e31cc3f950
-DIST mysql-8.0.23-patches-01.tar.xz 7568 BLAKE2B 222120dcb5556457f382eefbb10f66f46fe1673c64730c8c8a5566942031bc98bab1f1182f747e79e23fccfb6b09197d5c2874aa2087104b6f1eaa25ea9fd60c SHA512 54222c420d57c1b206d920f22738746925ed1e0d78683f01c97cac5bd1d3450f70f784a7f603304b8595fb58120e691f94e28fa1d1884a7cc8bea1d7b177470f
-DIST mysql-8.0.25-patches-01.tar.xz 3604 BLAKE2B 09cccab204c30d16bdc374bcd01d4a8e6298955f86f479b8e287aab74fb6bd9857547e360be725dfc66acb56e1bb5665277d340761d0110a8823763ad4d2d1f4 SHA512 6d90a34a20e9cbc7e7a9b5b63a1408f33ac8523f2be6c9ab6d9ad7589c3ded83c87e460d782d4d8c33f11b337151fd8db994099e371260ecf204933e844eb50e
-DIST mysql-8.0.25-patches-02.tar.xz 6456 BLAKE2B c9c1020a505ebcee836f8dc3bbe540ff924a0174daf36c37b852df267a81919d37581d1c9be037d52cdcd34c27c5c34d3f0af6160857b22d8ab4d8ece37798e0 SHA512 3c3726b397f3a6fb1d84396bb571b4903a167c9a47273b9d5996949e1d3febc96d3528bfa8dfaeea073a245051ae10c983f2ad258268babc91649563ce3cfc00
-DIST mysql-8.0.26-patches-01.tar.xz 6980 BLAKE2B 5fc86125b622ac978dc7ec3d6954a1d366315a57b6f56ca8dade9ad4a255b4b793ad33736404b29ab2db12f726897f014aeec9232dc52954087e7533d0f593d2 SHA512 00e6478716cf857b8ab768ec481dc1e7d809db17a9d899a52822f61dcc18797e87c0eecfafb1bb9065895c1b261c03c87fe0593b59dc86fb40853b0c660c9bfb
 DIST mysql-8.0.27-patches-02.tar.xz 7204 BLAKE2B 1a3548f8b48b63a1d38cd9826f8ed2daf3d396276e8887e0a02a73fb91e544e1d0f1da9560351f03d3345d2ea5e8f61e5a9df2bce80558143bd3bc2558372232 SHA512 86c660d67d883fb84e6a38c39994bc30669c18b1d5bdedf908f112c7ebb59f0acf23903e6a81f01de1e6862a8cb779c7b537659ff18b090306eacf668dea47f8
 DIST mysql-boost-5.7.32.tar.gz 52882168 BLAKE2B dd112fa1d8bd29d86fba076675b5b7c9c98b6fb876aed45a00e8a25be716102fc9aa688b7170bef07b1c9f9751737277774d8fb2c64c21e181ecae58f89b4a8a SHA512 33a617d040efd065ea1c2ad84be537f851480abd5cc8a6879b7f170bc4e6db9432bd03f2a6bc680b71f17839c508cab0e7ef1a3aba032197da1b7943c916c77a
 DIST mysql-boost-5.7.33.tar.gz 52912380 BLAKE2B bca09314ae73932f6095799faa016998e65655cf5ea74d5596dcdc785e77014fe0b29a6c123e8618771f4a20a19978df00f7b79eea329aeb4b536ae71a4bef94 SHA512 1d1e1e5934fb17ff731fea45b88d4af6a394c2fbf0177a87803b18cb0eb4fb8d4939f82fc22b6cbc2af64022a44e206cd23e2e88ce11cc119c3ea22129d54e7a
 DIST mysql-boost-5.7.34.tar.gz 52891142 BLAKE2B 986fe106d73495ea9acb837f699ef2b1ffd123d9728b61da42f990d670569f1f7c12dc0a8611c3a7b6e3ed7be9fc277e1a977fa6c6d06f7d156a2f492951d9c7 SHA512 4eab7e90477b75643df743d806d5abcfb56572a2aa003a354980287c9148209f4fb7f0158ba969fb0462c32e49fcb4cf2a79f0330ab1bd2b243725dbf6f31d6d
 DIST mysql-boost-5.7.35.tar.gz 52959014 BLAKE2B 02cbc2201176773516479636ab40828a98bbc6bc1e90060e36d36af5c20a84b4b415d6e467328890ecff044834c81458fff8b717fd8942196dcf35e0ae85f298 SHA512 2469c8e13a236aee327bc0828804ba189e3abf78b6e0b3ef65b2343210f9c0cd5313d18b57ae3b76ca1487dc1d70854c8a12e6da61a6fffbce95854dcc792482
 DIST mysql-boost-5.7.36.tar.gz 52968383 BLAKE2B 4d5e4fcf8d56f4a1d1d54ee889d432ee3265f55ff9c0ecf6fe216e67790a49ed052b94457680daef4cb42df29f14db7b0e678e0f0443c20b7e2324c772c24313 SHA512 a95580efd5b87776ee7f1aae9b50d50d88c70a48c16e7a2d8c6ada0b1cadc5ec6074a859291a65caa1b50a00e08a9e350df342bb0c6ef74edaf21055331c081b
-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/mysql-8.0.22.ebuild b/dev-db/mysql/mysql-8.0.22.ebuild
deleted file mode 100644
index 7ba23d865dfb..000000000000
--- a/dev-db/mysql/mysql-8.0.22.ebuild
+++ /dev/null
@@ -1,1156 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs
-
-MY_PV="${PV//_pre*}"
-MY_P="${PN}-${MY_PV}"
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.22-patches-02.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
-	router selinux +server tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )
-	cjk? ( server )
-	jemalloc? ( server )
-	numa? ( server )
-	profiling? ( server )
-	router? ( server )
-	tcmalloc? ( server )"
-
-# -ppc, -riscv for bug #761715
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	>=app-arch/lz4-0_p131:=
-	app-arch/zstd:=
-	sys-libs/ncurses:0=
-	>=sys-libs/zlib-1.2.3:0=
-	>=dev-libs/openssl-1.0.0:0=
-	server? (
-		dev-libs/icu:=
-		dev-libs/libevent:=[ssl,threads]
-		>=dev-libs/protobuf-3.8:=
-		net-libs/libtirpc:=
-		cjk? ( app-text/mecab:= )
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-		tcmalloc? ( dev-util/google-perftools:0= )
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	virtual/yacc
-	server? ( net-libs/rpcsvc-proto )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:5.7
-	selinux? ( sec-policy/selinux-mysql )
-	!prefix? (
-		acct-group/mysql acct-user/mysql
-		dev-db/mysql-init-scripts
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="2G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="2G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	# Avoid rpm call which would trigger sandbox, #692368
-	sed -i \
-		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
-		CMakeLists.txt || die
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove man pages for client-lib tools we don't install
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		# Using bundled editline to get CTRL+C working
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-		-DWITH_ROUTER=$(usex router ON OFF)
-	)
-
-	if is-flagq -fno-lto ; then
-		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
-		mycmakeargs+=( -DWITH_LTO=OFF )
-	elif is-flagq -flto ; then
-		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
-		myconf+=( -DWITH_LTO=ON )
-	else
-		# Disable automagic
-		myconf+=( -DWITH_LTO=OFF )
-	fi
-
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-
-	mycmakeargs+=(
-		-DWITH_ICU=system
-		-DWITH_LZ4=system
-		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
-		-DWITH_RAPIDJSON=bundled
-		-DWITH_ZSTD=system
-	)
-
-	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
-		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-		ewarn "You MUST file bugs without these variables set."
-		ewarn "Tests will probably fail!"
-
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-		)
-	elif use latin1 ; then
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=latin1
-			-DDEFAULT_COLLATION=latin1_swedish_ci
-		)
-	else
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=utf8mb4
-			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
-		)
-	fi
-
-	if use server ; then
-		mycmakeargs+=(
-			-DWITH_EXTRA_CHARSETS=all
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_LIBEVENT=system
-			-DWITH_PROTOBUF=system
-			-DWITH_NUMA=$(usex numa ON OFF)
-		)
-
-		if use jemalloc ; then
-			mycmakeargs+=( -DWITH_JEMALLOC=ON )
-		elif use tcmalloc ; then
-			mycmakeargs+=( -DWITH_TCMALLOC=ON )
-		fi
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_SYSTEMD=no
-		)
-	fi
-
-	cmake_src_configure
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='perl server' \
-# FEATURES='test userpriv' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname bug reason
-		rawtestname="${1}" ; shift
-		bug="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
-		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Run CTest (test-units)
-	cmake_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-
-	local -a disabled_tests
-	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
-	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure - no upstream bug yet" )
-	disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
-	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
-	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
-	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
-	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
-		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
-	fi
-
-	local test_infos_str test_infos_arr
-	for test_infos_str in "${disabled_tests[@]}" ; do
-		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
-		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
-			die "Invalid test data set, not matching format: ${test_infos_str}"
-		fi
-
-		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
-	done
-	unset test_infos_str test_infos_arr
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	cmake_src_install
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	mycnf_src="my.cnf-8.0.distro-server"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR}/${mycnf_src}" \
-		> "${TMPDIR}/my.cnf.ok" || die
-
-	if use prefix ; then
-		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8mb4|latin1|g" \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	eprefixify "${TMPDIR}/my.cnf.ok"
-
-	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-
-	if use router ; then
-		rm -rf \
-			"${ED}/usr/LICENSE.router" \
-			"${ED}/usr/README.router" \
-			"${ED}/usr/run" \
-			"${ED}/usr/var" \
-			|| die
-	fi
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	# NOTE: $MY_LOGDIR contains $EPREFIX by default
-	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-
-	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-		einfo
-		elog "You might want to run:"
-		elog "  \"emerge --config =${CATEGORY}/${PF}\""
-		elog "if this is a new install."
-		einfo
-	else
-		einfo
-		elog "Upgrade process for ${PN}-8.x has changed. Please read"
-		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
-		einfo
-	fi
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	local -a config_files
-
-	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
-	fi
-
-	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
-	fi
-
-	if [[ ${#config_files[@]} -gt 0 ]] ; then
-		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
-			local user_answer
-
-			echo
-			einfo "Please select default authentication plugin (enter number or plugin name):"
-			einfo "1) caching_sha2_password [MySQL 8.0 default]"
-			einfo "2) mysql_native_password [MySQL 5.7 default]"
-			einfo
-			einfo "For details see:"
-			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
-			read -p "    >" user_answer
-			echo
-
-			case "${user_answer}" in
-				1|caching_sha2_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
-					;;
-				2|mysql_native_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
-					;;
-				'')
-					die "No authentication plugin selected!"
-					;;
-				*)
-					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
-					;;
-			esac
-
-			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
-
-			unset user_answer
-		fi
-
-		local cfg_option cfg_option_tabs cfg_section
-		for config_file in "${config_files[@]}" ; do
-			cfg_option="default-authentication-plugin"
-			cfg_section="mysqld"
-			cfg_option_tabs="\t\t"
-			if [[ "${config_file}" == *client.cnf ]] ; then
-				cfg_option="default-auth"
-				cfg_section="client"
-				cfg_option_tabs="\t\t\t\t"
-			fi
-
-			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
-				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
-					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
-			else
-				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
-					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
-			fi
-		done
-		unset cfg_option cfg_option_tabs cfg_section
-	fi
-	unset config_files config_file
-
-	echo
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}

diff --git a/dev-db/mysql/mysql-8.0.23.ebuild b/dev-db/mysql/mysql-8.0.23.ebuild
deleted file mode 100644
index 2ad3f320946d..000000000000
--- a/dev-db/mysql/mysql-8.0.23.ebuild
+++ /dev/null
@@ -1,1158 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs
-
-MY_PV="${PV//_pre*}"
-MY_P="${PN}-${MY_PV}"
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.23-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
-	router selinux +server tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )
-	cjk? ( server )
-	jemalloc? ( server )
-	numa? ( server )
-	profiling? ( server )
-	router? ( server )
-	tcmalloc? ( server )"
-
-# -ppc, -riscv for bug #761715
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	>=app-arch/lz4-0_p131:=
-	app-arch/zstd:=
-	sys-libs/ncurses:0=
-	>=sys-libs/zlib-1.2.3:0=
-	>=dev-libs/openssl-1.0.0:0=
-	server? (
-		dev-libs/icu:=
-		dev-libs/libevent:=[ssl,threads]
-		>=dev-libs/protobuf-3.8:=
-		net-libs/libtirpc:=
-		cjk? ( app-text/mecab:= )
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-		tcmalloc? ( dev-util/google-perftools:0= )
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	virtual/yacc
-	server? ( net-libs/rpcsvc-proto )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:5.7
-	selinux? ( sec-policy/selinux-mysql )
-	!prefix? (
-		acct-group/mysql acct-user/mysql
-		dev-db/mysql-init-scripts
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="2G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="2G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	# Avoid rpm call which would trigger sandbox, #692368
-	sed -i \
-		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
-		CMakeLists.txt || die
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove man pages for client-lib tools we don't install
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		# Using bundled editline to get CTRL+C working
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-		-DWITH_ROUTER=$(usex router ON OFF)
-	)
-
-	if is-flagq -fno-lto ; then
-		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
-		mycmakeargs+=( -DWITH_LTO=OFF )
-	elif is-flagq -flto ; then
-		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
-		myconf+=( -DWITH_LTO=ON )
-	else
-		# Disable automagic
-		myconf+=( -DWITH_LTO=OFF )
-	fi
-
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-
-	mycmakeargs+=(
-		-DWITH_ICU=system
-		-DWITH_LZ4=system
-		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
-		-DWITH_RAPIDJSON=bundled
-		-DWITH_ZSTD=system
-	)
-
-	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
-		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-		ewarn "You MUST file bugs without these variables set."
-		ewarn "Tests will probably fail!"
-
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-		)
-	elif use latin1 ; then
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=latin1
-			-DDEFAULT_COLLATION=latin1_swedish_ci
-		)
-	else
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=utf8mb4
-			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
-		)
-	fi
-
-	if use server ; then
-		mycmakeargs+=(
-			-DWITH_EXTRA_CHARSETS=all
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_LIBEVENT=system
-			-DWITH_PROTOBUF=system
-			-DWITH_NUMA=$(usex numa ON OFF)
-		)
-
-		if use jemalloc ; then
-			mycmakeargs+=( -DWITH_JEMALLOC=ON )
-		elif use tcmalloc ; then
-			mycmakeargs+=( -DWITH_TCMALLOC=ON )
-		fi
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_SYSTEMD=no
-		)
-	fi
-
-	cmake_src_configure
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='perl server' \
-# FEATURES='test userpriv' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname bug reason
-		rawtestname="${1}" ; shift
-		bug="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
-		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Run CTest (test-units)
-	cmake_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-
-	local -a disabled_tests
-	disabled_tests+=( "auth_sec.atomic_rename_user;0;Depends on user running test" )
-	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
-	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "main.cast;0;Needs update for 2021" )
-	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure - no upstream bug yet" )
-	disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
-	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
-	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
-	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
-	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
-		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
-	fi
-
-	local test_infos_str test_infos_arr
-	for test_infos_str in "${disabled_tests[@]}" ; do
-		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
-		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
-			die "Invalid test data set, not matching format: ${test_infos_str}"
-		fi
-
-		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
-	done
-	unset test_infos_str test_infos_arr
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	cmake_src_install
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	mycnf_src="my.cnf-8.0.distro-server"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR}/${mycnf_src}" \
-		> "${TMPDIR}/my.cnf.ok" || die
-
-	if use prefix ; then
-		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8mb4|latin1|g" \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	eprefixify "${TMPDIR}/my.cnf.ok"
-
-	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-
-	if use router ; then
-		rm -rf \
-			"${ED}/usr/LICENSE.router" \
-			"${ED}/usr/README.router" \
-			"${ED}/usr/run" \
-			"${ED}/usr/var" \
-			|| die
-	fi
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	# NOTE: $MY_LOGDIR contains $EPREFIX by default
-	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-
-	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-		einfo
-		elog "You might want to run:"
-		elog "  \"emerge --config =${CATEGORY}/${PF}\""
-		elog "if this is a new install."
-		einfo
-	else
-		einfo
-		elog "Upgrade process for ${PN}-8.x has changed. Please read"
-		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
-		einfo
-	fi
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	local -a config_files
-
-	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
-	fi
-
-	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
-	fi
-
-	if [[ ${#config_files[@]} -gt 0 ]] ; then
-		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
-			local user_answer
-
-			echo
-			einfo "Please select default authentication plugin (enter number or plugin name):"
-			einfo "1) caching_sha2_password [MySQL 8.0 default]"
-			einfo "2) mysql_native_password [MySQL 5.7 default]"
-			einfo
-			einfo "For details see:"
-			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
-			read -p "    >" user_answer
-			echo
-
-			case "${user_answer}" in
-				1|caching_sha2_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
-					;;
-				2|mysql_native_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
-					;;
-				'')
-					die "No authentication plugin selected!"
-					;;
-				*)
-					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
-					;;
-			esac
-
-			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
-
-			unset user_answer
-		fi
-
-		local cfg_option cfg_option_tabs cfg_section
-		for config_file in "${config_files[@]}" ; do
-			cfg_option="default-authentication-plugin"
-			cfg_section="mysqld"
-			cfg_option_tabs="\t\t"
-			if [[ "${config_file}" == *client.cnf ]] ; then
-				cfg_option="default-auth"
-				cfg_section="client"
-				cfg_option_tabs="\t\t\t\t"
-			fi
-
-			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
-				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
-					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
-			else
-				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
-					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
-			fi
-		done
-		unset cfg_option cfg_option_tabs cfg_section
-	fi
-	unset config_files config_file
-
-	echo
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}

diff --git a/dev-db/mysql/mysql-8.0.25-r1.ebuild b/dev-db/mysql/mysql-8.0.25-r1.ebuild
deleted file mode 100644
index 9a4e4b01dc9a..000000000000
--- a/dev-db/mysql/mysql-8.0.25-r1.ebuild
+++ /dev/null
@@ -1,1193 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs
-
-MY_PV="${PV//_pre*}"
-MY_P="${PN}-${MY_PV}"
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.25-patches-02.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
-	router selinux +server tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )
-	cjk? ( server )
-	jemalloc? ( server )
-	numa? ( server )
-	profiling? ( server )
-	router? ( server )
-	tcmalloc? ( server )"
-
-# -ppc, -riscv for bug #761715
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	>=app-arch/lz4-0_p131:=
-	app-arch/zstd:=
-	sys-libs/ncurses:0=
-	>=sys-libs/zlib-1.2.3:0=
-	>=dev-libs/openssl-1.0.0:0=
-	server? (
-		dev-libs/icu:=
-		dev-libs/libevent:=[ssl,threads]
-		>=dev-libs/protobuf-3.8:=
-		net-libs/libtirpc:=
-		cjk? ( app-text/mecab:= )
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-		tcmalloc? ( dev-util/google-perftools:0= )
-	)
-"
-
-DEPEND="
-	${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	virtual/yacc
-	server? ( net-libs/rpcsvc-proto )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-
-RDEPEND="
-	${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:5.7
-	selinux? ( sec-policy/selinux-mysql )
-	!prefix? (
-		acct-group/mysql acct-user/mysql
-		dev-db/mysql-init-scripts
-	)
-"
-
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="2G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="2G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	# Avoid rpm call which would trigger sandbox, #692368
-	sed -i \
-		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
-		CMakeLists.txt || die
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove man pages for client-lib tools we don't install
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# code is not C++17 ready, bug #786402
-	append-cxxflags -std=c++14
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		# Using bundled editline to get CTRL+C working
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-		-DWITH_ROUTER=$(usex router ON OFF)
-	)
-
-	if is-flagq -fno-lto ; then
-		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
-		mycmakeargs+=( -DWITH_LTO=OFF )
-	elif is-flagq -flto ; then
-		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
-		myconf+=( -DWITH_LTO=ON )
-	else
-		# Disable automagic
-		myconf+=( -DWITH_LTO=OFF )
-	fi
-
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-
-	mycmakeargs+=(
-		-DWITH_ICU=system
-		-DWITH_LZ4=system
-		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
-		-DWITH_RAPIDJSON=bundled
-		-DWITH_ZSTD=system
-	)
-
-	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
-		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-		ewarn "You MUST file bugs without these variables set."
-		ewarn "Tests will probably fail!"
-
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-		)
-	elif use latin1 ; then
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=latin1
-			-DDEFAULT_COLLATION=latin1_swedish_ci
-		)
-	else
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=utf8mb4
-			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
-		)
-	fi
-
-	if use server ; then
-		mycmakeargs+=(
-			-DWITH_EXTRA_CHARSETS=all
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_LIBEVENT=system
-			-DWITH_PROTOBUF=system
-			-DWITH_NUMA=$(usex numa ON OFF)
-		)
-
-		if use jemalloc ; then
-			mycmakeargs+=( -DWITH_JEMALLOC=ON )
-		elif use tcmalloc ; then
-			mycmakeargs+=( -DWITH_TCMALLOC=ON )
-		fi
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_SYSTEMD=no
-		)
-	fi
-
-	cmake_src_configure
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='perl server' \
-# FEATURES='test userpriv' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname bug reason
-		rawtestname="${1}" ; shift
-		bug="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
-		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Run CTest (test-units)
-	cmake_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# >=dev-libs/openssl-3 defaults to security level 1 which disallow
-	# TLSv1/1.1 but tests will require TLSv1/1.1.
-	einfo "Set OpenSSL configuration for test suite ..."
-	cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
-	openssl_conf = default_conf
-
-	[default_conf]
-	ssl_conf = ssl_sect
-
-	[ssl_sect]
-	system_default = system_default_sect
-
-	[system_default_sect]
-	CipherString = DEFAULT@SECLEVEL=0
-	EOF
-
-	local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-
-	local -a disabled_tests
-	disabled_tests+=( "auth_sec.atomic_rename_user;103512;Depends on user running test" )
-	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
-	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "main.explain_tree;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.derived_limit;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure - no upstream bug yet" )
-	disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "perfschema.statement_digest_query_sample;0;Test will fail on slow hardware")
-	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
-	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch;0;Unstable test" )
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
-	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
-	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
-	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
-		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
-	fi
-
-	if has_version ">=dev-libs/openssl-3" ; then
-		# no need to force dep app-arch/zip for one test
-		disabled_tests+=( "x.connection_tls_version;0;Not compatible with OpenSSL 3.x error messages" )
-	fi
-
-	local test_infos_str test_infos_arr
-	for test_infos_str in "${disabled_tests[@]}" ; do
-		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
-		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
-			die "Invalid test data set, not matching format: ${test_infos_str}"
-		fi
-
-		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
-	done
-	unset test_infos_str test_infos_arr
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	cmake_src_install
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	mycnf_src="my.cnf-8.0.distro-server"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR}/${mycnf_src}" \
-		> "${TMPDIR}/my.cnf.ok" || die
-
-	if use prefix ; then
-		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8mb4|latin1|g" \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	eprefixify "${TMPDIR}/my.cnf.ok"
-
-	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-
-	if use router ; then
-		rm -rf \
-			"${ED}/usr/LICENSE.router" \
-			"${ED}/usr/README.router" \
-			"${ED}/usr/run" \
-			"${ED}/usr/var" \
-			|| die
-	fi
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	# NOTE: $MY_LOGDIR contains $EPREFIX by default
-	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-
-	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-		einfo
-		elog "You might want to run:"
-		elog "  \"emerge --config =${CATEGORY}/${PF}\""
-		elog "if this is a new install."
-		einfo
-	else
-		einfo
-		elog "Upgrade process for ${PN}-8.x has changed. Please read"
-		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
-		einfo
-	fi
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	local -a config_files
-
-	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
-	fi
-
-	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
-	fi
-
-	if [[ ${#config_files[@]} -gt 0 ]] ; then
-		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
-			local user_answer
-
-			echo
-			einfo "Please select default authentication plugin (enter number or plugin name):"
-			einfo "1) caching_sha2_password [MySQL 8.0 default]"
-			einfo "2) mysql_native_password [MySQL 5.7 default]"
-			einfo
-			einfo "For details see:"
-			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
-			read -p "    >" user_answer
-			echo
-
-			case "${user_answer}" in
-				1|caching_sha2_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
-					;;
-				2|mysql_native_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
-					;;
-				'')
-					die "No authentication plugin selected!"
-					;;
-				*)
-					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
-					;;
-			esac
-
-			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
-
-			unset user_answer
-		fi
-
-		local cfg_option cfg_option_tabs cfg_section
-		for config_file in "${config_files[@]}" ; do
-			cfg_option="default-authentication-plugin"
-			cfg_section="mysqld"
-			cfg_option_tabs="\t\t"
-			if [[ "${config_file}" == *client.cnf ]] ; then
-				cfg_option="default-auth"
-				cfg_section="client"
-				cfg_option_tabs="\t\t\t\t"
-			fi
-
-			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
-				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
-					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
-			else
-				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
-					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
-			fi
-		done
-		unset cfg_option cfg_option_tabs cfg_section
-	fi
-	unset config_files config_file
-
-	echo
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}

diff --git a/dev-db/mysql/mysql-8.0.25.ebuild b/dev-db/mysql/mysql-8.0.25.ebuild
deleted file mode 100644
index 57a120868df3..000000000000
--- a/dev-db/mysql/mysql-8.0.25.ebuild
+++ /dev/null
@@ -1,1164 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs
-
-MY_PV="${PV//_pre*}"
-MY_P="${PN}-${MY_PV}"
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.25-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
-	router selinux +server tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )
-	cjk? ( server )
-	jemalloc? ( server )
-	numa? ( server )
-	profiling? ( server )
-	router? ( server )
-	tcmalloc? ( server )"
-
-# -ppc, -riscv for bug #761715
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	>=app-arch/lz4-0_p131:=
-	app-arch/zstd:=
-	sys-libs/ncurses:0=
-	>=sys-libs/zlib-1.2.3:0=
-	>=dev-libs/openssl-1.0.0:0=
-	server? (
-		dev-libs/icu:=
-		dev-libs/libevent:=[ssl,threads]
-		>=dev-libs/protobuf-3.8:=
-		net-libs/libtirpc:=
-		cjk? ( app-text/mecab:= )
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-		tcmalloc? ( dev-util/google-perftools:0= )
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	virtual/yacc
-	server? ( net-libs/rpcsvc-proto )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:5.7
-	selinux? ( sec-policy/selinux-mysql )
-	!prefix? (
-		acct-group/mysql acct-user/mysql
-		dev-db/mysql-init-scripts
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="2G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="2G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	# Avoid rpm call which would trigger sandbox, #692368
-	sed -i \
-		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
-		CMakeLists.txt || die
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove man pages for client-lib tools we don't install
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# code is not C++17 ready, bug #786402
-	append-cxxflags -std=c++14
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		# Using bundled editline to get CTRL+C working
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-		-DWITH_ROUTER=$(usex router ON OFF)
-	)
-
-	if is-flagq -fno-lto ; then
-		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
-		mycmakeargs+=( -DWITH_LTO=OFF )
-	elif is-flagq -flto ; then
-		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
-		myconf+=( -DWITH_LTO=ON )
-	else
-		# Disable automagic
-		myconf+=( -DWITH_LTO=OFF )
-	fi
-
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-
-	mycmakeargs+=(
-		-DWITH_ICU=system
-		-DWITH_LZ4=system
-		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
-		-DWITH_RAPIDJSON=bundled
-		-DWITH_ZSTD=system
-	)
-
-	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
-		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-		ewarn "You MUST file bugs without these variables set."
-		ewarn "Tests will probably fail!"
-
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-		)
-	elif use latin1 ; then
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=latin1
-			-DDEFAULT_COLLATION=latin1_swedish_ci
-		)
-	else
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=utf8mb4
-			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
-		)
-	fi
-
-	if use server ; then
-		mycmakeargs+=(
-			-DWITH_EXTRA_CHARSETS=all
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_LIBEVENT=system
-			-DWITH_PROTOBUF=system
-			-DWITH_NUMA=$(usex numa ON OFF)
-		)
-
-		if use jemalloc ; then
-			mycmakeargs+=( -DWITH_JEMALLOC=ON )
-		elif use tcmalloc ; then
-			mycmakeargs+=( -DWITH_TCMALLOC=ON )
-		fi
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_SYSTEMD=no
-		)
-	fi
-
-	cmake_src_configure
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='perl server' \
-# FEATURES='test userpriv' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname bug reason
-		rawtestname="${1}" ; shift
-		bug="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
-		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Run CTest (test-units)
-	cmake_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-
-	local -a disabled_tests
-	disabled_tests+=( "auth_sec.atomic_rename_user;103512;Depends on user running test" )
-	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
-	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "main.explain_tree;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.derived_limit;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure - no upstream bug yet" )
-	disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "perfschema.statement_digest_query_sample;0;Test will fail on slow hardware")
-	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
-	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
-	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
-	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
-	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
-		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
-	fi
-
-	local test_infos_str test_infos_arr
-	for test_infos_str in "${disabled_tests[@]}" ; do
-		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
-		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
-			die "Invalid test data set, not matching format: ${test_infos_str}"
-		fi
-
-		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
-	done
-	unset test_infos_str test_infos_arr
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	cmake_src_install
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	mycnf_src="my.cnf-8.0.distro-server"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR}/${mycnf_src}" \
-		> "${TMPDIR}/my.cnf.ok" || die
-
-	if use prefix ; then
-		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8mb4|latin1|g" \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	eprefixify "${TMPDIR}/my.cnf.ok"
-
-	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-
-	if use router ; then
-		rm -rf \
-			"${ED}/usr/LICENSE.router" \
-			"${ED}/usr/README.router" \
-			"${ED}/usr/run" \
-			"${ED}/usr/var" \
-			|| die
-	fi
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	# NOTE: $MY_LOGDIR contains $EPREFIX by default
-	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-
-	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-		einfo
-		elog "You might want to run:"
-		elog "  \"emerge --config =${CATEGORY}/${PF}\""
-		elog "if this is a new install."
-		einfo
-	else
-		einfo
-		elog "Upgrade process for ${PN}-8.x has changed. Please read"
-		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
-		einfo
-	fi
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	local -a config_files
-
-	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
-	fi
-
-	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
-	fi
-
-	if [[ ${#config_files[@]} -gt 0 ]] ; then
-		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
-			local user_answer
-
-			echo
-			einfo "Please select default authentication plugin (enter number or plugin name):"
-			einfo "1) caching_sha2_password [MySQL 8.0 default]"
-			einfo "2) mysql_native_password [MySQL 5.7 default]"
-			einfo
-			einfo "For details see:"
-			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
-			read -p "    >" user_answer
-			echo
-
-			case "${user_answer}" in
-				1|caching_sha2_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
-					;;
-				2|mysql_native_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
-					;;
-				'')
-					die "No authentication plugin selected!"
-					;;
-				*)
-					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
-					;;
-			esac
-
-			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
-
-			unset user_answer
-		fi
-
-		local cfg_option cfg_option_tabs cfg_section
-		for config_file in "${config_files[@]}" ; do
-			cfg_option="default-authentication-plugin"
-			cfg_section="mysqld"
-			cfg_option_tabs="\t\t"
-			if [[ "${config_file}" == *client.cnf ]] ; then
-				cfg_option="default-auth"
-				cfg_section="client"
-				cfg_option_tabs="\t\t\t\t"
-			fi
-
-			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
-				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
-					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
-			else
-				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
-					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
-			fi
-		done
-		unset cfg_option cfg_option_tabs cfg_section
-	fi
-	unset config_files config_file
-
-	echo
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}

diff --git a/dev-db/mysql/mysql-8.0.26.ebuild b/dev-db/mysql/mysql-8.0.26.ebuild
deleted file mode 100644
index 7667bc29e608..000000000000
--- a/dev-db/mysql/mysql-8.0.26.ebuild
+++ /dev/null
@@ -1,1227 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs
-
-MY_PV="${PV//_pre*}"
-MY_P="${PN}-${MY_PV}"
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.26-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
-	router selinux +server tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )
-	cjk? ( server )
-	jemalloc? ( server )
-	numa? ( server )
-	profiling? ( server )
-	router? ( server )
-	tcmalloc? ( server )"
-
-# -ppc, -riscv for bug #761715
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 -riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	>=app-arch/lz4-0_p131:=
-	app-arch/zstd:=
-	sys-libs/ncurses:0=
-	>=sys-libs/zlib-1.2.3:0=
-	>=dev-libs/openssl-1.0.0:0=
-	server? (
-		dev-libs/icu:=
-		dev-libs/libevent:=[ssl,threads]
-		>=dev-libs/protobuf-3.8:=
-		net-libs/libtirpc:=
-		cjk? ( app-text/mecab:= )
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-		tcmalloc? ( dev-util/google-perftools:0= )
-	)
-"
-
-DEPEND="
-	${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	virtual/yacc
-	server? ( net-libs/rpcsvc-proto )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-
-RDEPEND="
-	${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:5.7
-	selinux? ( sec-policy/selinux-mysql )
-	!prefix? (
-		acct-group/mysql acct-user/mysql
-		dev-db/mysql-init-scripts
-	)
-"
-
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="2G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="2G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	# Avoid rpm call which would trigger sandbox, #692368
-	sed -i \
-		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
-		CMakeLists.txt || die
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove man pages for client-lib tools we don't install
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# code is not C++17 ready, bug #786402
-	append-cxxflags -std=c++14
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		# Using bundled editline to get CTRL+C working
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-		-DWITH_ROUTER=$(usex router ON OFF)
-	)
-
-	if is-flagq -fno-lto ; then
-		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
-		mycmakeargs+=( -DWITH_LTO=OFF )
-	elif is-flagq -flto ; then
-		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
-		myconf+=( -DWITH_LTO=ON )
-	else
-		# Disable automagic
-		myconf+=( -DWITH_LTO=OFF )
-	fi
-
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-
-	mycmakeargs+=(
-		-DWITH_ICU=system
-		-DWITH_LZ4=system
-		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
-		-DWITH_RAPIDJSON=bundled
-		-DWITH_ZSTD=system
-	)
-
-	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
-		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-		ewarn "You MUST file bugs without these variables set."
-		ewarn "Tests will probably fail!"
-
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-		)
-	elif use latin1 ; then
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=latin1
-			-DDEFAULT_COLLATION=latin1_swedish_ci
-		)
-	else
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=utf8mb4
-			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
-		)
-	fi
-
-	if use server ; then
-		mycmakeargs+=(
-			-DWITH_EXTRA_CHARSETS=all
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_LIBEVENT=system
-			-DWITH_PROTOBUF=system
-			-DWITH_NUMA=$(usex numa ON OFF)
-		)
-
-		if use jemalloc ; then
-			mycmakeargs+=( -DWITH_JEMALLOC=ON )
-		elif use tcmalloc ; then
-			mycmakeargs+=( -DWITH_TCMALLOC=ON )
-		fi
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_SYSTEMD=no
-		)
-	fi
-
-	cmake_src_configure
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='perl server' \
-# FEATURES='test userpriv' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname bug reason
-		rawtestname="${1}" ; shift
-		bug="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
-		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Run CTest (test-units)
-	cmake_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-
-	local -a disabled_tests
-	disabled_tests+=( "auth_sec.atomic_rename_user;103512;Depends on user running test" )
-	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
-	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "innodb.alter_kill;0;Known test failure -- no upstream bug yet" )
-	disabled_tests+=( "main.derived_limit;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.explain_tree;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.gis-precise;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure -- no upstream bug yet" )
-	disabled_tests+=( "main.select_icp_mrr;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_dupsweed;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_dupsweed_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_dupsweed_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_firstmatch;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_firstmatch_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_firstmatch_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "perfschema.statement_digest_query_sample;0;Test will fail on slow hardware")
-	disabled_tests+=( "rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch;0;Unstable test" )
-	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
-	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
-	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
-	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
-		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
-	fi
-
-	if has_version ">=dev-libs/openssl-3" ; then
-		# >=dev-libs/openssl-3 defaults to security level 1 which disallow
-		# TLSv1/1.1 but tests will require TLSv1/1.1.
-		einfo "Set OpenSSL configuration for test suite ..."
-		cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
-		openssl_conf = default_conf
-
-		[ req ]
-		default_bits			= 2048
-		default_keyfile 		= privkey.pem
-		distinguished_name		= req_distinguished_name
-
-		[ req_distinguished_name ]
-		countryName			= Country Name (2 letter code)
-		countryName_default		= AU
-		countryName_min			= 2
-		countryName_max			= 2
-
-		stateOrProvinceName		= State or Province Name (full name)
-		stateOrProvinceName_default	= Some-State
-
-		localityName			= Locality Name (eg, city)
-
-		0.organizationName		= Organization Name (eg, company)
-		0.organizationName_default	= Internet Widgits Pty Ltd
-
-		organizationalUnitName		= Organizational Unit Name (eg, section)
-
-		commonName			= Common Name (e.g. server FQDN or YOUR name)
-		commonName_max			= 64
-
-		emailAddress			= Email Address
-		emailAddress_max		= 64
-
-		[default_conf]
-		ssl_conf = ssl_sect
-
-		[ssl_sect]
-		system_default = system_default_sect
-
-		[system_default_sect]
-		CipherString = DEFAULT@SECLEVEL=0
-		EOF
-
-		local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
-
-		disabled_tests+=( "x.connection_tls_version;0;Not compatible with OpenSSL 3.x error messages" )
-	fi
-
-	local test_infos_str test_infos_arr
-	for test_infos_str in "${disabled_tests[@]}" ; do
-		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
-		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
-			die "Invalid test data set, not matching format: ${test_infos_str}"
-		fi
-
-		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
-	done
-	unset test_infos_str test_infos_arr
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	cmake_src_install
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	mycnf_src="my.cnf-8.0.distro-server"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR}/${mycnf_src}" \
-		> "${TMPDIR}/my.cnf.ok" || die
-
-	if use prefix ; then
-		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8mb4|latin1|g" \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	eprefixify "${TMPDIR}/my.cnf.ok"
-
-	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-
-	if use router ; then
-		rm -rf \
-			"${ED}/usr/LICENSE.router" \
-			"${ED}/usr/README.router" \
-			"${ED}/usr/run" \
-			"${ED}/usr/var" \
-			|| die
-	fi
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	# NOTE: $MY_LOGDIR contains $EPREFIX by default
-	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-
-	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-		einfo
-		elog "You might want to run:"
-		elog "  \"emerge --config =${CATEGORY}/${PF}\""
-		elog "if this is a new install."
-		einfo
-	else
-		einfo
-		elog "Upgrade process for ${PN}-8.x has changed. Please read"
-		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
-		einfo
-	fi
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	local -a config_files
-
-	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
-	fi
-
-	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
-	fi
-
-	if [[ ${#config_files[@]} -gt 0 ]] ; then
-		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
-			local user_answer
-
-			echo
-			einfo "Please select default authentication plugin (enter number or plugin name):"
-			einfo "1) caching_sha2_password [MySQL 8.0 default]"
-			einfo "2) mysql_native_password [MySQL 5.7 default]"
-			einfo
-			einfo "For details see:"
-			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
-			read -p "    >" user_answer
-			echo
-
-			case "${user_answer}" in
-				1|caching_sha2_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
-					;;
-				2|mysql_native_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
-					;;
-				'')
-					die "No authentication plugin selected!"
-					;;
-				*)
-					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
-					;;
-			esac
-
-			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
-
-			unset user_answer
-		fi
-
-		local cfg_option cfg_option_tabs cfg_section
-		for config_file in "${config_files[@]}" ; do
-			cfg_option="default-authentication-plugin"
-			cfg_section="mysqld"
-			cfg_option_tabs="\t\t"
-			if [[ "${config_file}" == *client.cnf ]] ; then
-				cfg_option="default-auth"
-				cfg_section="client"
-				cfg_option_tabs="\t\t\t\t"
-			fi
-
-			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
-				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
-					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
-			else
-				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
-					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
-			fi
-		done
-		unset cfg_option cfg_option_tabs cfg_section
-	fi
-	unset config_files config_file
-
-	echo
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-02-27 22:25 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-02-27 22:25 UTC (permalink / raw
  To: gentoo-commits

commit:     05ce2eaf5910965a0b7b151c298c72c71d8a59da
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 27 22:24:39 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 27 22:24:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05ce2eaf

dev-db/mysql: Stabilize 5.7.36-r1 ppc64, #822258

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.36-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.36-r1.ebuild b/dev-db/mysql/mysql-5.7.36-r1.ebuild
index 17090aef5a0e..ecda1ce67a3d 100644
--- a/dev-db/mysql/mysql-5.7.36-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.36-r1.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-02-27 22:25 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-02-27 22:25 UTC (permalink / raw
  To: gentoo-commits

commit:     beb0cbb9bfd260e6d606f594ac7c4f13e27baa89
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 27 22:24:42 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 27 22:24:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=beb0cbb9

dev-db/mysql: Stabilize 8.0.27 ppc64, #822258

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.27.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.27.ebuild b/dev-db/mysql/mysql-8.0.27.ebuild
index bb140baf5ef2..a6a52bcee87b 100644
--- a/dev-db/mysql/mysql-8.0.27.ebuild
+++ b/dev-db/mysql/mysql-8.0.27.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	tcmalloc? ( server )"
 
 # -ppc, -riscv for bug #761715
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 -riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ppc64 -riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-02-27 16:24 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-02-27 16:24 UTC (permalink / raw
  To: gentoo-commits

commit:     035483916803172e5a493785a1e073c58f7595e8
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 27 16:06:23 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 27 16:24:41 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03548391

dev-db/mysql: drop to ~ppc

8.x doesn't work and regressions in 5.7.x too. Suggest using MariaDB on PPC.

Bug: https://bugs.gentoo.org/822258
Signed-off-by: Sam James <sam <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/24370
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.32.ebuild | 4 ++--
 dev-db/mysql/mysql-5.7.34.ebuild | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.32.ebuild b/dev-db/mysql/mysql-5.7.32.ebuild
index c68d1e4cd86d..613c2cbc0a55 100644
--- a/dev-db/mysql/mysql-5.7.32.ebuild
+++ b/dev-db/mysql/mysql-5.7.32.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.34.ebuild b/dev-db/mysql/mysql-5.7.34.ebuild
index 6a6d053d9b44..74040f453b7d 100644
--- a/dev-db/mysql/mysql-5.7.34.ebuild
+++ b/dev-db/mysql/mysql-5.7.34.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-01-13  4:18 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-01-13  4:18 UTC (permalink / raw
  To: gentoo-commits

commit:     7ad004452a58f75911b99cad4cf0533eff5d78a0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 13 04:18:15 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 13 04:18:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ad00445

dev-db/mysql: Stabilize 8.0.27 x86, #822258

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.27.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.27.ebuild b/dev-db/mysql/mysql-8.0.27.ebuild
index 719593938690..bb140baf5ef2 100644
--- a/dev-db/mysql/mysql-8.0.27.ebuild
+++ b/dev-db/mysql/mysql-8.0.27.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	tcmalloc? ( server )"
 
 # -ppc, -riscv for bug #761715
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 -riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 -riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-01-13  4:18 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-01-13  4:18 UTC (permalink / raw
  To: gentoo-commits

commit:     0c666bff0e750db193211f882ce6f2721d92f6e5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 13 04:18:07 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 13 04:18:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c666bff

dev-db/mysql: Stabilize 8.0.27 amd64, #822258

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.27.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.27.ebuild b/dev-db/mysql/mysql-8.0.27.ebuild
index 98b5f88fcf4f..719593938690 100644
--- a/dev-db/mysql/mysql-8.0.27.ebuild
+++ b/dev-db/mysql/mysql-8.0.27.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	tcmalloc? ( server )"
 
 # -ppc, -riscv for bug #761715
-KEYWORDS="~amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 -riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 -riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-01-13  4:18 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-01-13  4:18 UTC (permalink / raw
  To: gentoo-commits

commit:     768375da4eb2d568cdaa9333d16296df783a53f0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 13 04:18:14 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 13 04:18:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=768375da

dev-db/mysql: Stabilize 5.7.36-r1 x86, #822258

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.36-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.36-r1.ebuild b/dev-db/mysql/mysql-5.7.36-r1.ebuild
index 21a9c3921876..17090aef5a0e 100644
--- a/dev-db/mysql/mysql-5.7.36-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.36-r1.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-01-13  4:18 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-01-13  4:18 UTC (permalink / raw
  To: gentoo-commits

commit:     dc102fa51058c9526f007e5c83aaeb20a79db9e3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 13 04:18:06 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 13 04:18:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc102fa5

dev-db/mysql: Stabilize 5.7.36-r1 amd64, #822258

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.36-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.36-r1.ebuild b/dev-db/mysql/mysql-5.7.36-r1.ebuild
index 3e7e8e6cabe4..21a9c3921876 100644
--- a/dev-db/mysql/mysql-5.7.36-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.36-r1.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-01-12  4:09 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-01-12  4:09 UTC (permalink / raw
  To: gentoo-commits

commit:     bc9b2ceba6aba8182c2ead2af9820d432d6f2e12
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 12 04:09:23 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 12 04:09:23 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc9b2ceb

dev-db/mysql: Stabilize 8.0.27 arm64, #822258

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.27.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.27.ebuild b/dev-db/mysql/mysql-8.0.27.ebuild
index 8117e8cf9fa0..98b5f88fcf4f 100644
--- a/dev-db/mysql/mysql-8.0.27.ebuild
+++ b/dev-db/mysql/mysql-8.0.27.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	tcmalloc? ( server )"
 
 # -ppc, -riscv for bug #761715
-KEYWORDS="~amd64 arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 -riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 -riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-01-12  4:09 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-01-12  4:09 UTC (permalink / raw
  To: gentoo-commits

commit:     907e1581a09a6eac06ac42cf7d25ea51d5642b19
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 12 04:09:22 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 12 04:09:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=907e1581

dev-db/mysql: Stabilize 5.7.36-r1 arm64, #822258

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.36-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.36-r1.ebuild b/dev-db/mysql/mysql-5.7.36-r1.ebuild
index 6ebda71eebc3..3e7e8e6cabe4 100644
--- a/dev-db/mysql/mysql-5.7.36-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.36-r1.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-01-11 21:40 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-01-11 21:40 UTC (permalink / raw
  To: gentoo-commits

commit:     a5bc21850ee1cd21c92dff56e22f4a7a8a36e192
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 11 21:39:49 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 11 21:39:49 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5bc2185

dev-db/mysql: Stabilize 5.7.36-r1 arm, #822258

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.36-r1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.36-r1.ebuild b/dev-db/mysql/mysql-5.7.36-r1.ebuild
index 53dd2931b101..6ebda71eebc3 100644
--- a/dev-db/mysql/mysql-5.7.36-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.36-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2022-01-11 21:40 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2022-01-11 21:40 UTC (permalink / raw
  To: gentoo-commits

commit:     9521b41d3fc4e1fa3725d1598df56cc871ce2bf9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 11 21:39:50 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 11 21:39:50 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9521b41d

dev-db/mysql: Stabilize 8.0.27 arm, #822258

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.27.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.27.ebuild b/dev-db/mysql/mysql-8.0.27.ebuild
index be17938dfdd9..8117e8cf9fa0 100644
--- a/dev-db/mysql/mysql-8.0.27.ebuild
+++ b/dev-db/mysql/mysql-8.0.27.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="8"
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	tcmalloc? ( server )"
 
 # -ppc, -riscv for bug #761715
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 -riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 -riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-11-18 15:35 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-11-18 15:35 UTC (permalink / raw
  To: gentoo-commits

commit:     ba8b83214bc959f037e7e7ef4ab651bcd754c189
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 18 15:32:06 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Nov 18 15:34:57 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba8b8321

dev-db/mysql: don't run ctest manually

ctest are already part of mysql-test suite.

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

 dev-db/mysql/mysql-5.7.36-r1.ebuild | 12 ++----------
 dev-db/mysql/mysql-8.0.27.ebuild    | 13 ++++++-------
 2 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.36-r1.ebuild b/dev-db/mysql/mysql-5.7.36-r1.ebuild
index e0c4de4973dc..53dd2931b101 100644
--- a/dev-db/mysql/mysql-5.7.36-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.36-r1.ebuild
@@ -452,7 +452,6 @@ src_test() {
 	}
 
 	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
 	local retstatus_tests
 
 	if ! use server ; then
@@ -460,12 +459,6 @@ src_test() {
 		return 0
 	fi
 
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake_src_test
-	retstatus_unit=$?
-
 	# Ensure that parallel runs don't die
 	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
 
@@ -693,10 +686,9 @@ src_test() {
 	pkill -9 -f "${S}/sql" 2>/dev/null
 
 	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+	[[ ${retstatus_tests} -eq 0 ]] || failures="${failures} tests"
 
-	[[ -z "$failures" ]] || die "Test failures: $failures"
+	[[ -z "${failures}" ]] || die "Test failures: ${failures}"
 	einfo "Tests successfully completed"
 }
 

diff --git a/dev-db/mysql/mysql-8.0.27.ebuild b/dev-db/mysql/mysql-8.0.27.ebuild
index 33ce8cec9041..be17938dfdd9 100644
--- a/dev-db/mysql/mysql-8.0.27.ebuild
+++ b/dev-db/mysql/mysql-8.0.27.ebuild
@@ -349,12 +349,12 @@ src_test() {
 	}
 
 	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
 	local retstatus_tests
 
-	# Run CTest (test-units)
-	cmake_src_test
-	retstatus_unit=$?
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
 
 	# Ensure that parallel runs don't die
 	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
@@ -526,10 +526,9 @@ src_test() {
 	pkill -9 -f "${S}/sql" 2>/dev/null
 
 	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+	[[ ${retstatus_tests} -eq 0 ]] || failures="${failures} tests"
 
-	[[ -z "$failures" ]] || die "Test failures: $failures"
+	[[ -z "${failures}" ]] || die "Test failures: ${failures}"
 	einfo "Tests successfully completed"
 }
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-11-17  1:05 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-11-17  1:05 UTC (permalink / raw
  To: gentoo-commits

commit:     a86b7ee0450d2d0bbab789ce2b57fd376e7c1efc
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 16 21:46:39 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Nov 17 01:04:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a86b7ee0

dev-db/mysql: fix building against openssl-3

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

 dev-db/mysql/Manifest            | 2 +-
 dev-db/mysql/mysql-8.0.27.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 86ccd72ca756..e922b317d818 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -9,7 +9,7 @@ DIST mysql-8.0.23-patches-01.tar.xz 7568 BLAKE2B 222120dcb5556457f382eefbb10f66f
 DIST mysql-8.0.25-patches-01.tar.xz 3604 BLAKE2B 09cccab204c30d16bdc374bcd01d4a8e6298955f86f479b8e287aab74fb6bd9857547e360be725dfc66acb56e1bb5665277d340761d0110a8823763ad4d2d1f4 SHA512 6d90a34a20e9cbc7e7a9b5b63a1408f33ac8523f2be6c9ab6d9ad7589c3ded83c87e460d782d4d8c33f11b337151fd8db994099e371260ecf204933e844eb50e
 DIST mysql-8.0.25-patches-02.tar.xz 6456 BLAKE2B c9c1020a505ebcee836f8dc3bbe540ff924a0174daf36c37b852df267a81919d37581d1c9be037d52cdcd34c27c5c34d3f0af6160857b22d8ab4d8ece37798e0 SHA512 3c3726b397f3a6fb1d84396bb571b4903a167c9a47273b9d5996949e1d3febc96d3528bfa8dfaeea073a245051ae10c983f2ad258268babc91649563ce3cfc00
 DIST mysql-8.0.26-patches-01.tar.xz 6980 BLAKE2B 5fc86125b622ac978dc7ec3d6954a1d366315a57b6f56ca8dade9ad4a255b4b793ad33736404b29ab2db12f726897f014aeec9232dc52954087e7533d0f593d2 SHA512 00e6478716cf857b8ab768ec481dc1e7d809db17a9d899a52822f61dcc18797e87c0eecfafb1bb9065895c1b261c03c87fe0593b59dc86fb40853b0c660c9bfb
-DIST mysql-8.0.27-patches-01.tar.xz 7072 BLAKE2B 9d41cef859770b6ea42c7c493688630b2735ec5a2b8a04e2bf259a573134bdd0bfda3c7bf03fb5de0479f6d0379c6bfae11279190085dcd63175854b56a58c9b SHA512 535f2347530eab69f731fb5153d671cba1ca1b1f29610c89e2654810af6c0239cd9c55618677b92c58db71b56856e65466185e37ddf5a8521ef87f086e967d8f
+DIST mysql-8.0.27-patches-02.tar.xz 7204 BLAKE2B 1a3548f8b48b63a1d38cd9826f8ed2daf3d396276e8887e0a02a73fb91e544e1d0f1da9560351f03d3345d2ea5e8f61e5a9df2bce80558143bd3bc2558372232 SHA512 86c660d67d883fb84e6a38c39994bc30669c18b1d5bdedf908f112c7ebb59f0acf23903e6a81f01de1e6862a8cb779c7b537659ff18b090306eacf668dea47f8
 DIST mysql-boost-5.7.32.tar.gz 52882168 BLAKE2B dd112fa1d8bd29d86fba076675b5b7c9c98b6fb876aed45a00e8a25be716102fc9aa688b7170bef07b1c9f9751737277774d8fb2c64c21e181ecae58f89b4a8a SHA512 33a617d040efd065ea1c2ad84be537f851480abd5cc8a6879b7f170bc4e6db9432bd03f2a6bc680b71f17839c508cab0e7ef1a3aba032197da1b7943c916c77a
 DIST mysql-boost-5.7.33.tar.gz 52912380 BLAKE2B bca09314ae73932f6095799faa016998e65655cf5ea74d5596dcdc785e77014fe0b29a6c123e8618771f4a20a19978df00f7b79eea329aeb4b536ae71a4bef94 SHA512 1d1e1e5934fb17ff731fea45b88d4af6a394c2fbf0177a87803b18cb0eb4fb8d4939f82fc22b6cbc2af64022a44e206cd23e2e88ce11cc119c3ea22129d54e7a
 DIST mysql-boost-5.7.34.tar.gz 52891142 BLAKE2B 986fe106d73495ea9acb837f699ef2b1ffd123d9728b61da42f990d670569f1f7c12dc0a8611c3a7b6e3ed7be9fc277e1a977fa6c6d06f7d156a2f492951d9c7 SHA512 4eab7e90477b75643df743d806d5abcfb56572a2aa003a354980287c9148209f4fb7f0158ba969fb0462c32e49fcb4cf2a79f0330ab1bd2b243725dbf6f31d6d

diff --git a/dev-db/mysql/mysql-8.0.27.ebuild b/dev-db/mysql/mysql-8.0.27.ebuild
index bdc11e879fa0..33ce8cec9041 100644
--- a/dev-db/mysql/mysql-8.0.27.ebuild
+++ b/dev-db/mysql/mysql-8.0.27.ebuild
@@ -12,7 +12,7 @@ MY_PV="${PV//_pre*}"
 MY_P="${PN}-${MY_PV}"
 
 # Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.27-patches-01.tar.xz"
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.27-patches-02.tar.xz"
 
 SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
 	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-11-14 16:06 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-11-14 16:06 UTC (permalink / raw
  To: gentoo-commits

commit:     be637dab8d2b4ba5e0214e181ed62378719a3e35
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 14 16:05:39 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 14 16:06:39 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be637dab

dev-db/mysql: USE=server depends on virtual/libcrypt

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

 dev-db/mysql/{mysql-5.7.36.ebuild => mysql-5.7.36-r1.ebuild} | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-db/mysql/mysql-5.7.36.ebuild b/dev-db/mysql/mysql-5.7.36-r1.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-5.7.36.ebuild
rename to dev-db/mysql/mysql-5.7.36-r1.ebuild
index 783bf1a9a561..e0c4de4973dc 100644
--- a/dev-db/mysql/mysql-5.7.36.ebuild
+++ b/dev-db/mysql/mysql-5.7.36-r1.ebuild
@@ -49,6 +49,7 @@ COMMON_DEPEND="
 	)
 	server? (
 		>=app-arch/lz4-0_p131:=
+		virtual/libcrypt:=
 		cjk? ( app-text/mecab:= )
 		experimental? (
 			dev-libs/libevent:=[ssl]


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-11-14  3:49 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-11-14  3:49 UTC (permalink / raw
  To: gentoo-commits

commit:     427f5c3db37e7349d300f1e92832ff68e2b4cfd3
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 13 20:30:47 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 14 03:49:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=427f5c3d

dev-db/mysql: bump to v5.7.36

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

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-5.7.36.ebuild | 1293 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1295 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 0f1742475e73..86ccd72ca756 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,6 +3,7 @@ DIST mysql-5.7.33-patches-01.tar.xz 6672 BLAKE2B cfa410f9ba5a4ba7e43923e7b5940c2
 DIST mysql-5.7.34-patches-01.tar.xz 6676 BLAKE2B b925880bfbb991fcba81964ff658a2ecab38da637a6093270a724ab8e405ab092d5fb9684f53f44d001e34287366df234b841d9ebcae62d49becdb93a3c3e324 SHA512 80a89f4b4a7ecc04f3115c6aaa0b0013e38c2813fa6dea095e826ef3944298715a48e0deacb691d23526b1524b207c83176290faea2461d3fcd94edabe3d8943
 DIST mysql-5.7.34-patches-02.tar.xz 6408 BLAKE2B fdb36247832b6282af94ce2f61b5dd77f6b45f9efca4b438ecd5fed8d810d9d51547d0ae3de085e7f5dcc8795b4bc4f1210902495b92859e1d5aec3048256ef3 SHA512 f0513eb7f0c9e415aa972a53af668939934ea4f4fa438f468f32a46ccc2aa3b84ba8edd999e4786256ada34851ad64c81e9dd0e36c2a21da641987dfd18635c3
 DIST mysql-5.7.35-patches-01.tar.xz 6408 BLAKE2B ddead9d6f5570f23433ffaef0188a8e93c0220b3d59ae24b870927e9e5908619f357725c1ab2d16905f39dd9d5f6cd23d3aabf6a1df2abdc865683f603912b8f SHA512 6374536299c691fd12a3f8b7cd27291e6f3b0b6d159284b2866caaed6a7f124439c16e659e6da5aae9e72d613de2a1e1b80066c961e122e90ad644e9a32633cc
+DIST mysql-5.7.36-patches-01.tar.xz 6396 BLAKE2B ed9783f207d40fc220992c4193bdd8e96523f69414daa756f1f30306c1aedff9e96216ba2294a4c41eefbaf39c8bb37784bf1e7cce656c93f829c9cf0682fa6d SHA512 b0fbd41ebb2d32067e6c81707dffa91fece2d368f4b2fa47951492936509972d425b64d7613748c42b31cf9ba9dab697efeff70debe7268855a90d322d3f3158
 DIST mysql-8.0.22-patches-02.tar.xz 7580 BLAKE2B a50704c3c58b1f67ca86edb233544137927b0ae5fdf302687b48f6fd30fbbd26798e8ef8282662586b25a7240b47278b44f944a8ca59f1a198bc228dd74459c9 SHA512 59f864452e9fdebe4d3990eff8b756e9bbfad58da216b74fa8b7e8391cb0d9d543ca2828591b9ed1ee276c1dec9e1851a8c2683507f0a326c85054e31cc3f950
 DIST mysql-8.0.23-patches-01.tar.xz 7568 BLAKE2B 222120dcb5556457f382eefbb10f66f46fe1673c64730c8c8a5566942031bc98bab1f1182f747e79e23fccfb6b09197d5c2874aa2087104b6f1eaa25ea9fd60c SHA512 54222c420d57c1b206d920f22738746925ed1e0d78683f01c97cac5bd1d3450f70f784a7f603304b8595fb58120e691f94e28fa1d1884a7cc8bea1d7b177470f
 DIST mysql-8.0.25-patches-01.tar.xz 3604 BLAKE2B 09cccab204c30d16bdc374bcd01d4a8e6298955f86f479b8e287aab74fb6bd9857547e360be725dfc66acb56e1bb5665277d340761d0110a8823763ad4d2d1f4 SHA512 6d90a34a20e9cbc7e7a9b5b63a1408f33ac8523f2be6c9ab6d9ad7589c3ded83c87e460d782d4d8c33f11b337151fd8db994099e371260ecf204933e844eb50e
@@ -13,6 +14,7 @@ DIST mysql-boost-5.7.32.tar.gz 52882168 BLAKE2B dd112fa1d8bd29d86fba076675b5b7c9
 DIST mysql-boost-5.7.33.tar.gz 52912380 BLAKE2B bca09314ae73932f6095799faa016998e65655cf5ea74d5596dcdc785e77014fe0b29a6c123e8618771f4a20a19978df00f7b79eea329aeb4b536ae71a4bef94 SHA512 1d1e1e5934fb17ff731fea45b88d4af6a394c2fbf0177a87803b18cb0eb4fb8d4939f82fc22b6cbc2af64022a44e206cd23e2e88ce11cc119c3ea22129d54e7a
 DIST mysql-boost-5.7.34.tar.gz 52891142 BLAKE2B 986fe106d73495ea9acb837f699ef2b1ffd123d9728b61da42f990d670569f1f7c12dc0a8611c3a7b6e3ed7be9fc277e1a977fa6c6d06f7d156a2f492951d9c7 SHA512 4eab7e90477b75643df743d806d5abcfb56572a2aa003a354980287c9148209f4fb7f0158ba969fb0462c32e49fcb4cf2a79f0330ab1bd2b243725dbf6f31d6d
 DIST mysql-boost-5.7.35.tar.gz 52959014 BLAKE2B 02cbc2201176773516479636ab40828a98bbc6bc1e90060e36d36af5c20a84b4b415d6e467328890ecff044834c81458fff8b717fd8942196dcf35e0ae85f298 SHA512 2469c8e13a236aee327bc0828804ba189e3abf78b6e0b3ef65b2343210f9c0cd5313d18b57ae3b76ca1487dc1d70854c8a12e6da61a6fffbce95854dcc792482
+DIST mysql-boost-5.7.36.tar.gz 52968383 BLAKE2B 4d5e4fcf8d56f4a1d1d54ee889d432ee3265f55ff9c0ecf6fe216e67790a49ed052b94457680daef4cb42df29f14db7b0e678e0f0443c20b7e2324c772c24313 SHA512 a95580efd5b87776ee7f1aae9b50d50d88c70a48c16e7a2d8c6ada0b1cadc5ec6074a859291a65caa1b50a00e08a9e350df342bb0c6ef74edaf21055331c081b
 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

diff --git a/dev-db/mysql/mysql-5.7.36.ebuild b/dev-db/mysql/mysql-5.7.36.ebuild
new file mode 100644
index 000000000000..783bf1a9a561
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.36.ebuild
@@ -0,0 +1,1293 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs multilib-minimal
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.36-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="5.7/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+	sys-libs/ncurses:0=
+	client-libs? (
+		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
+		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
+	)
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+		>=dev-libs/openssl-1.0.0:0=
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=[ssl]
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+	)
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+"
+
+DEPEND="
+	${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
+	virtual/yacc
+	server? (
+		dev-libs/libevent:=[ssl]
+		experimental? ( net-libs/rpcsvc-proto )
+	)
+	static? ( sys-libs/ncurses[static-libs] )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+
+RDEPEND="
+	${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:8.0
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
+	server? (
+		!prefix? (
+			acct-group/mysql acct-user/mysql
+			dev-db/mysql-init-scripts
+		)
+	)
+"
+
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="3G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="3G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/extra/libevent \
+		"${S}"/zlib \
+		|| die
+
+	# Don't clash with dev-db/mysql-connector-c
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# code is not C++17 ready, bug #786402
+	append-cxxflags -std=c++14
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI, bug 530132
+	if multilib_is_native_abi ; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
+			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static ; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in \
+		auth_sec.keyring_udf \
+		innodb.alter_kill \
+		innodb.innodb-multiple-tablespaces \
+		innodb.import_compress_encrypt \
+		perfschema.privilege_table_io \
+	; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
+	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+	for t in \
+		main.xa_prepared_binlog_off \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_non_direct_stm_mixing_engines \
+	; do
+		_disable_test "$t" "Unstable test"
+	done
+
+	for t in \
+		gis.geometry_class_attri_prop \
+		gis.geometry_property_function_issimple \
+		gis.gis_bugs_crashes \
+		gis.spatial_op_testingfunc_mix \
+		gis.spatial_analysis_functions_buffer \
+		gis.spatial_analysis_functions_distance \
+		gis.spatial_utility_function_distance_sphere \
+		gis.spatial_utility_function_simplify \
+		gis.spatial_analysis_functions_centroid \
+		main.with_recursive \
+	; do
+		_disable_test "$t" "Known rounding error with latest AMD processors"
+	done
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
+	fi
+
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.mysqldump_bugs \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	if has_version ">=dev-libs/openssl-3" ; then
+		# >=dev-libs/openssl-3 defaults to security level 1 which disallow
+		# TLSv1/1.1 but tests will require TLSv1/1.1.
+		einfo "Set OpenSSL configuration for test suite ..."
+		cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
+		openssl_conf = default_conf
+
+		[ req ]
+		default_bits			= 2048
+		default_keyfile 		= privkey.pem
+		distinguished_name		= req_distinguished_name
+
+		[ req_distinguished_name ]
+		countryName			= Country Name (2 letter code)
+		countryName_default		= AU
+		countryName_min			= 2
+		countryName_max			= 2
+
+		stateOrProvinceName		= State or Province Name (full name)
+		stateOrProvinceName_default	= Some-State
+
+		localityName			= Locality Name (eg, city)
+
+		0.organizationName		= Organization Name (eg, company)
+		0.organizationName_default	= Internet Widgits Pty Ltd
+
+		organizationalUnitName		= Organizational Unit Name (eg, section)
+
+		commonName			= Common Name (e.g. server FQDN or YOUR name)
+		commonName_max			= 64
+
+		emailAddress			= Email Address
+		emailAddress_max		= 64
+
+		[default_conf]
+		ssl_conf = ssl_sect
+
+		[ssl_sect]
+		system_default = system_default_sect
+
+		[system_default_sect]
+		CipherString = DEFAULT@SECLEVEL=0
+		EOF
+
+		local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
+	fi
+
+	if has_version '>=dev-libs/openssl-1.1.1' ; then
+		# Tests are expecting <openssl-1.1.1 default cipher
+		for t in \
+			auth_sec.cert_verify \
+			auth_sec.mysql_ssl_connection \
+			auth_sec.openssl_cert_generation \
+			auth_sec.ssl_auto_detect \
+			auth_sec.ssl_mode \
+			auth_sec.tls \
+			binlog.binlog_grant_alter_user \
+			encryption.innodb_onlinealter_encryption \
+			main.grant_alter_user_qa \
+			main.grant_user_lock_qa \
+			main.mysql_ssl_default \
+			main.openssl_1 \
+			main.plugin_auth_sha256 \
+			main.plugin_auth_sha256_2 \
+			main.plugin_auth_sha256_server_default \
+			main.plugin_auth_sha256_server_default_tls \
+			main.plugin_auth_sha256_tls \
+			main.ssl \
+			main.ssl_8k_key \
+			main.ssl_bug75311 \
+			main.ssl_ca \
+			main.ssl_cipher \
+			main.ssl_compress \
+			main.ssl_crl \
+			main.ssl_ecdh \
+			main.ssl_verify_identity \
+			x.connection_tls_version \
+			x.connection_openssl \
+		; do
+			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+	cmake_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		eprefixify "${TMPDIR}/my.cnf.ok"
+
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-11-14  3:49 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-11-14  3:49 UTC (permalink / raw
  To: gentoo-commits

commit:     b371389e75d5bb829cf2dbdeaff56e154178a432
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 13 19:56:17 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 14 03:49:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b371389e

dev-db/mysql: 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/Manifest            |    2 +
 dev-db/mysql/mysql-8.0.27.ebuild | 1224 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1226 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 709e33edbfe5..0f1742475e73 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -8,6 +8,7 @@ DIST mysql-8.0.23-patches-01.tar.xz 7568 BLAKE2B 222120dcb5556457f382eefbb10f66f
 DIST mysql-8.0.25-patches-01.tar.xz 3604 BLAKE2B 09cccab204c30d16bdc374bcd01d4a8e6298955f86f479b8e287aab74fb6bd9857547e360be725dfc66acb56e1bb5665277d340761d0110a8823763ad4d2d1f4 SHA512 6d90a34a20e9cbc7e7a9b5b63a1408f33ac8523f2be6c9ab6d9ad7589c3ded83c87e460d782d4d8c33f11b337151fd8db994099e371260ecf204933e844eb50e
 DIST mysql-8.0.25-patches-02.tar.xz 6456 BLAKE2B c9c1020a505ebcee836f8dc3bbe540ff924a0174daf36c37b852df267a81919d37581d1c9be037d52cdcd34c27c5c34d3f0af6160857b22d8ab4d8ece37798e0 SHA512 3c3726b397f3a6fb1d84396bb571b4903a167c9a47273b9d5996949e1d3febc96d3528bfa8dfaeea073a245051ae10c983f2ad258268babc91649563ce3cfc00
 DIST mysql-8.0.26-patches-01.tar.xz 6980 BLAKE2B 5fc86125b622ac978dc7ec3d6954a1d366315a57b6f56ca8dade9ad4a255b4b793ad33736404b29ab2db12f726897f014aeec9232dc52954087e7533d0f593d2 SHA512 00e6478716cf857b8ab768ec481dc1e7d809db17a9d899a52822f61dcc18797e87c0eecfafb1bb9065895c1b261c03c87fe0593b59dc86fb40853b0c660c9bfb
+DIST mysql-8.0.27-patches-01.tar.xz 7072 BLAKE2B 9d41cef859770b6ea42c7c493688630b2735ec5a2b8a04e2bf259a573134bdd0bfda3c7bf03fb5de0479f6d0379c6bfae11279190085dcd63175854b56a58c9b SHA512 535f2347530eab69f731fb5153d671cba1ca1b1f29610c89e2654810af6c0239cd9c55618677b92c58db71b56856e65466185e37ddf5a8521ef87f086e967d8f
 DIST mysql-boost-5.7.32.tar.gz 52882168 BLAKE2B dd112fa1d8bd29d86fba076675b5b7c9c98b6fb876aed45a00e8a25be716102fc9aa688b7170bef07b1c9f9751737277774d8fb2c64c21e181ecae58f89b4a8a SHA512 33a617d040efd065ea1c2ad84be537f851480abd5cc8a6879b7f170bc4e6db9432bd03f2a6bc680b71f17839c508cab0e7ef1a3aba032197da1b7943c916c77a
 DIST mysql-boost-5.7.33.tar.gz 52912380 BLAKE2B bca09314ae73932f6095799faa016998e65655cf5ea74d5596dcdc785e77014fe0b29a6c123e8618771f4a20a19978df00f7b79eea329aeb4b536ae71a4bef94 SHA512 1d1e1e5934fb17ff731fea45b88d4af6a394c2fbf0177a87803b18cb0eb4fb8d4939f82fc22b6cbc2af64022a44e206cd23e2e88ce11cc119c3ea22129d54e7a
 DIST mysql-boost-5.7.34.tar.gz 52891142 BLAKE2B 986fe106d73495ea9acb837f699ef2b1ffd123d9728b61da42f990d670569f1f7c12dc0a8611c3a7b6e3ed7be9fc277e1a977fa6c6d06f7d156a2f492951d9c7 SHA512 4eab7e90477b75643df743d806d5abcfb56572a2aa003a354980287c9148209f4fb7f0158ba969fb0462c32e49fcb4cf2a79f0330ab1bd2b243725dbf6f31d6d
@@ -16,3 +17,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/mysql-8.0.27.ebuild b/dev-db/mysql/mysql-8.0.27.ebuild
new file mode 100644
index 000000000000..bdc11e879fa0
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.27.ebuild
@@ -0,0 +1,1224 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.27-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
+	router selinux +server tcmalloc test"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	cjk? ( server )
+	jemalloc? ( server )
+	numa? ( server )
+	profiling? ( server )
+	router? ( server )
+	tcmalloc? ( server )"
+
+# -ppc, -riscv for bug #761715
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 -riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	>=app-arch/lz4-0_p131:=
+	app-arch/zstd:=
+	sys-libs/ncurses:0=
+	>=sys-libs/zlib-1.2.3:0=
+	>=dev-libs/openssl-1.0.0:0=
+	server? (
+		dev-libs/icu:=
+		dev-libs/libevent:=[ssl,threads]
+		>=dev-libs/protobuf-3.8:=
+		net-libs/libtirpc:=
+		cjk? ( app-text/mecab:= )
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		tcmalloc? ( dev-util/google-perftools:0= )
+	)
+"
+
+DEPEND="
+	${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	virtual/yacc
+	server? ( net-libs/rpcsvc-proto )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+
+RDEPEND="
+	${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:5.7
+	selinux? ( sec-policy/selinux-mysql )
+	!prefix? (
+		acct-group/mysql acct-user/mysql
+		dev-db/mysql-init-scripts
+	)
+"
+
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="3G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="3G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	# Avoid rpm call which would trigger sandbox, #692368
+	sed -i \
+		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+		CMakeLists.txt || die
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove man pages for client-lib tools we don't install
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	# Code is now requiring C++17 due to https://github.com/mysql/mysql-server/commit/236ab55bedd8c9eacd80766d85edde2a8afacd08
+	append-cxxflags -std=c++17
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		# Using bundled editline to get CTRL+C working
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+		-DWITH_ROUTER=$(usex router ON OFF)
+	)
+
+	if is-flagq -fno-lto ; then
+		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
+		mycmakeargs+=( -DWITH_LTO=OFF )
+	elif is-flagq -flto ; then
+		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+		myconf+=( -DWITH_LTO=ON )
+	else
+		# Disable automagic
+		myconf+=( -DWITH_LTO=OFF )
+	fi
+
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+	mycmakeargs+=(
+		-DWITH_ICU=system
+		-DWITH_LZ4=system
+		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+		-DWITH_RAPIDJSON=bundled
+		-DWITH_ZSTD=system
+	)
+
+	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+		ewarn "You MUST file bugs without these variables set."
+		ewarn "Tests will probably fail!"
+
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+		)
+	elif use latin1 ; then
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=latin1
+			-DDEFAULT_COLLATION=latin1_swedish_ci
+		)
+	else
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=utf8mb4
+			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+		)
+	fi
+
+	if use server ; then
+		mycmakeargs+=(
+			-DWITH_EXTRA_CHARSETS=all
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_LIBEVENT=system
+			-DWITH_PROTOBUF=system
+			-DWITH_NUMA=$(usex numa ON OFF)
+		)
+
+		if use jemalloc ; then
+			mycmakeargs+=( -DWITH_JEMALLOC=ON )
+		elif use tcmalloc ; then
+			mycmakeargs+=( -DWITH_TCMALLOC=ON )
+		fi
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_SYSTEMD=no
+		)
+	fi
+
+	cmake_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='perl server' \
+# FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname bug reason
+		rawtestname="${1}" ; shift
+		bug="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Run CTest (test-units)
+	cmake_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+
+	local -a disabled_tests
+	disabled_tests+=( "auth_sec.atomic_rename_user;103512;Depends on user running test" )
+	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
+	disabled_tests+=( "auth_sec.openssl_without_fips;94718;Known test failure" )
+	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.st_symdifference;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "innodb.alter_kill;0;Known test failure -- no upstream bug yet" )
+	disabled_tests+=( "main.derived_limit;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.explain_tree;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.gis-precise;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure -- no upstream bug yet" )
+	disabled_tests+=( "main.select_icp_mrr;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_dupsweed;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_dupsweed_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_dupsweed_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_firstmatch;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_firstmatch_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_firstmatch_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "perfschema.statement_digest_query_sample;0;Test will fail on slow hardware")
+	disabled_tests+=( "rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch;0;Unstable test" )
+	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
+		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
+	fi
+
+	if has_version ">=dev-libs/openssl-3" ; then
+		# >=dev-libs/openssl-3 defaults to security level 1 which disallow
+		# TLSv1/1.1 but tests will require TLSv1/1.1.
+		einfo "Set OpenSSL configuration for test suite ..."
+		cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
+		openssl_conf = default_conf
+
+		[ req ]
+		default_bits			= 2048
+		default_keyfile 		= privkey.pem
+		distinguished_name		= req_distinguished_name
+
+		[ req_distinguished_name ]
+		countryName			= Country Name (2 letter code)
+		countryName_default		= AU
+		countryName_min			= 2
+		countryName_max			= 2
+
+		stateOrProvinceName		= State or Province Name (full name)
+		stateOrProvinceName_default	= Some-State
+
+		localityName			= Locality Name (eg, city)
+
+		0.organizationName		= Organization Name (eg, company)
+		0.organizationName_default	= Internet Widgits Pty Ltd
+
+		organizationalUnitName		= Organizational Unit Name (eg, section)
+
+		commonName			= Common Name (e.g. server FQDN or YOUR name)
+		commonName_max			= 64
+
+		emailAddress			= Email Address
+		emailAddress_max		= 64
+
+		[default_conf]
+		ssl_conf = ssl_sect
+
+		[ssl_sect]
+		system_default = system_default_sect
+
+		[system_default_sect]
+		CipherString = DEFAULT@SECLEVEL=0
+		EOF
+
+		local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
+
+		disabled_tests+=( "x.connection_tls_version;0;Not compatible with OpenSSL 3.x error messages" )
+	fi
+
+	local test_infos_str test_infos_arr
+	for test_infos_str in "${disabled_tests[@]}" ; do
+		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+			die "Invalid test data set, not matching format: ${test_infos_str}"
+		fi
+
+		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+	done
+	unset test_infos_str test_infos_arr
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	cmake_src_install
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	mycnf_src="my.cnf-8.0.distro-server"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR}/${mycnf_src}" \
+		> "${TMPDIR}/my.cnf.ok" || die
+
+	if use prefix ; then
+		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8mb4|latin1|g" \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	eprefixify "${TMPDIR}/my.cnf.ok"
+
+	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+	if use router ; then
+		rm -rf \
+			"${ED}/usr/LICENSE.router" \
+			"${ED}/usr/README.router" \
+			"${ED}/usr/run" \
+			"${ED}/usr/var" \
+			|| die
+	fi
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	# NOTE: $MY_LOGDIR contains $EPREFIX by default
+	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		einfo
+		elog "You might want to run:"
+		elog "  \"emerge --config =${CATEGORY}/${PF}\""
+		elog "if this is a new install."
+		einfo
+	else
+		einfo
+		elog "Upgrade process for ${PN}-8.x has changed. Please read"
+		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+		einfo
+	fi
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	local -a config_files
+
+	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+	fi
+
+	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+	fi
+
+	if [[ ${#config_files[@]} -gt 0 ]] ; then
+		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+			local user_answer
+
+			echo
+			einfo "Please select default authentication plugin (enter number or plugin name):"
+			einfo "1) caching_sha2_password [MySQL 8.0 default]"
+			einfo "2) mysql_native_password [MySQL 5.7 default]"
+			einfo
+			einfo "For details see:"
+			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+			read -p "    >" user_answer
+			echo
+
+			case "${user_answer}" in
+				1|caching_sha2_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+					;;
+				2|mysql_native_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+					;;
+				'')
+					die "No authentication plugin selected!"
+					;;
+				*)
+					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+					;;
+			esac
+
+			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
+			unset user_answer
+		fi
+
+		local cfg_option cfg_option_tabs cfg_section
+		for config_file in "${config_files[@]}" ; do
+			cfg_option="default-authentication-plugin"
+			cfg_section="mysqld"
+			cfg_option_tabs="\t\t"
+			if [[ "${config_file}" == *client.cnf ]] ; then
+				cfg_option="default-auth"
+				cfg_section="client"
+				cfg_option_tabs="\t\t\t\t"
+			fi
+
+			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+			else
+				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+			fi
+		done
+		unset cfg_option cfg_option_tabs cfg_section
+	fi
+	unset config_files config_file
+
+	echo
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-10-16  3:42 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2021-10-16  3:42 UTC (permalink / raw
  To: gentoo-commits

commit:     cd8d0481198229aafb5cda6a3ed36418f5d103f0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 16 02:42:37 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 16 03:42:34 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd8d0481

dev-db/mysql: mark -ppc for >= 8.0.22 due to failing assert

See: b5e09c85854df9e309ab2c146ca42d7f37523632
Bug: https://bugs.gentoo.org/761715
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.22.ebuild    | 3 ++-
 dev-db/mysql/mysql-8.0.23.ebuild    | 3 ++-
 dev-db/mysql/mysql-8.0.25-r1.ebuild | 3 ++-
 dev-db/mysql/mysql-8.0.25.ebuild    | 3 ++-
 dev-db/mysql/mysql-8.0.26.ebuild    | 3 ++-
 5 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.22.ebuild b/dev-db/mysql/mysql-8.0.22.ebuild
index 1c0cd3052d7..7ba23d865df 100644
--- a/dev-db/mysql/mysql-8.0.22.ebuild
+++ b/dev-db/mysql/mysql-8.0.22.ebuild
@@ -36,7 +36,8 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+# -ppc, -riscv for bug #761715
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.23.ebuild b/dev-db/mysql/mysql-8.0.23.ebuild
index 4de06f95e60..2ad3f320946 100644
--- a/dev-db/mysql/mysql-8.0.23.ebuild
+++ b/dev-db/mysql/mysql-8.0.23.ebuild
@@ -36,7 +36,8 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+# -ppc, -riscv for bug #761715
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.25-r1.ebuild b/dev-db/mysql/mysql-8.0.25-r1.ebuild
index a3ee94b3523..9a4e4b01dc9 100644
--- a/dev-db/mysql/mysql-8.0.25-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.25-r1.ebuild
@@ -36,7 +36,8 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+# -ppc, -riscv for bug #761715
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.25.ebuild b/dev-db/mysql/mysql-8.0.25.ebuild
index e6f484e40ad..57a120868df 100644
--- a/dev-db/mysql/mysql-8.0.25.ebuild
+++ b/dev-db/mysql/mysql-8.0.25.ebuild
@@ -36,7 +36,8 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+# -ppc, -riscv for bug #761715
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips -ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.26.ebuild b/dev-db/mysql/mysql-8.0.26.ebuild
index 3ea480113f1..7667bc29e60 100644
--- a/dev-db/mysql/mysql-8.0.26.ebuild
+++ b/dev-db/mysql/mysql-8.0.26.ebuild
@@ -36,7 +36,8 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 -riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+# -ppc, -riscv for bug #761715
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips -ppc ~ppc64 -riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-10-16  2:45 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2021-10-16  2:45 UTC (permalink / raw
  To: gentoo-commits

commit:     f1f17e096f25877d373c13281d35cacd1a7376c1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 16 02:45:20 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 16 02:45:20 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1f17e09

dev-db/mysql: Stabilize 5.7.34 ppc, #789243

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.34.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.34.ebuild b/dev-db/mysql/mysql-5.7.34.ebuild
index 65e29a19bda..6a6d053d9b4 100644
--- a/dev-db/mysql/mysql-5.7.34.ebuild
+++ b/dev-db/mysql/mysql-5.7.34.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-10-16  2:45 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2021-10-16  2:45 UTC (permalink / raw
  To: gentoo-commits

commit:     92064d3f9aa08056e6dde266035736b850e5ab43
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 16 02:44:55 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 16 02:44:55 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92064d3f

dev-db/mysql: Stabilize 8.0.25 ppc64, #789243

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.25.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.25.ebuild b/dev-db/mysql/mysql-8.0.25.ebuild
index ff25813ae95..e6f484e40ad 100644
--- a/dev-db/mysql/mysql-8.0.25.ebuild
+++ b/dev-db/mysql/mysql-8.0.25.ebuild
@@ -36,7 +36,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-10-16  2:45 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2021-10-16  2:45 UTC (permalink / raw
  To: gentoo-commits

commit:     57f9bad268e76c19f9dc1934404ccbc449711e2c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 16 02:44:54 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 16 02:44:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57f9bad2

dev-db/mysql: Stabilize 5.7.34 ppc64, #789243

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.34.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.34.ebuild b/dev-db/mysql/mysql-5.7.34.ebuild
index 4408c89a3b8..65e29a19bda 100644
--- a/dev-db/mysql/mysql-5.7.34.ebuild
+++ b/dev-db/mysql/mysql-5.7.34.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-10-14  9:44 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2021-10-14  9:44 UTC (permalink / raw
  To: gentoo-commits

commit:     ad49376a400c9203a0bb6361f2396c71b58a2fbc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 14 09:44:42 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct 14 09:44:42 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad49376a

dev-db/mysql: Stabilize 8.0.25 arm, #789243

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.25.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.25.ebuild b/dev-db/mysql/mysql-8.0.25.ebuild
index 838dacd17d7..ff25813ae95 100644
--- a/dev-db/mysql/mysql-8.0.25.ebuild
+++ b/dev-db/mysql/mysql-8.0.25.ebuild
@@ -36,7 +36,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-10-14  9:44 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2021-10-14  9:44 UTC (permalink / raw
  To: gentoo-commits

commit:     85d3db88a6e4032199397337a27dbc0e00902711
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 14 09:44:41 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct 14 09:44:41 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85d3db88

dev-db/mysql: Stabilize 5.7.34 arm, #789243

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.34.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.34.ebuild b/dev-db/mysql/mysql-5.7.34.ebuild
index c2bab2805bd..4408c89a3b8 100644
--- a/dev-db/mysql/mysql-5.7.34.ebuild
+++ b/dev-db/mysql/mysql-5.7.34.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-10-12  0:10 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2021-10-12  0:10 UTC (permalink / raw
  To: gentoo-commits

commit:     db148176299258a2ed99e90e399a0c14b62a64bd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 12 00:09:50 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 12 00:09:50 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db148176

dev-db/mysql: Stabilize 8.0.25 arm64, #789243

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.25.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.25.ebuild b/dev-db/mysql/mysql-8.0.25.ebuild
index 98b2c22e5b2..838dacd17d7 100644
--- a/dev-db/mysql/mysql-8.0.25.ebuild
+++ b/dev-db/mysql/mysql-8.0.25.ebuild
@@ -36,7 +36,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-10-12  0:10 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2021-10-12  0:10 UTC (permalink / raw
  To: gentoo-commits

commit:     e4553829582ddb35c8442741188acc696faba876
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 12 00:09:49 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 12 00:09:49 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4553829

dev-db/mysql: Stabilize 5.7.34 arm64, #789243

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.34.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.34.ebuild b/dev-db/mysql/mysql-5.7.34.ebuild
index 998dc2dbcc4..c2bab2805bd 100644
--- a/dev-db/mysql/mysql-5.7.34.ebuild
+++ b/dev-db/mysql/mysql-5.7.34.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-09-22 12:16 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-09-22 12:16 UTC (permalink / raw
  To: gentoo-commits

commit:     e21cad70e47bfd6d8f0f55f9246c940a53acd97b
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 22 12:04:01 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Sep 22 12:16:32 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e21cad70

dev-db/mysql: drop old

Bug: https://github.com/gentoo/gentoo/pull/20679
Bug: https://github.com/gentoo/gentoo/pull/22237
Package-Manager: Portage-3.0.23, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest               |   14 -
 dev-db/mysql/metadata.xml           |    1 -
 dev-db/mysql/mysql-5.7.27-r2.ebuild |  995 ----------------------------
 dev-db/mysql/mysql-5.7.29-r1.ebuild |  986 ----------------------------
 dev-db/mysql/mysql-5.7.30-r1.ebuild |  977 ----------------------------
 dev-db/mysql/mysql-5.7.31.ebuild    | 1227 -----------------------------------
 dev-db/mysql/mysql-8.0.19-r2.ebuild | 1160 ---------------------------------
 dev-db/mysql/mysql-8.0.20-r1.ebuild | 1143 --------------------------------
 dev-db/mysql/mysql-8.0.21-r1.ebuild | 1166 ---------------------------------
 9 files changed, 7669 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index b1c2887c3e0..709e33edbfe 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,32 +1,18 @@
-DIST mysql-5.7.30-patches-01.tar.xz 6684 BLAKE2B 9350280094619fda0d91eacae573396198954fceb5dc039669d236b1dad98eef306702550b517ef30ee3d0e6721667b6f5549df91e3c15cef68888079c00d9ba SHA512 74e8e8794fe54b73776b38296aa42c65547311b80bfe65c88b2f961bd44083e9628eb47da4ebcf4c20e2d7c694f514223bcbf29cce27853cca500710ae97778d
-DIST mysql-5.7.31-patches-01.tar.xz 6664 BLAKE2B 8225f286f0090653f9714545daa95ccdadaa58812e55284d1ee52ad2dcca18960b9266797630762595d832aa1dda1d9e2df691f0c728102f162b376346c99b3c SHA512 c6260e688da6e8f049ba7ac0553ad442e76829deaca32c1b7a101ec927a36b1571cb24982391f05545a9f62d94502efc09530d444e4abfc08350ab4c19fbfd37
 DIST mysql-5.7.32-patches-01.tar.xz 6660 BLAKE2B 5c63158615398bdcc4480a0e1b058f491b39ffc7ee33767b425f3b254555411031f64d865e1924afe8aa3926e4cba18049f1219a0a8acc702bc5e011c94fa947 SHA512 bf5e0d27af81e599005268ee243af4cd93f6df95c32cccb268a749322b4e5f73a2ce5d51f0ad1b0e1f2cf4702b8a05e4b2e0b73110fd4aac61f2a0f51bf4952e
 DIST mysql-5.7.33-patches-01.tar.xz 6672 BLAKE2B cfa410f9ba5a4ba7e43923e7b5940c2dc6a9356b49230ebaea24bd7eef8a9639fc746e917c22241e19c830b81252e95f38e2c9d6054494de700bae46011fb2f4 SHA512 b16bb9531c44f1c5ec9c08aee6c1f5f5d2e3fe59a0039a54f6c050660a18f7c78b955e7eea7bef4e7dccfcdaa81464e0d8e47ac7d0e40ecb90187865a8a0412e
 DIST mysql-5.7.34-patches-01.tar.xz 6676 BLAKE2B b925880bfbb991fcba81964ff658a2ecab38da637a6093270a724ab8e405ab092d5fb9684f53f44d001e34287366df234b841d9ebcae62d49becdb93a3c3e324 SHA512 80a89f4b4a7ecc04f3115c6aaa0b0013e38c2813fa6dea095e826ef3944298715a48e0deacb691d23526b1524b207c83176290faea2461d3fcd94edabe3d8943
 DIST mysql-5.7.34-patches-02.tar.xz 6408 BLAKE2B fdb36247832b6282af94ce2f61b5dd77f6b45f9efca4b438ecd5fed8d810d9d51547d0ae3de085e7f5dcc8795b4bc4f1210902495b92859e1d5aec3048256ef3 SHA512 f0513eb7f0c9e415aa972a53af668939934ea4f4fa438f468f32a46ccc2aa3b84ba8edd999e4786256ada34851ad64c81e9dd0e36c2a21da641987dfd18635c3
 DIST mysql-5.7.35-patches-01.tar.xz 6408 BLAKE2B ddead9d6f5570f23433ffaef0188a8e93c0220b3d59ae24b870927e9e5908619f357725c1ab2d16905f39dd9d5f6cd23d3aabf6a1df2abdc865683f603912b8f SHA512 6374536299c691fd12a3f8b7cd27291e6f3b0b6d159284b2866caaed6a7f124439c16e659e6da5aae9e72d613de2a1e1b80066c961e122e90ad644e9a32633cc
-DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
-DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
 DIST mysql-8.0.22-patches-02.tar.xz 7580 BLAKE2B a50704c3c58b1f67ca86edb233544137927b0ae5fdf302687b48f6fd30fbbd26798e8ef8282662586b25a7240b47278b44f944a8ca59f1a198bc228dd74459c9 SHA512 59f864452e9fdebe4d3990eff8b756e9bbfad58da216b74fa8b7e8391cb0d9d543ca2828591b9ed1ee276c1dec9e1851a8c2683507f0a326c85054e31cc3f950
 DIST mysql-8.0.23-patches-01.tar.xz 7568 BLAKE2B 222120dcb5556457f382eefbb10f66f46fe1673c64730c8c8a5566942031bc98bab1f1182f747e79e23fccfb6b09197d5c2874aa2087104b6f1eaa25ea9fd60c SHA512 54222c420d57c1b206d920f22738746925ed1e0d78683f01c97cac5bd1d3450f70f784a7f603304b8595fb58120e691f94e28fa1d1884a7cc8bea1d7b177470f
 DIST mysql-8.0.25-patches-01.tar.xz 3604 BLAKE2B 09cccab204c30d16bdc374bcd01d4a8e6298955f86f479b8e287aab74fb6bd9857547e360be725dfc66acb56e1bb5665277d340761d0110a8823763ad4d2d1f4 SHA512 6d90a34a20e9cbc7e7a9b5b63a1408f33ac8523f2be6c9ab6d9ad7589c3ded83c87e460d782d4d8c33f11b337151fd8db994099e371260ecf204933e844eb50e
 DIST mysql-8.0.25-patches-02.tar.xz 6456 BLAKE2B c9c1020a505ebcee836f8dc3bbe540ff924a0174daf36c37b852df267a81919d37581d1c9be037d52cdcd34c27c5c34d3f0af6160857b22d8ab4d8ece37798e0 SHA512 3c3726b397f3a6fb1d84396bb571b4903a167c9a47273b9d5996949e1d3febc96d3528bfa8dfaeea073a245051ae10c983f2ad258268babc91649563ce3cfc00
 DIST mysql-8.0.26-patches-01.tar.xz 6980 BLAKE2B 5fc86125b622ac978dc7ec3d6954a1d366315a57b6f56ca8dade9ad4a255b4b793ad33736404b29ab2db12f726897f014aeec9232dc52954087e7533d0f593d2 SHA512 00e6478716cf857b8ab768ec481dc1e7d809db17a9d899a52822f61dcc18797e87c0eecfafb1bb9065895c1b261c03c87fe0593b59dc86fb40853b0c660c9bfb
-DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
-DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
-DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
-DIST mysql-boost-5.7.31.tar.gz 51382559 BLAKE2B 86430ee01b0b066ffbd1c876c7d09afecdd57f99cfe07417f406345bcdb14cc6fd33a2d4d92dfe15e87f34ec476bf34d62508ac3f99fb3e11957458e0d6ec20b SHA512 d7fc1927c860562d121658031bcbd58d36a942340423bf7b692cef84c29e67b56d009c9f9bb10cde8acabd6f9db58c67eb542349eccc4719fb38c8570738700a
 DIST mysql-boost-5.7.32.tar.gz 52882168 BLAKE2B dd112fa1d8bd29d86fba076675b5b7c9c98b6fb876aed45a00e8a25be716102fc9aa688b7170bef07b1c9f9751737277774d8fb2c64c21e181ecae58f89b4a8a SHA512 33a617d040efd065ea1c2ad84be537f851480abd5cc8a6879b7f170bc4e6db9432bd03f2a6bc680b71f17839c508cab0e7ef1a3aba032197da1b7943c916c77a
 DIST mysql-boost-5.7.33.tar.gz 52912380 BLAKE2B bca09314ae73932f6095799faa016998e65655cf5ea74d5596dcdc785e77014fe0b29a6c123e8618771f4a20a19978df00f7b79eea329aeb4b536ae71a4bef94 SHA512 1d1e1e5934fb17ff731fea45b88d4af6a394c2fbf0177a87803b18cb0eb4fb8d4939f82fc22b6cbc2af64022a44e206cd23e2e88ce11cc119c3ea22129d54e7a
 DIST mysql-boost-5.7.34.tar.gz 52891142 BLAKE2B 986fe106d73495ea9acb837f699ef2b1ffd123d9728b61da42f990d670569f1f7c12dc0a8611c3a7b6e3ed7be9fc277e1a977fa6c6d06f7d156a2f492951d9c7 SHA512 4eab7e90477b75643df743d806d5abcfb56572a2aa003a354980287c9148209f4fb7f0158ba969fb0462c32e49fcb4cf2a79f0330ab1bd2b243725dbf6f31d6d
 DIST mysql-boost-5.7.35.tar.gz 52959014 BLAKE2B 02cbc2201176773516479636ab40828a98bbc6bc1e90060e36d36af5c20a84b4b415d6e467328890ecff044834c81458fff8b717fd8942196dcf35e0ae85f298 SHA512 2469c8e13a236aee327bc0828804ba189e3abf78b6e0b3ef65b2343210f9c0cd5313d18b57ae3b76ca1487dc1d70854c8a12e6da61a6fffbce95854dcc792482
-DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
-DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99
-DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1
 DIST mysql-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-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
-DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1
-DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index d2c76395be3..d24d1320721 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -21,6 +21,5 @@ dev-db/mariadb
   <flag name="server">Build the server program</flag>
   <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
   <flag name="test">Install upstream testsuites for end use.</flag>
-  <flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag>
 </use>
 </pkgmetadata>

diff --git a/dev-db/mysql/mysql-5.7.27-r2.ebuild b/dev-db/mysql/mysql-5.7.27-r2.ebuild
deleted file mode 100644
index e1cf579b3c7..00000000000
--- a/dev-db/mysql/mysql-5.7.27-r2.ebuild
+++ /dev/null
@@ -1,995 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20190822-1908Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit cmake-utils eutils flag-o-matic linux-info \
-	prefix toolchain-funcs multilib-minimal
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test yassl"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.26-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-mips-ASM.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-build-without-server.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="net-misc/curl:=
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	sys-libs/ncurses:0=
-	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-	)
-	jemalloc? ( dev-libs/jemalloc:0= )
-	kernel_linux? (
-		dev-libs/libaio:0=
-		sys-process/procps:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	!yassl? (
-		client-libs? (
-			>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
-		)
-		!client-libs? (
-			>=dev-libs/openssl-1.0.0:0=
-		)
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	virtual/yacc
-	server? (
-		dev-libs/libevent
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:8.0
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? (
-		!prefix? (
-			acct-group/mysql acct-user/mysql
-			dev-db/mysql-init-scripts
-		)
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]] ; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if use numa ; then
-		local CONFIG_CHECK="~NUMA"
-
-		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-		check_extra_config
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	cmake-utils_src_prepare
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/extra/libevent \
-		"${S}"/zlib \
-		|| die
-
-	# Don't clash with dev-db/mysql-connector-c
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use yassl ; then
-		mycmakeargs+=( -DWITH_SSL=system )
-	else
-		mycmakeargs+=( -DWITH_SSL=bundled )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake-utils_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]] ; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf ; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
-	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in \
-		main.xa_prepared_binlog_off \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_non_direct_stm_mixing_engines \
-	; do
-		_disable_test "$t" "Unstable test"
-	done
-
-	for t in \
-		gis.geometry_class_attri_prop \
-		gis.geometry_property_function_issimple \
-		gis.gis_bugs_crashes \
-		gis.spatial_op_testingfunc_mix \
-		gis.spatial_analysis_functions_buffer \
-		gis.spatial_analysis_functions_distance \
-		gis.spatial_utility_function_distance_sphere \
-		gis.spatial_utility_function_simplify \
-		gis.spatial_analysis_functions_centroid \
-	; do
-		_disable_test "$t" "Known rounding error with latest AMD processors"
-	done
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	if has_version '>=dev-libs/openssl-1.1.1' ; then
-		# Tests are expecting <openssl-1.1.1 default cipher
-		for t in \
-			auth_sec.cert_verify \
-			auth_sec.mysql_ssl_connection \
-			auth_sec.openssl_cert_generation \
-			auth_sec.ssl_auto_detect \
-			auth_sec.ssl_mode \
-			auth_sec.tls \
-			binlog.binlog_grant_alter_user \
-			encryption.innodb_onlinealter_encryption \
-			main.grant_alter_user_qa \
-			main.grant_user_lock_qa \
-			main.mysql_ssl_default \
-			main.openssl_1 \
-			main.plugin_auth_sha256_tls \
-			main.ssl \
-			main.ssl_8k_key \
-			main.ssl_bug75311 \
-			main.ssl_ca \
-			main.ssl_cipher \
-			main.ssl_compress \
-			main.ssl_crl \
-			main.ssl_ecdh \
-			main.ssl_verify_identity \
-			x.connection_tls_version \
-			x.connection_openssl \
-		; do
-			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-
-	cmake-utils_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
-		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
-			if [[ -d "${MY_DATADIR_s}" ]] ; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]] ; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
-	fi
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
-	fi
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR%/}/mysqld-help"
-	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	echo "USE mysql;" >"${sqltmp}"
-	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
-	chown mysql "${sqltmp}" || die
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
-	cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT%/}/usr/sbin/mysqld \
-		${options} \
-		$(use prefix || echo --user=mysql) \
-		--log-warnings=0 \
-		--basedir=${EROOT%/}/usr \
-		--datadir=${ROOT%/}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile} \
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]] ; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
-	"${EROOT%/}/usr/bin/mysql" \
-		--no-defaults \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}

diff --git a/dev-db/mysql/mysql-5.7.29-r1.ebuild b/dev-db/mysql/mysql-5.7.29-r1.ebuild
deleted file mode 100644
index a68c2ae2ff7..00000000000
--- a/dev-db/mysql/mysql-5.7.29-r1.ebuild
+++ /dev/null
@@ -1,986 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20200125-1945Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit cmake-utils eutils flag-o-matic linux-info \
-	prefix toolchain-funcs multilib-minimal
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.29-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-build-without-server.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="net-misc/curl:=
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	sys-libs/ncurses:0=
-	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-	)
-	jemalloc? ( dev-libs/jemalloc:0= )
-	kernel_linux? (
-		dev-libs/libaio:0=
-		sys-process/procps:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	client-libs? (
-		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
-	)
-	!client-libs? (
-		>=dev-libs/openssl-1.0.0:0=
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	virtual/yacc
-	server? (
-		dev-libs/libevent
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:8.0
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? (
-		!prefix? (
-			acct-group/mysql acct-user/mysql
-			dev-db/mysql-init-scripts
-		)
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]] ; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if use numa ; then
-		local CONFIG_CHECK="~NUMA"
-
-		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-		check_extra_config
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	cmake-utils_src_prepare
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/extra/libevent \
-		"${S}"/zlib \
-		|| die
-
-	# Don't clash with dev-db/mysql-connector-c
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake-utils_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]] ; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf ; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
-	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in \
-		main.xa_prepared_binlog_off \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_non_direct_stm_mixing_engines \
-	; do
-		_disable_test "$t" "Unstable test"
-	done
-
-	for t in \
-		gis.geometry_class_attri_prop \
-		gis.geometry_property_function_issimple \
-		gis.gis_bugs_crashes \
-		gis.spatial_op_testingfunc_mix \
-		gis.spatial_analysis_functions_buffer \
-		gis.spatial_analysis_functions_distance \
-		gis.spatial_utility_function_distance_sphere \
-		gis.spatial_utility_function_simplify \
-		gis.spatial_analysis_functions_centroid \
-	; do
-		_disable_test "$t" "Known rounding error with latest AMD processors"
-	done
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	if has_version '>=dev-libs/openssl-1.1.1' ; then
-		# Tests are expecting <openssl-1.1.1 default cipher
-		for t in \
-			auth_sec.cert_verify \
-			auth_sec.mysql_ssl_connection \
-			auth_sec.openssl_cert_generation \
-			auth_sec.ssl_auto_detect \
-			auth_sec.ssl_mode \
-			auth_sec.tls \
-			binlog.binlog_grant_alter_user \
-			encryption.innodb_onlinealter_encryption \
-			main.grant_alter_user_qa \
-			main.grant_user_lock_qa \
-			main.mysql_ssl_default \
-			main.openssl_1 \
-			main.plugin_auth_sha256_tls \
-			main.ssl \
-			main.ssl_8k_key \
-			main.ssl_bug75311 \
-			main.ssl_ca \
-			main.ssl_cipher \
-			main.ssl_compress \
-			main.ssl_crl \
-			main.ssl_ecdh \
-			main.ssl_verify_identity \
-			x.connection_tls_version \
-			x.connection_openssl \
-		; do
-			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-
-	cmake-utils_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
-		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
-			if [[ -d "${MY_DATADIR_s}" ]] ; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]] ; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
-	fi
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
-	fi
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR%/}/mysqld-help"
-	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	echo "USE mysql;" >"${sqltmp}"
-	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
-	chown mysql "${sqltmp}" || die
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
-	cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT%/}/usr/sbin/mysqld \
-		${options} \
-		$(use prefix || echo --user=mysql) \
-		--log-warnings=0 \
-		--basedir=${EROOT%/}/usr \
-		--datadir=${ROOT%/}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile} \
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]] ; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
-	"${EROOT%/}/usr/bin/mysql" \
-		--no-defaults \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}

diff --git a/dev-db/mysql/mysql-5.7.30-r1.ebuild b/dev-db/mysql/mysql-5.7.30-r1.ebuild
deleted file mode 100644
index 8df5b377bb6..00000000000
--- a/dev-db/mysql/mysql-5.7.30-r1.ebuild
+++ /dev/null
@@ -1,977 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit cmake-utils eutils flag-o-matic linux-info \
-	prefix toolchain-funcs multilib-minimal
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.30-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="net-misc/curl:=
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	sys-libs/ncurses:0=
-	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-	)
-	jemalloc? ( dev-libs/jemalloc:0= )
-	kernel_linux? (
-		dev-libs/libaio:0=
-		sys-process/procps:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	client-libs? (
-		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
-	)
-	!client-libs? (
-		>=dev-libs/openssl-1.0.0:0=
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	virtual/yacc
-	server? (
-		dev-libs/libevent
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:8.0
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? (
-		!prefix? (
-			acct-group/mysql acct-user/mysql
-			dev-db/mysql-init-scripts
-		)
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]] ; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if use numa ; then
-		local CONFIG_CHECK="~NUMA"
-
-		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-		check_extra_config
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	cmake-utils_src_prepare
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/extra/libevent \
-		"${S}"/zlib \
-		|| die
-
-	# Don't clash with dev-db/mysql-connector-c
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake-utils_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]] ; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf ; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
-	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in \
-		main.xa_prepared_binlog_off \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_non_direct_stm_mixing_engines \
-	; do
-		_disable_test "$t" "Unstable test"
-	done
-
-	for t in \
-		gis.geometry_class_attri_prop \
-		gis.geometry_property_function_issimple \
-		gis.gis_bugs_crashes \
-		gis.spatial_op_testingfunc_mix \
-		gis.spatial_analysis_functions_buffer \
-		gis.spatial_analysis_functions_distance \
-		gis.spatial_utility_function_distance_sphere \
-		gis.spatial_utility_function_simplify \
-		gis.spatial_analysis_functions_centroid \
-		main.with_recursive \
-	; do
-		_disable_test "$t" "Known rounding error with latest AMD processors"
-	done
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
-	fi
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	if has_version '>=dev-libs/openssl-1.1.1' ; then
-		# Tests are expecting <openssl-1.1.1 default cipher
-		for t in \
-			auth_sec.cert_verify \
-			auth_sec.mysql_ssl_connection \
-			auth_sec.openssl_cert_generation \
-			auth_sec.ssl_auto_detect \
-			auth_sec.ssl_mode \
-			auth_sec.tls \
-			binlog.binlog_grant_alter_user \
-			encryption.innodb_onlinealter_encryption \
-			main.grant_alter_user_qa \
-			main.grant_user_lock_qa \
-			main.mysql_ssl_default \
-			main.openssl_1 \
-			main.plugin_auth_sha256_tls \
-			main.ssl \
-			main.ssl_8k_key \
-			main.ssl_bug75311 \
-			main.ssl_ca \
-			main.ssl_cipher \
-			main.ssl_compress \
-			main.ssl_crl \
-			main.ssl_ecdh \
-			main.ssl_verify_identity \
-			x.connection_tls_version \
-			x.connection_openssl \
-		; do
-			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-
-	cmake-utils_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${EROOT%/}/usr/bin/my_print_defaults"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
-		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
-			if [[ -d "${MY_DATADIR_s}" ]] ; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]] ; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
-	fi
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
-	fi
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp "${EROOT%/}/tmp")"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR%/}/mysqld-help"
-	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	echo "USE mysql;" >"${sqltmp}"
-	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
-	chown mysql "${sqltmp}" || die
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
-	cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT%/}/usr/sbin/mysqld \
-		${options} \
-		$(use prefix || echo --user=mysql) \
-		--log-warnings=0 \
-		--basedir=${EROOT%/}/usr \
-		--datadir=${ROOT%/}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile} \
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]] ; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
-	"${EROOT%/}/usr/bin/mysql" \
-		--no-defaults \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}

diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
deleted file mode 100644
index c5a202eecc1..00000000000
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ /dev/null
@@ -1,1227 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs multilib-minimal
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.31-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="
-	sys-libs/ncurses:0=
-	client-libs? (
-		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
-		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
-	)
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-		>=dev-libs/openssl-1.0.0:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=[ssl]
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	virtual/yacc
-	server? (
-		dev-libs/libevent:=[ssl]
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:8.0
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? (
-		!prefix? (
-			acct-group/mysql acct-user/mysql
-			dev-db/mysql-init-scripts
-		)
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="3G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="3G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/extra/libevent \
-		"${S}"/zlib \
-		|| die
-
-	# Don't clash with dev-db/mysql-connector-c
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf ; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
-	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in \
-		main.xa_prepared_binlog_off \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_non_direct_stm_mixing_engines \
-	; do
-		_disable_test "$t" "Unstable test"
-	done
-
-	for t in \
-		gis.geometry_class_attri_prop \
-		gis.geometry_property_function_issimple \
-		gis.gis_bugs_crashes \
-		gis.spatial_op_testingfunc_mix \
-		gis.spatial_analysis_functions_buffer \
-		gis.spatial_analysis_functions_distance \
-		gis.spatial_utility_function_distance_sphere \
-		gis.spatial_utility_function_simplify \
-		gis.spatial_analysis_functions_centroid \
-		main.with_recursive \
-	; do
-		_disable_test "$t" "Known rounding error with latest AMD processors"
-	done
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
-	fi
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	if has_version '>=dev-libs/openssl-1.1.1' ; then
-		# Tests are expecting <openssl-1.1.1 default cipher
-		for t in \
-			auth_sec.cert_verify \
-			auth_sec.mysql_ssl_connection \
-			auth_sec.openssl_cert_generation \
-			auth_sec.ssl_auto_detect \
-			auth_sec.ssl_mode \
-			auth_sec.tls \
-			binlog.binlog_grant_alter_user \
-			encryption.innodb_onlinealter_encryption \
-			main.grant_alter_user_qa \
-			main.grant_user_lock_qa \
-			main.mysql_ssl_default \
-			main.openssl_1 \
-			main.plugin_auth_sha256_tls \
-			main.ssl \
-			main.ssl_8k_key \
-			main.ssl_bug75311 \
-			main.ssl_ca \
-			main.ssl_cipher \
-			main.ssl_compress \
-			main.ssl_crl \
-			main.ssl_ecdh \
-			main.ssl_verify_identity \
-			x.connection_tls_version \
-			x.connection_openssl \
-		; do
-			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-	cmake_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}

diff --git a/dev-db/mysql/mysql-8.0.19-r2.ebuild b/dev-db/mysql/mysql-8.0.19-r2.ebuild
deleted file mode 100644
index f979bb9020f..00000000000
--- a/dev-db/mysql/mysql-8.0.19-r2.ebuild
+++ /dev/null
@@ -1,1160 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-MY_EXTRAS_VER="20200317-0103Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit cmake-utils flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs check-reqs
-
-MY_PV="${PV//_pre*}"
-MY_P="${PN}-${MY_PV}"
-
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
-	router selinux +server tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )
-	cjk? ( server )
-	jemalloc? ( server )
-	numa? ( server )
-	profiling? ( server )
-	router? ( server )
-	tcmalloc? ( server )"
-
-KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-8.0.17.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-8.0.18.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.19-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.19-fix-events_bugs-test.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	>=app-arch/lz4-0_p131:=
-	sys-libs/ncurses:0=
-	>=sys-libs/zlib-1.2.3:0=
-	>=dev-libs/openssl-1.0.0:0=
-	server? (
-		dev-libs/icu:=
-		dev-libs/libevent:=
-		>=dev-libs/protobuf-3.8:=
-		net-libs/libtirpc:=
-		cjk? ( app-text/mecab:= )
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-		tcmalloc? ( dev-util/google-perftools:0= )
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	virtual/yacc
-	server? ( net-libs/rpcsvc-proto )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:5.7
-	selinux? ( sec-policy/selinux-mysql )
-	!prefix? (
-		acct-group/mysql acct-user/mysql
-		dev-db/mysql-init-scripts
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-CHECKREQS_DISK_BUILD="8G"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} == binary ]] && return
-	use server && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if has test ${FEATURES} ; then
-		# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-		# localhost. Also causes weird failures.
-		[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-		if ! has userpriv ${FEATURES} ; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-
-		local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-		[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-			&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-		if use latin1 ; then
-			# Upstream only supports tests with default charset
-			die "Testing with USE=latin1 is not supported."
-		fi
-	fi
-
-	if use kernel_linux ; then
-		if use numa ; then
-			linux-info_get_any_version
-
-			local CONFIG_CHECK="~NUMA"
-
-			local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-			WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-			check_extra_config
-		fi
-	fi
-
-	use server && check-reqs_pkg_setup
-}
-
-src_unpack() {
-	unpack ${A}
-
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
-}
-
-src_prepare() {
-	# Avoid rpm call which would trigger sandbox, #692368
-	sed -i \
-		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
-		CMakeLists.txt || die
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove man pages for client-lib tools we don't install
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	cmake-utils_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		# Using bundled editline to get CTRL+C working
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-		-DWITH_ROUTER=$(usex router ON OFF)
-	)
-
-	if is-flagq -fno-lto ; then
-		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
-		mycmakeargs+=( -DWITH_LTO=OFF )
-	elif is-flagq -flto ; then
-		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
-		myconf+=( -DWITH_LTO=ON )
-	else
-		# Disable automagic
-		myconf+=( -DWITH_LTO=OFF )
-	fi
-
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-
-	mycmakeargs+=(
-		-DWITH_ICU=system
-		-DWITH_LZ4=system
-		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
-		-DWITH_RAPIDJSON=bundled
-	)
-
-	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
-		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-		ewarn "You MUST file bugs without these variables set."
-		ewarn "Tests will probably fail!"
-
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-		)
-	elif use latin1 ; then
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=latin1
-			-DDEFAULT_COLLATION=latin1_swedish_ci
-		)
-	else
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=utf8mb4
-			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
-		)
-	fi
-
-	if use server ; then
-		mycmakeargs+=(
-			-DWITH_EXTRA_CHARSETS=all
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_LIBEVENT=system
-			-DWITH_PROTOBUF=system
-			-DWITH_NUMA=$(usex numa ON OFF)
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_SYSTEMD=no
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='perl server' \
-# FEATURES='test userpriv' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname bug reason
-		rawtestname="${1}" ; shift
-		bug="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
-		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-
-	local -a disabled_tests
-	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
-	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
-	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
-	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
-	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
-	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
-
-	local test_infos_str test_infos_arr
-	for test_infos_str in "${disabled_tests[@]}" ; do
-		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
-		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
-			die "Invalid test data set, not matching format: ${test_infos_str}"
-		fi
-
-		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
-	done
-	unset test_infos_str test_infos_arr
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	mycnf_src="my.cnf-8.0.distro-server"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR}/${mycnf_src}" \
-		> "${TMPDIR}/my.cnf.ok" || die
-
-	if use prefix ; then
-		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8mb4|latin1|g" \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	eprefixify "${TMPDIR}/my.cnf.ok"
-
-	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-
-	if use router ; then
-		rm -rf \
-			"${ED}/usr/LICENSE.router" \
-			"${ED}/usr/README.router" \
-			"${ED}/usr/run" \
-			"${ED}/usr/var" \
-			|| die
-	fi
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	# NOTE: $MY_LOGDIR contains $EPREFIX by default
-	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-
-	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-		einfo
-		elog "You might want to run:"
-		elog "  \"emerge --config =${CATEGORY}/${PF}\""
-		elog "if this is a new install."
-		einfo
-	else
-		einfo
-		elog "Upgrade process for ${PN}-8.x has changed. Please read"
-		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
-		einfo
-	fi
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	local -a config_files
-
-	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
-	fi
-
-	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
-	fi
-
-	if [[ ${#config_files[@]} -gt 0 ]] ; then
-		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
-			local user_answer
-
-			echo
-			einfo "Please select default authentication plugin (enter number or plugin name):"
-			einfo "1) caching_sha2_password [MySQL 8.0 default]"
-			einfo "2) mysql_native_password [MySQL 5.7 default]"
-			einfo
-			einfo "For details see:"
-			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
-			read -p "    >" user_answer
-			echo
-
-			case "${user_answer}" in
-				1|caching_sha2_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
-					;;
-				2|mysql_native_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
-					;;
-				'')
-					die "No authentication plugin selected!"
-					;;
-				*)
-					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
-					;;
-			esac
-
-			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
-
-			unset user_answer
-		fi
-
-		local cfg_option cfg_option_tabs cfg_section
-		for config_file in "${config_files[@]}" ; do
-			cfg_option="default-authentication-plugin"
-			cfg_section="mysqld"
-			cfg_option_tabs="\t\t"
-			if [[ "${config_file}" == *client.cnf ]] ; then
-				cfg_option="default-auth"
-				cfg_section="client"
-				cfg_option_tabs="\t\t\t\t"
-			fi
-
-			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
-				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
-					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
-			else
-				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
-					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
-			fi
-		done
-		unset cfg_option cfg_option_tabs cfg_section
-	fi
-	unset config_files config_file
-
-	echo
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}

diff --git a/dev-db/mysql/mysql-8.0.20-r1.ebuild b/dev-db/mysql/mysql-8.0.20-r1.ebuild
deleted file mode 100644
index 70c3c6e5e87..00000000000
--- a/dev-db/mysql/mysql-8.0.20-r1.ebuild
+++ /dev/null
@@ -1,1143 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit cmake-utils flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs check-reqs
-
-MY_PV="${PV//_pre*}"
-MY_P="${PN}-${MY_PV}"
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.20-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
-	router selinux +server tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )
-	cjk? ( server )
-	jemalloc? ( server )
-	numa? ( server )
-	profiling? ( server )
-	router? ( server )
-	tcmalloc? ( server )"
-
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	>=app-arch/lz4-0_p131:=
-	sys-libs/ncurses:0=
-	>=sys-libs/zlib-1.2.3:0=
-	>=dev-libs/openssl-1.0.0:0=
-	server? (
-		dev-libs/icu:=
-		dev-libs/libevent:=
-		>=dev-libs/protobuf-3.8:=
-		net-libs/libtirpc:=
-		cjk? ( app-text/mecab:= )
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-		tcmalloc? ( dev-util/google-perftools:0= )
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	virtual/yacc
-	server? ( net-libs/rpcsvc-proto )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:5.7
-	selinux? ( sec-policy/selinux-mysql )
-	!prefix? (
-		acct-group/mysql acct-user/mysql
-		dev-db/mysql-init-scripts
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-CHECKREQS_DISK_BUILD="8G"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} == binary ]] && return
-	use server && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if has test ${FEATURES} ; then
-		# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-		# localhost. Also causes weird failures.
-		[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-		if ! has userpriv ${FEATURES} ; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-
-		local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-		[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-			&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-		if use latin1 ; then
-			# Upstream only supports tests with default charset
-			die "Testing with USE=latin1 is not supported."
-		fi
-	fi
-
-	if use kernel_linux ; then
-		if use numa ; then
-			linux-info_get_any_version
-
-			local CONFIG_CHECK="~NUMA"
-
-			local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-			WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-			check_extra_config
-		fi
-	fi
-
-	use server && check-reqs_pkg_setup
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	eapply_user
-
-	# Avoid rpm call which would trigger sandbox, #692368
-	sed -i \
-		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
-		CMakeLists.txt || die
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove man pages for client-lib tools we don't install
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	cmake-utils_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		# Using bundled editline to get CTRL+C working
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-		-DWITH_ROUTER=$(usex router ON OFF)
-	)
-
-	if is-flagq -fno-lto ; then
-		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
-		mycmakeargs+=( -DWITH_LTO=OFF )
-	elif is-flagq -flto ; then
-		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
-		myconf+=( -DWITH_LTO=ON )
-	else
-		# Disable automagic
-		myconf+=( -DWITH_LTO=OFF )
-	fi
-
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-
-	mycmakeargs+=(
-		-DWITH_ICU=system
-		-DWITH_LZ4=system
-		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
-		-DWITH_RAPIDJSON=bundled
-	)
-
-	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
-		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-		ewarn "You MUST file bugs without these variables set."
-		ewarn "Tests will probably fail!"
-
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-		)
-	elif use latin1 ; then
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=latin1
-			-DDEFAULT_COLLATION=latin1_swedish_ci
-		)
-	else
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=utf8mb4
-			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
-		)
-	fi
-
-	if use server ; then
-		mycmakeargs+=(
-			-DWITH_EXTRA_CHARSETS=all
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_LIBEVENT=system
-			-DWITH_PROTOBUF=system
-			-DWITH_NUMA=$(usex numa ON OFF)
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_SYSTEMD=no
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='perl server' \
-# FEATURES='test userpriv' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname bug reason
-		rawtestname="${1}" ; shift
-		bug="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
-		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-
-	local -a disabled_tests
-	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
-	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
-	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
-	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
-	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
-	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
-	fi
-
-	local test_infos_str test_infos_arr
-	for test_infos_str in "${disabled_tests[@]}" ; do
-		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
-		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
-			die "Invalid test data set, not matching format: ${test_infos_str}"
-		fi
-
-		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
-	done
-	unset test_infos_str test_infos_arr
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	mycnf_src="my.cnf-8.0.distro-server"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR}/${mycnf_src}" \
-		> "${TMPDIR}/my.cnf.ok" || die
-
-	if use prefix ; then
-		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8mb4|latin1|g" \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	eprefixify "${TMPDIR}/my.cnf.ok"
-
-	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-
-	if use router ; then
-		rm -rf \
-			"${ED}/usr/LICENSE.router" \
-			"${ED}/usr/README.router" \
-			"${ED}/usr/run" \
-			"${ED}/usr/var" \
-			|| die
-	fi
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	# NOTE: $MY_LOGDIR contains $EPREFIX by default
-	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-
-	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-		einfo
-		elog "You might want to run:"
-		elog "  \"emerge --config =${CATEGORY}/${PF}\""
-		elog "if this is a new install."
-		einfo
-	else
-		einfo
-		elog "Upgrade process for ${PN}-8.x has changed. Please read"
-		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
-		einfo
-	fi
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	local -a config_files
-
-	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
-	fi
-
-	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
-	fi
-
-	if [[ ${#config_files[@]} -gt 0 ]] ; then
-		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
-			local user_answer
-
-			echo
-			einfo "Please select default authentication plugin (enter number or plugin name):"
-			einfo "1) caching_sha2_password [MySQL 8.0 default]"
-			einfo "2) mysql_native_password [MySQL 5.7 default]"
-			einfo
-			einfo "For details see:"
-			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
-			read -p "    >" user_answer
-			echo
-
-			case "${user_answer}" in
-				1|caching_sha2_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
-					;;
-				2|mysql_native_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
-					;;
-				'')
-					die "No authentication plugin selected!"
-					;;
-				*)
-					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
-					;;
-			esac
-
-			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
-
-			unset user_answer
-		fi
-
-		local cfg_option cfg_option_tabs cfg_section
-		for config_file in "${config_files[@]}" ; do
-			cfg_option="default-authentication-plugin"
-			cfg_section="mysqld"
-			cfg_option_tabs="\t\t"
-			if [[ "${config_file}" == *client.cnf ]] ; then
-				cfg_option="default-auth"
-				cfg_section="client"
-				cfg_option_tabs="\t\t\t\t"
-			fi
-
-			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
-				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
-					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
-			else
-				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
-					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
-			fi
-		done
-		unset cfg_option cfg_option_tabs cfg_section
-	fi
-	unset config_files config_file
-
-	echo
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}

diff --git a/dev-db/mysql/mysql-8.0.21-r1.ebuild b/dev-db/mysql/mysql-8.0.21-r1.ebuild
deleted file mode 100644
index d63f3416d34..00000000000
--- a/dev-db/mysql/mysql-8.0.21-r1.ebuild
+++ /dev/null
@@ -1,1166 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs
-
-MY_PV="${PV//_pre*}"
-MY_P="${PN}-${MY_PV}"
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.21-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
-	${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
-	router selinux +server tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )
-	cjk? ( server )
-	jemalloc? ( server )
-	numa? ( server )
-	profiling? ( server )
-	router? ( server )
-	tcmalloc? ( server )"
-
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	>=app-arch/lz4-0_p131:=
-	app-arch/zstd:=
-	sys-libs/ncurses:0=
-	>=sys-libs/zlib-1.2.3:0=
-	>=dev-libs/openssl-1.0.0:0=
-	server? (
-		dev-libs/icu:=
-		dev-libs/libevent:=[ssl]
-		>=dev-libs/protobuf-3.8:=
-		net-libs/libtirpc:=
-		cjk? ( app-text/mecab:= )
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-		tcmalloc? ( dev-util/google-perftools:0= )
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	virtual/yacc
-	server? ( net-libs/rpcsvc-proto )
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	!dev-db/mysql:0
-	!dev-db/mysql:5.7
-	selinux? ( sec-policy/selinux-mysql )
-	!prefix? (
-		acct-group/mysql acct-user/mysql
-		dev-db/mysql-init-scripts
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		if use server ; then
-			CHECKREQS_DISK_BUILD="3G"
-
-			if has test $FEATURES ; then
-				CHECKREQS_DISK_BUILD="9G"
-			fi
-
-			check-reqs_pkg_pretend
-		fi
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		CHECKREQS_DISK_BUILD="3G"
-
-		if has test ${FEATURES} ; then
-			CHECKREQS_DISK_BUILD="9G"
-
-			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-			# localhost. Also causes weird failures.
-			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-			if ! has userpriv ${FEATURES} ; then
-				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-			fi
-
-			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-			if use latin1 ; then
-				# Upstream only supports tests with default charset
-				die "Testing with USE=latin1 is not supported."
-			fi
-		fi
-
-		if use kernel_linux ; then
-			if use numa ; then
-				linux-info_get_any_version
-
-				local CONFIG_CHECK="~NUMA"
-
-				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-				check_extra_config
-			fi
-		fi
-
-		use server && check-reqs_pkg_setup
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-
-	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
-}
-
-src_prepare() {
-	eapply "${WORKDIR}"/mysql-patches
-
-	# Avoid rpm call which would trigger sandbox, #692368
-	sed -i \
-		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
-		CMakeLists.txt || die
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove man pages for client-lib tools we don't install
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		# Using bundled editline to get CTRL+C working
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-		-DWITH_ROUTER=$(usex router ON OFF)
-	)
-
-	if is-flagq -fno-lto ; then
-		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
-		mycmakeargs+=( -DWITH_LTO=OFF )
-	elif is-flagq -flto ; then
-		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
-		myconf+=( -DWITH_LTO=ON )
-	else
-		# Disable automagic
-		myconf+=( -DWITH_LTO=OFF )
-	fi
-
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-
-	mycmakeargs+=(
-		-DWITH_ICU=system
-		-DWITH_LZ4=system
-		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
-		-DWITH_RAPIDJSON=bundled
-		-DWITH_ZSTD=system
-	)
-
-	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
-		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-		ewarn "You MUST file bugs without these variables set."
-		ewarn "Tests will probably fail!"
-
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-		)
-	elif use latin1 ; then
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=latin1
-			-DDEFAULT_COLLATION=latin1_swedish_ci
-		)
-	else
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=utf8mb4
-			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
-		)
-	fi
-
-	if use server ; then
-		mycmakeargs+=(
-			-DWITH_EXTRA_CHARSETS=all
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_LIBEVENT=system
-			-DWITH_PROTOBUF=system
-			-DWITH_NUMA=$(usex numa ON OFF)
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_SYSTEMD=no
-		)
-	fi
-
-	cmake_src_configure
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='perl server' \
-# FEATURES='test userpriv' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname bug reason
-		rawtestname="${1}" ; shift
-		bug="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
-		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Run CTest (test-units)
-	cmake_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-
-	local -a disabled_tests
-	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
-	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
-	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure - no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
-	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
-	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
-	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
-	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
-	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
-
-	# Known test failures due to expired SSL certificates -- fixed in 8.0.22
-	disabled_tests+=( "auth_sec.admin_ssl_crl_crlpath;100055;Fixed in 8.0.22" )
-	disabled_tests+=( "auth_sec.admin_ssl_crl;100055;Fixed in 8.0.22" )
-	disabled_tests+=( "auth_sec.server_withssl_client_withssl;100055;Fixed in 8.0.22" )
-	disabled_tests+=( "main.ssl_crl_clients_valid;100055;Fixed in 8.0.22" )
-	disabled_tests+=( "main.ssl_crl;100055;Fixed in 8.0.22" )
-	disabled_tests+=( "main.ssl_crl_crlpath;100055;Fixed in 8.0.22" )
-	disabled_tests+=( "main.ssl_ca;100055;Fixed in 8.0.22" )
-
-	if ! hash zip 1>/dev/null 2>&1 ; then
-		# no need to force dep app-arch/zip for one test
-		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
-		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
-	fi
-
-	local test_infos_str test_infos_arr
-	for test_infos_str in "${disabled_tests[@]}" ; do
-		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
-		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
-			die "Invalid test data set, not matching format: ${test_infos_str}"
-		fi
-
-		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
-	done
-	unset test_infos_str test_infos_arr
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	cmake_src_install
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	mycnf_src="my.cnf-8.0.distro-server"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR}/${mycnf_src}" \
-		> "${TMPDIR}/my.cnf.ok" || die
-
-	if use prefix ; then
-		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8mb4|latin1|g" \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	eprefixify "${TMPDIR}/my.cnf.ok"
-
-	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-
-	if use router ; then
-		rm -rf \
-			"${ED}/usr/LICENSE.router" \
-			"${ED}/usr/README.router" \
-			"${ED}/usr/run" \
-			"${ED}/usr/var" \
-			|| die
-	fi
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	# NOTE: $MY_LOGDIR contains $EPREFIX by default
-	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-
-	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-		einfo
-		elog "You might want to run:"
-		elog "  \"emerge --config =${CATEGORY}/${PF}\""
-		elog "if this is a new install."
-		einfo
-	else
-		einfo
-		elog "Upgrade process for ${PN}-8.x has changed. Please read"
-		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
-		einfo
-	fi
-}
-
-pkg_config() {
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
-		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	# Now we need to test MYSQL_TMPDIR...
-	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_tmpdir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_tmpdir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
-	else
-		rm "${_my_tmpdir_testfile}" || die
-		unset _my_tmpdir_testfile
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]] ; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
-	if [[ -z "${mysql_install_log}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysql_install_log}" || die
-		chown ${MYSQL_USER} "${mysql_install_log}" || die
-	fi
-
-	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
-	if [[ -z "${mysqld_logfile}" ]] ; then
-		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
-	else
-		# make sure file is writable for MYSQL_USER...
-		touch "${mysqld_logfile}" || die
-		chown ${MYSQL_USER} "${mysqld_logfile}" || die
-	fi
-
-	echo ""
-	einfo "Detected settings:"
-	einfo "=================="
-	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
-	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
-	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
-	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
-	fi
-
-	einfo "PID DIR:\t\t\t\t${PID_DIR}"
-	einfo "Install db log:\t\t\t${mysql_install_log}"
-	einfo "Install server log:\t\t\t${mysqld_logfile}"
-
-	local -a config_files
-
-	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
-	fi
-
-	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
-	fi
-
-	if [[ ${#config_files[@]} -gt 0 ]] ; then
-		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
-			local user_answer
-
-			echo
-			einfo "Please select default authentication plugin (enter number or plugin name):"
-			einfo "1) caching_sha2_password [MySQL 8.0 default]"
-			einfo "2) mysql_native_password [MySQL 5.7 default]"
-			einfo
-			einfo "For details see:"
-			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
-			read -p "    >" user_answer
-			echo
-
-			case "${user_answer}" in
-				1|caching_sha2_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
-					;;
-				2|mysql_native_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
-					;;
-				'')
-					die "No authentication plugin selected!"
-					;;
-				*)
-					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
-					;;
-			esac
-
-			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
-
-			unset user_answer
-		fi
-
-		local cfg_option cfg_option_tabs cfg_section
-		for config_file in "${config_files[@]}" ; do
-			cfg_option="default-authentication-plugin"
-			cfg_section="mysqld"
-			cfg_option_tabs="\t\t"
-			if [[ "${config_file}" == *client.cnf ]] ; then
-				cfg_option="default-auth"
-				cfg_section="client"
-				cfg_option_tabs="\t\t\t\t"
-			fi
-
-			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
-				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
-					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
-			else
-				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
-					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
-			fi
-		done
-		unset cfg_option cfg_option_tabs cfg_section
-	fi
-	unset config_files config_file
-
-	echo
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
-	[[ -z "${tz_sql}" ]] \
-		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	rm "${tz_sql}" || die
-
-	local x=${RANDOM}
-	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
-	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
-	unset x
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-08-13 14:16 Marek Szuba
  0 siblings, 0 replies; 393+ messages in thread
From: Marek Szuba @ 2021-08-13 14:16 UTC (permalink / raw
  To: gentoo-commits

commit:     b5e09c85854df9e309ab2c146ca42d7f37523632
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 13 14:09:45 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Fri Aug 13 14:15:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5e09c85

dev-db/mysql: keyword 8.0.26 for -riscv

8.0.22+ rely on certain types having an always-lock-free property, which
is (for now?) not the case on this arch.

Bug: https://bugs.gentoo.org/761715
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.26.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.26.ebuild b/dev-db/mysql/mysql-8.0.26.ebuild
index 5ed73cab581..3ea480113f1 100644
--- a/dev-db/mysql/mysql-8.0.26.ebuild
+++ b/dev-db/mysql/mysql-8.0.26.ebuild
@@ -36,7 +36,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 -riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-08-04 20:31 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-08-04 20:31 UTC (permalink / raw
  To: gentoo-commits

commit:     649186891375347b1b5f2ac18a476f2c0d9af0ee
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  4 19:55:26 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Aug  4 20:30:57 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64918689

dev-db/mysql: minor ebuild fixes

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

 dev-db/mysql/mysql-5.7.35.ebuild | 1 -
 dev-db/mysql/mysql-8.0.26.ebuild | 2 --
 2 files changed, 3 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.35.ebuild b/dev-db/mysql/mysql-5.7.35.ebuild
index 80332b393ba..6415ac60efc 100644
--- a/dev-db/mysql/mysql-5.7.35.ebuild
+++ b/dev-db/mysql/mysql-5.7.35.ebuild
@@ -611,7 +611,6 @@ src_test() {
 		emailAddress			= Email Address
 		emailAddress_max		= 64
 
-
 		[default_conf]
 		ssl_conf = ssl_sect
 

diff --git a/dev-db/mysql/mysql-8.0.26.ebuild b/dev-db/mysql/mysql-8.0.26.ebuild
index 3d758e5f75d..5ed73cab581 100644
--- a/dev-db/mysql/mysql-8.0.26.ebuild
+++ b/dev-db/mysql/mysql-8.0.26.ebuild
@@ -469,7 +469,6 @@ src_test() {
 		emailAddress			= Email Address
 		emailAddress_max		= 64
 
-
 		[default_conf]
 		ssl_conf = ssl_sect
 
@@ -482,7 +481,6 @@ src_test() {
 
 		local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
 
-		# no need to force dep app-arch/zip for one test
 		disabled_tests+=( "x.connection_tls_version;0;Not compatible with OpenSSL 3.x error messages" )
 	fi
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-08-04 19:13 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-08-04 19:13 UTC (permalink / raw
  To: gentoo-commits

commit:     8652d56a13d1a5ac26c7528eed5780fcba9afced
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  4 18:42:07 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Aug  4 19:12:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8652d56a

dev-db/mysql: bump to v5.7.35

Bug: https://bugs.gentoo.org/803620
Package-Manager: Portage-3.0.21, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-5.7.35.ebuild | 1294 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1296 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index f701abc310a..b1c2887c3e0 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -4,6 +4,7 @@ DIST mysql-5.7.32-patches-01.tar.xz 6660 BLAKE2B 5c63158615398bdcc4480a0e1b058f4
 DIST mysql-5.7.33-patches-01.tar.xz 6672 BLAKE2B cfa410f9ba5a4ba7e43923e7b5940c2dc6a9356b49230ebaea24bd7eef8a9639fc746e917c22241e19c830b81252e95f38e2c9d6054494de700bae46011fb2f4 SHA512 b16bb9531c44f1c5ec9c08aee6c1f5f5d2e3fe59a0039a54f6c050660a18f7c78b955e7eea7bef4e7dccfcdaa81464e0d8e47ac7d0e40ecb90187865a8a0412e
 DIST mysql-5.7.34-patches-01.tar.xz 6676 BLAKE2B b925880bfbb991fcba81964ff658a2ecab38da637a6093270a724ab8e405ab092d5fb9684f53f44d001e34287366df234b841d9ebcae62d49becdb93a3c3e324 SHA512 80a89f4b4a7ecc04f3115c6aaa0b0013e38c2813fa6dea095e826ef3944298715a48e0deacb691d23526b1524b207c83176290faea2461d3fcd94edabe3d8943
 DIST mysql-5.7.34-patches-02.tar.xz 6408 BLAKE2B fdb36247832b6282af94ce2f61b5dd77f6b45f9efca4b438ecd5fed8d810d9d51547d0ae3de085e7f5dcc8795b4bc4f1210902495b92859e1d5aec3048256ef3 SHA512 f0513eb7f0c9e415aa972a53af668939934ea4f4fa438f468f32a46ccc2aa3b84ba8edd999e4786256ada34851ad64c81e9dd0e36c2a21da641987dfd18635c3
+DIST mysql-5.7.35-patches-01.tar.xz 6408 BLAKE2B ddead9d6f5570f23433ffaef0188a8e93c0220b3d59ae24b870927e9e5908619f357725c1ab2d16905f39dd9d5f6cd23d3aabf6a1df2abdc865683f603912b8f SHA512 6374536299c691fd12a3f8b7cd27291e6f3b0b6d159284b2866caaed6a7f124439c16e659e6da5aae9e72d613de2a1e1b80066c961e122e90ad644e9a32633cc
 DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
 DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
 DIST mysql-8.0.22-patches-02.tar.xz 7580 BLAKE2B a50704c3c58b1f67ca86edb233544137927b0ae5fdf302687b48f6fd30fbbd26798e8ef8282662586b25a7240b47278b44f944a8ca59f1a198bc228dd74459c9 SHA512 59f864452e9fdebe4d3990eff8b756e9bbfad58da216b74fa8b7e8391cb0d9d543ca2828591b9ed1ee276c1dec9e1851a8c2683507f0a326c85054e31cc3f950
@@ -18,6 +19,7 @@ DIST mysql-boost-5.7.31.tar.gz 51382559 BLAKE2B 86430ee01b0b066ffbd1c876c7d09afe
 DIST mysql-boost-5.7.32.tar.gz 52882168 BLAKE2B dd112fa1d8bd29d86fba076675b5b7c9c98b6fb876aed45a00e8a25be716102fc9aa688b7170bef07b1c9f9751737277774d8fb2c64c21e181ecae58f89b4a8a SHA512 33a617d040efd065ea1c2ad84be537f851480abd5cc8a6879b7f170bc4e6db9432bd03f2a6bc680b71f17839c508cab0e7ef1a3aba032197da1b7943c916c77a
 DIST mysql-boost-5.7.33.tar.gz 52912380 BLAKE2B bca09314ae73932f6095799faa016998e65655cf5ea74d5596dcdc785e77014fe0b29a6c123e8618771f4a20a19978df00f7b79eea329aeb4b536ae71a4bef94 SHA512 1d1e1e5934fb17ff731fea45b88d4af6a394c2fbf0177a87803b18cb0eb4fb8d4939f82fc22b6cbc2af64022a44e206cd23e2e88ce11cc119c3ea22129d54e7a
 DIST mysql-boost-5.7.34.tar.gz 52891142 BLAKE2B 986fe106d73495ea9acb837f699ef2b1ffd123d9728b61da42f990d670569f1f7c12dc0a8611c3a7b6e3ed7be9fc277e1a977fa6c6d06f7d156a2f492951d9c7 SHA512 4eab7e90477b75643df743d806d5abcfb56572a2aa003a354980287c9148209f4fb7f0158ba969fb0462c32e49fcb4cf2a79f0330ab1bd2b243725dbf6f31d6d
+DIST mysql-boost-5.7.35.tar.gz 52959014 BLAKE2B 02cbc2201176773516479636ab40828a98bbc6bc1e90060e36d36af5c20a84b4b415d6e467328890ecff044834c81458fff8b717fd8942196dcf35e0ae85f298 SHA512 2469c8e13a236aee327bc0828804ba189e3abf78b6e0b3ef65b2343210f9c0cd5313d18b57ae3b76ca1487dc1d70854c8a12e6da61a6fffbce95854dcc792482
 DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
 DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99
 DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1

diff --git a/dev-db/mysql/mysql-5.7.35.ebuild b/dev-db/mysql/mysql-5.7.35.ebuild
new file mode 100644
index 00000000000..80332b393ba
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.35.ebuild
@@ -0,0 +1,1294 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs multilib-minimal
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.35-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="5.7/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+	sys-libs/ncurses:0=
+	client-libs? (
+		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
+		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
+	)
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+		>=dev-libs/openssl-1.0.0:0=
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=[ssl]
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+	)
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+"
+
+DEPEND="
+	${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
+	virtual/yacc
+	server? (
+		dev-libs/libevent:=[ssl]
+		experimental? ( net-libs/rpcsvc-proto )
+	)
+	static? ( sys-libs/ncurses[static-libs] )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+
+RDEPEND="
+	${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:8.0
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
+	server? (
+		!prefix? (
+			acct-group/mysql acct-user/mysql
+			dev-db/mysql-init-scripts
+		)
+	)
+"
+
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="3G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="3G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/extra/libevent \
+		"${S}"/zlib \
+		|| die
+
+	# Don't clash with dev-db/mysql-connector-c
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# code is not C++17 ready, bug #786402
+	append-cxxflags -std=c++14
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI, bug 530132
+	if multilib_is_native_abi ; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
+			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static ; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in \
+		auth_sec.keyring_udf \
+		innodb.alter_kill \
+		innodb.innodb-multiple-tablespaces \
+		innodb.import_compress_encrypt \
+		perfschema.privilege_table_io \
+	; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
+	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+	for t in \
+		main.xa_prepared_binlog_off \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_non_direct_stm_mixing_engines \
+	; do
+		_disable_test "$t" "Unstable test"
+	done
+
+	for t in \
+		gis.geometry_class_attri_prop \
+		gis.geometry_property_function_issimple \
+		gis.gis_bugs_crashes \
+		gis.spatial_op_testingfunc_mix \
+		gis.spatial_analysis_functions_buffer \
+		gis.spatial_analysis_functions_distance \
+		gis.spatial_utility_function_distance_sphere \
+		gis.spatial_utility_function_simplify \
+		gis.spatial_analysis_functions_centroid \
+		main.with_recursive \
+	; do
+		_disable_test "$t" "Known rounding error with latest AMD processors"
+	done
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
+	fi
+
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.mysqldump_bugs \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	if has_version ">=dev-libs/openssl-3" ; then
+		# >=dev-libs/openssl-3 defaults to security level 1 which disallow
+		# TLSv1/1.1 but tests will require TLSv1/1.1.
+		einfo "Set OpenSSL configuration for test suite ..."
+		cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
+		openssl_conf = default_conf
+
+		[ req ]
+		default_bits			= 2048
+		default_keyfile 		= privkey.pem
+		distinguished_name		= req_distinguished_name
+
+		[ req_distinguished_name ]
+		countryName			= Country Name (2 letter code)
+		countryName_default		= AU
+		countryName_min			= 2
+		countryName_max			= 2
+
+		stateOrProvinceName		= State or Province Name (full name)
+		stateOrProvinceName_default	= Some-State
+
+		localityName			= Locality Name (eg, city)
+
+		0.organizationName		= Organization Name (eg, company)
+		0.organizationName_default	= Internet Widgits Pty Ltd
+
+		organizationalUnitName		= Organizational Unit Name (eg, section)
+
+		commonName			= Common Name (e.g. server FQDN or YOUR name)
+		commonName_max			= 64
+
+		emailAddress			= Email Address
+		emailAddress_max		= 64
+
+
+		[default_conf]
+		ssl_conf = ssl_sect
+
+		[ssl_sect]
+		system_default = system_default_sect
+
+		[system_default_sect]
+		CipherString = DEFAULT@SECLEVEL=0
+		EOF
+
+		local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
+	fi
+
+	if has_version '>=dev-libs/openssl-1.1.1' ; then
+		# Tests are expecting <openssl-1.1.1 default cipher
+		for t in \
+			auth_sec.cert_verify \
+			auth_sec.mysql_ssl_connection \
+			auth_sec.openssl_cert_generation \
+			auth_sec.ssl_auto_detect \
+			auth_sec.ssl_mode \
+			auth_sec.tls \
+			binlog.binlog_grant_alter_user \
+			encryption.innodb_onlinealter_encryption \
+			main.grant_alter_user_qa \
+			main.grant_user_lock_qa \
+			main.mysql_ssl_default \
+			main.openssl_1 \
+			main.plugin_auth_sha256 \
+			main.plugin_auth_sha256_2 \
+			main.plugin_auth_sha256_server_default \
+			main.plugin_auth_sha256_server_default_tls \
+			main.plugin_auth_sha256_tls \
+			main.ssl \
+			main.ssl_8k_key \
+			main.ssl_bug75311 \
+			main.ssl_ca \
+			main.ssl_cipher \
+			main.ssl_compress \
+			main.ssl_crl \
+			main.ssl_ecdh \
+			main.ssl_verify_identity \
+			x.connection_tls_version \
+			x.connection_openssl \
+		; do
+			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+	cmake_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		eprefixify "${TMPDIR}/my.cnf.ok"
+
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-08-04 19:13 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-08-04 19:13 UTC (permalink / raw
  To: gentoo-commits

commit:     a0bc90c1b7143893443fb83bb1e2d66dc24859b0
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  4 15:30:26 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Aug  4 19:12:24 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0bc90c1

dev-db/mysql: bump to v8.0.26

Bug: https://bugs.gentoo.org/803620
Package-Manager: Portage-3.0.21, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-8.0.26.ebuild | 1228 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1230 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 03aa6353eda..f701abc310a 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -10,6 +10,7 @@ DIST mysql-8.0.22-patches-02.tar.xz 7580 BLAKE2B a50704c3c58b1f67ca86edb23354413
 DIST mysql-8.0.23-patches-01.tar.xz 7568 BLAKE2B 222120dcb5556457f382eefbb10f66f46fe1673c64730c8c8a5566942031bc98bab1f1182f747e79e23fccfb6b09197d5c2874aa2087104b6f1eaa25ea9fd60c SHA512 54222c420d57c1b206d920f22738746925ed1e0d78683f01c97cac5bd1d3450f70f784a7f603304b8595fb58120e691f94e28fa1d1884a7cc8bea1d7b177470f
 DIST mysql-8.0.25-patches-01.tar.xz 3604 BLAKE2B 09cccab204c30d16bdc374bcd01d4a8e6298955f86f479b8e287aab74fb6bd9857547e360be725dfc66acb56e1bb5665277d340761d0110a8823763ad4d2d1f4 SHA512 6d90a34a20e9cbc7e7a9b5b63a1408f33ac8523f2be6c9ab6d9ad7589c3ded83c87e460d782d4d8c33f11b337151fd8db994099e371260ecf204933e844eb50e
 DIST mysql-8.0.25-patches-02.tar.xz 6456 BLAKE2B c9c1020a505ebcee836f8dc3bbe540ff924a0174daf36c37b852df267a81919d37581d1c9be037d52cdcd34c27c5c34d3f0af6160857b22d8ab4d8ece37798e0 SHA512 3c3726b397f3a6fb1d84396bb571b4903a167c9a47273b9d5996949e1d3febc96d3528bfa8dfaeea073a245051ae10c983f2ad258268babc91649563ce3cfc00
+DIST mysql-8.0.26-patches-01.tar.xz 6980 BLAKE2B 5fc86125b622ac978dc7ec3d6954a1d366315a57b6f56ca8dade9ad4a255b4b793ad33736404b29ab2db12f726897f014aeec9232dc52954087e7533d0f593d2 SHA512 00e6478716cf857b8ab768ec481dc1e7d809db17a9d899a52822f61dcc18797e87c0eecfafb1bb9065895c1b261c03c87fe0593b59dc86fb40853b0c660c9bfb
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
 DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
@@ -23,6 +24,7 @@ DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3
 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-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1
 DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f

diff --git a/dev-db/mysql/mysql-8.0.26.ebuild b/dev-db/mysql/mysql-8.0.26.ebuild
new file mode 100644
index 00000000000..3d758e5f75d
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.26.ebuild
@@ -0,0 +1,1228 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.26-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
+	router selinux +server tcmalloc test"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	cjk? ( server )
+	jemalloc? ( server )
+	numa? ( server )
+	profiling? ( server )
+	router? ( server )
+	tcmalloc? ( server )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	>=app-arch/lz4-0_p131:=
+	app-arch/zstd:=
+	sys-libs/ncurses:0=
+	>=sys-libs/zlib-1.2.3:0=
+	>=dev-libs/openssl-1.0.0:0=
+	server? (
+		dev-libs/icu:=
+		dev-libs/libevent:=[ssl,threads]
+		>=dev-libs/protobuf-3.8:=
+		net-libs/libtirpc:=
+		cjk? ( app-text/mecab:= )
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		tcmalloc? ( dev-util/google-perftools:0= )
+	)
+"
+
+DEPEND="
+	${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	virtual/yacc
+	server? ( net-libs/rpcsvc-proto )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+
+RDEPEND="
+	${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:5.7
+	selinux? ( sec-policy/selinux-mysql )
+	!prefix? (
+		acct-group/mysql acct-user/mysql
+		dev-db/mysql-init-scripts
+	)
+"
+
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="2G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="2G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	# Avoid rpm call which would trigger sandbox, #692368
+	sed -i \
+		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+		CMakeLists.txt || die
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove man pages for client-lib tools we don't install
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# code is not C++17 ready, bug #786402
+	append-cxxflags -std=c++14
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		# Using bundled editline to get CTRL+C working
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+		-DWITH_ROUTER=$(usex router ON OFF)
+	)
+
+	if is-flagq -fno-lto ; then
+		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
+		mycmakeargs+=( -DWITH_LTO=OFF )
+	elif is-flagq -flto ; then
+		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+		myconf+=( -DWITH_LTO=ON )
+	else
+		# Disable automagic
+		myconf+=( -DWITH_LTO=OFF )
+	fi
+
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+	mycmakeargs+=(
+		-DWITH_ICU=system
+		-DWITH_LZ4=system
+		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+		-DWITH_RAPIDJSON=bundled
+		-DWITH_ZSTD=system
+	)
+
+	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+		ewarn "You MUST file bugs without these variables set."
+		ewarn "Tests will probably fail!"
+
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+		)
+	elif use latin1 ; then
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=latin1
+			-DDEFAULT_COLLATION=latin1_swedish_ci
+		)
+	else
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=utf8mb4
+			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+		)
+	fi
+
+	if use server ; then
+		mycmakeargs+=(
+			-DWITH_EXTRA_CHARSETS=all
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_LIBEVENT=system
+			-DWITH_PROTOBUF=system
+			-DWITH_NUMA=$(usex numa ON OFF)
+		)
+
+		if use jemalloc ; then
+			mycmakeargs+=( -DWITH_JEMALLOC=ON )
+		elif use tcmalloc ; then
+			mycmakeargs+=( -DWITH_TCMALLOC=ON )
+		fi
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_SYSTEMD=no
+		)
+	fi
+
+	cmake_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='perl server' \
+# FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname bug reason
+		rawtestname="${1}" ; shift
+		bug="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Run CTest (test-units)
+	cmake_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+
+	local -a disabled_tests
+	disabled_tests+=( "auth_sec.atomic_rename_user;103512;Depends on user running test" )
+	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
+	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "innodb.alter_kill;0;Known test failure -- no upstream bug yet" )
+	disabled_tests+=( "main.derived_limit;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.explain_tree;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.gis-precise;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure -- no upstream bug yet" )
+	disabled_tests+=( "main.select_icp_mrr;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_dupsweed;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_dupsweed_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_dupsweed_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_firstmatch;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_firstmatch_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_firstmatch_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "perfschema.statement_digest_query_sample;0;Test will fail on slow hardware")
+	disabled_tests+=( "rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch;0;Unstable test" )
+	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
+		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
+	fi
+
+	if has_version ">=dev-libs/openssl-3" ; then
+		# >=dev-libs/openssl-3 defaults to security level 1 which disallow
+		# TLSv1/1.1 but tests will require TLSv1/1.1.
+		einfo "Set OpenSSL configuration for test suite ..."
+		cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
+		openssl_conf = default_conf
+
+		[ req ]
+		default_bits			= 2048
+		default_keyfile 		= privkey.pem
+		distinguished_name		= req_distinguished_name
+
+		[ req_distinguished_name ]
+		countryName			= Country Name (2 letter code)
+		countryName_default		= AU
+		countryName_min			= 2
+		countryName_max			= 2
+
+		stateOrProvinceName		= State or Province Name (full name)
+		stateOrProvinceName_default	= Some-State
+
+		localityName			= Locality Name (eg, city)
+
+		0.organizationName		= Organization Name (eg, company)
+		0.organizationName_default	= Internet Widgits Pty Ltd
+
+		organizationalUnitName		= Organizational Unit Name (eg, section)
+
+		commonName			= Common Name (e.g. server FQDN or YOUR name)
+		commonName_max			= 64
+
+		emailAddress			= Email Address
+		emailAddress_max		= 64
+
+
+		[default_conf]
+		ssl_conf = ssl_sect
+
+		[ssl_sect]
+		system_default = system_default_sect
+
+		[system_default_sect]
+		CipherString = DEFAULT@SECLEVEL=0
+		EOF
+
+		local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
+
+		# no need to force dep app-arch/zip for one test
+		disabled_tests+=( "x.connection_tls_version;0;Not compatible with OpenSSL 3.x error messages" )
+	fi
+
+	local test_infos_str test_infos_arr
+	for test_infos_str in "${disabled_tests[@]}" ; do
+		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+			die "Invalid test data set, not matching format: ${test_infos_str}"
+		fi
+
+		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+	done
+	unset test_infos_str test_infos_arr
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	cmake_src_install
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	mycnf_src="my.cnf-8.0.distro-server"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR}/${mycnf_src}" \
+		> "${TMPDIR}/my.cnf.ok" || die
+
+	if use prefix ; then
+		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8mb4|latin1|g" \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	eprefixify "${TMPDIR}/my.cnf.ok"
+
+	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+	if use router ; then
+		rm -rf \
+			"${ED}/usr/LICENSE.router" \
+			"${ED}/usr/README.router" \
+			"${ED}/usr/run" \
+			"${ED}/usr/var" \
+			|| die
+	fi
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	# NOTE: $MY_LOGDIR contains $EPREFIX by default
+	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		einfo
+		elog "You might want to run:"
+		elog "  \"emerge --config =${CATEGORY}/${PF}\""
+		elog "if this is a new install."
+		einfo
+	else
+		einfo
+		elog "Upgrade process for ${PN}-8.x has changed. Please read"
+		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+		einfo
+	fi
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	local -a config_files
+
+	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+	fi
+
+	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+	fi
+
+	if [[ ${#config_files[@]} -gt 0 ]] ; then
+		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+			local user_answer
+
+			echo
+			einfo "Please select default authentication plugin (enter number or plugin name):"
+			einfo "1) caching_sha2_password [MySQL 8.0 default]"
+			einfo "2) mysql_native_password [MySQL 5.7 default]"
+			einfo
+			einfo "For details see:"
+			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+			read -p "    >" user_answer
+			echo
+
+			case "${user_answer}" in
+				1|caching_sha2_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+					;;
+				2|mysql_native_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+					;;
+				'')
+					die "No authentication plugin selected!"
+					;;
+				*)
+					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+					;;
+			esac
+
+			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
+			unset user_answer
+		fi
+
+		local cfg_option cfg_option_tabs cfg_section
+		for config_file in "${config_files[@]}" ; do
+			cfg_option="default-authentication-plugin"
+			cfg_section="mysqld"
+			cfg_option_tabs="\t\t"
+			if [[ "${config_file}" == *client.cnf ]] ; then
+				cfg_option="default-auth"
+				cfg_section="client"
+				cfg_option_tabs="\t\t\t\t"
+			fi
+
+			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+			else
+				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+			fi
+		done
+		unset cfg_option cfg_option_tabs cfg_section
+	fi
+	unset config_files config_file
+
+	echo
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-07-06 18:02 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2021-07-06 18:02 UTC (permalink / raw
  To: gentoo-commits

commit:     5298dbf13404a368ddb54bfaaf4f170a9f094ff6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  6 18:01:59 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul  6 18:01:59 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5298dbf1

dev-db/mysql: Stabilize 5.7.34 amd64, #789243

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.34.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.34.ebuild b/dev-db/mysql/mysql-5.7.34.ebuild
index 3826beb3aee..998dc2dbcc4 100644
--- a/dev-db/mysql/mysql-5.7.34.ebuild
+++ b/dev-db/mysql/mysql-5.7.34.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-07-06 18:02 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2021-07-06 18:02 UTC (permalink / raw
  To: gentoo-commits

commit:     dac92a0f2b9ae2f8c3c83c64e2d987175de9a8fd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  6 18:02:00 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul  6 18:02:00 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dac92a0f

dev-db/mysql: Stabilize 8.0.25 amd64, #789243

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.25.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.25.ebuild b/dev-db/mysql/mysql-8.0.25.ebuild
index c23ef9ac5ac..98b2c22e5b2 100644
--- a/dev-db/mysql/mysql-8.0.25.ebuild
+++ b/dev-db/mysql/mysql-8.0.25.ebuild
@@ -36,7 +36,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-06-22 23:49 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-06-22 23:49 UTC (permalink / raw
  To: gentoo-commits

commit:     700b729873e986802aa8ab6da9901c02ce7961c7
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 22 23:38:53 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=700b7298

dev-db/mysql: add OpenSSL 3.0.0 support

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

 dev-db/mysql/Manifest               |    2 +
 dev-db/mysql/mysql-5.7.34-r1.ebuild | 1262 +++++++++++++++++++++++++++++++++++
 dev-db/mysql/mysql-8.0.25-r1.ebuild | 1192 +++++++++++++++++++++++++++++++++
 3 files changed, 2456 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 6abf9ac439c..03aa6353eda 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,11 +3,13 @@ DIST mysql-5.7.31-patches-01.tar.xz 6664 BLAKE2B 8225f286f0090653f9714545daa95cc
 DIST mysql-5.7.32-patches-01.tar.xz 6660 BLAKE2B 5c63158615398bdcc4480a0e1b058f491b39ffc7ee33767b425f3b254555411031f64d865e1924afe8aa3926e4cba18049f1219a0a8acc702bc5e011c94fa947 SHA512 bf5e0d27af81e599005268ee243af4cd93f6df95c32cccb268a749322b4e5f73a2ce5d51f0ad1b0e1f2cf4702b8a05e4b2e0b73110fd4aac61f2a0f51bf4952e
 DIST mysql-5.7.33-patches-01.tar.xz 6672 BLAKE2B cfa410f9ba5a4ba7e43923e7b5940c2dc6a9356b49230ebaea24bd7eef8a9639fc746e917c22241e19c830b81252e95f38e2c9d6054494de700bae46011fb2f4 SHA512 b16bb9531c44f1c5ec9c08aee6c1f5f5d2e3fe59a0039a54f6c050660a18f7c78b955e7eea7bef4e7dccfcdaa81464e0d8e47ac7d0e40ecb90187865a8a0412e
 DIST mysql-5.7.34-patches-01.tar.xz 6676 BLAKE2B b925880bfbb991fcba81964ff658a2ecab38da637a6093270a724ab8e405ab092d5fb9684f53f44d001e34287366df234b841d9ebcae62d49becdb93a3c3e324 SHA512 80a89f4b4a7ecc04f3115c6aaa0b0013e38c2813fa6dea095e826ef3944298715a48e0deacb691d23526b1524b207c83176290faea2461d3fcd94edabe3d8943
+DIST mysql-5.7.34-patches-02.tar.xz 6408 BLAKE2B fdb36247832b6282af94ce2f61b5dd77f6b45f9efca4b438ecd5fed8d810d9d51547d0ae3de085e7f5dcc8795b4bc4f1210902495b92859e1d5aec3048256ef3 SHA512 f0513eb7f0c9e415aa972a53af668939934ea4f4fa438f468f32a46ccc2aa3b84ba8edd999e4786256ada34851ad64c81e9dd0e36c2a21da641987dfd18635c3
 DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
 DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
 DIST mysql-8.0.22-patches-02.tar.xz 7580 BLAKE2B a50704c3c58b1f67ca86edb233544137927b0ae5fdf302687b48f6fd30fbbd26798e8ef8282662586b25a7240b47278b44f944a8ca59f1a198bc228dd74459c9 SHA512 59f864452e9fdebe4d3990eff8b756e9bbfad58da216b74fa8b7e8391cb0d9d543ca2828591b9ed1ee276c1dec9e1851a8c2683507f0a326c85054e31cc3f950
 DIST mysql-8.0.23-patches-01.tar.xz 7568 BLAKE2B 222120dcb5556457f382eefbb10f66f46fe1673c64730c8c8a5566942031bc98bab1f1182f747e79e23fccfb6b09197d5c2874aa2087104b6f1eaa25ea9fd60c SHA512 54222c420d57c1b206d920f22738746925ed1e0d78683f01c97cac5bd1d3450f70f784a7f603304b8595fb58120e691f94e28fa1d1884a7cc8bea1d7b177470f
 DIST mysql-8.0.25-patches-01.tar.xz 3604 BLAKE2B 09cccab204c30d16bdc374bcd01d4a8e6298955f86f479b8e287aab74fb6bd9857547e360be725dfc66acb56e1bb5665277d340761d0110a8823763ad4d2d1f4 SHA512 6d90a34a20e9cbc7e7a9b5b63a1408f33ac8523f2be6c9ab6d9ad7589c3ded83c87e460d782d4d8c33f11b337151fd8db994099e371260ecf204933e844eb50e
+DIST mysql-8.0.25-patches-02.tar.xz 6456 BLAKE2B c9c1020a505ebcee836f8dc3bbe540ff924a0174daf36c37b852df267a81919d37581d1c9be037d52cdcd34c27c5c34d3f0af6160857b22d8ab4d8ece37798e0 SHA512 3c3726b397f3a6fb1d84396bb571b4903a167c9a47273b9d5996949e1d3febc96d3528bfa8dfaeea073a245051ae10c983f2ad258268babc91649563ce3cfc00
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
 DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560

diff --git a/dev-db/mysql/mysql-5.7.34-r1.ebuild b/dev-db/mysql/mysql-5.7.34-r1.ebuild
new file mode 100644
index 00000000000..239a883dba6
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.34-r1.ebuild
@@ -0,0 +1,1262 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs multilib-minimal
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.34-patches-02.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="5.7/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+	sys-libs/ncurses:0=
+	client-libs? (
+		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
+		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
+	)
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+		>=dev-libs/openssl-1.0.0:0=
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=[ssl]
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+	)
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+"
+
+DEPEND="
+	${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
+	virtual/yacc
+	server? (
+		dev-libs/libevent:=[ssl]
+		experimental? ( net-libs/rpcsvc-proto )
+	)
+	static? ( sys-libs/ncurses[static-libs] )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+
+RDEPEND="
+	${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:8.0
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
+	server? (
+		!prefix? (
+			acct-group/mysql acct-user/mysql
+			dev-db/mysql-init-scripts
+		)
+	)
+"
+
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="3G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="3G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/extra/libevent \
+		"${S}"/zlib \
+		|| die
+
+	# Don't clash with dev-db/mysql-connector-c
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# code is not C++17 ready, bug #786402
+	append-cxxflags -std=c++14
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI, bug 530132
+	if multilib_is_native_abi ; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
+			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static ; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# >=dev-libs/openssl-3 defaults to security level 1 which disallow
+	# TLSv1/1.1 but tests will require TLSv1/1.1.
+	einfo "Set OpenSSL configuration for test suite ..."
+	cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
+	openssl_conf = default_conf
+
+	[default_conf]
+	ssl_conf = ssl_sect
+
+	[ssl_sect]
+	system_default = system_default_sect
+
+	[system_default_sect]
+	CipherString = DEFAULT@SECLEVEL=0
+	EOF
+
+	local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in \
+		auth_sec.keyring_udf \
+		innodb.import_compress_encrypt \
+		perfschema.privilege_table_io \
+	; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
+	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+	for t in \
+		main.xa_prepared_binlog_off \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_non_direct_stm_mixing_engines \
+	; do
+		_disable_test "$t" "Unstable test"
+	done
+
+	for t in \
+		gis.geometry_class_attri_prop \
+		gis.geometry_property_function_issimple \
+		gis.gis_bugs_crashes \
+		gis.spatial_op_testingfunc_mix \
+		gis.spatial_analysis_functions_buffer \
+		gis.spatial_analysis_functions_distance \
+		gis.spatial_utility_function_distance_sphere \
+		gis.spatial_utility_function_simplify \
+		gis.spatial_analysis_functions_centroid \
+		main.with_recursive \
+	; do
+		_disable_test "$t" "Known rounding error with latest AMD processors"
+	done
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
+	fi
+
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.mysqldump_bugs \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	if has_version '>=dev-libs/openssl-1.1.1' ; then
+		# Tests are expecting <openssl-1.1.1 default cipher
+		for t in \
+			auth_sec.cert_verify \
+			auth_sec.mysql_ssl_connection \
+			auth_sec.openssl_cert_generation \
+			auth_sec.ssl_auto_detect \
+			auth_sec.ssl_mode \
+			auth_sec.tls \
+			binlog.binlog_grant_alter_user \
+			encryption.innodb_onlinealter_encryption \
+			main.grant_alter_user_qa \
+			main.grant_user_lock_qa \
+			main.mysql_ssl_default \
+			main.openssl_1 \
+			main.plugin_auth_sha256 \
+			main.plugin_auth_sha256_2 \
+			main.plugin_auth_sha256_server_default \
+			main.plugin_auth_sha256_server_default_tls \
+			main.plugin_auth_sha256_tls \
+			main.ssl \
+			main.ssl_8k_key \
+			main.ssl_bug75311 \
+			main.ssl_ca \
+			main.ssl_cipher \
+			main.ssl_compress \
+			main.ssl_crl \
+			main.ssl_ecdh \
+			main.ssl_verify_identity \
+			x.connection_tls_version \
+			x.connection_openssl \
+		; do
+			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+	cmake_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		eprefixify "${TMPDIR}/my.cnf.ok"
+
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}

diff --git a/dev-db/mysql/mysql-8.0.25-r1.ebuild b/dev-db/mysql/mysql-8.0.25-r1.ebuild
new file mode 100644
index 00000000000..a3ee94b3523
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.25-r1.ebuild
@@ -0,0 +1,1192 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.25-patches-02.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
+	router selinux +server tcmalloc test"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	cjk? ( server )
+	jemalloc? ( server )
+	numa? ( server )
+	profiling? ( server )
+	router? ( server )
+	tcmalloc? ( server )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	>=app-arch/lz4-0_p131:=
+	app-arch/zstd:=
+	sys-libs/ncurses:0=
+	>=sys-libs/zlib-1.2.3:0=
+	>=dev-libs/openssl-1.0.0:0=
+	server? (
+		dev-libs/icu:=
+		dev-libs/libevent:=[ssl,threads]
+		>=dev-libs/protobuf-3.8:=
+		net-libs/libtirpc:=
+		cjk? ( app-text/mecab:= )
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		tcmalloc? ( dev-util/google-perftools:0= )
+	)
+"
+
+DEPEND="
+	${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	virtual/yacc
+	server? ( net-libs/rpcsvc-proto )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+
+RDEPEND="
+	${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:5.7
+	selinux? ( sec-policy/selinux-mysql )
+	!prefix? (
+		acct-group/mysql acct-user/mysql
+		dev-db/mysql-init-scripts
+	)
+"
+
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="2G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="2G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	# Avoid rpm call which would trigger sandbox, #692368
+	sed -i \
+		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+		CMakeLists.txt || die
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove man pages for client-lib tools we don't install
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# code is not C++17 ready, bug #786402
+	append-cxxflags -std=c++14
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		# Using bundled editline to get CTRL+C working
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+		-DWITH_ROUTER=$(usex router ON OFF)
+	)
+
+	if is-flagq -fno-lto ; then
+		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
+		mycmakeargs+=( -DWITH_LTO=OFF )
+	elif is-flagq -flto ; then
+		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+		myconf+=( -DWITH_LTO=ON )
+	else
+		# Disable automagic
+		myconf+=( -DWITH_LTO=OFF )
+	fi
+
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+	mycmakeargs+=(
+		-DWITH_ICU=system
+		-DWITH_LZ4=system
+		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+		-DWITH_RAPIDJSON=bundled
+		-DWITH_ZSTD=system
+	)
+
+	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+		ewarn "You MUST file bugs without these variables set."
+		ewarn "Tests will probably fail!"
+
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+		)
+	elif use latin1 ; then
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=latin1
+			-DDEFAULT_COLLATION=latin1_swedish_ci
+		)
+	else
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=utf8mb4
+			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+		)
+	fi
+
+	if use server ; then
+		mycmakeargs+=(
+			-DWITH_EXTRA_CHARSETS=all
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_LIBEVENT=system
+			-DWITH_PROTOBUF=system
+			-DWITH_NUMA=$(usex numa ON OFF)
+		)
+
+		if use jemalloc ; then
+			mycmakeargs+=( -DWITH_JEMALLOC=ON )
+		elif use tcmalloc ; then
+			mycmakeargs+=( -DWITH_TCMALLOC=ON )
+		fi
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_SYSTEMD=no
+		)
+	fi
+
+	cmake_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='perl server' \
+# FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname bug reason
+		rawtestname="${1}" ; shift
+		bug="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Run CTest (test-units)
+	cmake_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# >=dev-libs/openssl-3 defaults to security level 1 which disallow
+	# TLSv1/1.1 but tests will require TLSv1/1.1.
+	einfo "Set OpenSSL configuration for test suite ..."
+	cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
+	openssl_conf = default_conf
+
+	[default_conf]
+	ssl_conf = ssl_sect
+
+	[ssl_sect]
+	system_default = system_default_sect
+
+	[system_default_sect]
+	CipherString = DEFAULT@SECLEVEL=0
+	EOF
+
+	local -x OPENSSL_CONF="${T}/openssl_tlsv1.cnf"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+
+	local -a disabled_tests
+	disabled_tests+=( "auth_sec.atomic_rename_user;103512;Depends on user running test" )
+	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
+	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "main.explain_tree;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.derived_limit;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure - no upstream bug yet" )
+	disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "perfschema.statement_digest_query_sample;0;Test will fail on slow hardware")
+	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch;0;Unstable test" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
+		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
+	fi
+
+	if has_version ">=dev-libs/openssl-3" ; then
+		# no need to force dep app-arch/zip for one test
+		disabled_tests+=( "x.connection_tls_version;0;Not compatible with OpenSSL 3.x error messages" )
+	fi
+
+	local test_infos_str test_infos_arr
+	for test_infos_str in "${disabled_tests[@]}" ; do
+		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+			die "Invalid test data set, not matching format: ${test_infos_str}"
+		fi
+
+		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+	done
+	unset test_infos_str test_infos_arr
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	cmake_src_install
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	mycnf_src="my.cnf-8.0.distro-server"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR}/${mycnf_src}" \
+		> "${TMPDIR}/my.cnf.ok" || die
+
+	if use prefix ; then
+		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8mb4|latin1|g" \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	eprefixify "${TMPDIR}/my.cnf.ok"
+
+	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+	if use router ; then
+		rm -rf \
+			"${ED}/usr/LICENSE.router" \
+			"${ED}/usr/README.router" \
+			"${ED}/usr/run" \
+			"${ED}/usr/var" \
+			|| die
+	fi
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	# NOTE: $MY_LOGDIR contains $EPREFIX by default
+	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		einfo
+		elog "You might want to run:"
+		elog "  \"emerge --config =${CATEGORY}/${PF}\""
+		elog "if this is a new install."
+		einfo
+	else
+		einfo
+		elog "Upgrade process for ${PN}-8.x has changed. Please read"
+		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+		einfo
+	fi
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	local -a config_files
+
+	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+	fi
+
+	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+	fi
+
+	if [[ ${#config_files[@]} -gt 0 ]] ; then
+		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+			local user_answer
+
+			echo
+			einfo "Please select default authentication plugin (enter number or plugin name):"
+			einfo "1) caching_sha2_password [MySQL 8.0 default]"
+			einfo "2) mysql_native_password [MySQL 5.7 default]"
+			einfo
+			einfo "For details see:"
+			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+			read -p "    >" user_answer
+			echo
+
+			case "${user_answer}" in
+				1|caching_sha2_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+					;;
+				2|mysql_native_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+					;;
+				'')
+					die "No authentication plugin selected!"
+					;;
+				*)
+					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+					;;
+			esac
+
+			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
+			unset user_answer
+		fi
+
+		local cfg_option cfg_option_tabs cfg_section
+		for config_file in "${config_files[@]}" ; do
+			cfg_option="default-authentication-plugin"
+			cfg_section="mysqld"
+			cfg_option_tabs="\t\t"
+			if [[ "${config_file}" == *client.cnf ]] ; then
+				cfg_option="default-auth"
+				cfg_section="client"
+				cfg_option_tabs="\t\t\t\t"
+			fi
+
+			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+			else
+				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+			fi
+		done
+		unset cfg_option cfg_option_tabs cfg_section
+	fi
+	unset config_files config_file
+
+	echo
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-05-24  1:19 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-05-24  1:19 UTC (permalink / raw
  To: gentoo-commits

commit:     64214d3adf834ee39437752f0c2129448404fb96
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon May 24 01:19:04 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon May 24 01:19:20 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64214d3a

dev-db/mysql: x86 stable (bug #789243)

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

 dev-db/mysql/mysql-5.7.34.ebuild | 2 +-
 dev-db/mysql/mysql-8.0.25.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.34.ebuild b/dev-db/mysql/mysql-5.7.34.ebuild
index 0e825dede97..3826beb3aee 100644
--- a/dev-db/mysql/mysql-5.7.34.ebuild
+++ b/dev-db/mysql/mysql-5.7.34.ebuild
@@ -27,7 +27,7 @@ RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.25.ebuild b/dev-db/mysql/mysql-8.0.25.ebuild
index d2edcb9991c..c23ef9ac5ac 100644
--- a/dev-db/mysql/mysql-8.0.25.ebuild
+++ b/dev-db/mysql/mysql-8.0.25.ebuild
@@ -36,7 +36,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-05-21  2:12 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-05-21  2:12 UTC (permalink / raw
  To: gentoo-commits

commit:     7805ff5572da34c96eb3e6511be42af47687ec01
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri May 21 02:12:11 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri May 21 02:12:20 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7805ff55

dev-db/mysql: add bug number for failing test

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

 dev-db/mysql/mysql-8.0.25.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.25.ebuild b/dev-db/mysql/mysql-8.0.25.ebuild
index 9387a2bcb56..d2edcb9991c 100644
--- a/dev-db/mysql/mysql-8.0.25.ebuild
+++ b/dev-db/mysql/mysql-8.0.25.ebuild
@@ -386,7 +386,7 @@ src_test() {
 	touch "${T}/disabled.def"
 
 	local -a disabled_tests
-	disabled_tests+=( "auth_sec.atomic_rename_user;0;Depends on user running test" )
+	disabled_tests+=( "auth_sec.atomic_rename_user;103512;Depends on user running test" )
 	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
 	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
 	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-05-12 15:38 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-05-12 15:38 UTC (permalink / raw
  To: gentoo-commits

commit:     71589d0e9905d3c5d21f470c381ae22d230f1293
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed May 12 14:29:02 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed May 12 15:37:56 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71589d0e

dev-db/mysql: bump to v8.0.25

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

 dev-db/mysql/Manifest                                     | 4 ++--
 dev-db/mysql/{mysql-8.0.24.ebuild => mysql-8.0.25.ebuild} | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index e84b34911c6..6abf9ac439c 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -7,7 +7,7 @@ DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705
 DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
 DIST mysql-8.0.22-patches-02.tar.xz 7580 BLAKE2B a50704c3c58b1f67ca86edb233544137927b0ae5fdf302687b48f6fd30fbbd26798e8ef8282662586b25a7240b47278b44f944a8ca59f1a198bc228dd74459c9 SHA512 59f864452e9fdebe4d3990eff8b756e9bbfad58da216b74fa8b7e8391cb0d9d543ca2828591b9ed1ee276c1dec9e1851a8c2683507f0a326c85054e31cc3f950
 DIST mysql-8.0.23-patches-01.tar.xz 7568 BLAKE2B 222120dcb5556457f382eefbb10f66f46fe1673c64730c8c8a5566942031bc98bab1f1182f747e79e23fccfb6b09197d5c2874aa2087104b6f1eaa25ea9fd60c SHA512 54222c420d57c1b206d920f22738746925ed1e0d78683f01c97cac5bd1d3450f70f784a7f603304b8595fb58120e691f94e28fa1d1884a7cc8bea1d7b177470f
-DIST mysql-8.0.24-patches-01.tar.xz 7236 BLAKE2B ffd21b74c4e379c2eb816438ea0231637cb60440f0ca3bc2fb516695d90e9665132a120bc3d7a72ee92e48785a16d1fa30e5ca831465fbdf2802e2d49f10b3b2 SHA512 7b2163bfab290cbb05443a09824ec1d53a933703498f04a82ed09a411ec0f07c9952ca4ece726c7cddb4cb4326e455ea93b3c1e8eeed28704119828c2da168e3
+DIST mysql-8.0.25-patches-01.tar.xz 3604 BLAKE2B 09cccab204c30d16bdc374bcd01d4a8e6298955f86f479b8e287aab74fb6bd9857547e360be725dfc66acb56e1bb5665277d340761d0110a8823763ad4d2d1f4 SHA512 6d90a34a20e9cbc7e7a9b5b63a1408f33ac8523f2be6c9ab6d9ad7589c3ded83c87e460d782d4d8c33f11b337151fd8db994099e371260ecf204933e844eb50e
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
 DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
@@ -20,7 +20,7 @@ DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c
 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
 DIST mysql-boost-8.0.23.tar.gz 291039175 BLAKE2B 3a7d3e05c774085d6078d0d3effd58d2df47521615356a2aa5efc2ea2ef8457e19ad57a054926ccff0a4752ca71d0464daa7fe9a3ac6c1b1d3bd86a9a82dfc58 SHA512 b8c2e2ac772b7b730f8b3bac7a5afb205da173b3639500606e7d1fac74832a0134027951855a2dc81af015e6158c924927ad63b9e1f2e7c823d45d4c4961c3f8
-DIST mysql-boost-8.0.24.tar.gz 290263082 BLAKE2B a29f42b63c68b13fbe7433c7734e1269a1961c10cdd78cc1b9459a32fd833b5efc49e4ad70c3099d265f6e3b69596754e3947568d13104c52ba0d97fa1f1ddc3 SHA512 ad8510614251c056f0963f8e51b9ed5e75452ccbf2728254d662fcc3a7ee1bdc177d1d34e958ddc31c7e6b5b3af9377ef2d9cbdc0353676b3026619673447deb
+DIST mysql-boost-8.0.25.tar.gz 290265324 BLAKE2B 5393a2a2525a886d9ece19777deae01e6c0b24b9ff5a0a5ffb9075740ed912d0df59a165b6ec9ceb60c7c28f3062cda5cceb4da3a8280f42549984c846f1ce5c SHA512 af653ccff66a9d87221b46ad4f7bcc629700549f758998b9a7fb22e4573b9495a28624e031f016f9ad8fe0dfcf481b82f1ffe224aa48c2d45531570026b26081
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1
 DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f

diff --git a/dev-db/mysql/mysql-8.0.24.ebuild b/dev-db/mysql/mysql-8.0.25.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-8.0.24.ebuild
rename to dev-db/mysql/mysql-8.0.25.ebuild
index 608252f5a96..9387a2bcb56 100644
--- a/dev-db/mysql/mysql-8.0.24.ebuild
+++ b/dev-db/mysql/mysql-8.0.25.ebuild
@@ -12,7 +12,7 @@ MY_PV="${PV//_pre*}"
 MY_P="${PN}-${MY_PV}"
 
 # Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.24-patches-01.tar.xz"
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.25-patches-01.tar.xz"
 
 SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
 	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-05-03  8:04 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2021-05-03  8:04 UTC (permalink / raw
  To: gentoo-commits

commit:     fce0a8364980742ed17fd52ed5f2564324ff2f26
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Mon May  3 08:03:14 2021 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Mon May  3 08:04:36 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fce0a836

dev-db/mysql: remove libressl support

Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.27-r2.ebuild | 17 ++++-------------
 dev-db/mysql/mysql-5.7.29-r1.ebuild | 17 ++++-------------
 dev-db/mysql/mysql-5.7.30-r1.ebuild | 16 ++++------------
 dev-db/mysql/mysql-5.7.31.ebuild    | 16 ++++------------
 dev-db/mysql/mysql-5.7.32.ebuild    | 16 ++++------------
 dev-db/mysql/mysql-5.7.33.ebuild    | 16 ++++------------
 dev-db/mysql/mysql-5.7.34.ebuild    | 16 ++++------------
 dev-db/mysql/mysql-8.0.19-r2.ebuild |  9 +++------
 dev-db/mysql/mysql-8.0.20-r1.ebuild |  8 +++-----
 dev-db/mysql/mysql-8.0.21-r1.ebuild |  8 +++-----
 dev-db/mysql/mysql-8.0.22.ebuild    |  8 +++-----
 dev-db/mysql/mysql-8.0.23.ebuild    |  8 +++-----
 dev-db/mysql/mysql-8.0.24.ebuild    |  8 +++-----
 13 files changed, 46 insertions(+), 117 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.27-r2.ebuild b/dev-db/mysql/mysql-5.7.27-r2.ebuild
index 98a59f769bd..e1cf579b3c7 100644
--- a/dev-db/mysql/mysql-5.7.27-r2.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r2.ebuild
@@ -26,11 +26,10 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
 	selinux +server static static-libs systemtap tcmalloc test yassl"
 
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
@@ -55,7 +54,6 @@ PATCHES=(
 	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
 	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.26-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-libressl-support.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
@@ -94,12 +92,10 @@ COMMON_DEPEND="net-misc/curl:=
 	tcmalloc? ( dev-util/google-perftools:0= )
 	!yassl? (
 		client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
-			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+			>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
 		)
 		!client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-			libressl? ( dev-libs/libressl:0= )
+			>=dev-libs/openssl-1.0.0:0=
 		)
 	)
 "
@@ -309,11 +305,6 @@ src_prepare() {
 		man/zlib_decompress.1 \
 		|| die
 
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
 	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
 }
 

diff --git a/dev-db/mysql/mysql-5.7.29-r1.ebuild b/dev-db/mysql/mysql-5.7.29-r1.ebuild
index 1d1fd598dd9..a68c2ae2ff7 100644
--- a/dev-db/mysql/mysql-5.7.29-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.29-r1.ebuild
@@ -26,11 +26,10 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
 	selinux +server static static-libs systemtap tcmalloc test"
 
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
@@ -55,7 +54,6 @@ PATCHES=(
 	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
 	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.29-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.29-fix-libressl-support.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-build-without-server.patch
@@ -91,12 +89,10 @@ COMMON_DEPEND="net-misc/curl:=
 	systemtap? ( >=dev-util/systemtap-1.3:0= )
 	tcmalloc? ( dev-util/google-perftools:0= )
 	client-libs? (
-		!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
-		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
 	)
 	!client-libs? (
-		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-		libressl? ( dev-libs/libressl:0= )
+		>=dev-libs/openssl-1.0.0:0=
 	)
 "
 DEPEND="${COMMON_DEPEND}
@@ -305,11 +301,6 @@ src_prepare() {
 		man/zlib_decompress.1 \
 		|| die
 
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
 	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
 }
 

diff --git a/dev-db/mysql/mysql-5.7.30-r1.ebuild b/dev-db/mysql/mysql-5.7.30-r1.ebuild
index 59e0d821600..8df5b377bb6 100644
--- a/dev-db/mysql/mysql-5.7.30-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.30-r1.ebuild
@@ -22,11 +22,10 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
 	selinux +server static static-libs systemtap tcmalloc test"
 
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
@@ -66,12 +65,10 @@ COMMON_DEPEND="net-misc/curl:=
 	systemtap? ( >=dev-util/systemtap-1.3:0= )
 	tcmalloc? ( dev-util/google-perftools:0= )
 	client-libs? (
-		!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
-		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
 	)
 	!client-libs? (
-		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-		libressl? ( dev-libs/libressl:0= )
+		>=dev-libs/openssl-1.0.0:0=
 	)
 "
 DEPEND="${COMMON_DEPEND}
@@ -280,11 +277,6 @@ src_prepare() {
 		man/zlib_decompress.1 \
 		|| die
 
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
 	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
 }
 

diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
index 514e06d3091..c5a202eecc1 100644
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ b/dev-db/mysql/mysql-5.7.31.ebuild
@@ -20,11 +20,10 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
 	selinux +server static static-libs systemtap tcmalloc test"
 
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
@@ -41,14 +40,12 @@ COMMON_DEPEND="
 	sys-libs/ncurses:0=
 	client-libs? (
 		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
-		!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
-		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
 	)
 	!client-libs? (
 		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
 		>=sys-libs/zlib-1.2.3:0=
-		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-		libressl? ( dev-libs/libressl:0= )
+		>=dev-libs/openssl-1.0.0:0=
 	)
 	server? (
 		>=app-arch/lz4-0_p131:=
@@ -253,11 +250,6 @@ src_prepare() {
 		man/zlib_decompress.1 \
 		|| die
 
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
 	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
 
 	cmake_src_prepare

diff --git a/dev-db/mysql/mysql-5.7.32.ebuild b/dev-db/mysql/mysql-5.7.32.ebuild
index 6c3a7183a83..c68d1e4cd86 100644
--- a/dev-db/mysql/mysql-5.7.32.ebuild
+++ b/dev-db/mysql/mysql-5.7.32.ebuild
@@ -20,11 +20,10 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
 	selinux +server static static-libs systemtap tcmalloc test"
 
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
@@ -41,14 +40,12 @@ COMMON_DEPEND="
 	sys-libs/ncurses:0=
 	client-libs? (
 		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
-		!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
-		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
 	)
 	!client-libs? (
 		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
 		>=sys-libs/zlib-1.2.3:0=
-		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-		libressl? ( dev-libs/libressl:0= )
+		>=dev-libs/openssl-1.0.0:0=
 	)
 	server? (
 		>=app-arch/lz4-0_p131:=
@@ -253,11 +250,6 @@ src_prepare() {
 		man/zlib_decompress.1 \
 		|| die
 
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
 	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
 
 	cmake_src_prepare

diff --git a/dev-db/mysql/mysql-5.7.33.ebuild b/dev-db/mysql/mysql-5.7.33.ebuild
index 0296a2135fc..6a24a16ccfe 100644
--- a/dev-db/mysql/mysql-5.7.33.ebuild
+++ b/dev-db/mysql/mysql-5.7.33.ebuild
@@ -20,11 +20,10 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
 	selinux +server static static-libs systemtap tcmalloc test"
 
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
@@ -41,14 +40,12 @@ COMMON_DEPEND="
 	sys-libs/ncurses:0=
 	client-libs? (
 		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
-		!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
-		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
 	)
 	!client-libs? (
 		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
 		>=sys-libs/zlib-1.2.3:0=
-		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-		libressl? ( dev-libs/libressl:0= )
+		>=dev-libs/openssl-1.0.0:0=
 	)
 	server? (
 		>=app-arch/lz4-0_p131:=
@@ -253,11 +250,6 @@ src_prepare() {
 		man/zlib_decompress.1 \
 		|| die
 
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
 	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
 
 	cmake_src_prepare

diff --git a/dev-db/mysql/mysql-5.7.34.ebuild b/dev-db/mysql/mysql-5.7.34.ebuild
index da6fe570622..0e825dede97 100644
--- a/dev-db/mysql/mysql-5.7.34.ebuild
+++ b/dev-db/mysql/mysql-5.7.34.ebuild
@@ -20,11 +20,10 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
 	selinux +server static static-libs systemtap tcmalloc test"
 
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
@@ -41,14 +40,12 @@ COMMON_DEPEND="
 	sys-libs/ncurses:0=
 	client-libs? (
 		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
-		!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
-		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+		>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
 	)
 	!client-libs? (
 		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
 		>=sys-libs/zlib-1.2.3:0=
-		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-		libressl? ( dev-libs/libressl:0= )
+		>=dev-libs/openssl-1.0.0:0=
 	)
 	server? (
 		>=app-arch/lz4-0_p131:=
@@ -253,11 +250,6 @@ src_prepare() {
 		man/zlib_decompress.1 \
 		|| die
 
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
 	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
 
 	cmake_src_prepare

diff --git a/dev-db/mysql/mysql-8.0.19-r2.ebuild b/dev-db/mysql/mysql-8.0.19-r2.ebuild
index 60dd2a3f27b..f979bb9020f 100644
--- a/dev-db/mysql/mysql-8.0.19-r2.ebuild
+++ b/dev-db/mysql/mysql-8.0.19-r2.ebuild
@@ -29,11 +29,10 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
 	router selinux +server tcmalloc test"
 
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )
 	cjk? ( server )
@@ -64,7 +63,6 @@ PATCHES=(
 	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-8.0.18.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.19-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.19-fix-libressl-support.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.19-fix-events_bugs-test.patch
 )
 
@@ -74,8 +72,7 @@ COMMON_DEPEND="
 	>=app-arch/lz4-0_p131:=
 	sys-libs/ncurses:0=
 	>=sys-libs/zlib-1.2.3:0=
-	libressl? ( dev-libs/libressl:0= )
-	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	>=dev-libs/openssl-1.0.0:0=
 	server? (
 		dev-libs/icu:=
 		dev-libs/libevent:=

diff --git a/dev-db/mysql/mysql-8.0.20-r1.ebuild b/dev-db/mysql/mysql-8.0.20-r1.ebuild
index 4545a1eec02..70c3c6e5e87 100644
--- a/dev-db/mysql/mysql-8.0.20-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.20-r1.ebuild
@@ -23,11 +23,10 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
 	router selinux +server tcmalloc test"
 
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )
 	cjk? ( server )
@@ -49,8 +48,7 @@ COMMON_DEPEND="
 	>=app-arch/lz4-0_p131:=
 	sys-libs/ncurses:0=
 	>=sys-libs/zlib-1.2.3:0=
-	libressl? ( dev-libs/libressl:0= )
-	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	>=dev-libs/openssl-1.0.0:0=
 	server? (
 		dev-libs/icu:=
 		dev-libs/libevent:=

diff --git a/dev-db/mysql/mysql-8.0.21-r1.ebuild b/dev-db/mysql/mysql-8.0.21-r1.ebuild
index b3a4bf5a2ad..d63f3416d34 100644
--- a/dev-db/mysql/mysql-8.0.21-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.21-r1.ebuild
@@ -23,11 +23,10 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
 	router selinux +server tcmalloc test"
 
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )
 	cjk? ( server )
@@ -50,8 +49,7 @@ COMMON_DEPEND="
 	app-arch/zstd:=
 	sys-libs/ncurses:0=
 	>=sys-libs/zlib-1.2.3:0=
-	libressl? ( dev-libs/libressl:0= )
-	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	>=dev-libs/openssl-1.0.0:0=
 	server? (
 		dev-libs/icu:=
 		dev-libs/libevent:=[ssl]

diff --git a/dev-db/mysql/mysql-8.0.22.ebuild b/dev-db/mysql/mysql-8.0.22.ebuild
index 18586043f65..1c0cd3052d7 100644
--- a/dev-db/mysql/mysql-8.0.22.ebuild
+++ b/dev-db/mysql/mysql-8.0.22.ebuild
@@ -23,11 +23,10 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
 	router selinux +server tcmalloc test"
 
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )
 	cjk? ( server )
@@ -50,8 +49,7 @@ COMMON_DEPEND="
 	app-arch/zstd:=
 	sys-libs/ncurses:0=
 	>=sys-libs/zlib-1.2.3:0=
-	libressl? ( dev-libs/libressl:0= )
-	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	>=dev-libs/openssl-1.0.0:0=
 	server? (
 		dev-libs/icu:=
 		dev-libs/libevent:=[ssl,threads]

diff --git a/dev-db/mysql/mysql-8.0.23.ebuild b/dev-db/mysql/mysql-8.0.23.ebuild
index 89c21bd9a66..4de06f95e60 100644
--- a/dev-db/mysql/mysql-8.0.23.ebuild
+++ b/dev-db/mysql/mysql-8.0.23.ebuild
@@ -23,11 +23,10 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
 	router selinux +server tcmalloc test"
 
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )
 	cjk? ( server )
@@ -50,8 +49,7 @@ COMMON_DEPEND="
 	app-arch/zstd:=
 	sys-libs/ncurses:0=
 	>=sys-libs/zlib-1.2.3:0=
-	libressl? ( dev-libs/libressl:0= )
-	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	>=dev-libs/openssl-1.0.0:0=
 	server? (
 		dev-libs/icu:=
 		dev-libs/libevent:=[ssl,threads]

diff --git a/dev-db/mysql/mysql-8.0.24.ebuild b/dev-db/mysql/mysql-8.0.24.ebuild
index a76d3a37969..608252f5a96 100644
--- a/dev-db/mysql/mysql-8.0.24.ebuild
+++ b/dev-db/mysql/mysql-8.0.24.ebuild
@@ -23,11 +23,10 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
 	router selinux +server tcmalloc test"
 
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )
 	cjk? ( server )
@@ -50,8 +49,7 @@ COMMON_DEPEND="
 	app-arch/zstd:=
 	sys-libs/ncurses:0=
 	>=sys-libs/zlib-1.2.3:0=
-	libressl? ( dev-libs/libressl:0= )
-	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	>=dev-libs/openssl-1.0.0:0=
 	server? (
 		dev-libs/icu:=
 		dev-libs/libevent:=[ssl,threads]


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-05-01 18:24 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2021-05-01 18:24 UTC (permalink / raw
  To: gentoo-commits

commit:     7a5a381e70acbfc38087bf5e949da0ecac9577c3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May  1 18:19:08 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May  1 18:24:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a5a381e

dev-db/mysql: drop redundant USE=libressl in metadata.xml

It was/is a global USE flag anyway and these
didn't add anything.

Package-Manager: Portage-3.0.18-prefix, Repoman-3.0.3
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/metadata.xml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index e4197ced880..600b9891578 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -15,7 +15,6 @@ dev-db/mariadb
   <flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages (not recommended)</flag>
   <flag name="experimental">Build experimental features aka "rapid" plugins</flag>
   <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
-  <flag name="libressl">Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</pkg></flag>
   <flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
   <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
   <flag name="router">Build the MySQL router program</flag>


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-04-28 13:20 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-04-28 13:20 UTC (permalink / raw
  To: gentoo-commits

commit:     31ec9d3e6820d715a2d2d3389504fd0185671aee
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 28 12:19:17 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Apr 28 13:19:19 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31ec9d3e

dev-db/mysql: force C++14

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

 dev-db/mysql/mysql-5.7.34.ebuild | 3 +++
 dev-db/mysql/mysql-8.0.24.ebuild | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/dev-db/mysql/mysql-5.7.34.ebuild b/dev-db/mysql/mysql-5.7.34.ebuild
index dafc75c834e..da6fe570622 100644
--- a/dev-db/mysql/mysql-5.7.34.ebuild
+++ b/dev-db/mysql/mysql-5.7.34.ebuild
@@ -269,6 +269,9 @@ src_configure() {
 
 	append-cxxflags -felide-constructors
 
+	# code is not C++17 ready, bug #786402
+	append-cxxflags -std=c++14
+
 	# bug #283926, with GCC4.4, this is required to get correct behavior.
 	append-flags -fno-strict-aliasing
 

diff --git a/dev-db/mysql/mysql-8.0.24.ebuild b/dev-db/mysql/mysql-8.0.24.ebuild
index 3d12bfc88fb..a76d3a37969 100644
--- a/dev-db/mysql/mysql-8.0.24.ebuild
+++ b/dev-db/mysql/mysql-8.0.24.ebuild
@@ -193,6 +193,9 @@ src_configure() {
 
 	append-cxxflags -felide-constructors
 
+	# code is not C++17 ready, bug #786402
+	append-cxxflags -std=c++14
+
 	# bug #283926, with GCC4.4, this is required to get correct behavior.
 	append-flags -fno-strict-aliasing
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-04-26  1:03 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-04-26  1:03 UTC (permalink / raw
  To: gentoo-commits

commit:     aa6e3bf9502e336a22ea266a7e372f5c771fb453
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 26 00:29:22 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Apr 26 00:34:36 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa6e3bf9

dev-db/mysql: bump to v5.7.34

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

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-5.7.34.ebuild | 1244 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1246 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index b9cb58315f9..e84b34911c6 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -2,6 +2,7 @@ DIST mysql-5.7.30-patches-01.tar.xz 6684 BLAKE2B 9350280094619fda0d91eacae573396
 DIST mysql-5.7.31-patches-01.tar.xz 6664 BLAKE2B 8225f286f0090653f9714545daa95ccdadaa58812e55284d1ee52ad2dcca18960b9266797630762595d832aa1dda1d9e2df691f0c728102f162b376346c99b3c SHA512 c6260e688da6e8f049ba7ac0553ad442e76829deaca32c1b7a101ec927a36b1571cb24982391f05545a9f62d94502efc09530d444e4abfc08350ab4c19fbfd37
 DIST mysql-5.7.32-patches-01.tar.xz 6660 BLAKE2B 5c63158615398bdcc4480a0e1b058f491b39ffc7ee33767b425f3b254555411031f64d865e1924afe8aa3926e4cba18049f1219a0a8acc702bc5e011c94fa947 SHA512 bf5e0d27af81e599005268ee243af4cd93f6df95c32cccb268a749322b4e5f73a2ce5d51f0ad1b0e1f2cf4702b8a05e4b2e0b73110fd4aac61f2a0f51bf4952e
 DIST mysql-5.7.33-patches-01.tar.xz 6672 BLAKE2B cfa410f9ba5a4ba7e43923e7b5940c2dc6a9356b49230ebaea24bd7eef8a9639fc746e917c22241e19c830b81252e95f38e2c9d6054494de700bae46011fb2f4 SHA512 b16bb9531c44f1c5ec9c08aee6c1f5f5d2e3fe59a0039a54f6c050660a18f7c78b955e7eea7bef4e7dccfcdaa81464e0d8e47ac7d0e40ecb90187865a8a0412e
+DIST mysql-5.7.34-patches-01.tar.xz 6676 BLAKE2B b925880bfbb991fcba81964ff658a2ecab38da637a6093270a724ab8e405ab092d5fb9684f53f44d001e34287366df234b841d9ebcae62d49becdb93a3c3e324 SHA512 80a89f4b4a7ecc04f3115c6aaa0b0013e38c2813fa6dea095e826ef3944298715a48e0deacb691d23526b1524b207c83176290faea2461d3fcd94edabe3d8943
 DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
 DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
 DIST mysql-8.0.22-patches-02.tar.xz 7580 BLAKE2B a50704c3c58b1f67ca86edb233544137927b0ae5fdf302687b48f6fd30fbbd26798e8ef8282662586b25a7240b47278b44f944a8ca59f1a198bc228dd74459c9 SHA512 59f864452e9fdebe4d3990eff8b756e9bbfad58da216b74fa8b7e8391cb0d9d543ca2828591b9ed1ee276c1dec9e1851a8c2683507f0a326c85054e31cc3f950
@@ -13,6 +14,7 @@ DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72
 DIST mysql-boost-5.7.31.tar.gz 51382559 BLAKE2B 86430ee01b0b066ffbd1c876c7d09afecdd57f99cfe07417f406345bcdb14cc6fd33a2d4d92dfe15e87f34ec476bf34d62508ac3f99fb3e11957458e0d6ec20b SHA512 d7fc1927c860562d121658031bcbd58d36a942340423bf7b692cef84c29e67b56d009c9f9bb10cde8acabd6f9db58c67eb542349eccc4719fb38c8570738700a
 DIST mysql-boost-5.7.32.tar.gz 52882168 BLAKE2B dd112fa1d8bd29d86fba076675b5b7c9c98b6fb876aed45a00e8a25be716102fc9aa688b7170bef07b1c9f9751737277774d8fb2c64c21e181ecae58f89b4a8a SHA512 33a617d040efd065ea1c2ad84be537f851480abd5cc8a6879b7f170bc4e6db9432bd03f2a6bc680b71f17839c508cab0e7ef1a3aba032197da1b7943c916c77a
 DIST mysql-boost-5.7.33.tar.gz 52912380 BLAKE2B bca09314ae73932f6095799faa016998e65655cf5ea74d5596dcdc785e77014fe0b29a6c123e8618771f4a20a19978df00f7b79eea329aeb4b536ae71a4bef94 SHA512 1d1e1e5934fb17ff731fea45b88d4af6a394c2fbf0177a87803b18cb0eb4fb8d4939f82fc22b6cbc2af64022a44e206cd23e2e88ce11cc119c3ea22129d54e7a
+DIST mysql-boost-5.7.34.tar.gz 52891142 BLAKE2B 986fe106d73495ea9acb837f699ef2b1ffd123d9728b61da42f990d670569f1f7c12dc0a8611c3a7b6e3ed7be9fc277e1a977fa6c6d06f7d156a2f492951d9c7 SHA512 4eab7e90477b75643df743d806d5abcfb56572a2aa003a354980287c9148209f4fb7f0158ba969fb0462c32e49fcb4cf2a79f0330ab1bd2b243725dbf6f31d6d
 DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
 DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99
 DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1

diff --git a/dev-db/mysql/mysql-5.7.34.ebuild b/dev-db/mysql/mysql-5.7.34.ebuild
new file mode 100644
index 00000000000..dafc75c834e
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.34.ebuild
@@ -0,0 +1,1244 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs multilib-minimal
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.34-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="5.7/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+	sys-libs/ncurses:0=
+	client-libs? (
+		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
+		!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+	)
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+		libressl? ( dev-libs/libressl:0= )
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=[ssl]
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+	)
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
+	virtual/yacc
+	server? (
+		dev-libs/libevent:=[ssl]
+		experimental? ( net-libs/rpcsvc-proto )
+	)
+	static? ( sys-libs/ncurses[static-libs] )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:8.0
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
+	server? (
+		!prefix? (
+			acct-group/mysql acct-user/mysql
+			dev-db/mysql-init-scripts
+		)
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="3G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="3G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/extra/libevent \
+		"${S}"/zlib \
+		|| die
+
+	# Don't clash with dev-db/mysql-connector-c
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI, bug 530132
+	if multilib_is_native_abi ; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
+			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static ; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in \
+		auth_sec.keyring_udf \
+		innodb.import_compress_encrypt \
+		perfschema.privilege_table_io \
+	; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
+	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+	for t in \
+		main.xa_prepared_binlog_off \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_non_direct_stm_mixing_engines \
+	; do
+		_disable_test "$t" "Unstable test"
+	done
+
+	for t in \
+		gis.geometry_class_attri_prop \
+		gis.geometry_property_function_issimple \
+		gis.gis_bugs_crashes \
+		gis.spatial_op_testingfunc_mix \
+		gis.spatial_analysis_functions_buffer \
+		gis.spatial_analysis_functions_distance \
+		gis.spatial_utility_function_distance_sphere \
+		gis.spatial_utility_function_simplify \
+		gis.spatial_analysis_functions_centroid \
+		main.with_recursive \
+	; do
+		_disable_test "$t" "Known rounding error with latest AMD processors"
+	done
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
+	fi
+
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.mysqldump_bugs \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	if has_version '>=dev-libs/openssl-1.1.1' ; then
+		# Tests are expecting <openssl-1.1.1 default cipher
+		for t in \
+			auth_sec.cert_verify \
+			auth_sec.mysql_ssl_connection \
+			auth_sec.openssl_cert_generation \
+			auth_sec.ssl_auto_detect \
+			auth_sec.ssl_mode \
+			auth_sec.tls \
+			binlog.binlog_grant_alter_user \
+			encryption.innodb_onlinealter_encryption \
+			main.grant_alter_user_qa \
+			main.grant_user_lock_qa \
+			main.mysql_ssl_default \
+			main.openssl_1 \
+			main.plugin_auth_sha256 \
+			main.plugin_auth_sha256_2 \
+			main.plugin_auth_sha256_server_default \
+			main.plugin_auth_sha256_server_default_tls \
+			main.plugin_auth_sha256_tls \
+			main.ssl \
+			main.ssl_8k_key \
+			main.ssl_bug75311 \
+			main.ssl_ca \
+			main.ssl_cipher \
+			main.ssl_compress \
+			main.ssl_crl \
+			main.ssl_ecdh \
+			main.ssl_verify_identity \
+			x.connection_tls_version \
+			x.connection_openssl \
+		; do
+			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+	cmake_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		eprefixify "${TMPDIR}/my.cnf.ok"
+
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-04-26  1:03 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-04-26  1:03 UTC (permalink / raw
  To: gentoo-commits

commit:     8572e6330affffbb8b14014fdafc337f4b6c17a6
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 26 00:15:24 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Apr 26 00:34:36 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8572e633

dev-db/mysql: bump to v8.0.24

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

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-8.0.24.ebuild | 1162 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1164 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 1df77106f48..b9cb58315f9 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -6,6 +6,7 @@ DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705
 DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
 DIST mysql-8.0.22-patches-02.tar.xz 7580 BLAKE2B a50704c3c58b1f67ca86edb233544137927b0ae5fdf302687b48f6fd30fbbd26798e8ef8282662586b25a7240b47278b44f944a8ca59f1a198bc228dd74459c9 SHA512 59f864452e9fdebe4d3990eff8b756e9bbfad58da216b74fa8b7e8391cb0d9d543ca2828591b9ed1ee276c1dec9e1851a8c2683507f0a326c85054e31cc3f950
 DIST mysql-8.0.23-patches-01.tar.xz 7568 BLAKE2B 222120dcb5556457f382eefbb10f66f46fe1673c64730c8c8a5566942031bc98bab1f1182f747e79e23fccfb6b09197d5c2874aa2087104b6f1eaa25ea9fd60c SHA512 54222c420d57c1b206d920f22738746925ed1e0d78683f01c97cac5bd1d3450f70f784a7f603304b8595fb58120e691f94e28fa1d1884a7cc8bea1d7b177470f
+DIST mysql-8.0.24-patches-01.tar.xz 7236 BLAKE2B ffd21b74c4e379c2eb816438ea0231637cb60440f0ca3bc2fb516695d90e9665132a120bc3d7a72ee92e48785a16d1fa30e5ca831465fbdf2802e2d49f10b3b2 SHA512 7b2163bfab290cbb05443a09824ec1d53a933703498f04a82ed09a411ec0f07c9952ca4ece726c7cddb4cb4326e455ea93b3c1e8eeed28704119828c2da168e3
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
 DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
@@ -17,6 +18,7 @@ DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c
 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
 DIST mysql-boost-8.0.23.tar.gz 291039175 BLAKE2B 3a7d3e05c774085d6078d0d3effd58d2df47521615356a2aa5efc2ea2ef8457e19ad57a054926ccff0a4752ca71d0464daa7fe9a3ac6c1b1d3bd86a9a82dfc58 SHA512 b8c2e2ac772b7b730f8b3bac7a5afb205da173b3639500606e7d1fac74832a0134027951855a2dc81af015e6158c924927ad63b9e1f2e7c823d45d4c4961c3f8
+DIST mysql-boost-8.0.24.tar.gz 290263082 BLAKE2B a29f42b63c68b13fbe7433c7734e1269a1961c10cdd78cc1b9459a32fd833b5efc49e4ad70c3099d265f6e3b69596754e3947568d13104c52ba0d97fa1f1ddc3 SHA512 ad8510614251c056f0963f8e51b9ed5e75452ccbf2728254d662fcc3a7ee1bdc177d1d34e958ddc31c7e6b5b3af9377ef2d9cbdc0353676b3026619673447deb
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1
 DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f

diff --git a/dev-db/mysql/mysql-8.0.24.ebuild b/dev-db/mysql/mysql-8.0.24.ebuild
new file mode 100644
index 00000000000..3d12bfc88fb
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.24.ebuild
@@ -0,0 +1,1162 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.24-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+	router selinux +server tcmalloc test"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	cjk? ( server )
+	jemalloc? ( server )
+	numa? ( server )
+	profiling? ( server )
+	router? ( server )
+	tcmalloc? ( server )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	>=app-arch/lz4-0_p131:=
+	app-arch/zstd:=
+	sys-libs/ncurses:0=
+	>=sys-libs/zlib-1.2.3:0=
+	libressl? ( dev-libs/libressl:0= )
+	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	server? (
+		dev-libs/icu:=
+		dev-libs/libevent:=[ssl,threads]
+		>=dev-libs/protobuf-3.8:=
+		net-libs/libtirpc:=
+		cjk? ( app-text/mecab:= )
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		tcmalloc? ( dev-util/google-perftools:0= )
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	virtual/yacc
+	server? ( net-libs/rpcsvc-proto )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:5.7
+	selinux? ( sec-policy/selinux-mysql )
+	!prefix? (
+		acct-group/mysql acct-user/mysql
+		dev-db/mysql-init-scripts
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="2G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="2G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	# Avoid rpm call which would trigger sandbox, #692368
+	sed -i \
+		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+		CMakeLists.txt || die
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove man pages for client-lib tools we don't install
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		# Using bundled editline to get CTRL+C working
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+		-DWITH_ROUTER=$(usex router ON OFF)
+	)
+
+	if is-flagq -fno-lto ; then
+		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
+		mycmakeargs+=( -DWITH_LTO=OFF )
+	elif is-flagq -flto ; then
+		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+		myconf+=( -DWITH_LTO=ON )
+	else
+		# Disable automagic
+		myconf+=( -DWITH_LTO=OFF )
+	fi
+
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+	mycmakeargs+=(
+		-DWITH_ICU=system
+		-DWITH_LZ4=system
+		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+		-DWITH_RAPIDJSON=bundled
+		-DWITH_ZSTD=system
+	)
+
+	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+		ewarn "You MUST file bugs without these variables set."
+		ewarn "Tests will probably fail!"
+
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+		)
+	elif use latin1 ; then
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=latin1
+			-DDEFAULT_COLLATION=latin1_swedish_ci
+		)
+	else
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=utf8mb4
+			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+		)
+	fi
+
+	if use server ; then
+		mycmakeargs+=(
+			-DWITH_EXTRA_CHARSETS=all
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_LIBEVENT=system
+			-DWITH_PROTOBUF=system
+			-DWITH_NUMA=$(usex numa ON OFF)
+		)
+
+		if use jemalloc ; then
+			mycmakeargs+=( -DWITH_JEMALLOC=ON )
+		elif use tcmalloc ; then
+			mycmakeargs+=( -DWITH_TCMALLOC=ON )
+		fi
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_SYSTEMD=no
+		)
+	fi
+
+	cmake_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='perl server' \
+# FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname bug reason
+		rawtestname="${1}" ; shift
+		bug="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Run CTest (test-units)
+	cmake_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+
+	local -a disabled_tests
+	disabled_tests+=( "auth_sec.atomic_rename_user;0;Depends on user running test" )
+	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
+	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "main.explain_tree;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.derived_limit;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure - no upstream bug yet" )
+	disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "perfschema.statement_digest_query_sample;0;Test will fail on slow hardware")
+	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
+		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
+	fi
+
+	local test_infos_str test_infos_arr
+	for test_infos_str in "${disabled_tests[@]}" ; do
+		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+			die "Invalid test data set, not matching format: ${test_infos_str}"
+		fi
+
+		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+	done
+	unset test_infos_str test_infos_arr
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	cmake_src_install
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	mycnf_src="my.cnf-8.0.distro-server"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR}/${mycnf_src}" \
+		> "${TMPDIR}/my.cnf.ok" || die
+
+	if use prefix ; then
+		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8mb4|latin1|g" \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	eprefixify "${TMPDIR}/my.cnf.ok"
+
+	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+	if use router ; then
+		rm -rf \
+			"${ED}/usr/LICENSE.router" \
+			"${ED}/usr/README.router" \
+			"${ED}/usr/run" \
+			"${ED}/usr/var" \
+			|| die
+	fi
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	# NOTE: $MY_LOGDIR contains $EPREFIX by default
+	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		einfo
+		elog "You might want to run:"
+		elog "  \"emerge --config =${CATEGORY}/${PF}\""
+		elog "if this is a new install."
+		einfo
+	else
+		einfo
+		elog "Upgrade process for ${PN}-8.x has changed. Please read"
+		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+		einfo
+	fi
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	local -a config_files
+
+	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+	fi
+
+	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+	fi
+
+	if [[ ${#config_files[@]} -gt 0 ]] ; then
+		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+			local user_answer
+
+			echo
+			einfo "Please select default authentication plugin (enter number or plugin name):"
+			einfo "1) caching_sha2_password [MySQL 8.0 default]"
+			einfo "2) mysql_native_password [MySQL 5.7 default]"
+			einfo
+			einfo "For details see:"
+			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+			read -p "    >" user_answer
+			echo
+
+			case "${user_answer}" in
+				1|caching_sha2_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+					;;
+				2|mysql_native_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+					;;
+				'')
+					die "No authentication plugin selected!"
+					;;
+				*)
+					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+					;;
+			esac
+
+			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
+			unset user_answer
+		fi
+
+		local cfg_option cfg_option_tabs cfg_section
+		for config_file in "${config_files[@]}" ; do
+			cfg_option="default-authentication-plugin"
+			cfg_section="mysqld"
+			cfg_option_tabs="\t\t"
+			if [[ "${config_file}" == *client.cnf ]] ; then
+				cfg_option="default-auth"
+				cfg_section="client"
+				cfg_option_tabs="\t\t\t\t"
+			fi
+
+			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+			else
+				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+			fi
+		done
+		unset cfg_option cfg_option_tabs cfg_section
+	fi
+	unset config_files config_file
+
+	echo
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-02-26  8:49 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2021-02-26  8:49 UTC (permalink / raw
  To: gentoo-commits

commit:     169a9430d010a4b71d6e8afc2f454f3d517ca06f
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 26 08:49:47 2021 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Fri Feb 26 08:49:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=169a9430

dev-db/mysql: Stabilize 8.0.23 amd64, #766339

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.23.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.23.ebuild b/dev-db/mysql/mysql-8.0.23.ebuild
index f47a82743ef..89c21bd9a66 100644
--- a/dev-db/mysql/mysql-8.0.23.ebuild
+++ b/dev-db/mysql/mysql-8.0.23.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-02-26  8:49 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2021-02-26  8:49 UTC (permalink / raw
  To: gentoo-commits

commit:     d9ebf7cecbcf7950e132caf02ebb21f000842209
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 26 08:49:46 2021 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Fri Feb 26 08:49:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9ebf7ce

dev-db/mysql: Stabilize 5.7.33 amd64, #766339

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.33.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.33.ebuild b/dev-db/mysql/mysql-5.7.33.ebuild
index 91a78000493..0296a2135fc 100644
--- a/dev-db/mysql/mysql-5.7.33.ebuild
+++ b/dev-db/mysql/mysql-5.7.33.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-02-03 23:55 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-02-03 23:55 UTC (permalink / raw
  To: gentoo-commits

commit:     0b0692d855a831b6b0d43f242c06e7c6524e0f59
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  3 23:51:57 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Feb  3 23:51:57 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b0692d8

dev-db/mysql: x86 stable (bug #766339)

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

 dev-db/mysql/mysql-5.7.33.ebuild | 2 +-
 dev-db/mysql/mysql-8.0.23.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.33.ebuild b/dev-db/mysql/mysql-5.7.33.ebuild
index 546fc699fb6..91a78000493 100644
--- a/dev-db/mysql/mysql-5.7.33.ebuild
+++ b/dev-db/mysql/mysql-5.7.33.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.23.ebuild b/dev-db/mysql/mysql-8.0.23.ebuild
index 28619bb7485..f47a82743ef 100644
--- a/dev-db/mysql/mysql-8.0.23.ebuild
+++ b/dev-db/mysql/mysql-8.0.23.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-01-21 22:32 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-01-21 22:32 UTC (permalink / raw
  To: gentoo-commits

commit:     7e7077e3bc475ddacb949b76b744a985a4d822eb
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 21:38:17 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Jan 21 22:32:11 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e7077e3

dev-db/mysql: bump to v5.7.33

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

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-5.7.33.ebuild | 1244 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1246 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 41e7ba33fe2..1df77106f48 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,6 +1,7 @@
 DIST mysql-5.7.30-patches-01.tar.xz 6684 BLAKE2B 9350280094619fda0d91eacae573396198954fceb5dc039669d236b1dad98eef306702550b517ef30ee3d0e6721667b6f5549df91e3c15cef68888079c00d9ba SHA512 74e8e8794fe54b73776b38296aa42c65547311b80bfe65c88b2f961bd44083e9628eb47da4ebcf4c20e2d7c694f514223bcbf29cce27853cca500710ae97778d
 DIST mysql-5.7.31-patches-01.tar.xz 6664 BLAKE2B 8225f286f0090653f9714545daa95ccdadaa58812e55284d1ee52ad2dcca18960b9266797630762595d832aa1dda1d9e2df691f0c728102f162b376346c99b3c SHA512 c6260e688da6e8f049ba7ac0553ad442e76829deaca32c1b7a101ec927a36b1571cb24982391f05545a9f62d94502efc09530d444e4abfc08350ab4c19fbfd37
 DIST mysql-5.7.32-patches-01.tar.xz 6660 BLAKE2B 5c63158615398bdcc4480a0e1b058f491b39ffc7ee33767b425f3b254555411031f64d865e1924afe8aa3926e4cba18049f1219a0a8acc702bc5e011c94fa947 SHA512 bf5e0d27af81e599005268ee243af4cd93f6df95c32cccb268a749322b4e5f73a2ce5d51f0ad1b0e1f2cf4702b8a05e4b2e0b73110fd4aac61f2a0f51bf4952e
+DIST mysql-5.7.33-patches-01.tar.xz 6672 BLAKE2B cfa410f9ba5a4ba7e43923e7b5940c2dc6a9356b49230ebaea24bd7eef8a9639fc746e917c22241e19c830b81252e95f38e2c9d6054494de700bae46011fb2f4 SHA512 b16bb9531c44f1c5ec9c08aee6c1f5f5d2e3fe59a0039a54f6c050660a18f7c78b955e7eea7bef4e7dccfcdaa81464e0d8e47ac7d0e40ecb90187865a8a0412e
 DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
 DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
 DIST mysql-8.0.22-patches-02.tar.xz 7580 BLAKE2B a50704c3c58b1f67ca86edb233544137927b0ae5fdf302687b48f6fd30fbbd26798e8ef8282662586b25a7240b47278b44f944a8ca59f1a198bc228dd74459c9 SHA512 59f864452e9fdebe4d3990eff8b756e9bbfad58da216b74fa8b7e8391cb0d9d543ca2828591b9ed1ee276c1dec9e1851a8c2683507f0a326c85054e31cc3f950
@@ -10,6 +11,7 @@ DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b4643
 DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
 DIST mysql-boost-5.7.31.tar.gz 51382559 BLAKE2B 86430ee01b0b066ffbd1c876c7d09afecdd57f99cfe07417f406345bcdb14cc6fd33a2d4d92dfe15e87f34ec476bf34d62508ac3f99fb3e11957458e0d6ec20b SHA512 d7fc1927c860562d121658031bcbd58d36a942340423bf7b692cef84c29e67b56d009c9f9bb10cde8acabd6f9db58c67eb542349eccc4719fb38c8570738700a
 DIST mysql-boost-5.7.32.tar.gz 52882168 BLAKE2B dd112fa1d8bd29d86fba076675b5b7c9c98b6fb876aed45a00e8a25be716102fc9aa688b7170bef07b1c9f9751737277774d8fb2c64c21e181ecae58f89b4a8a SHA512 33a617d040efd065ea1c2ad84be537f851480abd5cc8a6879b7f170bc4e6db9432bd03f2a6bc680b71f17839c508cab0e7ef1a3aba032197da1b7943c916c77a
+DIST mysql-boost-5.7.33.tar.gz 52912380 BLAKE2B bca09314ae73932f6095799faa016998e65655cf5ea74d5596dcdc785e77014fe0b29a6c123e8618771f4a20a19978df00f7b79eea329aeb4b536ae71a4bef94 SHA512 1d1e1e5934fb17ff731fea45b88d4af6a394c2fbf0177a87803b18cb0eb4fb8d4939f82fc22b6cbc2af64022a44e206cd23e2e88ce11cc119c3ea22129d54e7a
 DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
 DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99
 DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1

diff --git a/dev-db/mysql/mysql-5.7.33.ebuild b/dev-db/mysql/mysql-5.7.33.ebuild
new file mode 100644
index 00000000000..546fc699fb6
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.33.ebuild
@@ -0,0 +1,1244 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs multilib-minimal
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.33-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="5.7/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+	sys-libs/ncurses:0=
+	client-libs? (
+		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
+		!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+	)
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+		libressl? ( dev-libs/libressl:0= )
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=[ssl]
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+	)
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
+	virtual/yacc
+	server? (
+		dev-libs/libevent:=[ssl]
+		experimental? ( net-libs/rpcsvc-proto )
+	)
+	static? ( sys-libs/ncurses[static-libs] )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:8.0
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
+	server? (
+		!prefix? (
+			acct-group/mysql acct-user/mysql
+			dev-db/mysql-init-scripts
+		)
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="3G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="3G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/extra/libevent \
+		"${S}"/zlib \
+		|| die
+
+	# Don't clash with dev-db/mysql-connector-c
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI, bug 530132
+	if multilib_is_native_abi ; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
+			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static ; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in \
+		auth_sec.keyring_udf \
+		innodb.import_compress_encrypt \
+		perfschema.privilege_table_io \
+	; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
+	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+	for t in \
+		main.xa_prepared_binlog_off \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_non_direct_stm_mixing_engines \
+	; do
+		_disable_test "$t" "Unstable test"
+	done
+
+	for t in \
+		gis.geometry_class_attri_prop \
+		gis.geometry_property_function_issimple \
+		gis.gis_bugs_crashes \
+		gis.spatial_op_testingfunc_mix \
+		gis.spatial_analysis_functions_buffer \
+		gis.spatial_analysis_functions_distance \
+		gis.spatial_utility_function_distance_sphere \
+		gis.spatial_utility_function_simplify \
+		gis.spatial_analysis_functions_centroid \
+		main.with_recursive \
+	; do
+		_disable_test "$t" "Known rounding error with latest AMD processors"
+	done
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
+	fi
+
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.mysqldump_bugs \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	if has_version '>=dev-libs/openssl-1.1.1' ; then
+		# Tests are expecting <openssl-1.1.1 default cipher
+		for t in \
+			auth_sec.cert_verify \
+			auth_sec.mysql_ssl_connection \
+			auth_sec.openssl_cert_generation \
+			auth_sec.ssl_auto_detect \
+			auth_sec.ssl_mode \
+			auth_sec.tls \
+			binlog.binlog_grant_alter_user \
+			encryption.innodb_onlinealter_encryption \
+			main.grant_alter_user_qa \
+			main.grant_user_lock_qa \
+			main.mysql_ssl_default \
+			main.openssl_1 \
+			main.plugin_auth_sha256 \
+			main.plugin_auth_sha256_2 \
+			main.plugin_auth_sha256_server_default \
+			main.plugin_auth_sha256_server_default_tls \
+			main.plugin_auth_sha256_tls \
+			main.ssl \
+			main.ssl_8k_key \
+			main.ssl_bug75311 \
+			main.ssl_ca \
+			main.ssl_cipher \
+			main.ssl_compress \
+			main.ssl_crl \
+			main.ssl_ecdh \
+			main.ssl_verify_identity \
+			x.connection_tls_version \
+			x.connection_openssl \
+		; do
+			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+	cmake_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		eprefixify "${TMPDIR}/my.cnf.ok"
+
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-01-21 22:32 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2021-01-21 22:32 UTC (permalink / raw
  To: gentoo-commits

commit:     83a86eee469fdc6c81ce73e5a39e0a66f5309753
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 21:14:54 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Jan 21 22:32:10 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83a86eee

dev-db/mysql: bump to v8.0.23

Closes: https://bugs.gentoo.org/763960
Bug: https://bugs.gentoo.org/766339
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-8.0.23.ebuild | 1159 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1161 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 4cbfcbe57a2..41e7ba33fe2 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -4,6 +4,7 @@ DIST mysql-5.7.32-patches-01.tar.xz 6660 BLAKE2B 5c63158615398bdcc4480a0e1b058f4
 DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
 DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
 DIST mysql-8.0.22-patches-02.tar.xz 7580 BLAKE2B a50704c3c58b1f67ca86edb233544137927b0ae5fdf302687b48f6fd30fbbd26798e8ef8282662586b25a7240b47278b44f944a8ca59f1a198bc228dd74459c9 SHA512 59f864452e9fdebe4d3990eff8b756e9bbfad58da216b74fa8b7e8391cb0d9d543ca2828591b9ed1ee276c1dec9e1851a8c2683507f0a326c85054e31cc3f950
+DIST mysql-8.0.23-patches-01.tar.xz 7568 BLAKE2B 222120dcb5556457f382eefbb10f66f46fe1673c64730c8c8a5566942031bc98bab1f1182f747e79e23fccfb6b09197d5c2874aa2087104b6f1eaa25ea9fd60c SHA512 54222c420d57c1b206d920f22738746925ed1e0d78683f01c97cac5bd1d3450f70f784a7f603304b8595fb58120e691f94e28fa1d1884a7cc8bea1d7b177470f
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
 DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
@@ -13,6 +14,7 @@ DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e528
 DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99
 DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1
 DIST mysql-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-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1
 DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f

diff --git a/dev-db/mysql/mysql-8.0.23.ebuild b/dev-db/mysql/mysql-8.0.23.ebuild
new file mode 100644
index 00000000000..28619bb7485
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.23.ebuild
@@ -0,0 +1,1159 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.23-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+	router selinux +server tcmalloc test"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	cjk? ( server )
+	jemalloc? ( server )
+	numa? ( server )
+	profiling? ( server )
+	router? ( server )
+	tcmalloc? ( server )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	>=app-arch/lz4-0_p131:=
+	app-arch/zstd:=
+	sys-libs/ncurses:0=
+	>=sys-libs/zlib-1.2.3:0=
+	libressl? ( dev-libs/libressl:0= )
+	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	server? (
+		dev-libs/icu:=
+		dev-libs/libevent:=[ssl,threads]
+		>=dev-libs/protobuf-3.8:=
+		net-libs/libtirpc:=
+		cjk? ( app-text/mecab:= )
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		tcmalloc? ( dev-util/google-perftools:0= )
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	virtual/yacc
+	server? ( net-libs/rpcsvc-proto )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:5.7
+	selinux? ( sec-policy/selinux-mysql )
+	!prefix? (
+		acct-group/mysql acct-user/mysql
+		dev-db/mysql-init-scripts
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="2G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="2G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	# Avoid rpm call which would trigger sandbox, #692368
+	sed -i \
+		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+		CMakeLists.txt || die
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove man pages for client-lib tools we don't install
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		# Using bundled editline to get CTRL+C working
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+		-DWITH_ROUTER=$(usex router ON OFF)
+	)
+
+	if is-flagq -fno-lto ; then
+		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
+		mycmakeargs+=( -DWITH_LTO=OFF )
+	elif is-flagq -flto ; then
+		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+		myconf+=( -DWITH_LTO=ON )
+	else
+		# Disable automagic
+		myconf+=( -DWITH_LTO=OFF )
+	fi
+
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+	mycmakeargs+=(
+		-DWITH_ICU=system
+		-DWITH_LZ4=system
+		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+		-DWITH_RAPIDJSON=bundled
+		-DWITH_ZSTD=system
+	)
+
+	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+		ewarn "You MUST file bugs without these variables set."
+		ewarn "Tests will probably fail!"
+
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+		)
+	elif use latin1 ; then
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=latin1
+			-DDEFAULT_COLLATION=latin1_swedish_ci
+		)
+	else
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=utf8mb4
+			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+		)
+	fi
+
+	if use server ; then
+		mycmakeargs+=(
+			-DWITH_EXTRA_CHARSETS=all
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_LIBEVENT=system
+			-DWITH_PROTOBUF=system
+			-DWITH_NUMA=$(usex numa ON OFF)
+		)
+
+		if use jemalloc ; then
+			mycmakeargs+=( -DWITH_JEMALLOC=ON )
+		elif use tcmalloc ; then
+			mycmakeargs+=( -DWITH_TCMALLOC=ON )
+		fi
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_SYSTEMD=no
+		)
+	fi
+
+	cmake_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='perl server' \
+# FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname bug reason
+		rawtestname="${1}" ; shift
+		bug="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Run CTest (test-units)
+	cmake_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+
+	local -a disabled_tests
+	disabled_tests+=( "auth_sec.atomic_rename_user;0;Depends on user running test" )
+	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
+	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "main.cast;0;Needs update for 2021" )
+	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure - no upstream bug yet" )
+	disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
+		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
+	fi
+
+	local test_infos_str test_infos_arr
+	for test_infos_str in "${disabled_tests[@]}" ; do
+		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+			die "Invalid test data set, not matching format: ${test_infos_str}"
+		fi
+
+		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+	done
+	unset test_infos_str test_infos_arr
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	cmake_src_install
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	mycnf_src="my.cnf-8.0.distro-server"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR}/${mycnf_src}" \
+		> "${TMPDIR}/my.cnf.ok" || die
+
+	if use prefix ; then
+		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8mb4|latin1|g" \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	eprefixify "${TMPDIR}/my.cnf.ok"
+
+	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+	if use router ; then
+		rm -rf \
+			"${ED}/usr/LICENSE.router" \
+			"${ED}/usr/README.router" \
+			"${ED}/usr/run" \
+			"${ED}/usr/var" \
+			|| die
+	fi
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	# NOTE: $MY_LOGDIR contains $EPREFIX by default
+	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		einfo
+		elog "You might want to run:"
+		elog "  \"emerge --config =${CATEGORY}/${PF}\""
+		elog "if this is a new install."
+		einfo
+	else
+		einfo
+		elog "Upgrade process for ${PN}-8.x has changed. Please read"
+		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+		einfo
+	fi
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	local -a config_files
+
+	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+	fi
+
+	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+	fi
+
+	if [[ ${#config_files[@]} -gt 0 ]] ; then
+		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+			local user_answer
+
+			echo
+			einfo "Please select default authentication plugin (enter number or plugin name):"
+			einfo "1) caching_sha2_password [MySQL 8.0 default]"
+			einfo "2) mysql_native_password [MySQL 5.7 default]"
+			einfo
+			einfo "For details see:"
+			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+			read -p "    >" user_answer
+			echo
+
+			case "${user_answer}" in
+				1|caching_sha2_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+					;;
+				2|mysql_native_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+					;;
+				'')
+					die "No authentication plugin selected!"
+					;;
+				*)
+					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+					;;
+			esac
+
+			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
+			unset user_answer
+		fi
+
+		local cfg_option cfg_option_tabs cfg_section
+		for config_file in "${config_files[@]}" ; do
+			cfg_option="default-authentication-plugin"
+			cfg_section="mysqld"
+			cfg_option_tabs="\t\t"
+			if [[ "${config_file}" == *client.cnf ]] ; then
+				cfg_option="default-auth"
+				cfg_section="client"
+				cfg_option_tabs="\t\t\t\t"
+			fi
+
+			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+			else
+				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+			fi
+		done
+		unset cfg_option cfg_option_tabs cfg_section
+	fi
+	unset config_files config_file
+
+	echo
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2021-01-06 18:43 Fabian Groffen
  0 siblings, 0 replies; 393+ messages in thread
From: Fabian Groffen @ 2021-01-06 18:43 UTC (permalink / raw
  To: gentoo-commits

commit:     22d2c7798c9ce15d6ccc36d193f5dad7a8682457
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  6 18:40:46 2021 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Jan  6 18:40:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22d2c779

dev-db/mysql: drop x86-macos

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.27-r2.ebuild | 4 ++--
 dev-db/mysql/mysql-5.7.29-r1.ebuild | 4 ++--
 dev-db/mysql/mysql-5.7.30-r1.ebuild | 4 ++--
 dev-db/mysql/mysql-5.7.31.ebuild    | 4 ++--
 dev-db/mysql/mysql-5.7.32.ebuild    | 4 ++--
 dev-db/mysql/mysql-8.0.19-r2.ebuild | 4 ++--
 dev-db/mysql/mysql-8.0.20-r1.ebuild | 4 ++--
 dev-db/mysql/mysql-8.0.21-r1.ebuild | 4 ++--
 dev-db/mysql/mysql-8.0.22.ebuild    | 4 ++--
 9 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.27-r2.ebuild b/dev-db/mysql/mysql-5.7.27-r2.ebuild
index 7a585b7a703..98a59f769bd 100644
--- a/dev-db/mysql/mysql-5.7.27-r2.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -34,7 +34,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.29-r1.ebuild b/dev-db/mysql/mysql-5.7.29-r1.ebuild
index 87956f8d8f8..1d1fd598dd9 100644
--- a/dev-db/mysql/mysql-5.7.29-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.29-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -34,7 +34,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.30-r1.ebuild b/dev-db/mysql/mysql-5.7.30-r1.ebuild
index 8220f3146ca..59e0d821600 100644
--- a/dev-db/mysql/mysql-5.7.30-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.30-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -30,7 +30,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
index f4f27e0f288..514e06d3091 100644
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ b/dev-db/mysql/mysql-5.7.31.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.32.ebuild b/dev-db/mysql/mysql-5.7.32.ebuild
index 4000e3383d5..6c3a7183a83 100644
--- a/dev-db/mysql/mysql-5.7.32.ebuild
+++ b/dev-db/mysql/mysql-5.7.32.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.19-r2.ebuild b/dev-db/mysql/mysql-8.0.19-r2.ebuild
index b81fdbc4fc1..60dd2a3f27b 100644
--- a/dev-db/mysql/mysql-8.0.19-r2.ebuild
+++ b/dev-db/mysql/mysql-8.0.19-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -43,7 +43,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.20-r1.ebuild b/dev-db/mysql/mysql-8.0.20-r1.ebuild
index 0bddb13566e..4545a1eec02 100644
--- a/dev-db/mysql/mysql-8.0.20-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.20-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.21-r1.ebuild b/dev-db/mysql/mysql-8.0.21-r1.ebuild
index a12c3b67596..b3a4bf5a2ad 100644
--- a/dev-db/mysql/mysql-8.0.21-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.21-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.22.ebuild b/dev-db/mysql/mysql-8.0.22.ebuild
index 6339e099113..18586043f65 100644
--- a/dev-db/mysql/mysql-8.0.22.ebuild
+++ b/dev-db/mysql/mysql-8.0.22.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-12-25 23:46 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-12-25 23:46 UTC (permalink / raw
  To: gentoo-commits

commit:     acfaa67328babcce84c392339792da3fa130a8ed
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 25 23:46:11 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 25 23:46:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acfaa673

dev-db/mysql: Stabilize 5.7.32 ppc, #732974

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.32.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.32.ebuild b/dev-db/mysql/mysql-5.7.32.ebuild
index 1ce3f1d5a73..4000e3383d5 100644
--- a/dev-db/mysql/mysql-5.7.32.ebuild
+++ b/dev-db/mysql/mysql-5.7.32.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-12-25 23:46 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-12-25 23:46 UTC (permalink / raw
  To: gentoo-commits

commit:     0d0911d08452289ecc2a731c6c39575f5ade0d28
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 25 23:45:06 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 25 23:46:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d0911d0

dev-db/mysql: Stabilize 5.7.31 ppc, #732974

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
index d83c16e32a1..f4f27e0f288 100644
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ b/dev-db/mysql/mysql-5.7.31.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-12-25 23:41 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-12-25 23:41 UTC (permalink / raw
  To: gentoo-commits

commit:     db495ba77274b874dd6988b984e7f7dd7d03ea13
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 25 23:41:38 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 25 23:41:38 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db495ba7

dev-db/mysql: Stabilize 8.0.22 arm, #756649

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.22.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.22.ebuild b/dev-db/mysql/mysql-8.0.22.ebuild
index 4ab86f6ab8b..6339e099113 100644
--- a/dev-db/mysql/mysql-8.0.22.ebuild
+++ b/dev-db/mysql/mysql-8.0.22.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-12-25 23:41 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-12-25 23:41 UTC (permalink / raw
  To: gentoo-commits

commit:     f71d76e617567b5058adcc557b8aeee004409950
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 25 23:41:37 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 25 23:41:37 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f71d76e6

dev-db/mysql: Stabilize 5.7.32 arm, #756649

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.32.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.32.ebuild b/dev-db/mysql/mysql-5.7.32.ebuild
index 1b6814e1dfb..1ce3f1d5a73 100644
--- a/dev-db/mysql/mysql-5.7.32.ebuild
+++ b/dev-db/mysql/mysql-5.7.32.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-12-25 23:41 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-12-25 23:41 UTC (permalink / raw
  To: gentoo-commits

commit:     f8d60400d563a2a34bfa3c54c73e51f6519854a1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 25 23:40:42 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 25 23:40:42 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8d60400

dev-db/mysql: Stabilize 8.0.22 arm64, #756649

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.22.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.22.ebuild b/dev-db/mysql/mysql-8.0.22.ebuild
index 79a979582cc..4ab86f6ab8b 100644
--- a/dev-db/mysql/mysql-8.0.22.ebuild
+++ b/dev-db/mysql/mysql-8.0.22.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-12-25 23:41 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-12-25 23:41 UTC (permalink / raw
  To: gentoo-commits

commit:     181d6e630588a5cff18ea9a6577365b72927e243
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 25 23:40:42 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 25 23:40:42 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=181d6e63

dev-db/mysql: Stabilize 5.7.32 arm64, #756649

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.32.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.32.ebuild b/dev-db/mysql/mysql-5.7.32.ebuild
index cf21c3d0899..1b6814e1dfb 100644
--- a/dev-db/mysql/mysql-5.7.32.ebuild
+++ b/dev-db/mysql/mysql-5.7.32.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-12-25  2:14 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-12-25  2:14 UTC (permalink / raw
  To: gentoo-commits

commit:     3ca7d9be693afed10d7c3a3894835e159c5d15c5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 25 02:13:50 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 25 02:13:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ca7d9be

dev-db/mysql: Stabilize 5.7.32 amd64, #756649

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.32.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.32.ebuild b/dev-db/mysql/mysql-5.7.32.ebuild
index 430b2fbb1f7..cf21c3d0899 100644
--- a/dev-db/mysql/mysql-5.7.32.ebuild
+++ b/dev-db/mysql/mysql-5.7.32.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-12-25  2:14 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-12-25  2:14 UTC (permalink / raw
  To: gentoo-commits

commit:     a19224f080c49cbbad3b3263d75949ffe43695e5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 25 02:13:51 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 25 02:13:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a19224f0

dev-db/mysql: Stabilize 8.0.22 amd64, #756649

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.22.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.22.ebuild b/dev-db/mysql/mysql-8.0.22.ebuild
index 6f19828aa28..79a979582cc 100644
--- a/dev-db/mysql/mysql-8.0.22.ebuild
+++ b/dev-db/mysql/mysql-8.0.22.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-12-24 14:11 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-12-24 14:11 UTC (permalink / raw
  To: gentoo-commits

commit:     b4aceec79ba7e876cccf03912e64454a7f036349
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 24 14:10:37 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 24 14:10:37 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4aceec7

dev-db/mysql: Stabilize 8.0.22 ppc64, #756649

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.22.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.22.ebuild b/dev-db/mysql/mysql-8.0.22.ebuild
index ccd6ddc59fa..6f19828aa28 100644
--- a/dev-db/mysql/mysql-8.0.22.ebuild
+++ b/dev-db/mysql/mysql-8.0.22.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-12-24 14:11 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-12-24 14:11 UTC (permalink / raw
  To: gentoo-commits

commit:     18ea3f8aff12730b0fbdc758eab1e280d104f896
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 24 14:10:36 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 24 14:10:36 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18ea3f8a

dev-db/mysql: Stabilize 5.7.32 ppc64, #756649

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.32.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.32.ebuild b/dev-db/mysql/mysql-5.7.32.ebuild
index 2d96c9c1baa..430b2fbb1f7 100644
--- a/dev-db/mysql/mysql-5.7.32.ebuild
+++ b/dev-db/mysql/mysql-5.7.32.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-12-20 21:01 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-12-20 21:01 UTC (permalink / raw
  To: gentoo-commits

commit:     d4f4a2ba6166380494d0029ce0aedc037884fd39
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 20 20:54:27 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Dec 20 21:01:03 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4f4a2ba

dev-db/mysql: fix building against >=dev-libs/icu-68

Closes: https://bugs.gentoo.org/759070
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest            | 2 +-
 dev-db/mysql/mysql-8.0.22.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 64ead6b9598..4cbfcbe57a2 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,7 +3,7 @@ DIST mysql-5.7.31-patches-01.tar.xz 6664 BLAKE2B 8225f286f0090653f9714545daa95cc
 DIST mysql-5.7.32-patches-01.tar.xz 6660 BLAKE2B 5c63158615398bdcc4480a0e1b058f491b39ffc7ee33767b425f3b254555411031f64d865e1924afe8aa3926e4cba18049f1219a0a8acc702bc5e011c94fa947 SHA512 bf5e0d27af81e599005268ee243af4cd93f6df95c32cccb268a749322b4e5f73a2ce5d51f0ad1b0e1f2cf4702b8a05e4b2e0b73110fd4aac61f2a0f51bf4952e
 DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
 DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
-DIST mysql-8.0.22-patches-01.tar.xz 7176 BLAKE2B d793aefb0753bfdc04ae22f6f23e49755658c22bb749df3ba5cb5fad2296729600e209638be23e193aa0aaa114080be939e53e3e9aee45bde610eb17f0439211 SHA512 3606a5cd016a49bbbef008f5d0d0a98df44f523bfacf93cfd4e75f279b14329664241cc3cf63894fb24446a0eb1d51623b1267a5488dd3f7ea7990e9a18bf312
+DIST mysql-8.0.22-patches-02.tar.xz 7580 BLAKE2B a50704c3c58b1f67ca86edb233544137927b0ae5fdf302687b48f6fd30fbbd26798e8ef8282662586b25a7240b47278b44f944a8ca59f1a198bc228dd74459c9 SHA512 59f864452e9fdebe4d3990eff8b756e9bbfad58da216b74fa8b7e8391cb0d9d543ca2828591b9ed1ee276c1dec9e1851a8c2683507f0a326c85054e31cc3f950
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
 DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560

diff --git a/dev-db/mysql/mysql-8.0.22.ebuild b/dev-db/mysql/mysql-8.0.22.ebuild
index 721ce231c3a..ccd6ddc59fa 100644
--- a/dev-db/mysql/mysql-8.0.22.ebuild
+++ b/dev-db/mysql/mysql-8.0.22.ebuild
@@ -12,7 +12,7 @@ MY_PV="${PV//_pre*}"
 MY_P="${PN}-${MY_PV}"
 
 # Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.22-patches-01.tar.xz"
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.22-patches-02.tar.xz"
 
 SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
 	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-11-30  1:18 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-11-30  1:18 UTC (permalink / raw
  To: gentoo-commits

commit:     3d181d26c266e5c8ee3f73e4aa5d093d8fa4e62b
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 30 01:17:52 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Nov 30 01:18:27 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d181d26

dev-db/mysql: depend on dev-libs/libevent[threads]

Closes: https://bugs.gentoo.org/757594
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.22.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.22.ebuild b/dev-db/mysql/mysql-8.0.22.ebuild
index b6a594d1a81..721ce231c3a 100644
--- a/dev-db/mysql/mysql-8.0.22.ebuild
+++ b/dev-db/mysql/mysql-8.0.22.ebuild
@@ -54,7 +54,7 @@ COMMON_DEPEND="
 	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
 	server? (
 		dev-libs/icu:=
-		dev-libs/libevent:=[ssl]
+		dev-libs/libevent:=[ssl,threads]
 		>=dev-libs/protobuf-3.8:=
 		net-libs/libtirpc:=
 		cjk? ( app-text/mecab:= )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-11-25 16:34 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-11-25 16:34 UTC (permalink / raw
  To: gentoo-commits

commit:     97124c4f3981fa4255cff2196c1bd427dd977f6e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 25 14:56:17 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Nov 25 16:29:29 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97124c4f

dev-db/mysql: skip innodb.import_compress_encrypt test

Requires working keyring plugin.

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

 dev-db/mysql/mysql-5.7.32.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.32.ebuild b/dev-db/mysql/mysql-5.7.32.ebuild
index b32ef6ec334..122085a4a02 100644
--- a/dev-db/mysql/mysql-5.7.32.ebuild
+++ b/dev-db/mysql/mysql-5.7.32.ebuild
@@ -499,7 +499,10 @@ src_test() {
 	#
 	local t
 
-	for t in auth_sec.keyring_udf ; do
+	for t in \
+		auth_sec.keyring_udf \
+		innodb.import_compress_encrypt \
+	; do
 			_disable_test "$t" "False positives in Gentoo"
 	done
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-11-25 16:34 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-11-25 16:34 UTC (permalink / raw
  To: gentoo-commits

commit:     0954edf8b9ea912181c40e4ded9caaabbe453be4
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 25 16:32:17 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Nov 25 16:32:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0954edf8

dev-db/mysql: x86 stable (bug #756649)

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

 dev-db/mysql/mysql-5.7.32.ebuild | 2 +-
 dev-db/mysql/mysql-8.0.22.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.32.ebuild b/dev-db/mysql/mysql-5.7.32.ebuild
index 122085a4a02..2d96c9c1baa 100644
--- a/dev-db/mysql/mysql-5.7.32.ebuild
+++ b/dev-db/mysql/mysql-5.7.32.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.22.ebuild b/dev-db/mysql/mysql-8.0.22.ebuild
index e802474c410..b6a594d1a81 100644
--- a/dev-db/mysql/mysql-8.0.22.ebuild
+++ b/dev-db/mysql/mysql-8.0.22.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-11-13 19:46 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-11-13 19:46 UTC (permalink / raw
  To: gentoo-commits

commit:     e3c131f959d93500e180188a64cba88b04cc4f0c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 13 19:45:58 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov 13 19:46:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3c131f9

dev-db/mysql: Stabilize 5.7.31 ppc64, #732974

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
index 642f7c6ef0d..d83c16e32a1 100644
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ b/dev-db/mysql/mysql-5.7.31.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-11-13 17:54 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-11-13 17:54 UTC (permalink / raw
  To: gentoo-commits

commit:     099098fed5f7ccfc0d12a7ea8d9409838f55fd47
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 13 17:53:56 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov 13 17:54:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=099098fe

dev-db/mysql: Stabilize 8.0.21-r1 ppc64, #732974

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.21-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.21-r1.ebuild b/dev-db/mysql/mysql-8.0.21-r1.ebuild
index abb6b3cbd3c..a12c3b67596 100644
--- a/dev-db/mysql/mysql-8.0.21-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.21-r1.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-10-20 18:56 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-10-20 18:56 UTC (permalink / raw
  To: gentoo-commits

commit:     78800c261012a9295d168cd59683f856949c4e2a
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 18:04:02 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 18:55:42 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78800c26

dev-db/mysql: 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/Manifest            |    2 +
 dev-db/mysql/mysql-8.0.22.ebuild | 1157 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1159 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 72b75e7451d..b9f6bfc6d44 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -2,6 +2,7 @@ DIST mysql-5.7.30-patches-01.tar.xz 6684 BLAKE2B 9350280094619fda0d91eacae573396
 DIST mysql-5.7.31-patches-01.tar.xz 6664 BLAKE2B 8225f286f0090653f9714545daa95ccdadaa58812e55284d1ee52ad2dcca18960b9266797630762595d832aa1dda1d9e2df691f0c728102f162b376346c99b3c SHA512 c6260e688da6e8f049ba7ac0553ad442e76829deaca32c1b7a101ec927a36b1571cb24982391f05545a9f62d94502efc09530d444e4abfc08350ab4c19fbfd37
 DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
 DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
+DIST mysql-8.0.22-patches-01.tar.xz 7176 BLAKE2B d793aefb0753bfdc04ae22f6f23e49755658c22bb749df3ba5cb5fad2296729600e209638be23e193aa0aaa114080be939e53e3e9aee45bde610eb17f0439211 SHA512 3606a5cd016a49bbbef008f5d0d0a98df44f523bfacf93cfd4e75f279b14329664241cc3cf63894fb24446a0eb1d51623b1267a5488dd3f7ea7990e9a18bf312
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
 DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
@@ -9,6 +10,7 @@ DIST mysql-boost-5.7.31.tar.gz 51382559 BLAKE2B 86430ee01b0b066ffbd1c876c7d09afe
 DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
 DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99
 DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1
+DIST mysql-boost-8.0.22.tar.gz 285934450 BLAKE2B 1ba0c9bb9a0cb74af4842d3b746f8b690c122cfbf2c6d5201ce95e59a257427a8683dd8d5c2be31dfe9ece4761366c1287fa7b841c45db222725bf76b0639bc6 SHA512 792f2ada93ec67a4679228478c6b798e81d9e9f6d13c7f4977cb7682738a4aae3cb483294edc6b2fde16c3960e51af8786216c063ab500840afd39a609e4b612
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1
 DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f

diff --git a/dev-db/mysql/mysql-8.0.22.ebuild b/dev-db/mysql/mysql-8.0.22.ebuild
new file mode 100644
index 00000000000..7d3dbf50425
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.22.ebuild
@@ -0,0 +1,1157 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.22-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+	router selinux +server tcmalloc test"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	cjk? ( server )
+	jemalloc? ( server )
+	numa? ( server )
+	profiling? ( server )
+	router? ( server )
+	tcmalloc? ( server )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	>=app-arch/lz4-0_p131:=
+	app-arch/zstd:=
+	sys-libs/ncurses:0=
+	>=sys-libs/zlib-1.2.3:0=
+	libressl? ( dev-libs/libressl:0= )
+	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	server? (
+		dev-libs/icu:=
+		dev-libs/libevent:=
+		>=dev-libs/protobuf-3.8:=
+		net-libs/libtirpc:=
+		cjk? ( app-text/mecab:= )
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		tcmalloc? ( dev-util/google-perftools:0= )
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	virtual/yacc
+	server? ( net-libs/rpcsvc-proto )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:5.7
+	selinux? ( sec-policy/selinux-mysql )
+	!prefix? (
+		acct-group/mysql acct-user/mysql
+		dev-db/mysql-init-scripts
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="2G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="2G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	# Avoid rpm call which would trigger sandbox, #692368
+	sed -i \
+		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+		CMakeLists.txt || die
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove man pages for client-lib tools we don't install
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		# Using bundled editline to get CTRL+C working
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+		-DWITH_ROUTER=$(usex router ON OFF)
+	)
+
+	if is-flagq -fno-lto ; then
+		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
+		mycmakeargs+=( -DWITH_LTO=OFF )
+	elif is-flagq -flto ; then
+		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+		myconf+=( -DWITH_LTO=ON )
+	else
+		# Disable automagic
+		myconf+=( -DWITH_LTO=OFF )
+	fi
+
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+	mycmakeargs+=(
+		-DWITH_ICU=system
+		-DWITH_LZ4=system
+		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+		-DWITH_RAPIDJSON=bundled
+		-DWITH_ZSTD=system
+	)
+
+	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+		ewarn "You MUST file bugs without these variables set."
+		ewarn "Tests will probably fail!"
+
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+		)
+	elif use latin1 ; then
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=latin1
+			-DDEFAULT_COLLATION=latin1_swedish_ci
+		)
+	else
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=utf8mb4
+			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+		)
+	fi
+
+	if use server ; then
+		mycmakeargs+=(
+			-DWITH_EXTRA_CHARSETS=all
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_LIBEVENT=system
+			-DWITH_PROTOBUF=system
+			-DWITH_NUMA=$(usex numa ON OFF)
+		)
+
+		if use jemalloc ; then
+			mycmakeargs+=( -DWITH_JEMALLOC=ON )
+		elif use tcmalloc ; then
+			mycmakeargs+=( -DWITH_TCMALLOC=ON )
+		fi
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_SYSTEMD=no
+		)
+	fi
+
+	cmake_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='perl server' \
+# FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname bug reason
+		rawtestname="${1}" ; shift
+		bug="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Run CTest (test-units)
+	cmake_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+
+	local -a disabled_tests
+	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
+	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure - no upstream bug yet" )
+	disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
+		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
+	fi
+
+	local test_infos_str test_infos_arr
+	for test_infos_str in "${disabled_tests[@]}" ; do
+		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+			die "Invalid test data set, not matching format: ${test_infos_str}"
+		fi
+
+		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+	done
+	unset test_infos_str test_infos_arr
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	cmake_src_install
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	mycnf_src="my.cnf-8.0.distro-server"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR}/${mycnf_src}" \
+		> "${TMPDIR}/my.cnf.ok" || die
+
+	if use prefix ; then
+		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8mb4|latin1|g" \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	eprefixify "${TMPDIR}/my.cnf.ok"
+
+	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+	if use router ; then
+		rm -rf \
+			"${ED}/usr/LICENSE.router" \
+			"${ED}/usr/README.router" \
+			"${ED}/usr/run" \
+			"${ED}/usr/var" \
+			|| die
+	fi
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	# NOTE: $MY_LOGDIR contains $EPREFIX by default
+	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		einfo
+		elog "You might want to run:"
+		elog "  \"emerge --config =${CATEGORY}/${PF}\""
+		elog "if this is a new install."
+		einfo
+	else
+		einfo
+		elog "Upgrade process for ${PN}-8.x has changed. Please read"
+		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+		einfo
+	fi
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	local -a config_files
+
+	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+	fi
+
+	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+	fi
+
+	if [[ ${#config_files[@]} -gt 0 ]] ; then
+		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+			local user_answer
+
+			echo
+			einfo "Please select default authentication plugin (enter number or plugin name):"
+			einfo "1) caching_sha2_password [MySQL 8.0 default]"
+			einfo "2) mysql_native_password [MySQL 5.7 default]"
+			einfo
+			einfo "For details see:"
+			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+			read -p "    >" user_answer
+			echo
+
+			case "${user_answer}" in
+				1|caching_sha2_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+					;;
+				2|mysql_native_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+					;;
+				'')
+					die "No authentication plugin selected!"
+					;;
+				*)
+					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+					;;
+			esac
+
+			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
+			unset user_answer
+		fi
+
+		local cfg_option cfg_option_tabs cfg_section
+		for config_file in "${config_files[@]}" ; do
+			cfg_option="default-authentication-plugin"
+			cfg_section="mysqld"
+			cfg_option_tabs="\t\t"
+			if [[ "${config_file}" == *client.cnf ]] ; then
+				cfg_option="default-auth"
+				cfg_section="client"
+				cfg_option_tabs="\t\t\t\t"
+			fi
+
+			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+			else
+				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+			fi
+		done
+		unset cfg_option cfg_option_tabs cfg_section
+	fi
+	unset config_files config_file
+
+	echo
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-10-20 18:56 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-10-20 18:56 UTC (permalink / raw
  To: gentoo-commits

commit:     ebae5ff0eb3d69de1a99b941783f56cf9a00810a
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 18:20:38 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=ebae5ff0

dev-db/mysql: depend on dev-libs/libevent[ssl]

Building mysqld without SSL is not supported anymore, so deps also
require SSL.

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

 dev-db/mysql/mysql-5.7.31.ebuild    | 4 ++--
 dev-db/mysql/mysql-5.7.32.ebuild    | 4 ++--
 dev-db/mysql/mysql-8.0.21-r1.ebuild | 2 +-
 dev-db/mysql/mysql-8.0.22.ebuild    | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
index 8731897ca91..642f7c6ef0d 100644
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ b/dev-db/mysql/mysql-5.7.31.ebuild
@@ -54,7 +54,7 @@ COMMON_DEPEND="
 		>=app-arch/lz4-0_p131:=
 		cjk? ( app-text/mecab:= )
 		experimental? (
-			dev-libs/libevent:=
+			dev-libs/libevent:=[ssl]
 			dev-libs/protobuf:=
 			net-libs/libtirpc:=
 		)
@@ -73,7 +73,7 @@ DEPEND="${COMMON_DEPEND}
 	dev-libs/protobuf
 	virtual/yacc
 	server? (
-		dev-libs/libevent
+		dev-libs/libevent:=[ssl]
 		experimental? ( net-libs/rpcsvc-proto )
 	)
 	static? ( sys-libs/ncurses[static-libs] )

diff --git a/dev-db/mysql/mysql-5.7.32.ebuild b/dev-db/mysql/mysql-5.7.32.ebuild
index 4ae68758585..b32ef6ec334 100644
--- a/dev-db/mysql/mysql-5.7.32.ebuild
+++ b/dev-db/mysql/mysql-5.7.32.ebuild
@@ -54,7 +54,7 @@ COMMON_DEPEND="
 		>=app-arch/lz4-0_p131:=
 		cjk? ( app-text/mecab:= )
 		experimental? (
-			dev-libs/libevent:=
+			dev-libs/libevent:=[ssl]
 			dev-libs/protobuf:=
 			net-libs/libtirpc:=
 		)
@@ -73,7 +73,7 @@ DEPEND="${COMMON_DEPEND}
 	dev-libs/protobuf
 	virtual/yacc
 	server? (
-		dev-libs/libevent
+		dev-libs/libevent:=[ssl]
 		experimental? ( net-libs/rpcsvc-proto )
 	)
 	static? ( sys-libs/ncurses[static-libs] )

diff --git a/dev-db/mysql/mysql-8.0.21-r1.ebuild b/dev-db/mysql/mysql-8.0.21-r1.ebuild
index f66ee05d1ad..abb6b3cbd3c 100644
--- a/dev-db/mysql/mysql-8.0.21-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.21-r1.ebuild
@@ -54,7 +54,7 @@ COMMON_DEPEND="
 	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
 	server? (
 		dev-libs/icu:=
-		dev-libs/libevent:=
+		dev-libs/libevent:=[ssl]
 		>=dev-libs/protobuf-3.8:=
 		net-libs/libtirpc:=
 		cjk? ( app-text/mecab:= )

diff --git a/dev-db/mysql/mysql-8.0.22.ebuild b/dev-db/mysql/mysql-8.0.22.ebuild
index 7d3dbf50425..e802474c410 100644
--- a/dev-db/mysql/mysql-8.0.22.ebuild
+++ b/dev-db/mysql/mysql-8.0.22.ebuild
@@ -54,7 +54,7 @@ COMMON_DEPEND="
 	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
 	server? (
 		dev-libs/icu:=
-		dev-libs/libevent:=
+		dev-libs/libevent:=[ssl]
 		>=dev-libs/protobuf-3.8:=
 		net-libs/libtirpc:=
 		cjk? ( app-text/mecab:= )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-10-20 18:56 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-10-20 18:56 UTC (permalink / raw
  To: gentoo-commits

commit:     0ec0b30941a66e7a7e08a5ce9c90ad563ea73678
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 18:14:05 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 18:55:43 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ec0b309

dev-db/mysql: bump to v5.7.32

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

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-5.7.32.ebuild | 1235 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1237 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index b9f6bfc6d44..64ead6b9598 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,5 +1,6 @@
 DIST mysql-5.7.30-patches-01.tar.xz 6684 BLAKE2B 9350280094619fda0d91eacae573396198954fceb5dc039669d236b1dad98eef306702550b517ef30ee3d0e6721667b6f5549df91e3c15cef68888079c00d9ba SHA512 74e8e8794fe54b73776b38296aa42c65547311b80bfe65c88b2f961bd44083e9628eb47da4ebcf4c20e2d7c694f514223bcbf29cce27853cca500710ae97778d
 DIST mysql-5.7.31-patches-01.tar.xz 6664 BLAKE2B 8225f286f0090653f9714545daa95ccdadaa58812e55284d1ee52ad2dcca18960b9266797630762595d832aa1dda1d9e2df691f0c728102f162b376346c99b3c SHA512 c6260e688da6e8f049ba7ac0553ad442e76829deaca32c1b7a101ec927a36b1571cb24982391f05545a9f62d94502efc09530d444e4abfc08350ab4c19fbfd37
+DIST mysql-5.7.32-patches-01.tar.xz 6660 BLAKE2B 5c63158615398bdcc4480a0e1b058f491b39ffc7ee33767b425f3b254555411031f64d865e1924afe8aa3926e4cba18049f1219a0a8acc702bc5e011c94fa947 SHA512 bf5e0d27af81e599005268ee243af4cd93f6df95c32cccb268a749322b4e5f73a2ce5d51f0ad1b0e1f2cf4702b8a05e4b2e0b73110fd4aac61f2a0f51bf4952e
 DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
 DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
 DIST mysql-8.0.22-patches-01.tar.xz 7176 BLAKE2B d793aefb0753bfdc04ae22f6f23e49755658c22bb749df3ba5cb5fad2296729600e209638be23e193aa0aaa114080be939e53e3e9aee45bde610eb17f0439211 SHA512 3606a5cd016a49bbbef008f5d0d0a98df44f523bfacf93cfd4e75f279b14329664241cc3cf63894fb24446a0eb1d51623b1267a5488dd3f7ea7990e9a18bf312
@@ -7,6 +8,7 @@ DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465
 DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
 DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
 DIST mysql-boost-5.7.31.tar.gz 51382559 BLAKE2B 86430ee01b0b066ffbd1c876c7d09afecdd57f99cfe07417f406345bcdb14cc6fd33a2d4d92dfe15e87f34ec476bf34d62508ac3f99fb3e11957458e0d6ec20b SHA512 d7fc1927c860562d121658031bcbd58d36a942340423bf7b692cef84c29e67b56d009c9f9bb10cde8acabd6f9db58c67eb542349eccc4719fb38c8570738700a
+DIST mysql-boost-5.7.32.tar.gz 52882168 BLAKE2B dd112fa1d8bd29d86fba076675b5b7c9c98b6fb876aed45a00e8a25be716102fc9aa688b7170bef07b1c9f9751737277774d8fb2c64c21e181ecae58f89b4a8a SHA512 33a617d040efd065ea1c2ad84be537f851480abd5cc8a6879b7f170bc4e6db9432bd03f2a6bc680b71f17839c508cab0e7ef1a3aba032197da1b7943c916c77a
 DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
 DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99
 DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1

diff --git a/dev-db/mysql/mysql-5.7.32.ebuild b/dev-db/mysql/mysql-5.7.32.ebuild
new file mode 100644
index 00000000000..4ae68758585
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.32.ebuild
@@ -0,0 +1,1235 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs multilib-minimal
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.32-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="5.7/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+	sys-libs/ncurses:0=
+	client-libs? (
+		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
+		!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+	)
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+		libressl? ( dev-libs/libressl:0= )
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+	)
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
+	virtual/yacc
+	server? (
+		dev-libs/libevent
+		experimental? ( net-libs/rpcsvc-proto )
+	)
+	static? ( sys-libs/ncurses[static-libs] )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
+	!dev-db/mysql:8.0
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
+	server? (
+		!prefix? (
+			acct-group/mysql acct-user/mysql
+			dev-db/mysql-init-scripts
+		)
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="3G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="3G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/extra/libevent \
+		"${S}"/zlib \
+		|| die
+
+	# Don't clash with dev-db/mysql-connector-c
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI, bug 530132
+	if multilib_is_native_abi ; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
+			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static ; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf ; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
+	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+	for t in \
+		main.xa_prepared_binlog_off \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_non_direct_stm_mixing_engines \
+	; do
+		_disable_test "$t" "Unstable test"
+	done
+
+	for t in \
+		gis.geometry_class_attri_prop \
+		gis.geometry_property_function_issimple \
+		gis.gis_bugs_crashes \
+		gis.spatial_op_testingfunc_mix \
+		gis.spatial_analysis_functions_buffer \
+		gis.spatial_analysis_functions_distance \
+		gis.spatial_utility_function_distance_sphere \
+		gis.spatial_utility_function_simplify \
+		gis.spatial_analysis_functions_centroid \
+		main.with_recursive \
+	; do
+		_disable_test "$t" "Known rounding error with latest AMD processors"
+	done
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
+	fi
+
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	if has_version '>=dev-libs/openssl-1.1.1' ; then
+		# Tests are expecting <openssl-1.1.1 default cipher
+		for t in \
+			auth_sec.cert_verify \
+			auth_sec.mysql_ssl_connection \
+			auth_sec.openssl_cert_generation \
+			auth_sec.ssl_auto_detect \
+			auth_sec.ssl_mode \
+			auth_sec.tls \
+			binlog.binlog_grant_alter_user \
+			encryption.innodb_onlinealter_encryption \
+			main.grant_alter_user_qa \
+			main.grant_user_lock_qa \
+			main.mysql_ssl_default \
+			main.openssl_1 \
+			main.plugin_auth_sha256_tls \
+			main.ssl \
+			main.ssl_8k_key \
+			main.ssl_bug75311 \
+			main.ssl_ca \
+			main.ssl_cipher \
+			main.ssl_compress \
+			main.ssl_crl \
+			main.ssl_ecdh \
+			main.ssl_verify_identity \
+			x.connection_tls_version \
+			x.connection_openssl \
+		; do
+			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+	cmake_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		eprefixify "${TMPDIR}/my.cnf.ok"
+
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-09-19 20:09 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2020-09-19 20:09 UTC (permalink / raw
  To: gentoo-commits

commit:     472f0496f8c6e5e8ffe5203808caf68ee1838882
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 19 20:09:46 2020 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sat Sep 19 20:09:46 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=472f0496

dev-db/mysql: Stabilize 8.0.21-r1 amd64, #732974

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.21-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.21-r1.ebuild b/dev-db/mysql/mysql-8.0.21-r1.ebuild
index 438008e72d5..f66ee05d1ad 100644
--- a/dev-db/mysql/mysql-8.0.21-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.21-r1.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-09-19 20:09 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2020-09-19 20:09 UTC (permalink / raw
  To: gentoo-commits

commit:     bcc7dfc7a8836e44f775ceafd32700db4c97ded7
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 19 20:09:45 2020 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sat Sep 19 20:09:45 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcc7dfc7

dev-db/mysql: Stabilize 5.7.31 amd64, #732974

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
index 023b1a18184..8731897ca91 100644
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ b/dev-db/mysql/mysql-5.7.31.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-08-29 17:57 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-08-29 17:57 UTC (permalink / raw
  To: gentoo-commits

commit:     558d2d53ba4c643060a7af777119a4a659c8a49e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 29 17:48:06 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Aug 29 17:56:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=558d2d53

dev-db/mysql: x86 stable (bug #732974)

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

 dev-db/mysql/mysql-5.7.31.ebuild    | 2 +-
 dev-db/mysql/mysql-8.0.21-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
index 3dc370d1040..023b1a18184 100644
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ b/dev-db/mysql/mysql-5.7.31.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.21-r1.ebuild b/dev-db/mysql/mysql-8.0.21-r1.ebuild
index be1a0381245..438008e72d5 100644
--- a/dev-db/mysql/mysql-8.0.21-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.21-r1.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-08-22 20:24 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-08-22 20:24 UTC (permalink / raw
  To: gentoo-commits

commit:     bfc4d2b105b5f2f5dd519e394d85ae865fc37429
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 22 20:16:56 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Aug 22 20:24:39 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bfc4d2b1

dev-db/mysql: use app-arch/zstd from system

Bug: https://bugs.gentoo.org/738462
Package-Manager: Portage-3.0.3, Repoman-3.0.0
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/{mysql-8.0.21.ebuild => mysql-8.0.21-r1.ebuild} | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dev-db/mysql/mysql-8.0.21.ebuild b/dev-db/mysql/mysql-8.0.21-r1.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-8.0.21.ebuild
rename to dev-db/mysql/mysql-8.0.21-r1.ebuild
index e1dfe846293..be1a0381245 100644
--- a/dev-db/mysql/mysql-8.0.21.ebuild
+++ b/dev-db/mysql/mysql-8.0.21-r1.ebuild
@@ -47,6 +47,7 @@ S="${WORKDIR}/mysql"
 # These are used for both runtime and compiletime
 COMMON_DEPEND="
 	>=app-arch/lz4-0_p131:=
+	app-arch/zstd:=
 	sys-libs/ncurses:0=
 	>=sys-libs/zlib-1.2.3:0=
 	libressl? ( dev-libs/libressl:0= )
@@ -267,6 +268,7 @@ src_configure() {
 		-DWITH_LZ4=system
 		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
 		-DWITH_RAPIDJSON=bundled
+		-DWITH_ZSTD=system
 	)
 
 	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-08-07 12:10 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-08-07 12:10 UTC (permalink / raw
  To: gentoo-commits

commit:     4bdac1f9a20bd9ef3ee3b8211e1fbf195045cbbf
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  7 12:07:57 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug  7 12:07:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bdac1f9

dev-db/mysql: Stabilize 5.7.31 arm, #732974

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
index 8daf63c3a78..3dc370d1040 100644
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ b/dev-db/mysql/mysql-5.7.31.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-08-07 12:10 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-08-07 12:10 UTC (permalink / raw
  To: gentoo-commits

commit:     79959fab3ad9d6c12491e042f16427adcb73a5a7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  7 12:08:01 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug  7 12:08:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79959fab

dev-db/mysql: Stabilize 8.0.21 arm, #732974

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.21.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.21.ebuild b/dev-db/mysql/mysql-8.0.21.ebuild
index d3edce57334..e1dfe846293 100644
--- a/dev-db/mysql/mysql-8.0.21.ebuild
+++ b/dev-db/mysql/mysql-8.0.21.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-08-07  4:26 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-08-07  4:26 UTC (permalink / raw
  To: gentoo-commits

commit:     80c7063151f5002978f34e29091e19d075e25a66
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  7 04:20:52 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug  7 04:20:52 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80c70631

dev-db/mysql: Stabilize 8.0.21 arm64, #732974

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-8.0.21.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.21.ebuild b/dev-db/mysql/mysql-8.0.21.ebuild
index d34296859d0..d3edce57334 100644
--- a/dev-db/mysql/mysql-8.0.21.ebuild
+++ b/dev-db/mysql/mysql-8.0.21.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-08-07  4:26 Sam James
  0 siblings, 0 replies; 393+ messages in thread
From: Sam James @ 2020-08-07  4:26 UTC (permalink / raw
  To: gentoo-commits

commit:     c3b0ef05e7860d694a7f8547cf8c6ee47a71d8a3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  7 04:20:50 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug  7 04:20:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3b0ef05

dev-db/mysql: Stabilize 5.7.31 arm64, #732974

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
index c7f2127c3a5..8daf63c3a78 100644
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ b/dev-db/mysql/mysql-5.7.31.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-08-05 19:22 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-08-05 19:22 UTC (permalink / raw
  To: gentoo-commits

commit:     2a81ab517abab7db26b1959c41a203a9ef7c587f
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  5 19:22:08 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Aug  5 19:22:44 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a81ab51

dev-db/mysql: limit MTR_PARALLEL to 4 instead of "auto"

Partial backport of commit 684ed130d446891ecd16927e0c2703283af52919.

Limit MTR_PARALLEL to 4 instead of "auto" to avoid test failures
because other settings like ulimit, fs.aio-max-nr must allow running
so many servers in parallel. User can still override.

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

 dev-db/mysql/mysql-5.7.31.ebuild | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
index 6396f7ded4c..c7f2127c3a5 100644
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ b/dev-db/mysql/mysql-5.7.31.ebuild
@@ -6,7 +6,7 @@ EAPI="7"
 CMAKE_MAKEFILE_GENERATOR=emake
 
 inherit check-reqs cmake flag-o-matic linux-info \
-	prefix toolchain-funcs multilib-minimal
+	multiprocessing prefix toolchain-funcs multilib-minimal
 
 # Patch version
 PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.31-patches-01.tar.xz"
@@ -467,10 +467,25 @@ src_test() {
 
 	# Ensure that parallel runs don't die
 	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
 
 	# create directories because mysqladmin might run out of order
 	mkdir -p "${T}"/var-tests{,/log} || die


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-07-26 13:28 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-07-26 13:28 UTC (permalink / raw
  To: gentoo-commits

commit:     3ae5e52afa5446e01000399574e65db4d966fefb
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 26 13:26:37 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jul 26 13:26:37 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ae5e52a

dev-db/mysql: inherit check-reqs

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

 dev-db/mysql/mysql-5.7.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
index 37f75a01888..6396f7ded4c 100644
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ b/dev-db/mysql/mysql-5.7.31.ebuild
@@ -5,7 +5,7 @@ EAPI="7"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
-inherit cmake flag-o-matic linux-info \
+inherit check-reqs cmake flag-o-matic linux-info \
 	prefix toolchain-funcs multilib-minimal
 
 # Patch version


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-07-26 13:28 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-07-26 13:28 UTC (permalink / raw
  To: gentoo-commits

commit:     25f1dd7f46db71a3b6416e0eebb81a6b94ef6568
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 26 13:28:45 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jul 26 13:28:45 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25f1dd7f

dev-db/mysql: sort inherit

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

 dev-db/mysql/mysql-8.0.21.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.21.ebuild b/dev-db/mysql/mysql-8.0.21.ebuild
index ce9645a879b..d34296859d0 100644
--- a/dev-db/mysql/mysql-8.0.21.ebuild
+++ b/dev-db/mysql/mysql-8.0.21.ebuild
@@ -5,8 +5,8 @@ EAPI="7"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
-inherit cmake flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs check-reqs
+inherit check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs
 
 MY_PV="${PV//_pre*}"
 MY_P="${PN}-${MY_PV}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-07-26 13:21 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-07-26 13:21 UTC (permalink / raw
  To: gentoo-commits

commit:     5b308ba2b59c39b45de4614402f3e5f4def1743d
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 26 13:19:29 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jul 26 13:19:29 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b308ba2

dev-db/mysql: add soft blocker on slot 0

Fixes: 57df63d ("dev-db/mysql: introduce slots")
Package-Manager: Portage-3.0.0, Repoman-2.3.23
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.27-r2.ebuild | 1 +
 dev-db/mysql/mysql-5.7.29-r1.ebuild | 1 +
 dev-db/mysql/mysql-5.7.30-r1.ebuild | 1 +
 dev-db/mysql/mysql-5.7.31.ebuild    | 1 +
 dev-db/mysql/mysql-8.0.19-r2.ebuild | 1 +
 dev-db/mysql/mysql-8.0.20-r1.ebuild | 1 +
 dev-db/mysql/mysql-8.0.21.ebuild    | 1 +
 7 files changed, 7 insertions(+)

diff --git a/dev-db/mysql/mysql-5.7.27-r2.ebuild b/dev-db/mysql/mysql-5.7.27-r2.ebuild
index 5ebb1702d77..7a585b7a703 100644
--- a/dev-db/mysql/mysql-5.7.27-r2.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r2.ebuild
@@ -119,6 +119,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
 	!dev-db/mysql:8.0
 	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
 	selinux? ( sec-policy/selinux-mysql )

diff --git a/dev-db/mysql/mysql-5.7.29-r1.ebuild b/dev-db/mysql/mysql-5.7.29-r1.ebuild
index 1ee7956a3d9..87956f8d8f8 100644
--- a/dev-db/mysql/mysql-5.7.29-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.29-r1.ebuild
@@ -115,6 +115,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
 	!dev-db/mysql:8.0
 	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
 	selinux? ( sec-policy/selinux-mysql )

diff --git a/dev-db/mysql/mysql-5.7.30-r1.ebuild b/dev-db/mysql/mysql-5.7.30-r1.ebuild
index 97e097b5c6d..8220f3146ca 100644
--- a/dev-db/mysql/mysql-5.7.30-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.30-r1.ebuild
@@ -90,6 +90,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
 	!dev-db/mysql:8.0
 	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
 	selinux? ( sec-policy/selinux-mysql )

diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
index 5e0592f012e..37f75a01888 100644
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ b/dev-db/mysql/mysql-5.7.31.ebuild
@@ -84,6 +84,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
 	!dev-db/mysql:8.0
 	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
 	selinux? ( sec-policy/selinux-mysql )

diff --git a/dev-db/mysql/mysql-8.0.19-r2.ebuild b/dev-db/mysql/mysql-8.0.19-r2.ebuild
index 0e7bbeae0ad..b81fdbc4fc1 100644
--- a/dev-db/mysql/mysql-8.0.19-r2.ebuild
+++ b/dev-db/mysql/mysql-8.0.19-r2.ebuild
@@ -102,6 +102,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
 	!dev-db/mysql:5.7
 	selinux? ( sec-policy/selinux-mysql )
 	!prefix? (

diff --git a/dev-db/mysql/mysql-8.0.20-r1.ebuild b/dev-db/mysql/mysql-8.0.20-r1.ebuild
index aad606dfc68..0bddb13566e 100644
--- a/dev-db/mysql/mysql-8.0.20-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.20-r1.ebuild
@@ -77,6 +77,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
 	!dev-db/mysql:5.7
 	selinux? ( sec-policy/selinux-mysql )
 	!prefix? (

diff --git a/dev-db/mysql/mysql-8.0.21.ebuild b/dev-db/mysql/mysql-8.0.21.ebuild
index 2921f560a2e..ce9645a879b 100644
--- a/dev-db/mysql/mysql-8.0.21.ebuild
+++ b/dev-db/mysql/mysql-8.0.21.ebuild
@@ -77,6 +77,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:0
 	!dev-db/mysql:5.7
 	selinux? ( sec-policy/selinux-mysql )
 	!prefix? (


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-07-26  1:46 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-07-26  1:46 UTC (permalink / raw
  To: gentoo-commits

commit:     371586424f5947781143a610b063cbb10e7b7021
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 26 00:22:40 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jul 26 01:46:03 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37158642

dev-db/mysql: bump to v8.0.21

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

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-8.0.21.ebuild | 1165 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1167 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index c854d32ed49..67043136b9e 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,10 +1,12 @@
 DIST mysql-5.7.30-patches-01.tar.xz 6684 BLAKE2B 9350280094619fda0d91eacae573396198954fceb5dc039669d236b1dad98eef306702550b517ef30ee3d0e6721667b6f5549df91e3c15cef68888079c00d9ba SHA512 74e8e8794fe54b73776b38296aa42c65547311b80bfe65c88b2f961bd44083e9628eb47da4ebcf4c20e2d7c694f514223bcbf29cce27853cca500710ae97778d
 DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
+DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
 DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
 DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
 DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99
+DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1
 DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f

diff --git a/dev-db/mysql/mysql-8.0.21.ebuild b/dev-db/mysql/mysql-8.0.21.ebuild
new file mode 100644
index 00000000000..2921f560a2e
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.21.ebuild
@@ -0,0 +1,1165 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs check-reqs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.21-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+	router selinux +server tcmalloc test"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	cjk? ( server )
+	jemalloc? ( server )
+	numa? ( server )
+	profiling? ( server )
+	router? ( server )
+	tcmalloc? ( server )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	>=app-arch/lz4-0_p131:=
+	sys-libs/ncurses:0=
+	>=sys-libs/zlib-1.2.3:0=
+	libressl? ( dev-libs/libressl:0= )
+	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	server? (
+		dev-libs/icu:=
+		dev-libs/libevent:=
+		>=dev-libs/protobuf-3.8:=
+		net-libs/libtirpc:=
+		cjk? ( app-text/mecab:= )
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		tcmalloc? ( dev-util/google-perftools:0= )
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	virtual/yacc
+	server? ( net-libs/rpcsvc-proto )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:5.7
+	selinux? ( sec-policy/selinux-mysql )
+	!prefix? (
+		acct-group/mysql acct-user/mysql
+		dev-db/mysql-init-scripts
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="3G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="3G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	# Avoid rpm call which would trigger sandbox, #692368
+	sed -i \
+		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+		CMakeLists.txt || die
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove man pages for client-lib tools we don't install
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		# Using bundled editline to get CTRL+C working
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+		-DWITH_ROUTER=$(usex router ON OFF)
+	)
+
+	if is-flagq -fno-lto ; then
+		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
+		mycmakeargs+=( -DWITH_LTO=OFF )
+	elif is-flagq -flto ; then
+		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+		myconf+=( -DWITH_LTO=ON )
+	else
+		# Disable automagic
+		myconf+=( -DWITH_LTO=OFF )
+	fi
+
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+	mycmakeargs+=(
+		-DWITH_ICU=system
+		-DWITH_LZ4=system
+		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+		-DWITH_RAPIDJSON=bundled
+	)
+
+	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+		ewarn "You MUST file bugs without these variables set."
+		ewarn "Tests will probably fail!"
+
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+		)
+	elif use latin1 ; then
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=latin1
+			-DDEFAULT_COLLATION=latin1_swedish_ci
+		)
+	else
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=utf8mb4
+			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+		)
+	fi
+
+	if use server ; then
+		mycmakeargs+=(
+			-DWITH_EXTRA_CHARSETS=all
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_LIBEVENT=system
+			-DWITH_PROTOBUF=system
+			-DWITH_NUMA=$(usex numa ON OFF)
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_SYSTEMD=no
+		)
+	fi
+
+	cmake_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='perl server' \
+# FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname bug reason
+		rawtestname="${1}" ; shift
+		bug="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Run CTest (test-units)
+	cmake_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+
+	local -a disabled_tests
+	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
+	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure - no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
+
+	# Known test failures due to expired SSL certificates -- fixed in 8.0.22
+	disabled_tests+=( "auth_sec.admin_ssl_crl_crlpath;100055;Fixed in 8.0.22" )
+	disabled_tests+=( "auth_sec.admin_ssl_crl;100055;Fixed in 8.0.22" )
+	disabled_tests+=( "auth_sec.server_withssl_client_withssl;100055;Fixed in 8.0.22" )
+	disabled_tests+=( "main.ssl_crl_clients_valid;100055;Fixed in 8.0.22" )
+	disabled_tests+=( "main.ssl_crl;100055;Fixed in 8.0.22" )
+	disabled_tests+=( "main.ssl_crl_crlpath;100055;Fixed in 8.0.22" )
+	disabled_tests+=( "main.ssl_ca;100055;Fixed in 8.0.22" )
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
+		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
+	fi
+
+	local test_infos_str test_infos_arr
+	for test_infos_str in "${disabled_tests[@]}" ; do
+		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+			die "Invalid test data set, not matching format: ${test_infos_str}"
+		fi
+
+		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+	done
+	unset test_infos_str test_infos_arr
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	cmake_src_install
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	mycnf_src="my.cnf-8.0.distro-server"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR}/${mycnf_src}" \
+		> "${TMPDIR}/my.cnf.ok" || die
+
+	if use prefix ; then
+		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8mb4|latin1|g" \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	eprefixify "${TMPDIR}/my.cnf.ok"
+
+	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+	if use router ; then
+		rm -rf \
+			"${ED}/usr/LICENSE.router" \
+			"${ED}/usr/README.router" \
+			"${ED}/usr/run" \
+			"${ED}/usr/var" \
+			|| die
+	fi
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	# NOTE: $MY_LOGDIR contains $EPREFIX by default
+	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		einfo
+		elog "You might want to run:"
+		elog "  \"emerge --config =${CATEGORY}/${PF}\""
+		elog "if this is a new install."
+		einfo
+	else
+		einfo
+		elog "Upgrade process for ${PN}-8.x has changed. Please read"
+		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+		einfo
+	fi
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	local -a config_files
+
+	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+	fi
+
+	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+	fi
+
+	if [[ ${#config_files[@]} -gt 0 ]] ; then
+		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+			local user_answer
+
+			echo
+			einfo "Please select default authentication plugin (enter number or plugin name):"
+			einfo "1) caching_sha2_password [MySQL 8.0 default]"
+			einfo "2) mysql_native_password [MySQL 5.7 default]"
+			einfo
+			einfo "For details see:"
+			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+			read -p "    >" user_answer
+			echo
+
+			case "${user_answer}" in
+				1|caching_sha2_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+					;;
+				2|mysql_native_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+					;;
+				'')
+					die "No authentication plugin selected!"
+					;;
+				*)
+					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+					;;
+			esac
+
+			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
+			unset user_answer
+		fi
+
+		local cfg_option cfg_option_tabs cfg_section
+		for config_file in "${config_files[@]}" ; do
+			cfg_option="default-authentication-plugin"
+			cfg_section="mysqld"
+			cfg_option_tabs="\t\t"
+			if [[ "${config_file}" == *client.cnf ]] ; then
+				cfg_option="default-auth"
+				cfg_section="client"
+				cfg_option_tabs="\t\t\t\t"
+			fi
+
+			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+			else
+				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+			fi
+		done
+		unset cfg_option cfg_option_tabs cfg_section
+	fi
+	unset config_files config_file
+
+	echo
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-07-26  1:46 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-07-26  1:46 UTC (permalink / raw
  To: gentoo-commits

commit:     331adc8a03e7e38a95d7ff3e0ec54d0b849401c7
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 26 01:12:01 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=331adc8a

dev-db/mysql: bump to v5.7.31

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

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-5.7.31.ebuild | 1219 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1221 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 67043136b9e..72b75e7451d 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,9 +1,11 @@
 DIST mysql-5.7.30-patches-01.tar.xz 6684 BLAKE2B 9350280094619fda0d91eacae573396198954fceb5dc039669d236b1dad98eef306702550b517ef30ee3d0e6721667b6f5549df91e3c15cef68888079c00d9ba SHA512 74e8e8794fe54b73776b38296aa42c65547311b80bfe65c88b2f961bd44083e9628eb47da4ebcf4c20e2d7c694f514223bcbf29cce27853cca500710ae97778d
+DIST mysql-5.7.31-patches-01.tar.xz 6664 BLAKE2B 8225f286f0090653f9714545daa95ccdadaa58812e55284d1ee52ad2dcca18960b9266797630762595d832aa1dda1d9e2df691f0c728102f162b376346c99b3c SHA512 c6260e688da6e8f049ba7ac0553ad442e76829deaca32c1b7a101ec927a36b1571cb24982391f05545a9f62d94502efc09530d444e4abfc08350ab4c19fbfd37
 DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
 DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
 DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
+DIST mysql-boost-5.7.31.tar.gz 51382559 BLAKE2B 86430ee01b0b066ffbd1c876c7d09afecdd57f99cfe07417f406345bcdb14cc6fd33a2d4d92dfe15e87f34ec476bf34d62508ac3f99fb3e11957458e0d6ec20b SHA512 d7fc1927c860562d121658031bcbd58d36a942340423bf7b692cef84c29e67b56d009c9f9bb10cde8acabd6f9db58c67eb542349eccc4719fb38c8570738700a
 DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
 DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99
 DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1

diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
new file mode 100644
index 00000000000..5e0592f012e
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.31.ebuild
@@ -0,0 +1,1219 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit cmake flag-o-matic linux-info \
+	prefix toolchain-funcs multilib-minimal
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.31-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="5.7/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+	sys-libs/ncurses:0=
+	client-libs? (
+		>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
+		!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+	)
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+		libressl? ( dev-libs/libressl:0= )
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+	)
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
+	virtual/yacc
+	server? (
+		dev-libs/libevent
+		experimental? ( net-libs/rpcsvc-proto )
+	)
+	static? ( sys-libs/ncurses[static-libs] )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:8.0
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
+	server? (
+		!prefix? (
+			acct-group/mysql acct-user/mysql
+			dev-db/mysql-init-scripts
+		)
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		if use server ; then
+			CHECKREQS_DISK_BUILD="3G"
+
+			if has test $FEATURES ; then
+				CHECKREQS_DISK_BUILD="9G"
+			fi
+
+			check-reqs_pkg_pretend
+		fi
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		CHECKREQS_DISK_BUILD="3G"
+
+		if has test ${FEATURES} ; then
+			CHECKREQS_DISK_BUILD="9G"
+
+			# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+			# localhost. Also causes weird failures.
+			[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+			if ! has userpriv ${FEATURES} ; then
+				die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+			fi
+
+			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+			if use latin1 ; then
+				# Upstream only supports tests with default charset
+				die "Testing with USE=latin1 is not supported."
+			fi
+		fi
+
+		if use kernel_linux ; then
+			if use numa ; then
+				linux-info_get_any_version
+
+				local CONFIG_CHECK="~NUMA"
+
+				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+				check_extra_config
+			fi
+		fi
+
+		use server && check-reqs_pkg_setup
+	fi
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/extra/libevent \
+		"${S}"/zlib \
+		|| die
+
+	# Don't clash with dev-db/mysql-connector-c
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI, bug 530132
+	if multilib_is_native_abi ; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
+			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static ; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf ; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
+	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+	for t in \
+		main.xa_prepared_binlog_off \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_non_direct_stm_mixing_engines \
+	; do
+		_disable_test "$t" "Unstable test"
+	done
+
+	for t in \
+		gis.geometry_class_attri_prop \
+		gis.geometry_property_function_issimple \
+		gis.gis_bugs_crashes \
+		gis.spatial_op_testingfunc_mix \
+		gis.spatial_analysis_functions_buffer \
+		gis.spatial_analysis_functions_distance \
+		gis.spatial_utility_function_distance_sphere \
+		gis.spatial_utility_function_simplify \
+		gis.spatial_analysis_functions_centroid \
+		main.with_recursive \
+	; do
+		_disable_test "$t" "Known rounding error with latest AMD processors"
+	done
+
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
+	fi
+
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	if has_version '>=dev-libs/openssl-1.1.1' ; then
+		# Tests are expecting <openssl-1.1.1 default cipher
+		for t in \
+			auth_sec.cert_verify \
+			auth_sec.mysql_ssl_connection \
+			auth_sec.openssl_cert_generation \
+			auth_sec.ssl_auto_detect \
+			auth_sec.ssl_mode \
+			auth_sec.tls \
+			binlog.binlog_grant_alter_user \
+			encryption.innodb_onlinealter_encryption \
+			main.grant_alter_user_qa \
+			main.grant_user_lock_qa \
+			main.mysql_ssl_default \
+			main.openssl_1 \
+			main.plugin_auth_sha256_tls \
+			main.ssl \
+			main.ssl_8k_key \
+			main.ssl_bug75311 \
+			main.ssl_ca \
+			main.ssl_cipher \
+			main.ssl_compress \
+			main.ssl_crl \
+			main.ssl_ecdh \
+			main.ssl_verify_identity \
+			x.connection_tls_version \
+			x.connection_openssl \
+		; do
+			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+	cmake_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		eprefixify "${TMPDIR}/my.cnf.ok"
+
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]] ; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	rm "${tz_sql}" || die
+
+	local x=${RANDOM}
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+	unset x
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-07-26  0:11 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-07-26  0:11 UTC (permalink / raw
  To: gentoo-commits

commit:     57df63dd15ee9141f688ba90d5224c5d0efeceb3
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 26 00:10:09 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jul 26 00:10:09 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57df63dd

dev-db/mysql: introduce slots

While we still don't support installing multiple dev-db/mysql
versions simultaneously, we need slots to support proper targeting in
GLSAs.

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

 dev-db/mysql/{mysql-5.7.27-r1.ebuild => mysql-5.7.27-r2.ebuild} | 3 ++-
 dev-db/mysql/{mysql-5.7.29.ebuild => mysql-5.7.29-r1.ebuild}    | 3 ++-
 dev-db/mysql/{mysql-5.7.30.ebuild => mysql-5.7.30-r1.ebuild}    | 3 ++-
 dev-db/mysql/{mysql-8.0.19-r1.ebuild => mysql-8.0.19-r2.ebuild} | 3 ++-
 dev-db/mysql/{mysql-8.0.20.ebuild => mysql-8.0.20-r1.ebuild}    | 3 ++-
 5 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.27-r1.ebuild b/dev-db/mysql/mysql-5.7.27-r2.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-5.7.27-r1.ebuild
rename to dev-db/mysql/mysql-5.7.27-r2.ebuild
index 39229edf052..5ebb1702d77 100644
--- a/dev-db/mysql/mysql-5.7.27-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r2.ebuild
@@ -25,7 +25,7 @@ fi
 HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
-SLOT="0/18"
+SLOT="5.7/18"
 IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
 	selinux +server static static-libs systemtap tcmalloc test yassl"
 
@@ -119,6 +119,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:8.0
 	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
 	selinux? ( sec-policy/selinux-mysql )
 	server? (

diff --git a/dev-db/mysql/mysql-5.7.29.ebuild b/dev-db/mysql/mysql-5.7.29-r1.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-5.7.29.ebuild
rename to dev-db/mysql/mysql-5.7.29-r1.ebuild
index 1bab98a18ca..1ee7956a3d9 100644
--- a/dev-db/mysql/mysql-5.7.29.ebuild
+++ b/dev-db/mysql/mysql-5.7.29-r1.ebuild
@@ -25,7 +25,7 @@ fi
 HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
-SLOT="0/18"
+SLOT="5.7/18"
 IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
 	selinux +server static static-libs systemtap tcmalloc test"
 
@@ -115,6 +115,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:8.0
 	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
 	selinux? ( sec-policy/selinux-mysql )
 	server? (

diff --git a/dev-db/mysql/mysql-5.7.30.ebuild b/dev-db/mysql/mysql-5.7.30-r1.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-5.7.30.ebuild
rename to dev-db/mysql/mysql-5.7.30-r1.ebuild
index 71716b437ae..97e097b5c6d 100644
--- a/dev-db/mysql/mysql-5.7.30.ebuild
+++ b/dev-db/mysql/mysql-5.7.30-r1.ebuild
@@ -21,7 +21,7 @@ SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
 HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
-SLOT="0/18"
+SLOT="5.7/18"
 IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
 	selinux +server static static-libs systemtap tcmalloc test"
 
@@ -90,6 +90,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:8.0
 	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
 	selinux? ( sec-policy/selinux-mysql )
 	server? (

diff --git a/dev-db/mysql/mysql-8.0.19-r1.ebuild b/dev-db/mysql/mysql-8.0.19-r2.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-8.0.19-r1.ebuild
rename to dev-db/mysql/mysql-8.0.19-r2.ebuild
index 827c57daf94..0e7bbeae0ad 100644
--- a/dev-db/mysql/mysql-8.0.19-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.19-r2.ebuild
@@ -28,7 +28,7 @@ fi
 HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
-SLOT="0"
+SLOT="8.0"
 IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
 	router selinux +server tcmalloc test"
 
@@ -102,6 +102,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:5.7
 	selinux? ( sec-policy/selinux-mysql )
 	!prefix? (
 		acct-group/mysql acct-user/mysql

diff --git a/dev-db/mysql/mysql-8.0.20.ebuild b/dev-db/mysql/mysql-8.0.20-r1.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-8.0.20.ebuild
rename to dev-db/mysql/mysql-8.0.20-r1.ebuild
index 05585342435..aad606dfc68 100644
--- a/dev-db/mysql/mysql-8.0.20.ebuild
+++ b/dev-db/mysql/mysql-8.0.20-r1.ebuild
@@ -22,7 +22,7 @@ SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
 HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
-SLOT="0"
+SLOT="8.0"
 IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
 	router selinux +server tcmalloc test"
 
@@ -77,6 +77,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mysql:5.7
 	selinux? ( sec-policy/selinux-mysql )
 	!prefix? (
 		acct-group/mysql acct-user/mysql


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-06-01 23:16 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-06-01 23:16 UTC (permalink / raw
  To: gentoo-commits

commit:     03df35088276f459b96fddfea06753ea93b81989
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  1 23:13:51 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Jun  1 23:16:30 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03df3508

dev-db/mysql: fix pkg_config

Closes: https://bugs.gentoo.org/722118
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.45-r2.ebuild | 15 ++++++++++++---
 dev-db/mysql/mysql-5.7.30.ebuild    | 15 ++++++++++++---
 2 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.45-r2.ebuild b/dev-db/mysql/mysql-5.6.45-r2.ebuild
index 18821fa038c..87c3e81d635 100644
--- a/dev-db/mysql/mysql-5.6.45-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.45-r2.ebuild
@@ -601,11 +601,20 @@ mysql_init_vars() {
 
 pkg_config() {
 	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
 		local section="$1"
 		local flag="--${2}="
 		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+		local cmd=(
+			"${EROOT%/}/usr/bin/my_print_defaults"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
 	}
 	local old_MY_DATADIR="${MY_DATADIR}"
 	local old_HOME="${HOME}"
@@ -724,7 +733,7 @@ pkg_config() {
 	fi
 
 	local options
-	local sqltmp="$(emktemp)"
+	local sqltmp="$(emktemp "${EROOT%/}/tmp")"
 
 	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
 	# see http://bugs.mysql.com/bug.php?id=31312

diff --git a/dev-db/mysql/mysql-5.7.30.ebuild b/dev-db/mysql/mysql-5.7.30.ebuild
index 4543221a9e4..71716b437ae 100644
--- a/dev-db/mysql/mysql-5.7.30.ebuild
+++ b/dev-db/mysql/mysql-5.7.30.ebuild
@@ -747,11 +747,20 @@ multilib_src_install_all() {
 
 pkg_config() {
 	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
 		local section="$1"
 		local flag="--${2}="
 		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+		local cmd=(
+			"${EROOT%/}/usr/bin/my_print_defaults"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
 	}
 	local old_MY_DATADIR="${MY_DATADIR}"
 	local old_HOME="${HOME}"
@@ -872,7 +881,7 @@ pkg_config() {
 	fi
 
 	local options
-	local sqltmp="$(emktemp)"
+	local sqltmp="$(emktemp "${EROOT%/}/tmp")"
 
 	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
 	# see http://bugs.mysql.com/bug.php?id=31312


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-05-24 20:25 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-05-24 20:25 UTC (permalink / raw
  To: gentoo-commits

commit:     ab0818d2ba2fd2ab8efa5e1ba9bcb2503975a8b1
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun May 24 14:39:52 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun May 24 20:23:44 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab0818d2

dev-db/mysql: fix pkg_config

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

 dev-db/mysql/mysql-8.0.19-r1.ebuild | 183 +++++++++++++++++++++---------------
 dev-db/mysql/mysql-8.0.20.ebuild    | 183 +++++++++++++++++++++---------------
 2 files changed, 212 insertions(+), 154 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.19-r1.ebuild b/dev-db/mysql/mysql-8.0.19-r1.ebuild
index 404aa98a36e..827c57daf94 100644
--- a/dev-db/mysql/mysql-8.0.19-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.19-r1.ebuild
@@ -576,43 +576,6 @@ pkg_postinst() {
 }
 
 pkg_config() {
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	einfo "Will use username '${MYSQL_USER}' and group '${MYSQL_GROUP}' ..."
-
 	_getoptval() {
 		local section="$1"
 		local flag="--${2}="
@@ -677,6 +640,41 @@ pkg_config() {
 		done
 	}
 
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
 	# my_print_defaults needs to read stuff in $HOME/.my.cnf
 	local -x HOME="${EROOT}/root"
 
@@ -696,8 +694,6 @@ pkg_config() {
 		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
 		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
 		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	else
-		einfo "${PN} data directory detected as '${MY_DATADIR}' ..."
 	fi
 
 	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
@@ -751,7 +747,7 @@ pkg_config() {
 		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
 	fi
 
-	if [[ $? -ne 0 ]]; then
+	if [[ $? -ne 0 ]] ; then
 		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
 	else
 		rm "${_my_datadir_testfile}" || die
@@ -764,28 +760,8 @@ pkg_config() {
 			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
 	fi
 
-	if [[ -n "${MYSQL_TMPDIR}" ]] ; then
-		local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_tmpdir_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_tmpdir_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]]; then
-			die "${MYSQL_USER} user cannot write into data directory '${MYSQL_TMPDIR}'!"
-		else
-			rm "${_my_tmpdir_testfile}" || die
-			unset _my_tmpdir_testfile
-		fi
-	else
-		# If no tmpdir is set, mysqld will use default system tmpdir.
-		# However, we are using tmpdir from package manager at the
-		# moment which maybe isn't writeable for $MYSQL_USER...
-		MYSQL_TMPDIR="$(_mktemp_dry "${T}/mysqld-tmp.XXXXXXXXX")"
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
 		[[ -z "${MYSQL_TMPDIR}" ]] \
 			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
 
@@ -793,6 +769,24 @@ pkg_config() {
 		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
 	fi
 
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
 	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
 		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
 		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
@@ -810,7 +804,7 @@ pkg_config() {
 			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
 		fi
 
-		if [[ $? -ne 0 ]]; then
+		if [[ $? -ne 0 ]] ; then
 			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
 		else
 			rm "${_my_logbin_testfile}" || die
@@ -835,7 +829,7 @@ pkg_config() {
 			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
 		fi
 
-		if [[ $? -ne 0 ]]; then
+		if [[ $? -ne 0 ]] ; then
 			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
 		else
 			rm "${_my_relaylog_testfile}" || die
@@ -843,6 +837,44 @@ pkg_config() {
 		fi
 	fi
 
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
 	local -a config_files
 
 	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
@@ -888,6 +920,8 @@ pkg_config() {
 					;;
 			esac
 
+			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
 			unset user_answer
 		fi
 
@@ -993,19 +1027,16 @@ pkg_config() {
 
 	# Prepare timezones, see
 	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="${TMPDIR}/tz.sql"
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
 	echo "USE mysql;" >"${tz_sql}"
 	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
 	if [[ $? -ne 0 ]] ; then
 		die "mysql_tzinfo_to_sql failed!"
 	fi
 
-	chown ${MYSQL_USER} "${tz_sql}" || die
-
-	local mysql_install_log="${TMPDIR}/mysql_install_db.log"
-	touch "${mysql_install_log}" || die
-	chown ${MYSQL_USER} "${mysql_install_log}" || die
-
 	# --initialize-insecure will not set root password
 	# --initialize would set a random one in the log which we don't need as we set it ourselves
 	local cmd=(
@@ -1028,15 +1059,13 @@ pkg_config() {
 		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
 	fi
 
+	rm "${tz_sql}" || die
+
 	local x=${RANDOM}
-	local socket="${EROOT}/run/mysqld/mysqld${x}.sock"
-	local pidfile="${EROOT}/run/mysqld/mysqld${x}.pid"
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
 	unset x
 
-	local mysqld_logfile="${TMPDIR}/mysqld.log"
-	touch "${mysqld_logfile}" || die
-	chown ${MYSQL_USER} "${mysqld_logfile}" || die
-
 	cmd=(
 		"${mysqld_binary}"
 		"${mysqld_options[@]}"

diff --git a/dev-db/mysql/mysql-8.0.20.ebuild b/dev-db/mysql/mysql-8.0.20.ebuild
index d2f81739cca..05585342435 100644
--- a/dev-db/mysql/mysql-8.0.20.ebuild
+++ b/dev-db/mysql/mysql-8.0.20.ebuild
@@ -558,43 +558,6 @@ pkg_postinst() {
 }
 
 pkg_config() {
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	einfo "Will use username '${MYSQL_USER}' and group '${MYSQL_GROUP}' ..."
-
 	_getoptval() {
 		local section="$1"
 		local flag="--${2}="
@@ -659,6 +622,41 @@ pkg_config() {
 		done
 	}
 
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
 	# my_print_defaults needs to read stuff in $HOME/.my.cnf
 	local -x HOME="${EROOT}/root"
 
@@ -678,8 +676,6 @@ pkg_config() {
 		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
 		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
 		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	else
-		einfo "${PN} data directory detected as '${MY_DATADIR}' ..."
 	fi
 
 	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
@@ -733,7 +729,7 @@ pkg_config() {
 		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
 	fi
 
-	if [[ $? -ne 0 ]]; then
+	if [[ $? -ne 0 ]] ; then
 		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
 	else
 		rm "${_my_datadir_testfile}" || die
@@ -746,28 +742,8 @@ pkg_config() {
 			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
 	fi
 
-	if [[ -n "${MYSQL_TMPDIR}" ]] ; then
-		local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_tmpdir_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_tmpdir_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]]; then
-			die "${MYSQL_USER} user cannot write into data directory '${MYSQL_TMPDIR}'!"
-		else
-			rm "${_my_tmpdir_testfile}" || die
-			unset _my_tmpdir_testfile
-		fi
-	else
-		# If no tmpdir is set, mysqld will use default system tmpdir.
-		# However, we are using tmpdir from package manager at the
-		# moment which maybe isn't writeable for $MYSQL_USER...
-		MYSQL_TMPDIR="$(_mktemp_dry "${T}/mysqld-tmp.XXXXXXXXX")"
+	if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+		MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
 		[[ -z "${MYSQL_TMPDIR}" ]] \
 			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
 
@@ -775,6 +751,24 @@ pkg_config() {
 		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
 	fi
 
+	# Now we need to test MYSQL_TMPDIR...
+	local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_tmpdir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_tmpdir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+	else
+		rm "${_my_tmpdir_testfile}" || die
+		unset _my_tmpdir_testfile
+	fi
+
 	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
 		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
 		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
@@ -792,7 +786,7 @@ pkg_config() {
 			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
 		fi
 
-		if [[ $? -ne 0 ]]; then
+		if [[ $? -ne 0 ]] ; then
 			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
 		else
 			rm "${_my_logbin_testfile}" || die
@@ -817,7 +811,7 @@ pkg_config() {
 			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
 		fi
 
-		if [[ $? -ne 0 ]]; then
+		if [[ $? -ne 0 ]] ; then
 			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
 		else
 			rm "${_my_relaylog_testfile}" || die
@@ -825,6 +819,44 @@ pkg_config() {
 		fi
 	fi
 
+	local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+	if [[ -z "${mysql_install_log}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysql_install_log}" || die
+		chown ${MYSQL_USER} "${mysql_install_log}" || die
+	fi
+
+	local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+	if [[ -z "${mysqld_logfile}" ]] ; then
+		die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+	else
+		# make sure file is writable for MYSQL_USER...
+		touch "${mysqld_logfile}" || die
+		chown ${MYSQL_USER} "${mysqld_logfile}" || die
+	fi
+
+	echo ""
+	einfo "Detected settings:"
+	einfo "=================="
+	einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+	einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+	einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+	einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+	fi
+
+	einfo "PID DIR:\t\t\t\t${PID_DIR}"
+	einfo "Install db log:\t\t\t${mysql_install_log}"
+	einfo "Install server log:\t\t\t${mysqld_logfile}"
+
 	local -a config_files
 
 	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
@@ -870,6 +902,8 @@ pkg_config() {
 					;;
 			esac
 
+			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
 			unset user_answer
 		fi
 
@@ -975,19 +1009,16 @@ pkg_config() {
 
 	# Prepare timezones, see
 	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="${TMPDIR}/tz.sql"
+	local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+	[[ -z "${tz_sql}" ]] \
+		&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
 	echo "USE mysql;" >"${tz_sql}"
 	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
 	if [[ $? -ne 0 ]] ; then
 		die "mysql_tzinfo_to_sql failed!"
 	fi
 
-	chown ${MYSQL_USER} "${tz_sql}" || die
-
-	local mysql_install_log="${TMPDIR}/mysql_install_db.log"
-	touch "${mysql_install_log}" || die
-	chown ${MYSQL_USER} "${mysql_install_log}" || die
-
 	# --initialize-insecure will not set root password
 	# --initialize would set a random one in the log which we don't need as we set it ourselves
 	local cmd=(
@@ -1010,15 +1041,13 @@ pkg_config() {
 		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
 	fi
 
+	rm "${tz_sql}" || die
+
 	local x=${RANDOM}
-	local socket="${EROOT}/run/mysqld/mysqld${x}.sock"
-	local pidfile="${EROOT}/run/mysqld/mysqld${x}.pid"
+	local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+	local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
 	unset x
 
-	local mysqld_logfile="${TMPDIR}/mysqld.log"
-	touch "${mysqld_logfile}" || die
-	chown ${MYSQL_USER} "${mysqld_logfile}" || die
-
 	cmd=(
 		"${mysqld_binary}"
 		"${mysqld_options[@]}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-05-14 21:29 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-05-14 21:29 UTC (permalink / raw
  To: gentoo-commits

commit:     0279673ca5ecefc34d9e7f5424ab396443114c21
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu May 14 21:20:19 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu May 14 21:29:25 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0279673c

dev-db/mysql: x86 stable (bug #717628)

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

 dev-db/mysql/mysql-5.7.30.ebuild | 2 +-
 dev-db/mysql/mysql-8.0.20.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.30.ebuild b/dev-db/mysql/mysql-5.7.30.ebuild
index fab0a6937cb..4543221a9e4 100644
--- a/dev-db/mysql/mysql-5.7.30.ebuild
+++ b/dev-db/mysql/mysql-5.7.30.ebuild
@@ -30,7 +30,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.20.ebuild b/dev-db/mysql/mysql-8.0.20.ebuild
index 7a1ea0b3920..d2f81739cca 100644
--- a/dev-db/mysql/mysql-8.0.20.ebuild
+++ b/dev-db/mysql/mysql-8.0.20.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-05-10 10:11 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2020-05-10 10:11 UTC (permalink / raw
  To: gentoo-commits

commit:     329f0130c3a4aa082062f50c85348013e3c1e923
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sun May 10 10:10:09 2020 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sun May 10 10:11:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=329f0130

dev-db/mysql: amd64 stable wrt bug #717628

Package-Manager: Portage-2.3.99, Repoman-2.3.22
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.30.ebuild | 2 +-
 dev-db/mysql/mysql-8.0.20.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.30.ebuild b/dev-db/mysql/mysql-5.7.30.ebuild
index 5c1651a1f62..6ca2404d190 100644
--- a/dev-db/mysql/mysql-5.7.30.ebuild
+++ b/dev-db/mysql/mysql-5.7.30.ebuild
@@ -30,7 +30,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.20.ebuild b/dev-db/mysql/mysql-8.0.20.ebuild
index afc6a016f68..2d75ab74f90 100644
--- a/dev-db/mysql/mysql-8.0.20.ebuild
+++ b/dev-db/mysql/mysql-8.0.20.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-05-10 10:11 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2020-05-10 10:11 UTC (permalink / raw
  To: gentoo-commits

commit:     1777552619bb2f304ad255827f6efd46d13d15b3
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sun May 10 10:11:01 2020 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sun May 10 10:11:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17775526

dev-db/mysql: arm stable wrt bug #717628

Package-Manager: Portage-2.3.99, Repoman-2.3.22
RepoMan-Options: --include-arches="arm"
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.30.ebuild | 2 +-
 dev-db/mysql/mysql-8.0.20.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.30.ebuild b/dev-db/mysql/mysql-5.7.30.ebuild
index 6ca2404d190..fab0a6937cb 100644
--- a/dev-db/mysql/mysql-5.7.30.ebuild
+++ b/dev-db/mysql/mysql-5.7.30.ebuild
@@ -30,7 +30,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.20.ebuild b/dev-db/mysql/mysql-8.0.20.ebuild
index 2d75ab74f90..7a1ea0b3920 100644
--- a/dev-db/mysql/mysql-8.0.20.ebuild
+++ b/dev-db/mysql/mysql-8.0.20.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-05-04 19:57 Mart Raudsepp
  0 siblings, 0 replies; 393+ messages in thread
From: Mart Raudsepp @ 2020-05-04 19:57 UTC (permalink / raw
  To: gentoo-commits

commit:     cf6066944d74fb0be55ad64879403ab70f04b3c4
Author:     Sam James (sam_c) <sam <AT> cmpct <DOT> info>
AuthorDate: Mon May  4 18:18:38 2020 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Mon May  4 19:56:13 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf606694

dev-db/mysql: arm64 stable (bug #717628)

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Sam James (sam_c) <sam <AT> cmpct.info>
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.30.ebuild | 2 +-
 dev-db/mysql/mysql-8.0.20.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.30.ebuild b/dev-db/mysql/mysql-5.7.30.ebuild
index 2c7797e6428..5c1651a1f62 100644
--- a/dev-db/mysql/mysql-5.7.30.ebuild
+++ b/dev-db/mysql/mysql-5.7.30.ebuild
@@ -30,7 +30,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.20.ebuild b/dev-db/mysql/mysql-8.0.20.ebuild
index d532682d0e8..afc6a016f68 100644
--- a/dev-db/mysql/mysql-8.0.20.ebuild
+++ b/dev-db/mysql/mysql-8.0.20.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-05-04 16:01 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-05-04 16:01 UTC (permalink / raw
  To: gentoo-commits

commit:     20c11fe7bd0311d815374ff9df0ce3ca8603d347
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon May  4 15:26:26 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon May  4 16:00:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20c11fe7

dev-db/mysql: disable more tests

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

 dev-db/mysql/mysql-5.7.30.ebuild | 6 ++++++
 dev-db/mysql/mysql-8.0.20.ebuild | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/dev-db/mysql/mysql-5.7.30.ebuild b/dev-db/mysql/mysql-5.7.30.ebuild
index 1207ac15ee6..2c7797e6428 100644
--- a/dev-db/mysql/mysql-5.7.30.ebuild
+++ b/dev-db/mysql/mysql-5.7.30.ebuild
@@ -542,10 +542,16 @@ src_test() {
 		gis.spatial_utility_function_distance_sphere \
 		gis.spatial_utility_function_simplify \
 		gis.spatial_analysis_functions_centroid \
+		main.with_recursive \
 	; do
 		_disable_test "$t" "Known rounding error with latest AMD processors"
 	done
 
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
+	fi
+
 	if use numa && use kernel_linux ; then
 		# bug 584880
 		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then

diff --git a/dev-db/mysql/mysql-8.0.20.ebuild b/dev-db/mysql/mysql-8.0.20.ebuild
index e6d1693f2a1..d532682d0e8 100644
--- a/dev-db/mysql/mysql-8.0.20.ebuild
+++ b/dev-db/mysql/mysql-8.0.20.ebuild
@@ -388,6 +388,7 @@ src_test() {
 	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
 	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
 	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
 	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
 	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
 	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
@@ -396,6 +397,11 @@ src_test() {
 	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
 	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
 
+	if ! hash zip 1>/dev/null 2>&1 ; then
+		# no need to force dep app-arch/zip for one test
+		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
+	fi
+
 	local test_infos_str test_infos_arr
 	for test_infos_str in "${disabled_tests[@]}" ; do
 		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-05-03 15:21 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-05-03 15:21 UTC (permalink / raw
  To: gentoo-commits

commit:     95922d67340b909d7314f73bf6ccc3332f59e794
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun May  3 15:20:05 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun May  3 15:20:54 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95922d67

dev-db/mysql: drop USE=yassl

Link: https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-28.html
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.29.ebuild | 27 ++++++++++-----------------
 dev-db/mysql/mysql-5.7.30.ebuild | 27 ++++++++++-----------------
 2 files changed, 20 insertions(+), 34 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.29.ebuild b/dev-db/mysql/mysql-5.7.29.ebuild
index dceca6a058f..1bab98a18ca 100644
--- a/dev-db/mysql/mysql-5.7.29.ebuild
+++ b/dev-db/mysql/mysql-5.7.29.ebuild
@@ -27,12 +27,12 @@ DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="0/18"
 IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test yassl"
+	selinux +server static static-libs systemtap tcmalloc test"
 
 # Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
 RESTRICT="!test? ( test ) libressl? ( test )"
 
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
 KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
@@ -90,15 +90,13 @@ COMMON_DEPEND="net-misc/curl:=
 	)
 	systemtap? ( >=dev-util/systemtap-1.3:0= )
 	tcmalloc? ( dev-util/google-perftools:0= )
-	!yassl? (
-		client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
-			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
-		)
-		!client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-			libressl? ( dev-libs/libressl:0= )
-		)
+	client-libs? (
+		!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+	)
+	!client-libs? (
+		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+		libressl? ( dev-libs/libressl:0= )
 	)
 "
 DEPEND="${COMMON_DEPEND}
@@ -362,6 +360,7 @@ multilib_src_configure() {
 		### TODO: make this system but issues with UTF-8 prevent it
 		-DWITH_EDITLINE=bundled
 		-DWITH_ZLIB=system
+		-DWITH_SSL=system
 		-DWITH_LIBWRAP=0
 		-DENABLED_LOCAL_INFILE=1
 		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
@@ -379,12 +378,6 @@ multilib_src_configure() {
 		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
 	fi
 
-	if ! use yassl ; then
-		mycmakeargs+=( -DWITH_SSL=system )
-	else
-		mycmakeargs+=( -DWITH_SSL=bundled )
-	fi
-
 	if ! use client-libs ; then
 		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
 	fi

diff --git a/dev-db/mysql/mysql-5.7.30.ebuild b/dev-db/mysql/mysql-5.7.30.ebuild
index ddb4b28d3e1..1207ac15ee6 100644
--- a/dev-db/mysql/mysql-5.7.30.ebuild
+++ b/dev-db/mysql/mysql-5.7.30.ebuild
@@ -23,12 +23,12 @@ DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="0/18"
 IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test yassl"
+	selinux +server static static-libs systemtap tcmalloc test"
 
 # Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
 RESTRICT="!test? ( test ) libressl? ( test )"
 
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
 
 KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
@@ -65,15 +65,13 @@ COMMON_DEPEND="net-misc/curl:=
 	)
 	systemtap? ( >=dev-util/systemtap-1.3:0= )
 	tcmalloc? ( dev-util/google-perftools:0= )
-	!yassl? (
-		client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
-			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
-		)
-		!client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-			libressl? ( dev-libs/libressl:0= )
-		)
+	client-libs? (
+		!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+	)
+	!client-libs? (
+		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+		libressl? ( dev-libs/libressl:0= )
 	)
 "
 DEPEND="${COMMON_DEPEND}
@@ -337,6 +335,7 @@ multilib_src_configure() {
 		### TODO: make this system but issues with UTF-8 prevent it
 		-DWITH_EDITLINE=bundled
 		-DWITH_ZLIB=system
+		-DWITH_SSL=system
 		-DWITH_LIBWRAP=0
 		-DENABLED_LOCAL_INFILE=1
 		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
@@ -354,12 +353,6 @@ multilib_src_configure() {
 		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
 	fi
 
-	if ! use yassl ; then
-		mycmakeargs+=( -DWITH_SSL=system )
-	else
-		mycmakeargs+=( -DWITH_SSL=bundled )
-	fi
-
 	if ! use client-libs ; then
 		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
 	fi


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-04-30 23:06 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-04-30 23:06 UTC (permalink / raw
  To: gentoo-commits

commit:     8754f9e36cf37b050f8b8f04bcf421d68c8670d9
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 30 23:06:12 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Apr 30 23:06:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8754f9e3

dev-db/mysql: fix Manifest

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest | 1 -
 1 file changed, 1 deletion(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index c02e67dea28..fa46cf5bee5 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,7 +1,6 @@
 DIST mysql-5.6.45.tar.gz 32525559 BLAKE2B 3c629aed1de808acdea6654c7413e6851507c9c5be939ca4b4f5e2796da317e9b518a749bfc03d2b0ef05bd604b39f72e24b751076b9f206b462d21fa5db4f50 SHA512 f9d8bb72e96cc83f1064fe7df2e5fe8317ca9d44c4e776cf7827a61292fbcfccec716806c80d565958383d78fef93a19d61c726687b57680d5f93299291ff168
 DIST mysql-5.7.30-patches-01.tar.xz 6684 BLAKE2B 9350280094619fda0d91eacae573396198954fceb5dc039669d236b1dad98eef306702550b517ef30ee3d0e6721667b6f5549df91e3c15cef68888079c00d9ba SHA512 74e8e8794fe54b73776b38296aa42c65547311b80bfe65c88b2f961bd44083e9628eb47da4ebcf4c20e2d7c694f514223bcbf29cce27853cca500710ae97778d
 DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
-DIST mysql-boost-5.7.26.tar.gz 51098338 BLAKE2B 1263cd75814a7293b26b0f44fd2b7d20d983f3c6a62725df9515ecac2ef252f6644810cb4bf0d6f36b98e55317f1c67ea7541228cb38d896dfedc476a5755f26 SHA512 a5f9871dc5a8e5fffc1467c3dd542533a63fe553c029120475f8fd5530d884c76ab0c33ad260daf317faf318ccef01464f6ac2dc3468efceb6bf2b6c06c54cfd
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
 DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-04-30 21:43 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-04-30 21:43 UTC (permalink / raw
  To: gentoo-commits

commit:     692c6d4087ab8d3c0eb7cf178388aba0a01a9304
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 30 21:28:27 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Apr 30 21:42:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=692c6d40

dev-db/mysql: drop old

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

 dev-db/mysql/Manifest               |   2 -
 dev-db/mysql/mysql-5.6.44-r1.ebuild | 837 ------------------------------
 dev-db/mysql/mysql-5.7.26-r1.ebuild | 991 ------------------------------------
 3 files changed, 1830 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 9cf53ff8307..c02e67dea28 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,3 @@
-DIST mysql-5.6.44.tar.gz 32531507 BLAKE2B 28fbf49f699eb9f43223ffa186671b119d16016274cc7192db232b85c58123a61154e37193b9b7145c6a650b80b5f6cf838529bc2bc5ea9c78c0dbc39de834d3 SHA512 65ace1c803773ca6c8759d171c09bc93c7d61b8e3208ac9905f82e99087622c9dcca602d2da217741dc62fc6eabe9108ebc7f31facd26705072eae65fcc37077
 DIST mysql-5.6.45.tar.gz 32525559 BLAKE2B 3c629aed1de808acdea6654c7413e6851507c9c5be939ca4b4f5e2796da317e9b518a749bfc03d2b0ef05bd604b39f72e24b751076b9f206b462d21fa5db4f50 SHA512 f9d8bb72e96cc83f1064fe7df2e5fe8317ca9d44c4e776cf7827a61292fbcfccec716806c80d565958383d78fef93a19d61c726687b57680d5f93299291ff168
 DIST mysql-5.7.30-patches-01.tar.xz 6684 BLAKE2B 9350280094619fda0d91eacae573396198954fceb5dc039669d236b1dad98eef306702550b517ef30ee3d0e6721667b6f5549df91e3c15cef68888079c00d9ba SHA512 74e8e8794fe54b73776b38296aa42c65547311b80bfe65c88b2f961bd44083e9628eb47da4ebcf4c20e2d7c694f514223bcbf29cce27853cca500710ae97778d
 DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
@@ -8,7 +7,6 @@ DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b4643
 DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
 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-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1
 DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f

diff --git a/dev-db/mysql/mysql-5.6.44-r1.ebuild b/dev-db/mysql/mysql-5.6.44-r1.ebuild
deleted file mode 100644
index dd4f1b213a7..00000000000
--- a/dev-db/mysql/mysql-5.6.44-r1.ebuild
+++ /dev/null
@@ -1,837 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20190817-0024Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs \
-	user cmake-utils multilib-build
-
-SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0/18"
-IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
-	+server static static-libs systemtap tcmalloc test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
-	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
-	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
-	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
-	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
-	"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.44-fix-libressl-support.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.44-add-openssl-1.1-support.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	kernel_linux? (
-		sys-process/procps:0=
-		dev-libs/libaio:0=
-	)
-	net-misc/curl
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	jemalloc? ( dev-libs/jemalloc:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	!yassl? (
-		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-		libressl? ( =dev-libs/libressl-2.6.5*:0= )
-	)
-	>=sys-libs/zlib-1.2.3:0=
-	sys-libs/ncurses:0=
-	server? (
-		numa? ( sys-process/numactl )
-	)
-	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
-	static? ( sys-libs/ncurses[static-libs] )
-	test? ( dev-perl/JSON )
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
-	${COMMON_DEPEND}
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	_disable_engine() {
-		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
-	}
-
-	_disable_plugin() {
-		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
-	}
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-	if use tcmalloc; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	local plugin
-	local server_plugins=( semisync )
-	local test_plugins=( audit_null daemon_example fulltext )
-	if ! use server; then # These plugins are for the server
-		for plugin in "${server_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	if ! use test; then # These plugins are only used during testing
-		for plugin in "${test_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	# Don't build example
-	_disable_engine example
-	_disable_engine ndb
-	_disable_plugin innodb_memcached
-
-	cmake-utils_src_prepare
-}
-
-src_configure() {
-	# bug 508724 mariadb cannot use ld.gold
-	tc-ld-disable-gold
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling.  We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_LIBEVENT=NO
-		-DWITHOUT_CLIENTLIBS=YES
-		-DENABLE_DTRACE=$(usex systemtap)
-		-DWITH_SSL=$(usex yassl bundled system)
-		-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
-		-DWITHOUT_VALIDATE_PASSWORD=1
-	)
-
-	if use server ; then
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-		mycmakeargs+=(
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	cmake-utils_src_compile
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	if [[ -d "${ED%/}/usr/sql-bench" ]] ; then
-		mv "${ED%/}/usr/sql-bench" "${ED%/}/usr/share/mysql/" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
-	local mycnf_src="my.cnf-5.6"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR%/}/${mycnf_src}" \
-		> "${TMPDIR%/}/my.cnf.ok" || die
-	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8|latin1|g" \
-			"${TMPDIR%/}/my.cnf.ok" || die
-	fi
-	eprefixify "${TMPDIR%/}/my.cnf.ok"
-	newins "${TMPDIR}/my.cnf.ok" my.cnf
-
-	if use server ; then
-		einfo "Including support files and sample configurations"
-		docinto "support-files"
-		local script
-		for script in \
-			"${S}"/support-files/magic
-		do
-			[[ -f "$script" ]] && dodoc "${script}"
-		done
-
-		docinto "scripts"
-		for script in "${S}"/scripts/mysql* ; do
-			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
-		done
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='perl server static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" > /dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.6 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf federated.federated_plugin ; do
-			_disable_test  "$t" "False positives in Gentoo"
-	done
-
-	if ! use latin1 ; then
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-		; do
-			_disable_test  "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	if has_version '>=dev-libs/openssl-1.1.0' ; then
-		# Tests are expecting <openssl-1.1 default cipher
-		for t in \
-			main.openssl_1 \
-			main.plugin_auth_sha256_tls \
-			main.ssl \
-			main.ssl_8k_key \
-			main.ssl_ca \
-			main.ssl_cipher\
-			main.ssl_compress \
-			main.ssl_crl \
-			main.ssl-sha512 \
-		; do
-			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.0"
-		done
-	fi
-
-	_disable_test main.gis-precise "Known rounding error with latest AMD processors"
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd > /dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]]; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
-		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
-	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
-	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
-	[[ -r "${help_tables}" ]] \
-	&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
-	|| touch "${TMPDIR}/fill_help_tables.sql"
-	help_tables="${TMPDIR}/fill_help_tables.sql"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR%/}/mysqld-help"
-	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]]; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]]; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
-	chown mysql "${sqltmp}" || die
-
-	local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
-	[[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
-	if [[ -r "${help_tables}" ]] ; then
-		cat "${help_tables}" >> "${sqltmp}"
-	fi
-	cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [ $? -ne 0 ]; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT%/}/usr/sbin/mysqld \
-		${options} \
-		$(use prefix || echo --user=mysql) \
-		--log-warnings=0 \
-		--basedir=${EROOT%/}/usr \
-		--datadir=${ROOT%/}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile} \
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]]; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
-	"${EROOT%/}/usr/bin/mysql" \
-		--no-defaults \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	if [[ -n "${sqltmp}" ]] ; then
-		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
-		"${EROOT%/}/usr/bin/mysql" \
-			--socket="${socket}" \
-			-hlocalhost \
-			-uroot \
-			--password="${MYSQL_ROOT_PASSWORD}" \
-			mysql < "${sqltmp}"
-		rc=$?
-		eend $?
-		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
-	fi
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}

diff --git a/dev-db/mysql/mysql-5.7.26-r1.ebuild b/dev-db/mysql/mysql-5.7.26-r1.ebuild
deleted file mode 100644
index bdb8fac5396..00000000000
--- a/dev-db/mysql/mysql-5.7.26-r1.ebuild
+++ /dev/null
@@ -1,991 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20190822-1908Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit cmake-utils eutils flag-o-matic linux-info \
-	prefix toolchain-funcs user multilib-minimal
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.26-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-libressl-support.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-mips-ASM.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-build-without-server.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="net-misc/curl:=
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	sys-libs/ncurses:0=
-	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-	)
-	jemalloc? ( dev-libs/jemalloc:0= )
-	kernel_linux? (
-		dev-libs/libaio:0=
-		sys-process/procps:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	!yassl? (
-		client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
-			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
-		)
-		!client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-			libressl? ( dev-libs/libressl:0= )
-		)
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	virtual/yacc
-	server? (
-		dev-libs/libevent
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-	test? ( dev-perl/JSON )
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]] ; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if use numa ; then
-		local CONFIG_CHECK="~NUMA"
-
-		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-		check_extra_config
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	cmake-utils_src_prepare
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/extra/libevent \
-		"${S}"/zlib \
-		|| die
-
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-}
-
-src_configure() {
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use yassl ; then
-		mycmakeargs+=( -DWITH_SSL=system )
-	else
-		mycmakeargs+=( -DWITH_SSL=bundled )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake-utils_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]] ; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf ; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
-	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in \
-		main.xa_prepared_binlog_off \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_non_direct_stm_mixing_engines \
-	; do
-		_disable_test "$t" "Unstable test"
-	done
-
-	for t in \
-		gis.geometry_class_attri_prop \
-		gis.geometry_property_function_issimple \
-		gis.gis_bugs_crashes \
-		gis.spatial_op_testingfunc_mix \
-		gis.spatial_analysis_functions_buffer \
-		gis.spatial_analysis_functions_distance \
-		gis.spatial_utility_function_distance_sphere \
-		gis.spatial_utility_function_simplify \
-		gis.spatial_analysis_functions_centroid \
-	; do
-		_disable_test "$t" "Known rounding error with latest AMD processors"
-	done
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	if has_version '>=dev-libs/openssl-1.1.1' ; then
-		# Tests are expecting <openssl-1.1.1 default cipher
-		for t in \
-			auth_sec.cert_verify \
-			auth_sec.mysql_ssl_connection \
-			auth_sec.openssl_cert_generation \
-			auth_sec.ssl_auto_detect \
-			auth_sec.ssl_mode \
-			auth_sec.tls \
-			binlog.binlog_grant_alter_user \
-			encryption.innodb_onlinealter_encryption \
-			main.grant_alter_user_qa \
-			main.grant_user_lock_qa \
-			main.mysql_ssl_default \
-			main.openssl_1 \
-			main.plugin_auth_sha256_tls \
-			main.ssl \
-			main.ssl_8k_key \
-			main.ssl_bug75311 \
-			main.ssl_ca \
-			main.ssl_cipher \
-			main.ssl_compress \
-			main.ssl_crl \
-			main.ssl_ecdh \
-			main.ssl_verify_identity \
-			x.connection_tls_version \
-			x.connection_openssl \
-		; do
-			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-
-	cmake-utils_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
-		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
-			if [[ -d "${MY_DATADIR_s}" ]] ; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]] ; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
-	fi
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
-	fi
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR%/}/mysqld-help"
-	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	echo "USE mysql;" >"${sqltmp}"
-	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
-	chown mysql "${sqltmp}" || die
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
-	cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT%/}/usr/sbin/mysqld \
-		${options} \
-		$(use prefix || echo --user=mysql) \
-		--log-warnings=0 \
-		--basedir=${EROOT%/}/usr \
-		--datadir=${ROOT%/}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile} \
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]] ; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
-	"${EROOT%/}/usr/bin/mysql" \
-		--no-defaults \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-04-30 21:43 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-04-30 21:43 UTC (permalink / raw
  To: gentoo-commits

commit:     1d17c28118c0eb467d78c2d7a7432e675cadcbd4
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 30 21:25:21 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Apr 30 21:42:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d17c281

dev-db/mysql: bump to v5.7.30

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

 dev-db/mysql/Manifest            |   2 +
 dev-db/mysql/mysql-5.7.30.ebuild | 975 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 977 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 6f0e03d7d84..9cf53ff8307 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,9 +1,11 @@
 DIST mysql-5.6.44.tar.gz 32531507 BLAKE2B 28fbf49f699eb9f43223ffa186671b119d16016274cc7192db232b85c58123a61154e37193b9b7145c6a650b80b5f6cf838529bc2bc5ea9c78c0dbc39de834d3 SHA512 65ace1c803773ca6c8759d171c09bc93c7d61b8e3208ac9905f82e99087622c9dcca602d2da217741dc62fc6eabe9108ebc7f31facd26705072eae65fcc37077
 DIST mysql-5.6.45.tar.gz 32525559 BLAKE2B 3c629aed1de808acdea6654c7413e6851507c9c5be939ca4b4f5e2796da317e9b518a749bfc03d2b0ef05bd604b39f72e24b751076b9f206b462d21fa5db4f50 SHA512 f9d8bb72e96cc83f1064fe7df2e5fe8317ca9d44c4e776cf7827a61292fbcfccec716806c80d565958383d78fef93a19d61c726687b57680d5f93299291ff168
+DIST mysql-5.7.30-patches-01.tar.xz 6684 BLAKE2B 9350280094619fda0d91eacae573396198954fceb5dc039669d236b1dad98eef306702550b517ef30ee3d0e6721667b6f5549df91e3c15cef68888079c00d9ba SHA512 74e8e8794fe54b73776b38296aa42c65547311b80bfe65c88b2f961bd44083e9628eb47da4ebcf4c20e2d7c694f514223bcbf29cce27853cca500710ae97778d
 DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
 DIST mysql-boost-5.7.26.tar.gz 51098338 BLAKE2B 1263cd75814a7293b26b0f44fd2b7d20d983f3c6a62725df9515ecac2ef252f6644810cb4bf0d6f36b98e55317f1c67ea7541228cb38d896dfedc476a5755f26 SHA512 a5f9871dc5a8e5fffc1467c3dd542533a63fe553c029120475f8fd5530d884c76ab0c33ad260daf317faf318ccef01464f6ac2dc3468efceb6bf2b6c06c54cfd
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
+DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
 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-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28

diff --git a/dev-db/mysql/mysql-5.7.30.ebuild b/dev-db/mysql/mysql-5.7.30.ebuild
new file mode 100644
index 00000000000..ddb4b28d3e1
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.30.ebuild
@@ -0,0 +1,975 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit cmake-utils eutils flag-o-matic linux-info \
+	prefix toolchain-funcs multilib-minimal
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.30-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="net-misc/curl:=
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	sys-libs/ncurses:0=
+	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+	)
+	jemalloc? ( dev-libs/jemalloc:0= )
+	kernel_linux? (
+		dev-libs/libaio:0=
+		sys-process/procps:0=
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
+		numa? ( sys-process/numactl )
+	)
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	!yassl? (
+		client-libs? (
+			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+		)
+		!client-libs? (
+			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+			libressl? ( dev-libs/libressl:0= )
+		)
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
+	virtual/yacc
+	server? (
+		dev-libs/libevent
+		experimental? ( net-libs/rpcsvc-proto )
+	)
+	static? ( sys-libs/ncurses[static-libs] )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
+	server? (
+		!prefix? (
+			acct-group/mysql acct-user/mysql
+			dev-db/mysql-init-scripts
+		)
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]] ; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if use numa ; then
+		local CONFIG_CHECK="~NUMA"
+
+		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+		check_extra_config
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	cmake-utils_src_prepare
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/extra/libevent \
+		"${S}"/zlib \
+		|| die
+
+	# Don't clash with dev-db/mysql-connector-c
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use yassl ; then
+		mycmakeargs+=( -DWITH_SSL=system )
+	else
+		mycmakeargs+=( -DWITH_SSL=bundled )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI, bug 530132
+	if multilib_is_native_abi ; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
+			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static ; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake-utils_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]] ; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf ; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
+	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+	for t in \
+		main.xa_prepared_binlog_off \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_non_direct_stm_mixing_engines \
+	; do
+		_disable_test "$t" "Unstable test"
+	done
+
+	for t in \
+		gis.geometry_class_attri_prop \
+		gis.geometry_property_function_issimple \
+		gis.gis_bugs_crashes \
+		gis.spatial_op_testingfunc_mix \
+		gis.spatial_analysis_functions_buffer \
+		gis.spatial_analysis_functions_distance \
+		gis.spatial_utility_function_distance_sphere \
+		gis.spatial_utility_function_simplify \
+		gis.spatial_analysis_functions_centroid \
+	; do
+		_disable_test "$t" "Known rounding error with latest AMD processors"
+	done
+
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	if has_version '>=dev-libs/openssl-1.1.1' ; then
+		# Tests are expecting <openssl-1.1.1 default cipher
+		for t in \
+			auth_sec.cert_verify \
+			auth_sec.mysql_ssl_connection \
+			auth_sec.openssl_cert_generation \
+			auth_sec.ssl_auto_detect \
+			auth_sec.ssl_mode \
+			auth_sec.tls \
+			binlog.binlog_grant_alter_user \
+			encryption.innodb_onlinealter_encryption \
+			main.grant_alter_user_qa \
+			main.grant_user_lock_qa \
+			main.mysql_ssl_default \
+			main.openssl_1 \
+			main.plugin_auth_sha256_tls \
+			main.ssl \
+			main.ssl_8k_key \
+			main.ssl_bug75311 \
+			main.ssl_ca \
+			main.ssl_cipher \
+			main.ssl_compress \
+			main.ssl_crl \
+			main.ssl_ecdh \
+			main.ssl_verify_identity \
+			x.connection_tls_version \
+			x.connection_openssl \
+		; do
+			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+
+	cmake-utils_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		eprefixify "${TMPDIR}/my.cnf.ok"
+
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
+			if [[ -d "${MY_DATADIR_s}" ]] ; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]] ; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+	fi
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+	fi
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT%/}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	echo "USE mysql;" >"${sqltmp}"
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+	cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
+	if [[ $? -ne 0 ]] ; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
+		${options} \
+		$(use prefix || echo --user=mysql) \
+		--log-warnings=0 \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile} \
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]] ; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-04-30 20:45 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-04-30 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     354298f979e834d7a95caf530cf61eb580e4b0e6
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 30 19:07:18 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Apr 30 20:44:55 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=354298f9

dev-db/mysql: bump to v8.0.20

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

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-8.0.20.ebuild | 1108 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1110 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 1ecef78e7c6..6f0e03d7d84 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,9 +1,11 @@
 DIST mysql-5.6.44.tar.gz 32531507 BLAKE2B 28fbf49f699eb9f43223ffa186671b119d16016274cc7192db232b85c58123a61154e37193b9b7145c6a650b80b5f6cf838529bc2bc5ea9c78c0dbc39de834d3 SHA512 65ace1c803773ca6c8759d171c09bc93c7d61b8e3208ac9905f82e99087622c9dcca602d2da217741dc62fc6eabe9108ebc7f31facd26705072eae65fcc37077
 DIST mysql-5.6.45.tar.gz 32525559 BLAKE2B 3c629aed1de808acdea6654c7413e6851507c9c5be939ca4b4f5e2796da317e9b518a749bfc03d2b0ef05bd604b39f72e24b751076b9f206b462d21fa5db4f50 SHA512 f9d8bb72e96cc83f1064fe7df2e5fe8317ca9d44c4e776cf7827a61292fbcfccec716806c80d565958383d78fef93a19d61c726687b57680d5f93299291ff168
+DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
 DIST mysql-boost-5.7.26.tar.gz 51098338 BLAKE2B 1263cd75814a7293b26b0f44fd2b7d20d983f3c6a62725df9515ecac2ef252f6644810cb4bf0d6f36b98e55317f1c67ea7541228cb38d896dfedc476a5755f26 SHA512 a5f9871dc5a8e5fffc1467c3dd542533a63fe553c029120475f8fd5530d884c76ab0c33ad260daf317faf318ccef01464f6ac2dc3468efceb6bf2b6c06c54cfd
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
 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-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1

diff --git a/dev-db/mysql/mysql-8.0.20.ebuild b/dev-db/mysql/mysql-8.0.20.ebuild
new file mode 100644
index 00000000000..e6d1693f2a1
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.20.ebuild
@@ -0,0 +1,1108 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit cmake-utils flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs check-reqs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.20-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
+	${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+	router selinux +server tcmalloc test"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	cjk? ( server )
+	jemalloc? ( server )
+	numa? ( server )
+	profiling? ( server )
+	router? ( server )
+	tcmalloc? ( server )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	>=app-arch/lz4-0_p131:=
+	sys-libs/ncurses:0=
+	>=sys-libs/zlib-1.2.3:0=
+	libressl? ( dev-libs/libressl:0= )
+	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	server? (
+		dev-libs/icu:=
+		dev-libs/libevent:=
+		>=dev-libs/protobuf-3.8:=
+		net-libs/libtirpc:=
+		cjk? ( app-text/mecab:= )
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		tcmalloc? ( dev-util/google-perftools:0= )
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	virtual/yacc
+	server? ( net-libs/rpcsvc-proto )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	selinux? ( sec-policy/selinux-mysql )
+	!prefix? (
+		acct-group/mysql acct-user/mysql
+		dev-db/mysql-init-scripts
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+CHECKREQS_DISK_BUILD="8G"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} == binary ]] && return
+	use server && check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if has test ${FEATURES} ; then
+		# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+		# localhost. Also causes weird failures.
+		[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+		if ! has userpriv ${FEATURES} ; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+
+		local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+		[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+			&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+		if use latin1 ; then
+			# Upstream only supports tests with default charset
+			die "Testing with USE=latin1 is not supported."
+		fi
+	fi
+
+	if use kernel_linux ; then
+		if use numa ; then
+			linux-info_get_any_version
+
+			local CONFIG_CHECK="~NUMA"
+
+			local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+			WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+			check_extra_config
+		fi
+	fi
+
+	use server && check-reqs_pkg_setup
+}
+
+src_unpack() {
+	unpack ${A}
+
+	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+	eapply "${WORKDIR}"/mysql-patches
+
+	eapply_user
+
+	# Avoid rpm call which would trigger sandbox, #692368
+	sed -i \
+		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+		CMakeLists.txt || die
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove man pages for client-lib tools we don't install
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	cmake-utils_src_prepare
+}
+
+src_configure() {
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		# Using bundled editline to get CTRL+C working
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+		-DWITH_ROUTER=$(usex router ON OFF)
+	)
+
+	if is-flagq -fno-lto ; then
+		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
+		mycmakeargs+=( -DWITH_LTO=OFF )
+	elif is-flagq -flto ; then
+		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+		myconf+=( -DWITH_LTO=ON )
+	else
+		# Disable automagic
+		myconf+=( -DWITH_LTO=OFF )
+	fi
+
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+	mycmakeargs+=(
+		-DWITH_ICU=system
+		-DWITH_LZ4=system
+		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+		-DWITH_RAPIDJSON=bundled
+	)
+
+	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+		ewarn "You MUST file bugs without these variables set."
+		ewarn "Tests will probably fail!"
+
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+		)
+	elif use latin1 ; then
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=latin1
+			-DDEFAULT_COLLATION=latin1_swedish_ci
+		)
+	else
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=utf8mb4
+			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+		)
+	fi
+
+	if use server ; then
+		mycmakeargs+=(
+			-DWITH_EXTRA_CHARSETS=all
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_LIBEVENT=system
+			-DWITH_PROTOBUF=system
+			-DWITH_NUMA=$(usex numa ON OFF)
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_SYSTEMD=no
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='perl server' \
+# FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname bug reason
+		rawtestname="${1}" ; shift
+		bug="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+
+	local -a disabled_tests
+	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
+	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
+
+	local test_infos_str test_infos_arr
+	for test_infos_str in "${disabled_tests[@]}" ; do
+		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+			die "Invalid test data set, not matching format: ${test_infos_str}"
+		fi
+
+		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+	done
+	unset test_infos_str test_infos_arr
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	mycnf_src="my.cnf-8.0.distro-server"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR}/${mycnf_src}" \
+		> "${TMPDIR}/my.cnf.ok" || die
+
+	if use prefix ; then
+		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8mb4|latin1|g" \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	eprefixify "${TMPDIR}/my.cnf.ok"
+
+	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+	if use router ; then
+		rm -rf \
+			"${ED}/usr/LICENSE.router" \
+			"${ED}/usr/README.router" \
+			"${ED}/usr/run" \
+			"${ED}/usr/var" \
+			|| die
+	fi
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	# NOTE: $MY_LOGDIR contains $EPREFIX by default
+	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		einfo
+		elog "You might want to run:"
+		elog "  \"emerge --config =${CATEGORY}/${PF}\""
+		elog "if this is a new install."
+		einfo
+	else
+		einfo
+		elog "Upgrade process for ${PN}-8.x has changed. Please read"
+		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+		einfo
+	fi
+}
+
+pkg_config() {
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	einfo "Will use username '${MYSQL_USER}' and group '${MYSQL_GROUP}' ..."
+
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	else
+		einfo "${PN} data directory detected as '${MY_DATADIR}' ..."
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]]; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" ]] ; then
+		local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_tmpdir_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_tmpdir_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]]; then
+			die "${MYSQL_USER} user cannot write into data directory '${MYSQL_TMPDIR}'!"
+		else
+			rm "${_my_tmpdir_testfile}" || die
+			unset _my_tmpdir_testfile
+		fi
+	else
+		# If no tmpdir is set, mysqld will use default system tmpdir.
+		# However, we are using tmpdir from package manager at the
+		# moment which maybe isn't writeable for $MYSQL_USER...
+		MYSQL_TMPDIR="$(_mktemp_dry "${T}/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]]; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]]; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local -a config_files
+
+	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+	fi
+
+	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+	fi
+
+	if [[ ${#config_files[@]} -gt 0 ]] ; then
+		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+			local user_answer
+
+			echo
+			einfo "Please select default authentication plugin (enter number or plugin name):"
+			einfo "1) caching_sha2_password [MySQL 8.0 default]"
+			einfo "2) mysql_native_password [MySQL 5.7 default]"
+			einfo
+			einfo "For details see:"
+			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+			read -p "    >" user_answer
+			echo
+
+			case "${user_answer}" in
+				1|caching_sha2_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+					;;
+				2|mysql_native_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+					;;
+				'')
+					die "No authentication plugin selected!"
+					;;
+				*)
+					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+					;;
+			esac
+
+			unset user_answer
+		fi
+
+		local cfg_option cfg_option_tabs cfg_section
+		for config_file in "${config_files[@]}" ; do
+			cfg_option="default-authentication-plugin"
+			cfg_section="mysqld"
+			cfg_option_tabs="\t\t"
+			if [[ "${config_file}" == *client.cnf ]] ; then
+				cfg_option="default-auth"
+				cfg_section="client"
+				cfg_option_tabs="\t\t\t\t"
+			fi
+
+			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+			else
+				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+			fi
+		done
+		unset cfg_option cfg_option_tabs cfg_section
+	fi
+	unset config_files config_file
+
+	echo
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="${TMPDIR}/tz.sql"
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	chown ${MYSQL_USER} "${tz_sql}" || die
+
+	local mysql_install_log="${TMPDIR}/mysql_install_db.log"
+	touch "${mysql_install_log}" || die
+	chown ${MYSQL_USER} "${mysql_install_log}" || die
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	local x=${RANDOM}
+	local socket="${EROOT}/run/mysqld/mysqld${x}.sock"
+	local pidfile="${EROOT}/run/mysqld/mysqld${x}.pid"
+	unset x
+
+	local mysqld_logfile="${TMPDIR}/mysqld.log"
+	touch "${mysqld_logfile}" || die
+	chown ${MYSQL_USER} "${mysqld_logfile}" || die
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-04-21  0:14 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-04-21  0:14 UTC (permalink / raw
  To: gentoo-commits

commit:     c1247cc12f084578743d9a9419535ff60d97117a
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 20 22:24:14 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Apr 20 23:59:29 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1247cc1

dev-db/mysql: fix code style

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

 dev-db/mysql/mysql-8.0.19-r1.ebuild | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.19-r1.ebuild b/dev-db/mysql/mysql-8.0.19-r1.ebuild
index d5d74638f76..404aa98a36e 100644
--- a/dev-db/mysql/mysql-8.0.19-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.19-r1.ebuild
@@ -399,19 +399,19 @@ src_test() {
 	touch "${T}/disabled.def"
 
 	local -a disabled_tests
-	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges")
-	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet")
-	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet")
+	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
+	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
+	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
 	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
 	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
 	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
@@ -420,7 +420,7 @@ src_test() {
 	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
 	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
 
-	local test_ds
+	local test_infos_str test_infos_arr
 	for test_infos_str in "${disabled_tests[@]}" ; do
 		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
 
@@ -430,7 +430,7 @@ src_test() {
 
 		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
 	done
-	unset test_ds test_infos_str test_infos_arr
+	unset test_infos_str test_infos_arr
 
 	# Try to increase file limits to increase test coverage
 	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-03-19  3:47 Matt Turner
  0 siblings, 0 replies; 393+ messages in thread
From: Matt Turner @ 2020-03-19  3:47 UTC (permalink / raw
  To: gentoo-commits

commit:     766775203172a92100e7c2a93218dbc4faa537b6
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 19 03:35:47 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Mar 19 03:47:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76677520

dev-db/mysql: drop alpha keywords

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.44-r1.ebuild | 2 +-
 dev-db/mysql/mysql-5.6.45-r2.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.26-r1.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.27-r1.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.29.ebuild    | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.44-r1.ebuild b/dev-db/mysql/mysql-5.6.44-r1.ebuild
index beb0cfb5148..22a588a0767 100644
--- a/dev-db/mysql/mysql-5.6.44-r1.ebuild
+++ b/dev-db/mysql/mysql-5.6.44-r1.ebuild
@@ -37,7 +37,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.6.45-r2.ebuild b/dev-db/mysql/mysql-5.6.45-r2.ebuild
index 31f2e40e4ae..db948d673b5 100644
--- a/dev-db/mysql/mysql-5.6.45-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.45-r2.ebuild
@@ -37,7 +37,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.26-r1.ebuild b/dev-db/mysql/mysql-5.7.26-r1.ebuild
index 6a6d86bf27b..5ca98c44091 100644
--- a/dev-db/mysql/mysql-5.7.26-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.26-r1.ebuild
@@ -34,7 +34,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.27-r1.ebuild b/dev-db/mysql/mysql-5.7.27-r1.ebuild
index 912e350a912..1f9c1cc0f98 100644
--- a/dev-db/mysql/mysql-5.7.27-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r1.ebuild
@@ -34,7 +34,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.29.ebuild b/dev-db/mysql/mysql-5.7.29.ebuild
index 0c3c8fe4d52..dceca6a058f 100644
--- a/dev-db/mysql/mysql-5.7.29.ebuild
+++ b/dev-db/mysql/mysql-5.7.29.ebuild
@@ -34,7 +34,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-03-17  1:07 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-03-17  1:07 UTC (permalink / raw
  To: gentoo-commits

commit:     4dd81bb6786a6b78b9a2725de8c268e72a9a2514
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 17 01:06:12 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Mar 17 01:07:35 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4dd81bb6

dev-db/mysql: ICU is not required for USE=-server

Closes: https://bugs.gentoo.org/712072
Package-Manager: Portage-2.3.94, Repoman-2.3.21
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest               | 1 +
 dev-db/mysql/mysql-8.0.19-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index b37e5f81ebd..1ecef78e7c6 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -7,3 +7,4 @@ DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e528
 DIST mysql-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1
+DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f

diff --git a/dev-db/mysql/mysql-8.0.19-r1.ebuild b/dev-db/mysql/mysql-8.0.19-r1.ebuild
index 753bac85776..d5d74638f76 100644
--- a/dev-db/mysql/mysql-8.0.19-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.19-r1.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
-MY_EXTRAS_VER="20200125-1945Z"
+MY_EXTRAS_VER="20200317-0103Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-03-05 11:08 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2020-03-05 11:08 UTC (permalink / raw
  To: gentoo-commits

commit:     76979e0a18b274d513a9a7ff83fa1e4a3472f0b0
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  5 11:08:31 2020 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Mar  5 11:08:31 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76979e0a

dev-db/mysql: arm stable wrt bug #709624

Package-Manager: Portage-2.3.89, Repoman-2.3.20
RepoMan-Options: --include-arches="arm"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.29.ebuild    | 2 +-
 dev-db/mysql/mysql-8.0.19-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.29.ebuild b/dev-db/mysql/mysql-5.7.29.ebuild
index 86a70707a83..0c3c8fe4d52 100644
--- a/dev-db/mysql/mysql-5.7.29.ebuild
+++ b/dev-db/mysql/mysql-5.7.29.ebuild
@@ -34,7 +34,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.19-r1.ebuild b/dev-db/mysql/mysql-8.0.19-r1.ebuild
index 96e80ed37db..753bac85776 100644
--- a/dev-db/mysql/mysql-8.0.19-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.19-r1.ebuild
@@ -43,7 +43,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-02-17 15:23 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2020-02-17 15:23 UTC (permalink / raw
  To: gentoo-commits

commit:     7b6ea7b027683c1a03e521f2fbb065dc2c694cd9
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 17 15:23:49 2020 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Mon Feb 17 15:23:49 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b6ea7b0

dev-db/mysql: ppc64 stable wrt bug #709624

Package-Manager: Portage-2.3.84, Repoman-2.3.20
RepoMan-Options: --include-arches="ppc64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.29.ebuild    | 2 +-
 dev-db/mysql/mysql-8.0.19-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.29.ebuild b/dev-db/mysql/mysql-5.7.29.ebuild
index d26f71f0f9f..2fea30d9577 100644
--- a/dev-db/mysql/mysql-5.7.29.ebuild
+++ b/dev-db/mysql/mysql-5.7.29.ebuild
@@ -34,7 +34,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.19-r1.ebuild b/dev-db/mysql/mysql-8.0.19-r1.ebuild
index bcb1a5322f8..d519e506833 100644
--- a/dev-db/mysql/mysql-8.0.19-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.19-r1.ebuild
@@ -43,7 +43,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-02-16 21:14 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-02-16 21:14 UTC (permalink / raw
  To: gentoo-commits

commit:     f20359a2cc34dc3eecbdb712172b31cfb68cf6a0
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 16 20:58:50 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Feb 16 21:13:40 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f20359a2

dev-db/mysql: x86 stable (bug #709624)

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

 dev-db/mysql/mysql-5.7.29.ebuild    | 2 +-
 dev-db/mysql/mysql-8.0.19-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.29.ebuild b/dev-db/mysql/mysql-5.7.29.ebuild
index 214642cfae7..d26f71f0f9f 100644
--- a/dev-db/mysql/mysql-5.7.29.ebuild
+++ b/dev-db/mysql/mysql-5.7.29.ebuild
@@ -34,7 +34,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.19-r1.ebuild b/dev-db/mysql/mysql-8.0.19-r1.ebuild
index 3fe96f5517d..bcb1a5322f8 100644
--- a/dev-db/mysql/mysql-8.0.19-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.19-r1.ebuild
@@ -43,7 +43,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-02-15 12:13 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2020-02-15 12:13 UTC (permalink / raw
  To: gentoo-commits

commit:     b08fb6593f3b4df861b8aab3cb9c9bc7eb8fd3cd
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 15 12:13:01 2020 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sat Feb 15 12:13:41 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b08fb659

dev-db/mysql: amd64 stable wrt bug #709624

Package-Manager: Portage-2.3.84, Repoman-2.3.20
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.29.ebuild    | 2 +-
 dev-db/mysql/mysql-8.0.19-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.29.ebuild b/dev-db/mysql/mysql-5.7.29.ebuild
index 79346f5415b..214642cfae7 100644
--- a/dev-db/mysql/mysql-5.7.29.ebuild
+++ b/dev-db/mysql/mysql-5.7.29.ebuild
@@ -34,7 +34,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-8.0.19-r1.ebuild b/dev-db/mysql/mysql-8.0.19-r1.ebuild
index a4a82534794..3fe96f5517d 100644
--- a/dev-db/mysql/mysql-8.0.19-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.19-r1.ebuild
@@ -43,7 +43,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
 	router? ( server )
 	tcmalloc? ( server )"
 
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-02-12  9:35 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2020-02-12  9:35 UTC (permalink / raw
  To: gentoo-commits

commit:     4bdf3da527a0014b5e30e6a864325069449e57cf
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 12 09:35:21 2020 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Wed Feb 12 09:35:21 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bdf3da5

dev-db/mysql: ppc64 stable wrt bug #693814

Package-Manager: Portage-2.3.84, Repoman-2.3.20
RepoMan-Options: --include-arches="ppc64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.45-r2.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.27-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.45-r2.ebuild b/dev-db/mysql/mysql-5.6.45-r2.ebuild
index 8a9cf796121..eeb9a544447 100644
--- a/dev-db/mysql/mysql-5.6.45-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.45-r2.ebuild
@@ -37,7 +37,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.27-r1.ebuild b/dev-db/mysql/mysql-5.7.27-r1.ebuild
index e907ada6e7f..af1a86b08a4 100644
--- a/dev-db/mysql/mysql-5.7.27-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r1.ebuild
@@ -34,7 +34,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-02-12  9:34 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2020-02-12  9:34 UTC (permalink / raw
  To: gentoo-commits

commit:     1ec6deb587991a4930c3b03eca155c0636ecb61b
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 12 09:34:06 2020 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Wed Feb 12 09:34:06 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ec6deb5

dev-db/mysql: ppc stable wrt bug #693814

Package-Manager: Portage-2.3.84, Repoman-2.3.20
RepoMan-Options: --include-arches="ppc"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.45-r2.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.27-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.45-r2.ebuild b/dev-db/mysql/mysql-5.6.45-r2.ebuild
index c754c263c7d..8a9cf796121 100644
--- a/dev-db/mysql/mysql-5.6.45-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.45-r2.ebuild
@@ -37,7 +37,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.27-r1.ebuild b/dev-db/mysql/mysql-5.7.27-r1.ebuild
index 4b8ec702b8d..e907ada6e7f 100644
--- a/dev-db/mysql/mysql-5.7.27-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r1.ebuild
@@ -34,7 +34,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-02-08 17:06 David Seifert
  0 siblings, 0 replies; 393+ messages in thread
From: David Seifert @ 2020-02-08 17:06 UTC (permalink / raw
  To: gentoo-commits

commit:     c336404698d89062b249bf01544baa8a7ce389f7
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  8 17:05:01 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Feb  8 17:05:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3364046

dev-db/mysql: [QA] Remove unnecessary -DCMAKE_INSTALL_PREFIX arguments

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.44-r1.ebuild | 1 -
 dev-db/mysql/mysql-5.6.45-r2.ebuild | 1 -
 dev-db/mysql/mysql-5.7.26-r1.ebuild | 1 -
 dev-db/mysql/mysql-5.7.27-r1.ebuild | 1 -
 dev-db/mysql/mysql-5.7.29.ebuild    | 1 -
 dev-db/mysql/mysql-8.0.19-r1.ebuild | 1 -
 6 files changed, 6 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.44-r1.ebuild b/dev-db/mysql/mysql-5.6.44-r1.ebuild
index faeb67ff009..0238c0f2d4b 100644
--- a/dev-db/mysql/mysql-5.6.44-r1.ebuild
+++ b/dev-db/mysql/mysql-5.6.44-r1.ebuild
@@ -245,7 +245,6 @@ src_configure(){
 	mycmakeargs=(
 		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
 		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
 		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
 		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
 		-DINSTALL_BINDIR=bin

diff --git a/dev-db/mysql/mysql-5.6.45-r2.ebuild b/dev-db/mysql/mysql-5.6.45-r2.ebuild
index 5dffcad9902..6f1c6b5e848 100644
--- a/dev-db/mysql/mysql-5.6.45-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.45-r2.ebuild
@@ -254,7 +254,6 @@ src_configure(){
 	mycmakeargs=(
 		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
 		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
 		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
 		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
 		-DINSTALL_BINDIR=bin

diff --git a/dev-db/mysql/mysql-5.7.26-r1.ebuild b/dev-db/mysql/mysql-5.7.26-r1.ebuild
index 47e299be17f..8825edb4d07 100644
--- a/dev-db/mysql/mysql-5.7.26-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.26-r1.ebuild
@@ -333,7 +333,6 @@ multilib_src_configure() {
 	mycmakeargs=(
 		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
 		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
 		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
 		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
 		-DINSTALL_BINDIR=bin

diff --git a/dev-db/mysql/mysql-5.7.27-r1.ebuild b/dev-db/mysql/mysql-5.7.27-r1.ebuild
index 9880be9414d..0bfc4b1cbcf 100644
--- a/dev-db/mysql/mysql-5.7.27-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r1.ebuild
@@ -344,7 +344,6 @@ multilib_src_configure() {
 	mycmakeargs=(
 		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
 		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
 		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
 		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
 		-DINSTALL_BINDIR=bin

diff --git a/dev-db/mysql/mysql-5.7.29.ebuild b/dev-db/mysql/mysql-5.7.29.ebuild
index ece65c60cc6..79346f5415b 100644
--- a/dev-db/mysql/mysql-5.7.29.ebuild
+++ b/dev-db/mysql/mysql-5.7.29.ebuild
@@ -342,7 +342,6 @@ multilib_src_configure() {
 	mycmakeargs=(
 		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
 		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
 		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
 		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
 		-DINSTALL_BINDIR=bin

diff --git a/dev-db/mysql/mysql-8.0.19-r1.ebuild b/dev-db/mysql/mysql-8.0.19-r1.ebuild
index 5fced0177f0..a4a82534794 100644
--- a/dev-db/mysql/mysql-8.0.19-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.19-r1.ebuild
@@ -222,7 +222,6 @@ src_configure(){
 	mycmakeargs=(
 		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
 		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
 		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
 		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
 		-DINSTALL_BINDIR=bin


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-01-25 19:53 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-01-25 19:53 UTC (permalink / raw
  To: gentoo-commits

commit:     355652ca9b64b89a02f4473bb2859a56ebed5ebb
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 25 19:52:17 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Jan 25 19:52:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=355652ca

dev-db/mysql: update patch set

No changes.

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

 dev-db/mysql/Manifest               | 1 -
 dev-db/mysql/mysql-8.0.19-r1.ebuild | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 4a074ca7765..b37e5f81ebd 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -6,5 +6,4 @@ DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b4643
 DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
 DIST mysql-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
-DIST mysql-extras-20200120-1919Z.tar.bz2 342474 BLAKE2B 9c75ec0cb05fc8f86d46bc9308f07c4105c3ab228ef94c0e9e2ab9b83d03362e4ef07c4dac866350ea012c03c111e7012e0b12270b30304a988b9b54bad74864 SHA512 2739c193e9595781b742af9fdb6e0f9c9a5fde87ca652c355d3f630c8c0b45b45967e5c8cf7635fb8615174775e34ae3270b149de7ba8a9d778979c2c66069ef
 DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1

diff --git a/dev-db/mysql/mysql-8.0.19-r1.ebuild b/dev-db/mysql/mysql-8.0.19-r1.ebuild
index c07e5f83866..5fced0177f0 100644
--- a/dev-db/mysql/mysql-8.0.19-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.19-r1.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
-MY_EXTRAS_VER="20200120-1919Z"
+MY_EXTRAS_VER="20200125-1945Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-01-25 19:53 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-01-25 19:53 UTC (permalink / raw
  To: gentoo-commits

commit:     2db64dc8dcc1b8dfe7490962d7b0e84637be2a69
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 25 19:50:19 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Jan 25 19:50:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2db64dc8

dev-db/mysql: bump to v5.7.29

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

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-5.7.29.ebuild | 1001 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1003 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index d60979723ac..4a074ca7765 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -2,7 +2,9 @@ DIST mysql-5.6.44.tar.gz 32531507 BLAKE2B 28fbf49f699eb9f43223ffa186671b119d1601
 DIST mysql-5.6.45.tar.gz 32525559 BLAKE2B 3c629aed1de808acdea6654c7413e6851507c9c5be939ca4b4f5e2796da317e9b518a749bfc03d2b0ef05bd604b39f72e24b751076b9f206b462d21fa5db4f50 SHA512 f9d8bb72e96cc83f1064fe7df2e5fe8317ca9d44c4e776cf7827a61292fbcfccec716806c80d565958383d78fef93a19d61c726687b57680d5f93299291ff168
 DIST mysql-boost-5.7.26.tar.gz 51098338 BLAKE2B 1263cd75814a7293b26b0f44fd2b7d20d983f3c6a62725df9515ecac2ef252f6644810cb4bf0d6f36b98e55317f1c67ea7541228cb38d896dfedc476a5755f26 SHA512 a5f9871dc5a8e5fffc1467c3dd542533a63fe553c029120475f8fd5530d884c76ab0c33ad260daf317faf318ccef01464f6ac2dc3468efceb6bf2b6c06c54cfd
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
+DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
 DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
 DIST mysql-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST mysql-extras-20200120-1919Z.tar.bz2 342474 BLAKE2B 9c75ec0cb05fc8f86d46bc9308f07c4105c3ab228ef94c0e9e2ab9b83d03362e4ef07c4dac866350ea012c03c111e7012e0b12270b30304a988b9b54bad74864 SHA512 2739c193e9595781b742af9fdb6e0f9c9a5fde87ca652c355d3f630c8c0b45b45967e5c8cf7635fb8615174775e34ae3270b149de7ba8a9d778979c2c66069ef
+DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1

diff --git a/dev-db/mysql/mysql-5.7.29.ebuild b/dev-db/mysql/mysql-5.7.29.ebuild
new file mode 100644
index 00000000000..d87e28c839b
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.29.ebuild
@@ -0,0 +1,1001 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20200125-1945Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit cmake-utils eutils flag-o-matic linux-info \
+	prefix toolchain-funcs multilib-minimal
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.29-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.29-fix-libressl-support.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-build-without-server.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="net-misc/curl:=
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	sys-libs/ncurses:0=
+	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+	)
+	jemalloc? ( dev-libs/jemalloc:0= )
+	kernel_linux? (
+		dev-libs/libaio:0=
+		sys-process/procps:0=
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
+		numa? ( sys-process/numactl )
+	)
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	!yassl? (
+		client-libs? (
+			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+		)
+		!client-libs? (
+			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+			libressl? ( dev-libs/libressl:0= )
+		)
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
+	virtual/yacc
+	server? (
+		dev-libs/libevent
+		experimental? ( net-libs/rpcsvc-proto )
+	)
+	static? ( sys-libs/ncurses[static-libs] )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
+	server? (
+		!prefix? (
+			acct-group/mysql acct-user/mysql
+			dev-db/mysql-init-scripts
+		)
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]] ; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if use numa ; then
+		local CONFIG_CHECK="~NUMA"
+
+		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+		check_extra_config
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	cmake-utils_src_prepare
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/extra/libevent \
+		"${S}"/zlib \
+		|| die
+
+	# Don't clash with dev-db/mysql-connector-c
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+}
+
+src_configure(){
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
+		-DMYSQL_DATADIR="${EPREFIX%/}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX%/}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use yassl ; then
+		mycmakeargs+=( -DWITH_SSL=system )
+	else
+		mycmakeargs+=( -DWITH_SSL=bundled )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI, bug 530132
+	if multilib_is_native_abi ; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
+			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static ; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake-utils_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]] ; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf ; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
+	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+	for t in \
+		main.xa_prepared_binlog_off \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_non_direct_stm_mixing_engines \
+	; do
+		_disable_test "$t" "Unstable test"
+	done
+
+	for t in \
+		gis.geometry_class_attri_prop \
+		gis.geometry_property_function_issimple \
+		gis.gis_bugs_crashes \
+		gis.spatial_op_testingfunc_mix \
+		gis.spatial_analysis_functions_buffer \
+		gis.spatial_analysis_functions_distance \
+		gis.spatial_utility_function_distance_sphere \
+		gis.spatial_utility_function_simplify \
+		gis.spatial_analysis_functions_centroid \
+	; do
+		_disable_test "$t" "Known rounding error with latest AMD processors"
+	done
+
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	if has_version '>=dev-libs/openssl-1.1.1' ; then
+		# Tests are expecting <openssl-1.1.1 default cipher
+		for t in \
+			auth_sec.cert_verify \
+			auth_sec.mysql_ssl_connection \
+			auth_sec.openssl_cert_generation \
+			auth_sec.ssl_auto_detect \
+			auth_sec.ssl_mode \
+			auth_sec.tls \
+			binlog.binlog_grant_alter_user \
+			encryption.innodb_onlinealter_encryption \
+			main.grant_alter_user_qa \
+			main.grant_user_lock_qa \
+			main.mysql_ssl_default \
+			main.openssl_1 \
+			main.plugin_auth_sha256_tls \
+			main.ssl \
+			main.ssl_8k_key \
+			main.ssl_bug75311 \
+			main.ssl_ca \
+			main.ssl_cipher \
+			main.ssl_compress \
+			main.ssl_crl \
+			main.ssl_ecdh \
+			main.ssl_verify_identity \
+			x.connection_tls_version \
+			x.connection_openssl \
+		; do
+			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+
+	cmake-utils_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		eprefixify "${TMPDIR}/my.cnf.ok"
+
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX%/}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
+			if [[ -d "${MY_DATADIR_s}" ]] ; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]] ; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+	fi
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+	fi
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT%/}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	echo "USE mysql;" >"${sqltmp}"
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
+	if [[ $? -ne 0 ]] ; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
+		${options} \
+		$(use prefix || echo --user=mysql) \
+		--log-warnings=0 \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile} \
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]] ; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-01-22 20:26 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-01-22 20:26 UTC (permalink / raw
  To: gentoo-commits

commit:     2f563dbcebb4bb42013c8e3d210fe61d252180e7
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 20:24:22 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Jan 22 20:25:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f563dbc

dev-db/mysql: rev bump

- Fix mysql client: Use bundled libedit.

- Handle forced LTO.

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

 .../{mysql-8.0.19.ebuild => mysql-8.0.19-r1.ebuild}   | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.19.ebuild b/dev-db/mysql/mysql-8.0.19-r1.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-8.0.19.ebuild
rename to dev-db/mysql/mysql-8.0.19-r1.ebuild
index 9d486bdb84a..c07e5f83866 100644
--- a/dev-db/mysql/mysql-8.0.19.ebuild
+++ b/dev-db/mysql/mysql-8.0.19-r1.ebuild
@@ -72,7 +72,7 @@ PATCHES=(
 # These are used for both runtime and compiletime
 COMMON_DEPEND="
 	>=app-arch/lz4-0_p131:=
-	dev-libs/libedit
+	sys-libs/ncurses:0=
 	>=sys-libs/zlib-1.2.3:0=
 	libressl? ( dev-libs/libressl:0= )
 	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
@@ -82,12 +82,12 @@ COMMON_DEPEND="
 		>=dev-libs/protobuf-3.8:=
 		net-libs/libtirpc:=
 		cjk? ( app-text/mecab:= )
+		jemalloc? ( dev-libs/jemalloc:0= )
 		kernel_linux? (
 			dev-libs/libaio:0=
 			sys-process/procps:0=
 		)
 		numa? ( sys-process/numactl )
-		jemalloc? ( dev-libs/jemalloc:0= )
 		tcmalloc? ( dev-util/google-perftools:0= )
 	)
 "
@@ -239,7 +239,8 @@ src_configure(){
 		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
 		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
 		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		-DWITH_EDITLINE=system
+		# Using bundled editline to get CTRL+C working
+		-DWITH_EDITLINE=bundled
 		-DWITH_ZLIB=system
 		-DWITH_SSL=system
 		-DWITH_LIBWRAP=0
@@ -255,6 +256,18 @@ src_configure(){
 		-DWITH_BOOST="${S}/boost"
 		-DWITH_ROUTER=$(usex router ON OFF)
 	)
+
+	if is-flagq -fno-lto ; then
+		einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
+		mycmakeargs+=( -DWITH_LTO=OFF )
+	elif is-flagq -flto ; then
+		einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+		myconf+=( -DWITH_LTO=ON )
+	else
+		# Disable automagic
+		myconf+=( -DWITH_LTO=OFF )
+	fi
+
 	if use test ; then
 		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
 	else


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-01-20 19:26 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-01-20 19:26 UTC (permalink / raw
  To: gentoo-commits

commit:     09dd2664e1953e4e54b793f009e861c0219b076d
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 20 19:26:09 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Jan 20 19:26:31 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09dd2664

dev-db/mysql: drop old

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

 dev-db/mysql/Manifest            |    2 -
 dev-db/mysql/mysql-8.0.18.ebuild | 1117 --------------------------------------
 2 files changed, 1119 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 8291d03804b..d60979723ac 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -2,9 +2,7 @@ DIST mysql-5.6.44.tar.gz 32531507 BLAKE2B 28fbf49f699eb9f43223ffa186671b119d1601
 DIST mysql-5.6.45.tar.gz 32525559 BLAKE2B 3c629aed1de808acdea6654c7413e6851507c9c5be939ca4b4f5e2796da317e9b518a749bfc03d2b0ef05bd604b39f72e24b751076b9f206b462d21fa5db4f50 SHA512 f9d8bb72e96cc83f1064fe7df2e5fe8317ca9d44c4e776cf7827a61292fbcfccec716806c80d565958383d78fef93a19d61c726687b57680d5f93299291ff168
 DIST mysql-boost-5.7.26.tar.gz 51098338 BLAKE2B 1263cd75814a7293b26b0f44fd2b7d20d983f3c6a62725df9515ecac2ef252f6644810cb4bf0d6f36b98e55317f1c67ea7541228cb38d896dfedc476a5755f26 SHA512 a5f9871dc5a8e5fffc1467c3dd542533a63fe553c029120475f8fd5530d884c76ab0c33ad260daf317faf318ccef01464f6ac2dc3468efceb6bf2b6c06c54cfd
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
-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-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
-DIST mysql-extras-20191016-1722Z.tar.bz2 340442 BLAKE2B fa38fc455693b940cfb96f69a35c190f7edb3fdfa7bf0e3f4e444032843ca1ad1d4767fecaf3b080f7f8885335ffe81f2355e9fe0fdebe77ac90d7fb1a0d2121 SHA512 1b4d3fb1cda63471807e37ecdd6a663672149a9eac9497d6b864a9ecdd57d179950176da2db0668892567994bd2fc1e98ea499f16dc689738331a1e319c9131c
 DIST mysql-extras-20200120-1919Z.tar.bz2 342474 BLAKE2B 9c75ec0cb05fc8f86d46bc9308f07c4105c3ab228ef94c0e9e2ab9b83d03362e4ef07c4dac866350ea012c03c111e7012e0b12270b30304a988b9b54bad74864 SHA512 2739c193e9595781b742af9fdb6e0f9c9a5fde87ca652c355d3f630c8c0b45b45967e5c8cf7635fb8615174775e34ae3270b149de7ba8a9d778979c2c66069ef

diff --git a/dev-db/mysql/mysql-8.0.18.ebuild b/dev-db/mysql/mysql-8.0.18.ebuild
deleted file mode 100644
index 6b067a6f004..00000000000
--- a/dev-db/mysql/mysql-8.0.18.ebuild
+++ /dev/null
@@ -1,1117 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-MY_EXTRAS_VER="20191016-1722Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit cmake-utils flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs check-reqs
-
-MY_PV="${PV//_pre*}"
-MY_P="${PN}-${MY_PV}"
-
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
-	router selinux +server tcmalloc test"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-8.0.17.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-8.0.18.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.18-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.17-add-protobuf-3.8+-support.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.18-fix-libressl-support.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	>=app-arch/lz4-0_p131:=
-	dev-libs/icu:=
-	dev-libs/libedit
-	>=dev-libs/protobuf-3.8:=
-	dev-libs/libevent:=
-	net-libs/libtirpc:=
-	>=sys-libs/zlib-1.2.3:0=
-	cjk? ( app-text/mecab:= )
-	jemalloc? ( dev-libs/jemalloc:0= )
-	kernel_linux? (
-		dev-libs/libaio:0=
-		sys-process/procps:0=
-	)
-	libressl? ( dev-libs/libressl:0= )
-	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-	numa? ( sys-process/numactl )
-	tcmalloc? ( dev-util/google-perftools:0= )
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	net-libs/rpcsvc-proto
-	virtual/yacc
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	selinux? ( sec-policy/selinux-mysql )
-	!prefix? (
-		acct-group/mysql acct-user/mysql
-		dev-db/mysql-init-scripts
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-CHECKREQS_DISK_BUILD="8G"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} == binary ]] && return
-	use server && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if has test ${FEATURES} ; then
-		# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-		# localhost. Also causes weird failures.
-		[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-		if ! has userpriv ${FEATURES} ; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-
-		local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-		[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-			&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-		if use latin1 ; then
-			# Upstream only supports tests with default charset
-			die "Testing with USE=latin1 is not supported."
-		fi
-	fi
-
-	if use kernel_linux ; then
-		if use numa ; then
-			linux-info_get_any_version
-
-			local CONFIG_CHECK="~NUMA"
-
-			local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-			WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-			check_extra_config
-		fi
-	fi
-
-	use server && check-reqs_pkg_setup
-}
-
-src_unpack() {
-	unpack ${A}
-
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
-}
-
-src_prepare() {
-	# Avoid rpm call which would trigger sandbox, #692368
-	sed -i \
-		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
-		CMakeLists.txt || die
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove man pages for client-lib tools we don't install
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	cmake-utils_src_prepare
-}
-
-src_configure(){
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		-DWITH_EDITLINE=system
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-		-DWITH_ROUTER=$(usex router ON OFF)
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-
-	# client/mysql.cc:1131:16: error: redefinition of ‘struct _hist_entry’
-	mycmakeargs+=(
-		-DUSE_LIBEDIT_INTERFACE=0
-		-DUSE_NEW_EDITLINE_INTERFACE=1
-		-DHAVE_HIST_ENTRY=1
-	)
-
-	mycmakeargs+=(
-		-DWITH_ICU=system
-		-DWITH_LIBEVENT=system
-		-DWITH_LZ4=system
-		-DWITH_PROTOBUF=system
-		-DWITH_MECAB=$(usex cjk system OFF)
-		-DWITH_NUMA=$(usex numa ON OFF)
-		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
-		-DWITH_RAPIDJSON=bundled
-	)
-
-	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
-		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-		ewarn "You MUST file bugs without these variables set."
-		ewarn "Tests will probably fail!"
-
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-		)
-	elif use latin1 ; then
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=latin1
-			-DDEFAULT_COLLATION=latin1_swedish_ci
-		)
-	else
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=utf8mb4
-			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
-		)
-	fi
-
-	if use server ; then
-		mycmakeargs+=(
-			-DWITH_EXTRA_CHARSETS=all
-			-DWITH_DEBUG=$(usex debug)
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_SYSTEMD=no
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='perl server' \
-# FEATURES='test userpriv' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname bug reason
-		rawtestname="${1}" ; shift
-		bug="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
-		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	else
-		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-
-	local -a disabled_tests
-	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges")
-	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet")
-	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet")
-	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
-	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
-	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
-
-	local test_ds
-	for test_infos_str in "${disabled_tests[@]}" ; do
-		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
-		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
-			die "Invalid test data set, not matching format: ${test_infos_str}"
-		fi
-
-		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
-	done
-	unset test_ds test_infos_str test_infos_arr
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	mycnf_src="my.cnf-8.0.distro-server"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR}/${mycnf_src}" \
-		> "${TMPDIR}/my.cnf.ok" || die
-
-	if use prefix ; then
-		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8mb4|latin1|g" \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	eprefixify "${TMPDIR}/my.cnf.ok"
-
-	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-
-	if use router ; then
-		rm -rf \
-			"${ED}/usr/LICENSE.router" \
-			"${ED}/usr/README.router" \
-			"${ED}/usr/run" \
-			"${ED}/usr/var" \
-			|| die
-	fi
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	# NOTE: $MY_LOGDIR contains $EPREFIX by default
-	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-
-	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-		einfo
-		elog "You might want to run:"
-		elog "  \"emerge --config =${CATEGORY}/${PF}\""
-		elog "if this is a new install."
-		einfo
-	else
-		einfo
-		elog "Upgrade process for ${PN}-8.x has changed. Please read"
-		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
-		einfo
-	fi
-}
-
-pkg_config() {
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	einfo "Will use username '${MYSQL_USER}' and group '${MYSQL_GROUP}' ..."
-
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	else
-		einfo "${PN} data directory detected as '${MY_DATADIR}' ..."
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]]; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" ]] ; then
-		local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_tmpdir_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_tmpdir_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]]; then
-			die "${MYSQL_USER} user cannot write into data directory '${MYSQL_TMPDIR}'!"
-		else
-			rm "${_my_tmpdir_testfile}" || die
-			unset _my_tmpdir_testfile
-		fi
-	else
-		# If no tmpdir is set, mysqld will use default system tmpdir.
-		# However, we are using tmpdir from package manager at the
-		# moment which maybe isn't writeable for $MYSQL_USER...
-		MYSQL_TMPDIR="$(_mktemp_dry "${T}/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]]; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]]; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local -a config_files
-
-	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
-	fi
-
-	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
-	fi
-
-	if [[ ${#config_files[@]} -gt 0 ]] ; then
-		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
-			local user_answer
-
-			echo
-			einfo "Please select default authentication plugin (enter number or plugin name):"
-			einfo "1) caching_sha2_password [MySQL 8.0 default]"
-			einfo "2) mysql_native_password [MySQL 5.7 default]"
-			einfo
-			einfo "For details see:"
-			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
-			read -p "    >" user_answer
-			echo
-
-			case "${user_answer}" in
-				1|caching_sha2_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
-					;;
-				2|mysql_native_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
-					;;
-				'')
-					die "No authentication plugin selected!"
-					;;
-				*)
-					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
-					;;
-			esac
-
-			unset user_answer
-		fi
-
-		local cfg_option cfg_option_tabs cfg_section
-		for config_file in "${config_files[@]}" ; do
-			cfg_option="default-authentication-plugin"
-			cfg_section="mysqld"
-			cfg_option_tabs="\t\t"
-			if [[ "${config_file}" == *client.cnf ]] ; then
-				cfg_option="default-auth"
-				cfg_section="client"
-				cfg_option_tabs="\t\t\t\t"
-			fi
-
-			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
-				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
-					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
-			else
-				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
-					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
-			fi
-		done
-		unset cfg_option cfg_option_tabs cfg_section
-	fi
-	unset config_files config_file
-
-	echo
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="${TMPDIR}/tz.sql"
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	chown ${MYSQL_USER} "${tz_sql}" || die
-
-	local mysql_install_log="${TMPDIR}/mysql_install_db.log"
-	touch "${mysql_install_log}" || die
-	chown ${MYSQL_USER} "${mysql_install_log}" || die
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	local x=${RANDOM}
-	local socket="${EROOT}/run/mysqld/mysqld${x}.sock"
-	local pidfile="${EROOT}/run/mysqld/mysqld${x}.pid"
-	unset x
-
-	local mysqld_logfile="${TMPDIR}/mysqld.log"
-	touch "${mysqld_logfile}" || die
-	chown ${MYSQL_USER} "${mysqld_logfile}" || die
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2020-01-20 19:26 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2020-01-20 19:26 UTC (permalink / raw
  To: gentoo-commits

commit:     48eb9d3cb6acd7c28b15c8660e4eb88961349d6f
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 20 19:22:15 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Jan 20 19:26:30 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48eb9d3c

dev-db/mysql: bump to v8.0.19

Closes: https://bugs.gentoo.org/697940
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-8.0.19.ebuild | 1120 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1122 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 763dd42cd61..8291d03804b 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,6 +3,8 @@ DIST mysql-5.6.45.tar.gz 32525559 BLAKE2B 3c629aed1de808acdea6654c7413e6851507c9
 DIST mysql-boost-5.7.26.tar.gz 51098338 BLAKE2B 1263cd75814a7293b26b0f44fd2b7d20d983f3c6a62725df9515ecac2ef252f6644810cb4bf0d6f36b98e55317f1c67ea7541228cb38d896dfedc476a5755f26 SHA512 a5f9871dc5a8e5fffc1467c3dd542533a63fe553c029120475f8fd5530d884c76ab0c33ad260daf317faf318ccef01464f6ac2dc3468efceb6bf2b6c06c54cfd
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 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-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST mysql-extras-20191016-1722Z.tar.bz2 340442 BLAKE2B fa38fc455693b940cfb96f69a35c190f7edb3fdfa7bf0e3f4e444032843ca1ad1d4767fecaf3b080f7f8885335ffe81f2355e9fe0fdebe77ac90d7fb1a0d2121 SHA512 1b4d3fb1cda63471807e37ecdd6a663672149a9eac9497d6b864a9ecdd57d179950176da2db0668892567994bd2fc1e98ea499f16dc689738331a1e319c9131c
+DIST mysql-extras-20200120-1919Z.tar.bz2 342474 BLAKE2B 9c75ec0cb05fc8f86d46bc9308f07c4105c3ab228ef94c0e9e2ab9b83d03362e4ef07c4dac866350ea012c03c111e7012e0b12270b30304a988b9b54bad74864 SHA512 2739c193e9595781b742af9fdb6e0f9c9a5fde87ca652c355d3f630c8c0b45b45967e5c8cf7635fb8615174775e34ae3270b149de7ba8a9d778979c2c66069ef

diff --git a/dev-db/mysql/mysql-8.0.19.ebuild b/dev-db/mysql/mysql-8.0.19.ebuild
new file mode 100644
index 00000000000..9d486bdb84a
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.19.ebuild
@@ -0,0 +1,1120 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+MY_EXTRAS_VER="20200120-1919Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit cmake-utils flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs check-reqs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+	router selinux +server tcmalloc test"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	cjk? ( server )
+	jemalloc? ( server )
+	numa? ( server )
+	profiling? ( server )
+	router? ( server )
+	tcmalloc? ( server )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-8.0.17.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-8.0.18.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.19-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.19-fix-libressl-support.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.19-fix-events_bugs-test.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	>=app-arch/lz4-0_p131:=
+	dev-libs/libedit
+	>=sys-libs/zlib-1.2.3:0=
+	libressl? ( dev-libs/libressl:0= )
+	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	server? (
+		dev-libs/icu:=
+		dev-libs/libevent:=
+		>=dev-libs/protobuf-3.8:=
+		net-libs/libtirpc:=
+		cjk? ( app-text/mecab:= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		jemalloc? ( dev-libs/jemalloc:0= )
+		tcmalloc? ( dev-util/google-perftools:0= )
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	virtual/yacc
+	server? ( net-libs/rpcsvc-proto )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	selinux? ( sec-policy/selinux-mysql )
+	!prefix? (
+		acct-group/mysql acct-user/mysql
+		dev-db/mysql-init-scripts
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+CHECKREQS_DISK_BUILD="8G"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} == binary ]] && return
+	use server && check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if has test ${FEATURES} ; then
+		# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+		# localhost. Also causes weird failures.
+		[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+		if ! has userpriv ${FEATURES} ; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+
+		local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+		[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+			&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+		if use latin1 ; then
+			# Upstream only supports tests with default charset
+			die "Testing with USE=latin1 is not supported."
+		fi
+	fi
+
+	if use kernel_linux ; then
+		if use numa ; then
+			linux-info_get_any_version
+
+			local CONFIG_CHECK="~NUMA"
+
+			local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+			WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+			check_extra_config
+		fi
+	fi
+
+	use server && check-reqs_pkg_setup
+}
+
+src_unpack() {
+	unpack ${A}
+
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+	# Avoid rpm call which would trigger sandbox, #692368
+	sed -i \
+		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+		CMakeLists.txt || die
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove man pages for client-lib tools we don't install
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	cmake-utils_src_prepare
+}
+
+src_configure(){
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		-DWITH_EDITLINE=system
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+		-DWITH_ROUTER=$(usex router ON OFF)
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+	mycmakeargs+=(
+		-DWITH_ICU=system
+		-DWITH_LZ4=system
+		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+		-DWITH_RAPIDJSON=bundled
+	)
+
+	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+		ewarn "You MUST file bugs without these variables set."
+		ewarn "Tests will probably fail!"
+
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+		)
+	elif use latin1 ; then
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=latin1
+			-DDEFAULT_COLLATION=latin1_swedish_ci
+		)
+	else
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=utf8mb4
+			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+		)
+	fi
+
+	if use server ; then
+		mycmakeargs+=(
+			-DWITH_EXTRA_CHARSETS=all
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_LIBEVENT=system
+			-DWITH_PROTOBUF=system
+			-DWITH_NUMA=$(usex numa ON OFF)
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_SYSTEMD=no
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='perl server' \
+# FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname bug reason
+		rawtestname="${1}" ; shift
+		bug="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+
+	local -a disabled_tests
+	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges")
+	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet")
+	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet")
+	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
+
+	local test_ds
+	for test_infos_str in "${disabled_tests[@]}" ; do
+		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+			die "Invalid test data set, not matching format: ${test_infos_str}"
+		fi
+
+		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+	done
+	unset test_ds test_infos_str test_infos_arr
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	mycnf_src="my.cnf-8.0.distro-server"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR}/${mycnf_src}" \
+		> "${TMPDIR}/my.cnf.ok" || die
+
+	if use prefix ; then
+		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8mb4|latin1|g" \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	eprefixify "${TMPDIR}/my.cnf.ok"
+
+	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+	if use router ; then
+		rm -rf \
+			"${ED}/usr/LICENSE.router" \
+			"${ED}/usr/README.router" \
+			"${ED}/usr/run" \
+			"${ED}/usr/var" \
+			|| die
+	fi
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	# NOTE: $MY_LOGDIR contains $EPREFIX by default
+	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		einfo
+		elog "You might want to run:"
+		elog "  \"emerge --config =${CATEGORY}/${PF}\""
+		elog "if this is a new install."
+		einfo
+	else
+		einfo
+		elog "Upgrade process for ${PN}-8.x has changed. Please read"
+		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+		einfo
+	fi
+}
+
+pkg_config() {
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	einfo "Will use username '${MYSQL_USER}' and group '${MYSQL_GROUP}' ..."
+
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	else
+		einfo "${PN} data directory detected as '${MY_DATADIR}' ..."
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]]; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" ]] ; then
+		local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_tmpdir_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_tmpdir_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]]; then
+			die "${MYSQL_USER} user cannot write into data directory '${MYSQL_TMPDIR}'!"
+		else
+			rm "${_my_tmpdir_testfile}" || die
+			unset _my_tmpdir_testfile
+		fi
+	else
+		# If no tmpdir is set, mysqld will use default system tmpdir.
+		# However, we are using tmpdir from package manager at the
+		# moment which maybe isn't writeable for $MYSQL_USER...
+		MYSQL_TMPDIR="$(_mktemp_dry "${T}/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]]; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]]; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local -a config_files
+
+	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+	fi
+
+	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+	fi
+
+	if [[ ${#config_files[@]} -gt 0 ]] ; then
+		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+			local user_answer
+
+			echo
+			einfo "Please select default authentication plugin (enter number or plugin name):"
+			einfo "1) caching_sha2_password [MySQL 8.0 default]"
+			einfo "2) mysql_native_password [MySQL 5.7 default]"
+			einfo
+			einfo "For details see:"
+			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+			read -p "    >" user_answer
+			echo
+
+			case "${user_answer}" in
+				1|caching_sha2_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+					;;
+				2|mysql_native_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+					;;
+				'')
+					die "No authentication plugin selected!"
+					;;
+				*)
+					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+					;;
+			esac
+
+			unset user_answer
+		fi
+
+		local cfg_option cfg_option_tabs cfg_section
+		for config_file in "${config_files[@]}" ; do
+			cfg_option="default-authentication-plugin"
+			cfg_section="mysqld"
+			cfg_option_tabs="\t\t"
+			if [[ "${config_file}" == *client.cnf ]] ; then
+				cfg_option="default-auth"
+				cfg_section="client"
+				cfg_option_tabs="\t\t\t\t"
+			fi
+
+			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+			else
+				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+			fi
+		done
+		unset cfg_option cfg_option_tabs cfg_section
+	fi
+	unset config_files config_file
+
+	echo
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="${TMPDIR}/tz.sql"
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	chown ${MYSQL_USER} "${tz_sql}" || die
+
+	local mysql_install_log="${TMPDIR}/mysql_install_db.log"
+	touch "${mysql_install_log}" || die
+	chown ${MYSQL_USER} "${mysql_install_log}" || die
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	local x=${RANDOM}
+	local socket="${EROOT}/run/mysqld/mysqld${x}.sock"
+	local pidfile="${EROOT}/run/mysqld/mysqld${x}.pid"
+	unset x
+
+	local mysqld_logfile="${TMPDIR}/mysqld.log"
+	touch "${mysqld_logfile}" || die
+	chown ${MYSQL_USER} "${mysqld_logfile}" || die
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-12-31  3:30 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-12-31  3:30 UTC (permalink / raw
  To: gentoo-commits

commit:     dde52178bc1401447dc0e7c98524e7b454f4d67e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 03:23:16 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Dec 31 03:27:23 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dde52178

dev-db/mysql: drop old

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

 dev-db/mysql/Manifest            |    1 -
 dev-db/mysql/mysql-8.0.17.ebuild | 1105 --------------------------------------
 2 files changed, 1106 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 1a194d5ea31..763dd42cd61 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -2,7 +2,6 @@ DIST mysql-5.6.44.tar.gz 32531507 BLAKE2B 28fbf49f699eb9f43223ffa186671b119d1601
 DIST mysql-5.6.45.tar.gz 32525559 BLAKE2B 3c629aed1de808acdea6654c7413e6851507c9c5be939ca4b4f5e2796da317e9b518a749bfc03d2b0ef05bd604b39f72e24b751076b9f206b462d21fa5db4f50 SHA512 f9d8bb72e96cc83f1064fe7df2e5fe8317ca9d44c4e776cf7827a61292fbcfccec716806c80d565958383d78fef93a19d61c726687b57680d5f93299291ff168
 DIST mysql-boost-5.7.26.tar.gz 51098338 BLAKE2B 1263cd75814a7293b26b0f44fd2b7d20d983f3c6a62725df9515ecac2ef252f6644810cb4bf0d6f36b98e55317f1c67ea7541228cb38d896dfedc476a5755f26 SHA512 a5f9871dc5a8e5fffc1467c3dd542533a63fe553c029120475f8fd5530d884c76ab0c33ad260daf317faf318ccef01464f6ac2dc3468efceb6bf2b6c06c54cfd
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
-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-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8

diff --git a/dev-db/mysql/mysql-8.0.17.ebuild b/dev-db/mysql/mysql-8.0.17.ebuild
deleted file mode 100644
index 349e399bee8..00000000000
--- a/dev-db/mysql/mysql-8.0.17.ebuild
+++ /dev/null
@@ -1,1105 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-MY_EXTRAS_VER="20190817-0024Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit cmake-utils flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs
-
-MY_PV="${PV//_pre*}"
-MY_P="${PN}-${MY_PV}"
-
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
-	router selinux tcmalloc test"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!test? ( test ) libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-8.0.17.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-8.0.17.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.17-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.17-add-protobuf-3.8+-support.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.17-fix-libressl-support.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	>=app-arch/lz4-0_p131:=
-	dev-libs/icu:=
-	dev-libs/libedit
-	dev-libs/libevent:=
-	net-libs/libtirpc:=
-	>=sys-libs/zlib-1.2.3:0=
-	cjk? ( app-text/mecab:= )
-	jemalloc? ( dev-libs/jemalloc:0= )
-	kernel_linux? (
-		dev-libs/libaio:0=
-		sys-process/procps:0=
-	)
-	numa? ( sys-process/numactl )
-	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-	libressl? ( dev-libs/libressl:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/re2
-	>=dev-libs/protobuf-3.8
-	net-libs/rpcsvc-proto
-	virtual/yacc
-	test? (
-		acct-group/mysql acct-user/mysql
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	selinux? ( sec-policy/selinux-mysql )
-	!prefix? (
-		acct-group/mysql acct-user/mysql
-		dev-db/mysql-init-scripts
-	)
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-	MY_DATADIR="${MY_LOCALSTATEDIR}"
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_setup() {
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if has test ${FEATURES} ; then
-		# Bug #213475 - MySQL _will_ object strenuously if your machine is named
-		# localhost. Also causes weird failures.
-		[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-		if ! has userpriv ${FEATURES} ; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-
-		local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-		[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
-			&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
-		if use latin1 ; then
-			# Upstream only supports tests with default charset
-			die "Testing with USE=latin1 is not supported."
-		fi
-	fi
-
-	if use kernel_linux ; then
-		if use numa ; then
-			linux-info_get_any_version
-
-			local CONFIG_CHECK="~NUMA"
-
-			local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-			WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-			check_extra_config
-		fi
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
-}
-
-src_prepare() {
-	# Avoid rpm call which would trigger sandbox, #692368
-	sed -i \
-		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
-		CMakeLists.txt || die
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove man pages for client-lib tools we don't install
-	rm \
-		man/my_print_defaults.1 \
-		man/perror.1 \
-		man/zlib_decompress.1 \
-		|| die
-
-	cmake-utils_src_prepare
-}
-
-src_configure(){
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		-DWITH_EDITLINE=system
-		-DWITH_ZLIB=system
-		-DWITH_SSL=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-		-DWITH_ROUTER=$(usex router ON OFF)
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-
-	# client/mysql.cc:1131:16: error: redefinition of ‘struct _hist_entry’
-	mycmakeargs+=(
-		-DUSE_LIBEDIT_INTERFACE=0
-		-DUSE_NEW_EDITLINE_INTERFACE=1
-		-DHAVE_HIST_ENTRY=1
-	)
-
-	mycmakeargs+=(
-		-DWITH_ICU=system
-		-DWITH_RE2=system
-		-DWITH_LIBEVENT=system
-		-DWITH_LZ4=system
-		-DWITH_PROTOBUF=system
-		-DWITH_MECAB=$(usex cjk system OFF)
-		-DWITH_NUMA=$(usex numa ON OFF)
-		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
-		-DWITH_RAPIDJSON=bundled
-	)
-
-	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
-		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-		ewarn "You MUST file bugs without these variables set."
-		ewarn "Tests will probably fail!"
-
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-		)
-	elif use latin1 ; then
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=latin1
-			-DDEFAULT_COLLATION=latin1_swedish_ci
-		)
-	else
-		mycmakeargs+=(
-			-DDEFAULT_CHARSET=utf8mb4
-			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
-		)
-	fi
-
-	mycmakeargs+=(
-		-DWITH_EXTRA_CHARSETS=all
-		-DDISABLE_SHARED=NO
-		-DWITH_DEBUG=$(usex debug)
-	)
-
-	if use profiling ; then
-		# Setting to OFF doesn't work: Once set, profiling options will be added
-		# to `mysqld --help` output via sql/sys_vars.cc causing
-		# "main.mysqld--help-notwin" test to fail
-		mycmakeargs+=( -DENABLED_PROFILING=ON )
-	fi
-
-	# Storage engines
-	mycmakeargs+=(
-		-DWITH_EXAMPLE_STORAGE_ENGINE=0
-		-DWITH_ARCHIVE_STORAGE_ENGINE=1
-		-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-		-DWITH_CSV_STORAGE_ENGINE=1
-		-DWITH_FEDERATED_STORAGE_ENGINE=1
-		-DWITH_HEAP_STORAGE_ENGINE=1
-		-DWITH_INNOBASE_STORAGE_ENGINE=1
-		-DWITH_INNODB_MEMCACHED=0
-		-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-		-DWITH_MYISAM_STORAGE_ENGINE=1
-	)
-
-	cmake-utils_src_configure
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='perl server' \
-# FEATURES='test userpriv' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname bug reason
-		rawtestname="${1}" ; shift
-		bug="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
-		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
-	if [[ -z "${MTR_PARALLEL}" ]] ; then
-		local -x MTR_PARALLEL=$(makeopts_jobs)
-
-		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
-			# Running multiple tests in parallel usually require higher ulimit
-			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
-			# are known to hit timeout when system is busy.
-			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
-			# using "auto".
-			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
-			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
-			einfo "${info_msg}"
-			unset info_msg
-			MTR_PARALLEL=4
-		fi
-	fi
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-
-	local -a disabled_tests
-	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges")
-	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "main.mysqlslap;1253001;Known failure - no upstream bug yet (RH)" )
-	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet")
-	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet")
-	disabled_tests+=( "perfschema.idx_threads;0;Know failure - no upstream bug yet" )
-	disabled_tests+=( "perfschema.idx_session_connect_attrs;0;Know failure - no upstream bug yet" )
-	disabled_tests+=( "perfschema.idx_session_account_connect_attrs;0;Know failure - no upstream bug yet" )
-	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
-	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Know failure - no upstream bug yet" )
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
-	disabled_tests+=( "x.connection;0;Know failure - no upstream bug yet" )
-
-	local test_ds
-	for test_infos_str in "${disabled_tests[@]}" ; do
-		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
-		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
-			die "Invalid test data set, not matching format: ${test_infos_str}"
-		fi
-
-		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
-	done
-	unset test_ds test_infos_str test_infos_arr
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	mycnf_src="my.cnf-8.0.distro-server"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR}/${mycnf_src}" \
-		> "${TMPDIR}/my.cnf.ok" || die
-
-	if use prefix ; then
-		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8mb4|latin1|g" \
-			"${TMPDIR}/my.cnf.ok" || die
-	fi
-
-	eprefixify "${TMPDIR}/my.cnf.ok"
-
-	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-
-	if use router ; then
-		rm -rf \
-			"${ED}/usr/LICENSE.router" \
-			"${ED}/usr/README.router" \
-			"${ED}/usr/run" \
-			"${ED}/usr/var" \
-			|| die
-	fi
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	# NOTE: $MY_LOGDIR contains $EPREFIX by default
-	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-
-	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-		einfo
-		elog "You might want to run:"
-		elog "  \"emerge --config =${CATEGORY}/${PF}\""
-		elog "if this is a new install."
-		einfo
-	else
-		einfo
-		elog "Upgrade process for ${PN}-8.x has changed. Please read"
-		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
-		einfo
-	fi
-}
-
-pkg_config() {
-	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
-	if [[ ! -x "${mysqld_binary}" ]] ; then
-		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local mysql_binary="${EROOT}/usr/bin/mysql"
-	if [[ ! -x "${mysql_binary}" ]] ; then
-		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
-	fi
-
-	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
-	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
-		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
-	fi
-
-	if [[ -z "${MYSQL_USER}" ]] ; then
-		MYSQL_USER=mysql
-		if use prefix ; then
-			MYSQL_USER=$(id -u -n 2>/dev/null)
-			if [[ -z "${MYSQL_USER}" ]] ; then
-				die "Failed to determine current username!"
-			fi
-		fi
-	fi
-
-	if [[ -z "${MYSQL_GROUP}" ]] ; then
-		MYSQL_GROUP=mysql
-		if use prefix ; then
-			MYSQL_GROUP=$(id -g -n 2>/dev/null)
-			if [[ -z "${MYSQL_GROUP}" ]] ; then
-				die "Failed to determine current user groupname!"
-			fi
-		fi
-	fi
-
-	einfo "Will use username '${MYSQL_USER}' and group '${MYSQL_GROUP}' ..."
-
-	_getoptval() {
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		local cmd=(
-			"${my_print_defaults_binary}"
-			"${extra_options}"
-			"${section}"
-		)
-		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
-		if [[ ${#results[@]} -gt 0 ]] ; then
-			# When option is set multiple times only return last value
-			echo "${results[-1]}"
-		fi
-	}
-
-	_mktemp_dry() {
-		# emktemp has no --dry-run option
-		local template="${1}"
-
-		if [[ -z "${template}" ]] ; then
-			if [[ -z "${T}" ]] ; then
-				template="/tmp/XXXXXXX"
-			else
-				template="${T}/XXXXXXX"
-			fi
-		fi
-
-		local template_wo_X=${template//X/}
-		local n_X
-		let n_X=${#template}-${#template_wo_X}
-		if [[ ${n_X} -lt 3 ]] ; then
-			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
-			return
-		fi
-
-		local attempts=0
-		local character tmpfile
-		while [[ true ]] ; do
-			let attempts=attempts+1
-
-			new_file=
-			while read -n1 character ; do
-				if [[ "${character}" == "X" ]] ; then
-					tmpfile+="${RANDOM:0:1}"
-				else
-					tmpfile+="${character}"
-				fi
-			done < <(echo -n "${template}")
-
-			if [[ ! -f "${tmpfile}" ]]
-			then
-				echo "${tmpfile}"
-				return
-			fi
-
-			if [[ ${attempts} -ge 100 ]] ; then
-				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
-				return
-			fi
-		done
-	}
-
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	local -x HOME="${EROOT}/root"
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Read currently set data directory
-	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
-		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
-	else
-		einfo "${PN} data directory detected as '${MY_DATADIR}' ..."
-	fi
-
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
-	# Create missing directories.
-	# Always check if mysql user can write to directory even if we just
-	# created directory because a parent directory might be not
-	# accessible for that user.
-	PID_DIR="${EROOT}/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
-			|| die "Failed to create PID directory '${PID_DIR}'!"
-	fi
-
-	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_pid_dir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_pid_dir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]] ; then
-		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
-	else
-		rm "${_pid_dir_testfile}" || die
-		unset _pid_dir_testfile
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
-			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
-	fi
-
-	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
-	[[ -z "${_my_datadir_testfile}" ]] \
-		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-	if use prefix ; then
-		touch "${_my_datadir_testfile}" &>/dev/null
-	else
-		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
-	fi
-
-	if [[ $? -ne 0 ]]; then
-		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
-	else
-		rm "${_my_datadir_testfile}" || die
-		unset _my_datadir_testfile
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
-			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
-	fi
-
-	if [[ -n "${MYSQL_TMPDIR}" ]] ; then
-		local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_tmpdir_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_tmpdir_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]]; then
-			die "${MYSQL_USER} user cannot write into data directory '${MYSQL_TMPDIR}'!"
-		else
-			rm "${_my_tmpdir_testfile}" || die
-			unset _my_tmpdir_testfile
-		fi
-	else
-		# If no tmpdir is set, mysqld will use default system tmpdir.
-		# However, we are using tmpdir from package manager at the
-		# moment which maybe isn't writeable for $MYSQL_USER...
-		MYSQL_TMPDIR="$(_mktemp_dry "${T}/mysqld-tmp.XXXXXXXXX")"
-		[[ -z "${MYSQL_TMPDIR}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
-		mkdir "${MYSQL_TMPDIR}" || die
-		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
-	fi
-
-	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_logbin_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_logbin_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]]; then
-			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
-		else
-			rm "${_my_logbin_testfile}" || die
-			unset _my_logbin_testfile
-		fi
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
-		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
-			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
-	fi
-
-	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
-		[[ -z "${_my_relaylog_testfile}" ]] \
-			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
-		if use prefix ; then
-			touch "${_my_relaylog_testfile}" &>/dev/null
-		else
-			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
-		fi
-
-		if [[ $? -ne 0 ]]; then
-			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
-		else
-			rm "${_my_relaylog_testfile}" || die
-			unset _my_relaylog_testfile
-		fi
-	fi
-
-	local -a config_files
-
-	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
-	fi
-
-	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
-	if [[ -f "${config_file}" ]] ; then
-		config_files+=( "${config_file}" )
-	else
-		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
-	fi
-
-	if [[ ${#config_files[@]} -gt 0 ]] ; then
-		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
-			local user_answer
-
-			echo
-			einfo "Please select default authentication plugin (enter number or plugin name):"
-			einfo "1) caching_sha2_password [MySQL 8.0 default]"
-			einfo "2) mysql_native_password [MySQL 5.7 default]"
-			einfo
-			einfo "For details see:"
-			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
-			read -p "    >" user_answer
-			echo
-
-			case "${user_answer}" in
-				1|caching_sha2_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
-					;;
-				2|mysql_native_password)
-					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
-					;;
-				'')
-					die "No authentication plugin selected!"
-					;;
-				*)
-					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
-					;;
-			esac
-
-			unset user_answer
-		fi
-
-		local cfg_option cfg_option_tabs cfg_section
-		for config_file in "${config_files[@]}" ; do
-			cfg_option="default-authentication-plugin"
-			cfg_section="mysqld"
-			cfg_option_tabs="\t\t"
-			if [[ "${config_file}" == *client.cnf ]] ; then
-				cfg_option="default-auth"
-				cfg_section="client"
-				cfg_option_tabs="\t\t\t\t"
-			fi
-
-			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
-				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
-					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
-			else
-				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
-				sed -i \
-					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
-					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
-			fi
-		done
-		unset cfg_option cfg_option_tabs cfg_section
-	fi
-	unset config_files config_file
-
-	echo
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local pwd1="a"
-		local pwd2="b"
-
-		echo
-		einfo "No password for mysql 'root' user was specified via environment"
-		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
-		einfo "file like '${HOME}/.my.cnf'."
-		einfo "To continue please provide a password for the mysql 'root' user"
-		einfo "now on console:"
-		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same!"
-		fi
-
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-
-		echo
-	fi
-
-	local -a mysqld_options
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-
-	local opt optexp optfull
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-	; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
-	done
-
-	# Prepare timezones, see
-	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	local tz_sql="${TMPDIR}/tz.sql"
-	echo "USE mysql;" >"${tz_sql}"
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
-	if [[ $? -ne 0 ]] ; then
-		die "mysql_tzinfo_to_sql failed!"
-	fi
-
-	chown ${MYSQL_USER} "${tz_sql}" || die
-
-	local mysql_install_log="${TMPDIR}/mysql_install_db.log"
-	touch "${mysql_install_log}" || die
-	chown ${MYSQL_USER} "${mysql_install_log}" || die
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--initialize-insecure"
-		"--init-file='${tz_sql}'"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		"--log-error='${mysql_install_log}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
-	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
-		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
-	fi
-
-	local x=${RANDOM}
-	local socket="${EROOT}/run/mysqld/mysqld${x}.sock"
-	local pidfile="${EROOT}/run/mysqld/mysqld${x}.pid"
-	unset x
-
-	local mysqld_logfile="${TMPDIR}/mysqld.log"
-	touch "${mysqld_logfile}" || die
-	chown ${MYSQL_USER} "${mysqld_logfile}" || die
-
-	cmd=(
-		"${mysqld_binary}"
-		"${mysqld_options[@]}"
-		"--basedir='${EROOT}/usr'"
-		"--datadir='${MY_DATADIR}'"
-		"--tmpdir='${MYSQL_TMPDIR}'"
-		--max_allowed_packet=8M
-		--net_buffer_length=16K
-		"--socket='${socket}'"
-		"--pid-file='${pidfile}'"
-		"--log-error='${mysqld_logfile}'"
-		"--user=${MYSQL_USER}"
-	)
-
-	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
-	echo -n "Waiting for mysqld to accept connections "
-	local maxtry=15
-	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-
-	if [[ -S "${socket}" ]] ; then
-		# Even with a socket we don't know if mysqld will abort
-		# start due to an error so just wait a little bit more...
-		maxtry=5
-		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-	fi
-
-	echo
-
-	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
-		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
-	fi
-
-	local mysql_logfile="${TMPDIR}/set_root_pw.log"
-	touch "${mysql_logfile}" || die
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
-	cmd=(
-		"${mysql_binary}"
-		--no-defaults
-		"--socket='${socket}'"
-		-hlocalhost
-		"-e \"${sql}\""
-	)
-	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
-	local rc=$?
-	eend ${rc}
-
-	if [[ ${rc} -ne 0 ]] ; then
-		# Poor man's solution which tries to avoid having password
-		# in log.  NOTE: sed can fail if user didn't follow advice
-		# and included character which will require escaping...
-		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
-		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
-	fi
-
-	# Stop the server
-	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-		echo -n "Stopping the server "
-		pkill -F "${pidfile}" &>/dev/null
-
-		maxtry=10
-		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
-			maxtry=$((${maxtry}-1))
-			echo -n "."
-			sleep 1
-		done
-
-		echo
-
-		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
-			# We somehow failed to stop server.
-			# However, not a fatal error. Just warn the user.
-			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
-		fi
-	fi
-
-	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-12-31  3:30 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-12-31  3:30 UTC (permalink / raw
  To: gentoo-commits

commit:     0885cd61b56f0dbe94129d243acb80a053493e82
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 03:26:23 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Dec 31 03:27:24 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0885cd61

dev-db/mysql: subscribe to dev-libs/protobuf subslot

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

 dev-db/mysql/mysql-8.0.18.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.18.ebuild b/dev-db/mysql/mysql-8.0.18.ebuild
index 90bf594c427..6b067a6f004 100644
--- a/dev-db/mysql/mysql-8.0.18.ebuild
+++ b/dev-db/mysql/mysql-8.0.18.ebuild
@@ -68,6 +68,7 @@ COMMON_DEPEND="
 	>=app-arch/lz4-0_p131:=
 	dev-libs/icu:=
 	dev-libs/libedit
+	>=dev-libs/protobuf-3.8:=
 	dev-libs/libevent:=
 	net-libs/libtirpc:=
 	>=sys-libs/zlib-1.2.3:0=
@@ -84,7 +85,6 @@ COMMON_DEPEND="
 "
 DEPEND="${COMMON_DEPEND}
 	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	>=dev-libs/protobuf-3.8
 	net-libs/rpcsvc-proto
 	virtual/yacc
 	test? (


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-12-09 18:27 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2019-12-09 18:27 UTC (permalink / raw
  To: gentoo-commits

commit:     8b7bcecb3d33a72c03dfbbc1dea4d70daef45c4f
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Dec  9 18:21:55 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Dec  9 18:21:55 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b7bcecb

dev-db/mysql: stable 5.7.27-r1 for ia64, bug #693814

Package-Manager: Portage-2.3.81, Repoman-2.3.20
RepoMan-Options: --include-arches="ia64"
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.27-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.27-r1.ebuild b/dev-db/mysql/mysql-5.7.27-r1.ebuild
index d1584c591b8..98a8e29d49e 100644
--- a/dev-db/mysql/mysql-5.7.27-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r1.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-12-09 18:27 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2019-12-09 18:27 UTC (permalink / raw
  To: gentoo-commits

commit:     34204f02513d7f5c02673e06b6de1b0cd1bd724a
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Dec  9 18:21:47 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Dec  9 18:21:47 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34204f02

dev-db/mysql: stable 5.6.45-r2 for ia64, bug #693814

Package-Manager: Portage-2.3.81, Repoman-2.3.20
RepoMan-Options: --include-arches="ia64"
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.45-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.45-r2.ebuild b/dev-db/mysql/mysql-5.6.45-r2.ebuild
index 174b9eac6e4..d93ccfafd0b 100644
--- a/dev-db/mysql/mysql-5.6.45-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.45-r2.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-10-31  1:41 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-10-31  1:41 UTC (permalink / raw
  To: gentoo-commits

commit:     4063579617e0e9e250510946a3b12c0ed640189d
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 31 01:41:02 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Oct 31 01:41:23 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40635796

dev-db/mysql: backport some changes from percona-server package

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

 dev-db/mysql/mysql-8.0.18.ebuild | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.18.ebuild b/dev-db/mysql/mysql-8.0.18.ebuild
index 450b754c297..95f1b274f5c 100644
--- a/dev-db/mysql/mysql-8.0.18.ebuild
+++ b/dev-db/mysql/mysql-8.0.18.ebuild
@@ -77,9 +77,9 @@ COMMON_DEPEND="
 		dev-libs/libaio:0=
 		sys-process/procps:0=
 	)
-	numa? ( sys-process/numactl )
-	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
 	libressl? ( dev-libs/libressl:0= )
+	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	numa? ( sys-process/numactl )
 	tcmalloc? ( dev-util/google-perftools:0= )
 "
 DEPEND="${COMMON_DEPEND}
@@ -373,6 +373,8 @@ src_test() {
 			unset info_msg
 			MTR_PARALLEL=4
 		fi
+	else
+		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
 	fi
 
 	# create directories because mysqladmin might run out of order
@@ -395,12 +397,8 @@ src_test() {
 	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)")
 	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)")
 	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)")
-	disabled_tests+=( "main.mysqlslap;1253001;Known failure - no upstream bug yet (RH)" )
 	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet")
 	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet")
-	disabled_tests+=( "perfschema.idx_threads;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "perfschema.idx_session_connect_attrs;0;Known failure - no upstream bug yet" )
-	disabled_tests+=( "perfschema.idx_session_account_connect_attrs;0;Known failure - no upstream bug yet" )
 	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
 	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
 	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-10-16 17:33 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2019-10-16 17:33 UTC (permalink / raw
  To: gentoo-commits

commit:     64a7ec625f74ee03eccfed61921b0ece07ac26c8
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 16 17:33:00 2019 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Oct 16 17:33:00 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64a7ec62

dev-db/mysql: Version bump for 8.0.l8

Restore server USE as well

Closes: https://bugs.gentoo.org/697640
Package-Manager: Portage-2.3.77, Repoman-2.3.17
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>

 dev-db/mysql/Manifest            |    2 +
 dev-db/mysql/mysql-8.0.18.ebuild | 1119 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 1121 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index ef3ead138dc..1a194d5ea31 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,5 +3,7 @@ DIST mysql-5.6.45.tar.gz 32525559 BLAKE2B 3c629aed1de808acdea6654c7413e6851507c9
 DIST mysql-boost-5.7.26.tar.gz 51098338 BLAKE2B 1263cd75814a7293b26b0f44fd2b7d20d983f3c6a62725df9515ecac2ef252f6644810cb4bf0d6f36b98e55317f1c67ea7541228cb38d896dfedc476a5755f26 SHA512 a5f9871dc5a8e5fffc1467c3dd542533a63fe553c029120475f8fd5530d884c76ab0c33ad260daf317faf318ccef01464f6ac2dc3468efceb6bf2b6c06c54cfd
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 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-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
+DIST mysql-extras-20191016-1722Z.tar.bz2 340442 BLAKE2B fa38fc455693b940cfb96f69a35c190f7edb3fdfa7bf0e3f4e444032843ca1ad1d4767fecaf3b080f7f8885335ffe81f2355e9fe0fdebe77ac90d7fb1a0d2121 SHA512 1b4d3fb1cda63471807e37ecdd6a663672149a9eac9497d6b864a9ecdd57d179950176da2db0668892567994bd2fc1e98ea499f16dc689738331a1e319c9131c

diff --git a/dev-db/mysql/mysql-8.0.18.ebuild b/dev-db/mysql/mysql-8.0.18.ebuild
new file mode 100644
index 00000000000..450b754c297
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.18.ebuild
@@ -0,0 +1,1119 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+MY_EXTRAS_VER="20191016-1722Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit cmake-utils flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs check-reqs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+	router selinux +server tcmalloc test"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-8.0.17.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-8.0.18.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.18-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.17-add-protobuf-3.8+-support.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.18-fix-libressl-support.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	>=app-arch/lz4-0_p131:=
+	dev-libs/icu:=
+	dev-libs/libedit
+	dev-libs/libevent:=
+	net-libs/libtirpc:=
+	>=sys-libs/zlib-1.2.3:0=
+	cjk? ( app-text/mecab:= )
+	jemalloc? ( dev-libs/jemalloc:0= )
+	kernel_linux? (
+		dev-libs/libaio:0=
+		sys-process/procps:0=
+	)
+	numa? ( sys-process/numactl )
+	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	libressl? ( dev-libs/libressl:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	>=dev-libs/protobuf-3.8
+	net-libs/rpcsvc-proto
+	virtual/yacc
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	selinux? ( sec-policy/selinux-mysql )
+	!prefix? (
+		acct-group/mysql acct-user/mysql
+		dev-db/mysql-init-scripts
+	)
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+CHECKREQS_DISK_BUILD="8G"
+
+mysql_init_vars() {
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} == binary ]] && return
+	use server && check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if has test ${FEATURES} ; then
+		# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+		# localhost. Also causes weird failures.
+		[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+		if ! has userpriv ${FEATURES} ; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+
+		local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+		[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+			&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+		if use latin1 ; then
+			# Upstream only supports tests with default charset
+			die "Testing with USE=latin1 is not supported."
+		fi
+	fi
+
+	if use kernel_linux ; then
+		if use numa ; then
+			linux-info_get_any_version
+
+			local CONFIG_CHECK="~NUMA"
+
+			local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+			WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+			check_extra_config
+		fi
+	fi
+
+	use server && check-reqs_pkg_setup
+}
+
+src_unpack() {
+	unpack ${A}
+
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+	# Avoid rpm call which would trigger sandbox, #692368
+	sed -i \
+		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+		CMakeLists.txt || die
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove man pages for client-lib tools we don't install
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+	cmake-utils_src_prepare
+}
+
+src_configure(){
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		-DWITH_EDITLINE=system
+		-DWITH_ZLIB=system
+		-DWITH_SSL=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+		-DWITH_ROUTER=$(usex router ON OFF)
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+	# client/mysql.cc:1131:16: error: redefinition of ‘struct _hist_entry’
+	mycmakeargs+=(
+		-DUSE_LIBEDIT_INTERFACE=0
+		-DUSE_NEW_EDITLINE_INTERFACE=1
+		-DHAVE_HIST_ENTRY=1
+	)
+
+	mycmakeargs+=(
+		-DWITH_ICU=system
+		-DWITH_LIBEVENT=system
+		-DWITH_LZ4=system
+		-DWITH_PROTOBUF=system
+		-DWITH_MECAB=$(usex cjk system OFF)
+		-DWITH_NUMA=$(usex numa ON OFF)
+		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+		-DWITH_RAPIDJSON=bundled
+	)
+
+	if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+		ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+		ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+		ewarn "You MUST file bugs without these variables set."
+		ewarn "Tests will probably fail!"
+
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+			-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+		)
+	elif use latin1 ; then
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=latin1
+			-DDEFAULT_COLLATION=latin1_swedish_ci
+		)
+	else
+		mycmakeargs+=(
+			-DDEFAULT_CHARSET=utf8mb4
+			-DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+		)
+	fi
+
+	if use server ; then
+		mycmakeargs+=(
+			-DWITH_EXTRA_CHARSETS=all
+			-DWITH_DEBUG=$(usex debug)
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_SYSTEMD=no
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='perl server' \
+# FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname bug reason
+		rawtestname="${1}" ; shift
+		bug="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	fi
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+
+	local -a disabled_tests
+	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges")
+	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "main.mysqlslap;1253001;Known failure - no upstream bug yet (RH)" )
+	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet")
+	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet")
+	disabled_tests+=( "perfschema.idx_threads;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "perfschema.idx_session_connect_attrs;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "perfschema.idx_session_account_connect_attrs;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
+
+	local test_ds
+	for test_infos_str in "${disabled_tests[@]}" ; do
+		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+		if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+			die "Invalid test data set, not matching format: ${test_infos_str}"
+		fi
+
+		_disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+	done
+	unset test_ds test_infos_str test_infos_arr
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	mycnf_src="my.cnf-8.0.distro-server"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR}/${mycnf_src}" \
+		> "${TMPDIR}/my.cnf.ok" || die
+
+	if use prefix ; then
+		sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8mb4|latin1|g" \
+			"${TMPDIR}/my.cnf.ok" || die
+	fi
+
+	eprefixify "${TMPDIR}/my.cnf.ok"
+
+	newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+	if use router ; then
+		rm -rf \
+			"${ED}/usr/LICENSE.router" \
+			"${ED}/usr/README.router" \
+			"${ED}/usr/run" \
+			"${ED}/usr/var" \
+			|| die
+	fi
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	# NOTE: $MY_LOGDIR contains $EPREFIX by default
+	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		einfo
+		elog "You might want to run:"
+		elog "  \"emerge --config =${CATEGORY}/${PF}\""
+		elog "if this is a new install."
+		einfo
+	else
+		einfo
+		elog "Upgrade process for ${PN}-8.x has changed. Please read"
+		elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+		einfo
+	fi
+}
+
+pkg_config() {
+	local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+	if [[ ! -x "${mysqld_binary}" ]] ; then
+		die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local mysql_binary="${EROOT}/usr/bin/mysql"
+	if [[ ! -x "${mysql_binary}" ]] ; then
+		die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+	fi
+
+	local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+	if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+	fi
+
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	einfo "Will use username '${MYSQL_USER}' and group '${MYSQL_GROUP}' ..."
+
+	_getoptval() {
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+		if [[ ${#results[@]} -gt 0 ]] ; then
+			# When option is set multiple times only return last value
+			echo "${results[-1]}"
+		fi
+	}
+
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	local -x HOME="${EROOT}/root"
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		die "Sorry, unable to find MY_DATADIR!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+	else
+		einfo "${PN} data directory detected as '${MY_DATADIR}' ..."
+	fi
+
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	# These are dir+prefix
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+	# Create missing directories.
+	# Always check if mysql user can write to directory even if we just
+	# created directory because a parent directory might be not
+	# accessible for that user.
+	PID_DIR="${EROOT}/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+			|| die "Failed to create PID directory '${PID_DIR}'!"
+	fi
+
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]] ; then
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+	else
+		rm "${_pid_dir_testfile}" || die
+		unset _pid_dir_testfile
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
+	if [[ $? -ne 0 ]]; then
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+	else
+		rm "${_my_datadir_testfile}" || die
+		unset _my_datadir_testfile
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+	fi
+
+	if [[ -n "${MYSQL_TMPDIR}" ]] ; then
+		local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_tmpdir_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_tmpdir_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]]; then
+			die "${MYSQL_USER} user cannot write into data directory '${MYSQL_TMPDIR}'!"
+		else
+			rm "${_my_tmpdir_testfile}" || die
+			unset _my_tmpdir_testfile
+		fi
+	else
+		# If no tmpdir is set, mysqld will use default system tmpdir.
+		# However, we are using tmpdir from package manager at the
+		# moment which maybe isn't writeable for $MYSQL_USER...
+		MYSQL_TMPDIR="$(_mktemp_dry "${T}/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+	fi
+
+	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]]; then
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+		else
+			rm "${_my_logbin_testfile}" || die
+			unset _my_logbin_testfile
+		fi
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+	fi
+
+	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
+		if [[ $? -ne 0 ]]; then
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+		else
+			rm "${_my_relaylog_testfile}" || die
+			unset _my_relaylog_testfile
+		fi
+	fi
+
+	local -a config_files
+
+	local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+	fi
+
+	config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+	if [[ -f "${config_file}" ]] ; then
+		config_files+=( "${config_file}" )
+	else
+		ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+	fi
+
+	if [[ ${#config_files[@]} -gt 0 ]] ; then
+		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+			local user_answer
+
+			echo
+			einfo "Please select default authentication plugin (enter number or plugin name):"
+			einfo "1) caching_sha2_password [MySQL 8.0 default]"
+			einfo "2) mysql_native_password [MySQL 5.7 default]"
+			einfo
+			einfo "For details see:"
+			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+			read -p "    >" user_answer
+			echo
+
+			case "${user_answer}" in
+				1|caching_sha2_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+					;;
+				2|mysql_native_password)
+					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+					;;
+				'')
+					die "No authentication plugin selected!"
+					;;
+				*)
+					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+					;;
+			esac
+
+			unset user_answer
+		fi
+
+		local cfg_option cfg_option_tabs cfg_section
+		for config_file in "${config_files[@]}" ; do
+			cfg_option="default-authentication-plugin"
+			cfg_section="mysqld"
+			cfg_option_tabs="\t\t"
+			if [[ "${config_file}" == *client.cnf ]] ; then
+				cfg_option="default-auth"
+				cfg_section="client"
+				cfg_option_tabs="\t\t\t\t"
+			fi
+
+			if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+				einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+					"${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+			else
+				einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+				sed -i \
+					-e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+					"${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+			fi
+		done
+		unset cfg_option cfg_option_tabs cfg_section
+	fi
+	unset config_files config_file
+
+	echo
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local pwd1="a"
+		local pwd2="b"
+
+		echo
+		einfo "No password for mysql 'root' user was specified via environment"
+		einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+		einfo "file like '${HOME}/.my.cnf'."
+		einfo "To continue please provide a password for the mysql 'root' user"
+		einfo "now on console:"
+		ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same!"
+		fi
+
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+
+		echo
+	fi
+
+	local -a mysqld_options
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+	local opt optexp optfull
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+	; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+	done
+
+	# Prepare timezones, see
+	# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	local tz_sql="${TMPDIR}/tz.sql"
+	echo "USE mysql;" >"${tz_sql}"
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+	if [[ $? -ne 0 ]] ; then
+		die "mysql_tzinfo_to_sql failed!"
+	fi
+
+	chown ${MYSQL_USER} "${tz_sql}" || die
+
+	local mysql_install_log="${TMPDIR}/mysql_install_db.log"
+	touch "${mysql_install_log}" || die
+	chown ${MYSQL_USER} "${mysql_install_log}" || die
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--initialize-insecure"
+		"--init-file='${tz_sql}'"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Initializing ${PN} data directory: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+	fi
+
+	local x=${RANDOM}
+	local socket="${EROOT}/run/mysqld/mysqld${x}.sock"
+	local pidfile="${EROOT}/run/mysqld/mysqld${x}.pid"
+	unset x
+
+	local mysqld_logfile="${TMPDIR}/mysqld.log"
+	touch "${mysqld_logfile}" || die
+	chown ${MYSQL_USER} "${mysqld_logfile}" || die
+
+	cmd=(
+		"${mysqld_binary}"
+		"${mysqld_options[@]}"
+		"--basedir='${EROOT}/usr'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
+		--max_allowed_packet=8M
+		--net_buffer_length=16K
+		"--socket='${socket}'"
+		"--pid-file='${pidfile}'"
+		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
+	)
+
+	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+	echo -n "Waiting for mysqld to accept connections "
+	local maxtry=15
+	while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+
+	if [[ -S "${socket}" ]] ; then
+		# Even with a socket we don't know if mysqld will abort
+		# start due to an error so just wait a little bit more...
+		maxtry=5
+		while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+	fi
+
+	echo
+
+	if [[ ! -S "${socket}" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+	fi
+
+	local mysql_logfile="${TMPDIR}/set_root_pw.log"
+	touch "${mysql_logfile}" || die
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+	cmd=(
+		"${mysql_binary}"
+		--no-defaults
+		"--socket='${socket}'"
+		-hlocalhost
+		"-e \"${sql}\""
+	)
+	eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+	local rc=$?
+	eend ${rc}
+
+	if [[ ${rc} -ne 0 ]] ; then
+		# Poor man's solution which tries to avoid having password
+		# in log.  NOTE: sed can fail if user didn't follow advice
+		# and included character which will require escaping...
+		sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+		die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+	fi
+
+	# Stop the server
+	if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+		echo -n "Stopping the server "
+		pkill -F "${pidfile}" &>/dev/null
+
+		maxtry=10
+		while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+			maxtry=$((${maxtry}-1))
+			echo -n "."
+			sleep 1
+		done
+
+		echo
+
+		if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+			# We somehow failed to stop server.
+			# However, not a fatal error. Just warn the user.
+			ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+		fi
+	fi
+
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-09-15  9:44 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2019-09-15  9:44 UTC (permalink / raw
  To: gentoo-commits

commit:     e848234b26872ac5285670b67a8034d2f27e0e9b
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 15 09:43:52 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sun Sep 15 09:43:52 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e848234b

dev-db/mysql: amd64 stable wrt bug #693814

Package-Manager: Portage-2.3.69, Repoman-2.3.16
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.45-r2.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.27-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.45-r2.ebuild b/dev-db/mysql/mysql-5.6.45-r2.ebuild
index 91adb86712c..174b9eac6e4 100644
--- a/dev-db/mysql/mysql-5.6.45-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.45-r2.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.27-r1.ebuild b/dev-db/mysql/mysql-5.7.27-r1.ebuild
index 7d020c375a9..d1584c591b8 100644
--- a/dev-db/mysql/mysql-5.7.27-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r1.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-09-13 18:31 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2019-09-13 18:31 UTC (permalink / raw
  To: gentoo-commits

commit:     f48c7018eddbad848bc4fb8b7fadeadb7896b15d
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 13 18:30:10 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Fri Sep 13 18:30:10 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f48c7018

dev-db/mysql: arm stable wrt bug #693814

Package-Manager: Portage-2.3.69, Repoman-2.3.16
RepoMan-Options: --include-arches="arm"
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.45-r2.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.27-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.45-r2.ebuild b/dev-db/mysql/mysql-5.6.45-r2.ebuild
index a465deed7e2..91adb86712c 100644
--- a/dev-db/mysql/mysql-5.6.45-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.45-r2.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.27-r1.ebuild b/dev-db/mysql/mysql-5.7.27-r1.ebuild
index 99df72c5e56..7d020c375a9 100644
--- a/dev-db/mysql/mysql-5.7.27-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r1.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-09-13  2:19 Aaron Bauman
  0 siblings, 0 replies; 393+ messages in thread
From: Aaron Bauman @ 2019-09-13  2:19 UTC (permalink / raw
  To: gentoo-commits

commit:     a617c1598c1e2775093692d4d7c9c11e53004c28
Author:     Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 13 02:19:02 2019 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Fri Sep 13 02:19:02 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a617c159

dev-db/mysql: arm64 stable (bug #693814)

Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
Package-Manager: Portage-2.3.75, Repoman-2.3.17
RepoMan-Options: --include-arches="arm64"

 dev-db/mysql/mysql-5.7.27-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.27-r1.ebuild b/dev-db/mysql/mysql-5.7.27-r1.ebuild
index 633603e471d..99df72c5e56 100644
--- a/dev-db/mysql/mysql-5.7.27-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r1.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-09-08 20:00 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-09-08 20:00 UTC (permalink / raw
  To: gentoo-commits

commit:     96d49753ecc6f00aa28972d121cbe466442c2c06
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  8 19:57:22 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Sep  8 19:57:22 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96d49753

dev-db/mysql: x86 stable (bug #693814)

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

 dev-db/mysql/mysql-5.6.45-r2.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.27-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.45-r2.ebuild b/dev-db/mysql/mysql-5.6.45-r2.ebuild
index da38c876ad5..a465deed7e2 100644
--- a/dev-db/mysql/mysql-5.6.45-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.45-r2.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.27-r1.ebuild b/dev-db/mysql/mysql-5.7.27-r1.ebuild
index 2edc05182a4..633603e471d 100644
--- a/dev-db/mysql/mysql-5.7.27-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r1.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-22 20:02 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-22 20:02 UTC (permalink / raw
  To: gentoo-commits

commit:     40e446630280b45ab68e3dbbc2bbd25a781175d7
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 22 19:05:11 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Aug 22 19:45:20 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40e44663

dev-db/mysql: drop old

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

 dev-db/mysql/Manifest               |  10 -
 dev-db/mysql/mysql-5.5.61.ebuild    | 791 ------------------------------
 dev-db/mysql/mysql-5.6.40-r2.ebuild | 789 ------------------------------
 dev-db/mysql/mysql-5.6.42.ebuild    | 796 ------------------------------
 dev-db/mysql/mysql-5.6.43.ebuild    | 799 ------------------------------
 dev-db/mysql/mysql-5.7.23-r2.ebuild | 938 -----------------------------------
 dev-db/mysql/mysql-5.7.24.ebuild    | 945 -----------------------------------
 dev-db/mysql/mysql-5.7.25.ebuild    | 946 ------------------------------------
 8 files changed, 6014 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index c6e668354db..b73f0a08111 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,20 +1,10 @@
-DIST mysql-5.5.61.tar.gz 21027098 BLAKE2B b7589f632a211349fc34cec94e333b878e07113969bf5cf6f78cd37435d95b15c03eaf188ed09768033b182de125c9f018a5fe902094f17ab891f94cab9de6dd SHA512 978384915c145ec8f0d85deb764154d8d4a9764f2d342928bda6ad43a00bc110aa888895416d2ba5684a4432e433037990dd3fe8c5caf024faa487bc2e153f49
 DIST mysql-5.5.62.tar.gz 21111902 BLAKE2B f1cbb1c6b4dfac11c2c517a57a5c6216ce43766cc247b3c9b387326a7f6446cbc21ddb42bd95afa658c3b0ed2568a29563ceea248c6ec63364ce210119d39cc2 SHA512 1080a3989c20bbbfe98739f99dacd183f2087ceee5147845852144240386808568af4c908ecdbccdcb6114000ab760ed7257492834d50018eff9520260fd91ce
-DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c
-DIST mysql-5.6.42.tar.gz 32201731 BLAKE2B c573328b37225dac090c32178f90e1419fc1848612e304bddc11eafdd48228981a846857be680978b72ef76edbd5d2422a98b5d20b4d082fabcc2b072e2b8fde SHA512 3104e6a3145a119f2b012de6af2a92fc37134aa402b889a562f5fc2391705d0bc2f718166c5fa8387d973fff5ecd9544c8b389b6d0c81d98bdcaf2acfb9b55e8
-DIST mysql-5.6.43.tar.gz 32200219 BLAKE2B 2aa1397ff5f011a169ae47650be8db7a097a62f53ff06d63760a419906841f0540db19449c1d71d60be7d684e49b4436e1d6e72e7a1cf99057a3f98fad11557f SHA512 8820aee9b34cfebc841d756b12713517c9dafed7bee7b09c8e82c8f359e2e12b25da47c4e49e0aa4afc26193b774e0fa0dfd422c2aa09c3112b6d6e4b62b9a68
 DIST mysql-5.6.44.tar.gz 32531507 BLAKE2B 28fbf49f699eb9f43223ffa186671b119d16016274cc7192db232b85c58123a61154e37193b9b7145c6a650b80b5f6cf838529bc2bc5ea9c78c0dbc39de834d3 SHA512 65ace1c803773ca6c8759d171c09bc93c7d61b8e3208ac9905f82e99087622c9dcca602d2da217741dc62fc6eabe9108ebc7f31facd26705072eae65fcc37077
 DIST mysql-5.6.45.tar.gz 32525559 BLAKE2B 3c629aed1de808acdea6654c7413e6851507c9c5be939ca4b4f5e2796da317e9b518a749bfc03d2b0ef05bd604b39f72e24b751076b9f206b462d21fa5db4f50 SHA512 f9d8bb72e96cc83f1064fe7df2e5fe8317ca9d44c4e776cf7827a61292fbcfccec716806c80d565958383d78fef93a19d61c726687b57680d5f93299291ff168
-DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
-DIST mysql-boost-5.7.24.tar.gz 49110448 BLAKE2B 1cf64712d84cbb2dfd31f2a530470b6f7cbf5ae9107106d86705575ea9739fa582e1f079447d9a58c4762fffc636d69e448ebdec9172ee15dc09245bc39c3525 SHA512 bbd411e15cd9e6053a353146808b74881d2d950f09e94794a699e7604dadf767b58b661a8321fbe1424f2c2e6cfc3adaa388242183e759082eae47b64cbfbcde
-DIST mysql-boost-5.7.25.tar.gz 49107578 BLAKE2B 8a43479c496ce45e71df905b0cb6da442340b691caa15f9862a8c981e7189c50e73b1701c393fe46ab580c508f785d5f15259c2331c77e0790191f3d41bb385c SHA512 b111c64bfcd49dba584bed71a0c7ce33b2b0654654d8f4eaa1a2b7a5daed9674ebfd4a0dfb93c20ffee028feead4709eaf600bb5469f81c86b743d395dfe27a9
 DIST mysql-boost-5.7.26.tar.gz 51098338 BLAKE2B 1263cd75814a7293b26b0f44fd2b7d20d983f3c6a62725df9515ecac2ef252f6644810cb4bf0d6f36b98e55317f1c67ea7541228cb38d896dfedc476a5755f26 SHA512 a5f9871dc5a8e5fffc1467c3dd542533a63fe553c029120475f8fd5530d884c76ab0c33ad260daf317faf318ccef01464f6ac2dc3468efceb6bf2b6c06c54cfd
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-boost-8.0.17.tar.gz 189322239 BLAKE2B f9f46e5fdc3e9869b203626bc09edfbcdbabcd68eba43f9c6a33b9a52cffb3a32f39704c6d22a66899aac16fa2efb271c5dc7af7522768b45542ac8dc615cd8a SHA512 a278ee263670cb1f79d67c4b87c4b88632569c3b20a4297a6e77d550155db20902f22992ea851cf59ea523bb97d5e08707e3457f71a678e9f1ac2fa4ca5b7a2d
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d
-DIST mysql-extras-20181023-0012Z.tar.bz2 327834 BLAKE2B 91a82cbcecbbbe94933da0d8c26cdfee0171602785b2f717fbfec7da422f0ec36f26e897a3c21695f4748017d36c9956cbef03d0852246468368b812a604df82 SHA512 94996708a9da4d55c3aab74f75b74fa4aa80e3fbbb87d9dfe6c1596a934aceed466b7c853e38d9b63f59660763ccef617defc4e6e8770451c21a252250f4e7fa
-DIST mysql-extras-20181111-2314Z.tar.bz2 329013 BLAKE2B fa928b699ef0e6f092e028fc1331cc33953d9855e784998fb2f8c1f1712e9424567b2d2b6b7c5ca375f178309522b3596fcba7babdbed7c85b87ae4b85e5db22 SHA512 5cc4d16c5c6b0491fb9532469ec0b9c65e27e1514d561ea4180845a1578fc8e7ba00fca479b9a784646846f5147e4f676340f639b78c3f5ee140dda26bd5bff2
-DIST mysql-extras-20190303-1852Z.tar.bz2 331026 BLAKE2B ee033fce8f1b6a58f1f690710fb9709a585cd45564b35e71d4f840a3a7f83a5d80f53c24236c9976319abd89c68c62c74a7111517f1b9721d3cbd0898bf0dd8d SHA512 30361a0b848ed27f9170b1116458a9bc13b1b585c5fa1933c99927541c31e9bda4008b0563f2fc7db286f998089ebebf1fe3f18fce7a45e62acbf769ac62d8c1
 DIST mysql-extras-20190524-1046Z.tar.bz2 331517 BLAKE2B e6d48e34b0a7f7176de8740971f8151923beb20a520df73c22d44005059ef6779ad5aa8437e30018b9bbfe1d6d69043cbd8522b6f3662746205193b44372a6b3 SHA512 2f7238578f3aabd1701e1c54da36bc0100c9479871e3c77b22131fd6cde865037307f93b3343ea5e52251c45ef35cdc52cc2dec5a26d44fd41700598282c5c2c
 DIST mysql-extras-20190604-1109Z.tar.bz2 331780 BLAKE2B 48b6f6ff36818ba3d1d9c0580b0ff5e2343d92a42ee78b6804841d7c4f511adcdc3d5cd0590f769f308ca52e271c07cb34219450f9b86e918ddcd0a4b956e18e SHA512 19a85ba5a4c2de1688f39feb6ce1c1802e4d886436dc02afe1ba508b91365a0ac67d668cf7126588145ee55641992ad71b0d094246a94c89065876b9bb897425
 DIST mysql-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28

diff --git a/dev-db/mysql/mysql-5.5.61.ebuild b/dev-db/mysql/mysql-5.5.61.ebuild
deleted file mode 100644
index bba690fe068..00000000000
--- a/dev-db/mysql/mysql-5.5.61.ebuild
+++ /dev/null
@@ -1,791 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20180804-2323Z"
-SUBSLOT="18"
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs user cmake-utils multilib-build
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.5/${P}.tar.gz
-	https://downloads.mysql.com/archives/MySQL-5.5/${P}.tar.gz"
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://mysql.com/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="0/${SUBSLOT:-0}"
-IUSE="bindist client-libs debug extraengine jemalloc latin1 libressl
-	+perl profiling selinux +server	static static-libs systemtap tcmalloc
-	test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!bindist? ( bindist ) libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )
-	static? ( yassl )"
-
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
-	inherit git-r3
-	EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-else
-	MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}/01050_all_mysql_config_cleanup-5.5.patch"
-	"${MY_PATCH_DIR}/02040_all_embedded-library-shared-5.5.10.patch"
-	"${MY_PATCH_DIR}/20001_all_fix-minimal-build-cmake-mysql-5.5.41.patch"
-	"${MY_PATCH_DIR}/20002_all_mysql-va-list.patch"
-	"${MY_PATCH_DIR}/20006_all_cmake_elib-mysql-5.5.53.patch"
-	"${MY_PATCH_DIR}/20007_all_cmake-debug-werror-5.6.22.patch"
-	"${MY_PATCH_DIR}/20008_all_mysql-tzinfo-symlink-5.6.37.patch"
-	"${MY_PATCH_DIR}/20009_all_mysql_myodbc_symbol_fix-5.5.38.patch"
-	"${MY_PATCH_DIR}/20018_all_mysql-5.5.60-without-clientlibs-tools.patch"
-	"${MY_PATCH_DIR}/20027_all_mysql-5.5-perl5.26-includes.patch"
-	"${MY_PATCH_DIR}/20030_all_mysql-5.5-fix-client-mysql-type.patch"
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	kernel_linux? (
-		sys-process/procps:0=
-		dev-libs/libaio:0=
-	)
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	jemalloc? ( dev-libs/jemalloc:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	!yassl? (
-		!libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
-		libressl? ( dev-libs/libressl:0= )
-	)
-	>=sys-libs/zlib-1.2.3:0=
-	sys-libs/ncurses:0=
-	!bindist? (
-		>=sys-libs/readline-4.1:0=
-	)
-	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
-	static? ( sys-libs/ncurses[static-libs] )
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
-	${COMMON_DEPEND}
-	perl? ( !dev-db/mytop
-		virtual/perl-Getopt-Long
-		dev-perl/TermReadKey
-		virtual/perl-Term-ANSIColor
-		virtual/perl-Time-HiRes )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-
-		einfo
-		elog "Be sure to edit the my.cnf file to activate your cluster settings."
-		elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
-		elog "The first time the cluster is activated, you should add"
-		elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
-		elog "This option should then be removed for subsequent starts."
-		einfo
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR%/}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	_disable_engine() {
-		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
-	}
-
-	_disable_plugin() {
-		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
-	}
-
-	if use tcmalloc; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
-	fi
-
-	if use jemalloc; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
-	local plugin
-	local server_plugins=( semisync )
-	local test_plugins=( audit_null daemon_example fulltext )
-	if ! use server; then # These plugins are for the server
-		for plugin in "${server_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	if ! use test; then # These plugins are only used during testing
-		for plugin in "${test_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	# Don't build example
-	_disable_engine example
-	_disable_engine ndb
-
-	cmake-utils_src_prepare
-}
-
-src_configure(){
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
-		-DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		-DWITH_ZLIB=system
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
-		# The build forces this to be defined when cross-compiling.  We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITHOUT_CLIENTLIBS=YES
-		-DWITH_READLINE=$(usex bindist 1 0)
-		-DENABLE_DTRACE=$(usex systemtap)
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use yassl ; then
-		mycmakeargs+=( -DWITH_SSL=system )
-	else
-		mycmakeargs+=( -DWITH_SSL=bundled )
-	fi
-
-	if use server ; then
-
-		# Federated{,X} must be treated special otherwise they will not be built as plugins
-		if ! use extraengine ; then
-			mycmakeargs+=(
-				-DWITHOUT_FEDERATED_STORAGE_ENGINE=1
-				-DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
-		fi
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-		mycmakeargs+=(
-			-DINSTALL_SQLBENCHDIR=share/mysql
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DENABLED_PROFILING=$(usex profiling)
-		)
-
-		if use static; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DEXTRA_CHARSETS=none
-			-DINSTALL_SQLBENCHDIR=
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	cmake-utils_src_compile
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
-	if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then
-		rm "${ED%/}/usr/include/mysql/server/private/config.h" || die
-	fi
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED%/}/usr/data" ]] ; then
-		rm -Rf "${ED%/}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
-	local mycnf_src="my.cnf-5.5"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR%/}/${mycnf_src}" \
-		> "${TMPDIR%/}/my.cnf.ok" || die
-	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8|latin1|g" \
-			"${TMPDIR%/}/my.cnf.ok" || die
-	fi
-	eprefixify "${TMPDIR%/}/my.cnf.ok"
-	newins "${TMPDIR}/my.cnf.ok" my.cnf
-
-	if use server ; then
-		einfo "Including support files and sample configurations"
-		docinto "support-files"
-		local script
-		for script in \
-			"${S%/}"/support-files/magic
-		do
-			[[ -f "$script" ]] && dodoc "${script}"
-		done
-
-		docinto "scripts"
-		for script in "${S%/}"/scripts/mysql* ; do
-			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
-		done
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED%/}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='extraengine perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" > /dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.5 for now and are believed to be
-	# false positives:
-	#
-	# main.mysql_client_test, main.mysql_client_test_nonblock
-	# main.mysql_client_test_comp:
-	# segfaults at random under Portage only, suspect resource limits.
-
-	local t
-	for t in main.mysql_client_test main.mysql_client_test_nonblock \
-		main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam \
-		main.mysqlhotcopy_archive main.mysqlhotcopy_myisam main.openssl_1 \
-		rpl.rpl_semi_sync_uninstall_plugin ; do
-			_disable_test  "$t" "False positives in Gentoo"
-	done
-
-	if ! use client-libs ; then
-		_disable_test main.plugin_auth "Needs client libraries built"
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd > /dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]]; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
-		local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
-	fi
-	if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
-	fi
-	if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in grant-tables host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]]; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]]; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
-
-	local cmd=( "${EROOT}usr/share/mysql/scripts/mysql_install_db" )
-	[[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
-	cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR}"/mysql_install_db.log 2>&1
-	if [ $? -ne 0 ]; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT}/usr/sbin/mysqld \
-		${options} \
-		--log-warnings=0 \
-		--basedir=${EROOT}/usr \
-		--datadir=${ROOT}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile} \
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]]; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
-	"${EROOT}/usr/bin/mysql" \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	if [[ -n "${sqltmp}" ]] ; then
-		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
-		"${EROOT}/usr/bin/mysql" \
-			"--socket=${socket}" \
-			-hlocalhost \
-			-uroot \
-			--password="${MYSQL_ROOT_PASSWORD}" \
-			mysql < "${sqltmp}"
-		rc=$?
-		eend $?
-		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
-	fi
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}

diff --git a/dev-db/mysql/mysql-5.6.40-r2.ebuild b/dev-db/mysql/mysql-5.6.40-r2.ebuild
deleted file mode 100644
index bd964e87045..00000000000
--- a/dev-db/mysql/mysql-5.6.40-r2.ebuild
+++ /dev/null
@@ -1,789 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20181111-2314Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs \
-	user cmake-utils multilib-build
-
-SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0/18"
-IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
-	+server static static-libs systemtap tcmalloc test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
-	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
-	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
-	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
-	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
-	"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	kernel_linux? (
-		sys-process/procps:0=
-		dev-libs/libaio:0=
-	)
-	net-misc/curl
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	jemalloc? ( dev-libs/jemalloc:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	!yassl? (
-		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-		libressl? ( dev-libs/libressl:0= )
-	)
-	>=sys-libs/zlib-1.2.3:0=
-	sys-libs/ncurses:0=
-	server? (
-		numa? ( sys-process/numactl )
-	)
-	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
-	static? ( sys-libs/ncurses[static-libs] )
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
-	${COMMON_DEPEND}
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	_disable_engine() {
-		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
-	}
-
-	_disable_plugin() {
-		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
-	}
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-	if use tcmalloc; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	local plugin
-	local server_plugins=( semisync )
-	local test_plugins=( audit_null daemon_example fulltext )
-	if ! use server; then # These plugins are for the server
-		for plugin in "${server_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	if ! use test; then # These plugins are only used during testing
-		for plugin in "${test_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	# Don't build example
-	_disable_engine example
-	_disable_engine ndb
-	_disable_plugin innodb_memcached
-
-	cmake-utils_src_prepare
-}
-
-src_configure(){
-	# bug 508724 mariadb cannot use ld.gold
-	tc-ld-disable-gold
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling.  We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_LIBEVENT=NO
-		-DWITHOUT_CLIENTLIBS=YES
-		-DENABLE_DTRACE=$(usex systemtap)
-		-DWITH_SSL=$(usex yassl bundled system)
-		-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
-		-DWITHOUT_VALIDATE_PASSWORD=1
-	)
-
-	if use server ; then
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-		mycmakeargs+=(
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DENABLED_PROFILING=$(usex profiling)
-		)
-
-		if use static; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	cmake-utils_src_compile
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
-	local mycnf_src="my.cnf-5.6"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR%/}/${mycnf_src}" \
-		> "${TMPDIR%/}/my.cnf.ok" || die
-	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8|latin1|g" \
-			"${TMPDIR%/}/my.cnf.ok" || die
-	fi
-	eprefixify "${TMPDIR%/}/my.cnf.ok"
-	newins "${TMPDIR}/my.cnf.ok" my.cnf
-
-	if use server ; then
-		einfo "Including support files and sample configurations"
-		docinto "support-files"
-		local script
-		for script in \
-			"${S}"/support-files/magic
-		do
-			[[ -f "$script" ]] && dodoc "${script}"
-		done
-
-		docinto "scripts"
-		for script in "${S}"/scripts/mysql* ; do
-			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
-		done
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='perl server static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" > /dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf federated.federated_plugin ; do
-			_disable_test  "$t" "False positives in Gentoo"
-	done
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd > /dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]]; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX%/}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
-		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
-	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
-	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
-	[[ -r "${help_tables}" ]] \
-	&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
-	|| touch "${TMPDIR}/fill_help_tables.sql"
-	help_tables="${TMPDIR}/fill_help_tables.sql"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR%/}/mysqld-help"
-	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]]; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]]; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
-	chown mysql "${sqltmp}" || die
-
-	local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
-	[[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
-	if [[ -r "${help_tables}" ]] ; then
-		cat "${help_tables}" >> "${sqltmp}"
-	fi
-	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [ $? -ne 0 ]; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT%/}/usr/sbin/mysqld \
-		${options} \
-		$(use prefix || echo --user=mysql) \
-		--log-warnings=0 \
-		--basedir=${EROOT%/}/usr \
-		--datadir=${ROOT%/}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile} \
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]]; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
-	"${EROOT%/}/usr/bin/mysql" \
-		--no-defaults \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	if [[ -n "${sqltmp}" ]] ; then
-		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
-		"${EROOT%/}/usr/bin/mysql" \
-			--socket="${socket}" \
-			-hlocalhost \
-			-uroot \
-			--password="${MYSQL_ROOT_PASSWORD}" \
-			mysql < "${sqltmp}"
-		rc=$?
-		eend $?
-		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
-	fi
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}

diff --git a/dev-db/mysql/mysql-5.6.42.ebuild b/dev-db/mysql/mysql-5.6.42.ebuild
deleted file mode 100644
index 1ec7ebd8826..00000000000
--- a/dev-db/mysql/mysql-5.6.42.ebuild
+++ /dev/null
@@ -1,796 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20181111-2314Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs \
-	user cmake-utils multilib-build
-
-SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0/18"
-IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
-	+server static static-libs systemtap tcmalloc test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
-	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
-	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
-	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
-	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
-	"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	kernel_linux? (
-		sys-process/procps:0=
-		dev-libs/libaio:0=
-	)
-	net-misc/curl
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	jemalloc? ( dev-libs/jemalloc:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	!yassl? (
-		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-		libressl? ( dev-libs/libressl:0= )
-	)
-	>=sys-libs/zlib-1.2.3:0=
-	sys-libs/ncurses:0=
-	server? (
-		numa? ( sys-process/numactl )
-	)
-	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
-	static? ( sys-libs/ncurses[static-libs] )
-	test? ( dev-perl/JSON )
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
-	${COMMON_DEPEND}
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	_disable_engine() {
-		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
-	}
-
-	_disable_plugin() {
-		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
-	}
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-	if use tcmalloc; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	local plugin
-	local server_plugins=( semisync )
-	local test_plugins=( audit_null daemon_example fulltext )
-	if ! use server; then # These plugins are for the server
-		for plugin in "${server_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	if ! use test; then # These plugins are only used during testing
-		for plugin in "${test_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	# Don't build example
-	_disable_engine example
-	_disable_engine ndb
-	_disable_plugin innodb_memcached
-
-	cmake-utils_src_prepare
-}
-
-src_configure(){
-	# bug 508724 mariadb cannot use ld.gold
-	tc-ld-disable-gold
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling.  We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_LIBEVENT=NO
-		-DWITHOUT_CLIENTLIBS=YES
-		-DENABLE_DTRACE=$(usex systemtap)
-		-DWITH_SSL=$(usex yassl bundled system)
-		-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
-		-DWITHOUT_VALIDATE_PASSWORD=1
-	)
-
-	if use server ; then
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-		mycmakeargs+=(
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	cmake-utils_src_compile
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
-	local mycnf_src="my.cnf-5.6"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR%/}/${mycnf_src}" \
-		> "${TMPDIR%/}/my.cnf.ok" || die
-	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8|latin1|g" \
-			"${TMPDIR%/}/my.cnf.ok" || die
-	fi
-	eprefixify "${TMPDIR%/}/my.cnf.ok"
-	newins "${TMPDIR}/my.cnf.ok" my.cnf
-
-	if use server ; then
-		einfo "Including support files and sample configurations"
-		docinto "support-files"
-		local script
-		for script in \
-			"${S}"/support-files/magic
-		do
-			[[ -f "$script" ]] && dodoc "${script}"
-		done
-
-		docinto "scripts"
-		for script in "${S}"/scripts/mysql* ; do
-			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
-		done
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='perl server static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" > /dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.6 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf federated.federated_plugin ; do
-			_disable_test  "$t" "False positives in Gentoo"
-	done
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd > /dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]]; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX%/}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
-		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
-	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
-	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
-	[[ -r "${help_tables}" ]] \
-	&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
-	|| touch "${TMPDIR}/fill_help_tables.sql"
-	help_tables="${TMPDIR}/fill_help_tables.sql"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR%/}/mysqld-help"
-	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]]; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]]; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
-	chown mysql "${sqltmp}" || die
-
-	local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
-	[[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
-	if [[ -r "${help_tables}" ]] ; then
-		cat "${help_tables}" >> "${sqltmp}"
-	fi
-	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [ $? -ne 0 ]; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT%/}/usr/sbin/mysqld \
-		${options} \
-		$(use prefix || echo --user=mysql) \
-		--log-warnings=0 \
-		--basedir=${EROOT%/}/usr \
-		--datadir=${ROOT%/}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile} \
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]]; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
-	"${EROOT%/}/usr/bin/mysql" \
-		--no-defaults \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	if [[ -n "${sqltmp}" ]] ; then
-		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
-		"${EROOT%/}/usr/bin/mysql" \
-			--socket="${socket}" \
-			-hlocalhost \
-			-uroot \
-			--password="${MYSQL_ROOT_PASSWORD}" \
-			mysql < "${sqltmp}"
-		rc=$?
-		eend $?
-		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
-	fi
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}

diff --git a/dev-db/mysql/mysql-5.6.43.ebuild b/dev-db/mysql/mysql-5.6.43.ebuild
deleted file mode 100644
index 77ee3830827..00000000000
--- a/dev-db/mysql/mysql-5.6.43.ebuild
+++ /dev/null
@@ -1,799 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20190303-1852Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs \
-	user cmake-utils multilib-build
-
-SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0/18"
-IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
-	+server static static-libs systemtap tcmalloc test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
-	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
-	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
-	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
-	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
-	"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	kernel_linux? (
-		sys-process/procps:0=
-		dev-libs/libaio:0=
-	)
-	net-misc/curl
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	jemalloc? ( dev-libs/jemalloc:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	!yassl? (
-		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-		libressl? ( dev-libs/libressl:0= )
-	)
-	>=sys-libs/zlib-1.2.3:0=
-	sys-libs/ncurses:0=
-	server? (
-		numa? ( sys-process/numactl )
-	)
-	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
-	static? ( sys-libs/ncurses[static-libs] )
-	test? ( dev-perl/JSON )
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
-	${COMMON_DEPEND}
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	_disable_engine() {
-		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
-	}
-
-	_disable_plugin() {
-		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
-	}
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-	if use tcmalloc; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	local plugin
-	local server_plugins=( semisync )
-	local test_plugins=( audit_null daemon_example fulltext )
-	if ! use server; then # These plugins are for the server
-		for plugin in "${server_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	if ! use test; then # These plugins are only used during testing
-		for plugin in "${test_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	# Don't build example
-	_disable_engine example
-	_disable_engine ndb
-	_disable_plugin innodb_memcached
-
-	cmake-utils_src_prepare
-}
-
-src_configure(){
-	# bug 508724 mariadb cannot use ld.gold
-	tc-ld-disable-gold
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling.  We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_LIBEVENT=NO
-		-DWITHOUT_CLIENTLIBS=YES
-		-DENABLE_DTRACE=$(usex systemtap)
-		-DWITH_SSL=$(usex yassl bundled system)
-		-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
-		-DWITHOUT_VALIDATE_PASSWORD=1
-	)
-
-	if use server ; then
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-		mycmakeargs+=(
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	cmake-utils_src_compile
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
-	local mycnf_src="my.cnf-5.6"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR%/}/${mycnf_src}" \
-		> "${TMPDIR%/}/my.cnf.ok" || die
-	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8|latin1|g" \
-			"${TMPDIR%/}/my.cnf.ok" || die
-	fi
-	eprefixify "${TMPDIR%/}/my.cnf.ok"
-	newins "${TMPDIR}/my.cnf.ok" my.cnf
-
-	if use server ; then
-		einfo "Including support files and sample configurations"
-		docinto "support-files"
-		local script
-		for script in \
-			"${S}"/support-files/magic
-		do
-			[[ -f "$script" ]] && dodoc "${script}"
-		done
-
-		docinto "scripts"
-		for script in "${S}"/scripts/mysql* ; do
-			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
-		done
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='perl server static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" > /dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.6 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf federated.federated_plugin ; do
-			_disable_test  "$t" "False positives in Gentoo"
-	done
-
-	# Bad test definition
-	_disable_test main.mysqldump "Test fails after 2018-12-31 with new warnings"
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd > /dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]]; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX%/}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
-		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
-	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
-	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
-	[[ -r "${help_tables}" ]] \
-	&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
-	|| touch "${TMPDIR}/fill_help_tables.sql"
-	help_tables="${TMPDIR}/fill_help_tables.sql"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR%/}/mysqld-help"
-	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]]; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]]; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
-	chown mysql "${sqltmp}" || die
-
-	local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
-	[[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
-	if [[ -r "${help_tables}" ]] ; then
-		cat "${help_tables}" >> "${sqltmp}"
-	fi
-	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [ $? -ne 0 ]; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT%/}/usr/sbin/mysqld \
-		${options} \
-		$(use prefix || echo --user=mysql) \
-		--log-warnings=0 \
-		--basedir=${EROOT%/}/usr \
-		--datadir=${ROOT%/}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile} \
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]]; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
-	"${EROOT%/}/usr/bin/mysql" \
-		--no-defaults \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	if [[ -n "${sqltmp}" ]] ; then
-		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
-		"${EROOT%/}/usr/bin/mysql" \
-			--socket="${socket}" \
-			-hlocalhost \
-			-uroot \
-			--password="${MYSQL_ROOT_PASSWORD}" \
-			mysql < "${sqltmp}"
-		rc=$?
-		eend $?
-		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
-	fi
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}

diff --git a/dev-db/mysql/mysql-5.7.23-r2.ebuild b/dev-db/mysql/mysql-5.7.23-r2.ebuild
deleted file mode 100644
index 0b7a82c88b4..00000000000
--- a/dev-db/mysql/mysql-5.7.23-r2.ebuild
+++ /dev/null
@@ -1,938 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20181023-0012Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit cmake-utils eutils flag-o-matic linux-info \
-	prefix toolchain-funcs user multilib-minimal
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-libressl-support.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-mips-ASM.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="net-misc/curl:=
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	sys-libs/ncurses:0=
-	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-	)
-	jemalloc? ( dev-libs/jemalloc:0= )
-	kernel_linux? (
-		dev-libs/libaio:0=
-		sys-process/procps:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	!yassl? (
-		client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
-			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
-		)
-		!client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-			libressl? ( dev-libs/libressl:0= )
-		)
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	virtual/yacc
-	server? (
-		dev-libs/libevent
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]] ; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if use numa ; then
-		local CONFIG_CHECK="~NUMA"
-
-		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-		check_extra_config
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	cmake-utils_src_prepare
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/libevent \
-		"${S}"/zlib \
-		|| die
-
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-}
-
-src_configure(){
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
-		-DMYSQL_DATADIR="${EPREFIX%/}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX%/}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use yassl ; then
-		mycmakeargs+=( -DWITH_SSL=system )
-	else
-		mycmakeargs+=( -DWITH_SSL=bundled )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake-utils_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]] ; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf ; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	for t in main.xa_prepared_binlog_off ; do
-			_disable_test "$t" "Unstable test"
-	done
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-				_disable_test "$t" "requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-
-	cmake-utils_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX%/}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
-		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
-			if [[ -d "${MY_DATADIR_s}" ]] ; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]] ; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
-	fi
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
-	fi
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR%/}/mysqld-help"
-	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	echo "USE mysql;" >"${sqltmp}"
-	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
-	chown mysql "${sqltmp}" || die
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
-	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT%/}/usr/sbin/mysqld \
-		${options} \
-		$(use prefix || echo --user=mysql) \
-		--log-warnings=0 \
-		--basedir=${EROOT%/}/usr \
-		--datadir=${ROOT%/}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile} \
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]] ; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
-	"${EROOT%/}/usr/bin/mysql" \
-		--no-defaults \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}

diff --git a/dev-db/mysql/mysql-5.7.24.ebuild b/dev-db/mysql/mysql-5.7.24.ebuild
deleted file mode 100644
index f178d936fc9..00000000000
--- a/dev-db/mysql/mysql-5.7.24.ebuild
+++ /dev/null
@@ -1,945 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20181023-0012Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit cmake-utils eutils flag-o-matic linux-info \
-	prefix toolchain-funcs user multilib-minimal
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-libressl-support.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-mips-ASM.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="net-misc/curl:=
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	sys-libs/ncurses:0=
-	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-	)
-	jemalloc? ( dev-libs/jemalloc:0= )
-	kernel_linux? (
-		dev-libs/libaio:0=
-		sys-process/procps:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	!yassl? (
-		client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
-			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
-		)
-		!client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-			libressl? ( dev-libs/libressl:0= )
-		)
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	virtual/yacc
-	server? (
-		dev-libs/libevent
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-	test? ( dev-perl/JSON )
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]] ; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if use numa ; then
-		local CONFIG_CHECK="~NUMA"
-
-		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-		check_extra_config
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	cmake-utils_src_prepare
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/libevent \
-		"${S}"/zlib \
-		|| die
-
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-}
-
-src_configure(){
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
-		-DMYSQL_DATADIR="${EPREFIX%/}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX%/}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use yassl ; then
-		mycmakeargs+=( -DWITH_SSL=system )
-	else
-		mycmakeargs+=( -DWITH_SSL=bundled )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake-utils_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]] ; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf ; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in main.xa_prepared_binlog_off rpl.rpl_non_direct_stm_mixing_engines ; do
-			_disable_test "$t" "Unstable test"
-	done
-
-	if ! use amd64 ; then
-		# fixed in >=mysql-8 via commit 0a417e84
-		_disable_test "gis.gis_bugs_crashes" "Unstable results on non-amd64 architectures due to floating-point operation"
-	fi
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-				_disable_test "$t" "requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-
-	cmake-utils_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX%/}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
-		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
-			if [[ -d "${MY_DATADIR_s}" ]] ; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]] ; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
-	fi
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
-	fi
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR%/}/mysqld-help"
-	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	echo "USE mysql;" >"${sqltmp}"
-	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
-	chown mysql "${sqltmp}" || die
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
-	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT%/}/usr/sbin/mysqld \
-		${options} \
-		$(use prefix || echo --user=mysql) \
-		--log-warnings=0 \
-		--basedir=${EROOT%/}/usr \
-		--datadir=${ROOT%/}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile} \
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]] ; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
-	"${EROOT%/}/usr/bin/mysql" \
-		--no-defaults \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}

diff --git a/dev-db/mysql/mysql-5.7.25.ebuild b/dev-db/mysql/mysql-5.7.25.ebuild
deleted file mode 100644
index 34fc5964b51..00000000000
--- a/dev-db/mysql/mysql-5.7.25.ebuild
+++ /dev/null
@@ -1,946 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20190524-1046Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit cmake-utils eutils flag-o-matic linux-info \
-	prefix toolchain-funcs user multilib-minimal
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
-	selinux +server static static-libs systemtap tcmalloc test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-libressl-support.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-mips-ASM.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-build-without-server.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="net-misc/curl:=
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	sys-libs/ncurses:0=
-	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
-	!client-libs? (
-		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
-		>=sys-libs/zlib-1.2.3:0=
-	)
-	jemalloc? ( dev-libs/jemalloc:0= )
-	kernel_linux? (
-		dev-libs/libaio:0=
-		sys-process/procps:0=
-	)
-	server? (
-		>=app-arch/lz4-0_p131:=
-		cjk? ( app-text/mecab:= )
-		experimental? (
-			dev-libs/libevent:=
-			dev-libs/protobuf:=
-			net-libs/libtirpc:=
-		)
-		numa? ( sys-process/numactl )
-	)
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	!yassl? (
-		client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
-			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
-		)
-		!client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-			libressl? ( dev-libs/libressl:0= )
-		)
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	dev-libs/protobuf
-	virtual/yacc
-	server? (
-		dev-libs/libevent
-		experimental? ( net-libs/rpcsvc-proto )
-	)
-	static? ( sys-libs/ncurses[static-libs] )
-	test? ( dev-perl/JSON )
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
-	selinux? ( sec-policy/selinux-mysql )
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]] ; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_pretend() {
-	if use numa ; then
-		local CONFIG_CHECK="~NUMA"
-
-		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
-		check_extra_config
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/mysql.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	cmake-utils_src_prepare
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	if use tcmalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	# Remove bundled libs so we cannot accidentally use them
-	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
-	rm -rv \
-		"${S}"/extra/protobuf \
-		"${S}"/libevent \
-		"${S}"/zlib \
-		|| die
-
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-}
-
-src_configure(){
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
-		-DMYSQL_DATADIR="${EPREFIX%/}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX%/}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling. We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use yassl ; then
-		mycmakeargs+=( -DWITH_SSL=system )
-	else
-		mycmakeargs+=( -DWITH_SSL=bundled )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI, bug 530132
-	if multilib_is_native_abi ; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-		mycmakeargs+=(
-			-DWITH_LIBEVENT=system
-			-DWITH_LZ4=system
-			-DWITH_PROTOBUF=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_RAPID=$(usex experimental ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-		)
-
-		if use profiling ; then
-			# Setting to OFF doesn't work: Once set, profiling options will be added
-			# to `mysqld --help` output via sql/sys_vars.cc causing
-			# "main.mysqld--help-notwin" test to fail
-			mycmakeargs+=( -DENABLED_PROFILING=ON )
-		fi
-
-		if use static ; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_FEDERATED_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake-utils_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]] ; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" &>/dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf ; do
-			_disable_test "$t" "False positives in Gentoo"
-	done
-
-	# Unstable tests
-	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in main.xa_prepared_binlog_off rpl.rpl_non_direct_stm_mixing_engines ; do
-			_disable_test "$t" "Unstable test"
-	done
-
-	if ! use amd64 ; then
-		# fixed in >=mysql-8 via commit 0a417e84
-		_disable_test "gis.gis_bugs_crashes" "Unstable results on non-amd64 architectures due to floating-point operation"
-	fi
-
-	if use numa && use kernel_linux ; then
-		# bug 584880
-		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
-			for t in sys_vars.innodb_numa_interleave_basic ; do
-				_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	if ! use latin1 ; then
-		# The following tests will fail if DEFAULT_CHARSET
-		# isn't set to latin1:
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_xa_prepared_disconnect \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			innodb.innodb_pagesize_max_recordsize \
-			innodb.innodb-system-table-view \
-			innodb.mysqldump_max_recordsize \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			main.type_string \
-			main.information_schema \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_xa_survive_disconnect \
-			rpl.rpl_xa_survive_disconnect_lsu_off \
-			rpl.rpl_xa_survive_disconnect_table \
-		; do
-				_disable_test "$t" "requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
-		done
-	fi
-
-	# Try to increase file limits to increase test coverage
-	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
-		# Upper limit comes from parts.partition_* tests
-		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
-		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
-			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
-			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
-			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
-				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
-			else
-				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
-			fi
-		else
-			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
-		fi
-	else
-		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd &>/dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-
-	cmake-utils_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-
-		eprefixify "${TMPDIR}/my.cnf.ok"
-
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX%/}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
-		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
-			if [[ -d "${MY_DATADIR_s}" ]] ; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]] ; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client ; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
-	fi
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
-	fi
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR%/}/mysqld-help"
-	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]] ; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]] ; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	echo "USE mysql;" >"${sqltmp}"
-	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
-	chown mysql "${sqltmp}" || die
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
-	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [[ $? -ne 0 ]] ; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT%/}/usr/sbin/mysqld \
-		${options} \
-		$(use prefix || echo --user=mysql) \
-		--log-warnings=0 \
-		--basedir=${EROOT%/}/usr \
-		--datadir=${ROOT%/}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile} \
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]] ; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
-	"${EROOT%/}/usr/bin/mysql" \
-		--no-defaults \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-22 20:02 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-22 20:02 UTC (permalink / raw
  To: gentoo-commits

commit:     4a0854adc994570e8307d4dfde9ed86b130ec020
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 22 19:22:43 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Aug 22 19:45:25 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a0854ad

dev-db/mysql: migrate to GLEP 81

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

 ...mysql-5.6.45-r1.ebuild => mysql-5.6.45-r2.ebuild} | 20 ++++++++++++--------
 dev-db/mysql/mysql-5.7.27-r1.ebuild                  | 18 +++++++++++-------
 2 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.45-r1.ebuild b/dev-db/mysql/mysql-5.6.45-r2.ebuild
similarity index 98%
rename from dev-db/mysql/mysql-5.6.45-r1.ebuild
rename to dev-db/mysql/mysql-5.6.45-r2.ebuild
index dfea0d2a2a4..da38c876ad5 100644
--- a/dev-db/mysql/mysql-5.6.45-r1.ebuild
+++ b/dev-db/mysql/mysql-5.6.45-r2.ebuild
@@ -2,14 +2,14 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20190817-0024Z"
+MY_EXTRAS_VER="20190822-1908Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
 # Keeping eutils in EAPI=6 for emktemp in pkg_config
 
 inherit eutils flag-o-matic prefix toolchain-funcs \
-	user cmake-utils multilib-build
+	cmake-utils multilib-build
 
 SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
 	https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
@@ -94,13 +94,21 @@ COMMON_DEPEND="
 "
 DEPEND="virtual/yacc
 	static? ( sys-libs/ncurses[static-libs] )
-	test? ( dev-perl/JSON )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
 	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
 	${COMMON_DEPEND}"
 RDEPEND="selinux? ( sec-policy/selinux-mysql )
 	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+	server? (
+		!prefix? (
+			acct-group/mysql acct-user/mysql
+			dev-db/mysql-init-scripts
+		)
+	)
 	${COMMON_DEPEND}
 "
 # For other stuff to bring us in
@@ -124,10 +132,6 @@ pkg_setup() {
 		use server && ! has userpriv ${FEATURES} ; then
 			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
 	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
 }
 
 pkg_preinst() {

diff --git a/dev-db/mysql/mysql-5.7.27-r1.ebuild b/dev-db/mysql/mysql-5.7.27-r1.ebuild
index 45c4fd67d30..2edc05182a4 100644
--- a/dev-db/mysql/mysql-5.7.27-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r1.ebuild
@@ -9,7 +9,7 @@ CMAKE_MAKEFILE_GENERATOR=emake
 # Keeping eutils in EAPI=6 for emktemp in pkg_config
 
 inherit cmake-utils eutils flag-o-matic linux-info \
-	prefix toolchain-funcs user multilib-minimal
+	prefix toolchain-funcs multilib-minimal
 
 SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
 	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
@@ -112,13 +112,21 @@ DEPEND="${COMMON_DEPEND}
 		experimental? ( net-libs/rpcsvc-proto )
 	)
 	static? ( sys-libs/ncurses[static-libs] )
-	test? ( dev-perl/JSON )
+	test? (
+		acct-group/mysql acct-user/mysql
+		dev-perl/JSON
+	)
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
 	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
 	selinux? ( sec-policy/selinux-mysql )
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+	server? (
+		!prefix? (
+			acct-group/mysql acct-user/mysql
+			dev-db/mysql-init-scripts
+		)
+	)
 "
 # For other stuff to bring us in
 # dev-perl/DBD-mysql is needed by some scripts installed by MySQL
@@ -209,10 +217,6 @@ pkg_setup() {
 		use server && ! has userpriv ${FEATURES} ; then
 			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
 	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
 }
 
 pkg_preinst() {


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-22 20:02 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-22 20:02 UTC (permalink / raw
  To: gentoo-commits

commit:     49a09ce57bb37504b0f3cebc8f09fb00ad8efe01
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 22 19:02:57 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Aug 22 19:45:18 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49a09ce5

dev-db/mysql: alpha & ia64 forcefully stabilized (bug #691136)

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

 dev-db/mysql/mysql-5.6.44-r1.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.26.ebuild    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.44-r1.ebuild b/dev-db/mysql/mysql-5.6.44-r1.ebuild
index e51ea5affde..642f7932867 100644
--- a/dev-db/mysql/mysql-5.6.44-r1.ebuild
+++ b/dev-db/mysql/mysql-5.6.44-r1.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.26.ebuild b/dev-db/mysql/mysql-5.7.26.ebuild
index e7550e70b18..5c75a879138 100644
--- a/dev-db/mysql/mysql-5.7.26.ebuild
+++ b/dev-db/mysql/mysql-5.7.26.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-22 20:02 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-22 20:02 UTC (permalink / raw
  To: gentoo-commits

commit:     384559d8d0ea8486d57c52c17587ced4d8d870a7
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 22 19:12:29 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Aug 22 19:45:21 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=384559d8

dev-db/mysql: don't install {lz4,zlib}_decompress

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

 dev-db/mysql/Manifest                                        | 3 +--
 dev-db/mysql/{mysql-5.7.26.ebuild => mysql-5.7.26-r1.ebuild} | 4 ++--
 dev-db/mysql/{mysql-5.7.27.ebuild => mysql-5.7.27-r1.ebuild} | 4 ++--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index b73f0a08111..17e28b6146c 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -5,6 +5,5 @@ DIST mysql-boost-5.7.26.tar.gz 51098338 BLAKE2B 1263cd75814a7293b26b0f44fd2b7d20
 DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-boost-8.0.17.tar.gz 189322239 BLAKE2B f9f46e5fdc3e9869b203626bc09edfbcdbabcd68eba43f9c6a33b9a52cffb3a32f39704c6d22a66899aac16fa2efb271c5dc7af7522768b45542ac8dc615cd8a SHA512 a278ee263670cb1f79d67c4b87c4b88632569c3b20a4297a6e77d550155db20902f22992ea851cf59ea523bb97d5e08707e3457f71a678e9f1ac2fa4ca5b7a2d
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d
-DIST mysql-extras-20190524-1046Z.tar.bz2 331517 BLAKE2B e6d48e34b0a7f7176de8740971f8151923beb20a520df73c22d44005059ef6779ad5aa8437e30018b9bbfe1d6d69043cbd8522b6f3662746205193b44372a6b3 SHA512 2f7238578f3aabd1701e1c54da36bc0100c9479871e3c77b22131fd6cde865037307f93b3343ea5e52251c45ef35cdc52cc2dec5a26d44fd41700598282c5c2c
-DIST mysql-extras-20190604-1109Z.tar.bz2 331780 BLAKE2B 48b6f6ff36818ba3d1d9c0580b0ff5e2343d92a42ee78b6804841d7c4f511adcdc3d5cd0590f769f308ca52e271c07cb34219450f9b86e918ddcd0a4b956e18e SHA512 19a85ba5a4c2de1688f39feb6ce1c1802e4d886436dc02afe1ba508b91365a0ac67d668cf7126588145ee55641992ad71b0d094246a94c89065876b9bb897425
 DIST mysql-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28
+DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8

diff --git a/dev-db/mysql/mysql-5.7.26.ebuild b/dev-db/mysql/mysql-5.7.26-r1.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-5.7.26.ebuild
rename to dev-db/mysql/mysql-5.7.26-r1.ebuild
index 5c75a879138..ea0df7b4e11 100644
--- a/dev-db/mysql/mysql-5.7.26.ebuild
+++ b/dev-db/mysql/mysql-5.7.26-r1.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20190524-1046Z"
+MY_EXTRAS_VER="20190822-1908Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
@@ -54,7 +54,7 @@ PATCHES=(
 	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
 	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
 	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.26-without-clientlibs-tools.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-libressl-support.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch

diff --git a/dev-db/mysql/mysql-5.7.27.ebuild b/dev-db/mysql/mysql-5.7.27-r1.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-5.7.27.ebuild
rename to dev-db/mysql/mysql-5.7.27-r1.ebuild
index 81848199c42..45c4fd67d30 100644
--- a/dev-db/mysql/mysql-5.7.27.ebuild
+++ b/dev-db/mysql/mysql-5.7.27-r1.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20190604-1109Z"
+MY_EXTRAS_VER="20190822-1908Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
@@ -54,7 +54,7 @@ PATCHES=(
 	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
 	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
 	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.26-without-clientlibs-tools.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-libressl-support.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-19 18:34 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-19 18:34 UTC (permalink / raw
  To: gentoo-commits

commit:     7d192490e75a8b42632128c1c7a6b0c918331f52
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 19 18:34:09 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Aug 19 18:34:09 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d192490

dev-db/mysql: add missing patch

20018_all_mysql-8.0.17-add-protobuf-3.8+-support.patch was forgotton to add.

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

 dev-db/mysql/mysql-8.0.17.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-db/mysql/mysql-8.0.17.ebuild b/dev-db/mysql/mysql-8.0.17.ebuild
index 9bf70ba0f6b..2697f678656 100644
--- a/dev-db/mysql/mysql-8.0.17.ebuild
+++ b/dev-db/mysql/mysql-8.0.17.ebuild
@@ -58,6 +58,7 @@ PATCHES=(
 	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-8.0.17.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.17-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.17-add-protobuf-3.8+-support.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.17-fix-libressl-support.patch
 )
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-18 12:34 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-18 12:34 UTC (permalink / raw
  To: gentoo-commits

commit:     dee630c7fee42ae9196065e93bbd61cff34194de
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 18 12:33:13 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Aug 18 12:34:46 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dee630c7

dev-db/mysql: using SSL is mandatory

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

 dev-db/mysql/mysql-8.0.17.ebuild | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.17.ebuild b/dev-db/mysql/mysql-8.0.17.ebuild
index df67c9534ad..9bf70ba0f6b 100644
--- a/dev-db/mysql/mysql-8.0.17.ebuild
+++ b/dev-db/mysql/mysql-8.0.17.ebuild
@@ -30,7 +30,7 @@ DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="0"
 IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
-	router selinux ssl tcmalloc test"
+	router selinux tcmalloc test"
 
 # Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
 RESTRICT="libressl? ( test )"
@@ -77,10 +77,8 @@ COMMON_DEPEND="
 		sys-process/procps:0=
 	)
 	numa? ( sys-process/numactl )
-	ssl? (
-		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-		libressl? ( dev-libs/libressl:0= )
-	)
+	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+	libressl? ( dev-libs/libressl:0= )
 	tcmalloc? ( dev-util/google-perftools:0= )
 "
 DEPEND="${COMMON_DEPEND}
@@ -224,10 +222,9 @@ src_configure(){
 		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
 		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
 		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
 		-DWITH_EDITLINE=system
 		-DWITH_ZLIB=system
-		-DWITH_SSL=$(usex ssl system wolfssl)
+		-DWITH_SSL=system
 		-DWITH_LIBWRAP=0
 		-DENABLED_LOCAL_INFILE=1
 		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-17 20:13 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-17 20:13 UTC (permalink / raw
  To: gentoo-commits

commit:     75f6041c30ba38fd1486a9843a246d585ed4f48c
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 17 20:13:10 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Aug 17 20:13:29 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75f6041c

dev-db/mysql: disable rpm call

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

 dev-db/mysql/mysql-8.0.17.ebuild | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dev-db/mysql/mysql-8.0.17.ebuild b/dev-db/mysql/mysql-8.0.17.ebuild
index d2e0717c4ab..df67c9534ad 100644
--- a/dev-db/mysql/mysql-8.0.17.ebuild
+++ b/dev-db/mysql/mysql-8.0.17.ebuild
@@ -164,6 +164,11 @@ src_unpack() {
 }
 
 src_prepare() {
+	# Avoid rpm call which would trigger sandbox, #692368
+	sed -i \
+		-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+		CMakeLists.txt || die
+
 	if use jemalloc ; then
 		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
 	fi


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-17 18:42 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-17 18:42 UTC (permalink / raw
  To: gentoo-commits

commit:     f273d4f65ce6d04b4e6095df1449144f76cf14b1
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 17 18:39:58 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Aug 17 18:42:19 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f273d4f6

dev-db/mysql: disable tests requiring <openssl-1.1.1

Bug: https://bugs.gentoo.org/679264
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.44-r1.ebuild | 11 ++++++-----
 dev-db/mysql/mysql-5.6.45-r1.ebuild | 11 ++++++-----
 dev-db/mysql/mysql-5.7.26.ebuild    | 32 ++++++++++++++++++++++++++++++++
 dev-db/mysql/mysql-5.7.27.ebuild    | 32 ++++++++++++++++++++++++++++++++
 4 files changed, 76 insertions(+), 10 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.44-r1.ebuild b/dev-db/mysql/mysql-5.6.44-r1.ebuild
index c9f4057f701..e51ea5affde 100644
--- a/dev-db/mysql/mysql-5.6.44-r1.ebuild
+++ b/dev-db/mysql/mysql-5.6.44-r1.ebuild
@@ -501,14 +501,15 @@ src_test() {
 	if has_version '>=dev-libs/openssl-1.1.0' ; then
 		# Tests are expecting <openssl-1.1 default cipher
 		for t in \
+			main.openssl_1 \
+			main.plugin_auth_sha256_tls \
+			main.ssl \
 			main.ssl_8k_key \
-			main.ssl-sha512 \
-			main.ssl_crl \
 			main.ssl_ca \
-			main.ssl \
+			main.ssl_cipher\
 			main.ssl_compress \
-			main.plugin_auth_sha256_tls \
-			main.openssl_1 \
+			main.ssl_crl \
+			main.ssl-sha512 \
 		; do
 			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.0"
 		done

diff --git a/dev-db/mysql/mysql-5.6.45-r1.ebuild b/dev-db/mysql/mysql-5.6.45-r1.ebuild
index 138b0cab850..dfea0d2a2a4 100644
--- a/dev-db/mysql/mysql-5.6.45-r1.ebuild
+++ b/dev-db/mysql/mysql-5.6.45-r1.ebuild
@@ -506,14 +506,15 @@ src_test() {
 	if has_version '>=dev-libs/openssl-1.1.0' ; then
 		# Tests are expecting <openssl-1.1 default cipher
 		for t in \
+			main.openssl_1 \
+			main.plugin_auth_sha256_tls \
+			main.ssl \
 			main.ssl_8k_key \
-			main.ssl-sha512 \
-			main.ssl_crl \
 			main.ssl_ca \
-			main.ssl \
+			main.ssl_cipher\
 			main.ssl_compress \
-			main.plugin_auth_sha256_tls \
-			main.openssl_1 \
+			main.ssl_crl \
+			main.ssl-sha512 \
 		; do
 			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.0"
 		done

diff --git a/dev-db/mysql/mysql-5.7.26.ebuild b/dev-db/mysql/mysql-5.7.26.ebuild
index e7e64676eac..e7550e70b18 100644
--- a/dev-db/mysql/mysql-5.7.26.ebuild
+++ b/dev-db/mysql/mysql-5.7.26.ebuild
@@ -605,6 +605,38 @@ src_test() {
 		done
 	fi
 
+	if has_version '>=dev-libs/openssl-1.1.1' ; then
+		# Tests are expecting <openssl-1.1.1 default cipher
+		for t in \
+			auth_sec.cert_verify \
+			auth_sec.mysql_ssl_connection \
+			auth_sec.openssl_cert_generation \
+			auth_sec.ssl_auto_detect \
+			auth_sec.ssl_mode \
+			auth_sec.tls \
+			binlog.binlog_grant_alter_user \
+			encryption.innodb_onlinealter_encryption \
+			main.grant_alter_user_qa \
+			main.grant_user_lock_qa \
+			main.mysql_ssl_default \
+			main.openssl_1 \
+			main.plugin_auth_sha256_tls \
+			main.ssl \
+			main.ssl_8k_key \
+			main.ssl_bug75311 \
+			main.ssl_ca \
+			main.ssl_cipher \
+			main.ssl_compress \
+			main.ssl_crl \
+			main.ssl_ecdh \
+			main.ssl_verify_identity \
+			x.connection_tls_version \
+			x.connection_openssl \
+		; do
+			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
+		done
+	fi
+
 	# Try to increase file limits to increase test coverage
 	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
 		# Upper limit comes from parts.partition_* tests

diff --git a/dev-db/mysql/mysql-5.7.27.ebuild b/dev-db/mysql/mysql-5.7.27.ebuild
index af33f7a4a31..81848199c42 100644
--- a/dev-db/mysql/mysql-5.7.27.ebuild
+++ b/dev-db/mysql/mysql-5.7.27.ebuild
@@ -612,6 +612,38 @@ src_test() {
 		done
 	fi
 
+	if has_version '>=dev-libs/openssl-1.1.1' ; then
+		# Tests are expecting <openssl-1.1.1 default cipher
+		for t in \
+			auth_sec.cert_verify \
+			auth_sec.mysql_ssl_connection \
+			auth_sec.openssl_cert_generation \
+			auth_sec.ssl_auto_detect \
+			auth_sec.ssl_mode \
+			auth_sec.tls \
+			binlog.binlog_grant_alter_user \
+			encryption.innodb_onlinealter_encryption \
+			main.grant_alter_user_qa \
+			main.grant_user_lock_qa \
+			main.mysql_ssl_default \
+			main.openssl_1 \
+			main.plugin_auth_sha256_tls \
+			main.ssl \
+			main.ssl_8k_key \
+			main.ssl_bug75311 \
+			main.ssl_ca \
+			main.ssl_cipher \
+			main.ssl_compress \
+			main.ssl_crl \
+			main.ssl_ecdh \
+			main.ssl_verify_identity \
+			x.connection_tls_version \
+			x.connection_openssl \
+		; do
+			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.1"
+		done
+	fi
+
 	# Try to increase file limits to increase test coverage
 	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
 		# Upper limit comes from parts.partition_* tests


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-17 18:42 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-17 18:42 UTC (permalink / raw
  To: gentoo-commits

commit:     b58ad9a17e25a8d5ae8dd4f0a3cfd8917738f954
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 17 18:41:42 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Aug 17 18:42:20 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b58ad9a1

dev-db/mysql: use system's protobuf

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

 dev-db/mysql/mysql-8.0.17.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-8.0.17.ebuild b/dev-db/mysql/mysql-8.0.17.ebuild
index 51417c5920d..d2e0717c4ab 100644
--- a/dev-db/mysql/mysql-8.0.17.ebuild
+++ b/dev-db/mysql/mysql-8.0.17.ebuild
@@ -256,7 +256,7 @@ src_configure(){
 		-DWITH_RE2=system
 		-DWITH_LIBEVENT=system
 		-DWITH_LZ4=system
-		-DWITH_PROTOBUF=bundled
+		-DWITH_PROTOBUF=system
 		-DWITH_MECAB=$(usex cjk system OFF)
 		-DWITH_NUMA=$(usex numa ON OFF)
 		# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-17 13:48 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-17 13:48 UTC (permalink / raw
  To: gentoo-commits

commit:     62c4958c9adbc445838f5bb533ead2f75b22413e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 17 13:00:04 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Aug 17 13:45:29 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62c4958c

dev-db/mysql: remove _pre suffix

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

 dev-db/mysql/Manifest                                          | 1 -
 dev-db/mysql/{mysql-8.0.17_pre4.ebuild => mysql-8.0.17.ebuild} | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 9d6e04b8b8f..c6e668354db 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -17,5 +17,4 @@ DIST mysql-extras-20181111-2314Z.tar.bz2 329013 BLAKE2B fa928b699ef0e6f092e028fc
 DIST mysql-extras-20190303-1852Z.tar.bz2 331026 BLAKE2B ee033fce8f1b6a58f1f690710fb9709a585cd45564b35e71d4f840a3a7f83a5d80f53c24236c9976319abd89c68c62c74a7111517f1b9721d3cbd0898bf0dd8d SHA512 30361a0b848ed27f9170b1116458a9bc13b1b585c5fa1933c99927541c31e9bda4008b0563f2fc7db286f998089ebebf1fe3f18fce7a45e62acbf769ac62d8c1
 DIST mysql-extras-20190524-1046Z.tar.bz2 331517 BLAKE2B e6d48e34b0a7f7176de8740971f8151923beb20a520df73c22d44005059ef6779ad5aa8437e30018b9bbfe1d6d69043cbd8522b6f3662746205193b44372a6b3 SHA512 2f7238578f3aabd1701e1c54da36bc0100c9479871e3c77b22131fd6cde865037307f93b3343ea5e52251c45ef35cdc52cc2dec5a26d44fd41700598282c5c2c
 DIST mysql-extras-20190604-1109Z.tar.bz2 331780 BLAKE2B 48b6f6ff36818ba3d1d9c0580b0ff5e2343d92a42ee78b6804841d7c4f511adcdc3d5cd0590f769f308ca52e271c07cb34219450f9b86e918ddcd0a4b956e18e SHA512 19a85ba5a4c2de1688f39feb6ce1c1802e4d886436dc02afe1ba508b91365a0ac67d668cf7126588145ee55641992ad71b0d094246a94c89065876b9bb897425
-DIST mysql-extras-20190802-1549Z.tar.bz2 335077 BLAKE2B c4c4e38d30c9e4e02cdbcf4117f020e044374370bf32f6e013aa37ae6794445f3ef12e46abbdb5fefd85a68fe5af6b417363012a64d1fd97d79d478bb4b3749d SHA512 5c19a9ce9fe0d95788cc25fed0c2f987b46fa85accf7440a569066f4ac1b9f8522a0855fa884a128d7ccee17fecc25f4b16a16b3cd962c39f3670819eef2f6dc
 DIST mysql-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28

diff --git a/dev-db/mysql/mysql-8.0.17_pre4.ebuild b/dev-db/mysql/mysql-8.0.17.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-8.0.17_pre4.ebuild
rename to dev-db/mysql/mysql-8.0.17.ebuild
index e83b57d1ba0..040604e7eef 100644
--- a/dev-db/mysql/mysql-8.0.17_pre4.ebuild
+++ b/dev-db/mysql/mysql-8.0.17.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
-MY_EXTRAS_VER="20190802-1549Z"
+MY_EXTRAS_VER="20190817-0024Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-17 13:48 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-17 13:48 UTC (permalink / raw
  To: gentoo-commits

commit:     7f9e0c126112c4245aef8ae0eeb639d58dd39660
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 17 12:56:43 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Aug 17 13:45:22 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f9e0c12

dev-db/mysql: update disabled tests list

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

 dev-db/mysql/mysql-5.6.44-r1.ebuild | 36 ++++++++++++++++++++++++++++++++++--
 dev-db/mysql/mysql-5.6.45-r1.ebuild | 36 ++++++++++++++++++++++++++++++++++--
 dev-db/mysql/mysql-5.7.26.ebuild    | 28 +++++++++++++++++++++-------
 dev-db/mysql/mysql-5.7.27.ebuild    | 28 +++++++++++++++++++++-------
 4 files changed, 110 insertions(+), 18 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.44-r1.ebuild b/dev-db/mysql/mysql-5.6.44-r1.ebuild
index c870688eb8e..c9f4057f701 100644
--- a/dev-db/mysql/mysql-5.6.44-r1.ebuild
+++ b/dev-db/mysql/mysql-5.6.44-r1.ebuild
@@ -481,8 +481,40 @@ src_test() {
 			_disable_test  "$t" "False positives in Gentoo"
 	done
 
-	# Bad test definition
-	_disable_test main.mysqldump "Test fails after 2018-12-31 with new warnings"
+	if ! use latin1 ; then
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+		; do
+			_disable_test  "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	if has_version '>=dev-libs/openssl-1.1.0' ; then
+		# Tests are expecting <openssl-1.1 default cipher
+		for t in \
+			main.ssl_8k_key \
+			main.ssl-sha512 \
+			main.ssl_crl \
+			main.ssl_ca \
+			main.ssl \
+			main.ssl_compress \
+			main.plugin_auth_sha256_tls \
+			main.openssl_1 \
+		; do
+			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.0"
+		done
+	fi
+
+	_disable_test main.gis-precise "Known rounding error with latest AMD processors"
 
 	# run mysql-test tests
 	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"

diff --git a/dev-db/mysql/mysql-5.6.45-r1.ebuild b/dev-db/mysql/mysql-5.6.45-r1.ebuild
index cda536ad33f..138b0cab850 100644
--- a/dev-db/mysql/mysql-5.6.45-r1.ebuild
+++ b/dev-db/mysql/mysql-5.6.45-r1.ebuild
@@ -486,8 +486,40 @@ src_test() {
 			_disable_test  "$t" "False positives in Gentoo"
 	done
 
-	# Bad test definition
-	_disable_test main.mysqldump "Test fails after 2018-12-31 with new warnings"
+	if ! use latin1 ; then
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+		; do
+			_disable_test  "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	if has_version '>=dev-libs/openssl-1.1.0' ; then
+		# Tests are expecting <openssl-1.1 default cipher
+		for t in \
+			main.ssl_8k_key \
+			main.ssl-sha512 \
+			main.ssl_crl \
+			main.ssl_ca \
+			main.ssl \
+			main.ssl_compress \
+			main.plugin_auth_sha256_tls \
+			main.openssl_1 \
+		; do
+			_disable_test  "$t" "Requires <dev-libs/openssl-1.1.0"
+		done
+	fi
+
+	_disable_test main.gis-precise "Known rounding error with latest AMD processors"
 
 	# run mysql-test tests
 	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"

diff --git a/dev-db/mysql/mysql-5.7.26.ebuild b/dev-db/mysql/mysql-5.7.26.ebuild
index a956940eb6f..e7e64676eac 100644
--- a/dev-db/mysql/mysql-5.7.26.ebuild
+++ b/dev-db/mysql/mysql-5.7.26.ebuild
@@ -546,15 +546,29 @@ src_test() {
 
 	# Unstable tests
 	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
 	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in main.xa_prepared_binlog_off rpl.rpl_non_direct_stm_mixing_engines ; do
-			_disable_test "$t" "Unstable test"
+	for t in \
+		main.xa_prepared_binlog_off \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_non_direct_stm_mixing_engines \
+	; do
+		_disable_test "$t" "Unstable test"
 	done
 
-	if ! use amd64 ; then
-		# fixed in >=mysql-8 via commit 0a417e84
-		_disable_test "gis.gis_bugs_crashes" "Unstable results on non-amd64 architectures due to floating-point operation"
-	fi
+	for t in \
+		gis.geometry_class_attri_prop \
+		gis.geometry_property_function_issimple \
+		gis.gis_bugs_crashes \
+		gis.spatial_op_testingfunc_mix \
+		gis.spatial_analysis_functions_buffer \
+		gis.spatial_analysis_functions_distance \
+		gis.spatial_utility_function_distance_sphere \
+		gis.spatial_utility_function_simplify \
+		gis.spatial_analysis_functions_centroid \
+	; do
+		_disable_test "$t" "Known rounding error with latest AMD processors"
+	done
 
 	if use numa && use kernel_linux ; then
 		# bug 584880
@@ -587,7 +601,7 @@ src_test() {
 			rpl.rpl_xa_survive_disconnect_lsu_off \
 			rpl.rpl_xa_survive_disconnect_table \
 		; do
-				_disable_test "$t" "requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
 		done
 	fi
 

diff --git a/dev-db/mysql/mysql-5.7.27.ebuild b/dev-db/mysql/mysql-5.7.27.ebuild
index 05cb0dc5f93..af33f7a4a31 100644
--- a/dev-db/mysql/mysql-5.7.27.ebuild
+++ b/dev-db/mysql/mysql-5.7.27.ebuild
@@ -553,15 +553,29 @@ src_test() {
 
 	# Unstable tests
 	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
 	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
-	for t in main.xa_prepared_binlog_off rpl.rpl_non_direct_stm_mixing_engines ; do
-			_disable_test "$t" "Unstable test"
+	for t in \
+		main.xa_prepared_binlog_off \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_non_direct_stm_mixing_engines \
+	; do
+		_disable_test "$t" "Unstable test"
 	done
 
-	if ! use amd64 ; then
-		# fixed in >=mysql-8 via commit 0a417e84
-		_disable_test "gis.gis_bugs_crashes" "Unstable results on non-amd64 architectures due to floating-point operation"
-	fi
+	for t in \
+		gis.geometry_class_attri_prop \
+		gis.geometry_property_function_issimple \
+		gis.gis_bugs_crashes \
+		gis.spatial_op_testingfunc_mix \
+		gis.spatial_analysis_functions_buffer \
+		gis.spatial_analysis_functions_distance \
+		gis.spatial_utility_function_distance_sphere \
+		gis.spatial_utility_function_simplify \
+		gis.spatial_analysis_functions_centroid \
+	; do
+		_disable_test "$t" "Known rounding error with latest AMD processors"
+	done
 
 	if use numa && use kernel_linux ; then
 		# bug 584880
@@ -594,7 +608,7 @@ src_test() {
 			rpl.rpl_xa_survive_disconnect_lsu_off \
 			rpl.rpl_xa_survive_disconnect_table \
 		; do
-				_disable_test "$t" "requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+			_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
 		done
 	fi
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-17  0:50 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-17  0:50 UTC (permalink / raw
  To: gentoo-commits

commit:     2a000ead4cfd4fc9713d95fe942362ae1f9ddbe5
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 17 00:34:01 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Aug 17 00:50:06 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a000ead

dev-db/mysql: move /usr/sql-bench to /usr/share/mysql

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

 dev-db/mysql/{mysql-5.6.44.ebuild => mysql-5.6.44-r1.ebuild} | 4 ++++
 dev-db/mysql/{mysql-5.6.45.ebuild => mysql-5.6.45-r1.ebuild} | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/dev-db/mysql/mysql-5.6.44.ebuild b/dev-db/mysql/mysql-5.6.44-r1.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-5.6.44.ebuild
rename to dev-db/mysql/mysql-5.6.44-r1.ebuild
index db524e08ba4..c870688eb8e 100644
--- a/dev-db/mysql/mysql-5.6.44.ebuild
+++ b/dev-db/mysql/mysql-5.6.44-r1.ebuild
@@ -371,6 +371,10 @@ src_install() {
 		rm -Rf "${ED}/usr/data" || die
 	fi
 
+	if [[ -d "${ED%/}/usr/sql-bench" ]] ; then
+		mv "${ED%/}/usr/sql-bench" "${ED%/}/usr/share/mysql/" || die
+	fi
+
 	# Unless they explicitly specific USE=test, then do not install the
 	# testsuite. It DOES have a use to be installed, esp. when you want to do a
 	# validation of your database configuration after tuning it.

diff --git a/dev-db/mysql/mysql-5.6.45.ebuild b/dev-db/mysql/mysql-5.6.45-r1.ebuild
similarity index 99%
rename from dev-db/mysql/mysql-5.6.45.ebuild
rename to dev-db/mysql/mysql-5.6.45-r1.ebuild
index 4c2579a3156..cda536ad33f 100644
--- a/dev-db/mysql/mysql-5.6.45.ebuild
+++ b/dev-db/mysql/mysql-5.6.45-r1.ebuild
@@ -376,6 +376,10 @@ src_install() {
 		rm -Rf "${ED}/usr/data" || die
 	fi
 
+	if [[ -d "${ED%/}/usr/sql-bench" ]] ; then
+		mv "${ED%/}/usr/sql-bench" "${ED%/}/usr/share/mysql/" || die
+	fi
+
 	# Unless they explicitly specific USE=test, then do not install the
 	# testsuite. It DOES have a use to be installed, esp. when you want to do a
 	# validation of your database configuration after tuning it.


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-17  0:50 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-17  0:50 UTC (permalink / raw
  To: gentoo-commits

commit:     1e9163dfe6a46601fa9c00c2f3af79a7a8e8ef4a
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 17 00:31:47 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Aug 17 00:50:05 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e9163df

dev-db/mysql: man/zlib_decompress.1 not present in 5.6

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.45.ebuild | 1 -
 1 file changed, 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.45.ebuild b/dev-db/mysql/mysql-5.6.45.ebuild
index d25d5ae4af3..4c2579a3156 100644
--- a/dev-db/mysql/mysql-5.6.45.ebuild
+++ b/dev-db/mysql/mysql-5.6.45.ebuild
@@ -201,7 +201,6 @@ src_prepare() {
 	rm \
 		man/my_print_defaults.1 \
 		man/perror.1 \
-		man/zlib_decompress.1 \
 		|| die
 
 	if use libressl ; then


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-17  0:50 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-17  0:50 UTC (permalink / raw
  To: gentoo-commits

commit:     89bfc65152efe054e9b4832dd2fcaacdf1b64732
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 17 00:30:23 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Aug 17 00:50:04 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89bfc651

dev-db/mysql: Add OpenSSL 1.1 support for MysqL 5.6

Compile support only. No test coverage.

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.44.ebuild | 3 ++-
 dev-db/mysql/mysql-5.6.45.ebuild | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.44.ebuild b/dev-db/mysql/mysql-5.6.44.ebuild
index 0b99352c70a..db524e08ba4 100644
--- a/dev-db/mysql/mysql-5.6.44.ebuild
+++ b/dev-db/mysql/mysql-5.6.44.ebuild
@@ -66,6 +66,7 @@ PATCHES=(
 	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
 	"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.44-fix-libressl-support.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.44-add-openssl-1.1-support.patch
 )
 
 # Be warned, *DEPEND are version-dependant
@@ -82,7 +83,7 @@ COMMON_DEPEND="
 	tcmalloc? ( dev-util/google-perftools:0= )
 	systemtap? ( >=dev-util/systemtap-1.3:0= )
 	!yassl? (
-		!libressl? ( =dev-libs/openssl-1.0.2*:0= )
+		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
 		libressl? ( =dev-libs/libressl-2.6.5*:0= )
 	)
 	>=sys-libs/zlib-1.2.3:0=

diff --git a/dev-db/mysql/mysql-5.6.45.ebuild b/dev-db/mysql/mysql-5.6.45.ebuild
index 853675b36ad..d25d5ae4af3 100644
--- a/dev-db/mysql/mysql-5.6.45.ebuild
+++ b/dev-db/mysql/mysql-5.6.45.ebuild
@@ -65,6 +65,7 @@ PATCHES=(
 	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
 	"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.44-fix-libressl-support.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.44-add-openssl-1.1-support.patch
 )
 
 # Be warned, *DEPEND are version-dependant
@@ -81,7 +82,7 @@ COMMON_DEPEND="
 	tcmalloc? ( dev-util/google-perftools:0= )
 	systemtap? ( >=dev-util/systemtap-1.3:0= )
 	!yassl? (
-		!libressl? ( =dev-libs/openssl-1.0.2*:0= )
+		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
 		libressl? ( =dev-libs/libressl-2.6.5*:0= )
 	)
 	>=sys-libs/zlib-1.2.3:0=


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-17  0:50 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-17  0:50 UTC (permalink / raw
  To: gentoo-commits

commit:     d4de95234c899666c1064b75b362c53e17e67029
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 17 00:27:34 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Aug 17 00:50:02 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4de9523

dev-db/mysql: Fix LibreSSL patch

Closes: https://bugs.gentoo.org/692124
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest            | 1 +
 dev-db/mysql/mysql-5.6.44.ebuild | 2 +-
 dev-db/mysql/mysql-5.6.45.ebuild | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index e62e6cdd338..9d6e04b8b8f 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -18,3 +18,4 @@ DIST mysql-extras-20190303-1852Z.tar.bz2 331026 BLAKE2B ee033fce8f1b6a58f1f69071
 DIST mysql-extras-20190524-1046Z.tar.bz2 331517 BLAKE2B e6d48e34b0a7f7176de8740971f8151923beb20a520df73c22d44005059ef6779ad5aa8437e30018b9bbfe1d6d69043cbd8522b6f3662746205193b44372a6b3 SHA512 2f7238578f3aabd1701e1c54da36bc0100c9479871e3c77b22131fd6cde865037307f93b3343ea5e52251c45ef35cdc52cc2dec5a26d44fd41700598282c5c2c
 DIST mysql-extras-20190604-1109Z.tar.bz2 331780 BLAKE2B 48b6f6ff36818ba3d1d9c0580b0ff5e2343d92a42ee78b6804841d7c4f511adcdc3d5cd0590f769f308ca52e271c07cb34219450f9b86e918ddcd0a4b956e18e SHA512 19a85ba5a4c2de1688f39feb6ce1c1802e4d886436dc02afe1ba508b91365a0ac67d668cf7126588145ee55641992ad71b0d094246a94c89065876b9bb897425
 DIST mysql-extras-20190802-1549Z.tar.bz2 335077 BLAKE2B c4c4e38d30c9e4e02cdbcf4117f020e044374370bf32f6e013aa37ae6794445f3ef12e46abbdb5fefd85a68fe5af6b417363012a64d1fd97d79d478bb4b3749d SHA512 5c19a9ce9fe0d95788cc25fed0c2f987b46fa85accf7440a569066f4ac1b9f8522a0855fa884a128d7ccee17fecc25f4b16a16b3cd962c39f3670819eef2f6dc
+DIST mysql-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28

diff --git a/dev-db/mysql/mysql-5.6.44.ebuild b/dev-db/mysql/mysql-5.6.44.ebuild
index 312951b5e58..0b99352c70a 100644
--- a/dev-db/mysql/mysql-5.6.44.ebuild
+++ b/dev-db/mysql/mysql-5.6.44.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20190604-1109Z"
+MY_EXTRAS_VER="20190817-0024Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 

diff --git a/dev-db/mysql/mysql-5.6.45.ebuild b/dev-db/mysql/mysql-5.6.45.ebuild
index 5526aadc972..853675b36ad 100644
--- a/dev-db/mysql/mysql-5.6.45.ebuild
+++ b/dev-db/mysql/mysql-5.6.45.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20190604-1109Z"
+MY_EXTRAS_VER="20190817-0024Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-14 22:57 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-14 22:57 UTC (permalink / raw
  To: gentoo-commits

commit:     02fc0893c88cb59d6d9eddb2300a3c00ce791d08
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 14 22:08:35 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Aug 14 22:56:07 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02fc0893

dev-db/mysql: fix prefix support

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

 ...8.0.17_pre3.ebuild => mysql-8.0.17_pre4.ebuild} | 304 +++++++++++++--------
 1 file changed, 197 insertions(+), 107 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.17_pre3.ebuild b/dev-db/mysql/mysql-8.0.17_pre4.ebuild
similarity index 79%
rename from dev-db/mysql/mysql-8.0.17_pre3.ebuild
rename to dev-db/mysql/mysql-8.0.17_pre4.ebuild
index 5b23f974d76..e83b57d1ba0 100644
--- a/dev-db/mysql/mysql-8.0.17_pre3.ebuild
+++ b/dev-db/mysql/mysql-8.0.17_pre4.ebuild
@@ -6,7 +6,7 @@ MY_EXTRAS_VER="20190802-1549Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
-inherit cmake-utils eutils flag-o-matic linux-info \
+inherit cmake-utils flag-o-matic linux-info \
 	multiprocessing prefix toolchain-funcs
 
 MY_PV="${PV//_pre*}"
@@ -107,49 +107,11 @@ RDEPEND="${COMMON_DEPEND}
 PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
 
 mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=$(my_print_defaults mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1)
-
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=$(grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1)
-			fi
-		fi
-
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]] ; then
-			MY_DATADIR=$(my_print_defaults mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1)
-		fi
-	fi
+	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	: ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	: ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	: ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_DATADIR="${MY_LOCALSTATEDIR}"
 
 	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
 	export MY_LOCALSTATEDIR MY_LOGDIR
@@ -500,7 +462,7 @@ src_install() {
 	# testsuite. It DOES have a use to be installed, esp. when you want to do a
 	# validation of your database configuration after tuning it.
 	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+		rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
 	fi
 
 	# Configuration stuff
@@ -556,7 +518,8 @@ pkg_postinst() {
 	mysql_init_vars
 
 	# Create log directory securely if it does not exist
-	[[ -d "${EROOT}/${MY_LOGDIR#/}" ]] || install -d -m0750 -o mysql -g mysql "${EROOT}/${MY_LOGDIR#/}"
+	# NOTE: $MY_LOGDIR contains $EPREFIX by default
+	[[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
 
 	# Note about configuration change
 	einfo
@@ -598,11 +561,38 @@ pkg_config() {
 		die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
 	fi
 
+	if [[ -z "${MYSQL_USER}" ]] ; then
+		MYSQL_USER=mysql
+		if use prefix ; then
+			MYSQL_USER=$(id -u -n 2>/dev/null)
+			if [[ -z "${MYSQL_USER}" ]] ; then
+				die "Failed to determine current username!"
+			fi
+		fi
+	fi
+
+	if [[ -z "${MYSQL_GROUP}" ]] ; then
+		MYSQL_GROUP=mysql
+		if use prefix ; then
+			MYSQL_GROUP=$(id -g -n 2>/dev/null)
+			if [[ -z "${MYSQL_GROUP}" ]] ; then
+				die "Failed to determine current user groupname!"
+			fi
+		fi
+	fi
+
+	einfo "Will use username '${MYSQL_USER}' and group '${MYSQL_GROUP}' ..."
+
 	_getoptval() {
 		local section="$1"
 		local flag="--${2}="
 		local extra_options="${3}"
-		local results=( $("${my_print_defaults_binary}" ${extra_options} ${section} | sed -n "/^${flag}/s,${flag},,gp") )
+		local cmd=(
+			"${my_print_defaults_binary}"
+			"${extra_options}"
+			"${section}"
+		)
+		local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
 
 		if [[ ${#results[@]} -gt 0 ]] ; then
 			# When option is set multiple times only return last value
@@ -610,33 +600,81 @@ pkg_config() {
 		fi
 	}
 
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
+	_mktemp_dry() {
+		# emktemp has no --dry-run option
+		local template="${1}"
+
+		if [[ -z "${template}" ]] ; then
+			if [[ -z "${T}" ]] ; then
+				template="/tmp/XXXXXXX"
+			else
+				template="${T}/XXXXXXX"
+			fi
+		fi
+
+		local template_wo_X=${template//X/}
+		local n_X
+		let n_X=${#template}-${#template_wo_X}
+		if [[ ${n_X} -lt 3 ]] ; then
+			echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+			return
+		fi
+
+		local attempts=0
+		local character tmpfile
+		while [[ true ]] ; do
+			let attempts=attempts+1
+
+			new_file=
+			while read -n1 character ; do
+				if [[ "${character}" == "X" ]] ; then
+					tmpfile+="${RANDOM:0:1}"
+				else
+					tmpfile+="${character}"
+				fi
+			done < <(echo -n "${template}")
+
+			if [[ ! -f "${tmpfile}" ]]
+			then
+				echo "${tmpfile}"
+				return
+			fi
+
+			if [[ ${attempts} -ge 100 ]] ; then
+				echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+				return
+			fi
+		done
+	}
+
 	# my_print_defaults needs to read stuff in $HOME/.my.cnf
 	local -x HOME="${EROOT}/root"
 
 	# Make sure the vars are correctly initialized
 	mysql_init_vars
 
+	# Read currently set data directory
+	MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
 	# Bug #213475 - MySQL _will_ object strenously if your machine is named
 	# localhost. Also causes weird failures.
 	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
 
 	if [[ -z "${MY_DATADIR}" ]] ; then
 		die "Sorry, unable to find MY_DATADIR!"
-	elif [[ -d "${EROOT}/${MY_DATADIR#/}/mysql" ]] ; then
-		ewarn "Looks like your data directory '${EROOT}/${MY_DATADIR#/}' is already initialized!"
+	elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+		ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
 		ewarn "Please rename or delete its content if you wish to initialize a new data directory."
-		die "${PN} data directory at '${EROOT}/${MY_DATADIR#/}' looks already initialized!"
+		die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
 	else
-		einfo "${PN} data directory detected as '${EROOT}/${MY_DATADIR#/}' ..."
+		einfo "${PN} data directory detected as '${MY_DATADIR}' ..."
 	fi
 
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
 	# These are dir+prefix
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
 	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
 	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
 
 	# Create missing directories.
@@ -646,79 +684,129 @@ pkg_config() {
 	PID_DIR="${EROOT}/run/mysqld"
 	if [[ ! -d "${PID_DIR}" ]] ; then
 		einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" \
+		install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
 			|| die "Failed to create PID directory '${PID_DIR}'!"
 	fi
 
-	local _pid_dir_testfile="$(mktemp --dry-run "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
-	su -s /bin/sh -c "touch ${_pid_dir_testfile}" mysql &>/dev/null
+	local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_pid_dir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_pid_dir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+	fi
+
 	if [[ $? -ne 0 ]] ; then
-		die "mysql user cannot write into PID dir '${PID_DIR}'!"
+		die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
 	else
 		rm "${_pid_dir_testfile}" || die
 		unset _pid_dir_testfile
 	fi
 
-	if [[ ! -d "${EROOT}/${MY_DATADIR#/}" ]] ; then
-		einfo "Creating ${PN} data directory '${EROOT}/${MY_DATADIR#/}' ..."
-		install -d -m 770 -o mysql -g mysql "${EROOT}/${MY_DATADIR#/}" \
-			|| die "Failed to create ${PN} data directory '${EROOT}/${MY_DATADIR#/}'!"
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+			|| die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+	fi
+
+	local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+	[[ -z "${_my_datadir_testfile}" ]] \
+		&& die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+	if use prefix ; then
+		touch "${_my_datadir_testfile}" &>/dev/null
+	else
+		su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
 	fi
 
-	local _my_datadir_testfile="$(mktemp --dry-run "${EROOT}/${MY_DATADIR#/}/.pkg_config-access-test.XXXXXXXXX")"
-	su -s /bin/sh -c "touch '${_my_datadir_testfile}'" mysql &>/dev/null
 	if [[ $? -ne 0 ]]; then
-		die "mysql user cannot write into data directory '${EROOT}/${MY_DATADIR#/}'!"
+		die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
 	else
 		rm "${_my_datadir_testfile}" || die
 		unset _my_datadir_testfile
 	fi
 
-	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${EROOT}/${MYSQL_TMPDIR#/}" ]] ; then
-		einfo "Creating ${PN} tmpdir '${EROOT}/${MYSQL_TMPDIR#/}' ..."
-		install -d -m 770 -o mysql -g mysql "${EROOT}/${MYSQL_TMPDIR#/}" \
-			|| die "Failed to create ${PN} tmpdir '${EROOT}/${MYSQL_TMPDIR#/}'!"
+	if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+		einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+			|| die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
 	fi
 
 	if [[ -n "${MYSQL_TMPDIR}" ]] ; then
-		local _my_tmpdir_testfile="$(mktemp --dry-run "${EROOT}/${MYSQL_TMPDIR#/}/.pkg_config-access-test.XXXXXXXXX")"
-		su -s /bin/sh -c "touch '${_my_tmpdir_testfile}'" mysql &>/dev/null
+		local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_tmpdir_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_tmpdir_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
 		if [[ $? -ne 0 ]]; then
-			die "mysql user cannot write into data directory '${EROOT}/${MYSQL_TMPDIR#/}'!"
+			die "${MYSQL_USER} user cannot write into data directory '${MYSQL_TMPDIR}'!"
 		else
 			rm "${_my_tmpdir_testfile}" || die
 			unset _my_tmpdir_testfile
 		fi
+	else
+		# If no tmpdir is set, mysqld will use default system tmpdir.
+		# However, we are using tmpdir from package manager at the
+		# moment which maybe isn't writeable for $MYSQL_USER...
+		MYSQL_TMPDIR="$(_mktemp_dry "${T}/mysqld-tmp.XXXXXXXXX")"
+		[[ -z "${MYSQL_TMPDIR}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+		mkdir "${MYSQL_TMPDIR}" || die
+		chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
 	fi
 
-	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${EROOT}/${MYSQL_LOG_BIN#/}" ]] ; then
-		einfo "Creating ${PN} log-bin directory '${EROOT}/${MYSQL_LOG_BIN}' ..."
-		install -d -m 770 -o mysql -g mysql "${EROOT}/${MYSQL_LOG_BIN}" \
-			|| die "Failed to create ${PN} log-bin directory '${EROOT}/${MYSQL_LOG_BIN}'"
+	if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+		einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+			|| die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
 	fi
 
 	if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
-		local _my_logbin_testfile="$(mktemp --dry-run "${EROOT}/${MYSQL_LOG_BIN#/}/.pkg_config-access-test.XXXXXXXXX")"
-		su -s /bin/sh -c "touch '${_my_logbin_testfile}'" mysql &>/dev/null
+		local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_logbin_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_logbin_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
 		if [[ $? -ne 0 ]]; then
-			die "mysql user cannot write into data directory '${EROOT}/${MYSQL_LOG_BIN#/}'!"
+			die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
 		else
 			rm "${_my_logbin_testfile}" || die
 			unset _my_logbin_testfile
 		fi
 	fi
 
-	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${EROOT}/${MYSQL_RELAY_LOG#/}" ]] ; then
-		einfo "Creating ${PN} relay-log directory '${EROOT}/${MYSQL_RELAY_LOG#/}' ..."
-		install -d -m 770 -o mysql -g mysql "${EROOT}/${MYSQL_RELAY_LOG#/}" \
-			|| die "Failed to create ${PN} relay-log directory '${EROOT}/${MYSQL_RELAY_LOG#/}'!"
+	if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+		einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+		install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+			|| die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
 	fi
 
 	if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
-		local _my_relaylog_testfile="$(mktemp --dry-run "${EROOT}/${MYSQL_RELAY_LOG#/}/.pkg_config-access-test.XXXXXXXXX")"
-		su -s /bin/sh -c "touch '${_my_relaylog_testfile}'" mysql &>/dev/null
+		local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+		[[ -z "${_my_relaylog_testfile}" ]] \
+			&& die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+		if use prefix ; then
+			touch "${_my_relaylog_testfile}" &>/dev/null
+		else
+			su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+		fi
+
 		if [[ $? -ne 0 ]]; then
-			die "mysql user cannot write into data directory '${EROOT}/${MYSQL_RELAY_LOG#/}'!"
+			die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
 		else
 			rm "${_my_relaylog_testfile}" || die
 			unset _my_relaylog_testfile
@@ -743,7 +831,7 @@ pkg_config() {
 
 	if [[ ${#config_files[@]} -gt 0 ]] ; then
 		if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
-			local tmp_mysql_default_authentication_plugin
+			local user_answer
 
 			echo
 			einfo "Please select default authentication plugin (enter number or plugin name):"
@@ -752,10 +840,10 @@ pkg_config() {
 			einfo
 			einfo "For details see:"
 			einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
-			read -p "    >" tmp_mysql_default_authentication_plugin
+			read -p "    >" user_answer
 			echo
 
-			case "${tmp_mysql_default_authentication_plugin}" in
+			case "${user_answer}" in
 				1|caching_sha2_password)
 					MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
 					;;
@@ -766,9 +854,11 @@ pkg_config() {
 					die "No authentication plugin selected!"
 					;;
 				*)
-					die "Authentication plugin '${tmp_mysql_default_authentication_plugin}' is unknown/unsupported!"
+					die "Authentication plugin '${user_answer}' is unknown/unsupported!"
 					;;
 			esac
+
+			unset user_answer
 		fi
 
 		local cfg_option cfg_option_tabs cfg_section
@@ -880,11 +970,11 @@ pkg_config() {
 		die "mysql_tzinfo_to_sql failed!"
 	fi
 
-	chown mysql "${tz_sql}" || die
+	chown ${MYSQL_USER} "${tz_sql}" || die
 
 	local mysql_install_log="${TMPDIR}/mysql_install_db.log"
 	touch "${mysql_install_log}" || die
-	chown mysql "${mysql_install_log}" || die
+	chown ${MYSQL_USER} "${mysql_install_log}" || die
 
 	# --initialize-insecure will not set root password
 	# --initialize would set a random one in the log which we don't need as we set it ourselves
@@ -894,17 +984,17 @@ pkg_config() {
 		"--initialize-insecure"
 		"--init-file='${tz_sql}'"
 		"--basedir='${EROOT}/usr'"
-		"--datadir='${EROOT}/${MY_DATADIR#/}'"
-		"--tmpdir='${EROOT}/${MYSQL_TMPDIR#/}'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
 		"--log-error='${mysql_install_log}'"
+		"--user=${MYSQL_USER}"
 	)
 
 	einfo "Initializing ${PN} data directory: ${cmd[@]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>>"${mysql_install_log}" 2>&1
+	eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
 
-	if [[ $? -ne 0 || ! -f "${EROOT}/${MY_DATADIR#/}/mysql.ibd" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}"
+	if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
 		die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
 	fi
 
@@ -915,24 +1005,24 @@ pkg_config() {
 
 	local mysqld_logfile="${TMPDIR}/mysqld.log"
 	touch "${mysqld_logfile}" || die
-	chown mysql "${mysqld_logfile}" || die
+	chown ${MYSQL_USER} "${mysqld_logfile}" || die
 
 	cmd=(
 		"${mysqld_binary}"
 		"${mysqld_options[@]}"
 		"--basedir='${EROOT}/usr'"
-		"--datadir='${EROOT}/${MY_DATADIR#/}'"
+		"--datadir='${MY_DATADIR}'"
+		"--tmpdir='${MYSQL_TMPDIR}'"
 		--max_allowed_packet=8M
 		--net_buffer_length=16K
 		"--socket='${socket}'"
 		"--pid-file='${pidfile}'"
-		"--tmpdir='${EROOT}/${MYSQL_TMPDIR#/}'"
 		"--log-error='${mysqld_logfile}'"
+		"--user=${MYSQL_USER}"
 	)
 
 	einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
-	su -s /bin/sh -c "${cmd[*]} &" mysql \
-		>>"${mysqld_logfile}" 2>&1
+	eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
 
 	echo -n "Waiting for mysqld to accept connections "
 	local maxtry=15
@@ -956,7 +1046,7 @@ pkg_config() {
 	echo
 
 	if [[ ! -S "${socket}" ]] ; then
-		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}"
+		grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
 		die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
 	fi
 
@@ -1008,5 +1098,5 @@ pkg_config() {
 		fi
 	fi
 
-	einfo "${PN} data directory at '${EROOT}/${MY_DATADIR#/}' successfully initialized!"
+	einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
 }


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-08 19:42 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-08 19:42 UTC (permalink / raw
  To: gentoo-commits

commit:     684ed130d446891ecd16927e0c2703283af52919
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  8 19:41:49 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Aug  8 19:42:16 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=684ed130

dev-db/mysql: bump

- Remove USE=static which is broken upstream:

    CMake Error at scripts/CMakeLists.txt:395 (GET_TARGET_PROPERTY):
      get_target_property() called with non-existent target "libmysql".

- Remove subslot because we don't install any lib anymore (USE=client-lib
  was removed)

- Update DEPEND/RDEPEND

- Die early in pkg_setup instead of src_test

- Limit MTR_PARALLEL to 4 instead of "auto" to avoid test failures
  because other settings like ulimit, fs.aio-max-nr must allow running
  so many servers in parallel. User can still override.

- Disable test "auth_sec.keyring_file_data_qa" by default which won't
  work in sandbox/with user privs.

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

 ...8.0.17_pre1.ebuild => mysql-8.0.17_pre2.ebuild} | 135 +++++++++++----------
 1 file changed, 70 insertions(+), 65 deletions(-)

diff --git a/dev-db/mysql/mysql-8.0.17_pre1.ebuild b/dev-db/mysql/mysql-8.0.17_pre2.ebuild
similarity index 92%
rename from dev-db/mysql/mysql-8.0.17_pre1.ebuild
rename to dev-db/mysql/mysql-8.0.17_pre2.ebuild
index a1c1a4d312e..c6e2674b422 100644
--- a/dev-db/mysql/mysql-8.0.17_pre1.ebuild
+++ b/dev-db/mysql/mysql-8.0.17_pre2.ebuild
@@ -6,10 +6,8 @@ MY_EXTRAS_VER="20190802-1549Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
 inherit cmake-utils eutils flag-o-matic linux-info \
-	prefix toolchain-funcs
+	multiprocessing prefix toolchain-funcs
 
 MY_PV="${PV//_pre*}"
 MY_P="${PN}-${MY_PV}"
@@ -30,9 +28,9 @@ fi
 HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
-SLOT="0/21"
-IUSE="cjk cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
-	router selinux ssl static tcmalloc test"
+SLOT="0"
+IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+	router selinux ssl tcmalloc test"
 
 # Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
 RESTRICT="libressl? ( test )"
@@ -65,36 +63,32 @@ PATCHES=(
 
 # Be warned, *DEPEND are version-dependant
 # These are used for both runtime and compiletime
-COMMON_DEPEND="net-misc/curl:=
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	sys-libs/ncurses:0=
-	dev-db/mysql-connector-c
-	>=dev-libs/protobuf-3.8
+COMMON_DEPEND="
 	>=app-arch/lz4-0_p131:=
+	dev-libs/icu:=
 	dev-libs/libedit
-	cjk? ( app-text/mecab:= )
 	dev-libs/libevent:=
 	net-libs/libtirpc:=
-	numa? ( sys-process/numactl )
 	>=sys-libs/zlib-1.2.3:0=
+	cjk? ( app-text/mecab:= )
 	jemalloc? ( dev-libs/jemalloc:0= )
 	kernel_linux? (
 		dev-libs/libaio:0=
 		sys-process/procps:0=
 	)
-	tcmalloc? ( dev-util/google-perftools:0= )
+	numa? ( sys-process/numactl )
 	ssl? (
 		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
 		libressl? ( dev-libs/libressl:0= )
 	)
+	tcmalloc? ( dev-util/google-perftools:0= )
 "
 DEPEND="${COMMON_DEPEND}
 	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/re2
+	>=dev-libs/protobuf-3.8
+	net-libs/rpcsvc-proto
 	virtual/yacc
-	dev-libs/libevent
-	experimental? ( net-libs/rpcsvc-proto )
-	static? ( sys-libs/ncurses[static-libs] )
 	test? (
 		acct-group/mysql acct-user/mysql
 		dev-perl/JSON
@@ -168,14 +162,39 @@ mysql_init_vars() {
 	export MY_DATADIR
 }
 
-pkg_pretend() {
-	if use numa ; then
-		local CONFIG_CHECK="~NUMA"
+pkg_setup() {
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if has test ${FEATURES} ; then
+		# Bug #213475 - MySQL _will_ object strenuously if your machine is named
+		# localhost. Also causes weird failures.
+		[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
 
-		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
-		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+		if ! has userpriv ${FEATURES} ; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+
+		local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+		[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+			&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
 
-		check_extra_config
+		if use latin1 ; then
+			# Upstream only supports tests with default charset
+			die "Testing with USE=latin1 is not supported."
+		fi
+	fi
+
+	if use kernel_linux ; then
+		if use numa ; then
+			linux-info_get_any_version
+
+			local CONFIG_CHECK="~NUMA"
+
+			local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+			WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+			check_extra_config
+		fi
 	fi
 }
 
@@ -215,6 +234,7 @@ pkg_postinst() {
 
 src_unpack() {
 	unpack ${A}
+
 	# Grab the patches
 	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
 
@@ -235,7 +255,7 @@ src_prepare() {
 		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
 	fi
 
-	# man pages for client-lib tools we don't install
+	# Remove man pages for client-lib tools we don't install
 	rm \
 		man/my_print_defaults.1 \
 		man/perror.1 \
@@ -345,7 +365,7 @@ src_configure(){
 
 	mycmakeargs+=(
 		-DWITH_EXTRA_CHARSETS=all
-		-DDISABLE_SHARED=$(usex static YES NO)
+		-DDISABLE_SHARED=NO
 		-DWITH_DEBUG=$(usex debug)
 	)
 
@@ -356,10 +376,6 @@ src_configure(){
 		mycmakeargs+=( -DENABLED_PROFILING=ON )
 	fi
 
-	if use static ; then
-		mycmakeargs+=( -DWITH_PIC=1 )
-	fi
-
 	# Storage engines
 	mycmakeargs+=(
 		-DWITH_EXAMPLE_STORAGE_ENGINE=0
@@ -380,7 +396,7 @@ src_configure(){
 # Official test instructions:
 # ulimit -n 16500 && \
 # USE='perl server' \
-# FEATURES='test userpriv -usersandbox' \
+# FEATURES='test userpriv' \
 # ebuild mysql-X.X.XX.ebuild \
 # digest clean package
 src_test() {
@@ -397,32 +413,29 @@ src_test() {
 	local retstatus_unit
 	local retstatus_tests
 
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]] ; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	if use latin1 ; then
-		# Upstream only supports tests with default charset
-		die "Testing with USE=latin1 is not supported."
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
 	# Run CTest (test-units)
 	cmake-utils_src_test
 	retstatus_unit=$?
 
 	# Ensure that parallel runs don't die
 	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	if [[ -z "${MTR_PARALLEL}" ]] ; then
+		local -x MTR_PARALLEL=$(makeopts_jobs)
+
+		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+			# Running multiple tests in parallel usually require higher ulimit
+			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
+			# are known to hit timeout when system is busy.
+			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+			# using "auto".
+			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+			einfo "${info_msg}"
+			unset info_msg
+			MTR_PARALLEL=4
+		fi
+	fi
 
 	# create directories because mysqladmin might run out of order
 	mkdir -p "${T}"/var-tests{,/log} || die
@@ -433,6 +446,7 @@ src_test() {
 	touch "${T}/disabled.def"
 
 	local -a disabled_tests
+	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges")
 	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)")
 	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)")
 	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)")
@@ -443,16 +457,16 @@ src_test() {
 	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)")
 	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)")
 	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)")
+	disabled_tests+=( "main.mysqlslap;1253001;Known failure - no upstream bug yet (RH)" )
 	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet")
 	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet")
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
-	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
-	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Know failure - no upstream bug yet" )
-	disabled_tests+=( "x.connection;0;Know failure - no upstream bug yet" )
-	disabled_tests+=( "main.mysqlslap;1253001;Known failure - no upstream bug yet (RH)" )
 	disabled_tests+=( "perfschema.idx_threads;0;Know failure - no upstream bug yet" )
 	disabled_tests+=( "perfschema.idx_session_connect_attrs;0;Know failure - no upstream bug yet" )
 	disabled_tests+=( "perfschema.idx_session_account_connect_attrs;0;Know failure - no upstream bug yet" )
+	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Know failure - no upstream bug yet" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+	disabled_tests+=( "x.connection;0;Know failure - no upstream bug yet" )
 
 	local test_ds
 	for test_infos_str in "${disabled_tests[@]}" ; do
@@ -487,15 +501,6 @@ src_test() {
 		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
 	fi
 
-	local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
-	if [[ ${aio_max_nr} -lt 250000 ]] ; then
-		if ! sysctl -w fs.aio-max-nr=250000 2>&1 ; then
-			ewarn "Failed to rais fs.aio-max-nr to >=250000! Expect test failures ..."
-		else
-			einfo "fs.aio-max-nr raised to 250000!"
-		fi
-	fi
-
 	# run mysql-test tests
 	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
 	retstatus_tests=$?


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-02 21:58 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-02 21:58 UTC (permalink / raw
  To: gentoo-commits

commit:     491567701dec41a4ee81746709fcf6a510ced4d6
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  2 21:58:35 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Aug  2 21:58:47 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49156770

dev-db/mysql: drop unneeded empty line

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

 dev-db/mysql/mysql-5.7.27.ebuild | 1 -
 1 file changed, 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.27.ebuild b/dev-db/mysql/mysql-5.7.27.ebuild
index 51372d0a361..05cb0dc5f93 100644
--- a/dev-db/mysql/mysql-5.7.27.ebuild
+++ b/dev-db/mysql/mysql-5.7.27.ebuild
@@ -303,7 +303,6 @@ src_prepare() {
 		man/zlib_decompress.1 \
 		|| die
 
-
 	if use libressl ; then
 		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
 			"${S}/cmake/ssl.cmake" || die


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-02 16:56 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-02 16:56 UTC (permalink / raw
  To: gentoo-commits

commit:     eacde4b3cff7b96724f2d1a9d0dda5925033dc1a
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  2 16:42:14 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Aug  2 16:56:18 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eacde4b3

dev-db/mysql: don't install my_print_defaults man page

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

 dev-db/mysql/mysql-8.0.17_pre1.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-db/mysql/mysql-8.0.17_pre1.ebuild b/dev-db/mysql/mysql-8.0.17_pre1.ebuild
index bc4fb0cad0c..a1c1a4d312e 100644
--- a/dev-db/mysql/mysql-8.0.17_pre1.ebuild
+++ b/dev-db/mysql/mysql-8.0.17_pre1.ebuild
@@ -237,6 +237,7 @@ src_prepare() {
 
 	# man pages for client-lib tools we don't install
 	rm \
+		man/my_print_defaults.1 \
 		man/perror.1 \
 		man/zlib_decompress.1 \
 		|| die


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-02 16:56 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-08-02 16:56 UTC (permalink / raw
  To: gentoo-commits

commit:     30850af5d50a14ca417cf33ae740189af717347d
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  2 16:45:59 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Aug  2 16:56:19 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30850af5

dev-db/mysql: don't install man pages installed by mysql-connector-c

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

 dev-db/mysql/mysql-5.6.45.ebuild | 7 +++++++
 dev-db/mysql/mysql-5.7.27.ebuild | 8 ++++++++
 2 files changed, 15 insertions(+)

diff --git a/dev-db/mysql/mysql-5.6.45.ebuild b/dev-db/mysql/mysql-5.6.45.ebuild
index 6801847b241..5526aadc972 100644
--- a/dev-db/mysql/mysql-5.6.45.ebuild
+++ b/dev-db/mysql/mysql-5.6.45.ebuild
@@ -196,6 +196,13 @@ src_prepare() {
 		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
 	fi
 
+	# Don't clash with dev-db/mysql-connector-c
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
 	if use libressl ; then
 		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
 			"${S}/cmake/ssl.cmake" || die

diff --git a/dev-db/mysql/mysql-5.7.27.ebuild b/dev-db/mysql/mysql-5.7.27.ebuild
index ded6636a984..51372d0a361 100644
--- a/dev-db/mysql/mysql-5.7.27.ebuild
+++ b/dev-db/mysql/mysql-5.7.27.ebuild
@@ -296,6 +296,14 @@ src_prepare() {
 		"${S}"/zlib \
 		|| die
 
+	# Don't clash with dev-db/mysql-connector-c
+	rm \
+		man/my_print_defaults.1 \
+		man/perror.1 \
+		man/zlib_decompress.1 \
+		|| die
+
+
 	if use libressl ; then
 		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
 			"${S}/cmake/ssl.cmake" || die


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-02 11:23 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2019-08-02 11:23 UTC (permalink / raw
  To: gentoo-commits

commit:     f535855027696a994ed81931c580d4519d7c5a5d
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  2 11:23:03 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Fri Aug  2 11:23:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5358550

dev-db/mysql: ppc64 stable wrt bug #691136

Package-Manager: Portage-2.3.69, Repoman-2.3.16
RepoMan-Options: --include-arches="ppc64"
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.44.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.26.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.44.ebuild b/dev-db/mysql/mysql-5.6.44.ebuild
index d9a7702647a..74c1e75a2f0 100644
--- a/dev-db/mysql/mysql-5.6.44.ebuild
+++ b/dev-db/mysql/mysql-5.6.44.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.26.ebuild b/dev-db/mysql/mysql-5.7.26.ebuild
index 063ada90d06..93e8843434c 100644
--- a/dev-db/mysql/mysql-5.7.26.ebuild
+++ b/dev-db/mysql/mysql-5.7.26.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-02 11:23 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2019-08-02 11:23 UTC (permalink / raw
  To: gentoo-commits

commit:     77ab17487cac5a01d23f3570a3965d91ff098ee5
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  2 11:23:27 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Fri Aug  2 11:23:27 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77ab1748

dev-db/mysql: x86 stable wrt bug #691136

Package-Manager: Portage-2.3.69, Repoman-2.3.16
RepoMan-Options: --include-arches="x86"
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.44.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.26.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.44.ebuild b/dev-db/mysql/mysql-5.6.44.ebuild
index 74c1e75a2f0..312951b5e58 100644
--- a/dev-db/mysql/mysql-5.6.44.ebuild
+++ b/dev-db/mysql/mysql-5.6.44.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.26.ebuild b/dev-db/mysql/mysql-5.7.26.ebuild
index 93e8843434c..a956940eb6f 100644
--- a/dev-db/mysql/mysql-5.7.26.ebuild
+++ b/dev-db/mysql/mysql-5.7.26.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-02 11:23 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2019-08-02 11:23 UTC (permalink / raw
  To: gentoo-commits

commit:     c1059254f4b4a40ee8a0afa92a9d607f3e27a7f1
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  2 11:22:43 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Fri Aug  2 11:22:43 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1059254

dev-db/mysql: ppc stable wrt bug #691136

Package-Manager: Portage-2.3.69, Repoman-2.3.16
RepoMan-Options: --include-arches="ppc"
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.44.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.26.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.44.ebuild b/dev-db/mysql/mysql-5.6.44.ebuild
index 86500d4b2fb..d9a7702647a 100644
--- a/dev-db/mysql/mysql-5.6.44.ebuild
+++ b/dev-db/mysql/mysql-5.6.44.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.26.ebuild b/dev-db/mysql/mysql-5.7.26.ebuild
index c72919981ab..063ada90d06 100644
--- a/dev-db/mysql/mysql-5.7.26.ebuild
+++ b/dev-db/mysql/mysql-5.7.26.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-02 11:23 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2019-08-02 11:23 UTC (permalink / raw
  To: gentoo-commits

commit:     bae29f45c7e76abb57a36467e4b5980fa2e4ea47
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  2 11:21:59 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Fri Aug  2 11:21:59 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bae29f45

dev-db/mysql: amd64 stable wrt bug #691136

Package-Manager: Portage-2.3.69, Repoman-2.3.16
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.44.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.26.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.44.ebuild b/dev-db/mysql/mysql-5.6.44.ebuild
index a05fea40118..2880c979259 100644
--- a/dev-db/mysql/mysql-5.6.44.ebuild
+++ b/dev-db/mysql/mysql-5.6.44.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.26.ebuild b/dev-db/mysql/mysql-5.7.26.ebuild
index 1092df51ae0..f02796213c6 100644
--- a/dev-db/mysql/mysql-5.7.26.ebuild
+++ b/dev-db/mysql/mysql-5.7.26.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-02 11:23 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2019-08-02 11:23 UTC (permalink / raw
  To: gentoo-commits

commit:     9d9df88457bdbbf33b86a480ffcd02d412c4d1d8
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  2 11:22:21 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Fri Aug  2 11:22:21 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d9df884

dev-db/mysql: arm stable wrt bug #691136

Package-Manager: Portage-2.3.69, Repoman-2.3.16
RepoMan-Options: --include-arches="arm"
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.44.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.26.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.44.ebuild b/dev-db/mysql/mysql-5.6.44.ebuild
index 2880c979259..86500d4b2fb 100644
--- a/dev-db/mysql/mysql-5.6.44.ebuild
+++ b/dev-db/mysql/mysql-5.6.44.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.26.ebuild b/dev-db/mysql/mysql-5.7.26.ebuild
index f02796213c6..c72919981ab 100644
--- a/dev-db/mysql/mysql-5.7.26.ebuild
+++ b/dev-db/mysql/mysql-5.7.26.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-08-01 21:11 Aaron Bauman
  0 siblings, 0 replies; 393+ messages in thread
From: Aaron Bauman @ 2019-08-01 21:11 UTC (permalink / raw
  To: gentoo-commits

commit:     c78559313cdb9122d93692d8788f684decaa2af9
Author:     Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  1 21:04:52 2019 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Thu Aug  1 21:10:56 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7855931

dev-db/mysql: arm64 stable (bug #691136)

Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
Package-Manager: Portage-2.3.69, Repoman-2.3.16
RepoMan-Options: --include-arches="arm64"

 dev-db/mysql/mysql-5.7.26.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.26.ebuild b/dev-db/mysql/mysql-5.7.26.ebuild
index ffd198b3867..1092df51ae0 100644
--- a/dev-db/mysql/mysql-5.7.26.ebuild
+++ b/dev-db/mysql/mysql-5.7.26.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-07-31 14:40 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-07-31 14:40 UTC (permalink / raw
  To: gentoo-commits

commit:     3cfd1e182d65d5fb460e14650c0aa8aa06a9fb8c
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 31 14:36:55 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Jul 31 14:40:25 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3cfd1e18

dev-db/mysql: bump to v5.6.45

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

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.6.45.ebuild | 799 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 800 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 953647867d1..fd17dab1c10 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -4,6 +4,7 @@ DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa3492688
 DIST mysql-5.6.42.tar.gz 32201731 BLAKE2B c573328b37225dac090c32178f90e1419fc1848612e304bddc11eafdd48228981a846857be680978b72ef76edbd5d2422a98b5d20b4d082fabcc2b072e2b8fde SHA512 3104e6a3145a119f2b012de6af2a92fc37134aa402b889a562f5fc2391705d0bc2f718166c5fa8387d973fff5ecd9544c8b389b6d0c81d98bdcaf2acfb9b55e8
 DIST mysql-5.6.43.tar.gz 32200219 BLAKE2B 2aa1397ff5f011a169ae47650be8db7a097a62f53ff06d63760a419906841f0540db19449c1d71d60be7d684e49b4436e1d6e72e7a1cf99057a3f98fad11557f SHA512 8820aee9b34cfebc841d756b12713517c9dafed7bee7b09c8e82c8f359e2e12b25da47c4e49e0aa4afc26193b774e0fa0dfd422c2aa09c3112b6d6e4b62b9a68
 DIST mysql-5.6.44.tar.gz 32531507 BLAKE2B 28fbf49f699eb9f43223ffa186671b119d16016274cc7192db232b85c58123a61154e37193b9b7145c6a650b80b5f6cf838529bc2bc5ea9c78c0dbc39de834d3 SHA512 65ace1c803773ca6c8759d171c09bc93c7d61b8e3208ac9905f82e99087622c9dcca602d2da217741dc62fc6eabe9108ebc7f31facd26705072eae65fcc37077
+DIST mysql-5.6.45.tar.gz 32525559 BLAKE2B 3c629aed1de808acdea6654c7413e6851507c9c5be939ca4b4f5e2796da317e9b518a749bfc03d2b0ef05bd604b39f72e24b751076b9f206b462d21fa5db4f50 SHA512 f9d8bb72e96cc83f1064fe7df2e5fe8317ca9d44c4e776cf7827a61292fbcfccec716806c80d565958383d78fef93a19d61c726687b57680d5f93299291ff168
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
 DIST mysql-boost-5.7.24.tar.gz 49110448 BLAKE2B 1cf64712d84cbb2dfd31f2a530470b6f7cbf5ae9107106d86705575ea9739fa582e1f079447d9a58c4762fffc636d69e448ebdec9172ee15dc09245bc39c3525 SHA512 bbd411e15cd9e6053a353146808b74881d2d950f09e94794a699e7604dadf767b58b661a8321fbe1424f2c2e6cfc3adaa388242183e759082eae47b64cbfbcde
 DIST mysql-boost-5.7.25.tar.gz 49107578 BLAKE2B 8a43479c496ce45e71df905b0cb6da442340b691caa15f9862a8c981e7189c50e73b1701c393fe46ab580c508f785d5f15259c2331c77e0790191f3d41bb385c SHA512 b111c64bfcd49dba584bed71a0c7ce33b2b0654654d8f4eaa1a2b7a5daed9674ebfd4a0dfb93c20ffee028feead4709eaf600bb5469f81c86b743d395dfe27a9

diff --git a/dev-db/mysql/mysql-5.6.45.ebuild b/dev-db/mysql/mysql-5.6.45.ebuild
new file mode 100644
index 00000000000..6801847b241
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.45.ebuild
@@ -0,0 +1,799 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20190604-1109Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils flag-o-matic prefix toolchain-funcs \
+	user cmake-utils multilib-build
+
+SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
+	+server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
+	"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.44-fix-libressl-support.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	kernel_linux? (
+		sys-process/procps:0=
+		dev-libs/libaio:0=
+	)
+	net-misc/curl
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	jemalloc? ( dev-libs/jemalloc:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	!yassl? (
+		!libressl? ( =dev-libs/openssl-1.0.2*:0= )
+		libressl? ( =dev-libs/libressl-2.6.5*:0= )
+	)
+	>=sys-libs/zlib-1.2.3:0=
+	sys-libs/ncurses:0=
+	server? (
+		numa? ( sys-process/numactl )
+	)
+	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+	static? ( sys-libs/ncurses[static-libs] )
+	test? ( dev-perl/JSON )
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+	${COMMON_DEPEND}
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	_disable_engine() {
+		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+	}
+
+	_disable_plugin() {
+		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+	}
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	if use tcmalloc; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	local plugin
+	local server_plugins=( semisync )
+	local test_plugins=( audit_null daemon_example fulltext )
+	if ! use server; then # These plugins are for the server
+		for plugin in "${server_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	if ! use test; then # These plugins are only used during testing
+		for plugin in "${test_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	# Don't build example
+	_disable_engine example
+	_disable_engine ndb
+	_disable_plugin innodb_memcached
+
+	cmake-utils_src_prepare
+}
+
+src_configure(){
+	# bug 508724 mariadb cannot use ld.gold
+	tc-ld-disable-gold
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling.  We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_LIBEVENT=NO
+		-DWITHOUT_CLIENTLIBS=YES
+		-DENABLE_DTRACE=$(usex systemtap)
+		-DWITH_SSL=$(usex yassl bundled system)
+		-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
+		-DWITHOUT_VALIDATE_PASSWORD=1
+	)
+
+	if use server ; then
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+		mycmakeargs+=(
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
+	local mycnf_src="my.cnf-5.6"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR%/}/${mycnf_src}" \
+		> "${TMPDIR%/}/my.cnf.ok" || die
+	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8|latin1|g" \
+			"${TMPDIR%/}/my.cnf.ok" || die
+	fi
+	eprefixify "${TMPDIR%/}/my.cnf.ok"
+	newins "${TMPDIR}/my.cnf.ok" my.cnf
+
+	if use server ; then
+		einfo "Including support files and sample configurations"
+		docinto "support-files"
+		local script
+		for script in \
+			"${S}"/support-files/magic
+		do
+			[[ -f "$script" ]] && dodoc "${script}"
+		done
+
+		docinto "scripts"
+		for script in "${S}"/scripts/mysql* ; do
+			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+		done
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='perl server static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" > /dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.6 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf federated.federated_plugin ; do
+			_disable_test  "$t" "False positives in Gentoo"
+	done
+
+	# Bad test definition
+	_disable_test main.mysqldump "Test fails after 2018-12-31 with new warnings"
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd > /dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]]; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX%/}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
+	[[ -r "${help_tables}" ]] \
+	&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
+	|| touch "${TMPDIR}/fill_help_tables.sql"
+	help_tables="${TMPDIR}/fill_help_tables.sql"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT%/}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]]; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]]; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
+
+	local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
+	[[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
+	if [[ -r "${help_tables}" ]] ; then
+		cat "${help_tables}" >> "${sqltmp}"
+	fi
+	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
+	if [ $? -ne 0 ]; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
+		${options} \
+		$(use prefix || echo --user=mysql) \
+		--log-warnings=0 \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile} \
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]]; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	if [[ -n "${sqltmp}" ]] ; then
+		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+		"${EROOT%/}/usr/bin/mysql" \
+			--socket="${socket}" \
+			-hlocalhost \
+			-uroot \
+			--password="${MYSQL_ROOT_PASSWORD}" \
+			mysql < "${sqltmp}"
+		rc=$?
+		eend $?
+		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+	fi
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-07-31 14:40 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-07-31 14:40 UTC (permalink / raw
  To: gentoo-commits

commit:     63b3d31cc74a66caf7425eb61aa371b6c75cfc3c
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 31 14:40:11 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Jul 31 14:40:26 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63b3d31c

dev-db/mysql: bump to v5.7.27

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

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.7.27.ebuild | 946 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 947 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index fd17dab1c10..5e60db0b6c8 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -9,6 +9,7 @@ DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55
 DIST mysql-boost-5.7.24.tar.gz 49110448 BLAKE2B 1cf64712d84cbb2dfd31f2a530470b6f7cbf5ae9107106d86705575ea9739fa582e1f079447d9a58c4762fffc636d69e448ebdec9172ee15dc09245bc39c3525 SHA512 bbd411e15cd9e6053a353146808b74881d2d950f09e94794a699e7604dadf767b58b661a8321fbe1424f2c2e6cfc3adaa388242183e759082eae47b64cbfbcde
 DIST mysql-boost-5.7.25.tar.gz 49107578 BLAKE2B 8a43479c496ce45e71df905b0cb6da442340b691caa15f9862a8c981e7189c50e73b1701c393fe46ab580c508f785d5f15259c2331c77e0790191f3d41bb385c SHA512 b111c64bfcd49dba584bed71a0c7ce33b2b0654654d8f4eaa1a2b7a5daed9674ebfd4a0dfb93c20ffee028feead4709eaf600bb5469f81c86b743d395dfe27a9
 DIST mysql-boost-5.7.26.tar.gz 51098338 BLAKE2B 1263cd75814a7293b26b0f44fd2b7d20d983f3c6a62725df9515ecac2ef252f6644810cb4bf0d6f36b98e55317f1c67ea7541228cb38d896dfedc476a5755f26 SHA512 a5f9871dc5a8e5fffc1467c3dd542533a63fe553c029120475f8fd5530d884c76ab0c33ad260daf317faf318ccef01464f6ac2dc3468efceb6bf2b6c06c54cfd
+DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d
 DIST mysql-extras-20181023-0012Z.tar.bz2 327834 BLAKE2B 91a82cbcecbbbe94933da0d8c26cdfee0171602785b2f717fbfec7da422f0ec36f26e897a3c21695f4748017d36c9956cbef03d0852246468368b812a604df82 SHA512 94996708a9da4d55c3aab74f75b74fa4aa80e3fbbb87d9dfe6c1596a934aceed466b7c853e38d9b63f59660763ccef617defc4e6e8770451c21a252250f4e7fa
 DIST mysql-extras-20181111-2314Z.tar.bz2 329013 BLAKE2B fa928b699ef0e6f092e028fc1331cc33953d9855e784998fb2f8c1f1712e9424567b2d2b6b7c5ca375f178309522b3596fcba7babdbed7c85b87ae4b85e5db22 SHA512 5cc4d16c5c6b0491fb9532469ec0b9c65e27e1514d561ea4180845a1578fc8e7ba00fca479b9a784646846f5147e4f676340f639b78c3f5ee140dda26bd5bff2

diff --git a/dev-db/mysql/mysql-5.7.27.ebuild b/dev-db/mysql/mysql-5.7.27.ebuild
new file mode 100644
index 00000000000..ded6636a984
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.27.ebuild
@@ -0,0 +1,946 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20190604-1109Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit cmake-utils eutils flag-o-matic linux-info \
+	prefix toolchain-funcs user multilib-minimal
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-libressl-support.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-mips-ASM.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-build-without-server.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="net-misc/curl:=
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	sys-libs/ncurses:0=
+	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+	)
+	jemalloc? ( dev-libs/jemalloc:0= )
+	kernel_linux? (
+		dev-libs/libaio:0=
+		sys-process/procps:0=
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
+		numa? ( sys-process/numactl )
+	)
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	!yassl? (
+		client-libs? (
+			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+		)
+		!client-libs? (
+			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+			libressl? ( dev-libs/libressl:0= )
+		)
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
+	virtual/yacc
+	server? (
+		dev-libs/libevent
+		experimental? ( net-libs/rpcsvc-proto )
+	)
+	static? ( sys-libs/ncurses[static-libs] )
+	test? ( dev-perl/JSON )
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]] ; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if use numa ; then
+		local CONFIG_CHECK="~NUMA"
+
+		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+		check_extra_config
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	cmake-utils_src_prepare
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/extra/libevent \
+		"${S}"/zlib \
+		|| die
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+}
+
+src_configure(){
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
+		-DMYSQL_DATADIR="${EPREFIX%/}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX%/}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use yassl ; then
+		mycmakeargs+=( -DWITH_SSL=system )
+	else
+		mycmakeargs+=( -DWITH_SSL=bundled )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI, bug 530132
+	if multilib_is_native_abi ; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
+			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static ; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake-utils_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]] ; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf ; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+	for t in main.xa_prepared_binlog_off rpl.rpl_non_direct_stm_mixing_engines ; do
+			_disable_test "$t" "Unstable test"
+	done
+
+	if ! use amd64 ; then
+		# fixed in >=mysql-8 via commit 0a417e84
+		_disable_test "gis.gis_bugs_crashes" "Unstable results on non-amd64 architectures due to floating-point operation"
+	fi
+
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+				_disable_test "$t" "requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+
+	cmake-utils_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		eprefixify "${TMPDIR}/my.cnf.ok"
+
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX%/}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
+			if [[ -d "${MY_DATADIR_s}" ]] ; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]] ; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+	fi
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+	fi
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT%/}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	echo "USE mysql;" >"${sqltmp}"
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
+	if [[ $? -ne 0 ]] ; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
+		${options} \
+		$(use prefix || echo --user=mysql) \
+		--log-warnings=0 \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile} \
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]] ; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-07-02  8:19 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2019-07-02  8:19 UTC (permalink / raw
  To: gentoo-commits

commit:     e5e8067e1cd6785f6a5d6f5d95d21a022aac4f50
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  2 08:17:58 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Jul  2 08:17:58 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5e8067e

dev-db/mysql: stable 5.6.43 for ia64, bug #679354

Package-Manager: Portage-2.3.68, Repoman-2.3.16
RepoMan-Options: --include-arches="ia64"
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.43.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.43.ebuild b/dev-db/mysql/mysql-5.6.43.ebuild
index bb890982483..77ee3830827 100644
--- a/dev-db/mysql/mysql-5.6.43.ebuild
+++ b/dev-db/mysql/mysql-5.6.43.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-07-02  8:19 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2019-07-02  8:19 UTC (permalink / raw
  To: gentoo-commits

commit:     ea3d2c68fc55723e40ee83085c6be20dbba8f115
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  2 08:18:03 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Jul  2 08:18:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea3d2c68

dev-db/mysql: stable 5.7.25 for ia64, bug #679354

Package-Manager: Portage-2.3.68, Repoman-2.3.16
RepoMan-Options: --include-arches="ia64"
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.25.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.25.ebuild b/dev-db/mysql/mysql-5.7.25.ebuild
index a66ab389e87..34fc5964b51 100644
--- a/dev-db/mysql/mysql-5.7.25.ebuild
+++ b/dev-db/mysql/mysql-5.7.25.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-06-04 11:36 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-06-04 11:36 UTC (permalink / raw
  To: gentoo-commits

commit:     341071a88d534733a4747688c9bc18c2a65fe2bc
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  4 11:36:26 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Jun  4 11:36:44 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=341071a8

dev-db/mysql: bump to v5.6.44

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

 dev-db/mysql/Manifest            |   2 +
 dev-db/mysql/mysql-5.6.44.ebuild | 800 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 802 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 0830d5f2d70..953647867d1 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,6 +3,7 @@ DIST mysql-5.5.62.tar.gz 21111902 BLAKE2B f1cbb1c6b4dfac11c2c517a57a5c6216ce4376
 DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c
 DIST mysql-5.6.42.tar.gz 32201731 BLAKE2B c573328b37225dac090c32178f90e1419fc1848612e304bddc11eafdd48228981a846857be680978b72ef76edbd5d2422a98b5d20b4d082fabcc2b072e2b8fde SHA512 3104e6a3145a119f2b012de6af2a92fc37134aa402b889a562f5fc2391705d0bc2f718166c5fa8387d973fff5ecd9544c8b389b6d0c81d98bdcaf2acfb9b55e8
 DIST mysql-5.6.43.tar.gz 32200219 BLAKE2B 2aa1397ff5f011a169ae47650be8db7a097a62f53ff06d63760a419906841f0540db19449c1d71d60be7d684e49b4436e1d6e72e7a1cf99057a3f98fad11557f SHA512 8820aee9b34cfebc841d756b12713517c9dafed7bee7b09c8e82c8f359e2e12b25da47c4e49e0aa4afc26193b774e0fa0dfd422c2aa09c3112b6d6e4b62b9a68
+DIST mysql-5.6.44.tar.gz 32531507 BLAKE2B 28fbf49f699eb9f43223ffa186671b119d16016274cc7192db232b85c58123a61154e37193b9b7145c6a650b80b5f6cf838529bc2bc5ea9c78c0dbc39de834d3 SHA512 65ace1c803773ca6c8759d171c09bc93c7d61b8e3208ac9905f82e99087622c9dcca602d2da217741dc62fc6eabe9108ebc7f31facd26705072eae65fcc37077
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
 DIST mysql-boost-5.7.24.tar.gz 49110448 BLAKE2B 1cf64712d84cbb2dfd31f2a530470b6f7cbf5ae9107106d86705575ea9739fa582e1f079447d9a58c4762fffc636d69e448ebdec9172ee15dc09245bc39c3525 SHA512 bbd411e15cd9e6053a353146808b74881d2d950f09e94794a699e7604dadf767b58b661a8321fbe1424f2c2e6cfc3adaa388242183e759082eae47b64cbfbcde
 DIST mysql-boost-5.7.25.tar.gz 49107578 BLAKE2B 8a43479c496ce45e71df905b0cb6da442340b691caa15f9862a8c981e7189c50e73b1701c393fe46ab580c508f785d5f15259c2331c77e0790191f3d41bb385c SHA512 b111c64bfcd49dba584bed71a0c7ce33b2b0654654d8f4eaa1a2b7a5daed9674ebfd4a0dfb93c20ffee028feead4709eaf600bb5469f81c86b743d395dfe27a9
@@ -12,3 +13,4 @@ DIST mysql-extras-20181023-0012Z.tar.bz2 327834 BLAKE2B 91a82cbcecbbbe94933da0d8
 DIST mysql-extras-20181111-2314Z.tar.bz2 329013 BLAKE2B fa928b699ef0e6f092e028fc1331cc33953d9855e784998fb2f8c1f1712e9424567b2d2b6b7c5ca375f178309522b3596fcba7babdbed7c85b87ae4b85e5db22 SHA512 5cc4d16c5c6b0491fb9532469ec0b9c65e27e1514d561ea4180845a1578fc8e7ba00fca479b9a784646846f5147e4f676340f639b78c3f5ee140dda26bd5bff2
 DIST mysql-extras-20190303-1852Z.tar.bz2 331026 BLAKE2B ee033fce8f1b6a58f1f690710fb9709a585cd45564b35e71d4f840a3a7f83a5d80f53c24236c9976319abd89c68c62c74a7111517f1b9721d3cbd0898bf0dd8d SHA512 30361a0b848ed27f9170b1116458a9bc13b1b585c5fa1933c99927541c31e9bda4008b0563f2fc7db286f998089ebebf1fe3f18fce7a45e62acbf769ac62d8c1
 DIST mysql-extras-20190524-1046Z.tar.bz2 331517 BLAKE2B e6d48e34b0a7f7176de8740971f8151923beb20a520df73c22d44005059ef6779ad5aa8437e30018b9bbfe1d6d69043cbd8522b6f3662746205193b44372a6b3 SHA512 2f7238578f3aabd1701e1c54da36bc0100c9479871e3c77b22131fd6cde865037307f93b3343ea5e52251c45ef35cdc52cc2dec5a26d44fd41700598282c5c2c
+DIST mysql-extras-20190604-1109Z.tar.bz2 331780 BLAKE2B 48b6f6ff36818ba3d1d9c0580b0ff5e2343d92a42ee78b6804841d7c4f511adcdc3d5cd0590f769f308ca52e271c07cb34219450f9b86e918ddcd0a4b956e18e SHA512 19a85ba5a4c2de1688f39feb6ce1c1802e4d886436dc02afe1ba508b91365a0ac67d668cf7126588145ee55641992ad71b0d094246a94c89065876b9bb897425

diff --git a/dev-db/mysql/mysql-5.6.44.ebuild b/dev-db/mysql/mysql-5.6.44.ebuild
new file mode 100644
index 00000000000..a05fea40118
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.44.ebuild
@@ -0,0 +1,800 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20190604-1109Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils flag-o-matic prefix toolchain-funcs \
+	user cmake-utils multilib-build
+
+SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
+	+server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
+	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
+	"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.44-fix-libressl-support.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	kernel_linux? (
+		sys-process/procps:0=
+		dev-libs/libaio:0=
+	)
+	net-misc/curl
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	jemalloc? ( dev-libs/jemalloc:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	!yassl? (
+		!libressl? ( =dev-libs/openssl-1.0.2*:0= )
+		libressl? ( =dev-libs/libressl-2.6.5*:0= )
+	)
+	>=sys-libs/zlib-1.2.3:0=
+	sys-libs/ncurses:0=
+	server? (
+		numa? ( sys-process/numactl )
+	)
+	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+	static? ( sys-libs/ncurses[static-libs] )
+	test? ( dev-perl/JSON )
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+	${COMMON_DEPEND}
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	_disable_engine() {
+		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+	}
+
+	_disable_plugin() {
+		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+	}
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	if use tcmalloc; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	local plugin
+	local server_plugins=( semisync )
+	local test_plugins=( audit_null daemon_example fulltext )
+	if ! use server; then # These plugins are for the server
+		for plugin in "${server_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	if ! use test; then # These plugins are only used during testing
+		for plugin in "${test_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	# Don't build example
+	_disable_engine example
+	_disable_engine ndb
+	_disable_plugin innodb_memcached
+
+	cmake-utils_src_prepare
+}
+
+src_configure(){
+	# bug 508724 mariadb cannot use ld.gold
+	tc-ld-disable-gold
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling.  We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_LIBEVENT=NO
+		-DWITHOUT_CLIENTLIBS=YES
+		-DENABLE_DTRACE=$(usex systemtap)
+		-DWITH_SSL=$(usex yassl bundled system)
+		-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
+		-DWITHOUT_VALIDATE_PASSWORD=1
+	)
+
+	if use server ; then
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+		mycmakeargs+=(
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
+	local mycnf_src="my.cnf-5.6"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR%/}/${mycnf_src}" \
+		> "${TMPDIR%/}/my.cnf.ok" || die
+	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8|latin1|g" \
+			"${TMPDIR%/}/my.cnf.ok" || die
+	fi
+	eprefixify "${TMPDIR%/}/my.cnf.ok"
+	newins "${TMPDIR}/my.cnf.ok" my.cnf
+
+	if use server ; then
+		einfo "Including support files and sample configurations"
+		docinto "support-files"
+		local script
+		for script in \
+			"${S}"/support-files/magic
+		do
+			[[ -f "$script" ]] && dodoc "${script}"
+		done
+
+		docinto "scripts"
+		for script in "${S}"/scripts/mysql* ; do
+			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+		done
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='perl server static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" > /dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.6 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf federated.federated_plugin ; do
+			_disable_test  "$t" "False positives in Gentoo"
+	done
+
+	# Bad test definition
+	_disable_test main.mysqldump "Test fails after 2018-12-31 with new warnings"
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd > /dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]]; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX%/}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
+	[[ -r "${help_tables}" ]] \
+	&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
+	|| touch "${TMPDIR}/fill_help_tables.sql"
+	help_tables="${TMPDIR}/fill_help_tables.sql"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT%/}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]]; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]]; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
+
+	local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
+	[[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
+	if [[ -r "${help_tables}" ]] ; then
+		cat "${help_tables}" >> "${sqltmp}"
+	fi
+	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
+	if [ $? -ne 0 ]; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
+		${options} \
+		$(use prefix || echo --user=mysql) \
+		--log-warnings=0 \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile} \
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]]; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	if [[ -n "${sqltmp}" ]] ; then
+		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+		"${EROOT%/}/usr/bin/mysql" \
+			--socket="${socket}" \
+			-hlocalhost \
+			-uroot \
+			--password="${MYSQL_ROOT_PASSWORD}" \
+			mysql < "${sqltmp}"
+		rc=$?
+		eend $?
+		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+	fi
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-05-24 14:30 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-05-24 14:30 UTC (permalink / raw
  To: gentoo-commits

commit:     763cc871704eb13caff68d9697fc7300a40f55fb
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri May 24 14:30:19 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri May 24 14:30:31 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=763cc871

dev-db/mysql: bump patch set for latest LibreSSL fixes

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

 dev-db/mysql/mysql-5.7.25.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.25.ebuild b/dev-db/mysql/mysql-5.7.25.ebuild
index baea2685372..a66ab389e87 100644
--- a/dev-db/mysql/mysql-5.7.25.ebuild
+++ b/dev-db/mysql/mysql-5.7.25.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20190303-1852Z"
+MY_EXTRAS_VER="20190524-1046Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-05-24 10:52 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-05-24 10:52 UTC (permalink / raw
  To: gentoo-commits

commit:     491d46e33f37c95727e1d51fb70fccbd97bb67b1
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri May 24 10:49:45 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri May 24 10:49:45 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=491d46e3

dev-db/mysql: fix LibreSSL support

Closes: https://bugs.gentoo.org/685948
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest            | 1 +
 dev-db/mysql/mysql-5.7.26.ebuild | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 1b1eee6640c..0830d5f2d70 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -11,3 +11,4 @@ DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf4347333586
 DIST mysql-extras-20181023-0012Z.tar.bz2 327834 BLAKE2B 91a82cbcecbbbe94933da0d8c26cdfee0171602785b2f717fbfec7da422f0ec36f26e897a3c21695f4748017d36c9956cbef03d0852246468368b812a604df82 SHA512 94996708a9da4d55c3aab74f75b74fa4aa80e3fbbb87d9dfe6c1596a934aceed466b7c853e38d9b63f59660763ccef617defc4e6e8770451c21a252250f4e7fa
 DIST mysql-extras-20181111-2314Z.tar.bz2 329013 BLAKE2B fa928b699ef0e6f092e028fc1331cc33953d9855e784998fb2f8c1f1712e9424567b2d2b6b7c5ca375f178309522b3596fcba7babdbed7c85b87ae4b85e5db22 SHA512 5cc4d16c5c6b0491fb9532469ec0b9c65e27e1514d561ea4180845a1578fc8e7ba00fca479b9a784646846f5147e4f676340f639b78c3f5ee140dda26bd5bff2
 DIST mysql-extras-20190303-1852Z.tar.bz2 331026 BLAKE2B ee033fce8f1b6a58f1f690710fb9709a585cd45564b35e71d4f840a3a7f83a5d80f53c24236c9976319abd89c68c62c74a7111517f1b9721d3cbd0898bf0dd8d SHA512 30361a0b848ed27f9170b1116458a9bc13b1b585c5fa1933c99927541c31e9bda4008b0563f2fc7db286f998089ebebf1fe3f18fce7a45e62acbf769ac62d8c1
+DIST mysql-extras-20190524-1046Z.tar.bz2 331517 BLAKE2B e6d48e34b0a7f7176de8740971f8151923beb20a520df73c22d44005059ef6779ad5aa8437e30018b9bbfe1d6d69043cbd8522b6f3662746205193b44372a6b3 SHA512 2f7238578f3aabd1701e1c54da36bc0100c9479871e3c77b22131fd6cde865037307f93b3343ea5e52251c45ef35cdc52cc2dec5a26d44fd41700598282c5c2c

diff --git a/dev-db/mysql/mysql-5.7.26.ebuild b/dev-db/mysql/mysql-5.7.26.ebuild
index 99cb2805dc7..ffd198b3867 100644
--- a/dev-db/mysql/mysql-5.7.26.ebuild
+++ b/dev-db/mysql/mysql-5.7.26.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20190303-1852Z"
+MY_EXTRAS_VER="20190524-1046Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-05-14  0:41 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-05-14  0:41 UTC (permalink / raw
  To: gentoo-commits

commit:     171f7b47b200dc54c71764a93756b75b4e65949e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue May 14 00:35:10 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue May 14 00:35:10 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=171f7b47

dev-db/mysql: bump to v5.7.26

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

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.7.26.ebuild | 946 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 947 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index e18f0c109b0..1b1eee6640c 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -6,6 +6,7 @@ DIST mysql-5.6.43.tar.gz 32200219 BLAKE2B 2aa1397ff5f011a169ae47650be8db7a097a62
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
 DIST mysql-boost-5.7.24.tar.gz 49110448 BLAKE2B 1cf64712d84cbb2dfd31f2a530470b6f7cbf5ae9107106d86705575ea9739fa582e1f079447d9a58c4762fffc636d69e448ebdec9172ee15dc09245bc39c3525 SHA512 bbd411e15cd9e6053a353146808b74881d2d950f09e94794a699e7604dadf767b58b661a8321fbe1424f2c2e6cfc3adaa388242183e759082eae47b64cbfbcde
 DIST mysql-boost-5.7.25.tar.gz 49107578 BLAKE2B 8a43479c496ce45e71df905b0cb6da442340b691caa15f9862a8c981e7189c50e73b1701c393fe46ab580c508f785d5f15259c2331c77e0790191f3d41bb385c SHA512 b111c64bfcd49dba584bed71a0c7ce33b2b0654654d8f4eaa1a2b7a5daed9674ebfd4a0dfb93c20ffee028feead4709eaf600bb5469f81c86b743d395dfe27a9
+DIST mysql-boost-5.7.26.tar.gz 51098338 BLAKE2B 1263cd75814a7293b26b0f44fd2b7d20d983f3c6a62725df9515ecac2ef252f6644810cb4bf0d6f36b98e55317f1c67ea7541228cb38d896dfedc476a5755f26 SHA512 a5f9871dc5a8e5fffc1467c3dd542533a63fe553c029120475f8fd5530d884c76ab0c33ad260daf317faf318ccef01464f6ac2dc3468efceb6bf2b6c06c54cfd
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d
 DIST mysql-extras-20181023-0012Z.tar.bz2 327834 BLAKE2B 91a82cbcecbbbe94933da0d8c26cdfee0171602785b2f717fbfec7da422f0ec36f26e897a3c21695f4748017d36c9956cbef03d0852246468368b812a604df82 SHA512 94996708a9da4d55c3aab74f75b74fa4aa80e3fbbb87d9dfe6c1596a934aceed466b7c853e38d9b63f59660763ccef617defc4e6e8770451c21a252250f4e7fa
 DIST mysql-extras-20181111-2314Z.tar.bz2 329013 BLAKE2B fa928b699ef0e6f092e028fc1331cc33953d9855e784998fb2f8c1f1712e9424567b2d2b6b7c5ca375f178309522b3596fcba7babdbed7c85b87ae4b85e5db22 SHA512 5cc4d16c5c6b0491fb9532469ec0b9c65e27e1514d561ea4180845a1578fc8e7ba00fca479b9a784646846f5147e4f676340f639b78c3f5ee140dda26bd5bff2

diff --git a/dev-db/mysql/mysql-5.7.26.ebuild b/dev-db/mysql/mysql-5.7.26.ebuild
new file mode 100644
index 00000000000..99cb2805dc7
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.26.ebuild
@@ -0,0 +1,946 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20190303-1852Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit cmake-utils eutils flag-o-matic linux-info \
+	prefix toolchain-funcs user multilib-minimal
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-libressl-support.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-mips-ASM.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-build-without-server.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="net-misc/curl:=
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	sys-libs/ncurses:0=
+	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+	)
+	jemalloc? ( dev-libs/jemalloc:0= )
+	kernel_linux? (
+		dev-libs/libaio:0=
+		sys-process/procps:0=
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
+		numa? ( sys-process/numactl )
+	)
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	!yassl? (
+		client-libs? (
+			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+		)
+		!client-libs? (
+			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+			libressl? ( dev-libs/libressl:0= )
+		)
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
+	virtual/yacc
+	server? (
+		dev-libs/libevent
+		experimental? ( net-libs/rpcsvc-proto )
+	)
+	static? ( sys-libs/ncurses[static-libs] )
+	test? ( dev-perl/JSON )
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]] ; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if use numa ; then
+		local CONFIG_CHECK="~NUMA"
+
+		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+		check_extra_config
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	cmake-utils_src_prepare
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/extra/libevent \
+		"${S}"/zlib \
+		|| die
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+}
+
+src_configure(){
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
+		-DMYSQL_DATADIR="${EPREFIX%/}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX%/}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use yassl ; then
+		mycmakeargs+=( -DWITH_SSL=system )
+	else
+		mycmakeargs+=( -DWITH_SSL=bundled )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI, bug 530132
+	if multilib_is_native_abi ; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
+			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static ; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake-utils_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]] ; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf ; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+	for t in main.xa_prepared_binlog_off rpl.rpl_non_direct_stm_mixing_engines ; do
+			_disable_test "$t" "Unstable test"
+	done
+
+	if ! use amd64 ; then
+		# fixed in >=mysql-8 via commit 0a417e84
+		_disable_test "gis.gis_bugs_crashes" "Unstable results on non-amd64 architectures due to floating-point operation"
+	fi
+
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+				_disable_test "$t" "requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+
+	cmake-utils_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		eprefixify "${TMPDIR}/my.cnf.ok"
+
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX%/}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
+			if [[ -d "${MY_DATADIR_s}" ]] ; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]] ; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+	fi
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+	fi
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT%/}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	echo "USE mysql;" >"${sqltmp}"
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
+	if [[ $? -ne 0 ]] ; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
+		${options} \
+		$(use prefix || echo --user=mysql) \
+		--log-warnings=0 \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile} \
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]] ; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-04-25  3:52 Aaron Bauman
  0 siblings, 0 replies; 393+ messages in thread
From: Aaron Bauman @ 2019-04-25  3:52 UTC (permalink / raw
  To: gentoo-commits

commit:     66404790bd8b3955c321e79726e3c21881775ef0
Author:     Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 25 03:45:08 2019 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Thu Apr 25 03:45:08 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66404790

dev-db/mysql: arm64 stable

Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11

 dev-db/mysql/mysql-5.7.25.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.25.ebuild b/dev-db/mysql/mysql-5.7.25.ebuild
index 22beb2e8365..baea2685372 100644
--- a/dev-db/mysql/mysql-5.7.25.ebuild
+++ b/dev-db/mysql/mysql-5.7.25.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-04-02 12:18 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2019-04-02 12:18 UTC (permalink / raw
  To: gentoo-commits

commit:     ce10557c8e28f499d5f7c1908fbb45735641ba04
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  2 12:16:16 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Tue Apr  2 12:16:16 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce10557c

dev-db/mysql: alpha stable wrt bug #679354

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11
RepoMan-Options: --include-arches="alpha"

 dev-db/mysql/mysql-5.6.43.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.25.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.43.ebuild b/dev-db/mysql/mysql-5.6.43.ebuild
index ae9963a37ee..bb890982483 100644
--- a/dev-db/mysql/mysql-5.6.43.ebuild
+++ b/dev-db/mysql/mysql-5.6.43.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.25.ebuild b/dev-db/mysql/mysql-5.7.25.ebuild
index 331eb7b7e40..22beb2e8365 100644
--- a/dev-db/mysql/mysql-5.7.25.ebuild
+++ b/dev-db/mysql/mysql-5.7.25.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-03-10 14:37 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2019-03-10 14:37 UTC (permalink / raw
  To: gentoo-commits

commit:     f0529b1d34d1c018b2afad32011da2e3481e86a0
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 10 14:37:11 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sun Mar 10 14:37:11 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0529b1d

dev-db/mysql: arm stable wrt bug #679354

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
RepoMan-Options: --include-arches="arm"

 dev-db/mysql/mysql-5.6.43.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.25.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.43.ebuild b/dev-db/mysql/mysql-5.6.43.ebuild
index 2512da9e9d3..ae9963a37ee 100644
--- a/dev-db/mysql/mysql-5.6.43.ebuild
+++ b/dev-db/mysql/mysql-5.6.43.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.25.ebuild b/dev-db/mysql/mysql-5.7.25.ebuild
index 8d8e6f87a2c..331eb7b7e40 100644
--- a/dev-db/mysql/mysql-5.7.25.ebuild
+++ b/dev-db/mysql/mysql-5.7.25.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-03-05 18:46 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-03-05 18:46 UTC (permalink / raw
  To: gentoo-commits

commit:     ee13c266a889143f9b5a62c32e5f08516708cf9f
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  5 18:43:59 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Mar  5 18:46:28 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee13c266

dev-db/mysql: x86 stable (bug #679354)

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

 dev-db/mysql/mysql-5.6.43.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.25.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.43.ebuild b/dev-db/mysql/mysql-5.6.43.ebuild
index 5091fdf13f3..2512da9e9d3 100644
--- a/dev-db/mysql/mysql-5.6.43.ebuild
+++ b/dev-db/mysql/mysql-5.6.43.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.25.ebuild b/dev-db/mysql/mysql-5.7.25.ebuild
index 9731df25b55..8d8e6f87a2c 100644
--- a/dev-db/mysql/mysql-5.7.25.ebuild
+++ b/dev-db/mysql/mysql-5.7.25.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-03-05 18:16 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2019-03-05 18:16 UTC (permalink / raw
  To: gentoo-commits

commit:     4a875100b3cffed3e2d095db14524d064312dcb9
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  5 18:15:06 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Tue Mar  5 18:15:06 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a875100

dev-db/mysql: amd64 stable wrt bug #679354

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
RepoMan-Options: --include-arches="amd64"

 dev-db/mysql/mysql-5.6.43.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.25.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.43.ebuild b/dev-db/mysql/mysql-5.6.43.ebuild
index 54a69e5b7ca..5091fdf13f3 100644
--- a/dev-db/mysql/mysql-5.6.43.ebuild
+++ b/dev-db/mysql/mysql-5.6.43.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.25.ebuild b/dev-db/mysql/mysql-5.7.25.ebuild
index e2d586895c7..9731df25b55 100644
--- a/dev-db/mysql/mysql-5.7.25.ebuild
+++ b/dev-db/mysql/mysql-5.7.25.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-03-03 19:04 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-03-03 19:04 UTC (permalink / raw
  To: gentoo-commits

commit:     a3d881293e55bd06787aa6960f09446192340729
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  3 19:03:44 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Mar  3 19:03:54 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3d88129

dev-db/mysql: update used patch set

Use same patch set like mysql-5.7.25 to save some bytes.

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

 dev-db/mysql/Manifest            | 1 -
 dev-db/mysql/mysql-5.6.43.ebuild | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 6b0de2f8b0a..e18f0c109b0 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -9,5 +9,4 @@ DIST mysql-boost-5.7.25.tar.gz 49107578 BLAKE2B 8a43479c496ce45e71df905b0cb6da44
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d
 DIST mysql-extras-20181023-0012Z.tar.bz2 327834 BLAKE2B 91a82cbcecbbbe94933da0d8c26cdfee0171602785b2f717fbfec7da422f0ec36f26e897a3c21695f4748017d36c9956cbef03d0852246468368b812a604df82 SHA512 94996708a9da4d55c3aab74f75b74fa4aa80e3fbbb87d9dfe6c1596a934aceed466b7c853e38d9b63f59660763ccef617defc4e6e8770451c21a252250f4e7fa
 DIST mysql-extras-20181111-2314Z.tar.bz2 329013 BLAKE2B fa928b699ef0e6f092e028fc1331cc33953d9855e784998fb2f8c1f1712e9424567b2d2b6b7c5ca375f178309522b3596fcba7babdbed7c85b87ae4b85e5db22 SHA512 5cc4d16c5c6b0491fb9532469ec0b9c65e27e1514d561ea4180845a1578fc8e7ba00fca479b9a784646846f5147e4f676340f639b78c3f5ee140dda26bd5bff2
-DIST mysql-extras-20190126-1919Z.tar.bz2 331144 BLAKE2B 27fe6846a2c98a3027d0a63ad08d72e29f0dfff456de2ad942760a5d1005ea6fe5bbebacacf44308975eacd3ed824883b74e1be3930bd329965e2ec1a4d0384f SHA512 e3a54f721e71cbd9db2b907500cb42c526914be1307a316bbba27e8124580b574c1c9a1fe6d30228cc6d2a1a6ba0797cee3628a69f1536e0467bbcb5151986cd
 DIST mysql-extras-20190303-1852Z.tar.bz2 331026 BLAKE2B ee033fce8f1b6a58f1f690710fb9709a585cd45564b35e71d4f840a3a7f83a5d80f53c24236c9976319abd89c68c62c74a7111517f1b9721d3cbd0898bf0dd8d SHA512 30361a0b848ed27f9170b1116458a9bc13b1b585c5fa1933c99927541c31e9bda4008b0563f2fc7db286f998089ebebf1fe3f18fce7a45e62acbf769ac62d8c1

diff --git a/dev-db/mysql/mysql-5.6.43.ebuild b/dev-db/mysql/mysql-5.6.43.ebuild
index e77fb13c4c4..54a69e5b7ca 100644
--- a/dev-db/mysql/mysql-5.6.43.ebuild
+++ b/dev-db/mysql/mysql-5.6.43.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20190126-1919Z"
+MY_EXTRAS_VER="20190303-1852Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-03-03 18:57 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-03-03 18:57 UTC (permalink / raw
  To: gentoo-commits

commit:     8c7d28c0427dbe3de953bfaf06c77ecabe738e63
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  3 18:47:38 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Mar  3 18:57:00 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c7d28c0

dev-db/mysql: fix LibreSSL build

Bug: https://bugs.gentoo.org/678682
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest            | 1 +
 dev-db/mysql/mysql-5.7.25.ebuild | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index f39a05b1248..6b0de2f8b0a 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -10,3 +10,4 @@ DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf4347333586
 DIST mysql-extras-20181023-0012Z.tar.bz2 327834 BLAKE2B 91a82cbcecbbbe94933da0d8c26cdfee0171602785b2f717fbfec7da422f0ec36f26e897a3c21695f4748017d36c9956cbef03d0852246468368b812a604df82 SHA512 94996708a9da4d55c3aab74f75b74fa4aa80e3fbbb87d9dfe6c1596a934aceed466b7c853e38d9b63f59660763ccef617defc4e6e8770451c21a252250f4e7fa
 DIST mysql-extras-20181111-2314Z.tar.bz2 329013 BLAKE2B fa928b699ef0e6f092e028fc1331cc33953d9855e784998fb2f8c1f1712e9424567b2d2b6b7c5ca375f178309522b3596fcba7babdbed7c85b87ae4b85e5db22 SHA512 5cc4d16c5c6b0491fb9532469ec0b9c65e27e1514d561ea4180845a1578fc8e7ba00fca479b9a784646846f5147e4f676340f639b78c3f5ee140dda26bd5bff2
 DIST mysql-extras-20190126-1919Z.tar.bz2 331144 BLAKE2B 27fe6846a2c98a3027d0a63ad08d72e29f0dfff456de2ad942760a5d1005ea6fe5bbebacacf44308975eacd3ed824883b74e1be3930bd329965e2ec1a4d0384f SHA512 e3a54f721e71cbd9db2b907500cb42c526914be1307a316bbba27e8124580b574c1c9a1fe6d30228cc6d2a1a6ba0797cee3628a69f1536e0467bbcb5151986cd
+DIST mysql-extras-20190303-1852Z.tar.bz2 331026 BLAKE2B ee033fce8f1b6a58f1f690710fb9709a585cd45564b35e71d4f840a3a7f83a5d80f53c24236c9976319abd89c68c62c74a7111517f1b9721d3cbd0898bf0dd8d SHA512 30361a0b848ed27f9170b1116458a9bc13b1b585c5fa1933c99927541c31e9bda4008b0563f2fc7db286f998089ebebf1fe3f18fce7a45e62acbf769ac62d8c1

diff --git a/dev-db/mysql/mysql-5.7.25.ebuild b/dev-db/mysql/mysql-5.7.25.ebuild
index 80d8e5aaeeb..e2d586895c7 100644
--- a/dev-db/mysql/mysql-5.7.25.ebuild
+++ b/dev-db/mysql/mysql-5.7.25.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20190126-1919Z"
+MY_EXTRAS_VER="20190303-1852Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
@@ -55,7 +55,7 @@ PATCHES=(
 	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
 	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-libressl-support.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-libressl-support.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-01-31  3:12 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2019-01-31  3:12 UTC (permalink / raw
  To: gentoo-commits

commit:     aae7a43a3dd868f34b1c13827a9cb3583b99709b
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 31 03:11:57 2019 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Thu Jan 31 03:11:57 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aae7a43a

dev-db/mysql: Version bump for 5.6.43

Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.6.43.ebuild | 799 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 800 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 3c4090a608e..f39a05b1248 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -2,6 +2,7 @@ DIST mysql-5.5.61.tar.gz 21027098 BLAKE2B b7589f632a211349fc34cec94e333b878e0711
 DIST mysql-5.5.62.tar.gz 21111902 BLAKE2B f1cbb1c6b4dfac11c2c517a57a5c6216ce43766cc247b3c9b387326a7f6446cbc21ddb42bd95afa658c3b0ed2568a29563ceea248c6ec63364ce210119d39cc2 SHA512 1080a3989c20bbbfe98739f99dacd183f2087ceee5147845852144240386808568af4c908ecdbccdcb6114000ab760ed7257492834d50018eff9520260fd91ce
 DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c
 DIST mysql-5.6.42.tar.gz 32201731 BLAKE2B c573328b37225dac090c32178f90e1419fc1848612e304bddc11eafdd48228981a846857be680978b72ef76edbd5d2422a98b5d20b4d082fabcc2b072e2b8fde SHA512 3104e6a3145a119f2b012de6af2a92fc37134aa402b889a562f5fc2391705d0bc2f718166c5fa8387d973fff5ecd9544c8b389b6d0c81d98bdcaf2acfb9b55e8
+DIST mysql-5.6.43.tar.gz 32200219 BLAKE2B 2aa1397ff5f011a169ae47650be8db7a097a62f53ff06d63760a419906841f0540db19449c1d71d60be7d684e49b4436e1d6e72e7a1cf99057a3f98fad11557f SHA512 8820aee9b34cfebc841d756b12713517c9dafed7bee7b09c8e82c8f359e2e12b25da47c4e49e0aa4afc26193b774e0fa0dfd422c2aa09c3112b6d6e4b62b9a68
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
 DIST mysql-boost-5.7.24.tar.gz 49110448 BLAKE2B 1cf64712d84cbb2dfd31f2a530470b6f7cbf5ae9107106d86705575ea9739fa582e1f079447d9a58c4762fffc636d69e448ebdec9172ee15dc09245bc39c3525 SHA512 bbd411e15cd9e6053a353146808b74881d2d950f09e94794a699e7604dadf767b58b661a8321fbe1424f2c2e6cfc3adaa388242183e759082eae47b64cbfbcde
 DIST mysql-boost-5.7.25.tar.gz 49107578 BLAKE2B 8a43479c496ce45e71df905b0cb6da442340b691caa15f9862a8c981e7189c50e73b1701c393fe46ab580c508f785d5f15259c2331c77e0790191f3d41bb385c SHA512 b111c64bfcd49dba584bed71a0c7ce33b2b0654654d8f4eaa1a2b7a5daed9674ebfd4a0dfb93c20ffee028feead4709eaf600bb5469f81c86b743d395dfe27a9

diff --git a/dev-db/mysql/mysql-5.6.43.ebuild b/dev-db/mysql/mysql-5.6.43.ebuild
new file mode 100644
index 00000000000..e77fb13c4c4
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.43.ebuild
@@ -0,0 +1,799 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20190126-1919Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils flag-o-matic prefix toolchain-funcs \
+	user cmake-utils multilib-build
+
+SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
+	+server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
+	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
+	"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	kernel_linux? (
+		sys-process/procps:0=
+		dev-libs/libaio:0=
+	)
+	net-misc/curl
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	jemalloc? ( dev-libs/jemalloc:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	!yassl? (
+		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+		libressl? ( dev-libs/libressl:0= )
+	)
+	>=sys-libs/zlib-1.2.3:0=
+	sys-libs/ncurses:0=
+	server? (
+		numa? ( sys-process/numactl )
+	)
+	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+	static? ( sys-libs/ncurses[static-libs] )
+	test? ( dev-perl/JSON )
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+	${COMMON_DEPEND}
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	_disable_engine() {
+		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+	}
+
+	_disable_plugin() {
+		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+	}
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	if use tcmalloc; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	local plugin
+	local server_plugins=( semisync )
+	local test_plugins=( audit_null daemon_example fulltext )
+	if ! use server; then # These plugins are for the server
+		for plugin in "${server_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	if ! use test; then # These plugins are only used during testing
+		for plugin in "${test_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	# Don't build example
+	_disable_engine example
+	_disable_engine ndb
+	_disable_plugin innodb_memcached
+
+	cmake-utils_src_prepare
+}
+
+src_configure(){
+	# bug 508724 mariadb cannot use ld.gold
+	tc-ld-disable-gold
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling.  We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_LIBEVENT=NO
+		-DWITHOUT_CLIENTLIBS=YES
+		-DENABLE_DTRACE=$(usex systemtap)
+		-DWITH_SSL=$(usex yassl bundled system)
+		-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
+		-DWITHOUT_VALIDATE_PASSWORD=1
+	)
+
+	if use server ; then
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+		mycmakeargs+=(
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
+	local mycnf_src="my.cnf-5.6"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR%/}/${mycnf_src}" \
+		> "${TMPDIR%/}/my.cnf.ok" || die
+	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8|latin1|g" \
+			"${TMPDIR%/}/my.cnf.ok" || die
+	fi
+	eprefixify "${TMPDIR%/}/my.cnf.ok"
+	newins "${TMPDIR}/my.cnf.ok" my.cnf
+
+	if use server ; then
+		einfo "Including support files and sample configurations"
+		docinto "support-files"
+		local script
+		for script in \
+			"${S}"/support-files/magic
+		do
+			[[ -f "$script" ]] && dodoc "${script}"
+		done
+
+		docinto "scripts"
+		for script in "${S}"/scripts/mysql* ; do
+			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+		done
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='perl server static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" > /dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.6 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf federated.federated_plugin ; do
+			_disable_test  "$t" "False positives in Gentoo"
+	done
+
+	# Bad test definition
+	_disable_test main.mysqldump "Test fails after 2018-12-31 with new warnings"
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd > /dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]]; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX%/}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
+	[[ -r "${help_tables}" ]] \
+	&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
+	|| touch "${TMPDIR}/fill_help_tables.sql"
+	help_tables="${TMPDIR}/fill_help_tables.sql"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT%/}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]]; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]]; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
+
+	local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
+	[[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
+	if [[ -r "${help_tables}" ]] ; then
+		cat "${help_tables}" >> "${sqltmp}"
+	fi
+	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
+	if [ $? -ne 0 ]; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
+		${options} \
+		$(use prefix || echo --user=mysql) \
+		--log-warnings=0 \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile} \
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]]; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	if [[ -n "${sqltmp}" ]] ; then
+		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+		"${EROOT%/}/usr/bin/mysql" \
+			--socket="${socket}" \
+			-hlocalhost \
+			-uroot \
+			--password="${MYSQL_ROOT_PASSWORD}" \
+			mysql < "${sqltmp}"
+		rc=$?
+		eend $?
+		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+	fi
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2019-01-26 19:23 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2019-01-26 19:23 UTC (permalink / raw
  To: gentoo-commits

commit:     dfef360c35d4e9d197837d3d57258fca41adf785
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 26 19:23:31 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Jan 26 19:23:49 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfef360c

dev-db/mysql: bump to v5.7.25

Closes: https://bugs.gentoo.org/671722
Package-Manager: Portage-2.3.58, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest            |   2 +
 dev-db/mysql/mysql-5.7.25.ebuild | 946 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 948 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 4932e7433c2..3c4090a608e 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -4,6 +4,8 @@ DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa3492688
 DIST mysql-5.6.42.tar.gz 32201731 BLAKE2B c573328b37225dac090c32178f90e1419fc1848612e304bddc11eafdd48228981a846857be680978b72ef76edbd5d2422a98b5d20b4d082fabcc2b072e2b8fde SHA512 3104e6a3145a119f2b012de6af2a92fc37134aa402b889a562f5fc2391705d0bc2f718166c5fa8387d973fff5ecd9544c8b389b6d0c81d98bdcaf2acfb9b55e8
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
 DIST mysql-boost-5.7.24.tar.gz 49110448 BLAKE2B 1cf64712d84cbb2dfd31f2a530470b6f7cbf5ae9107106d86705575ea9739fa582e1f079447d9a58c4762fffc636d69e448ebdec9172ee15dc09245bc39c3525 SHA512 bbd411e15cd9e6053a353146808b74881d2d950f09e94794a699e7604dadf767b58b661a8321fbe1424f2c2e6cfc3adaa388242183e759082eae47b64cbfbcde
+DIST mysql-boost-5.7.25.tar.gz 49107578 BLAKE2B 8a43479c496ce45e71df905b0cb6da442340b691caa15f9862a8c981e7189c50e73b1701c393fe46ab580c508f785d5f15259c2331c77e0790191f3d41bb385c SHA512 b111c64bfcd49dba584bed71a0c7ce33b2b0654654d8f4eaa1a2b7a5daed9674ebfd4a0dfb93c20ffee028feead4709eaf600bb5469f81c86b743d395dfe27a9
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d
 DIST mysql-extras-20181023-0012Z.tar.bz2 327834 BLAKE2B 91a82cbcecbbbe94933da0d8c26cdfee0171602785b2f717fbfec7da422f0ec36f26e897a3c21695f4748017d36c9956cbef03d0852246468368b812a604df82 SHA512 94996708a9da4d55c3aab74f75b74fa4aa80e3fbbb87d9dfe6c1596a934aceed466b7c853e38d9b63f59660763ccef617defc4e6e8770451c21a252250f4e7fa
 DIST mysql-extras-20181111-2314Z.tar.bz2 329013 BLAKE2B fa928b699ef0e6f092e028fc1331cc33953d9855e784998fb2f8c1f1712e9424567b2d2b6b7c5ca375f178309522b3596fcba7babdbed7c85b87ae4b85e5db22 SHA512 5cc4d16c5c6b0491fb9532469ec0b9c65e27e1514d561ea4180845a1578fc8e7ba00fca479b9a784646846f5147e4f676340f639b78c3f5ee140dda26bd5bff2
+DIST mysql-extras-20190126-1919Z.tar.bz2 331144 BLAKE2B 27fe6846a2c98a3027d0a63ad08d72e29f0dfff456de2ad942760a5d1005ea6fe5bbebacacf44308975eacd3ed824883b74e1be3930bd329965e2ec1a4d0384f SHA512 e3a54f721e71cbd9db2b907500cb42c526914be1307a316bbba27e8124580b574c1c9a1fe6d30228cc6d2a1a6ba0797cee3628a69f1536e0467bbcb5151986cd

diff --git a/dev-db/mysql/mysql-5.7.25.ebuild b/dev-db/mysql/mysql-5.7.25.ebuild
new file mode 100644
index 00000000000..80d8e5aaeeb
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.25.ebuild
@@ -0,0 +1,946 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20190126-1919Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit cmake-utils eutils flag-o-matic linux-info \
+	prefix toolchain-funcs user multilib-minimal
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-libressl-support.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-mips-ASM.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-build-without-server.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="net-misc/curl:=
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	sys-libs/ncurses:0=
+	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+	)
+	jemalloc? ( dev-libs/jemalloc:0= )
+	kernel_linux? (
+		dev-libs/libaio:0=
+		sys-process/procps:0=
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
+		numa? ( sys-process/numactl )
+	)
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	!yassl? (
+		client-libs? (
+			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+		)
+		!client-libs? (
+			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+			libressl? ( dev-libs/libressl:0= )
+		)
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
+	virtual/yacc
+	server? (
+		dev-libs/libevent
+		experimental? ( net-libs/rpcsvc-proto )
+	)
+	static? ( sys-libs/ncurses[static-libs] )
+	test? ( dev-perl/JSON )
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]] ; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if use numa ; then
+		local CONFIG_CHECK="~NUMA"
+
+		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+		check_extra_config
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	cmake-utils_src_prepare
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/libevent \
+		"${S}"/zlib \
+		|| die
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+}
+
+src_configure(){
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
+		-DMYSQL_DATADIR="${EPREFIX%/}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX%/}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use yassl ; then
+		mycmakeargs+=( -DWITH_SSL=system )
+	else
+		mycmakeargs+=( -DWITH_SSL=bundled )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI, bug 530132
+	if multilib_is_native_abi ; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
+			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static ; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake-utils_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]] ; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf ; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+	for t in main.xa_prepared_binlog_off rpl.rpl_non_direct_stm_mixing_engines ; do
+			_disable_test "$t" "Unstable test"
+	done
+
+	if ! use amd64 ; then
+		# fixed in >=mysql-8 via commit 0a417e84
+		_disable_test "gis.gis_bugs_crashes" "Unstable results on non-amd64 architectures due to floating-point operation"
+	fi
+
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+				_disable_test "$t" "requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+
+	cmake-utils_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		eprefixify "${TMPDIR}/my.cnf.ok"
+
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX%/}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
+			if [[ -d "${MY_DATADIR_s}" ]] ; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]] ; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+	fi
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+	fi
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT%/}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	echo "USE mysql;" >"${sqltmp}"
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
+	if [[ $? -ne 0 ]] ; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
+		${options} \
+		$(use prefix || echo --user=mysql) \
+		--log-warnings=0 \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile} \
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]] ; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-12-18 19:36 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2018-12-18 19:36 UTC (permalink / raw
  To: gentoo-commits

commit:     cc238afd8cca227a5ef5b7bdc6d4629cacf1741f
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 18 19:36:28 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Tue Dec 18 19:36:28 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc238afd

dev-db/mysql: Drop old

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 dev-db/mysql/Manifest            |   1 -
 dev-db/mysql/mysql-5.6.41.ebuild | 789 ---------------------------------------
 2 files changed, 790 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 92973c30b6f..4932e7433c2 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,7 +1,6 @@
 DIST mysql-5.5.61.tar.gz 21027098 BLAKE2B b7589f632a211349fc34cec94e333b878e07113969bf5cf6f78cd37435d95b15c03eaf188ed09768033b182de125c9f018a5fe902094f17ab891f94cab9de6dd SHA512 978384915c145ec8f0d85deb764154d8d4a9764f2d342928bda6ad43a00bc110aa888895416d2ba5684a4432e433037990dd3fe8c5caf024faa487bc2e153f49
 DIST mysql-5.5.62.tar.gz 21111902 BLAKE2B f1cbb1c6b4dfac11c2c517a57a5c6216ce43766cc247b3c9b387326a7f6446cbc21ddb42bd95afa658c3b0ed2568a29563ceea248c6ec63364ce210119d39cc2 SHA512 1080a3989c20bbbfe98739f99dacd183f2087ceee5147845852144240386808568af4c908ecdbccdcb6114000ab760ed7257492834d50018eff9520260fd91ce
 DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c
-DIST mysql-5.6.41.tar.gz 32111985 BLAKE2B 5ccad59333525b354db4fa892857e237cddf8fe1a4d289c6e410c31d6142a71d3ce4dab8d954fa9932ec1f83b50e8eccd5845e082deaaa56f1c0c5e21b2ce6c0 SHA512 a62d7a68c6bb49de33f8c9e634bce53cb453a87238e92967115e8e928fa9ed291727b8bd5a5271a0b5b634d957eb310c745edfb14b6be1deb9099bb757aa2cff
 DIST mysql-5.6.42.tar.gz 32201731 BLAKE2B c573328b37225dac090c32178f90e1419fc1848612e304bddc11eafdd48228981a846857be680978b72ef76edbd5d2422a98b5d20b4d082fabcc2b072e2b8fde SHA512 3104e6a3145a119f2b012de6af2a92fc37134aa402b889a562f5fc2391705d0bc2f718166c5fa8387d973fff5ecd9544c8b389b6d0c81d98bdcaf2acfb9b55e8
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
 DIST mysql-boost-5.7.24.tar.gz 49110448 BLAKE2B 1cf64712d84cbb2dfd31f2a530470b6f7cbf5ae9107106d86705575ea9739fa582e1f079447d9a58c4762fffc636d69e448ebdec9172ee15dc09245bc39c3525 SHA512 bbd411e15cd9e6053a353146808b74881d2d950f09e94794a699e7604dadf767b58b661a8321fbe1424f2c2e6cfc3adaa388242183e759082eae47b64cbfbcde

diff --git a/dev-db/mysql/mysql-5.6.41.ebuild b/dev-db/mysql/mysql-5.6.41.ebuild
deleted file mode 100644
index d4052c130f8..00000000000
--- a/dev-db/mysql/mysql-5.6.41.ebuild
+++ /dev/null
@@ -1,789 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20181111-2314Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs \
-	user cmake-utils multilib-build
-
-SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0/18"
-IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
-	+server static static-libs systemtap tcmalloc test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
-	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
-	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
-	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
-	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
-	"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	kernel_linux? (
-		sys-process/procps:0=
-		dev-libs/libaio:0=
-	)
-	net-misc/curl
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	jemalloc? ( dev-libs/jemalloc:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	!yassl? (
-		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-		libressl? ( dev-libs/libressl:0= )
-	)
-	>=sys-libs/zlib-1.2.3:0=
-	sys-libs/ncurses:0=
-	server? (
-		numa? ( sys-process/numactl )
-	)
-	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
-	static? ( sys-libs/ncurses[static-libs] )
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
-	${COMMON_DEPEND}
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	_disable_engine() {
-		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
-	}
-
-	_disable_plugin() {
-		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
-	}
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-	if use tcmalloc; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	local plugin
-	local server_plugins=( semisync )
-	local test_plugins=( audit_null daemon_example fulltext )
-	if ! use server; then # These plugins are for the server
-		for plugin in "${server_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	if ! use test; then # These plugins are only used during testing
-		for plugin in "${test_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	# Don't build example
-	_disable_engine example
-	_disable_engine ndb
-	_disable_plugin innodb_memcached
-
-	cmake-utils_src_prepare
-}
-
-src_configure(){
-	# bug 508724 mariadb cannot use ld.gold
-	tc-ld-disable-gold
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling.  We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_LIBEVENT=NO
-		-DWITHOUT_CLIENTLIBS=YES
-		-DENABLE_DTRACE=$(usex systemtap)
-		-DWITH_SSL=$(usex yassl bundled system)
-		-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
-		-DWITHOUT_VALIDATE_PASSWORD=1
-	)
-
-	if use server ; then
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-		mycmakeargs+=(
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DENABLED_PROFILING=$(usex profiling)
-		)
-
-		if use static; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	cmake-utils_src_compile
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
-	local mycnf_src="my.cnf-5.6"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR%/}/${mycnf_src}" \
-		> "${TMPDIR%/}/my.cnf.ok" || die
-	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8|latin1|g" \
-			"${TMPDIR%/}/my.cnf.ok" || die
-	fi
-	eprefixify "${TMPDIR%/}/my.cnf.ok"
-	newins "${TMPDIR}/my.cnf.ok" my.cnf
-
-	if use server ; then
-		einfo "Including support files and sample configurations"
-		docinto "support-files"
-		local script
-		for script in \
-			"${S}"/support-files/magic
-		do
-			[[ -f "$script" ]] && dodoc "${script}"
-		done
-
-		docinto "scripts"
-		for script in "${S}"/scripts/mysql* ; do
-			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
-		done
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='perl server static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" > /dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf federated.federated_plugin ; do
-			_disable_test  "$t" "False positives in Gentoo"
-	done
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd > /dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]]; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX%/}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
-		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
-	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
-	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
-	[[ -r "${help_tables}" ]] \
-	&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
-	|| touch "${TMPDIR}/fill_help_tables.sql"
-	help_tables="${TMPDIR}/fill_help_tables.sql"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR%/}/mysqld-help"
-	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]]; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]]; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
-	chown mysql "${sqltmp}" || die
-
-	local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
-	[[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
-	if [[ -r "${help_tables}" ]] ; then
-		cat "${help_tables}" >> "${sqltmp}"
-	fi
-	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [ $? -ne 0 ]; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT%/}/usr/sbin/mysqld \
-		${options} \
-		$(use prefix || echo --user=mysql) \
-		--log-warnings=0 \
-		--basedir=${EROOT%/}/usr \
-		--datadir=${ROOT%/}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile} \
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]]; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
-	"${EROOT%/}/usr/bin/mysql" \
-		--no-defaults \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	if [[ -n "${sqltmp}" ]] ; then
-		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
-		"${EROOT%/}/usr/bin/mysql" \
-			--socket="${socket}" \
-			-hlocalhost \
-			-uroot \
-			--password="${MYSQL_ROOT_PASSWORD}" \
-			mysql < "${sqltmp}"
-		rc=$?
-		eend $?
-		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
-	fi
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-11-30 11:13 Tobias Klausmann
  0 siblings, 0 replies; 393+ messages in thread
From: Tobias Klausmann @ 2018-11-30 11:13 UTC (permalink / raw
  To: gentoo-commits

commit:     e577cbc89efb85c78f2c7efdbb56a01c914de51c
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 30 11:12:26 2018 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Fri Nov 30 11:12:26 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e577cbc8

dev-db/mysql-5.7.24-r0: alpha stable

Bug: http://bugs.gentoo.org/671516
Signed-off-by: Tobias Klausmann <klausman <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.24.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.24.ebuild b/dev-db/mysql/mysql-5.7.24.ebuild
index 4df48f08e81..f178d936fc9 100644
--- a/dev-db/mysql/mysql-5.7.24.ebuild
+++ b/dev-db/mysql/mysql-5.7.24.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-11-29 17:44 Tobias Klausmann
  0 siblings, 0 replies; 393+ messages in thread
From: Tobias Klausmann @ 2018-11-29 17:44 UTC (permalink / raw
  To: gentoo-commits

commit:     0b69e067097e4e3c4bf6e149cda52dbb09273c1a
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 29 17:43:49 2018 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Thu Nov 29 17:43:49 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b69e067

dev-db/mysql-5.6.42-r0: alpha stable

Bug: http://bugs.gentoo.org/671516
Signed-off-by: Tobias Klausmann <klausman <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.42.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.42.ebuild b/dev-db/mysql/mysql-5.6.42.ebuild
index 3e27254e5ad..1ec7ebd8826 100644
--- a/dev-db/mysql/mysql-5.6.42.ebuild
+++ b/dev-db/mysql/mysql-5.6.42.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-11-28 23:11 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2018-11-28 23:11 UTC (permalink / raw
  To: gentoo-commits

commit:     3b67ab66a528fdf5d8701edb99a61af17f546619
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 28 23:10:34 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Nov 28 23:10:34 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b67ab66

dev-db/mysql: stable 5.7.24 for ia64, bug #671516

Package-Manager: Portage-2.3.52, Repoman-2.3.12
RepoMan-Options: --include-arches="ia64"
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.24.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.24.ebuild b/dev-db/mysql/mysql-5.7.24.ebuild
index d3537fa9102..4df48f08e81 100644
--- a/dev-db/mysql/mysql-5.7.24.ebuild
+++ b/dev-db/mysql/mysql-5.7.24.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-11-28 23:11 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2018-11-28 23:11 UTC (permalink / raw
  To: gentoo-commits

commit:     a61cd89a9c96e10943ad3eb9ea281734af8b31d3
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 28 23:10:28 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Nov 28 23:10:28 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a61cd89a

dev-db/mysql: stable 5.6.42 for ia64, bug #671516

Package-Manager: Portage-2.3.52, Repoman-2.3.12
RepoMan-Options: --include-arches="ia64"
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.42.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.42.ebuild b/dev-db/mysql/mysql-5.6.42.ebuild
index d85ab4c13cd..3e27254e5ad 100644
--- a/dev-db/mysql/mysql-5.6.42.ebuild
+++ b/dev-db/mysql/mysql-5.6.42.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-11-26 14:49 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2018-11-26 14:49 UTC (permalink / raw
  To: gentoo-commits

commit:     c32c71cc6710d795e5a2fd1c860f944db4f98f7f
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 26 14:48:52 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Mon Nov 26 14:48:52 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c32c71cc

dev-db/mysql: arm stable wrt bug #671516

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 dev-db/mysql/mysql-5.6.42.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.24.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.42.ebuild b/dev-db/mysql/mysql-5.6.42.ebuild
index 5ae48d703ed..d85ab4c13cd 100644
--- a/dev-db/mysql/mysql-5.6.42.ebuild
+++ b/dev-db/mysql/mysql-5.6.42.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.24.ebuild b/dev-db/mysql/mysql-5.7.24.ebuild
index a0174aac124..d3537fa9102 100644
--- a/dev-db/mysql/mysql-5.7.24.ebuild
+++ b/dev-db/mysql/mysql-5.7.24.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-11-20 18:07 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2018-11-20 18:07 UTC (permalink / raw
  To: gentoo-commits

commit:     a5d4224de36d89f26dfbc04861b85ec56d6642b7
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 20 18:06:55 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Tue Nov 20 18:06:55 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5d4224d

dev-db/mysql: amd64 stable wrt bug #671516

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 dev-db/mysql/mysql-5.6.42.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.24.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.42.ebuild b/dev-db/mysql/mysql-5.6.42.ebuild
index ded156469a8..5ae48d703ed 100644
--- a/dev-db/mysql/mysql-5.6.42.ebuild
+++ b/dev-db/mysql/mysql-5.6.42.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.24.ebuild b/dev-db/mysql/mysql-5.7.24.ebuild
index 4ae808728ef..a0174aac124 100644
--- a/dev-db/mysql/mysql-5.7.24.ebuild
+++ b/dev-db/mysql/mysql-5.7.24.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-11-20  1:42 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-11-20  1:42 UTC (permalink / raw
  To: gentoo-commits

commit:     b96220bba7f26d2f4e5c2c4469b28788bec0f08a
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 20 01:35:01 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Nov 20 01:35:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b96220bb

dev-db/mysql: x86 stable (bug #671516)

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

 dev-db/mysql/mysql-5.6.42.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.24.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.42.ebuild b/dev-db/mysql/mysql-5.6.42.ebuild
index 9b33b46eaed..ded156469a8 100644
--- a/dev-db/mysql/mysql-5.6.42.ebuild
+++ b/dev-db/mysql/mysql-5.6.42.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase

diff --git a/dev-db/mysql/mysql-5.7.24.ebuild b/dev-db/mysql/mysql-5.7.24.ebuild
index 7dd4cdbf432..4ae808728ef 100644
--- a/dev-db/mysql/mysql-5.7.24.ebuild
+++ b/dev-db/mysql/mysql-5.7.24.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-11-19 18:28 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-11-19 18:28 UTC (permalink / raw
  To: gentoo-commits

commit:     172eaac024b3fb861de05350ff994f12b8350448
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 19 18:28:14 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Nov 19 18:28:26 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=172eaac0

dev-db/mysql: disable additional unstable tests

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

 dev-db/mysql/mysql-5.7.24.ebuild | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.24.ebuild b/dev-db/mysql/mysql-5.7.24.ebuild
index d79963ba242..7dd4cdbf432 100644
--- a/dev-db/mysql/mysql-5.7.24.ebuild
+++ b/dev-db/mysql/mysql-5.7.24.ebuild
@@ -545,10 +545,16 @@ src_test() {
 
 	# Unstable tests
 	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
-	for t in main.xa_prepared_binlog_off ; do
+	# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+	for t in main.xa_prepared_binlog_off rpl.rpl_non_direct_stm_mixing_engines ; do
 			_disable_test "$t" "Unstable test"
 	done
 
+	if ! use amd64 ; then
+		# fixed in >=mysql-8 via commit 0a417e84
+		_disable_test "gis.gis_bugs_crashes" "Unstable results on non-amd64 architectures due to floating-point operation"
+	fi
+
 	if use numa && use kernel_linux ; then
 		# bug 584880
 		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-11-19 16:24 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-11-19 16:24 UTC (permalink / raw
  To: gentoo-commits

commit:     66dda5186a927de2ff239c95a9bb39130447a10b
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 19 16:23:29 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Nov 19 16:23:57 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66dda518

dev-db/mysql: dev-perl/JSON is required for running tests

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

 dev-db/mysql/mysql-5.6.42.ebuild | 1 +
 dev-db/mysql/mysql-5.7.24.ebuild | 1 +
 2 files changed, 2 insertions(+)

diff --git a/dev-db/mysql/mysql-5.6.42.ebuild b/dev-db/mysql/mysql-5.6.42.ebuild
index a7c2b5d4d84..9b33b46eaed 100644
--- a/dev-db/mysql/mysql-5.6.42.ebuild
+++ b/dev-db/mysql/mysql-5.6.42.ebuild
@@ -93,6 +93,7 @@ COMMON_DEPEND="
 "
 DEPEND="virtual/yacc
 	static? ( sys-libs/ncurses[static-libs] )
+	test? ( dev-perl/JSON )
 	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
 	${COMMON_DEPEND}"
 RDEPEND="selinux? ( sec-policy/selinux-mysql )

diff --git a/dev-db/mysql/mysql-5.7.24.ebuild b/dev-db/mysql/mysql-5.7.24.ebuild
index d42e62682c4..d79963ba242 100644
--- a/dev-db/mysql/mysql-5.7.24.ebuild
+++ b/dev-db/mysql/mysql-5.7.24.ebuild
@@ -111,6 +111,7 @@ DEPEND="${COMMON_DEPEND}
 		experimental? ( net-libs/rpcsvc-proto )
 	)
 	static? ( sys-libs/ncurses[static-libs] )
+	test? ( dev-perl/JSON )
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-11-19 14:10 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-11-19 14:10 UTC (permalink / raw
  To: gentoo-commits

commit:     2c58c81f05f45afb4b733a8e21c6ba1fd025af9b
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 19 14:10:06 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Nov 19 14:10:06 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c58c81f

dev-db/mysql: disable federated.federated_plugin test

Closes: https://bugs.gentoo.org/670816
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/mysql-5.5.62.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.5.62.ebuild b/dev-db/mysql/mysql-5.5.62.ebuild
index 630c5076e7d..cb229697802 100644
--- a/dev-db/mysql/mysql-5.5.62.ebuild
+++ b/dev-db/mysql/mysql-5.5.62.ebuild
@@ -476,7 +476,8 @@ src_test() {
 	# segfaults at random under Portage only, suspect resource limits.
 
 	local t
-	for t in main.mysql_client_test main.mysql_client_test_nonblock \
+	for t in federated.federated_plugin \
+		main.mysql_client_test main.mysql_client_test_nonblock \
 		main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam \
 		main.mysqlhotcopy_archive main.mysqlhotcopy_myisam main.openssl_1 \
 		rpl.rpl_semi_sync_uninstall_plugin ; do


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-11-14 16:59 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-11-14 16:59 UTC (permalink / raw
  To: gentoo-commits

commit:     e32beac840f379d83a1a79f8c5f26aa7de1ee0d0
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 14 16:58:04 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Nov 14 16:59:30 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e32beac8

dev-db/mysql: bump to v5.5.62

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

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.5.62.ebuild | 796 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 797 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 81629f0e14c..0ed293c5d6f 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,5 @@
 DIST mysql-5.5.61.tar.gz 21027098 BLAKE2B b7589f632a211349fc34cec94e333b878e07113969bf5cf6f78cd37435d95b15c03eaf188ed09768033b182de125c9f018a5fe902094f17ab891f94cab9de6dd SHA512 978384915c145ec8f0d85deb764154d8d4a9764f2d342928bda6ad43a00bc110aa888895416d2ba5684a4432e433037990dd3fe8c5caf024faa487bc2e153f49
+DIST mysql-5.5.62.tar.gz 21111902 BLAKE2B f1cbb1c6b4dfac11c2c517a57a5c6216ce43766cc247b3c9b387326a7f6446cbc21ddb42bd95afa658c3b0ed2568a29563ceea248c6ec63364ce210119d39cc2 SHA512 1080a3989c20bbbfe98739f99dacd183f2087ceee5147845852144240386808568af4c908ecdbccdcb6114000ab760ed7257492834d50018eff9520260fd91ce
 DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c
 DIST mysql-5.6.41.tar.gz 32111985 BLAKE2B 5ccad59333525b354db4fa892857e237cddf8fe1a4d289c6e410c31d6142a71d3ce4dab8d954fa9932ec1f83b50e8eccd5845e082deaaa56f1c0c5e21b2ce6c0 SHA512 a62d7a68c6bb49de33f8c9e634bce53cb453a87238e92967115e8e928fa9ed291727b8bd5a5271a0b5b634d957eb310c745edfb14b6be1deb9099bb757aa2cff
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953

diff --git a/dev-db/mysql/mysql-5.5.62.ebuild b/dev-db/mysql/mysql-5.5.62.ebuild
new file mode 100644
index 00000000000..630c5076e7d
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.62.ebuild
@@ -0,0 +1,796 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180804-2323Z"
+SUBSLOT="18"
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils flag-o-matic prefix toolchain-funcs user cmake-utils multilib-build
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.5/${P}.tar.gz
+	https://downloads.mysql.com/archives/MySQL-5.5/${P}.tar.gz"
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://mysql.com/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="0/${SUBSLOT:-0}"
+IUSE="bindist client-libs debug extraengine jemalloc latin1 libressl
+	+perl profiling selinux +server	static static-libs systemtap tcmalloc
+	test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
+	inherit git-r3
+	EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+else
+	MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}/01050_all_mysql_config_cleanup-5.5.patch"
+	"${MY_PATCH_DIR}/02040_all_embedded-library-shared-5.5.10.patch"
+	"${MY_PATCH_DIR}/20001_all_fix-minimal-build-cmake-mysql-5.5.41.patch"
+	"${MY_PATCH_DIR}/20002_all_mysql-va-list.patch"
+	"${MY_PATCH_DIR}/20006_all_cmake_elib-mysql-5.5.53.patch"
+	"${MY_PATCH_DIR}/20007_all_cmake-debug-werror-5.6.22.patch"
+	"${MY_PATCH_DIR}/20008_all_mysql-tzinfo-symlink-5.6.37.patch"
+	"${MY_PATCH_DIR}/20009_all_mysql_myodbc_symbol_fix-5.5.38.patch"
+	"${MY_PATCH_DIR}/20018_all_mysql-5.5.60-without-clientlibs-tools.patch"
+	"${MY_PATCH_DIR}/20027_all_mysql-5.5-perl5.26-includes.patch"
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	kernel_linux? (
+		sys-process/procps:0=
+		dev-libs/libaio:0=
+	)
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	jemalloc? ( dev-libs/jemalloc:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	!yassl? (
+		!libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
+		libressl? ( dev-libs/libressl:0= )
+	)
+	>=sys-libs/zlib-1.2.3:0=
+	sys-libs/ncurses:0=
+	!bindist? (
+		>=sys-libs/readline-4.1:0=
+	)
+	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+	static? ( sys-libs/ncurses[static-libs] )
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+	${COMMON_DEPEND}
+	perl? ( !dev-db/mytop
+		virtual/perl-Getopt-Long
+		dev-perl/TermReadKey
+		virtual/perl-Term-ANSIColor
+		virtual/perl-Time-HiRes )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+
+		einfo
+		elog "Be sure to edit the my.cnf file to activate your cluster settings."
+		elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
+		elog "The first time the cluster is activated, you should add"
+		elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
+		elog "This option should then be removed for subsequent starts."
+		einfo
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR%/}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	_disable_engine() {
+		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+	}
+
+	_disable_plugin() {
+		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+	}
+
+	if use tcmalloc; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
+	fi
+
+	if use jemalloc; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	local plugin
+	local server_plugins=( semisync )
+	local test_plugins=( audit_null daemon_example fulltext )
+	if ! use server; then # These plugins are for the server
+		for plugin in "${server_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	if ! use test; then # These plugins are only used during testing
+		for plugin in "${test_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	# Don't build example
+	_disable_engine example
+	_disable_engine ndb
+
+	cmake-utils_src_prepare
+}
+
+src_configure(){
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
+		-DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		-DWITH_ZLIB=system
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+		# The build forces this to be defined when cross-compiling.  We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITHOUT_CLIENTLIBS=YES
+		-DWITH_READLINE=$(usex bindist 1 0)
+		-DENABLE_DTRACE=$(usex systemtap)
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use yassl ; then
+		mycmakeargs+=( -DWITH_SSL=system )
+	else
+		mycmakeargs+=( -DWITH_SSL=bundled )
+	fi
+
+	if use server ; then
+
+		# Federated{,X} must be treated special otherwise they will not be built as plugins
+		if ! use extraengine ; then
+			mycmakeargs+=(
+				-DWITHOUT_FEDERATED_STORAGE_ENGINE=1
+				-DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
+		fi
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+		mycmakeargs+=(
+			-DINSTALL_SQLBENCHDIR=share/mysql
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DEXTRA_CHARSETS=none
+			-DINSTALL_SQLBENCHDIR=
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
+	if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then
+		rm "${ED%/}/usr/include/mysql/server/private/config.h" || die
+	fi
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED%/}/usr/data" ]] ; then
+		rm -Rf "${ED%/}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
+	local mycnf_src="my.cnf-5.5"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR%/}/${mycnf_src}" \
+		> "${TMPDIR%/}/my.cnf.ok" || die
+	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8|latin1|g" \
+			"${TMPDIR%/}/my.cnf.ok" || die
+	fi
+	eprefixify "${TMPDIR%/}/my.cnf.ok"
+	newins "${TMPDIR}/my.cnf.ok" my.cnf
+
+	if use server ; then
+		einfo "Including support files and sample configurations"
+		docinto "support-files"
+		local script
+		for script in \
+			"${S%/}"/support-files/magic
+		do
+			[[ -f "$script" ]] && dodoc "${script}"
+		done
+
+		docinto "scripts"
+		for script in "${S%/}"/scripts/mysql* ; do
+			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+		done
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED%/}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" > /dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.5 for now and are believed to be
+	# false positives:
+	#
+	# main.mysql_client_test, main.mysql_client_test_nonblock
+	# main.mysql_client_test_comp:
+	# segfaults at random under Portage only, suspect resource limits.
+
+	local t
+	for t in main.mysql_client_test main.mysql_client_test_nonblock \
+		main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam \
+		main.mysqlhotcopy_archive main.mysqlhotcopy_myisam main.openssl_1 \
+		rpl.rpl_semi_sync_uninstall_plugin ; do
+			_disable_test  "$t" "False positives in Gentoo"
+	done
+
+	if ! use client-libs ; then
+		_disable_test main.plugin_auth "Needs client libraries built"
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd > /dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]]; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+		local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
+	fi
+	if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
+	fi
+	if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in grant-tables host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]]; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]]; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
+
+	local cmd=( "${EROOT}usr/share/mysql/scripts/mysql_install_db" )
+	[[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
+	cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR}"/mysql_install_db.log 2>&1
+	if [ $? -ne 0 ]; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT}/usr/sbin/mysqld \
+		${options} \
+		--log-warnings=0 \
+		--basedir=${EROOT}/usr \
+		--datadir=${ROOT}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile} \
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]]; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
+	"${EROOT}/usr/bin/mysql" \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	if [[ -n "${sqltmp}" ]] ; then
+		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+		"${EROOT}/usr/bin/mysql" \
+			"--socket=${socket}" \
+			-hlocalhost \
+			-uroot \
+			--password="${MYSQL_ROOT_PASSWORD}" \
+			mysql < "${sqltmp}"
+		rc=$?
+		eend $?
+		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+	fi
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-11-14 16:59 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-11-14 16:59 UTC (permalink / raw
  To: gentoo-commits

commit:     da19613fef871fc5ffccd0c7f3dd181dd0b74e53
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 14 16:59:12 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Nov 14 16:59:31 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da19613f

dev-db/mysql: bump to v5.6.42

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

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.6.42.ebuild | 795 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 796 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 0ed293c5d6f..92973c30b6f 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -2,6 +2,7 @@ DIST mysql-5.5.61.tar.gz 21027098 BLAKE2B b7589f632a211349fc34cec94e333b878e0711
 DIST mysql-5.5.62.tar.gz 21111902 BLAKE2B f1cbb1c6b4dfac11c2c517a57a5c6216ce43766cc247b3c9b387326a7f6446cbc21ddb42bd95afa658c3b0ed2568a29563ceea248c6ec63364ce210119d39cc2 SHA512 1080a3989c20bbbfe98739f99dacd183f2087ceee5147845852144240386808568af4c908ecdbccdcb6114000ab760ed7257492834d50018eff9520260fd91ce
 DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c
 DIST mysql-5.6.41.tar.gz 32111985 BLAKE2B 5ccad59333525b354db4fa892857e237cddf8fe1a4d289c6e410c31d6142a71d3ce4dab8d954fa9932ec1f83b50e8eccd5845e082deaaa56f1c0c5e21b2ce6c0 SHA512 a62d7a68c6bb49de33f8c9e634bce53cb453a87238e92967115e8e928fa9ed291727b8bd5a5271a0b5b634d957eb310c745edfb14b6be1deb9099bb757aa2cff
+DIST mysql-5.6.42.tar.gz 32201731 BLAKE2B c573328b37225dac090c32178f90e1419fc1848612e304bddc11eafdd48228981a846857be680978b72ef76edbd5d2422a98b5d20b4d082fabcc2b072e2b8fde SHA512 3104e6a3145a119f2b012de6af2a92fc37134aa402b889a562f5fc2391705d0bc2f718166c5fa8387d973fff5ecd9544c8b389b6d0c81d98bdcaf2acfb9b55e8
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
 DIST mysql-boost-5.7.24.tar.gz 49110448 BLAKE2B 1cf64712d84cbb2dfd31f2a530470b6f7cbf5ae9107106d86705575ea9739fa582e1f079447d9a58c4762fffc636d69e448ebdec9172ee15dc09245bc39c3525 SHA512 bbd411e15cd9e6053a353146808b74881d2d950f09e94794a699e7604dadf767b58b661a8321fbe1424f2c2e6cfc3adaa388242183e759082eae47b64cbfbcde
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d

diff --git a/dev-db/mysql/mysql-5.6.42.ebuild b/dev-db/mysql/mysql-5.6.42.ebuild
new file mode 100644
index 00000000000..a7c2b5d4d84
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.42.ebuild
@@ -0,0 +1,795 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20181111-2314Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils flag-o-matic prefix toolchain-funcs \
+	user cmake-utils multilib-build
+
+SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
+	+server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
+	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
+	"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	kernel_linux? (
+		sys-process/procps:0=
+		dev-libs/libaio:0=
+	)
+	net-misc/curl
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	jemalloc? ( dev-libs/jemalloc:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	!yassl? (
+		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+		libressl? ( dev-libs/libressl:0= )
+	)
+	>=sys-libs/zlib-1.2.3:0=
+	sys-libs/ncurses:0=
+	server? (
+		numa? ( sys-process/numactl )
+	)
+	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+	static? ( sys-libs/ncurses[static-libs] )
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+	${COMMON_DEPEND}
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	_disable_engine() {
+		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+	}
+
+	_disable_plugin() {
+		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+	}
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	if use tcmalloc; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	local plugin
+	local server_plugins=( semisync )
+	local test_plugins=( audit_null daemon_example fulltext )
+	if ! use server; then # These plugins are for the server
+		for plugin in "${server_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	if ! use test; then # These plugins are only used during testing
+		for plugin in "${test_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	# Don't build example
+	_disable_engine example
+	_disable_engine ndb
+	_disable_plugin innodb_memcached
+
+	cmake-utils_src_prepare
+}
+
+src_configure(){
+	# bug 508724 mariadb cannot use ld.gold
+	tc-ld-disable-gold
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling.  We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_LIBEVENT=NO
+		-DWITHOUT_CLIENTLIBS=YES
+		-DENABLE_DTRACE=$(usex systemtap)
+		-DWITH_SSL=$(usex yassl bundled system)
+		-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
+		-DWITHOUT_VALIDATE_PASSWORD=1
+	)
+
+	if use server ; then
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+		mycmakeargs+=(
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
+	local mycnf_src="my.cnf-5.6"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR%/}/${mycnf_src}" \
+		> "${TMPDIR%/}/my.cnf.ok" || die
+	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8|latin1|g" \
+			"${TMPDIR%/}/my.cnf.ok" || die
+	fi
+	eprefixify "${TMPDIR%/}/my.cnf.ok"
+	newins "${TMPDIR}/my.cnf.ok" my.cnf
+
+	if use server ; then
+		einfo "Including support files and sample configurations"
+		docinto "support-files"
+		local script
+		for script in \
+			"${S}"/support-files/magic
+		do
+			[[ -f "$script" ]] && dodoc "${script}"
+		done
+
+		docinto "scripts"
+		for script in "${S}"/scripts/mysql* ; do
+			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+		done
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='perl server static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" > /dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.6 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf federated.federated_plugin ; do
+			_disable_test  "$t" "False positives in Gentoo"
+	done
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd > /dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]]; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX%/}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
+	[[ -r "${help_tables}" ]] \
+	&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
+	|| touch "${TMPDIR}/fill_help_tables.sql"
+	help_tables="${TMPDIR}/fill_help_tables.sql"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT%/}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]]; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]]; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
+
+	local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
+	[[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
+	if [[ -r "${help_tables}" ]] ; then
+		cat "${help_tables}" >> "${sqltmp}"
+	fi
+	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
+	if [ $? -ne 0 ]; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
+		${options} \
+		$(use prefix || echo --user=mysql) \
+		--log-warnings=0 \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile} \
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]]; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	if [[ -n "${sqltmp}" ]] ; then
+		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+		"${EROOT%/}/usr/bin/mysql" \
+			--socket="${socket}" \
+			-hlocalhost \
+			-uroot \
+			--password="${MYSQL_ROOT_PASSWORD}" \
+			mysql < "${sqltmp}"
+		rc=$?
+		eend $?
+		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+	fi
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-11-13 18:26 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-11-13 18:26 UTC (permalink / raw
  To: gentoo-commits

commit:     305cbe3be1b0d1a43082a01aef0741d56652af9a
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 13 18:13:13 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Nov 13 18:25:49 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=305cbe3b

dev-db/mysql: Add missing line-continuation during pkg_config

Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>

 dev-db/mysql/mysql-5.5.61.ebuild    | 4 ++--
 dev-db/mysql/mysql-5.6.40-r2.ebuild | 2 +-
 dev-db/mysql/mysql-5.6.41.ebuild    | 2 +-
 dev-db/mysql/mysql-5.7.23-r2.ebuild | 2 +-
 dev-db/mysql/mysql-5.7.24.ebuild    | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dev-db/mysql/mysql-5.5.61.ebuild b/dev-db/mysql/mysql-5.5.61.ebuild
index b2c26da97b4..bba690fe068 100644
--- a/dev-db/mysql/mysql-5.5.61.ebuild
+++ b/dev-db/mysql/mysql-5.5.61.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -742,7 +742,7 @@ pkg_config() {
 		--max_allowed_packet=8M \
 		--net_buffer_length=16K \
 		--socket=${socket} \
-		--pid-file=${pidfile}
+		--pid-file=${pidfile} \
 		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
 	#einfo "About to start mysqld: ${mysqld}"
 	ebegin "Starting mysqld"

diff --git a/dev-db/mysql/mysql-5.6.40-r2.ebuild b/dev-db/mysql/mysql-5.6.40-r2.ebuild
index 95b33a658a5..bd964e87045 100644
--- a/dev-db/mysql/mysql-5.6.40-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.40-r2.ebuild
@@ -739,7 +739,7 @@ pkg_config() {
 		--max_allowed_packet=8M \
 		--net_buffer_length=16K \
 		--socket=${socket} \
-		--pid-file=${pidfile}
+		--pid-file=${pidfile} \
 		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
 	#einfo "About to start mysqld: ${mysqld}"
 	ebegin "Starting mysqld"

diff --git a/dev-db/mysql/mysql-5.6.41.ebuild b/dev-db/mysql/mysql-5.6.41.ebuild
index f221f2b2a30..d4052c130f8 100644
--- a/dev-db/mysql/mysql-5.6.41.ebuild
+++ b/dev-db/mysql/mysql-5.6.41.ebuild
@@ -739,7 +739,7 @@ pkg_config() {
 		--max_allowed_packet=8M \
 		--net_buffer_length=16K \
 		--socket=${socket} \
-		--pid-file=${pidfile}
+		--pid-file=${pidfile} \
 		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
 	#einfo "About to start mysqld: ${mysqld}"
 	ebegin "Starting mysqld"

diff --git a/dev-db/mysql/mysql-5.7.23-r2.ebuild b/dev-db/mysql/mysql-5.7.23-r2.ebuild
index 5d32a03498c..0b7a82c88b4 100644
--- a/dev-db/mysql/mysql-5.7.23-r2.ebuild
+++ b/dev-db/mysql/mysql-5.7.23-r2.ebuild
@@ -901,7 +901,7 @@ pkg_config() {
 		--max_allowed_packet=8M \
 		--net_buffer_length=16K \
 		--socket=${socket} \
-		--pid-file=${pidfile}
+		--pid-file=${pidfile} \
 		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
 	#einfo "About to start mysqld: ${mysqld}"
 	ebegin "Starting mysqld"

diff --git a/dev-db/mysql/mysql-5.7.24.ebuild b/dev-db/mysql/mysql-5.7.24.ebuild
index 18f5cd12d4a..d42e62682c4 100644
--- a/dev-db/mysql/mysql-5.7.24.ebuild
+++ b/dev-db/mysql/mysql-5.7.24.ebuild
@@ -901,7 +901,7 @@ pkg_config() {
 		--max_allowed_packet=8M \
 		--net_buffer_length=16K \
 		--socket=${socket} \
-		--pid-file=${pidfile}
+		--pid-file=${pidfile} \
 		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
 	#einfo "About to start mysqld: ${mysqld}"
 	ebegin "Starting mysqld"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-11-11 23:19 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-11-11 23:19 UTC (permalink / raw
  To: gentoo-commits

commit:     a700871f5aa1971376b7fd7182bc9021f09ab273
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 11 23:19:16 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 11 23:19:35 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a700871f

dev-db/mysql: fix rpl.rpl_semi_sync_shutdown_hang test failure

Closes: https://bugs.gentoo.org/670882
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest               | 1 +
 dev-db/mysql/mysql-5.6.40-r2.ebuild | 5 +++--
 dev-db/mysql/mysql-5.6.41.ebuild    | 5 +++--
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index ec2752a603f..81629f0e14c 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -5,3 +5,4 @@ DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55
 DIST mysql-boost-5.7.24.tar.gz 49110448 BLAKE2B 1cf64712d84cbb2dfd31f2a530470b6f7cbf5ae9107106d86705575ea9739fa582e1f079447d9a58c4762fffc636d69e448ebdec9172ee15dc09245bc39c3525 SHA512 bbd411e15cd9e6053a353146808b74881d2d950f09e94794a699e7604dadf767b58b661a8321fbe1424f2c2e6cfc3adaa388242183e759082eae47b64cbfbcde
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d
 DIST mysql-extras-20181023-0012Z.tar.bz2 327834 BLAKE2B 91a82cbcecbbbe94933da0d8c26cdfee0171602785b2f717fbfec7da422f0ec36f26e897a3c21695f4748017d36c9956cbef03d0852246468368b812a604df82 SHA512 94996708a9da4d55c3aab74f75b74fa4aa80e3fbbb87d9dfe6c1596a934aceed466b7c853e38d9b63f59660763ccef617defc4e6e8770451c21a252250f4e7fa
+DIST mysql-extras-20181111-2314Z.tar.bz2 329013 BLAKE2B fa928b699ef0e6f092e028fc1331cc33953d9855e784998fb2f8c1f1712e9424567b2d2b6b7c5ca375f178309522b3596fcba7babdbed7c85b87ae4b85e5db22 SHA512 5cc4d16c5c6b0491fb9532469ec0b9c65e27e1514d561ea4180845a1578fc8e7ba00fca479b9a784646846f5147e4f676340f639b78c3f5ee140dda26bd5bff2

diff --git a/dev-db/mysql/mysql-5.6.40-r2.ebuild b/dev-db/mysql/mysql-5.6.40-r2.ebuild
index 0c2284e9080..95b33a658a5 100644
--- a/dev-db/mysql/mysql-5.6.40-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.40-r2.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20180804-2323Z"
+MY_EXTRAS_VER="20181111-2314Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
@@ -64,6 +64,7 @@ PATCHES=(
 	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
 	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
 	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
+	"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
 )
 
 # Be warned, *DEPEND are version-dependant

diff --git a/dev-db/mysql/mysql-5.6.41.ebuild b/dev-db/mysql/mysql-5.6.41.ebuild
index 5f5915701ab..f221f2b2a30 100644
--- a/dev-db/mysql/mysql-5.6.41.ebuild
+++ b/dev-db/mysql/mysql-5.6.41.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20180804-2323Z"
+MY_EXTRAS_VER="20181111-2314Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
@@ -64,6 +64,7 @@ PATCHES=(
 	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
 	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
 	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
+	"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
 )
 
 # Be warned, *DEPEND are version-dependant


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-10-30 14:42 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2018-10-30 14:42 UTC (permalink / raw
  To: gentoo-commits

commit:     4e0c29410329131aa3bc9ce2cd5fcb0ca6eefef9
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 30 14:41:41 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Tue Oct 30 14:41:58 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e0c2941

dev-db/mysql: ppc/ppc64 stable wrt bug #658822

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.11

 dev-db/mysql/mysql-5.7.23-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.23-r2.ebuild b/dev-db/mysql/mysql-5.7.23-r2.ebuild
index a14f8b795ed..5d32a03498c 100644
--- a/dev-db/mysql/mysql-5.7.23-r2.ebuild
+++ b/dev-db/mysql/mysql-5.7.23-r2.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-10-27 19:14 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2018-10-27 19:14 UTC (permalink / raw
  To: gentoo-commits

commit:     7ed90329e6803aa1683126db551844fcc2c435ce
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 27 19:14:15 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sat Oct 27 19:14:15 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ed90329

dev-db/mysql: arm stable wrt bug #658822

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.11

 dev-db/mysql/mysql-5.7.23-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.23-r2.ebuild b/dev-db/mysql/mysql-5.7.23-r2.ebuild
index 568f371f34a..a14f8b795ed 100644
--- a/dev-db/mysql/mysql-5.7.23-r2.ebuild
+++ b/dev-db/mysql/mysql-5.7.23-r2.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-10-27 18:43 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2018-10-27 18:43 UTC (permalink / raw
  To: gentoo-commits

commit:     1be89ce6e2692dc0cc055212c49f87fc0414c0d2
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 27 18:42:18 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Oct 27 18:43:10 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1be89ce6

dev-db/mysql: stable 5.7.23-r2 for ia64, bug #658822

Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
RepoMan-Options: --include-arches="ia64"

 dev-db/mysql/mysql-5.7.23-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.23-r2.ebuild b/dev-db/mysql/mysql-5.7.23-r2.ebuild
index 22c2f756ecc..568f371f34a 100644
--- a/dev-db/mysql/mysql-5.7.23-r2.ebuild
+++ b/dev-db/mysql/mysql-5.7.23-r2.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-10-26 21:10 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-10-26 21:10 UTC (permalink / raw
  To: gentoo-commits

commit:     6bbe00572dc99d5bbf563da2b8090c83a24a6aea
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 26 21:10:02 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Oct 26 21:10:32 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6bbe0057

dev-db/mysql: disable unstable test main.xa_prepared_binlog_off

Bug: https://bugs.mysql.com/bug.php?id=83340
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.23-r2.ebuild | 6 ++++++
 dev-db/mysql/mysql-5.7.24.ebuild    | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/dev-db/mysql/mysql-5.7.23-r2.ebuild b/dev-db/mysql/mysql-5.7.23-r2.ebuild
index 24448702305..22c2f756ecc 100644
--- a/dev-db/mysql/mysql-5.7.23-r2.ebuild
+++ b/dev-db/mysql/mysql-5.7.23-r2.ebuild
@@ -542,6 +542,12 @@ src_test() {
 			_disable_test "$t" "False positives in Gentoo"
 	done
 
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	for t in main.xa_prepared_binlog_off ; do
+			_disable_test "$t" "Unstable test"
+	done
+
 	if use numa && use kernel_linux ; then
 		# bug 584880
 		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then

diff --git a/dev-db/mysql/mysql-5.7.24.ebuild b/dev-db/mysql/mysql-5.7.24.ebuild
index 4482c8365ed..18f5cd12d4a 100644
--- a/dev-db/mysql/mysql-5.7.24.ebuild
+++ b/dev-db/mysql/mysql-5.7.24.ebuild
@@ -542,6 +542,12 @@ src_test() {
 			_disable_test "$t" "False positives in Gentoo"
 	done
 
+	# Unstable tests
+	# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+	for t in main.xa_prepared_binlog_off ; do
+			_disable_test "$t" "Unstable test"
+	done
+
 	if use numa && use kernel_linux ; then
 		# bug 584880
 		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-10-26 19:24 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-10-26 19:24 UTC (permalink / raw
  To: gentoo-commits

commit:     3b8059376ea43c9675f58e24d4f417885f54896c
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 26 19:23:36 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Oct 26 19:24:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b805937

dev-db/mysql: bump to v5.7.24

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

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.7.24.ebuild | 932 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 933 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 763d1e2cb3b..ec2752a603f 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -2,5 +2,6 @@ DIST mysql-5.5.61.tar.gz 21027098 BLAKE2B b7589f632a211349fc34cec94e333b878e0711
 DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c
 DIST mysql-5.6.41.tar.gz 32111985 BLAKE2B 5ccad59333525b354db4fa892857e237cddf8fe1a4d289c6e410c31d6142a71d3ce4dab8d954fa9932ec1f83b50e8eccd5845e082deaaa56f1c0c5e21b2ce6c0 SHA512 a62d7a68c6bb49de33f8c9e634bce53cb453a87238e92967115e8e928fa9ed291727b8bd5a5271a0b5b634d957eb310c745edfb14b6be1deb9099bb757aa2cff
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
+DIST mysql-boost-5.7.24.tar.gz 49110448 BLAKE2B 1cf64712d84cbb2dfd31f2a530470b6f7cbf5ae9107106d86705575ea9739fa582e1f079447d9a58c4762fffc636d69e448ebdec9172ee15dc09245bc39c3525 SHA512 bbd411e15cd9e6053a353146808b74881d2d950f09e94794a699e7604dadf767b58b661a8321fbe1424f2c2e6cfc3adaa388242183e759082eae47b64cbfbcde
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d
 DIST mysql-extras-20181023-0012Z.tar.bz2 327834 BLAKE2B 91a82cbcecbbbe94933da0d8c26cdfee0171602785b2f717fbfec7da422f0ec36f26e897a3c21695f4748017d36c9956cbef03d0852246468368b812a604df82 SHA512 94996708a9da4d55c3aab74f75b74fa4aa80e3fbbb87d9dfe6c1596a934aceed466b7c853e38d9b63f59660763ccef617defc4e6e8770451c21a252250f4e7fa

diff --git a/dev-db/mysql/mysql-5.7.24.ebuild b/dev-db/mysql/mysql-5.7.24.ebuild
new file mode 100644
index 00000000000..4482c8365ed
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.24.ebuild
@@ -0,0 +1,932 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20181023-0012Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit cmake-utils eutils flag-o-matic linux-info \
+	prefix toolchain-funcs user multilib-minimal
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+	selinux +server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-libressl-support.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-mips-ASM.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="net-misc/curl:=
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	sys-libs/ncurses:0=
+	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+	)
+	jemalloc? ( dev-libs/jemalloc:0= )
+	kernel_linux? (
+		dev-libs/libaio:0=
+		sys-process/procps:0=
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		cjk? ( app-text/mecab:= )
+		experimental? (
+			dev-libs/libevent:=
+			dev-libs/protobuf:=
+			net-libs/libtirpc:=
+		)
+		numa? ( sys-process/numactl )
+	)
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	!yassl? (
+		client-libs? (
+			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+		)
+		!client-libs? (
+			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+			libressl? ( dev-libs/libressl:0= )
+		)
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	dev-libs/protobuf
+	virtual/yacc
+	server? (
+		dev-libs/libevent
+		experimental? ( net-libs/rpcsvc-proto )
+	)
+	static? ( sys-libs/ncurses[static-libs] )
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]] ; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_pretend() {
+	if use numa ; then
+		local CONFIG_CHECK="~NUMA"
+
+		local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+		WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+		check_extra_config
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/mysql.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	cmake-utils_src_prepare
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	if use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	# Remove bundled libs so we cannot accidentally use them
+	# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+	rm -rv \
+		"${S}"/extra/protobuf \
+		"${S}"/libevent \
+		"${S}"/zlib \
+		|| die
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+}
+
+src_configure(){
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
+		-DMYSQL_DATADIR="${EPREFIX%/}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX%/}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling. We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use yassl ; then
+		mycmakeargs+=( -DWITH_SSL=system )
+	else
+		mycmakeargs+=( -DWITH_SSL=bundled )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI, bug 530132
+	if multilib_is_native_abi ; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
+			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_RAPID=$(usex experimental ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+		)
+
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
+		if use static ; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake-utils_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]] ; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf ; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	if use numa && use kernel_linux ; then
+		# bug 584880
+		if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+			for t in sys_vars.innodb_numa_interleave_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+				_disable_test "$t" "requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+
+	cmake-utils_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+
+		eprefixify "${TMPDIR}/my.cnf.ok"
+
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX%/}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
+			if [[ -d "${MY_DATADIR_s}" ]] ; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]] ; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client ; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+	fi
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+	fi
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT%/}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]] ; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]] ; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	echo "USE mysql;" >"${sqltmp}"
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
+	if [[ $? -ne 0 ]] ; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
+		${options} \
+		$(use prefix || echo --user=mysql) \
+		--log-warnings=0 \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile}
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]] ; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-10-23  0:33 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-10-23  0:33 UTC (permalink / raw
  To: gentoo-commits

commit:     640b8e5b86ef37c4c8efcecefac7411ae7a0dc0a
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 23 00:33:29 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Oct 23 00:33:29 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=640b8e5b

dev-db/mysql: Respin patch for serverless installation on 5.7

Closes: https://bugs.gentoo.org/669236
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 dev-db/mysql/Manifest               | 2 +-
 dev-db/mysql/mysql-5.7.23-r2.ebuild | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index abcd84f429f..763d1e2cb3b 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,4 +3,4 @@ DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa3492688
 DIST mysql-5.6.41.tar.gz 32111985 BLAKE2B 5ccad59333525b354db4fa892857e237cddf8fe1a4d289c6e410c31d6142a71d3ce4dab8d954fa9932ec1f83b50e8eccd5845e082deaaa56f1c0c5e21b2ce6c0 SHA512 a62d7a68c6bb49de33f8c9e634bce53cb453a87238e92967115e8e928fa9ed291727b8bd5a5271a0b5b634d957eb310c745edfb14b6be1deb9099bb757aa2cff
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d
-DIST mysql-extras-20181017-2201Z.tar.bz2 328311 BLAKE2B f1b179e0f2d63105f03ba238125e6cfa2c0cbf2084251b6c344bd02517899322bd161470eddab28c514349caac6401c35909b2f37264fdaf2dc196a309d3cc27 SHA512 26e26a3ad926bc9267d89f0bc34b030bc6292f21d3007185c4c1155beaa608566b4268f93edb64fd6156dbae80ac4f2817e78c1e92e90985e2675c2b1f97854e
+DIST mysql-extras-20181023-0012Z.tar.bz2 327834 BLAKE2B 91a82cbcecbbbe94933da0d8c26cdfee0171602785b2f717fbfec7da422f0ec36f26e897a3c21695f4748017d36c9956cbef03d0852246468368b812a604df82 SHA512 94996708a9da4d55c3aab74f75b74fa4aa80e3fbbb87d9dfe6c1596a934aceed466b7c853e38d9b63f59660763ccef617defc4e6e8770451c21a252250f4e7fa

diff --git a/dev-db/mysql/mysql-5.7.23-r2.ebuild b/dev-db/mysql/mysql-5.7.23-r2.ebuild
index a291cfbf34a..24448702305 100644
--- a/dev-db/mysql/mysql-5.7.23-r2.ebuild
+++ b/dev-db/mysql/mysql-5.7.23-r2.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20181017-2201Z"
+MY_EXTRAS_VER="20181023-0012Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
@@ -51,7 +51,7 @@ else
 fi
 
 PATCHES=(
-	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.patch
+	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
 	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
 	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
@@ -362,7 +362,6 @@ multilib_src_configure() {
 		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
 		-DWITH_CURL=system
 		-DWITH_BOOST="${S}/boost"
-		-DWITH_PROTOBUF=system
 	)
 	if use test ; then
 		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
@@ -398,6 +397,7 @@ multilib_src_configure() {
 		mycmakeargs+=(
 			-DWITH_LIBEVENT=system
 			-DWITH_LZ4=system
+			-DWITH_PROTOBUF=system
 			-DWITH_MECAB=$(usex cjk system OFF)
 			-DWITH_NUMA=$(usex numa ON OFF)
 			-DWITH_RAPID=$(usex experimental ON OFF)


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-10-19 20:26 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2018-10-19 20:26 UTC (permalink / raw
  To: gentoo-commits

commit:     7c24caf3a65e6107383a217906fec9b8193cc32c
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 19 20:25:53 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Fri Oct 19 20:26:10 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c24caf3

dev-db/mysql: amd64 stable wrt bug #658822

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.11

 dev-db/mysql/mysql-5.7.23-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.23-r2.ebuild b/dev-db/mysql/mysql-5.7.23-r2.ebuild
index 7a8e8c0142c..a291cfbf34a 100644
--- a/dev-db/mysql/mysql-5.7.23-r2.ebuild
+++ b/dev-db/mysql/mysql-5.7.23-r2.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-10-18 12:31 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-10-18 12:31 UTC (permalink / raw
  To: gentoo-commits

commit:     dd3e0b16aad9ea8c304afb26260d34c16bda6268
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 18 12:31:01 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Oct 18 12:31:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd3e0b16

dev-db/mysql: x86 stable (bug #658822)

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

 dev-db/mysql/mysql-5.7.23-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.23-r2.ebuild b/dev-db/mysql/mysql-5.7.23-r2.ebuild
index 608e22ef4c1..7a8e8c0142c 100644
--- a/dev-db/mysql/mysql-5.7.23-r2.ebuild
+++ b/dev-db/mysql/mysql-5.7.23-r2.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-10-18 11:45 Tobias Klausmann
  0 siblings, 0 replies; 393+ messages in thread
From: Tobias Klausmann @ 2018-10-18 11:45 UTC (permalink / raw
  To: gentoo-commits

commit:     1e4aba16acb83e5e3fb0632e5b3d80d2a8d547c3
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 18 11:44:00 2018 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Thu Oct 18 11:44:00 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e4aba16

dev-db/mysql-5.7.23-r2: alpha stable

Bug: http://bugs.gentoo.org/658822
Signed-off-by: Tobias Klausmann <klausman <AT> gentoo.org>

 dev-db/mysql/mysql-5.7.23-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.23-r2.ebuild b/dev-db/mysql/mysql-5.7.23-r2.ebuild
index fa8f7505f4a..608e22ef4c1 100644
--- a/dev-db/mysql/mysql-5.7.23-r2.ebuild
+++ b/dev-db/mysql/mysql-5.7.23-r2.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-10-17 22:21 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-10-17 22:21 UTC (permalink / raw
  To: gentoo-commits

commit:     04ffd07794bde4c18f7967e91c0daec68164a98c
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 17 22:05:57 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Oct 17 22:21:08 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04ffd077

dev-db/mysql: bump patch set

Closes: https://bugs.gentoo.org/668894
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest               | 2 +-
 dev-db/mysql/mysql-5.7.23-r2.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 019e5d6d4de..abcd84f429f 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,4 +3,4 @@ DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa3492688
 DIST mysql-5.6.41.tar.gz 32111985 BLAKE2B 5ccad59333525b354db4fa892857e237cddf8fe1a4d289c6e410c31d6142a71d3ce4dab8d954fa9932ec1f83b50e8eccd5845e082deaaa56f1c0c5e21b2ce6c0 SHA512 a62d7a68c6bb49de33f8c9e634bce53cb453a87238e92967115e8e928fa9ed291727b8bd5a5271a0b5b634d957eb310c745edfb14b6be1deb9099bb757aa2cff
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d
-DIST mysql-extras-20181017-0033Z.tar.bz2 327867 BLAKE2B 6422ef22c497724253aec513bbaece43b8172d9b46c5a0823a3613b98141f66596121bf5573d9667e1a5c7c4ca50e3b22686df8d464e9a7ed6609b6b0325cdbc SHA512 ca361b48744ebfac74a3efa30cc664d6af6850e09b76284a6b32bc0145fcc193283950c52e5c20ae943cb7bdde9f6edb9ebad899593c8062dd2a62fa5f155d57
+DIST mysql-extras-20181017-2201Z.tar.bz2 328311 BLAKE2B f1b179e0f2d63105f03ba238125e6cfa2c0cbf2084251b6c344bd02517899322bd161470eddab28c514349caac6401c35909b2f37264fdaf2dc196a309d3cc27 SHA512 26e26a3ad926bc9267d89f0bc34b030bc6292f21d3007185c4c1155beaa608566b4268f93edb64fd6156dbae80ac4f2817e78c1e92e90985e2675c2b1f97854e

diff --git a/dev-db/mysql/mysql-5.7.23-r2.ebuild b/dev-db/mysql/mysql-5.7.23-r2.ebuild
index f183ee01e79..fa8f7505f4a 100644
--- a/dev-db/mysql/mysql-5.7.23-r2.ebuild
+++ b/dev-db/mysql/mysql-5.7.23-r2.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20181017-0033Z"
+MY_EXTRAS_VER="20181017-2201Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-10-17  0:46 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-10-17  0:46 UTC (permalink / raw
  To: gentoo-commits

commit:     4fba39baff104a36be8fd164f55ba730595b4511
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 17 00:39:10 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Oct 17 00:46:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fba39ba

dev-db/mysql: bump patch set

Closes: https://bugs.gentoo.org/668832
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest               | 2 +-
 dev-db/mysql/mysql-5.7.23-r2.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 7641b811b68..019e5d6d4de 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,4 +3,4 @@ DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa3492688
 DIST mysql-5.6.41.tar.gz 32111985 BLAKE2B 5ccad59333525b354db4fa892857e237cddf8fe1a4d289c6e410c31d6142a71d3ce4dab8d954fa9932ec1f83b50e8eccd5845e082deaaa56f1c0c5e21b2ce6c0 SHA512 a62d7a68c6bb49de33f8c9e634bce53cb453a87238e92967115e8e928fa9ed291727b8bd5a5271a0b5b634d957eb310c745edfb14b6be1deb9099bb757aa2cff
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d
-DIST mysql-extras-20181016-1606Z.tar.bz2 327537 BLAKE2B 885b21b9f576844edf7e850cb8c7484fdadb469297adcbcd885ed0d12bb4a24324f26c4546a1fa077502f7f306b436ed48667fbfccce11be8873ff723f435b85 SHA512 b6fb00c2971cf91f0765b08b4f0449179eb5701b0eb92a184103f1129f365fee2271d27150c30a3f2fb3c2e8b669f77e65a54956f2862c6d3fe6be49e4bc0f88
+DIST mysql-extras-20181017-0033Z.tar.bz2 327867 BLAKE2B 6422ef22c497724253aec513bbaece43b8172d9b46c5a0823a3613b98141f66596121bf5573d9667e1a5c7c4ca50e3b22686df8d464e9a7ed6609b6b0325cdbc SHA512 ca361b48744ebfac74a3efa30cc664d6af6850e09b76284a6b32bc0145fcc193283950c52e5c20ae943cb7bdde9f6edb9ebad899593c8062dd2a62fa5f155d57

diff --git a/dev-db/mysql/mysql-5.7.23-r2.ebuild b/dev-db/mysql/mysql-5.7.23-r2.ebuild
index ef6b22685df..f183ee01e79 100644
--- a/dev-db/mysql/mysql-5.7.23-r2.ebuild
+++ b/dev-db/mysql/mysql-5.7.23-r2.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20181016-1606Z"
+MY_EXTRAS_VER="20181017-0033Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-10-15  1:29 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-10-15  1:29 UTC (permalink / raw
  To: gentoo-commits

commit:     67c0f43602376ec05ab33e0f63956f5526a55cc5
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 15 01:26:49 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Oct 15 01:29:46 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67c0f436

dev-db/mysql: rename USE=mecab to USE=cjk

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

 dev-db/mysql/metadata.xml           | 2 +-
 dev-db/mysql/mysql-5.7.23-r1.ebuild | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index 102079013c4..c20a8004a28 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -11,12 +11,12 @@ dev-db/mysql
 dev-db/mariadb
 -->
 <use>
+  <flag name="cjk">Add CJK support for InnoDB fulltext search using <pkg>app-text/mecab</pkg></flag>
   <flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages (not recommended)</flag>
   <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>
   <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
   <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
   <flag name="libressl">Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</pkg></flag>
-  <flag name="mecab">Build MeCab full-text parser plugin using <pkg>app-text/mecab</pkg></flag>
   <flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
   <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
   <flag name="server">Build the server program</flag>

diff --git a/dev-db/mysql/mysql-5.7.23-r1.ebuild b/dev-db/mysql/mysql-5.7.23-r1.ebuild
index 6d781dc5a4c..d9f2fd4117b 100644
--- a/dev-db/mysql/mysql-5.7.23-r1.ebuild
+++ b/dev-db/mysql/mysql-5.7.23-r1.ebuild
@@ -26,7 +26,7 @@ HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="0/18"
-IUSE="client-libs cracklib debug jemalloc latin1 libressl mecab numa +perl profiling selinux
+IUSE="cjk client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
 	+server static static-libs systemtap tcmalloc test yassl"
 
 # Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
@@ -81,7 +81,7 @@ COMMON_DEPEND="net-misc/curl
 	)
 	server? (
 		>=app-arch/lz4-0_p131:=
-		mecab? ( app-text/mecab:= )
+		cjk? ( app-text/mecab:= )
 		numa? ( sys-process/numactl )
 	)
 	systemtap? ( >=dev-util/systemtap-1.3:0= )
@@ -372,7 +372,7 @@ multilib_src_configure() {
 		mycmakeargs+=(
 			-DWITH_LIBEVENT=system
 			-DWITH_LZ4=system
-			-DWITH_MECAB=$(usex mecab system OFF)
+			-DWITH_MECAB=$(usex cjk system OFF)
 			-DWITH_NUMA=$(usex numa ON OFF)
 		)
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-10-14  1:21 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-10-14  1:21 UTC (permalink / raw
  To: gentoo-commits

commit:     03afe8693d0935688fc27cf6b72b5c044645c9a8
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 14 01:21:08 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Oct 14 01:21:24 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03afe869

dev-db/mysql: rev bump

- Add USE=mecab to build MeCab full-text parser plugin

- Enable libevent support

- Fix multiple build issues

- Fix tests

- Adjust ebuild style

Bug: https://bugs.gentoo.org/658822
Closes: https://bugs.gentoo.org/662816
Closes: https://bugs.gentoo.org/662826
Package-Manager: Portage-2.3.50, Repoman-2.3.11
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/mysql/Manifest                              |   1 +
 dev-db/mysql/metadata.xml                          |   1 +
 ...{mysql-5.7.23.ebuild => mysql-5.7.23-r1.ebuild} | 421 ++++++++++++---------
 3 files changed, 242 insertions(+), 181 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index f1639c3db62..c5d769125da 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,3 +3,4 @@ DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa3492688
 DIST mysql-5.6.41.tar.gz 32111985 BLAKE2B 5ccad59333525b354db4fa892857e237cddf8fe1a4d289c6e410c31d6142a71d3ce4dab8d954fa9932ec1f83b50e8eccd5845e082deaaa56f1c0c5e21b2ce6c0 SHA512 a62d7a68c6bb49de33f8c9e634bce53cb453a87238e92967115e8e928fa9ed291727b8bd5a5271a0b5b634d957eb310c745edfb14b6be1deb9099bb757aa2cff
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d
+DIST mysql-extras-20181013-2117Z.tar.bz2 326504 BLAKE2B 5df10abacafc6835536742b10fc268d76ed39818ed704fca21e3b0d5241152640557a37ad1c0a87173223763efd6f6cba87c2e203088227738cb6eb9f4224beb SHA512 03d3ef9add033699dc6d8b6120d1fb323268a2e2b8ec9f375edfeb1c6b3878724db091bf4ae78462872efa81d1bb2e23f8ff4f6e0831d2ce8efd30465e415fa9

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index 8ae0465d923..102079013c4 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -16,6 +16,7 @@ dev-db/mariadb
   <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
   <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
   <flag name="libressl">Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</pkg></flag>
+  <flag name="mecab">Build MeCab full-text parser plugin using <pkg>app-text/mecab</pkg></flag>
   <flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
   <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
   <flag name="server">Build the server program</flag>

diff --git a/dev-db/mysql/mysql-5.7.23.ebuild b/dev-db/mysql/mysql-5.7.23-r1.ebuild
similarity index 86%
rename from dev-db/mysql/mysql-5.7.23.ebuild
rename to dev-db/mysql/mysql-5.7.23-r1.ebuild
index aad033f5ecc..6d781dc5a4c 100644
--- a/dev-db/mysql/mysql-5.7.23.ebuild
+++ b/dev-db/mysql/mysql-5.7.23-r1.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20180804-2323Z"
+MY_EXTRAS_VER="20181013-2117Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
@@ -11,7 +11,7 @@ CMAKE_MAKEFILE_GENERATOR=emake
 inherit eutils flag-o-matic prefix toolchain-funcs \
 	user cmake-utils multilib-minimal
 
-SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
 	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
 	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
 
@@ -19,17 +19,14 @@ SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
 if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
 	SRC_URI="${SRC_URI}
 		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
 fi
 
 HOMEPAGE="https://www.mysql.com/"
 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
 LICENSE="GPL-2"
 SLOT="0/18"
-IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
+IUSE="client-libs cracklib debug jemalloc latin1 libressl mecab numa +perl profiling selinux
 	+server static static-libs systemtap tcmalloc test yassl"
 
 # Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
@@ -56,25 +53,39 @@ fi
 PATCHES=(
 	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.patch
 	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
-#	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.7.6.patch
 	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-libressl-support.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-mips-ASM.patch
 )
 
 # Be warned, *DEPEND are version-dependant
 # These are used for both runtime and compiletime
 # MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="
-	kernel_linux? (
-		sys-process/procps:0=
-		dev-libs/libaio:0=
-	)
-	net-misc/curl
+COMMON_DEPEND="net-misc/curl
 	>=sys-apps/sed-4
 	>=sys-apps/texinfo-4.7-r1
+	sys-libs/ncurses:0=
+	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
+	!client-libs? (
+		dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+		>=sys-libs/zlib-1.2.3:0=
+	)
 	jemalloc? ( dev-libs/jemalloc:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
+	kernel_linux? (
+		dev-libs/libaio:0=
+		sys-process/procps:0=
+	)
+	server? (
+		>=app-arch/lz4-0_p131:=
+		mecab? ( app-text/mecab:= )
+		numa? ( sys-process/numactl )
+	)
 	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
 	!yassl? (
 		client-libs? (
 			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
@@ -85,36 +96,85 @@ COMMON_DEPEND="
 			libressl? ( dev-libs/libressl:0= )
 		)
 	)
-	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
-	!client-libs? ( >=sys-libs/zlib-1.2.3:0= )
-	sys-libs/ncurses:0=
-	server? (
-		>=app-arch/lz4-0_p131:=
-		>=dev-libs/boost-1.65.0:=
-		numa? ( sys-process/numactl )
-	)
-	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
 "
-DEPEND="virtual/yacc
+DEPEND="${COMMON_DEPEND}
 	dev-libs/protobuf
-	static? ( sys-libs/ncurses[static-libs] )
 	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	virtual/yacc
+	server? ( dev-libs/libevent )
+	static? ( sys-libs/ncurses[static-libs] )
+"
+RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	selinux? ( sec-policy/selinux-mysql )
 	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
-	${COMMON_DEPEND}
 "
 # For other stuff to bring us in
 # dev-perl/DBD-mysql is needed by some scripts installed by MySQL
 PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
 
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]]; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
 pkg_setup() {
 	if [[ ${MERGE_TYPE} != binary ]] ; then
 		local GCC_MAJOR_SET=$(gcc-major-version)
 		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on
 		# non x86{,_64} arches
 		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
 			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
@@ -178,7 +238,7 @@ pkg_postinst() {
 	elog "Please backup any changes you made to /etc/mysql/my.cnf"
 	elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
 	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropitate section headers, i.e. [mysqld]."
+	elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
 	einfo
 }
 
@@ -243,9 +303,9 @@ multilib_src_configure() {
 	mycmakeargs=(
 		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
 		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
+		-DMYSQL_DATADIR="${EPREFIX%/}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX%/}/etc/mysql"
 		-DINSTALL_BINDIR=bin
 		-DINSTALL_DOCDIR=share/doc/${PF}
 		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
@@ -256,9 +316,9 @@ multilib_src_configure() {
 		-DINSTALL_MYSQLSHAREDIR=share/mysql
 		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
 		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
 		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
 		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
 		-DWITH_UNIT_TESTS=$(usex test ON OFF)
 		### TODO: make this system but issues with UTF-8 prevent it
@@ -266,14 +326,13 @@ multilib_src_configure() {
 		-DWITH_ZLIB=system
 		-DWITH_LIBWRAP=0
 		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
 		-DWITH_DEFAULT_COMPILER_OPTIONS=0
 		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling.  We pass it
+		# The build forces this to be defined when cross-compiling. We pass it
 		# all the time for simplicity and to make sure it is actually correct.
 		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
 		-DWITH_RAPID=OFF
-		-DWITH_LIBEVENT=NO
 		-DWITH_CURL=system
 		-DWITH_BOOST="${S}/boost"
 		-DWITH_PROTOBUF=system
@@ -295,7 +354,7 @@ multilib_src_configure() {
 	fi
 
 	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI  bug 530132
+	# systemtap only works on native ABI, bug 530132
 	if multilib_is_native_abi; then
 		mycmakeargs+=(
 			-DENABLE_DTRACE=$(usex systemtap)
@@ -311,7 +370,9 @@ multilib_src_configure() {
 	if multilib_is_native_abi && use server ; then
 
 		mycmakeargs+=(
+			-DWITH_LIBEVENT=system
 			-DWITH_LZ4=system
+			-DWITH_MECAB=$(usex mecab system OFF)
 			-DWITH_NUMA=$(usex numa ON OFF)
 		)
 
@@ -324,7 +385,6 @@ multilib_src_configure() {
 				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
 				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
 			)
-
 		elif ! use latin1 ; then
 			mycmakeargs+=(
 				-DDEFAULT_CHARSET=utf8
@@ -336,14 +396,21 @@ multilib_src_configure() {
 				-DDEFAULT_COLLATION=latin1_swedish_ci
 			)
 		fi
+
 		mycmakeargs+=(
 			-DEXTRA_CHARSETS=all
 			-DDISABLE_SHARED=$(usex static YES NO)
 			-DWITH_DEBUG=$(usex debug)
 			-DWITH_EMBEDDED_SERVER=OFF
-			-DENABLED_PROFILING=$(usex profiling)
 		)
 
+		if use profiling ; then
+			# Setting to OFF doesn't work: Once set, profiling options will be added
+			# to `mysqld --help` output via sql/sys_vars.cc causing
+			# "main.mysqld--help-notwin" test to fail
+			mycmakeargs+=( -DENABLED_PROFILING=ON )
+		fi
+
 		if use static; then
 			mycmakeargs+=( -DWITH_PIC=1 )
 		fi
@@ -354,6 +421,7 @@ multilib_src_configure() {
 			-DWITH_ARCHIVE_STORAGE_ENGINE=1
 			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
 			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_FEDERATED_STORAGE_ENGINE=1
 			-DWITH_HEAP_STORAGE_ENGINE=1
 			-DWITH_INNOBASE_STORAGE_ENGINE=1
 			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
@@ -385,6 +453,133 @@ multilib_src_compile() {
 	cmake-utils_src_compile
 }
 
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" &>/dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf ; do
+			_disable_test "$t" "False positives in Gentoo"
+	done
+
+	if ! use latin1 ; then
+		# The following tests will fail if DEFAULT_CHARSET
+		# isn't set to latin1:
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_xa_prepared_disconnect \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			innodb.innodb_pagesize_max_recordsize \
+			innodb.innodb-system-table-view \
+			innodb.mysqldump_max_recordsize \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			main.type_string \
+			main.information_schema \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_xa_survive_disconnect \
+			rpl.rpl_xa_survive_disconnect_lsu_off \
+			rpl.rpl_xa_survive_disconnect_table \
+		; do
+				_disable_test "$t" "requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+		done
+	fi
+
+	# Try to increase file limits to increase test coverage
+	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+		# Upper limit comes from parts.partition_* tests
+		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+			else
+				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+			fi
+		else
+			einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+		fi
+	else
+		einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd &>/dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
 src_install() {
 	local MULTILIB_WRAPPED_HEADERS
 	local MULTILIB_CHOST_TOOLS
@@ -408,7 +603,7 @@ multilib_src_install() {
 
 	cmake-utils_src_install
 
-	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
+	# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
 	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
 }
 
@@ -482,142 +677,6 @@ multilib_src_install_all() {
 	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
 }
 
-# Official test instructions:
-# USE='perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" > /dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf federated.federated_plugin ; do
-			_disable_test  "$t" "False positives in Gentoo"
-	done
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd > /dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]]; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
 pkg_config() {
 	_getoptval() {
 		local mypd="${EROOT%/}"/usr/bin/my_print_defaults


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-09-24 20:38 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-09-24 20:38 UTC (permalink / raw
  To: gentoo-commits

commit:     aabb0e5a81d08b3327fc8813b21f664185cd3964
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 24 20:36:53 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Sep 24 20:37:54 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aabb0e5a

dev-db/mysql: Fix initial password setting in 5.6

Bug: https://bugs.gentoo.org/666992
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>
Package-Manager: Portage-2.3.50, Repoman-2.3.10

 dev-db/mysql/mysql-5.6.40-r2.ebuild | 2 +-
 dev-db/mysql/mysql-5.6.41.ebuild    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.40-r2.ebuild b/dev-db/mysql/mysql-5.6.40-r2.ebuild
index 0c029e84c7a..0c2284e9080 100644
--- a/dev-db/mysql/mysql-5.6.40-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.40-r2.ebuild
@@ -758,7 +758,7 @@ pkg_config() {
 
 	ebegin "Setting root password"
 	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+	local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
 	"${EROOT%/}/usr/bin/mysql" \
 		--no-defaults \
 		"--socket=${socket}" \

diff --git a/dev-db/mysql/mysql-5.6.41.ebuild b/dev-db/mysql/mysql-5.6.41.ebuild
index da6e2f0d67a..5f5915701ab 100644
--- a/dev-db/mysql/mysql-5.6.41.ebuild
+++ b/dev-db/mysql/mysql-5.6.41.ebuild
@@ -758,7 +758,7 @@ pkg_config() {
 
 	ebegin "Setting root password"
 	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+	local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
 	"${EROOT%/}/usr/bin/mysql" \
 		--no-defaults \
 		"--socket=${socket}" \


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-09-24 17:18 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-09-24 17:18 UTC (permalink / raw
  To: gentoo-commits

commit:     0daa60575ea81e0c514806b3c37c6610a3e4defa
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 24 17:18:13 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Sep 24 17:18:13 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0daa6057

dev-db/mysql: Restore pkg_config options confused from 5.7

5.6.40-r2 and 5.6.41 were back copied from 5.7
Unfortunately pkg_config was not checked and failures occured trying to run it

The relevant parts are restored here

Bug: https://bugs.gentoo.org/666992
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>
Package-Manager: Portage-2.3.50, Repoman-2.3.10

 dev-db/mysql/mysql-5.6.40-r2.ebuild | 32 ++++++++++++++++++++++++++------
 dev-db/mysql/mysql-5.6.41.ebuild    | 32 ++++++++++++++++++++++++++------
 2 files changed, 52 insertions(+), 12 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.40-r2.ebuild b/dev-db/mysql/mysql-5.6.40-r2.ebuild
index b81a2ec567e..0c029e84c7a 100644
--- a/dev-db/mysql/mysql-5.6.40-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.40-r2.ebuild
@@ -131,8 +131,8 @@ pkg_preinst() {
 	# Here we need to see if the implementation switched client libraries
 	# We check if this is a new instance of the package and a client library already exists
 	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so")
 		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 ${libpath}"
@@ -672,6 +672,12 @@ pkg_config() {
 	# see http://bugs.mysql.com/bug.php?id=31312
 	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
 
+	local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
+	[[ -r "${help_tables}" ]] \
+	&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
+	|| touch "${TMPDIR}/fill_help_tables.sql"
+	help_tables="${TMPDIR}/fill_help_tables.sql"
+
 	# Figure out which options we need to disable to do the setup
 	local helpfile="${TMPDIR%/}/mysqld-help"
 	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
@@ -699,13 +705,14 @@ pkg_config() {
 
 	# Filling timezones, see
 	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	echo "USE mysql;" >"${sqltmp}"
 	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
 	chown mysql "${sqltmp}" || die
 
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+	local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
+	[[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
+	if [[ -r "${help_tables}" ]] ; then
+		cat "${help_tables}" >> "${sqltmp}"
+	fi
 	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
 	einfo "Command: ${cmd[*]}"
 	su -s /bin/sh -c "${cmd[*]}" mysql \
@@ -759,6 +766,19 @@ pkg_config() {
 		-e "${sql}"
 	eend $?
 
+	if [[ -n "${sqltmp}" ]] ; then
+		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+		"${EROOT%/}/usr/bin/mysql" \
+			--socket="${socket}" \
+			-hlocalhost \
+			-uroot \
+			--password="${MYSQL_ROOT_PASSWORD}" \
+			mysql < "${sqltmp}"
+		rc=$?
+		eend $?
+		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+	fi
+
 	# Stop the server and cleanup
 	einfo "Stopping the server ..."
 	kill $(< "${pidfile}" )

diff --git a/dev-db/mysql/mysql-5.6.41.ebuild b/dev-db/mysql/mysql-5.6.41.ebuild
index 7ec34a50aad..da6e2f0d67a 100644
--- a/dev-db/mysql/mysql-5.6.41.ebuild
+++ b/dev-db/mysql/mysql-5.6.41.ebuild
@@ -131,8 +131,8 @@ pkg_preinst() {
 	# Here we need to see if the implementation switched client libraries
 	# We check if this is a new instance of the package and a client library already exists
 	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so")
 		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 ${libpath}"
@@ -672,6 +672,12 @@ pkg_config() {
 	# see http://bugs.mysql.com/bug.php?id=31312
 	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
 
+	local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
+	[[ -r "${help_tables}" ]] \
+	&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
+	|| touch "${TMPDIR}/fill_help_tables.sql"
+	help_tables="${TMPDIR}/fill_help_tables.sql"
+
 	# Figure out which options we need to disable to do the setup
 	local helpfile="${TMPDIR%/}/mysqld-help"
 	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
@@ -699,13 +705,14 @@ pkg_config() {
 
 	# Filling timezones, see
 	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	echo "USE mysql;" >"${sqltmp}"
 	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
 	chown mysql "${sqltmp}" || die
 
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+	local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
+	[[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
+	if [[ -r "${help_tables}" ]] ; then
+		cat "${help_tables}" >> "${sqltmp}"
+	fi
 	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
 	einfo "Command: ${cmd[*]}"
 	su -s /bin/sh -c "${cmd[*]}" mysql \
@@ -759,6 +766,19 @@ pkg_config() {
 		-e "${sql}"
 	eend $?
 
+	if [[ -n "${sqltmp}" ]] ; then
+		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+		"${EROOT%/}/usr/bin/mysql" \
+			--socket="${socket}" \
+			-hlocalhost \
+			-uroot \
+			--password="${MYSQL_ROOT_PASSWORD}" \
+			mysql < "${sqltmp}"
+		rc=$?
+		eend $?
+		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+	fi
+
 	# Stop the server and cleanup
 	einfo "Stopping the server ..."
 	kill $(< "${pidfile}" )


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-09-17 20:38 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-09-17 20:38 UTC (permalink / raw
  To: gentoo-commits

commit:     009ae231357cd15733d4512bdf3dee1b628816a4
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 17 20:35:43 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Sep 17 20:38:17 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=009ae231

dev-db/mysql: Drop old

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 dev-db/mysql/Manifest            |   5 -
 dev-db/mysql/metadata.xml        |   6 --
 dev-db/mysql/mysql-5.5.60.ebuild | 133 ---------------------------
 dev-db/mysql/mysql-5.6.38.ebuild | 192 --------------------------------------
 dev-db/mysql/mysql-5.6.39.ebuild | 193 ---------------------------------------
 dev-db/mysql/mysql-5.6.40.ebuild | 193 ---------------------------------------
 6 files changed, 722 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 07571be616a..f1639c3db62 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,10 +1,5 @@
-DIST mysql-5.5.60.tar.gz 21025041 BLAKE2B c4010c64b30ca72aff011053189981cc0676806ed9f18a0ac584e07f71e1f7fe062a3ca78db6f109a2b96d324d778b239880f96852fdc058892b09d0d09e740b SHA512 734395f3ce2c12e7703fe48d5bb2ce85ff8d7f04ae51cbe2d04a46b72b9689f804e5b498ae0b4722b0c098e2eed43d4f93b622964059525e6d9d14a47d55f775
 DIST mysql-5.5.61.tar.gz 21027098 BLAKE2B b7589f632a211349fc34cec94e333b878e07113969bf5cf6f78cd37435d95b15c03eaf188ed09768033b182de125c9f018a5fe902094f17ab891f94cab9de6dd SHA512 978384915c145ec8f0d85deb764154d8d4a9764f2d342928bda6ad43a00bc110aa888895416d2ba5684a4432e433037990dd3fe8c5caf024faa487bc2e153f49
-DIST mysql-5.6.38.tar.gz 32197625 BLAKE2B 5edd6d05e562568d2418edd81c6822b397103013e92beacc00964401c6df67f8a934f05b57c6679aa25a49ef6db2e4a06056f3f1850e0f2afe4de895c7b8f686 SHA512 8144aec822f053fbdfa11ae542e96d3e7da93552b60ed131f041ec4832f48c95025b322340a2e90a82c18b6ee6bfd708f209735f82e37532198245aad697b93d
-DIST mysql-5.6.39.tar.gz 32110958 BLAKE2B 2f279c6745bc995c860bb4f2868409136e112cc8b9fb0c04fa7673bb6d5612f3ef6d3462666de736d6e7fe5439275ab49908a6609175d1cb8c096d5db5ecb59c SHA512 e1e60854c82d71f9600bf611df964f441815d9d0f896134110a749b29fe340fa216d7c89f4da63d492929565f19a2502463549b8c8c038c658e0be8409a3ffb5
 DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c
 DIST mysql-5.6.41.tar.gz 32111985 BLAKE2B 5ccad59333525b354db4fa892857e237cddf8fe1a4d289c6e410c31d6142a71d3ce4dab8d954fa9932ec1f83b50e8eccd5845e082deaaa56f1c0c5e21b2ce6c0 SHA512 a62d7a68c6bb49de33f8c9e634bce53cb453a87238e92967115e8e928fa9ed291727b8bd5a5271a0b5b634d957eb310c745edfb14b6be1deb9099bb757aa2cff
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
-DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
-DIST mysql-extras-20180214-0024Z.tar.bz2 316686 BLAKE2B a893e2975a8062ab236f642d158a7833656942adb31d467b784a9224e7dd87872c3784bb29e93b620a58cd9a835d65248f1a817cdbafa574b5949e2b4262108a SHA512 ad0e81695a70954ad107fe104f9140be24e53d499aed6c123e68e1a062ec5cc90c70f6272fdc014e567794e331301e656ba01b22c2c7a1afaf11e14a9190fb0b
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index 82e3cca3197..8ae0465d923 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -12,16 +12,10 @@ dev-db/mariadb
 -->
 <use>
   <flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages (not recommended)</flag>
-  <flag name="cluster">Add support for NDB clustering (deprecated)</flag>
-  <flag name="community">Enables the community features from upstream.</flag>
-  <flag name="embedded">Build embedded server (libmysqld)</flag>
   <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>
   <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
   <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
   <flag name="libressl">Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</pkg></flag>
-  <flag name="openssl">Enable SSL connections and crypto functions using <pkg>dev-libs/openssl</pkg></flag>
-  <flag name="max-idx-128">Raise the max index per table limit from 64 to 128</flag>
-  <flag name="minimal">Install client programs only, no server</flag>
   <flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
   <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
   <flag name="server">Build the server program</flag>

diff --git a/dev-db/mysql/mysql-5.5.60.ebuild b/dev-db/mysql/mysql-5.5.60.ebuild
deleted file mode 100644
index 881a4ffb831..00000000000
--- a/dev-db/mysql/mysql-5.5.60.ebuild
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-MY_EXTRAS_VER="20180214-0024Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-#fails to build with ninja
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-SLOT="0/18"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test main.openssl_1 \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		for t in main.mysql main.mysql_upgrade ; do
-			mysql-v2_disable_test  "$t" "Test $t broken upstream - error return value not updated"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
deleted file mode 100644
index dd37abf2cc6..00000000000
--- a/dev-db/mysql/mysql-5.6.38.ebuild
+++ /dev/null
@@ -1,192 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-MY_EXTRAS_VER="20171121-1518Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-#fails to build with ninja
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE numa"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-COMMON_DEPEND="numa? ( sys-process/numactl:= )"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( dev-perl/JSON )"
-RDEPEND="${COMMON_DEPEND}"
-
-MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
-	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
-	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
-	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
-)
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-src_configure() {
-	# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-	# disable until we see what happens with it
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 -DWITH_NUMA=$(usex numa ON OFF) )
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		#
-		# main.events_2
-		# Fails on date in past without preserve causing the drop to fail
-
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-			main.events_2 \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		for t in main.mysql main.mysql_upgrade ; do
-			mysql-multilib-r1_disable_test  "$t" "Test $t broken upstream - error return value not updated"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.39.ebuild b/dev-db/mysql/mysql-5.6.39.ebuild
deleted file mode 100644
index a85b1579d4c..00000000000
--- a/dev-db/mysql/mysql-5.6.39.ebuild
+++ /dev/null
@@ -1,193 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-MY_EXTRAS_VER="20180214-0024Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-#fails to build with ninja
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE numa"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-COMMON_DEPEND="numa? ( sys-process/numactl:= )"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( dev-perl/JSON )"
-RDEPEND="${COMMON_DEPEND}"
-
-MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
-	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
-	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
-	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
-	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
-)
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-src_configure() {
-	# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-	# disable until we see what happens with it
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 -DWITH_NUMA=$(usex numa ON OFF) )
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='server extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		#
-		# main.events_2
-		# Fails on date in past without preserve causing the drop to fail
-
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-			main.events_2 \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		for t in main.mysql main.mysql_upgrade ; do
-			mysql-multilib-r1_disable_test  "$t" "Test $t broken upstream - error return value not updated"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.40.ebuild b/dev-db/mysql/mysql-5.6.40.ebuild
deleted file mode 100644
index 9df05a4bc7f..00000000000
--- a/dev-db/mysql/mysql-5.6.40.ebuild
+++ /dev/null
@@ -1,193 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-MY_EXTRAS_VER="20180214-0024Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-#fails to build with ninja
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE numa"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-COMMON_DEPEND="numa? ( sys-process/numactl:= )"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( dev-perl/JSON )"
-RDEPEND="${COMMON_DEPEND}"
-
-MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
-	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
-	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
-	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
-	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
-)
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-src_configure() {
-	# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-	# disable until we see what happens with it
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 -DWITH_NUMA=$(usex numa ON OFF) )
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='server extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		#
-		# main.events_2
-		# Fails on date in past without preserve causing the drop to fail
-
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-			main.events_2 \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		for t in main.mysql main.mysql_upgrade ; do
-			mysql-multilib-r1_disable_test  "$t" "Test $t broken upstream - error return value not updated"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-09-17 18:03 Matt Turner
  0 siblings, 0 replies; 393+ messages in thread
From: Matt Turner @ 2018-09-17 18:03 UTC (permalink / raw
  To: gentoo-commits

commit:     68bfcd47469fed08f8fbc99e2941bbf3de2a4d15
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 17 18:02:57 2018 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Sep 17 18:03:09 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68bfcd47

dev-db/mysql-5.6.40-r2: ppc stable, bug 655182

 dev-db/mysql/mysql-5.6.40-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.40-r2.ebuild b/dev-db/mysql/mysql-5.6.40-r2.ebuild
index a83bbe8dd6d..cf736288546 100644
--- a/dev-db/mysql/mysql-5.6.40-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.40-r2.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-09-17 18:03 Matt Turner
  0 siblings, 0 replies; 393+ messages in thread
From: Matt Turner @ 2018-09-17 18:03 UTC (permalink / raw
  To: gentoo-commits

commit:     5bf6f5c135e1f14e9cf1e2d3cb33402de0b48981
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 17 18:02:58 2018 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Sep 17 18:03:09 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bf6f5c1

dev-db/mysql-5.6.40-r2: ppc64 stable, bug 655182

 dev-db/mysql/mysql-5.6.40-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.40-r2.ebuild b/dev-db/mysql/mysql-5.6.40-r2.ebuild
index cf736288546..b81a2ec567e 100644
--- a/dev-db/mysql/mysql-5.6.40-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.40-r2.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-09-15 10:28 Michał Górny
  0 siblings, 0 replies; 393+ messages in thread
From: Michał Górny @ 2018-09-15 10:28 UTC (permalink / raw
  To: gentoo-commits

commit:     552fec9953aec3a96a3db283c5d97ae5c8f947c9
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 15 10:25:17 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Sep 15 10:28:17 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=552fec99

dev-db/mysql: Revert "Drop old version of 5.5"

Restore the old version since 5.5.61 is apparently missing USE flags
required by virtual/mysql.

Reverts: b2af5bc5c86860caaa07704c800e2fe24875ffbb

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/metadata.xml        |   9 +++
 dev-db/mysql/mysql-5.5.60.ebuild | 133 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 143 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 6a1d0831051..07571be616a 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,3 +1,4 @@
+DIST mysql-5.5.60.tar.gz 21025041 BLAKE2B c4010c64b30ca72aff011053189981cc0676806ed9f18a0ac584e07f71e1f7fe062a3ca78db6f109a2b96d324d778b239880f96852fdc058892b09d0d09e740b SHA512 734395f3ce2c12e7703fe48d5bb2ce85ff8d7f04ae51cbe2d04a46b72b9689f804e5b498ae0b4722b0c098e2eed43d4f93b622964059525e6d9d14a47d55f775
 DIST mysql-5.5.61.tar.gz 21027098 BLAKE2B b7589f632a211349fc34cec94e333b878e07113969bf5cf6f78cd37435d95b15c03eaf188ed09768033b182de125c9f018a5fe902094f17ab891f94cab9de6dd SHA512 978384915c145ec8f0d85deb764154d8d4a9764f2d342928bda6ad43a00bc110aa888895416d2ba5684a4432e433037990dd3fe8c5caf024faa487bc2e153f49
 DIST mysql-5.6.38.tar.gz 32197625 BLAKE2B 5edd6d05e562568d2418edd81c6822b397103013e92beacc00964401c6df67f8a934f05b57c6679aa25a49ef6db2e4a06056f3f1850e0f2afe4de895c7b8f686 SHA512 8144aec822f053fbdfa11ae542e96d3e7da93552b60ed131f041ec4832f48c95025b322340a2e90a82c18b6ee6bfd708f209735f82e37532198245aad697b93d
 DIST mysql-5.6.39.tar.gz 32110958 BLAKE2B 2f279c6745bc995c860bb4f2868409136e112cc8b9fb0c04fa7673bb6d5612f3ef6d3462666de736d6e7fe5439275ab49908a6609175d1cb8c096d5db5ecb59c SHA512 e1e60854c82d71f9600bf611df964f441815d9d0f896134110a749b29fe340fa216d7c89f4da63d492929565f19a2502463549b8c8c038c658e0be8409a3ffb5

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index 64ee7730fb5..82e3cca3197 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -5,14 +5,23 @@
     <email>mysql-bugs@gentoo.org</email>
     <name>MySQL</name>
   </maintainer>
+<!-- 
+Please note that this list is shared between the following packages:
+dev-db/mysql
+dev-db/mariadb
+-->
 <use>
   <flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages (not recommended)</flag>
+  <flag name="cluster">Add support for NDB clustering (deprecated)</flag>
+  <flag name="community">Enables the community features from upstream.</flag>
   <flag name="embedded">Build embedded server (libmysqld)</flag>
   <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>
   <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
   <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
   <flag name="libressl">Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</pkg></flag>
   <flag name="openssl">Enable SSL connections and crypto functions using <pkg>dev-libs/openssl</pkg></flag>
+  <flag name="max-idx-128">Raise the max index per table limit from 64 to 128</flag>
+  <flag name="minimal">Install client programs only, no server</flag>
   <flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
   <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
   <flag name="server">Build the server program</flag>

diff --git a/dev-db/mysql/mysql-5.5.60.ebuild b/dev-db/mysql/mysql-5.5.60.ebuild
new file mode 100644
index 00000000000..881a4ffb831
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.60.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+MY_EXTRAS_VER="20180214-0024Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+SLOT="0/18"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test main.openssl_1 \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		for t in main.mysql main.mysql_upgrade ; do
+			mysql-v2_disable_test  "$t" "Test $t broken upstream - error return value not updated"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-09-14 23:16 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-09-14 23:16 UTC (permalink / raw
  To: gentoo-commits

commit:     b2af5bc5c86860caaa07704c800e2fe24875ffbb
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 14 23:15:06 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Sep 14 23:15:58 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2af5bc5

dev-db/mysql: Drop old version of 5.5

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 dev-db/mysql/Manifest            |   1 -
 dev-db/mysql/metadata.xml        |   9 ---
 dev-db/mysql/mysql-5.5.60.ebuild | 133 ---------------------------------------
 3 files changed, 143 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 07571be616a..6a1d0831051 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,3 @@
-DIST mysql-5.5.60.tar.gz 21025041 BLAKE2B c4010c64b30ca72aff011053189981cc0676806ed9f18a0ac584e07f71e1f7fe062a3ca78db6f109a2b96d324d778b239880f96852fdc058892b09d0d09e740b SHA512 734395f3ce2c12e7703fe48d5bb2ce85ff8d7f04ae51cbe2d04a46b72b9689f804e5b498ae0b4722b0c098e2eed43d4f93b622964059525e6d9d14a47d55f775
 DIST mysql-5.5.61.tar.gz 21027098 BLAKE2B b7589f632a211349fc34cec94e333b878e07113969bf5cf6f78cd37435d95b15c03eaf188ed09768033b182de125c9f018a5fe902094f17ab891f94cab9de6dd SHA512 978384915c145ec8f0d85deb764154d8d4a9764f2d342928bda6ad43a00bc110aa888895416d2ba5684a4432e433037990dd3fe8c5caf024faa487bc2e153f49
 DIST mysql-5.6.38.tar.gz 32197625 BLAKE2B 5edd6d05e562568d2418edd81c6822b397103013e92beacc00964401c6df67f8a934f05b57c6679aa25a49ef6db2e4a06056f3f1850e0f2afe4de895c7b8f686 SHA512 8144aec822f053fbdfa11ae542e96d3e7da93552b60ed131f041ec4832f48c95025b322340a2e90a82c18b6ee6bfd708f209735f82e37532198245aad697b93d
 DIST mysql-5.6.39.tar.gz 32110958 BLAKE2B 2f279c6745bc995c860bb4f2868409136e112cc8b9fb0c04fa7673bb6d5612f3ef6d3462666de736d6e7fe5439275ab49908a6609175d1cb8c096d5db5ecb59c SHA512 e1e60854c82d71f9600bf611df964f441815d9d0f896134110a749b29fe340fa216d7c89f4da63d492929565f19a2502463549b8c8c038c658e0be8409a3ffb5

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index 82e3cca3197..64ee7730fb5 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -5,23 +5,14 @@
     <email>mysql-bugs@gentoo.org</email>
     <name>MySQL</name>
   </maintainer>
-<!-- 
-Please note that this list is shared between the following packages:
-dev-db/mysql
-dev-db/mariadb
--->
 <use>
   <flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages (not recommended)</flag>
-  <flag name="cluster">Add support for NDB clustering (deprecated)</flag>
-  <flag name="community">Enables the community features from upstream.</flag>
   <flag name="embedded">Build embedded server (libmysqld)</flag>
   <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>
   <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
   <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
   <flag name="libressl">Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</pkg></flag>
   <flag name="openssl">Enable SSL connections and crypto functions using <pkg>dev-libs/openssl</pkg></flag>
-  <flag name="max-idx-128">Raise the max index per table limit from 64 to 128</flag>
-  <flag name="minimal">Install client programs only, no server</flag>
   <flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
   <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
   <flag name="server">Build the server program</flag>

diff --git a/dev-db/mysql/mysql-5.5.60.ebuild b/dev-db/mysql/mysql-5.5.60.ebuild
deleted file mode 100644
index 881a4ffb831..00000000000
--- a/dev-db/mysql/mysql-5.5.60.ebuild
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-MY_EXTRAS_VER="20180214-0024Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-#fails to build with ninja
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-SLOT="0/18"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test main.openssl_1 \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		for t in main.mysql main.mysql_upgrade ; do
-			mysql-v2_disable_test  "$t" "Test $t broken upstream - error return value not updated"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-09-14 23:16 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-09-14 23:16 UTC (permalink / raw
  To: gentoo-commits

commit:     af4bf7f4b7e1add5bcb4ef05410ed3cf2b940b03
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 14 23:03:48 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Sep 14 23:15:54 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af4bf7f4

dev-db/mysql: Backport changes from 5.6.41 into 5.6.40-r2

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 dev-db/mysql/mysql-5.6.40-r2.ebuild | 768 ++++++++++++++++++++++++++++++++++++
 1 file changed, 768 insertions(+)

diff --git a/dev-db/mysql/mysql-5.6.40-r2.ebuild b/dev-db/mysql/mysql-5.6.40-r2.ebuild
new file mode 100644
index 00000000000..7ec34a50aad
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.40-r2.ebuild
@@ -0,0 +1,768 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180804-2323Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils flag-o-matic prefix toolchain-funcs \
+	user cmake-utils multilib-build
+
+SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
+	+server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
+	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	kernel_linux? (
+		sys-process/procps:0=
+		dev-libs/libaio:0=
+	)
+	net-misc/curl
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	jemalloc? ( dev-libs/jemalloc:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	!yassl? (
+		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+		libressl? ( dev-libs/libressl:0= )
+	)
+	>=sys-libs/zlib-1.2.3:0=
+	sys-libs/ncurses:0=
+	server? (
+		numa? ( sys-process/numactl )
+	)
+	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+	static? ( sys-libs/ncurses[static-libs] )
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+	${COMMON_DEPEND}
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	_disable_engine() {
+		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+	}
+
+	_disable_plugin() {
+		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+	}
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	if use tcmalloc; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	local plugin
+	local server_plugins=( semisync )
+	local test_plugins=( audit_null daemon_example fulltext )
+	if ! use server; then # These plugins are for the server
+		for plugin in "${server_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	if ! use test; then # These plugins are only used during testing
+		for plugin in "${test_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	# Don't build example
+	_disable_engine example
+	_disable_engine ndb
+	_disable_plugin innodb_memcached
+
+	cmake-utils_src_prepare
+}
+
+src_configure(){
+	# bug 508724 mariadb cannot use ld.gold
+	tc-ld-disable-gold
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling.  We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_LIBEVENT=NO
+		-DWITHOUT_CLIENTLIBS=YES
+		-DENABLE_DTRACE=$(usex systemtap)
+		-DWITH_SSL=$(usex yassl bundled system)
+		-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
+		-DWITHOUT_VALIDATE_PASSWORD=1
+	)
+
+	if use server ; then
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+		mycmakeargs+=(
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DENABLED_PROFILING=$(usex profiling)
+		)
+
+		if use static; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
+	local mycnf_src="my.cnf-5.6"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR%/}/${mycnf_src}" \
+		> "${TMPDIR%/}/my.cnf.ok" || die
+	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8|latin1|g" \
+			"${TMPDIR%/}/my.cnf.ok" || die
+	fi
+	eprefixify "${TMPDIR%/}/my.cnf.ok"
+	newins "${TMPDIR}/my.cnf.ok" my.cnf
+
+	if use server ; then
+		einfo "Including support files and sample configurations"
+		docinto "support-files"
+		local script
+		for script in \
+			"${S}"/support-files/magic
+		do
+			[[ -f "$script" ]] && dodoc "${script}"
+		done
+
+		docinto "scripts"
+		for script in "${S}"/scripts/mysql* ; do
+			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+		done
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='perl server static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" > /dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf federated.federated_plugin ; do
+			_disable_test  "$t" "False positives in Gentoo"
+	done
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd > /dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]]; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX%/}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT%/}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]]; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]]; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	echo "USE mysql;" >"${sqltmp}"
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
+	if [ $? -ne 0 ]; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
+		${options} \
+		$(use prefix || echo --user=mysql) \
+		--log-warnings=0 \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile}
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]]; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-09-14 23:16 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-09-14 23:16 UTC (permalink / raw
  To: gentoo-commits

commit:     5f18f97b2bab33f95b9aa46daa47ce4f8de3b34b
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 14 23:06:57 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Sep 14 23:15:56 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f18f97b

dev-db/mysql: Bring keywords forward from 5.6.40 to -r2

The new build system is necessary to avoid conflicts in the stable
branch from other packages implementing the mysql-connector-c changes

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 dev-db/mysql/mysql-5.6.40-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.40-r2.ebuild b/dev-db/mysql/mysql-5.6.40-r2.ebuild
index 7ec34a50aad..a83bbe8dd6d 100644
--- a/dev-db/mysql/mysql-5.6.40-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.40-r2.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-09-01 23:18 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2018-09-01 23:18 UTC (permalink / raw
  To: gentoo-commits

commit:     08464fc02fcebc56048863a4bde184884ec0abe0
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  1 23:14:49 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Sep  1 23:14:49 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08464fc0

dev-db/mysql: stable 5.6.40 for ia64, bug #655182

Package-Manager: Portage-2.3.48, Repoman-2.3.10
RepoMan-Options: --include-arches="ia64"

 dev-db/mysql/mysql-5.6.40.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.40.ebuild b/dev-db/mysql/mysql-5.6.40.ebuild
index 27a71d0b87a..9df05a4bc7f 100644
--- a/dev-db/mysql/mysql-5.6.40.ebuild
+++ b/dev-db/mysql/mysql-5.6.40.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE numa"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 COMMON_DEPEND="numa? ( sys-process/numactl:= )"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-08-05  1:15 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-08-05  1:15 UTC (permalink / raw
  To: gentoo-commits

commit:     272254cc6f95fba3edb40d6228d2f74bd01e46b5
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  5 01:14:43 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun Aug  5 01:15:09 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=272254cc

dev-db/mysql: Drop old

Package-Manager: Portage-2.3.44, Repoman-2.3.10

 dev-db/mysql/Manifest               |   3 -
 dev-db/mysql/mysql-5.5.60-r1.ebuild | 791 ---------------------------------
 dev-db/mysql/mysql-5.6.40-r1.ebuild | 768 --------------------------------
 dev-db/mysql/mysql-5.7.22.ebuild    | 843 ------------------------------------
 4 files changed, 2405 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 94021f19b0e..07571be616a 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -4,10 +4,7 @@ DIST mysql-5.6.38.tar.gz 32197625 BLAKE2B 5edd6d05e562568d2418edd81c6822b3971030
 DIST mysql-5.6.39.tar.gz 32110958 BLAKE2B 2f279c6745bc995c860bb4f2868409136e112cc8b9fb0c04fa7673bb6d5612f3ef6d3462666de736d6e7fe5439275ab49908a6609175d1cb8c096d5db5ecb59c SHA512 e1e60854c82d71f9600bf611df964f441815d9d0f896134110a749b29fe340fa216d7c89f4da63d492929565f19a2502463549b8c8c038c658e0be8409a3ffb5
 DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c
 DIST mysql-5.6.41.tar.gz 32111985 BLAKE2B 5ccad59333525b354db4fa892857e237cddf8fe1a4d289c6e410c31d6142a71d3ce4dab8d954fa9932ec1f83b50e8eccd5845e082deaaa56f1c0c5e21b2ce6c0 SHA512 a62d7a68c6bb49de33f8c9e634bce53cb453a87238e92967115e8e928fa9ed291727b8bd5a5271a0b5b634d957eb310c745edfb14b6be1deb9099bb757aa2cff
-DIST mysql-boost-5.7.22.tar.gz 48985783 BLAKE2B 208d684e038366824de4bfbe87b6761f91d05fc5cd46cfa89eb627025fb726efe2d7a08a8ce252fed369e399d2d4921bb93c446a296b617320c53ce351fc17c2 SHA512 186c9e9735114e312c65531c70e6b0b9b48b0fe14384b7a6ebfac2c1f91c3f4ac223d06e27a424fc75f57e0aaf2f74d6a8411a8ab9c6fed45c499068d0f1dc2a
 DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
 DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
 DIST mysql-extras-20180214-0024Z.tar.bz2 316686 BLAKE2B a893e2975a8062ab236f642d158a7833656942adb31d467b784a9224e7dd87872c3784bb29e93b620a58cd9a835d65248f1a817cdbafa574b5949e2b4262108a SHA512 ad0e81695a70954ad107fe104f9140be24e53d499aed6c123e68e1a062ec5cc90c70f6272fdc014e567794e331301e656ba01b22c2c7a1afaf11e14a9190fb0b
-DIST mysql-extras-20180312-2011Z.tar.bz2 319047 BLAKE2B 1da22a0c763a85a6350122c0c56aef4999279c1ef7cf99bcec28348acc83964eb257bb4340c1a21bdcd3b1eb024b23fa62879bed8679c410d847324cb7e24b82 SHA512 b0aa9fc8fbc050451ef147cee99b00cf10d34a71641837821e78655241f7d79a94fe2efb4cef9a23fe9741e08ada2fc0b58ef3b3663752bc567babfbcaa547c8
-DIST mysql-extras-20180628-0201Z.tar.bz2 322141 BLAKE2B fce35cfea4ffa9860908fcdf440cd0d714c402c42ee2afb22cec9e727971c216310c7db561ca1b37deebb2cea5137fe24f19b491ad500949e3170ccec3de0b13 SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a
 DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d

diff --git a/dev-db/mysql/mysql-5.5.60-r1.ebuild b/dev-db/mysql/mysql-5.5.60-r1.ebuild
deleted file mode 100644
index 36a1e5f70c4..00000000000
--- a/dev-db/mysql/mysql-5.5.60-r1.ebuild
+++ /dev/null
@@ -1,791 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20180628-0201Z"
-SUBSLOT="18"
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs user cmake-utils multilib-build
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.5/${P}.tar.gz
-	https://downloads.mysql.com/archives/MySQL-5.5/${P}.tar.gz"
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://mysql.com/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="0/${SUBSLOT:-0}"
-IUSE="bindist client-libs debug extraengine jemalloc latin1 libressl
-	+perl profiling selinux +server	static static-libs systemtap tcmalloc
-	test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!bindist? ( bindist ) libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )
-	static? ( yassl )"
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
-	inherit git-r3
-	EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-else
-	MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}/01050_all_mysql_config_cleanup-5.5.patch"
-	"${MY_PATCH_DIR}/02040_all_embedded-library-shared-5.5.10.patch"
-	"${MY_PATCH_DIR}/20001_all_fix-minimal-build-cmake-mysql-5.5.41.patch"
-	"${MY_PATCH_DIR}/20002_all_mysql-va-list.patch"
-	"${MY_PATCH_DIR}/20006_all_cmake_elib-mysql-5.5.53.patch"
-	"${MY_PATCH_DIR}/20007_all_cmake-debug-werror-5.6.22.patch"
-	"${MY_PATCH_DIR}/20008_all_mysql-tzinfo-symlink-5.6.37.patch"
-	"${MY_PATCH_DIR}/20009_all_mysql_myodbc_symbol_fix-5.5.38.patch"
-	"${MY_PATCH_DIR}/20018_all_mysql-5.5.60-without-clientlibs-tools.patch"
-	"${MY_PATCH_DIR}/20027_all_mysql-5.5-perl5.26-includes.patch"
-	"${MY_PATCH_DIR}/20030_all_mysql-5.5-fix-client-mysql-type.patch"
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	kernel_linux? (
-		sys-process/procps:0=
-		dev-libs/libaio:0=
-	)
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	jemalloc? ( dev-libs/jemalloc:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	!yassl? (
-		!libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
-		libressl? ( dev-libs/libressl:0= )
-	)
-	>=sys-libs/zlib-1.2.3:0=
-	sys-libs/ncurses:0=
-	!bindist? (
-		>=sys-libs/readline-4.1:0=
-	)
-	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
-	static? ( sys-libs/ncurses[static-libs] )
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
-	${COMMON_DEPEND}
-	perl? ( !dev-db/mytop
-		virtual/perl-Getopt-Long
-		dev-perl/TermReadKey
-		virtual/perl-Term-ANSIColor
-		virtual/perl-Time-HiRes )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-
-		einfo
-		elog "Be sure to edit the my.cnf file to activate your cluster settings."
-		elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
-		elog "The first time the cluster is activated, you should add"
-		elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
-		elog "This option should then be removed for subsequent starts."
-		einfo
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR%/}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	_disable_engine() {
-		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
-	}
-
-	_disable_plugin() {
-		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
-	}
-
-	if use tcmalloc; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
-	fi
-
-	if use jemalloc; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
-	fi
-
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
-	local plugin
-	local server_plugins=( semisync )
-	local test_plugins=( audit_null daemon_example fulltext )
-	if ! use server; then # These plugins are for the server
-		for plugin in "${server_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	if ! use test; then # These plugins are only used during testing
-		for plugin in "${test_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	# Don't build example
-	_disable_engine example
-	_disable_engine ndb
-
-	cmake-utils_src_prepare
-}
-
-src_configure(){
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
-		-DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		-DWITH_ZLIB=system
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
-		# The build forces this to be defined when cross-compiling.  We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITHOUT_CLIENTLIBS=YES
-		-DWITH_READLINE=$(usex bindist 1 0)
-		-DENABLE_DTRACE=$(usex systemtap)
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use yassl ; then
-		mycmakeargs+=( -DWITH_SSL=system )
-	else
-		mycmakeargs+=( -DWITH_SSL=bundled )
-	fi
-
-	if use server ; then
-
-		# Federated{,X} must be treated special otherwise they will not be built as plugins
-		if ! use extraengine ; then
-			mycmakeargs+=(
-				-DWITHOUT_FEDERATED_STORAGE_ENGINE=1
-				-DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
-		fi
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-		mycmakeargs+=(
-			-DINSTALL_SQLBENCHDIR=share/mysql
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DENABLED_PROFILING=$(usex profiling)
-		)
-
-		if use static; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DEXTRA_CHARSETS=none
-			-DINSTALL_SQLBENCHDIR=
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	cmake-utils_src_compile
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
-	if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then
-		rm "${ED%/}/usr/include/mysql/server/private/config.h" || die
-	fi
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED%/}/usr/data" ]] ; then
-		rm -Rf "${ED%/}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
-	local mycnf_src="my.cnf-5.5"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR%/}/${mycnf_src}" \
-		> "${TMPDIR%/}/my.cnf.ok" || die
-	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8|latin1|g" \
-			"${TMPDIR%/}/my.cnf.ok" || die
-	fi
-	eprefixify "${TMPDIR%/}/my.cnf.ok"
-	newins "${TMPDIR}/my.cnf.ok" my.cnf
-
-	if use server ; then
-		einfo "Including support files and sample configurations"
-		docinto "support-files"
-		local script
-		for script in \
-			"${S%/}"/support-files/magic
-		do
-			[[ -f "$script" ]] && dodoc "${script}"
-		done
-
-		docinto "scripts"
-		for script in "${S%/}"/scripts/mysql* ; do
-			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
-		done
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED%/}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='extraengine perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" > /dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.5 for now and are believed to be
-	# false positives:
-	#
-	# main.mysql_client_test, main.mysql_client_test_nonblock
-	# main.mysql_client_test_comp:
-	# segfaults at random under Portage only, suspect resource limits.
-
-	local t
-	for t in main.mysql_client_test main.mysql_client_test_nonblock \
-		main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam \
-		main.mysqlhotcopy_archive main.mysqlhotcopy_myisam main.openssl_1 \
-		rpl.rpl_semi_sync_uninstall_plugin ; do
-			_disable_test  "$t" "False positives in Gentoo"
-	done
-
-	if ! use client-libs ; then
-		_disable_test main.plugin_auth "Needs client libraries built"
-	fi
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd > /dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]]; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
-		local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
-	fi
-	if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
-	fi
-	if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in grant-tables host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]]; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]]; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
-
-	local cmd=( "${EROOT}usr/share/mysql/scripts/mysql_install_db" )
-	[[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
-	cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR}"/mysql_install_db.log 2>&1
-	if [ $? -ne 0 ]; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT}/usr/sbin/mysqld \
-		${options} \
-		--log-warnings=0 \
-		--basedir=${EROOT}/usr \
-		--datadir=${ROOT}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile}
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]]; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
-	"${EROOT}/usr/bin/mysql" \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	if [[ -n "${sqltmp}" ]] ; then
-		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
-		"${EROOT}/usr/bin/mysql" \
-			"--socket=${socket}" \
-			-hlocalhost \
-			-uroot \
-			--password="${MYSQL_ROOT_PASSWORD}" \
-			mysql < "${sqltmp}"
-		rc=$?
-		eend $?
-		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
-	fi
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}

diff --git a/dev-db/mysql/mysql-5.6.40-r1.ebuild b/dev-db/mysql/mysql-5.6.40-r1.ebuild
deleted file mode 100644
index 38515733ba7..00000000000
--- a/dev-db/mysql/mysql-5.6.40-r1.ebuild
+++ /dev/null
@@ -1,768 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20180628-0201Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs \
-	user cmake-utils multilib-build
-
-SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0/18"
-IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
-	+server static static-libs systemtap tcmalloc test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
-	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
-	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
-	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
-	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
-	kernel_linux? (
-		sys-process/procps:0=
-		dev-libs/libaio:0=
-	)
-	net-misc/curl
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	jemalloc? ( dev-libs/jemalloc:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	!yassl? (
-		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-		libressl? ( dev-libs/libressl:0= )
-	)
-	>=sys-libs/zlib-1.2.3:0=
-	sys-libs/ncurses:0=
-	server? (
-		numa? ( sys-process/numactl )
-	)
-	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
-	static? ( sys-libs/ncurses[static-libs] )
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
-	${COMMON_DEPEND}
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	_disable_engine() {
-		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
-	}
-
-	_disable_plugin() {
-		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
-	}
-
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-	if use tcmalloc; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	local plugin
-	local server_plugins=( semisync )
-	local test_plugins=( audit_null daemon_example fulltext )
-	if ! use server; then # These plugins are for the server
-		for plugin in "${server_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	if ! use test; then # These plugins are only used during testing
-		for plugin in "${test_plugins[@]}" ; do
-			_disable_plugin "${plugin}"
-		done
-	fi
-
-	# Don't build example
-	_disable_engine example
-	_disable_engine ndb
-	_disable_plugin innodb_memcached
-
-	cmake-utils_src_prepare
-}
-
-src_configure(){
-	# bug 508724 mariadb cannot use ld.gold
-	tc-ld-disable-gold
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling.  We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_LIBEVENT=NO
-		-DWITHOUT_CLIENTLIBS=YES
-		-DENABLE_DTRACE=$(usex systemtap)
-		-DWITH_SSL=$(usex yassl bundled system)
-		-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
-		-DWITHOUT_VALIDATE_PASSWORD=1
-	)
-
-	if use server ; then
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-		mycmakeargs+=(
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DENABLED_PROFILING=$(usex profiling)
-		)
-
-		if use static; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	cmake-utils_src_compile
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
-	local mycnf_src="my.cnf-5.6"
-	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-		"${FILESDIR%/}/${mycnf_src}" \
-		> "${TMPDIR%/}/my.cnf.ok" || die
-	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
-	if use latin1 ; then
-		sed -i \
-			-e "/character-set/s|utf8|latin1|g" \
-			"${TMPDIR%/}/my.cnf.ok" || die
-	fi
-	eprefixify "${TMPDIR%/}/my.cnf.ok"
-	newins "${TMPDIR}/my.cnf.ok" my.cnf
-
-	if use server ; then
-		einfo "Including support files and sample configurations"
-		docinto "support-files"
-		local script
-		for script in \
-			"${S}"/support-files/magic
-		do
-			[[ -f "$script" ]] && dodoc "${script}"
-		done
-
-		docinto "scripts"
-		for script in "${S}"/scripts/mysql* ; do
-			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
-		done
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='perl server static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" > /dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf federated.federated_plugin ; do
-			_disable_test  "$t" "False positives in Gentoo"
-	done
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd > /dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]]; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX%/}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
-		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
-	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
-	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR%/}/mysqld-help"
-	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]]; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]]; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	echo "USE mysql;" >"${sqltmp}"
-	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
-	chown mysql "${sqltmp}" || die
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
-	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [ $? -ne 0 ]; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT%/}/usr/sbin/mysqld \
-		${options} \
-		$(use prefix || echo --user=mysql) \
-		--log-warnings=0 \
-		--basedir=${EROOT%/}/usr \
-		--datadir=${ROOT%/}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile}
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]]; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
-	"${EROOT%/}/usr/bin/mysql" \
-		--no-defaults \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}

diff --git a/dev-db/mysql/mysql-5.7.22.ebuild b/dev-db/mysql/mysql-5.7.22.ebuild
deleted file mode 100644
index 3c0a0ac7c38..00000000000
--- a/dev-db/mysql/mysql-5.7.22.ebuild
+++ /dev/null
@@ -1,843 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20180312-2011Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs \
-	user cmake-utils multilib-minimal
-
-SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
-	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
-	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
-	SRC_URI="${SRC_URI}
-		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
-		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0/18"
-IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
-	+server static static-libs systemtap tcmalloc test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
-	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
-	EGIT_CLONE_TYPE=shallow
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
-	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
-#	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.7.6.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="
-	kernel_linux? (
-		sys-process/procps:0=
-		dev-libs/libaio:0=
-	)
-	net-misc/curl
-	>=sys-apps/sed-4
-	>=sys-apps/texinfo-4.7-r1
-	jemalloc? ( dev-libs/jemalloc:0= )
-	tcmalloc? ( dev-util/google-perftools:0= )
-	systemtap? ( >=dev-util/systemtap-1.3:0= )
-	!yassl? (
-		client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
-			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
-		)
-		!client-libs? (
-			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
-			libressl? ( dev-libs/libressl:0= )
-		)
-	)
-	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
-	!client-libs? ( >=sys-libs/zlib-1.2.3:0= )
-	sys-libs/ncurses:0=
-	server? (
-		>=app-arch/lz4-0_p131:=
-		>=dev-libs/boost-1.65.0:=
-		numa? ( sys-process/numactl )
-	)
-	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
-	static? ( sys-libs/ncurses[static-libs] )
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
-	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
-	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
-	${COMMON_DEPEND}
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]] ; then
-		local GCC_MAJOR_SET=$(gcc-major-version)
-		local GCC_MINOR_SET=$(gcc-minor-version)
-		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
-		# non x86{,_64} arches
-		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
-			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
-			eerror "${PN} needs to be built with gcc-4.7 or later."
-			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
-			die
-		fi
-	fi
-	if has test ${FEATURES} && \
-		use server && ! has userpriv ${FEATURES} ; then
-			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	# This should come after all of the die statements
-	enewgroup mysql 60 || die "problem adding 'mysql' group"
-	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
-	# Here we need to see if the implementation switched client libraries
-	# We check if this is a new instance of the package and a client library already exists
-	local SHOW_ABI_MESSAGE libpath
-	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
-		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
-		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 ${libpath}"
-		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
-	fi
-}
-
-pkg_postinst() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Create log directory securely if it does not exist
-	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
-	if use server ; then
-		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
-			einfo
-			elog "You might want to run:"
-			elog "\"emerge --config =${CATEGORY}/${PF}\""
-			elog "if this is a new install."
-			elog
-			elog "If you are switching server implentations, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		else
-			einfo
-			elog "If you are upgrading major versions, you should run the"
-			elog "mysql_upgrade tool."
-			einfo
-		fi
-	fi
-
-	# Note about configuration change
-	einfo
-	elog "This version of mysql reorganizes the configuration from a single my.cnf"
-	elog "to several files in /etc/mysql/${PN}.d."
-	elog "Please backup any changes you made to /etc/mysql/my.cnf"
-	elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
-	elog "You may have as many files as needed and they are read alphabetically."
-	elog "Be sure the options have the appropitate section headers, i.e. [mysqld]."
-	einfo
-}
-
-src_unpack() {
-	unpack ${A}
-	# Grab the patches
-	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
-	mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
-	if use jemalloc ; then
-		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-	if use tcmalloc; then
-		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
-	fi
-	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
-	if [[ -d "${S}/support-files/SELinux" ]] ; then
-		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
-	fi
-
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-
-	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
-	cmake-utils_src_prepare
-}
-
-src_configure(){
-	# bug 508724 mariadb cannot use ld.gold
-	tc-ld-disable-gold
-	# Bug #114895, bug #110149
-	filter-flags "-O" "-O[01]"
-
-	append-cxxflags -felide-constructors
-
-	# bug #283926, with GCC4.4, this is required to get correct behavior.
-	append-flags -fno-strict-aliasing
-
-	if use client-libs ; then
-		multilib-minimal_src_configure
-	else
-		multilib_src_configure
-	fi
-}
-
-multilib_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	if ! multilib_is_native_abi && ! use client-libs ; then
-		return
-	fi
-
-	CMAKE_BUILD_TYPE="RelWithDebInfo"
-
-	# debug hack wrt #497532
-	mycmakeargs=(
-		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
-		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
-		-DINSTALL_BINDIR=bin
-		-DINSTALL_DOCDIR=share/doc/${PF}
-		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
-		-DINSTALL_INCLUDEDIR=include/mysql
-		-DINSTALL_INFODIR=share/info
-		-DINSTALL_LIBDIR=$(get_libdir)
-		-DINSTALL_MANDIR=share/man
-		-DINSTALL_MYSQLSHAREDIR=share/mysql
-		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
-		-DINSTALL_SCRIPTDIR=share/mysql/scripts
-		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
-		-DINSTALL_SBINDIR=sbin
-		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
-		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
-		-DWITH_UNIT_TESTS=$(usex test ON OFF)
-		### TODO: make this system but issues with UTF-8 prevent it
-		-DWITH_EDITLINE=bundled
-		-DWITH_ZLIB=system
-		-DWITH_LIBWRAP=0
-		-DENABLED_LOCAL_INFILE=1
-		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-		-DWITH_DEFAULT_COMPILER_OPTIONS=0
-		-DWITH_DEFAULT_FEATURE_SET=0
-		# The build forces this to be defined when cross-compiling.  We pass it
-		# all the time for simplicity and to make sure it is actually correct.
-		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-		-DWITH_RAPID=OFF
-		-DWITH_LIBEVENT=NO
-		-DWITH_CURL=system
-		-DWITH_BOOST="${S}/boost"
-	)
-	if use test ; then
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
-	else
-		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
-	fi
-
-	if ! use yassl ; then
-		mycmakeargs+=( -DWITH_SSL=system )
-	else
-		mycmakeargs+=( -DWITH_SSL=bundled )
-	fi
-
-	if ! use client-libs ; then
-		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-	fi
-
-	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
-	# systemtap only works on native ABI  bug 530132
-	if multilib_is_native_abi; then
-		mycmakeargs+=(
-			-DENABLE_DTRACE=$(usex systemtap)
-		)
-	else
-		mycmakeargs+=(
-			-DWITHOUT_TOOLS=1
-			-DWITH_READLINE=1
-			-DENABLE_DTRACE=0
-		)
-	fi
-
-	if multilib_is_native_abi && use server ; then
-
-		mycmakeargs+=(
-			-DWITH_LZ4=system
-			-DWITH_NUMA=$(usex numa ON OFF)
-		)
-
-		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
-			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
-			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
-			ewarn "You MUST file bugs without these variables set."
-
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
-				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
-			)
-
-		elif ! use latin1 ; then
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=utf8
-				-DDEFAULT_COLLATION=utf8_general_ci
-			)
-		else
-			mycmakeargs+=(
-				-DDEFAULT_CHARSET=latin1
-				-DDEFAULT_COLLATION=latin1_swedish_ci
-			)
-		fi
-		mycmakeargs+=(
-			-DEXTRA_CHARSETS=all
-			-DDISABLE_SHARED=$(usex static YES NO)
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DENABLED_PROFILING=$(usex profiling)
-		)
-
-		if use static; then
-			mycmakeargs+=( -DWITH_PIC=1 )
-		fi
-
-		# Storage engines
-		mycmakeargs+=(
-			-DWITH_EXAMPLE_STORAGE_ENGINE=0
-			-DWITH_ARCHIVE_STORAGE_ENGINE=1
-			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-			-DWITH_CSV_STORAGE_ENGINE=1
-			-DWITH_HEAP_STORAGE_ENGINE=1
-			-DWITH_INNOBASE_STORAGE_ENGINE=1
-			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
-			-DWITH_MYISAM_STORAGE_ENGINE=1
-			-DWITH_PARTITION_STORAGE_ENGINE=1
-			-DWITH_INNODB_MEMCACHED=0
-		)
-
-	else
-		mycmakeargs+=(
-			-DWITHOUT_SERVER=1
-			-DWITH_EMBEDDED_SERVER=OFF
-			-DEXTRA_CHARSETS=none
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	if use client-libs ; then
-		multilib-minimal_src_compile
-	else
-		multilib_src_compile
-	fi
-}
-
-multilib_src_compile() {
-	cmake-utils_src_compile
-}
-
-src_install() {
-	local MULTILIB_WRAPPED_HEADERS
-	local MULTILIB_CHOST_TOOLS
-	if use client-libs ; then
-		# headers with ABI specific data
-		MULTILIB_WRAPPED_HEADERS=(
-			/usr/include/mysql/server/my_config.h
-			/usr/include/mysql/server/mysql_version.h )
-
-		# wrap the config scripts
-		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
-		multilib-minimal_src_install
-	else
-		multilib_src_install
-		multilib_src_install_all
-	fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-
-	cmake-utils_src_install
-
-	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
-	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	# Convenience links
-	einfo "Making Convenience links for mysqlcheck multi-call binary"
-	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
-	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
-	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
-	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
-	if [[ -d "${ED}/usr/data" ]] ; then
-		rm -Rf "${ED}/usr/data" || die
-	fi
-
-	# Unless they explicitly specific USE=test, then do not install the
-	# testsuite. It DOES have a use to be installed, esp. when you want to do a
-	# validation of your database configuration after tuning it.
-	if ! use test ; then
-		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
-	fi
-
-	# Configuration stuff
-	einfo "Building default configuration ..."
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
-	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
-	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
-	eprefixify "${TMPDIR}/my.cnf"
-	doins "${TMPDIR}/my.cnf"
-	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
-	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
-	eprefixify "${TMPDIR}/50-distro-client.cnf"
-	doins "${TMPDIR}/50-distro-client.cnf"
-
-	if use server ; then
-		mycnf_src="my.cnf.distro-server"
-		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
-			"${FILESDIR}/${mycnf_src}" \
-			> "${TMPDIR}/my.cnf.ok" || die
-		if use prefix ; then
-			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-		if use latin1 ; then
-			sed -i \
-				-e "/character-set/s|utf8|latin1|g" \
-				"${TMPDIR}/my.cnf.ok" || die
-		fi
-		eprefixify "${TMPDIR}/my.cnf.ok"
-		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
-		einfo "Including support files and sample configurations"
-		docinto "support-files"
-		local script
-		for script in \
-			"${S}"/support-files/magic
-		do
-			[[ -f "$script" ]] && dodoc "${script}"
-		done
-
-		docinto "scripts"
-		for script in "${S}"/scripts/mysql* ; do
-			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
-		done
-	fi
-
-	#Remove mytop if perl is not selected
-	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='perl server static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	_disable_test() {
-		local rawtestname reason
-		rawtestname="${1}" ; shift
-		reason="${@}"
-		ewarn "test '${rawtestname}' disabled: '${reason}'"
-		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
-	}
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# Run CTest (test-units)
-	cmake-utils_src_test
-	retstatus_unit=$?
-
-	# Ensure that parallel runs don't die
-	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-	# Enable parallel testing, auto will try to detect number of cores
-	# You may set this by hand.
-	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-	# create directories because mysqladmin might run out of order
-	mkdir -p "${T}"/var-tests{,/log} || die
-
-	# Run mysql tests
-	pushd "${TESTDIR}" > /dev/null || die
-
-	touch "${T}/disabled.def"
-	# These are failing in MySQL 5.7 for now and are believed to be
-	# false positives:
-	#
-	local t
-
-	for t in auth_sec.keyring_udf federated.federated_plugin ; do
-			_disable_test  "$t" "False positives in Gentoo"
-	done
-
-	# run mysql-test tests
-	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
-	retstatus_tests=$?
-
-	popd > /dev/null || die
-
-	# Cleanup is important for these testcases.
-	pkill -9 -f "${S}/ndb" 2>/dev/null
-	pkill -9 -f "${S}/sql" 2>/dev/null
-
-	local failures=""
-	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
-	[[ -z "$failures" ]] || die "Test failures: $failures"
-	einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
-
-	if [[ -z "${MY_DATADIR}" ]] ; then
-		MY_DATADIR=""
-		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
-			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-			if [[ -z "${MY_DATADIR}" ]] ; then
-				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
-				| sed -e 's/.*=\s*//' \
-				| tail -n1`
-			fi
-		fi
-		if [[ -z "${MY_DATADIR}" ]] ; then
-			MY_DATADIR="${MY_LOCALSTATEDIR}"
-			einfo "Using default MY_DATADIR"
-		fi
-		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
-		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
-			if [[ -e "${MY_DATADIR}" ]] ; then
-				# If you get this and you're wondering about it, see bug #207636
-				elog "MySQL datadir found in ${MY_DATADIR}"
-				elog "A new one will not be created."
-				PREVIOUS_DATADIR="yes"
-			else
-				PREVIOUS_DATADIR="no"
-			fi
-			export PREVIOUS_DATADIR
-		fi
-	else
-		if [[ ${EBUILD_PHASE} == "config" ]]; then
-			local new_MY_DATADIR
-			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
-				| sed -ne '/datadir/s|^--datadir=||p' \
-				| tail -n1`
-
-			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
-				ewarn "MySQL MY_DATADIR has changed"
-				ewarn "from ${MY_DATADIR}"
-				ewarn "to ${new_MY_DATADIR}"
-				MY_DATADIR="${new_MY_DATADIR}"
-			fi
-		fi
-	fi
-
-	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
-	export MY_LOCALSTATEDIR MY_LOGDIR
-	export MY_DATADIR
-}
-
-pkg_config() {
-	_getoptval() {
-		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
-		local section="$1"
-		local flag="--${2}="
-		local extra_options="${3}"
-		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
-	}
-	local old_MY_DATADIR="${MY_DATADIR}"
-	local old_HOME="${HOME}"
-	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX%/}/root
-
-	# Make sure the vars are correctly initialized
-	mysql_init_vars
-
-	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
-		die "Minimal builds do NOT include the MySQL server"
-	fi
-
-	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
-		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
-		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
-		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
-		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
-				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
-			else
-				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
-				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
-				|| die "Moving MY_DATADIR failed"
-			fi
-		else
-			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
-			if [[ -d "${MY_DATADIR_s}" ]]; then
-				ewarn "Attempting to use ${MY_DATADIR_s}"
-			else
-				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
-				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
-			fi
-		fi
-	fi
-
-	local pwd1="a"
-	local pwd2="b"
-	local maxtry=15
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-		local tmp_mysqld_password_source=
-
-		for tmp_mysqld_password_source in mysql client; do
-			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
-			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
-				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
-					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
-					MYSQL_ROOT_PASSWORD=
-					continue
-				fi
-
-				einfo "Found password in '${tmp_mysqld_password_source}' section!"
-				break
-			fi
-		done
-
-		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
-		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
-			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
-		fi
-
-		unset tmp_mysqld_password_source
-	fi
-	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
-	# These are dir+prefix
-	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
-	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
-	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
-	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
-		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
-	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
-		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
-	fi
-	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
-		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
-	fi
-
-	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
-		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
-		ewarn "Please rename or delete it if you wish to replace it."
-		die "MySQL database already exists!"
-	fi
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
-		einfo "Please provide a password for the mysql 'root' user now"
-		einfo "or through the ${HOME}/.my.cnf file."
-		ewarn "Avoid [\"'\\_%] characters in the password"
-		read -rsp "    >" pwd1 ; echo
-
-		einfo "Retype the password"
-		read -rsp "    >" pwd2 ; echo
-
-		if [[ "x$pwd1" != "x$pwd2" ]] ; then
-			die "Passwords are not the same"
-		fi
-		MYSQL_ROOT_PASSWORD="${pwd1}"
-		unset pwd1 pwd2
-	fi
-
-	local options
-	local sqltmp="$(emktemp)"
-
-	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
-	# see http://bugs.mysql.com/bug.php?id=31312
-	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
-	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR%/}/mysqld-help"
-	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in host-cache name-resolve networking slave-start \
-		federated ssl log-bin relay-log slow-query-log external-locking \
-		log-slave-updates \
-		; do
-		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
-		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
-	done
-
-	einfo "Creating the mysql database and setting proper permissions on it ..."
-
-	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT%/}/var/run/mysqld"
-	if [[ ! -d "${PID_DIR}" ]]; then
-		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
-	fi
-
-	if [[ ! -d "${MY_DATADIR}" ]]; then
-		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
-	fi
-
-	pushd "${TMPDIR}" &>/dev/null || die
-
-	# Filling timezones, see
-	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	echo "USE mysql;" >"${sqltmp}"
-	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
-	chown mysql "${sqltmp}" || die
-
-	# --initialize-insecure will not set root password
-	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
-	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
-	einfo "Command: ${cmd[*]}"
-	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
-	if [ $? -ne 0 ]; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
-	fi
-	popd &>/dev/null || die
-	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
-	|| die "MySQL databases not installed"
-
-	use prefix || options="${options} --user=mysql"
-
-	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT%/}/usr/sbin/mysqld \
-		${options} \
-		$(use prefix || echo --user=mysql) \
-		--log-warnings=0 \
-		--basedir=${EROOT%/}/usr \
-		--datadir=${ROOT%/}/${MY_DATADIR} \
-		--max_allowed_packet=8M \
-		--net_buffer_length=16K \
-		--socket=${socket} \
-		--pid-file=${pidfile}
-		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
-	#einfo "About to start mysqld: ${mysqld}"
-	ebegin "Starting mysqld"
-	einfo "Command ${mysqld}"
-	${mysqld} &
-	rc=$?
-	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
-		maxtry=$((${maxtry}-1))
-		echo -n "."
-		sleep 1
-	done
-	eend $rc
-
-	if ! [[ -S "${socket}" ]]; then
-		die "Completely failed to start up mysqld with: ${mysqld}"
-	fi
-
-	ebegin "Setting root password"
-	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
-	"${EROOT%/}/usr/bin/mysql" \
-		--no-defaults \
-		"--socket=${socket}" \
-		-hlocalhost \
-		-e "${sql}"
-	eend $?
-
-	# Stop the server and cleanup
-	einfo "Stopping the server ..."
-	kill $(< "${pidfile}" )
-	rm -f "${sqltmp}"
-	wait %1
-	einfo "Done"
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-08-05  1:15 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-08-05  1:15 UTC (permalink / raw
  To: gentoo-commits

commit:     9e2abd1b8a389deed8495e26a90a5a1f58a06936
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  5 01:11:42 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun Aug  5 01:15:07 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e2abd1b

dev-db/mysql: Version bump for 5.7.23

Package-Manager: Portage-2.3.44, Repoman-2.3.10

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.7.23.ebuild | 845 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 846 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 4e692c4fc2f..94021f19b0e 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -5,6 +5,7 @@ DIST mysql-5.6.39.tar.gz 32110958 BLAKE2B 2f279c6745bc995c860bb4f2868409136e112c
 DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c
 DIST mysql-5.6.41.tar.gz 32111985 BLAKE2B 5ccad59333525b354db4fa892857e237cddf8fe1a4d289c6e410c31d6142a71d3ce4dab8d954fa9932ec1f83b50e8eccd5845e082deaaa56f1c0c5e21b2ce6c0 SHA512 a62d7a68c6bb49de33f8c9e634bce53cb453a87238e92967115e8e928fa9ed291727b8bd5a5271a0b5b634d957eb310c745edfb14b6be1deb9099bb757aa2cff
 DIST mysql-boost-5.7.22.tar.gz 48985783 BLAKE2B 208d684e038366824de4bfbe87b6761f91d05fc5cd46cfa89eb627025fb726efe2d7a08a8ce252fed369e399d2d4921bb93c446a296b617320c53ce351fc17c2 SHA512 186c9e9735114e312c65531c70e6b0b9b48b0fe14384b7a6ebfac2c1f91c3f4ac223d06e27a424fc75f57e0aaf2f74d6a8411a8ab9c6fed45c499068d0f1dc2a
+DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
 DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
 DIST mysql-extras-20180214-0024Z.tar.bz2 316686 BLAKE2B a893e2975a8062ab236f642d158a7833656942adb31d467b784a9224e7dd87872c3784bb29e93b620a58cd9a835d65248f1a817cdbafa574b5949e2b4262108a SHA512 ad0e81695a70954ad107fe104f9140be24e53d499aed6c123e68e1a062ec5cc90c70f6272fdc014e567794e331301e656ba01b22c2c7a1afaf11e14a9190fb0b
 DIST mysql-extras-20180312-2011Z.tar.bz2 319047 BLAKE2B 1da22a0c763a85a6350122c0c56aef4999279c1ef7cf99bcec28348acc83964eb257bb4340c1a21bdcd3b1eb024b23fa62879bed8679c410d847324cb7e24b82 SHA512 b0aa9fc8fbc050451ef147cee99b00cf10d34a71641837821e78655241f7d79a94fe2efb4cef9a23fe9741e08ada2fc0b58ef3b3663752bc567babfbcaa547c8

diff --git a/dev-db/mysql/mysql-5.7.23.ebuild b/dev-db/mysql/mysql-5.7.23.ebuild
new file mode 100644
index 00000000000..aad033f5ecc
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.23.ebuild
@@ -0,0 +1,845 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180804-2323Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils flag-o-matic prefix toolchain-funcs \
+	user cmake-utils multilib-minimal
+
+SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
+	+server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
+#	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.7.6.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+	kernel_linux? (
+		sys-process/procps:0=
+		dev-libs/libaio:0=
+	)
+	net-misc/curl
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	jemalloc? ( dev-libs/jemalloc:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	!yassl? (
+		client-libs? (
+			!libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+			libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+		)
+		!client-libs? (
+			!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+			libressl? ( dev-libs/libressl:0= )
+		)
+	)
+	client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
+	!client-libs? ( >=sys-libs/zlib-1.2.3:0= )
+	sys-libs/ncurses:0=
+	server? (
+		>=app-arch/lz4-0_p131:=
+		>=dev-libs/boost-1.65.0:=
+		numa? ( sys-process/numactl )
+	)
+	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+	dev-libs/protobuf
+	static? ( sys-libs/ncurses[static-libs] )
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+	${COMMON_DEPEND}
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+
+	# Note about configuration change
+	einfo
+	elog "This version of mysql reorganizes the configuration from a single my.cnf"
+	elog "to several files in /etc/mysql/${PN}.d."
+	elog "Please backup any changes you made to /etc/mysql/my.cnf"
+	elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
+	elog "You may have as many files as needed and they are read alphabetically."
+	elog "Be sure the options have the appropitate section headers, i.e. [mysqld]."
+	einfo
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	if use tcmalloc; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	cmake-utils_src_prepare
+}
+
+src_configure(){
+	# bug 508724 mariadb cannot use ld.gold
+	tc-ld-disable-gold
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	if use client-libs ; then
+		multilib-minimal_src_configure
+	else
+		multilib_src_configure
+	fi
+}
+
+multilib_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	if ! multilib_is_native_abi && ! use client-libs ; then
+		return
+	fi
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling.  We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_RAPID=OFF
+		-DWITH_LIBEVENT=NO
+		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
+		-DWITH_PROTOBUF=system
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use yassl ; then
+		mycmakeargs+=( -DWITH_SSL=system )
+	else
+		mycmakeargs+=( -DWITH_SSL=bundled )
+	fi
+
+	if ! use client-libs ; then
+		mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+	fi
+
+	# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+	# systemtap only works on native ABI  bug 530132
+	if multilib_is_native_abi; then
+		mycmakeargs+=(
+			-DENABLE_DTRACE=$(usex systemtap)
+		)
+	else
+		mycmakeargs+=(
+			-DWITHOUT_TOOLS=1
+			-DWITH_READLINE=1
+			-DENABLE_DTRACE=0
+		)
+	fi
+
+	if multilib_is_native_abi && use server ; then
+
+		mycmakeargs+=(
+			-DWITH_LZ4=system
+			-DWITH_NUMA=$(usex numa ON OFF)
+		)
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+		mycmakeargs+=(
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DENABLED_PROFILING=$(usex profiling)
+		)
+
+		if use static; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_EXAMPLE_STORAGE_ENGINE=0
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	if use client-libs ; then
+		multilib-minimal_src_compile
+	else
+		multilib_src_compile
+	fi
+}
+
+multilib_src_compile() {
+	cmake-utils_src_compile
+}
+
+src_install() {
+	local MULTILIB_WRAPPED_HEADERS
+	local MULTILIB_CHOST_TOOLS
+	if use client-libs ; then
+		# headers with ABI specific data
+		MULTILIB_WRAPPED_HEADERS=(
+			/usr/include/mysql/server/my_config.h
+			/usr/include/mysql/server/mysql_version.h )
+
+		# wrap the config scripts
+		MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+		multilib-minimal_src_install
+	else
+		multilib_src_install
+		multilib_src_install_all
+	fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+
+	cmake-utils_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+	eprefixify "${TMPDIR}/my.cnf"
+	doins "${TMPDIR}/my.cnf"
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+	cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+	eprefixify "${TMPDIR}/50-distro-client.cnf"
+	doins "${TMPDIR}/50-distro-client.cnf"
+
+	if use server ; then
+		mycnf_src="my.cnf.distro-server"
+		sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+			"${FILESDIR}/${mycnf_src}" \
+			> "${TMPDIR}/my.cnf.ok" || die
+		if use prefix ; then
+			sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+		if use latin1 ; then
+			sed -i \
+				-e "/character-set/s|utf8|latin1|g" \
+				"${TMPDIR}/my.cnf.ok" || die
+		fi
+		eprefixify "${TMPDIR}/my.cnf.ok"
+		newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+		einfo "Including support files and sample configurations"
+		docinto "support-files"
+		local script
+		for script in \
+			"${S}"/support-files/magic
+		do
+			[[ -f "$script" ]] && dodoc "${script}"
+		done
+
+		docinto "scripts"
+		for script in "${S}"/scripts/mysql* ; do
+			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+		done
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" > /dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf federated.federated_plugin ; do
+			_disable_test  "$t" "False positives in Gentoo"
+	done
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd > /dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]]; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX%/}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT%/}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]]; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]]; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	echo "USE mysql;" >"${sqltmp}"
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
+	if [ $? -ne 0 ]; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
+		${options} \
+		$(use prefix || echo --user=mysql) \
+		--log-warnings=0 \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile}
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]]; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-08-05  1:15 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-08-05  1:15 UTC (permalink / raw
  To: gentoo-commits

commit:     1235ca1ed62aa822c81548811fab50de639c0fcc
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  5 00:16:27 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun Aug  5 01:15:05 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1235ca1e

dev-db/mysql: Version bump for 5.5.61

Package-Manager: Portage-2.3.44, Repoman-2.3.10

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.5.61.ebuild | 791 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 792 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 89f147bb666..4e692c4fc2f 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,5 @@
 DIST mysql-5.5.60.tar.gz 21025041 BLAKE2B c4010c64b30ca72aff011053189981cc0676806ed9f18a0ac584e07f71e1f7fe062a3ca78db6f109a2b96d324d778b239880f96852fdc058892b09d0d09e740b SHA512 734395f3ce2c12e7703fe48d5bb2ce85ff8d7f04ae51cbe2d04a46b72b9689f804e5b498ae0b4722b0c098e2eed43d4f93b622964059525e6d9d14a47d55f775
+DIST mysql-5.5.61.tar.gz 21027098 BLAKE2B b7589f632a211349fc34cec94e333b878e07113969bf5cf6f78cd37435d95b15c03eaf188ed09768033b182de125c9f018a5fe902094f17ab891f94cab9de6dd SHA512 978384915c145ec8f0d85deb764154d8d4a9764f2d342928bda6ad43a00bc110aa888895416d2ba5684a4432e433037990dd3fe8c5caf024faa487bc2e153f49
 DIST mysql-5.6.38.tar.gz 32197625 BLAKE2B 5edd6d05e562568d2418edd81c6822b397103013e92beacc00964401c6df67f8a934f05b57c6679aa25a49ef6db2e4a06056f3f1850e0f2afe4de895c7b8f686 SHA512 8144aec822f053fbdfa11ae542e96d3e7da93552b60ed131f041ec4832f48c95025b322340a2e90a82c18b6ee6bfd708f209735f82e37532198245aad697b93d
 DIST mysql-5.6.39.tar.gz 32110958 BLAKE2B 2f279c6745bc995c860bb4f2868409136e112cc8b9fb0c04fa7673bb6d5612f3ef6d3462666de736d6e7fe5439275ab49908a6609175d1cb8c096d5db5ecb59c SHA512 e1e60854c82d71f9600bf611df964f441815d9d0f896134110a749b29fe340fa216d7c89f4da63d492929565f19a2502463549b8c8c038c658e0be8409a3ffb5
 DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c

diff --git a/dev-db/mysql/mysql-5.5.61.ebuild b/dev-db/mysql/mysql-5.5.61.ebuild
new file mode 100644
index 00000000000..b2c26da97b4
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.61.ebuild
@@ -0,0 +1,791 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180804-2323Z"
+SUBSLOT="18"
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils flag-o-matic prefix toolchain-funcs user cmake-utils multilib-build
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.5/${P}.tar.gz
+	https://downloads.mysql.com/archives/MySQL-5.5/${P}.tar.gz"
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://mysql.com/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="0/${SUBSLOT:-0}"
+IUSE="bindist client-libs debug extraengine jemalloc latin1 libressl
+	+perl profiling selinux +server	static static-libs systemtap tcmalloc
+	test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
+	inherit git-r3
+	EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+else
+	MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}/01050_all_mysql_config_cleanup-5.5.patch"
+	"${MY_PATCH_DIR}/02040_all_embedded-library-shared-5.5.10.patch"
+	"${MY_PATCH_DIR}/20001_all_fix-minimal-build-cmake-mysql-5.5.41.patch"
+	"${MY_PATCH_DIR}/20002_all_mysql-va-list.patch"
+	"${MY_PATCH_DIR}/20006_all_cmake_elib-mysql-5.5.53.patch"
+	"${MY_PATCH_DIR}/20007_all_cmake-debug-werror-5.6.22.patch"
+	"${MY_PATCH_DIR}/20008_all_mysql-tzinfo-symlink-5.6.37.patch"
+	"${MY_PATCH_DIR}/20009_all_mysql_myodbc_symbol_fix-5.5.38.patch"
+	"${MY_PATCH_DIR}/20018_all_mysql-5.5.60-without-clientlibs-tools.patch"
+	"${MY_PATCH_DIR}/20027_all_mysql-5.5-perl5.26-includes.patch"
+	"${MY_PATCH_DIR}/20030_all_mysql-5.5-fix-client-mysql-type.patch"
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	kernel_linux? (
+		sys-process/procps:0=
+		dev-libs/libaio:0=
+	)
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	jemalloc? ( dev-libs/jemalloc:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	!yassl? (
+		!libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
+		libressl? ( dev-libs/libressl:0= )
+	)
+	>=sys-libs/zlib-1.2.3:0=
+	sys-libs/ncurses:0=
+	!bindist? (
+		>=sys-libs/readline-4.1:0=
+	)
+	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+	static? ( sys-libs/ncurses[static-libs] )
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+	${COMMON_DEPEND}
+	perl? ( !dev-db/mytop
+		virtual/perl-Getopt-Long
+		dev-perl/TermReadKey
+		virtual/perl-Term-ANSIColor
+		virtual/perl-Time-HiRes )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+
+		einfo
+		elog "Be sure to edit the my.cnf file to activate your cluster settings."
+		elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
+		elog "The first time the cluster is activated, you should add"
+		elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
+		elog "This option should then be removed for subsequent starts."
+		einfo
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR%/}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	_disable_engine() {
+		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+	}
+
+	_disable_plugin() {
+		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+	}
+
+	if use tcmalloc; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
+	fi
+
+	if use jemalloc; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	local plugin
+	local server_plugins=( semisync )
+	local test_plugins=( audit_null daemon_example fulltext )
+	if ! use server; then # These plugins are for the server
+		for plugin in "${server_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	if ! use test; then # These plugins are only used during testing
+		for plugin in "${test_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	# Don't build example
+	_disable_engine example
+	_disable_engine ndb
+
+	cmake-utils_src_prepare
+}
+
+src_configure(){
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
+		-DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		-DWITH_ZLIB=system
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+		# The build forces this to be defined when cross-compiling.  We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITHOUT_CLIENTLIBS=YES
+		-DWITH_READLINE=$(usex bindist 1 0)
+		-DENABLE_DTRACE=$(usex systemtap)
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use yassl ; then
+		mycmakeargs+=( -DWITH_SSL=system )
+	else
+		mycmakeargs+=( -DWITH_SSL=bundled )
+	fi
+
+	if use server ; then
+
+		# Federated{,X} must be treated special otherwise they will not be built as plugins
+		if ! use extraengine ; then
+			mycmakeargs+=(
+				-DWITHOUT_FEDERATED_STORAGE_ENGINE=1
+				-DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
+		fi
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+		mycmakeargs+=(
+			-DINSTALL_SQLBENCHDIR=share/mysql
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DENABLED_PROFILING=$(usex profiling)
+		)
+
+		if use static; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DEXTRA_CHARSETS=none
+			-DINSTALL_SQLBENCHDIR=
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
+	if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then
+		rm "${ED%/}/usr/include/mysql/server/private/config.h" || die
+	fi
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED%/}/usr/data" ]] ; then
+		rm -Rf "${ED%/}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
+	local mycnf_src="my.cnf-5.5"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR%/}/${mycnf_src}" \
+		> "${TMPDIR%/}/my.cnf.ok" || die
+	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8|latin1|g" \
+			"${TMPDIR%/}/my.cnf.ok" || die
+	fi
+	eprefixify "${TMPDIR%/}/my.cnf.ok"
+	newins "${TMPDIR}/my.cnf.ok" my.cnf
+
+	if use server ; then
+		einfo "Including support files and sample configurations"
+		docinto "support-files"
+		local script
+		for script in \
+			"${S%/}"/support-files/magic
+		do
+			[[ -f "$script" ]] && dodoc "${script}"
+		done
+
+		docinto "scripts"
+		for script in "${S%/}"/scripts/mysql* ; do
+			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+		done
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED%/}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" > /dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.5 for now and are believed to be
+	# false positives:
+	#
+	# main.mysql_client_test, main.mysql_client_test_nonblock
+	# main.mysql_client_test_comp:
+	# segfaults at random under Portage only, suspect resource limits.
+
+	local t
+	for t in main.mysql_client_test main.mysql_client_test_nonblock \
+		main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam \
+		main.mysqlhotcopy_archive main.mysqlhotcopy_myisam main.openssl_1 \
+		rpl.rpl_semi_sync_uninstall_plugin ; do
+			_disable_test  "$t" "False positives in Gentoo"
+	done
+
+	if ! use client-libs ; then
+		_disable_test main.plugin_auth "Needs client libraries built"
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd > /dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]]; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+		local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
+	fi
+	if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
+	fi
+	if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in grant-tables host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]]; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]]; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
+
+	local cmd=( "${EROOT}usr/share/mysql/scripts/mysql_install_db" )
+	[[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
+	cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR}"/mysql_install_db.log 2>&1
+	if [ $? -ne 0 ]; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT}/usr/sbin/mysqld \
+		${options} \
+		--log-warnings=0 \
+		--basedir=${EROOT}/usr \
+		--datadir=${ROOT}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile}
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]]; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
+	"${EROOT}/usr/bin/mysql" \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	if [[ -n "${sqltmp}" ]] ; then
+		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+		"${EROOT}/usr/bin/mysql" \
+			"--socket=${socket}" \
+			-hlocalhost \
+			-uroot \
+			--password="${MYSQL_ROOT_PASSWORD}" \
+			mysql < "${sqltmp}"
+		rc=$?
+		eend $?
+		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+	fi
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-08-05  1:15 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-08-05  1:15 UTC (permalink / raw
  To: gentoo-commits

commit:     a35c3ecb4e795c8a32a6e97774e954fd90f1dfa3
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  4 23:50:47 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun Aug  5 01:15:03 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a35c3ecb

dev-db/mysql: Version bump for 5.6.41

Package-Manager: Portage-2.3.44, Repoman-2.3.10

 dev-db/mysql/Manifest            |   2 +
 dev-db/mysql/mysql-5.6.41.ebuild | 768 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 770 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index f1c2983994f..89f147bb666 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -2,8 +2,10 @@ DIST mysql-5.5.60.tar.gz 21025041 BLAKE2B c4010c64b30ca72aff011053189981cc067680
 DIST mysql-5.6.38.tar.gz 32197625 BLAKE2B 5edd6d05e562568d2418edd81c6822b397103013e92beacc00964401c6df67f8a934f05b57c6679aa25a49ef6db2e4a06056f3f1850e0f2afe4de895c7b8f686 SHA512 8144aec822f053fbdfa11ae542e96d3e7da93552b60ed131f041ec4832f48c95025b322340a2e90a82c18b6ee6bfd708f209735f82e37532198245aad697b93d
 DIST mysql-5.6.39.tar.gz 32110958 BLAKE2B 2f279c6745bc995c860bb4f2868409136e112cc8b9fb0c04fa7673bb6d5612f3ef6d3462666de736d6e7fe5439275ab49908a6609175d1cb8c096d5db5ecb59c SHA512 e1e60854c82d71f9600bf611df964f441815d9d0f896134110a749b29fe340fa216d7c89f4da63d492929565f19a2502463549b8c8c038c658e0be8409a3ffb5
 DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c
+DIST mysql-5.6.41.tar.gz 32111985 BLAKE2B 5ccad59333525b354db4fa892857e237cddf8fe1a4d289c6e410c31d6142a71d3ce4dab8d954fa9932ec1f83b50e8eccd5845e082deaaa56f1c0c5e21b2ce6c0 SHA512 a62d7a68c6bb49de33f8c9e634bce53cb453a87238e92967115e8e928fa9ed291727b8bd5a5271a0b5b634d957eb310c745edfb14b6be1deb9099bb757aa2cff
 DIST mysql-boost-5.7.22.tar.gz 48985783 BLAKE2B 208d684e038366824de4bfbe87b6761f91d05fc5cd46cfa89eb627025fb726efe2d7a08a8ce252fed369e399d2d4921bb93c446a296b617320c53ce351fc17c2 SHA512 186c9e9735114e312c65531c70e6b0b9b48b0fe14384b7a6ebfac2c1f91c3f4ac223d06e27a424fc75f57e0aaf2f74d6a8411a8ab9c6fed45c499068d0f1dc2a
 DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
 DIST mysql-extras-20180214-0024Z.tar.bz2 316686 BLAKE2B a893e2975a8062ab236f642d158a7833656942adb31d467b784a9224e7dd87872c3784bb29e93b620a58cd9a835d65248f1a817cdbafa574b5949e2b4262108a SHA512 ad0e81695a70954ad107fe104f9140be24e53d499aed6c123e68e1a062ec5cc90c70f6272fdc014e567794e331301e656ba01b22c2c7a1afaf11e14a9190fb0b
 DIST mysql-extras-20180312-2011Z.tar.bz2 319047 BLAKE2B 1da22a0c763a85a6350122c0c56aef4999279c1ef7cf99bcec28348acc83964eb257bb4340c1a21bdcd3b1eb024b23fa62879bed8679c410d847324cb7e24b82 SHA512 b0aa9fc8fbc050451ef147cee99b00cf10d34a71641837821e78655241f7d79a94fe2efb4cef9a23fe9741e08ada2fc0b58ef3b3663752bc567babfbcaa547c8
 DIST mysql-extras-20180628-0201Z.tar.bz2 322141 BLAKE2B fce35cfea4ffa9860908fcdf440cd0d714c402c42ee2afb22cec9e727971c216310c7db561ca1b37deebb2cea5137fe24f19b491ad500949e3170ccec3de0b13 SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a
+DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d

diff --git a/dev-db/mysql/mysql-5.6.41.ebuild b/dev-db/mysql/mysql-5.6.41.ebuild
new file mode 100644
index 00000000000..7ec34a50aad
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.41.ebuild
@@ -0,0 +1,768 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180804-2323Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils flag-o-matic prefix toolchain-funcs \
+	user cmake-utils multilib-build
+
+SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
+	+server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
+	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	kernel_linux? (
+		sys-process/procps:0=
+		dev-libs/libaio:0=
+	)
+	net-misc/curl
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	jemalloc? ( dev-libs/jemalloc:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	!yassl? (
+		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+		libressl? ( dev-libs/libressl:0= )
+	)
+	>=sys-libs/zlib-1.2.3:0=
+	sys-libs/ncurses:0=
+	server? (
+		numa? ( sys-process/numactl )
+	)
+	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+	static? ( sys-libs/ncurses[static-libs] )
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+	${COMMON_DEPEND}
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	_disable_engine() {
+		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+	}
+
+	_disable_plugin() {
+		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+	}
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	if use tcmalloc; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	local plugin
+	local server_plugins=( semisync )
+	local test_plugins=( audit_null daemon_example fulltext )
+	if ! use server; then # These plugins are for the server
+		for plugin in "${server_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	if ! use test; then # These plugins are only used during testing
+		for plugin in "${test_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	# Don't build example
+	_disable_engine example
+	_disable_engine ndb
+	_disable_plugin innodb_memcached
+
+	cmake-utils_src_prepare
+}
+
+src_configure(){
+	# bug 508724 mariadb cannot use ld.gold
+	tc-ld-disable-gold
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling.  We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_LIBEVENT=NO
+		-DWITHOUT_CLIENTLIBS=YES
+		-DENABLE_DTRACE=$(usex systemtap)
+		-DWITH_SSL=$(usex yassl bundled system)
+		-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
+		-DWITHOUT_VALIDATE_PASSWORD=1
+	)
+
+	if use server ; then
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+		mycmakeargs+=(
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DENABLED_PROFILING=$(usex profiling)
+		)
+
+		if use static; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
+	local mycnf_src="my.cnf-5.6"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR%/}/${mycnf_src}" \
+		> "${TMPDIR%/}/my.cnf.ok" || die
+	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8|latin1|g" \
+			"${TMPDIR%/}/my.cnf.ok" || die
+	fi
+	eprefixify "${TMPDIR%/}/my.cnf.ok"
+	newins "${TMPDIR}/my.cnf.ok" my.cnf
+
+	if use server ; then
+		einfo "Including support files and sample configurations"
+		docinto "support-files"
+		local script
+		for script in \
+			"${S}"/support-files/magic
+		do
+			[[ -f "$script" ]] && dodoc "${script}"
+		done
+
+		docinto "scripts"
+		for script in "${S}"/scripts/mysql* ; do
+			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+		done
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='perl server static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" > /dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf federated.federated_plugin ; do
+			_disable_test  "$t" "False positives in Gentoo"
+	done
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd > /dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]]; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX%/}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT%/}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]]; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]]; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	echo "USE mysql;" >"${sqltmp}"
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
+	if [ $? -ne 0 ]; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
+		${options} \
+		$(use prefix || echo --user=mysql) \
+		--log-warnings=0 \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile}
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]]; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-07-23 21:52 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2018-07-23 21:52 UTC (permalink / raw
  To: gentoo-commits

commit:     119c1d044f9bbdade0eb3e9f2a5944e20cd7085d
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 23 21:52:04 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Mon Jul 23 21:52:04 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=119c1d04

dev-db/mysql: arm stable wrt bug #655182

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-db/mysql/mysql-5.6.40.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.40.ebuild b/dev-db/mysql/mysql-5.6.40.ebuild
index 0137cb4468e..27a71d0b87a 100644
--- a/dev-db/mysql/mysql-5.6.40.ebuild
+++ b/dev-db/mysql/mysql-5.6.40.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE numa"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 COMMON_DEPEND="numa? ( sys-process/numactl:= )"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-07-23 13:10 Tobias Klausmann
  0 siblings, 0 replies; 393+ messages in thread
From: Tobias Klausmann @ 2018-07-23 13:10 UTC (permalink / raw
  To: gentoo-commits

commit:     115ceb24e93f661d8dba08ec33f2f4db0540b4b3
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 23 13:09:42 2018 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Mon Jul 23 13:09:42 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=115ceb24

dev-db/mysql-5.6.40-r0: alpha stable

Gentoo-Bug: http://bugs.gentoo.org/655182

 dev-db/mysql/mysql-5.6.40.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.40.ebuild b/dev-db/mysql/mysql-5.6.40.ebuild
index ef524a86b44..0137cb4468e 100644
--- a/dev-db/mysql/mysql-5.6.40.ebuild
+++ b/dev-db/mysql/mysql-5.6.40.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE numa"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 COMMON_DEPEND="numa? ( sys-process/numactl:= )"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-07-21  0:09 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-07-21  0:09 UTC (permalink / raw
  To: gentoo-commits

commit:     8b8b5f53cb55008532b58538b266ba84dd019bfe
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 20 22:18:56 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sat Jul 21 00:09:00 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b8b5f53

dev-db/mysql: Add client-libs revisions to 5.5 and 5.6

Package-Manager: Portage-2.3.42, Repoman-2.3.9

 dev-db/mysql/Manifest               |   1 +
 dev-db/mysql/mysql-5.5.60-r1.ebuild | 791 ++++++++++++++++++++++++++++++++++++
 dev-db/mysql/mysql-5.6.40-r1.ebuild | 768 ++++++++++++++++++++++++++++++++++
 3 files changed, 1560 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index f6dff1a6693..f1c2983994f 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -6,3 +6,4 @@ DIST mysql-boost-5.7.22.tar.gz 48985783 BLAKE2B 208d684e038366824de4bfbe87b6761f
 DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
 DIST mysql-extras-20180214-0024Z.tar.bz2 316686 BLAKE2B a893e2975a8062ab236f642d158a7833656942adb31d467b784a9224e7dd87872c3784bb29e93b620a58cd9a835d65248f1a817cdbafa574b5949e2b4262108a SHA512 ad0e81695a70954ad107fe104f9140be24e53d499aed6c123e68e1a062ec5cc90c70f6272fdc014e567794e331301e656ba01b22c2c7a1afaf11e14a9190fb0b
 DIST mysql-extras-20180312-2011Z.tar.bz2 319047 BLAKE2B 1da22a0c763a85a6350122c0c56aef4999279c1ef7cf99bcec28348acc83964eb257bb4340c1a21bdcd3b1eb024b23fa62879bed8679c410d847324cb7e24b82 SHA512 b0aa9fc8fbc050451ef147cee99b00cf10d34a71641837821e78655241f7d79a94fe2efb4cef9a23fe9741e08ada2fc0b58ef3b3663752bc567babfbcaa547c8
+DIST mysql-extras-20180628-0201Z.tar.bz2 322141 BLAKE2B fce35cfea4ffa9860908fcdf440cd0d714c402c42ee2afb22cec9e727971c216310c7db561ca1b37deebb2cea5137fe24f19b491ad500949e3170ccec3de0b13 SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a

diff --git a/dev-db/mysql/mysql-5.5.60-r1.ebuild b/dev-db/mysql/mysql-5.5.60-r1.ebuild
new file mode 100644
index 00000000000..36a1e5f70c4
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.60-r1.ebuild
@@ -0,0 +1,791 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180628-0201Z"
+SUBSLOT="18"
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils flag-o-matic prefix toolchain-funcs user cmake-utils multilib-build
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.5/${P}.tar.gz
+	https://downloads.mysql.com/archives/MySQL-5.5/${P}.tar.gz"
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://mysql.com/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="0/${SUBSLOT:-0}"
+IUSE="bindist client-libs debug extraengine jemalloc latin1 libressl
+	+perl profiling selinux +server	static static-libs systemtap tcmalloc
+	test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+	static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
+	inherit git-r3
+	EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+else
+	MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}/01050_all_mysql_config_cleanup-5.5.patch"
+	"${MY_PATCH_DIR}/02040_all_embedded-library-shared-5.5.10.patch"
+	"${MY_PATCH_DIR}/20001_all_fix-minimal-build-cmake-mysql-5.5.41.patch"
+	"${MY_PATCH_DIR}/20002_all_mysql-va-list.patch"
+	"${MY_PATCH_DIR}/20006_all_cmake_elib-mysql-5.5.53.patch"
+	"${MY_PATCH_DIR}/20007_all_cmake-debug-werror-5.6.22.patch"
+	"${MY_PATCH_DIR}/20008_all_mysql-tzinfo-symlink-5.6.37.patch"
+	"${MY_PATCH_DIR}/20009_all_mysql_myodbc_symbol_fix-5.5.38.patch"
+	"${MY_PATCH_DIR}/20018_all_mysql-5.5.60-without-clientlibs-tools.patch"
+	"${MY_PATCH_DIR}/20027_all_mysql-5.5-perl5.26-includes.patch"
+	"${MY_PATCH_DIR}/20030_all_mysql-5.5-fix-client-mysql-type.patch"
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	kernel_linux? (
+		sys-process/procps:0=
+		dev-libs/libaio:0=
+	)
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	jemalloc? ( dev-libs/jemalloc:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	!yassl? (
+		!libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
+		libressl? ( dev-libs/libressl:0= )
+	)
+	>=sys-libs/zlib-1.2.3:0=
+	sys-libs/ncurses:0=
+	!bindist? (
+		>=sys-libs/readline-4.1:0=
+	)
+	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+	static? ( sys-libs/ncurses[static-libs] )
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+	${COMMON_DEPEND}
+	perl? ( !dev-db/mytop
+		virtual/perl-Getopt-Long
+		dev-perl/TermReadKey
+		virtual/perl-Term-ANSIColor
+		virtual/perl-Time-HiRes )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+
+		einfo
+		elog "Be sure to edit the my.cnf file to activate your cluster settings."
+		elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
+		elog "The first time the cluster is activated, you should add"
+		elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
+		elog "This option should then be removed for subsequent starts."
+		einfo
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR%/}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	_disable_engine() {
+		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+	}
+
+	_disable_plugin() {
+		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+	}
+
+	if use tcmalloc; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
+	fi
+
+	if use jemalloc; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
+	fi
+
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	local plugin
+	local server_plugins=( semisync )
+	local test_plugins=( audit_null daemon_example fulltext )
+	if ! use server; then # These plugins are for the server
+		for plugin in "${server_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	if ! use test; then # These plugins are only used during testing
+		for plugin in "${test_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	# Don't build example
+	_disable_engine example
+	_disable_engine ndb
+
+	cmake-utils_src_prepare
+}
+
+src_configure(){
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
+		-DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		-DWITH_ZLIB=system
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+		# The build forces this to be defined when cross-compiling.  We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITHOUT_CLIENTLIBS=YES
+		-DWITH_READLINE=$(usex bindist 1 0)
+		-DENABLE_DTRACE=$(usex systemtap)
+	)
+	if use test ; then
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+	else
+		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+	fi
+
+	if ! use yassl ; then
+		mycmakeargs+=( -DWITH_SSL=system )
+	else
+		mycmakeargs+=( -DWITH_SSL=bundled )
+	fi
+
+	if use server ; then
+
+		# Federated{,X} must be treated special otherwise they will not be built as plugins
+		if ! use extraengine ; then
+			mycmakeargs+=(
+				-DWITHOUT_FEDERATED_STORAGE_ENGINE=1
+				-DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
+		fi
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+		mycmakeargs+=(
+			-DINSTALL_SQLBENCHDIR=share/mysql
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DENABLED_PROFILING=$(usex profiling)
+		)
+
+		if use static; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DEXTRA_CHARSETS=none
+			-DINSTALL_SQLBENCHDIR=
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
+	if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then
+		rm "${ED%/}/usr/include/mysql/server/private/config.h" || die
+	fi
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED%/}/usr/data" ]] ; then
+		rm -Rf "${ED%/}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
+	local mycnf_src="my.cnf-5.5"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR%/}/${mycnf_src}" \
+		> "${TMPDIR%/}/my.cnf.ok" || die
+	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8|latin1|g" \
+			"${TMPDIR%/}/my.cnf.ok" || die
+	fi
+	eprefixify "${TMPDIR%/}/my.cnf.ok"
+	newins "${TMPDIR}/my.cnf.ok" my.cnf
+
+	if use server ; then
+		einfo "Including support files and sample configurations"
+		docinto "support-files"
+		local script
+		for script in \
+			"${S%/}"/support-files/magic
+		do
+			[[ -f "$script" ]] && dodoc "${script}"
+		done
+
+		docinto "scripts"
+		for script in "${S%/}"/scripts/mysql* ; do
+			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+		done
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED%/}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" > /dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.5 for now and are believed to be
+	# false positives:
+	#
+	# main.mysql_client_test, main.mysql_client_test_nonblock
+	# main.mysql_client_test_comp:
+	# segfaults at random under Portage only, suspect resource limits.
+
+	local t
+	for t in main.mysql_client_test main.mysql_client_test_nonblock \
+		main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam \
+		main.mysqlhotcopy_archive main.mysqlhotcopy_myisam main.openssl_1 \
+		rpl.rpl_semi_sync_uninstall_plugin ; do
+			_disable_test  "$t" "False positives in Gentoo"
+	done
+
+	if ! use client-libs ; then
+		_disable_test main.plugin_auth "Needs client libraries built"
+	fi
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd > /dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]]; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+		local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
+	fi
+	if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
+	fi
+	if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR}/mysqld-help"
+	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in grant-tables host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]]; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]]; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
+
+	local cmd=( "${EROOT}usr/share/mysql/scripts/mysql_install_db" )
+	[[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
+	cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR}"/mysql_install_db.log 2>&1
+	if [ $? -ne 0 ]; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT}/usr/sbin/mysqld \
+		${options} \
+		--log-warnings=0 \
+		--basedir=${EROOT}/usr \
+		--datadir=${ROOT}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile}
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]]; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
+	"${EROOT}/usr/bin/mysql" \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	if [[ -n "${sqltmp}" ]] ; then
+		ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+		"${EROOT}/usr/bin/mysql" \
+			"--socket=${socket}" \
+			-hlocalhost \
+			-uroot \
+			--password="${MYSQL_ROOT_PASSWORD}" \
+			mysql < "${sqltmp}"
+		rc=$?
+		eend $?
+		[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+	fi
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}

diff --git a/dev-db/mysql/mysql-5.6.40-r1.ebuild b/dev-db/mysql/mysql-5.6.40-r1.ebuild
new file mode 100644
index 00000000000..38515733ba7
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.40-r1.ebuild
@@ -0,0 +1,768 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180628-0201Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils flag-o-matic prefix toolchain-funcs \
+	user cmake-utils multilib-build
+
+SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
+	https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
+	http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+	SRC_URI="${SRC_URI}
+		mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+		https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
+	+server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+	EGIT_CLONE_TYPE=shallow
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+	MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
+	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+	kernel_linux? (
+		sys-process/procps:0=
+		dev-libs/libaio:0=
+	)
+	net-misc/curl
+	>=sys-apps/sed-4
+	>=sys-apps/texinfo-4.7-r1
+	jemalloc? ( dev-libs/jemalloc:0= )
+	tcmalloc? ( dev-util/google-perftools:0= )
+	systemtap? ( >=dev-util/systemtap-1.3:0= )
+	!yassl? (
+		!libressl? ( >=dev-libs/openssl-1.0.0:0= )
+		libressl? ( dev-libs/libressl:0= )
+	)
+	>=sys-libs/zlib-1.2.3:0=
+	sys-libs/ncurses:0=
+	server? (
+		numa? ( sys-process/numactl )
+	)
+	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+	static? ( sys-libs/ncurses[static-libs] )
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+	${COMMON_DEPEND}
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]] ; then
+		local GCC_MAJOR_SET=$(gcc-major-version)
+		local GCC_MINOR_SET=$(gcc-minor-version)
+		# Bug 565584.  InnoDB now requires atomic functions introduced with gcc-4.7 on
+		# non x86{,_64} arches
+		if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} needs to be built with gcc-4.7 or later."
+			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+			die
+		fi
+	fi
+	if has test ${FEATURES} && \
+		use server && ! has userpriv ${FEATURES} ; then
+			eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	# This should come after all of the die statements
+	enewgroup mysql 60 || die "problem adding 'mysql' group"
+	enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+	# Here we need to see if the implementation switched client libraries
+	# We check if this is a new instance of the package and a client library already exists
+	local SHOW_ABI_MESSAGE libpath
+	if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+		libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+		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 ${libpath}"
+		ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+	fi
+}
+
+pkg_postinst() {
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Create log directory securely if it does not exist
+	[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+	if use server ; then
+		if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+			einfo
+			elog "You might want to run:"
+			elog "\"emerge --config =${CATEGORY}/${PF}\""
+			elog "if this is a new install."
+			elog
+			elog "If you are switching server implentations, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		else
+			einfo
+			elog "If you are upgrading major versions, you should run the"
+			elog "mysql_upgrade tool."
+			einfo
+		fi
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+	_disable_engine() {
+		echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+	}
+
+	_disable_plugin() {
+		echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+	}
+
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	if use tcmalloc; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+	if [[ -d "${S}/support-files/SELinux" ]] ; then
+		echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+	fi
+
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+	local plugin
+	local server_plugins=( semisync )
+	local test_plugins=( audit_null daemon_example fulltext )
+	if ! use server; then # These plugins are for the server
+		for plugin in "${server_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	if ! use test; then # These plugins are only used during testing
+		for plugin in "${test_plugins[@]}" ; do
+			_disable_plugin "${plugin}"
+		done
+	fi
+
+	# Don't build example
+	_disable_engine example
+	_disable_engine ndb
+	_disable_plugin innodb_memcached
+
+	cmake-utils_src_prepare
+}
+
+src_configure(){
+	# bug 508724 mariadb cannot use ld.gold
+	tc-ld-disable-gold
+	# Bug #114895, bug #110149
+	filter-flags "-O" "-O[01]"
+
+	append-cxxflags -felide-constructors
+
+	# bug #283926, with GCC4.4, this is required to get correct behavior.
+	append-flags -fno-strict-aliasing
+
+	CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+	# debug hack wrt #497532
+	mycmakeargs=(
+		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
+		-DINSTALL_BINDIR=bin
+		-DINSTALL_DOCDIR=share/doc/${PF}
+		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
+		-DINSTALL_INCLUDEDIR=include/mysql
+		-DINSTALL_INFODIR=share/info
+		-DINSTALL_LIBDIR=$(get_libdir)
+		-DINSTALL_MANDIR=share/man
+		-DINSTALL_MYSQLSHAREDIR=share/mysql
+		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+		-DINSTALL_SCRIPTDIR=share/mysql/scripts
+		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+		-DINSTALL_SBINDIR=sbin
+		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+		-DWITH_UNIT_TESTS=$(usex test ON OFF)
+		### TODO: make this system but issues with UTF-8 prevent it
+		-DWITH_EDITLINE=bundled
+		-DWITH_ZLIB=system
+		-DWITH_LIBWRAP=0
+		-DENABLED_LOCAL_INFILE=1
+		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+		-DWITH_DEFAULT_COMPILER_OPTIONS=0
+		-DWITH_DEFAULT_FEATURE_SET=0
+		# The build forces this to be defined when cross-compiling.  We pass it
+		# all the time for simplicity and to make sure it is actually correct.
+		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+		-DWITH_LIBEVENT=NO
+		-DWITHOUT_CLIENTLIBS=YES
+		-DENABLE_DTRACE=$(usex systemtap)
+		-DWITH_SSL=$(usex yassl bundled system)
+		-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
+		-DWITHOUT_VALIDATE_PASSWORD=1
+	)
+
+	if use server ; then
+
+		if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
+			ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+			ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+			ewarn "You MUST file bugs without these variables set."
+
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+				-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+			)
+
+		elif ! use latin1 ; then
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=utf8
+				-DDEFAULT_COLLATION=utf8_general_ci
+			)
+		else
+			mycmakeargs+=(
+				-DDEFAULT_CHARSET=latin1
+				-DDEFAULT_COLLATION=latin1_swedish_ci
+			)
+		fi
+		mycmakeargs+=(
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DEXTRA_CHARSETS=all
+			-DDISABLE_SHARED=$(usex static YES NO)
+			-DWITH_DEBUG=$(usex debug)
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DENABLED_PROFILING=$(usex profiling)
+		)
+
+		if use static; then
+			mycmakeargs+=( -DWITH_PIC=1 )
+		fi
+
+		# Storage engines
+		mycmakeargs+=(
+			-DWITH_ARCHIVE_STORAGE_ENGINE=1
+			-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+			-DWITH_CSV_STORAGE_ENGINE=1
+			-DWITH_HEAP_STORAGE_ENGINE=1
+			-DWITH_INNOBASE_STORAGE_ENGINE=1
+			-DWITH_MYISAMMRG_STORAGE_ENGINE=1
+			-DWITH_MYISAM_STORAGE_ENGINE=1
+			-DWITH_PARTITION_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+		)
+
+	else
+		mycmakeargs+=(
+			-DWITHOUT_SERVER=1
+			-DWITH_EMBEDDED_SERVER=OFF
+			-DEXTRA_CHARSETS=none
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# Kill old libmysqclient_r symlinks if they exist.  Time to fix what depends on them.
+	find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	# Convenience links
+	einfo "Making Convenience links for mysqlcheck multi-call binary"
+	dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+	dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+	dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+	# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+	if [[ -d "${ED}/usr/data" ]] ; then
+		rm -Rf "${ED}/usr/data" || die
+	fi
+
+	# Unless they explicitly specific USE=test, then do not install the
+	# testsuite. It DOES have a use to be installed, esp. when you want to do a
+	# validation of your database configuration after tuning it.
+	if ! use test ; then
+		rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
+	local mycnf_src="my.cnf-5.6"
+	sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+		"${FILESDIR%/}/${mycnf_src}" \
+		> "${TMPDIR%/}/my.cnf.ok" || die
+	use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
+	if use latin1 ; then
+		sed -i \
+			-e "/character-set/s|utf8|latin1|g" \
+			"${TMPDIR%/}/my.cnf.ok" || die
+	fi
+	eprefixify "${TMPDIR%/}/my.cnf.ok"
+	newins "${TMPDIR}/my.cnf.ok" my.cnf
+
+	if use server ; then
+		einfo "Including support files and sample configurations"
+		docinto "support-files"
+		local script
+		for script in \
+			"${S}"/support-files/magic
+		do
+			[[ -f "$script" ]] && dodoc "${script}"
+		done
+
+		docinto "scripts"
+		for script in "${S}"/scripts/mysql* ; do
+			[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+		done
+	fi
+
+	#Remove mytop if perl is not selected
+	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='perl server static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	_disable_test() {
+		local rawtestname reason
+		rawtestname="${1}" ; shift
+		reason="${@}"
+		ewarn "test '${rawtestname}' disabled: '${reason}'"
+		echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+	}
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+	has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# Run CTest (test-units)
+	cmake-utils_src_test
+	retstatus_unit=$?
+
+	# Ensure that parallel runs don't die
+	export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+	# Enable parallel testing, auto will try to detect number of cores
+	# You may set this by hand.
+	# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+	export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+	# create directories because mysqladmin might run out of order
+	mkdir -p "${T}"/var-tests{,/log} || die
+
+	# Run mysql tests
+	pushd "${TESTDIR}" > /dev/null || die
+
+	touch "${T}/disabled.def"
+	# These are failing in MySQL 5.7 for now and are believed to be
+	# false positives:
+	#
+	local t
+
+	for t in auth_sec.keyring_udf federated.federated_plugin ; do
+			_disable_test  "$t" "False positives in Gentoo"
+	done
+
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+	retstatus_tests=$?
+
+	popd > /dev/null || die
+
+	# Cleanup is important for these testcases.
+	pkill -9 -f "${S}/ndb" 2>/dev/null
+	pkill -9 -f "${S}/sql" 2>/dev/null
+
+	local failures=""
+	[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+	[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+	[[ -z "$failures" ]] || die "Test failures: $failures"
+	einfo "Tests successfully completed"
+}
+
+mysql_init_vars() {
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+	if [[ -z "${MY_DATADIR}" ]] ; then
+		MY_DATADIR=""
+		if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+			MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+			if [[ -z "${MY_DATADIR}" ]] ; then
+				MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+				| sed -e 's/.*=\s*//' \
+				| tail -n1`
+			fi
+		fi
+		if [[ -z "${MY_DATADIR}" ]] ; then
+			MY_DATADIR="${MY_LOCALSTATEDIR}"
+			einfo "Using default MY_DATADIR"
+		fi
+		elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+		if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+			if [[ -e "${MY_DATADIR}" ]] ; then
+				# If you get this and you're wondering about it, see bug #207636
+				elog "MySQL datadir found in ${MY_DATADIR}"
+				elog "A new one will not be created."
+				PREVIOUS_DATADIR="yes"
+			else
+				PREVIOUS_DATADIR="no"
+			fi
+			export PREVIOUS_DATADIR
+		fi
+	else
+		if [[ ${EBUILD_PHASE} == "config" ]]; then
+			local new_MY_DATADIR
+			new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+				| sed -ne '/datadir/s|^--datadir=||p' \
+				| tail -n1`
+
+			if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+				ewarn "MySQL MY_DATADIR has changed"
+				ewarn "from ${MY_DATADIR}"
+				ewarn "to ${new_MY_DATADIR}"
+				MY_DATADIR="${new_MY_DATADIR}"
+			fi
+		fi
+	fi
+
+	export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+	export MY_LOCALSTATEDIR MY_LOGDIR
+	export MY_DATADIR
+}
+
+pkg_config() {
+	_getoptval() {
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+		local section="$1"
+		local flag="--${2}="
+		local extra_options="${3}"
+		"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+	}
+	local old_MY_DATADIR="${MY_DATADIR}"
+	local old_HOME="${HOME}"
+	# my_print_defaults needs to read stuff in $HOME/.my.cnf
+	export HOME=${EPREFIX%/}/root
+
+	# Make sure the vars are correctly initialized
+	mysql_init_vars
+
+	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+		die "Minimal builds do NOT include the MySQL server"
+	fi
+
+	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+				ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+			else
+				elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+				mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+				|| die "Moving MY_DATADIR failed"
+			fi
+		else
+			ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+			if [[ -d "${MY_DATADIR_s}" ]]; then
+				ewarn "Attempting to use ${MY_DATADIR_s}"
+			else
+				eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+				die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+			fi
+		fi
+	fi
+
+	local pwd1="a"
+	local pwd2="b"
+	local maxtry=15
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+		local tmp_mysqld_password_source=
+
+		for tmp_mysqld_password_source in mysql client; do
+			einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+			if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
+				if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
+					ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+					MYSQL_ROOT_PASSWORD=
+					continue
+				fi
+
+				einfo "Found password in '${tmp_mysqld_password_source}' section!"
+				break
+			fi
+		done
+
+		# Sometimes --show is required to display passwords in some implementations of my_print_defaults
+		if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
+			MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+		fi
+
+		unset tmp_mysqld_password_source
+	fi
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	# These are dir+prefix
+	MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+	MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
+		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
+		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+	fi
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
+		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+	fi
+
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+
+		einfo "Please provide a password for the mysql 'root' user now"
+		einfo "or through the ${HOME}/.my.cnf file."
+		ewarn "Avoid [\"'\\_%] characters in the password"
+		read -rsp "    >" pwd1 ; echo
+
+		einfo "Retype the password"
+		read -rsp "    >" pwd2 ; echo
+
+		if [[ "x$pwd1" != "x$pwd2" ]] ; then
+			die "Passwords are not the same"
+		fi
+		MYSQL_ROOT_PASSWORD="${pwd1}"
+		unset pwd1 pwd2
+	fi
+
+	local options
+	local sqltmp="$(emktemp)"
+
+	# Fix bug 446200. Don't reference host my.cnf, needs to come first,
+	# see http://bugs.mysql.com/bug.php?id=31312
+	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+
+	# Figure out which options we need to disable to do the setup
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
+		federated ssl log-bin relay-log slow-query-log external-locking \
+		log-slave-updates \
+		; do
+		optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+		egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
+	done
+
+	einfo "Creating the mysql database and setting proper permissions on it ..."
+
+	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+	PID_DIR="${EROOT%/}/var/run/mysqld"
+	if [[ ! -d "${PID_DIR}" ]]; then
+		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+	fi
+
+	if [[ ! -d "${MY_DATADIR}" ]]; then
+		install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+	fi
+
+	pushd "${TMPDIR}" &>/dev/null || die
+
+	# Filling timezones, see
+	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+	echo "USE mysql;" >"${sqltmp}"
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
+
+	# --initialize-insecure will not set root password
+	# --initialize would set a random one in the log which we don't need as we set it ourselves
+	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+	einfo "Command: ${cmd[*]}"
+	su -s /bin/sh -c "${cmd[*]}" mysql \
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
+	if [ $? -ne 0 ]; then
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+	|| die "MySQL databases not installed"
+
+	use prefix || options="${options} --user=mysql"
+
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
+		${options} \
+		$(use prefix || echo --user=mysql) \
+		--log-warnings=0 \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile}
+		--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+	#einfo "About to start mysqld: ${mysqld}"
+	ebegin "Starting mysqld"
+	einfo "Command ${mysqld}"
+	${mysqld} &
+	rc=$?
+	while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+		maxtry=$((${maxtry}-1))
+		echo -n "."
+		sleep 1
+	done
+	eend $rc
+
+	if ! [[ -S "${socket}" ]]; then
+		die "Completely failed to start up mysqld with: ${mysqld}"
+	fi
+
+	ebegin "Setting root password"
+	# Do this from memory, as we don't want clear text passwords in temp files
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
+		"--socket=${socket}" \
+		-hlocalhost \
+		-e "${sql}"
+	eend $?
+
+	# Stop the server and cleanup
+	einfo "Stopping the server ..."
+	kill $(< "${pidfile}" )
+	rm -f "${sqltmp}"
+	wait %1
+	einfo "Done"
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-07-20 22:40 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-07-20 22:40 UTC (permalink / raw
  To: gentoo-commits

commit:     ed5c2220ea48b9491aa734676fa6e2fcd9f0b938
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 20 22:36:48 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Jul 20 22:36:48 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed5c2220

dev-db/mysql: x86 stable (bug #655182)

Package-Manager: Portage-2.3.43, Repoman-2.3.10

 dev-db/mysql/mysql-5.6.40.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.40.ebuild b/dev-db/mysql/mysql-5.6.40.ebuild
index 15e9e97ed41..ef524a86b44 100644
--- a/dev-db/mysql/mysql-5.6.40.ebuild
+++ b/dev-db/mysql/mysql-5.6.40.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE numa"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 COMMON_DEPEND="numa? ( sys-process/numactl:= )"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-07-19 14:10 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2018-07-19 14:10 UTC (permalink / raw
  To: gentoo-commits

commit:     6c13ee5cf6afc12e10261edfcf65ee955d9159d3
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 19 14:10:01 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Thu Jul 19 14:10:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c13ee5c

dev-db/mysql: amd64 stable wrt bug #655182

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-db/mysql/mysql-5.6.40.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.40.ebuild b/dev-db/mysql/mysql-5.6.40.ebuild
index 572d880ca1c..15e9e97ed41 100644
--- a/dev-db/mysql/mysql-5.6.40.ebuild
+++ b/dev-db/mysql/mysql-5.6.40.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE numa"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 COMMON_DEPEND="numa? ( sys-process/numactl:= )"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-06-25  2:03 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-06-25  2:03 UTC (permalink / raw
  To: gentoo-commits

commit:     dc4a3e50b1361db2297faba36b87ed9101c8bae3
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 25 01:52:35 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Jun 25 02:02:52 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc4a3e50

dev-db/mysql: Reorder dependencies on 5.7.22

The transitional dependency is brought in at the wrong time
causing a status message to be skipped for rebuilding.

Does not affect installed machines

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-db/mysql/mysql-5.7.22.ebuild | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.22.ebuild b/dev-db/mysql/mysql-5.7.22.ebuild
index 324706b4ef9..3c0a0ac7c38 100644
--- a/dev-db/mysql/mysql-5.7.22.ebuild
+++ b/dev-db/mysql/mysql-5.7.22.ebuild
@@ -93,13 +93,13 @@ COMMON_DEPEND="
 		>=dev-libs/boost-1.65.0:=
 		numa? ( sys-process/numactl )
 	)
+	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
 "
 DEPEND="virtual/yacc
 	static? ( sys-libs/ncurses[static-libs] )
 	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
 	${COMMON_DEPEND}"
 RDEPEND="selinux? ( sec-policy/selinux-mysql )
-	abi_x86_32? ( !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] )
 	client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
 	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
@@ -107,8 +107,7 @@ RDEPEND="selinux? ( sec-policy/selinux-mysql )
 "
 # For other stuff to bring us in
 # dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
-	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )"
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
 
 pkg_setup() {
 	if [[ ${MERGE_TYPE} != binary ]] ; then


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-06-24  1:11 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-06-24  1:11 UTC (permalink / raw
  To: gentoo-commits

commit:     a9239b1ab87cd603c822d966cfc8346084ee12d9
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 24 01:10:33 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun Jun 24 01:11:21 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9239b1a

dev-db/mysql: Remove unused build option

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-db/mysql/mysql-5.7.22.ebuild | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.22.ebuild b/dev-db/mysql/mysql-5.7.22.ebuild
index 58394d6071f..324706b4ef9 100644
--- a/dev-db/mysql/mysql-5.7.22.ebuild
+++ b/dev-db/mysql/mysql-5.7.22.ebuild
@@ -347,10 +347,6 @@ multilib_src_configure() {
 			mycmakeargs+=( -DWITH_PIC=1 )
 		fi
 
-		if use jemalloc || use tcmalloc ; then
-			mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
-		fi
-
 		# Storage engines
 		mycmakeargs+=(
 			-DWITH_EXAMPLE_STORAGE_ENGINE=0


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-05-19  2:35 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-05-19  2:35 UTC (permalink / raw
  To: gentoo-commits

commit:     861d31197c4cb91f2e29c8992febc371cd55e602
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sat May 19 02:34:54 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sat May 19 02:35:30 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=861d3119

dev-db/mysql: Fine tune pkg_config in 5.7.22

Hank Leininger noticed there were errors in the new 5.7 pkg_config

I took 2 of his suggestions but used a more standard password
setting method which will work in future versions.

Also prep for EAPI 7 paths in pkg_config

Closes: https://bugs.gentoo.org/656084
Package-Manager: Portage-2.3.37, Repoman-2.3.9

 dev-db/mysql/mysql-5.7.22.ebuild | 73 +++++++++++++++++++++-------------------
 1 file changed, 38 insertions(+), 35 deletions(-)

diff --git a/dev-db/mysql/mysql-5.7.22.ebuild b/dev-db/mysql/mysql-5.7.22.ebuild
index 8ff8a60d64c..58394d6071f 100644
--- a/dev-db/mysql/mysql-5.7.22.ebuild
+++ b/dev-db/mysql/mysql-5.7.22.ebuild
@@ -566,10 +566,10 @@ src_test() {
 }
 
 mysql_init_vars() {
-	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
-	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
-	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
-	MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+	MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+	MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+	MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+	MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
 
 	if [[ -z "${MY_DATADIR}" ]] ; then
 		MY_DATADIR=""
@@ -623,7 +623,7 @@ mysql_init_vars() {
 
 pkg_config() {
 	_getoptval() {
-		local mypd="${EROOT}"/usr/bin/my_print_defaults
+		local mypd="${EROOT%/}"/usr/bin/my_print_defaults
 		local section="$1"
 		local flag="--${2}="
 		local extra_options="${3}"
@@ -632,20 +632,20 @@ pkg_config() {
 	local old_MY_DATADIR="${MY_DATADIR}"
 	local old_HOME="${HOME}"
 	# my_print_defaults needs to read stuff in $HOME/.my.cnf
-	export HOME=${EPREFIX}/root
+	export HOME=${EPREFIX%/}/root
 
 	# Make sure the vars are correctly initialized
 	mysql_init_vars
 
 	[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
-	if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
+	if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
 		die "Minimal builds do NOT include the MySQL server"
 	fi
 
 	if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
-		local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
+		local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
 		MY_DATADIR_s="${MY_DATADIR_s%%/}"
-		local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
+		local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
 		old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
 
 		if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
@@ -704,22 +704,22 @@ pkg_config() {
 	MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
 	MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
 
-	if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
+	if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
 		einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
-		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
 	fi
-	if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
+	if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
 		einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
-		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
 	fi
-	if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
+	if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
 		einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
-		install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
+		install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
 	fi
 
-	if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
+	if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
 		ewarn "You have already a MySQL database in place."
-		ewarn "(${ROOT}/${MY_DATADIR}/*)"
+		ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
 		ewarn "Please rename or delete it if you wish to replace it."
 		die "MySQL database already exists!"
 	fi
@@ -753,9 +753,9 @@ pkg_config() {
 	use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
 
 	# Figure out which options we need to disable to do the setup
-	local helpfile="${TMPDIR}/mysqld-help"
-	"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
-	for opt in grant-tables host-cache name-resolve networking slave-start \
+	local helpfile="${TMPDIR%/}/mysqld-help"
+	"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+	for opt in host-cache name-resolve networking slave-start \
 		federated ssl log-bin relay-log slow-query-log external-locking \
 		log-slave-updates \
 		; do
@@ -766,7 +766,7 @@ pkg_config() {
 	einfo "Creating the mysql database and setting proper permissions on it ..."
 
 	# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
-	PID_DIR="${EROOT}/var/run/mysqld"
+	PID_DIR="${EROOT%/}/var/run/mysqld"
 	if [[ ! -d "${PID_DIR}" ]]; then
 		install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
 	fi
@@ -779,33 +779,35 @@ pkg_config() {
 
 	# Filling timezones, see
 	# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
-	"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
+	echo "USE mysql;" >"${sqltmp}"
+	"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+	chown mysql "${sqltmp}" || die
 
 	# --initialize-insecure will not set root password
 	# --initialize would set a random one in the log which we don't need as we set it ourselves
-	local cmd=( "${EROOT}usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
-	cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
+	local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+	cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
 	einfo "Command: ${cmd[*]}"
 	su -s /bin/sh -c "${cmd[*]}" mysql \
-		>"${TMPDIR}"/mysql_install_db.log 2>&1
+		>"${TMPDIR%/}"/mysql_install_db.log 2>&1
 	if [ $? -ne 0 ]; then
-		grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
-		die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
+		grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+		die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
 	fi
 	popd &>/dev/null || die
-	[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
+	[[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
 	|| die "MySQL databases not installed"
 
 	use prefix || options="${options} --user=mysql"
 
-	local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
-	local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
-	local mysqld="${EROOT}/usr/sbin/mysqld \
+	local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+	local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+	local mysqld="${EROOT%/}/usr/sbin/mysqld \
 		${options} \
 		$(use prefix || echo --user=mysql) \
 		--log-warnings=0 \
-		--basedir=${EROOT}/usr \
-		--datadir=${ROOT}/${MY_DATADIR} \
+		--basedir=${EROOT%/}/usr \
+		--datadir=${ROOT%/}/${MY_DATADIR} \
 		--max_allowed_packet=8M \
 		--net_buffer_length=16K \
 		--socket=${socket} \
@@ -829,8 +831,9 @@ pkg_config() {
 
 	ebegin "Setting root password"
 	# Do this from memory, as we don't want clear text passwords in temp files
-	local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
-	"${EROOT}/usr/bin/mysql" \
+	local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+	"${EROOT%/}/usr/bin/mysql" \
+		--no-defaults \
 		"--socket=${socket}" \
 		-hlocalhost \
 		-e "${sql}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-05-15 17:41 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-05-15 17:41 UTC (permalink / raw
  To: gentoo-commits

commit:     89c72da31f344be04175cdd7bf7aab2308cf8f24
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue May 15 17:40:31 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue May 15 17:41:37 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89c72da3

dev-db/mysql: Keyword ~s390 for 5.7.22

Package-Manager: Portage-2.3.36, Repoman-2.3.9

 dev-db/mysql/mysql-5.7.22.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.22.ebuild b/dev-db/mysql/mysql-5.7.22.ebuild
index c833881e7bc..8ff8a60d64c 100644
--- a/dev-db/mysql/mysql-5.7.22.ebuild
+++ b/dev-db/mysql/mysql-5.7.22.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
 
 REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
 
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # Shorten the path because the socket path length must be shorter than 107 chars
 # and we will run a mysql server during test phase


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-05-13 18:42 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-05-13 18:42 UTC (permalink / raw
  To: gentoo-commits

commit:     78dee489e8a8231af20c7ef39afc48f6cdb883f4
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sun May 13 18:42:20 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun May 13 18:42:50 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78dee489

dev-db/mysql: Drop vulnerable versions

Package-Manager: Portage-2.3.36, Repoman-2.3.9

 dev-db/mysql/Manifest               |   5 -
 dev-db/mysql/mysql-5.5.59.ebuild    | 133 --------------------------
 dev-db/mysql/mysql-5.6.36-r1.ebuild | 177 ----------------------------------
 dev-db/mysql/mysql-5.6.37-r1.ebuild | 183 ------------------------------------
 4 files changed, 498 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 1898552af52..f6dff1a6693 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,13 +1,8 @@
-DIST mysql-5.5.59.tar.gz 21050313 BLAKE2B 2a17307caf1fe00f8be6662e85e55a1cf8a0f6d1a00e0d26970bdd04dd2f92bd7e7c5e1f7a19d311ce0b59cb5f40434d605b3c276ab60ef1e94a99c6148f6b36 SHA512 18abca4a607d7f7ad90e9adb989c665302ee85e264f298fdc3591c4d9cd85a2486f1b402aea1ac3672506d1433eb1f3a246da5e4abd04dc41344ed9fed5ef0ae
 DIST mysql-5.5.60.tar.gz 21025041 BLAKE2B c4010c64b30ca72aff011053189981cc0676806ed9f18a0ac584e07f71e1f7fe062a3ca78db6f109a2b96d324d778b239880f96852fdc058892b09d0d09e740b SHA512 734395f3ce2c12e7703fe48d5bb2ce85ff8d7f04ae51cbe2d04a46b72b9689f804e5b498ae0b4722b0c098e2eed43d4f93b622964059525e6d9d14a47d55f775
-DIST mysql-5.6.36.tar.gz 32192348 BLAKE2B 8ccb7d85ff7255832f8f304a173d6ad436362f36f59f58b5772e0623a4c250c19f0d67a65bee4cc8f6815088559c20e3b80f07443666e85753b164b82a9c0362 SHA512 b3e3bcb1d1e913994f274f4c6dc72c77f1f52b132389e784c675d1720b5913788ce035f045b99ef3754d1b257db55e8300b5c7622ec79c33afafec5968801c18
-DIST mysql-5.6.37.tar.gz 32200158 BLAKE2B be64aca7e3a831fbdb737a6628e87dcea195bfee01228cc05858ef855a2eb41355456cf6e516fca77a5e4a96381248360a2e79e87fea5b649bd06dd3cad6976f SHA512 6935cf11490fb32832468e2a69a9d81a567b1b4ab0afaa0614896e3ddbb95a74b26406284f307637e4b2b9620ef4d96a167128ce7fcb1d338b0ebbc2cef2e597
 DIST mysql-5.6.38.tar.gz 32197625 BLAKE2B 5edd6d05e562568d2418edd81c6822b397103013e92beacc00964401c6df67f8a934f05b57c6679aa25a49ef6db2e4a06056f3f1850e0f2afe4de895c7b8f686 SHA512 8144aec822f053fbdfa11ae542e96d3e7da93552b60ed131f041ec4832f48c95025b322340a2e90a82c18b6ee6bfd708f209735f82e37532198245aad697b93d
 DIST mysql-5.6.39.tar.gz 32110958 BLAKE2B 2f279c6745bc995c860bb4f2868409136e112cc8b9fb0c04fa7673bb6d5612f3ef6d3462666de736d6e7fe5439275ab49908a6609175d1cb8c096d5db5ecb59c SHA512 e1e60854c82d71f9600bf611df964f441815d9d0f896134110a749b29fe340fa216d7c89f4da63d492929565f19a2502463549b8c8c038c658e0be8409a3ffb5
 DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c
 DIST mysql-boost-5.7.22.tar.gz 48985783 BLAKE2B 208d684e038366824de4bfbe87b6761f91d05fc5cd46cfa89eb627025fb726efe2d7a08a8ce252fed369e399d2d4921bb93c446a296b617320c53ce351fc17c2 SHA512 186c9e9735114e312c65531c70e6b0b9b48b0fe14384b7a6ebfac2c1f91c3f4ac223d06e27a424fc75f57e0aaf2f74d6a8411a8ab9c6fed45c499068d0f1dc2a
-DIST mysql-extras-20170302-1359Z.tar.bz2 306816 BLAKE2B 7ac3d79f265916306ba8dd0a8ac16f5c4673baf9f910e21aedcc460b028fee674faabad470984e4830256f6218a7c61f31f6155e808d8a2dd4772a1c8bb72d3d SHA512 2c096c68e0d545c98fb5520f92b9e85f6bbc910853793f60f0e67979ee927410bbecadece3400364fdc2b5682f9105664f6a2de8fa0ee1818fb266e063e82869
-DIST mysql-extras-20170719-1335Z.tar.bz2 311350 BLAKE2B 4ee604de76d9da004c7cb9f84e7e4112c0cdab3b18a82923ad5bcb880377813f85e369697d84b37ed2fd9cd26b160d4616bfb7d1dba3bfe0b6bbc296e0edd5ea SHA512 3450725b4cdcf1e330aee775c1c169510bd7f06f19b874a3e94203227d393b136165eca1e77270bfc37c534f4120aeeeb3df8fbd71704312836b79a99d81a122
 DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
 DIST mysql-extras-20180214-0024Z.tar.bz2 316686 BLAKE2B a893e2975a8062ab236f642d158a7833656942adb31d467b784a9224e7dd87872c3784bb29e93b620a58cd9a835d65248f1a817cdbafa574b5949e2b4262108a SHA512 ad0e81695a70954ad107fe104f9140be24e53d499aed6c123e68e1a062ec5cc90c70f6272fdc014e567794e331301e656ba01b22c2c7a1afaf11e14a9190fb0b
 DIST mysql-extras-20180312-2011Z.tar.bz2 319047 BLAKE2B 1da22a0c763a85a6350122c0c56aef4999279c1ef7cf99bcec28348acc83964eb257bb4340c1a21bdcd3b1eb024b23fa62879bed8679c410d847324cb7e24b82 SHA512 b0aa9fc8fbc050451ef147cee99b00cf10d34a71641837821e78655241f7d79a94fe2efb4cef9a23fe9741e08ada2fc0b58ef3b3663752bc567babfbcaa547c8

diff --git a/dev-db/mysql/mysql-5.5.59.ebuild b/dev-db/mysql/mysql-5.5.59.ebuild
deleted file mode 100644
index 881a4ffb831..00000000000
--- a/dev-db/mysql/mysql-5.5.59.ebuild
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-MY_EXTRAS_VER="20180214-0024Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-#fails to build with ninja
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-SLOT="0/18"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test main.openssl_1 \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		for t in main.mysql main.mysql_upgrade ; do
-			mysql-v2_disable_test  "$t" "Test $t broken upstream - error return value not updated"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.36-r1.ebuild b/dev-db/mysql/mysql-5.6.36-r1.ebuild
deleted file mode 100644
index 41dc65de432..00000000000
--- a/dev-db/mysql/mysql-5.6.36-r1.ebuild
+++ /dev/null
@@ -1,177 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-MY_EXTRAS_VER="20170302-1359Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
-	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
-	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
-)
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		#
-		# main.events_2
-		# Fails on date in past without preserve causing the drop to fail
-
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-			main.events_2 \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.37-r1.ebuild b/dev-db/mysql/mysql-5.6.37-r1.ebuild
deleted file mode 100644
index 57e2e56845b..00000000000
--- a/dev-db/mysql/mysql-5.6.37-r1.ebuild
+++ /dev/null
@@ -1,183 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-MY_EXTRAS_VER="20170719-1335Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-#fails to build with ninja
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
-	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
-	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
-)
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		#
-		# main.events_2
-		# Fails on date in past without preserve causing the drop to fail
-
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-			main.events_2 \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		for t in main.mysql main.mysql_upgrade ; do
-			mysql-multilib-r1_disable_test  "$t" "Test $t broken upstream - error return value not updated"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-04-24 23:52 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-04-24 23:52 UTC (permalink / raw
  To: gentoo-commits

commit:     117ed33b53961e74666b5aca7140fb41d7494f2a
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 24 23:52:07 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Apr 24 23:52:07 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=117ed33b

dev-db/mysql: Fix USE=-server on 5.7.22

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 dev-db/mysql/mysql-5.7.22.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.7.22.ebuild b/dev-db/mysql/mysql-5.7.22.ebuild
index 5e447c16666..c833881e7bc 100644
--- a/dev-db/mysql/mysql-5.7.22.ebuild
+++ b/dev-db/mysql/mysql-5.7.22.ebuild
@@ -207,6 +207,8 @@ src_prepare() {
 			"${S}/cmake/ssl.cmake" || die
 	fi
 
+	sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
 	cmake-utils_src_prepare
 }
 
@@ -273,6 +275,7 @@ multilib_src_configure() {
 		-DWITH_RAPID=OFF
 		-DWITH_LIBEVENT=NO
 		-DWITH_CURL=system
+		-DWITH_BOOST="${S}/boost"
 	)
 	if use test ; then
 		mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
@@ -307,7 +310,6 @@ multilib_src_configure() {
 	if multilib_is_native_abi && use server ; then
 
 		mycmakeargs+=(
-			-DWITH_BOOST="${S}/boost"
 			-DWITH_LZ4=system
 			-DWITH_NUMA=$(usex numa ON OFF)
 		)


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-04-22  1:10 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-04-22  1:10 UTC (permalink / raw
  To: gentoo-commits

commit:     e05c6bfa3bc06bef90c2488b6a761e605e9d98f0
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 21 16:52:59 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun Apr 22 01:10:02 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e05c6bfa

dev-db/mysql: Version bump to 5.6.40

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.6.40.ebuild | 193 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 194 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index b03d19f987f..88a5fda98ef 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -4,6 +4,7 @@ DIST mysql-5.6.36.tar.gz 32192348 BLAKE2B 8ccb7d85ff7255832f8f304a173d6ad436362f
 DIST mysql-5.6.37.tar.gz 32200158 BLAKE2B be64aca7e3a831fbdb737a6628e87dcea195bfee01228cc05858ef855a2eb41355456cf6e516fca77a5e4a96381248360a2e79e87fea5b649bd06dd3cad6976f SHA512 6935cf11490fb32832468e2a69a9d81a567b1b4ab0afaa0614896e3ddbb95a74b26406284f307637e4b2b9620ef4d96a167128ce7fcb1d338b0ebbc2cef2e597
 DIST mysql-5.6.38.tar.gz 32197625 BLAKE2B 5edd6d05e562568d2418edd81c6822b397103013e92beacc00964401c6df67f8a934f05b57c6679aa25a49ef6db2e4a06056f3f1850e0f2afe4de895c7b8f686 SHA512 8144aec822f053fbdfa11ae542e96d3e7da93552b60ed131f041ec4832f48c95025b322340a2e90a82c18b6ee6bfd708f209735f82e37532198245aad697b93d
 DIST mysql-5.6.39.tar.gz 32110958 BLAKE2B 2f279c6745bc995c860bb4f2868409136e112cc8b9fb0c04fa7673bb6d5612f3ef6d3462666de736d6e7fe5439275ab49908a6609175d1cb8c096d5db5ecb59c SHA512 e1e60854c82d71f9600bf611df964f441815d9d0f896134110a749b29fe340fa216d7c89f4da63d492929565f19a2502463549b8c8c038c658e0be8409a3ffb5
+DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c
 DIST mysql-extras-20170302-1359Z.tar.bz2 306816 BLAKE2B 7ac3d79f265916306ba8dd0a8ac16f5c4673baf9f910e21aedcc460b028fee674faabad470984e4830256f6218a7c61f31f6155e808d8a2dd4772a1c8bb72d3d SHA512 2c096c68e0d545c98fb5520f92b9e85f6bbc910853793f60f0e67979ee927410bbecadece3400364fdc2b5682f9105664f6a2de8fa0ee1818fb266e063e82869
 DIST mysql-extras-20170719-1335Z.tar.bz2 311350 BLAKE2B 4ee604de76d9da004c7cb9f84e7e4112c0cdab3b18a82923ad5bcb880377813f85e369697d84b37ed2fd9cd26b160d4616bfb7d1dba3bfe0b6bbc296e0edd5ea SHA512 3450725b4cdcf1e330aee775c1c169510bd7f06f19b874a3e94203227d393b136165eca1e77270bfc37c534f4120aeeeb3df8fbd71704312836b79a99d81a122
 DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda

diff --git a/dev-db/mysql/mysql-5.6.40.ebuild b/dev-db/mysql/mysql-5.6.40.ebuild
new file mode 100644
index 00000000000..572d880ca1c
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.40.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_EXTRAS_VER="20180214-0024Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE numa"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( dev-perl/JSON )"
+RDEPEND="${COMMON_DEPEND}"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
+	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
+)
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+src_configure() {
+	# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+	# disable until we see what happens with it
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 -DWITH_NUMA=$(usex numa ON OFF) )
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='server extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		#
+		# main.events_2
+		# Fails on date in past without preserve causing the drop to fail
+
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+			main.events_2 \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		for t in main.mysql main.mysql_upgrade ; do
+			mysql-multilib-r1_disable_test  "$t" "Test $t broken upstream - error return value not updated"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-04-22  1:10 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-04-22  1:10 UTC (permalink / raw
  To: gentoo-commits

commit:     8369112de2e85f19129a95f2ec52934199ccb1f7
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 21 13:24:29 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun Apr 22 01:10:00 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8369112d

dev-db/mysql: Version bump for 5.5.60

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.5.60.ebuild | 133 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 134 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 97e79509bc4..b03d19f987f 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,5 @@
 DIST mysql-5.5.59.tar.gz 21050313 BLAKE2B 2a17307caf1fe00f8be6662e85e55a1cf8a0f6d1a00e0d26970bdd04dd2f92bd7e7c5e1f7a19d311ce0b59cb5f40434d605b3c276ab60ef1e94a99c6148f6b36 SHA512 18abca4a607d7f7ad90e9adb989c665302ee85e264f298fdc3591c4d9cd85a2486f1b402aea1ac3672506d1433eb1f3a246da5e4abd04dc41344ed9fed5ef0ae
+DIST mysql-5.5.60.tar.gz 21025041 BLAKE2B c4010c64b30ca72aff011053189981cc0676806ed9f18a0ac584e07f71e1f7fe062a3ca78db6f109a2b96d324d778b239880f96852fdc058892b09d0d09e740b SHA512 734395f3ce2c12e7703fe48d5bb2ce85ff8d7f04ae51cbe2d04a46b72b9689f804e5b498ae0b4722b0c098e2eed43d4f93b622964059525e6d9d14a47d55f775
 DIST mysql-5.6.36.tar.gz 32192348 BLAKE2B 8ccb7d85ff7255832f8f304a173d6ad436362f36f59f58b5772e0623a4c250c19f0d67a65bee4cc8f6815088559c20e3b80f07443666e85753b164b82a9c0362 SHA512 b3e3bcb1d1e913994f274f4c6dc72c77f1f52b132389e784c675d1720b5913788ce035f045b99ef3754d1b257db55e8300b5c7622ec79c33afafec5968801c18
 DIST mysql-5.6.37.tar.gz 32200158 BLAKE2B be64aca7e3a831fbdb737a6628e87dcea195bfee01228cc05858ef855a2eb41355456cf6e516fca77a5e4a96381248360a2e79e87fea5b649bd06dd3cad6976f SHA512 6935cf11490fb32832468e2a69a9d81a567b1b4ab0afaa0614896e3ddbb95a74b26406284f307637e4b2b9620ef4d96a167128ce7fcb1d338b0ebbc2cef2e597
 DIST mysql-5.6.38.tar.gz 32197625 BLAKE2B 5edd6d05e562568d2418edd81c6822b397103013e92beacc00964401c6df67f8a934f05b57c6679aa25a49ef6db2e4a06056f3f1850e0f2afe4de895c7b8f686 SHA512 8144aec822f053fbdfa11ae542e96d3e7da93552b60ed131f041ec4832f48c95025b322340a2e90a82c18b6ee6bfd708f209735f82e37532198245aad697b93d

diff --git a/dev-db/mysql/mysql-5.5.60.ebuild b/dev-db/mysql/mysql-5.5.60.ebuild
new file mode 100644
index 00000000000..881a4ffb831
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.60.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+MY_EXTRAS_VER="20180214-0024Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+SLOT="0/18"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test main.openssl_1 \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		for t in main.mysql main.mysql_upgrade ; do
+			mysql-v2_disable_test  "$t" "Test $t broken upstream - error return value not updated"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-03-30 12:03 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2018-03-30 12:03 UTC (permalink / raw
  To: gentoo-commits

commit:     d882cea7259a68ec2ce94fb745112a316784aa51
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 30 12:01:18 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Mar 30 12:01:18 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d882cea7

dev-db/mysql: stable 5.6.39 for ppc64, bug #644986

Package-Manager: Portage-2.3.26, Repoman-2.3.7
RepoMan-Options: --include-arches="ppc64"

 dev-db/mysql/mysql-5.6.39.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.39.ebuild b/dev-db/mysql/mysql-5.6.39.ebuild
index 9df05a4bc7f..a85b1579d4c 100644
--- a/dev-db/mysql/mysql-5.6.39.ebuild
+++ b/dev-db/mysql/mysql-5.6.39.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE numa"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 COMMON_DEPEND="numa? ( sys-process/numactl:= )"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-03-04 16:23 Tobias Klausmann
  0 siblings, 0 replies; 393+ messages in thread
From: Tobias Klausmann @ 2018-03-04 16:23 UTC (permalink / raw
  To: gentoo-commits

commit:     f5fce7fc2ee23c9703e85dc45a9a288ce57a3dac
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  4 16:22:58 2018 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Sun Mar  4 16:22:58 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5fce7fc

dev-db/mysql-5.6.39-r0: alpha stable

Gentoo-Bug: http://bugs.gentoo.org/644986

 dev-db/mysql/mysql-5.6.39.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.39.ebuild b/dev-db/mysql/mysql-5.6.39.ebuild
index ca8aeb2e62a..9df05a4bc7f 100644
--- a/dev-db/mysql/mysql-5.6.39.ebuild
+++ b/dev-db/mysql/mysql-5.6.39.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE numa"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 COMMON_DEPEND="numa? ( sys-process/numactl:= )"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-02-14 12:59 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-02-14 12:59 UTC (permalink / raw
  To: gentoo-commits

commit:     66a1fcc52a5cc33eac1f85d1a966c0a94afa6796
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 14 12:56:24 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Feb 14 12:56:24 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66a1fcc5

dev-db/mysql: x86 stable (bug #644986)

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-db/mysql/mysql-5.6.39.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.39.ebuild b/dev-db/mysql/mysql-5.6.39.ebuild
index 7aa1873de8f..ca8aeb2e62a 100644
--- a/dev-db/mysql/mysql-5.6.39.ebuild
+++ b/dev-db/mysql/mysql-5.6.39.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE numa"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 COMMON_DEPEND="numa? ( sys-process/numactl:= )"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-02-14  0:46 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-02-14  0:46 UTC (permalink / raw
  To: gentoo-commits

commit:     fab7d95b5ac4a012eb99c60e72c02f89308adfc3
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 14 00:44:08 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Feb 14 00:46:47 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fab7d95b

dev-db/mysql: Bump patch set to fix innodb.monitor test

Closes: https://bugs.gentoo.org/645838
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-db/mysql/mysql-5.6.39.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.39.ebuild b/dev-db/mysql/mysql-5.6.39.ebuild
index 70e25842d03..7aa1873de8f 100644
--- a/dev-db/mysql/mysql-5.6.39.ebuild
+++ b/dev-db/mysql/mysql-5.6.39.ebuild
@@ -3,7 +3,7 @@
 
 EAPI="6"
 
-MY_EXTRAS_VER="20171121-1518Z"
+MY_EXTRAS_VER="20180214-0024Z"
 MY_PV="${PV//_alpha_pre/-m}"
 MY_PV="${MY_PV//_/-}"
 HAS_TOOLS_PATCH="1"
@@ -37,6 +37,7 @@ PATCHES=(
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
 	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
 	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
+	"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
 )
 
 # Please do not add a naive src_unpack to this ebuild


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-02-14  0:46 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-02-14  0:46 UTC (permalink / raw
  To: gentoo-commits

commit:     69e9e17149d3232daf4cf16a2ff969516ace1284
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 14 00:30:05 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Feb 14 00:46:45 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69e9e171

dev-db/mysql: Bump patch set to fix compilation problem

Closes: https://bugs.gentoo.org/645894
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-db/mysql/Manifest            | 1 +
 dev-db/mysql/mysql-5.5.59.ebuild | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index baa33a363c9..87a8a8778c1 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -8,3 +8,4 @@ DIST mysql-extras-20170302-1359Z.tar.bz2 306816 BLAKE2B 7ac3d79f265916306ba8dd0a
 DIST mysql-extras-20170719-1335Z.tar.bz2 311350 BLAKE2B 4ee604de76d9da004c7cb9f84e7e4112c0cdab3b18a82923ad5bcb880377813f85e369697d84b37ed2fd9cd26b160d4616bfb7d1dba3bfe0b6bbc296e0edd5ea SHA512 3450725b4cdcf1e330aee775c1c169510bd7f06f19b874a3e94203227d393b136165eca1e77270bfc37c534f4120aeeeb3df8fbd71704312836b79a99d81a122
 DIST mysql-extras-20171018-1948Z.tar.bz2 313540 BLAKE2B fb39cd40af2a013f2e8c71094a14b72f0be6c24c440e17839b447afc01b6a8a3264dec4cfa6973a1e919c96e9cbf6e2bb7d4ed6b0c32502d02dd0d3af316ee1f SHA512 35ba9f3c8462ae188e47f5973e891cbd72e5d742e92fabc09678f93c83bb26337ae11d6fa8400b2a8c5125ba2a771f780e008b7448e3006446b13d3e51adcaba
 DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
+DIST mysql-extras-20180214-0024Z.tar.bz2 316686 BLAKE2B a893e2975a8062ab236f642d158a7833656942adb31d467b784a9224e7dd87872c3784bb29e93b620a58cd9a835d65248f1a817cdbafa574b5949e2b4262108a SHA512 ad0e81695a70954ad107fe104f9140be24e53d499aed6c123e68e1a062ec5cc90c70f6272fdc014e567794e331301e656ba01b22c2c7a1afaf11e14a9190fb0b

diff --git a/dev-db/mysql/mysql-5.5.59.ebuild b/dev-db/mysql/mysql-5.5.59.ebuild
index 9faba7f8feb..881a4ffb831 100644
--- a/dev-db/mysql/mysql-5.5.59.ebuild
+++ b/dev-db/mysql/mysql-5.5.59.ebuild
@@ -3,7 +3,7 @@
 
 EAPI="5"
 
-MY_EXTRAS_VER="20171018-1948Z"
+MY_EXTRAS_VER="20180214-0024Z"
 MY_PV="${PV//_alpha_pre/-m}"
 MY_PV="${MY_PV//_/-}"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-02-14  0:46 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-02-14  0:46 UTC (permalink / raw
  To: gentoo-commits

commit:     9537f0f34c09bc45c92db5bfba8dbc6c4ae368d7
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 14 00:46:35 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Feb 14 00:46:48 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9537f0f3

dev-db/mysql: Security cleanup

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-db/mysql/Manifest            |   2 -
 dev-db/mysql/mysql-5.5.58.ebuild | 133 ---------------------------------------
 2 files changed, 135 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 87a8a8778c1..97e79509bc4 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,3 @@
-DIST mysql-5.5.58.tar.gz 21045852 BLAKE2B 220a614d5cbb420b290c37b2f721f865640b15cdb3009470b267957548c2cb6fa4a22e885953b1587b4eb2c4b9ef4c6eaf8e2fe9e19af7d73b30cf2fd62dcf3c SHA512 a57613034bb7456827d2dfa3e6d1fd006c3bd3f61e6ad4e882bb36a11beca4cf3d76b6b6d2bf0ccdb115d6896a08a7a20d0781a31e22abca2562b7b9a81614b0
 DIST mysql-5.5.59.tar.gz 21050313 BLAKE2B 2a17307caf1fe00f8be6662e85e55a1cf8a0f6d1a00e0d26970bdd04dd2f92bd7e7c5e1f7a19d311ce0b59cb5f40434d605b3c276ab60ef1e94a99c6148f6b36 SHA512 18abca4a607d7f7ad90e9adb989c665302ee85e264f298fdc3591c4d9cd85a2486f1b402aea1ac3672506d1433eb1f3a246da5e4abd04dc41344ed9fed5ef0ae
 DIST mysql-5.6.36.tar.gz 32192348 BLAKE2B 8ccb7d85ff7255832f8f304a173d6ad436362f36f59f58b5772e0623a4c250c19f0d67a65bee4cc8f6815088559c20e3b80f07443666e85753b164b82a9c0362 SHA512 b3e3bcb1d1e913994f274f4c6dc72c77f1f52b132389e784c675d1720b5913788ce035f045b99ef3754d1b257db55e8300b5c7622ec79c33afafec5968801c18
 DIST mysql-5.6.37.tar.gz 32200158 BLAKE2B be64aca7e3a831fbdb737a6628e87dcea195bfee01228cc05858ef855a2eb41355456cf6e516fca77a5e4a96381248360a2e79e87fea5b649bd06dd3cad6976f SHA512 6935cf11490fb32832468e2a69a9d81a567b1b4ab0afaa0614896e3ddbb95a74b26406284f307637e4b2b9620ef4d96a167128ce7fcb1d338b0ebbc2cef2e597
@@ -6,6 +5,5 @@ DIST mysql-5.6.38.tar.gz 32197625 BLAKE2B 5edd6d05e562568d2418edd81c6822b3971030
 DIST mysql-5.6.39.tar.gz 32110958 BLAKE2B 2f279c6745bc995c860bb4f2868409136e112cc8b9fb0c04fa7673bb6d5612f3ef6d3462666de736d6e7fe5439275ab49908a6609175d1cb8c096d5db5ecb59c SHA512 e1e60854c82d71f9600bf611df964f441815d9d0f896134110a749b29fe340fa216d7c89f4da63d492929565f19a2502463549b8c8c038c658e0be8409a3ffb5
 DIST mysql-extras-20170302-1359Z.tar.bz2 306816 BLAKE2B 7ac3d79f265916306ba8dd0a8ac16f5c4673baf9f910e21aedcc460b028fee674faabad470984e4830256f6218a7c61f31f6155e808d8a2dd4772a1c8bb72d3d SHA512 2c096c68e0d545c98fb5520f92b9e85f6bbc910853793f60f0e67979ee927410bbecadece3400364fdc2b5682f9105664f6a2de8fa0ee1818fb266e063e82869
 DIST mysql-extras-20170719-1335Z.tar.bz2 311350 BLAKE2B 4ee604de76d9da004c7cb9f84e7e4112c0cdab3b18a82923ad5bcb880377813f85e369697d84b37ed2fd9cd26b160d4616bfb7d1dba3bfe0b6bbc296e0edd5ea SHA512 3450725b4cdcf1e330aee775c1c169510bd7f06f19b874a3e94203227d393b136165eca1e77270bfc37c534f4120aeeeb3df8fbd71704312836b79a99d81a122
-DIST mysql-extras-20171018-1948Z.tar.bz2 313540 BLAKE2B fb39cd40af2a013f2e8c71094a14b72f0be6c24c440e17839b447afc01b6a8a3264dec4cfa6973a1e919c96e9cbf6e2bb7d4ed6b0c32502d02dd0d3af316ee1f SHA512 35ba9f3c8462ae188e47f5973e891cbd72e5d742e92fabc09678f93c83bb26337ae11d6fa8400b2a8c5125ba2a771f780e008b7448e3006446b13d3e51adcaba
 DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
 DIST mysql-extras-20180214-0024Z.tar.bz2 316686 BLAKE2B a893e2975a8062ab236f642d158a7833656942adb31d467b784a9224e7dd87872c3784bb29e93b620a58cd9a835d65248f1a817cdbafa574b5949e2b4262108a SHA512 ad0e81695a70954ad107fe104f9140be24e53d499aed6c123e68e1a062ec5cc90c70f6272fdc014e567794e331301e656ba01b22c2c7a1afaf11e14a9190fb0b

diff --git a/dev-db/mysql/mysql-5.5.58.ebuild b/dev-db/mysql/mysql-5.5.58.ebuild
deleted file mode 100644
index aafa5a49293..00000000000
--- a/dev-db/mysql/mysql-5.5.58.ebuild
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-MY_EXTRAS_VER="20171018-1948Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-#fails to build with ninja
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-SLOT="0/18"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test main.openssl_1 \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		for t in main.mysql main.mysql_upgrade ; do
-			mysql-v2_disable_test  "$t" "Test $t broken upstream - error return value not updated"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-02-05 21:27 Markus Meier
  0 siblings, 0 replies; 393+ messages in thread
From: Markus Meier @ 2018-02-05 21:27 UTC (permalink / raw
  To: gentoo-commits

commit:     1ec801ee5127d75d4bcb8232c56fdbc942f6a4f7
Author:     Markus Meier <maekke <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  5 21:25:04 2018 +0000
Commit:     Markus Meier <maekke <AT> gentoo <DOT> org>
CommitDate: Mon Feb  5 21:25:04 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ec801ee

dev-db/mysql: arm stable, bug #644986

Package-Manager: Portage-2.3.19, Repoman-2.3.6
RepoMan-Options: --include-arches="arm"

 dev-db/mysql/mysql-5.6.39.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.39.ebuild b/dev-db/mysql/mysql-5.6.39.ebuild
index 3dd68d1d03b..70e25842d03 100644
--- a/dev-db/mysql/mysql-5.6.39.ebuild
+++ b/dev-db/mysql/mysql-5.6.39.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE numa"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 COMMON_DEPEND="numa? ( sys-process/numactl:= )"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-02-04 20:42 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2018-02-04 20:42 UTC (permalink / raw
  To: gentoo-commits

commit:     bc88d24ca83a4334f5fbd622263d6e7216d15c79
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  4 20:42:15 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Feb  4 20:42:22 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc88d24c

dev-db/mysql: stable 5.6.39 for ia64, bug #644986

Package-Manager: Portage-2.3.20, Repoman-2.3.6
RepoMan-Options: --include-arches="ia64"

 dev-db/mysql/mysql-5.6.39.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.39.ebuild b/dev-db/mysql/mysql-5.6.39.ebuild
index 3bfd72aec23..3dd68d1d03b 100644
--- a/dev-db/mysql/mysql-5.6.39.ebuild
+++ b/dev-db/mysql/mysql-5.6.39.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE numa"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 COMMON_DEPEND="numa? ( sys-process/numactl:= )"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-01-27 21:24 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2018-01-27 21:24 UTC (permalink / raw
  To: gentoo-commits

commit:     c59298d9f7b3f1770dbe75e295358d497606530c
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 27 21:23:55 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sat Jan 27 21:23:55 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c59298d9

dev-db/mysql: amd64 stable wrt bug #644986

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 dev-db/mysql/mysql-5.6.39.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.39.ebuild b/dev-db/mysql/mysql-5.6.39.ebuild
index 99ffe9e4fb9..3bfd72aec23 100644
--- a/dev-db/mysql/mysql-5.6.39.ebuild
+++ b/dev-db/mysql/mysql-5.6.39.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE numa"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 COMMON_DEPEND="numa? ( sys-process/numactl:= )"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-01-19  2:33 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-01-19  2:33 UTC (permalink / raw
  To: gentoo-commits

commit:     6cc2f5ec99aed048bcfe488dfcbc894904058d61
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 19 02:08:09 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Jan 19 02:08:09 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6cc2f5ec

dev-db/mysql: Version bump for 5.5.59

Bug: https://bugs.gentoo.org/644986
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.5.59.ebuild | 133 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 134 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index f50be5af7df..136ea15b1f3 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,5 @@
 DIST mysql-5.5.58.tar.gz 21045852 BLAKE2B 220a614d5cbb420b290c37b2f721f865640b15cdb3009470b267957548c2cb6fa4a22e885953b1587b4eb2c4b9ef4c6eaf8e2fe9e19af7d73b30cf2fd62dcf3c SHA512 a57613034bb7456827d2dfa3e6d1fd006c3bd3f61e6ad4e882bb36a11beca4cf3d76b6b6d2bf0ccdb115d6896a08a7a20d0781a31e22abca2562b7b9a81614b0
+DIST mysql-5.5.59.tar.gz 21050313 BLAKE2B 2a17307caf1fe00f8be6662e85e55a1cf8a0f6d1a00e0d26970bdd04dd2f92bd7e7c5e1f7a19d311ce0b59cb5f40434d605b3c276ab60ef1e94a99c6148f6b36 SHA512 18abca4a607d7f7ad90e9adb989c665302ee85e264f298fdc3591c4d9cd85a2486f1b402aea1ac3672506d1433eb1f3a246da5e4abd04dc41344ed9fed5ef0ae
 DIST mysql-5.6.36.tar.gz 32192348 BLAKE2B 8ccb7d85ff7255832f8f304a173d6ad436362f36f59f58b5772e0623a4c250c19f0d67a65bee4cc8f6815088559c20e3b80f07443666e85753b164b82a9c0362 SHA512 b3e3bcb1d1e913994f274f4c6dc72c77f1f52b132389e784c675d1720b5913788ce035f045b99ef3754d1b257db55e8300b5c7622ec79c33afafec5968801c18
 DIST mysql-5.6.37.tar.gz 32200158 BLAKE2B be64aca7e3a831fbdb737a6628e87dcea195bfee01228cc05858ef855a2eb41355456cf6e516fca77a5e4a96381248360a2e79e87fea5b649bd06dd3cad6976f SHA512 6935cf11490fb32832468e2a69a9d81a567b1b4ab0afaa0614896e3ddbb95a74b26406284f307637e4b2b9620ef4d96a167128ce7fcb1d338b0ebbc2cef2e597
 DIST mysql-5.6.38.tar.gz 32197625 BLAKE2B 5edd6d05e562568d2418edd81c6822b397103013e92beacc00964401c6df67f8a934f05b57c6679aa25a49ef6db2e4a06056f3f1850e0f2afe4de895c7b8f686 SHA512 8144aec822f053fbdfa11ae542e96d3e7da93552b60ed131f041ec4832f48c95025b322340a2e90a82c18b6ee6bfd708f209735f82e37532198245aad697b93d

diff --git a/dev-db/mysql/mysql-5.5.59.ebuild b/dev-db/mysql/mysql-5.5.59.ebuild
new file mode 100644
index 00000000000..11823557e49
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.59.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+MY_EXTRAS_VER="20171018-1948Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+SLOT="0/18"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test main.openssl_1 \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		for t in main.mysql main.mysql_upgrade ; do
+			mysql-v2_disable_test  "$t" "Test $t broken upstream - error return value not updated"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-01-19  2:33 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2018-01-19  2:33 UTC (permalink / raw
  To: gentoo-commits

commit:     8c17b1113e3a9e123ab6d0c1d6e39f78aa696e6a
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 19 02:33:00 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Jan 19 02:33:00 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c17b111

dev-db/mysql: Version bump for 5.6.39

Bug: https://bugs.gentoo.org/644986
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.6.39.ebuild | 192 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 193 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 136ea15b1f3..baa33a363c9 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,6 +3,7 @@ DIST mysql-5.5.59.tar.gz 21050313 BLAKE2B 2a17307caf1fe00f8be6662e85e55a1cf8a0f6
 DIST mysql-5.6.36.tar.gz 32192348 BLAKE2B 8ccb7d85ff7255832f8f304a173d6ad436362f36f59f58b5772e0623a4c250c19f0d67a65bee4cc8f6815088559c20e3b80f07443666e85753b164b82a9c0362 SHA512 b3e3bcb1d1e913994f274f4c6dc72c77f1f52b132389e784c675d1720b5913788ce035f045b99ef3754d1b257db55e8300b5c7622ec79c33afafec5968801c18
 DIST mysql-5.6.37.tar.gz 32200158 BLAKE2B be64aca7e3a831fbdb737a6628e87dcea195bfee01228cc05858ef855a2eb41355456cf6e516fca77a5e4a96381248360a2e79e87fea5b649bd06dd3cad6976f SHA512 6935cf11490fb32832468e2a69a9d81a567b1b4ab0afaa0614896e3ddbb95a74b26406284f307637e4b2b9620ef4d96a167128ce7fcb1d338b0ebbc2cef2e597
 DIST mysql-5.6.38.tar.gz 32197625 BLAKE2B 5edd6d05e562568d2418edd81c6822b397103013e92beacc00964401c6df67f8a934f05b57c6679aa25a49ef6db2e4a06056f3f1850e0f2afe4de895c7b8f686 SHA512 8144aec822f053fbdfa11ae542e96d3e7da93552b60ed131f041ec4832f48c95025b322340a2e90a82c18b6ee6bfd708f209735f82e37532198245aad697b93d
+DIST mysql-5.6.39.tar.gz 32110958 BLAKE2B 2f279c6745bc995c860bb4f2868409136e112cc8b9fb0c04fa7673bb6d5612f3ef6d3462666de736d6e7fe5439275ab49908a6609175d1cb8c096d5db5ecb59c SHA512 e1e60854c82d71f9600bf611df964f441815d9d0f896134110a749b29fe340fa216d7c89f4da63d492929565f19a2502463549b8c8c038c658e0be8409a3ffb5
 DIST mysql-extras-20170302-1359Z.tar.bz2 306816 BLAKE2B 7ac3d79f265916306ba8dd0a8ac16f5c4673baf9f910e21aedcc460b028fee674faabad470984e4830256f6218a7c61f31f6155e808d8a2dd4772a1c8bb72d3d SHA512 2c096c68e0d545c98fb5520f92b9e85f6bbc910853793f60f0e67979ee927410bbecadece3400364fdc2b5682f9105664f6a2de8fa0ee1818fb266e063e82869
 DIST mysql-extras-20170719-1335Z.tar.bz2 311350 BLAKE2B 4ee604de76d9da004c7cb9f84e7e4112c0cdab3b18a82923ad5bcb880377813f85e369697d84b37ed2fd9cd26b160d4616bfb7d1dba3bfe0b6bbc296e0edd5ea SHA512 3450725b4cdcf1e330aee775c1c169510bd7f06f19b874a3e94203227d393b136165eca1e77270bfc37c534f4120aeeeb3df8fbd71704312836b79a99d81a122
 DIST mysql-extras-20171018-1948Z.tar.bz2 313540 BLAKE2B fb39cd40af2a013f2e8c71094a14b72f0be6c24c440e17839b447afc01b6a8a3264dec4cfa6973a1e919c96e9cbf6e2bb7d4ed6b0c32502d02dd0d3af316ee1f SHA512 35ba9f3c8462ae188e47f5973e891cbd72e5d742e92fabc09678f93c83bb26337ae11d6fa8400b2a8c5125ba2a771f780e008b7448e3006446b13d3e51adcaba

diff --git a/dev-db/mysql/mysql-5.6.39.ebuild b/dev-db/mysql/mysql-5.6.39.ebuild
new file mode 100644
index 00000000000..1b72b98b3c7
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.39.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_EXTRAS_VER="20171121-1518Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE numa"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( dev-perl/JSON )"
+RDEPEND="${COMMON_DEPEND}"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
+)
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+src_configure() {
+	# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+	# disable until we see what happens with it
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 -DWITH_NUMA=$(usex numa ON OFF) )
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='server extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		#
+		# main.events_2
+		# Fails on date in past without preserve causing the drop to fail
+
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+			main.events_2 \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		for t in main.mysql main.mysql_upgrade ; do
+			mysql-multilib-r1_disable_test  "$t" "Test $t broken upstream - error return value not updated"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-01-17 16:53 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-01-17 16:53 UTC (permalink / raw
  To: gentoo-commits

commit:     1766d177e0c11ac93afac0deccdfd9caa5842c31
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 17 16:53:25 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Jan 17 16:53:25 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1766d177

dev-db/mysql: repoman: Fix DoubleEmptyLine warning

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 dev-db/mysql/mysql-5.6.38.ebuild | 1 -
 1 file changed, 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
index dab4d3d1897..6cc24125680 100644
--- a/dev-db/mysql/mysql-5.6.38.ebuild
+++ b/dev-db/mysql/mysql-5.6.38.ebuild
@@ -25,7 +25,6 @@ DEPEND="${COMMON_DEPEND}
 	test? ( dev-perl/JSON )"
 RDEPEND="${COMMON_DEPEND}"
 
-
 MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
 
 PATCHES=(


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2018-01-17  8:24 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2018-01-17  8:24 UTC (permalink / raw
  To: gentoo-commits

commit:     2f7c60b31db36129c58b790c6e2a304fde6b0246
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 17 08:24:02 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Jan 17 08:24:36 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f7c60b3

dev-db/mysql: Add test depedency on dev-perl/JSON and restructure DEPEND/RDEPEND

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 dev-db/mysql/mysql-5.6.38.ebuild | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
index 5190600da74..dab4d3d1897 100644
--- a/dev-db/mysql/mysql-5.6.38.ebuild
+++ b/dev-db/mysql/mysql-5.6.38.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -18,8 +18,13 @@ IUSE="$IUSE numa"
 # REMEMBER: also update eclass/mysql*.eclass before committing!
 KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) numa? ( sys-process/numactl )"
-RDEPEND="${RDEPEND}"
+COMMON_DEPEND="numa? ( sys-process/numactl:= )"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( dev-perl/JSON )"
+RDEPEND="${COMMON_DEPEND}"
+
 
 MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-11-21 15:27 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-11-21 15:27 UTC (permalink / raw
  To: gentoo-commits

commit:     c6a3a38050e112302534fa1392dc5649ca3d4f36
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 21 15:26:43 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Nov 21 15:26:43 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6a3a380

dev-db/mysql: Fix building 5.6.38 on gcc 7

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

 dev-db/mysql/Manifest            | 1 +
 dev-db/mysql/mysql-5.6.38.ebuild | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index e33be7f13ee..91f7cb75b5f 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -5,3 +5,4 @@ DIST mysql-5.6.38.tar.gz 32197625 SHA256 18f249752f6c64af6e39c5b99c89ee1c86d6eb7
 DIST mysql-extras-20170302-1359Z.tar.bz2 306816 SHA256 0375bffa8a7b26caab3a13be299b30231f20ad3e8dc82fba9384e5463763a105 SHA512 2c096c68e0d545c98fb5520f92b9e85f6bbc910853793f60f0e67979ee927410bbecadece3400364fdc2b5682f9105664f6a2de8fa0ee1818fb266e063e82869 WHIRLPOOL 6629f0069b77c9add86f4a40168a1dad7bcc0ae18a513f05e44619366a5fdfb82238df2e925de88c358fca2dd50f162ffefd8efea335cb544ccdcf74e73ed25f
 DIST mysql-extras-20170719-1335Z.tar.bz2 311350 SHA256 725dc29fa4a553cfc0bd07dcc1259e5a38a6d945f757e9f49f554a9a7773abe7 SHA512 3450725b4cdcf1e330aee775c1c169510bd7f06f19b874a3e94203227d393b136165eca1e77270bfc37c534f4120aeeeb3df8fbd71704312836b79a99d81a122 WHIRLPOOL f1606df56f82847a8b4b332c1b61cb695aba2a51aef895fa9596495d89208535f829b8fa69a6e97a26d0b9171d817115b83ce447c8232197353dda258a6d38d0
 DIST mysql-extras-20171018-1948Z.tar.bz2 313540 SHA256 6b910637f7ac2d5132154357db46f47b585f6555846d5f1922e85954e93a527a SHA512 35ba9f3c8462ae188e47f5973e891cbd72e5d742e92fabc09678f93c83bb26337ae11d6fa8400b2a8c5125ba2a771f780e008b7448e3006446b13d3e51adcaba WHIRLPOOL 480c0aa3353076864795f0646a1c833cfeaddeff21e26404e98480f73ff6f4866a9ece39e7dd88e0d1a4ee9c820eb1fd31a46c09bfdb18537f839b0460fc3443
+DIST mysql-extras-20171121-1518Z.tar.bz2 313539 SHA256 1afb0cd5cd7eb71b0cfa34d6f0b970ab3e00f8a3ab08a6a09a8fb829c4121f01 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda WHIRLPOOL 67b7d6b4239b43f906477624137946c015f7d1430e309874858d40c8c55dfb633ad1f116b7bb08057c924c5a92a66a296016273ae984ba13d6c5d89ae1e054fc

diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
index f9b5a7e6897..5190600da74 100644
--- a/dev-db/mysql/mysql-5.6.38.ebuild
+++ b/dev-db/mysql/mysql-5.6.38.ebuild
@@ -3,7 +3,7 @@
 
 EAPI="6"
 
-MY_EXTRAS_VER="20171018-1948Z"
+MY_EXTRAS_VER="20171121-1518Z"
 MY_PV="${PV//_alpha_pre/-m}"
 MY_PV="${MY_PV//_/-}"
 HAS_TOOLS_PATCH="1"
@@ -32,6 +32,7 @@ PATCHES=(
 	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
 	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
 	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+	"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
 )
 
 # Please do not add a naive src_unpack to this ebuild


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-11-19 15:14 Markus Meier
  0 siblings, 0 replies; 393+ messages in thread
From: Markus Meier @ 2017-11-19 15:14 UTC (permalink / raw
  To: gentoo-commits

commit:     5e17ac2b1b3cc1f0932a3cf5310ea77f352c14fc
Author:     Markus Meier <maekke <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 19 15:09:38 2017 +0000
Commit:     Markus Meier <maekke <AT> gentoo <DOT> org>
CommitDate: Sun Nov 19 15:10:48 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e17ac2b

dev-db/mysql: arm stable, bug #634652

Package-Manager: Portage-2.3.13, Repoman-2.3.3
RepoMan-Options: --include-arches="arm"

 dev-db/mysql/mysql-5.6.38.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
index 602ee7cc67f..f9b5a7e6897 100644
--- a/dev-db/mysql/mysql-5.6.38.ebuild
+++ b/dev-db/mysql/mysql-5.6.38.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE numa"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) numa? ( sys-process/numactl )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-11-06 14:18 Tobias Klausmann
  0 siblings, 0 replies; 393+ messages in thread
From: Tobias Klausmann @ 2017-11-06 14:18 UTC (permalink / raw
  To: gentoo-commits

commit:     7eeb1368972162fa697f86be7f102b179167cd56
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  6 13:06:44 2017 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Mon Nov  6 14:18:03 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7eeb1368

dev-db/mysql-5.6.38-r0: alpha stable

Gentoo-Bug: http://bugs.gentoo.org/634652

 dev-db/mysql/mysql-5.6.38.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
index 01d0263e17b..602ee7cc67f 100644
--- a/dev-db/mysql/mysql-5.6.38.ebuild
+++ b/dev-db/mysql/mysql-5.6.38.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE numa"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) numa? ( sys-process/numactl )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-11-03 12:54 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-11-03 12:54 UTC (permalink / raw
  To: gentoo-commits

commit:     cbecd699292619d1eaddec9a8efd7b9cbb7de92b
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  3 12:52:18 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Nov  3 12:52:18 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbecd699

dev-db/mysql: Add numa USE wrt bug 635282

Closes: https://bugs.gentoo.org/635282
Package-Manager: Portage-2.3.13, Repoman-2.3.4

 dev-db/mysql/metadata.xml        |  1 +
 dev-db/mysql/mysql-5.6.38.ebuild | 15 +++++++++------
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index 8e45aa661e8..83ee85b777f 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -21,6 +21,7 @@ dev-db/mariadb
   <flag name="openssl">Enable SSL connections and crypto functions using <pkg>dev-libs/openssl</pkg></flag>
   <flag name="max-idx-128">Raise the max index per table limit from 64 to 128</flag>
   <flag name="minimal">Install client programs only, no server</flag>
+  <flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
   <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
   <flag name="server">Build the server program</flag>
   <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>

diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
index 050b1e092c8..01d0263e17b 100644
--- a/dev-db/mysql/mysql-5.6.38.ebuild
+++ b/dev-db/mysql/mysql-5.6.38.ebuild
@@ -13,12 +13,12 @@ CMAKE_MAKEFILE_GENERATOR=emake
 
 inherit mysql-multilib-r1
 # only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
+IUSE="$IUSE numa"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
 KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) numa? ( sys-process/numactl )"
 RDEPEND="${RDEPEND}"
 
 MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
@@ -38,10 +38,6 @@ PATCHES=(
 # If you want to add a single patch, copy the ebuild to an overlay
 # and create your own mysql-extras tarball, looking at 000_index.txt
 
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
 src_prepare() {
 	mysql-multilib-r1_src_prepare
 	if use libressl ; then
@@ -50,6 +46,13 @@ src_prepare() {
 	fi
 }
 
+src_configure() {
+	# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+	# disable until we see what happens with it
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 -DWITH_NUMA=$(usex numa ON OFF) )
+	mysql-multilib-r1_src_configure
+}
+
 # Official test instructions:
 # USE='server embedded extraengine perl openssl static-libs' \
 # FEATURES='test userpriv -usersandbox' \


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-10-28 23:31 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2017-10-28 23:31 UTC (permalink / raw
  To: gentoo-commits

commit:     8bbff1d09446d3e5f850b647f4367aa138b390a1
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 28 23:31:17 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Oct 28 23:31:17 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bbff1d0

dev-db/mysql: stable 5.6.38 for ppc64, bug #634652

Package-Manager: Portage-2.3.13, Repoman-2.3.4
RepoMan-Options: --include-arches="ppc64"

 dev-db/mysql/mysql-5.6.38.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
index 51b6eb091c3..050b1e092c8 100644
--- a/dev-db/mysql/mysql-5.6.38.ebuild
+++ b/dev-db/mysql/mysql-5.6.38.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-10-28 21:42 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2017-10-28 21:42 UTC (permalink / raw
  To: gentoo-commits

commit:     304ce3d71ece9def49e4a3671021b31a614c50e4
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 28 21:42:21 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Oct 28 21:42:28 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=304ce3d7

dev-db/mysql: stable 5.6.38 for ppc, bug #634652

Package-Manager: Portage-2.3.13, Repoman-2.3.4
RepoMan-Options: --include-arches="ppc"

 dev-db/mysql/mysql-5.6.38.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
index 62e4d01189f..51b6eb091c3 100644
--- a/dev-db/mysql/mysql-5.6.38.ebuild
+++ b/dev-db/mysql/mysql-5.6.38.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-10-28 18:11 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2017-10-28 18:11 UTC (permalink / raw
  To: gentoo-commits

commit:     08ee873f815dc39d2fa0895695643ffc8f557289
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 28 18:08:55 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Oct 28 18:10:55 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08ee873f

dev-db/mysql: Security cleanup (bug #635706)

Package-Manager: Portage-2.3.13, Repoman-2.3.4

 dev-db/mysql/mysql-5.6.36.ebuild | 177 -------------------------------------
 dev-db/mysql/mysql-5.6.37.ebuild | 183 ---------------------------------------
 2 files changed, 360 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.36.ebuild b/dev-db/mysql/mysql-5.6.36.ebuild
deleted file mode 100644
index 3ced3a4395b..00000000000
--- a/dev-db/mysql/mysql-5.6.36.ebuild
+++ /dev/null
@@ -1,177 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-MY_EXTRAS_VER="20170302-1359Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
-	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
-	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
-)
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		#
-		# main.events_2
-		# Fails on date in past without preserve causing the drop to fail
-
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-			main.events_2 \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.37.ebuild b/dev-db/mysql/mysql-5.6.37.ebuild
deleted file mode 100644
index 016e3491ecf..00000000000
--- a/dev-db/mysql/mysql-5.6.37.ebuild
+++ /dev/null
@@ -1,183 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-MY_EXTRAS_VER="20170719-1335Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-#fails to build with ninja
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
-	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
-	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
-)
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		#
-		# main.events_2
-		# Fails on date in past without preserve causing the drop to fail
-
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-			main.events_2 \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		for t in main.mysql main.mysql_upgrade ; do
-			mysql-multilib-r1_disable_test  "$t" "Test $t broken upstream - error return value not updated"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-10-28 18:11 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2017-10-28 18:11 UTC (permalink / raw
  To: gentoo-commits

commit:     c3f948792073c6f485cdd1fa99ad9dce6602d757
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 28 18:08:13 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Oct 28 18:10:54 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3f94879

dev-db/mysql: Rev bump to fix CVE-2017-15945

Bug: https://bugs.gentoo.org/635706
Package-Manager: Portage-2.3.13, Repoman-2.3.4
RepoMan-Options: --force

 dev-db/mysql/mysql-5.6.36-r1.ebuild | 177 ++++++++++++++++++++++++++++++++++
 dev-db/mysql/mysql-5.6.37-r1.ebuild | 183 ++++++++++++++++++++++++++++++++++++
 2 files changed, 360 insertions(+)

diff --git a/dev-db/mysql/mysql-5.6.36-r1.ebuild b/dev-db/mysql/mysql-5.6.36-r1.ebuild
new file mode 100644
index 00000000000..3ced3a4395b
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.36-r1.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_EXTRAS_VER="20170302-1359Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+)
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		#
+		# main.events_2
+		# Fails on date in past without preserve causing the drop to fail
+
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+			main.events_2 \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}

diff --git a/dev-db/mysql/mysql-5.6.37-r1.ebuild b/dev-db/mysql/mysql-5.6.37-r1.ebuild
new file mode 100644
index 00000000000..016e3491ecf
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.37-r1.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_EXTRAS_VER="20170719-1335Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+)
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		#
+		# main.events_2
+		# Fails on date in past without preserve causing the drop to fail
+
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+			main.events_2 \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		for t in main.mysql main.mysql_upgrade ; do
+			mysql-multilib-r1_disable_test  "$t" "Test $t broken upstream - error return value not updated"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-10-27 13:49 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2017-10-27 13:49 UTC (permalink / raw
  To: gentoo-commits

commit:     71fabd054abc8355daa79cffc99ec12485b49929
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 27 13:43:42 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Oct 27 13:49:07 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71fabd05

dev-db/mysql: x86 stable (bug #634652)

Package-Manager: Portage-2.3.11, Repoman-2.3.3

 dev-db/mysql/mysql-5.6.38.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
index 8d18dae508a..62e4d01189f 100644
--- a/dev-db/mysql/mysql-5.6.38.ebuild
+++ b/dev-db/mysql/mysql-5.6.38.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-10-25  7:06 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2017-10-25  7:06 UTC (permalink / raw
  To: gentoo-commits

commit:     68dd497e49be150692f5f3100a5862b9f07d7e42
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 25 06:41:15 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Oct 25 07:06:48 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68dd497e

dev-db/mysql: stable 5.6.38 for ia64, bug #634652

Package-Manager: Portage-2.3.12, Repoman-2.3.3
RepoMan-Options: --include-arches="ia64"

 dev-db/mysql/mysql-5.6.38.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
index a9dba916aee..8d18dae508a 100644
--- a/dev-db/mysql/mysql-5.6.38.ebuild
+++ b/dev-db/mysql/mysql-5.6.38.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-10-24  7:03 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2017-10-24  7:03 UTC (permalink / raw
  To: gentoo-commits

commit:     2169f504dd7d6bb08b862588263856a8ff388956
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 24 07:03:47 2017 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Tue Oct 24 07:03:47 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2169f504

dev-db/mysql: amd64 stable wrt bug #634652

Package-Manager: Portage-2.3.8, Repoman-2.3.3
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.38.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
index 35dc3122c0a..a9dba916aee 100644
--- a/dev-db/mysql/mysql-5.6.38.ebuild
+++ b/dev-db/mysql/mysql-5.6.38.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-10-18 19:53 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-10-18 19:53 UTC (permalink / raw
  To: gentoo-commits

commit:     b9d280d62a8b853a5faa49e72faacbc8cb8cf271
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 18 19:52:56 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Oct 18 19:52:56 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9d280d6

dev-db/mysql: Bump patches for tests

Package-Manager: Portage-2.3.11, Repoman-2.3.3

 dev-db/mysql/Manifest            | 2 +-
 dev-db/mysql/mysql-5.5.58.ebuild | 2 +-
 dev-db/mysql/mysql-5.6.38.ebuild | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 915b89125e3..e33be7f13ee 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -4,4 +4,4 @@ DIST mysql-5.6.37.tar.gz 32200158 SHA256 59c4ed39047279ddccd1bed9e247830d2bfad27
 DIST mysql-5.6.38.tar.gz 32197625 SHA256 18f249752f6c64af6e39c5b99c89ee1c86d6eb7fac853707603453cf584c54f3 SHA512 8144aec822f053fbdfa11ae542e96d3e7da93552b60ed131f041ec4832f48c95025b322340a2e90a82c18b6ee6bfd708f209735f82e37532198245aad697b93d WHIRLPOOL b27cbf4f36bb805389dc7f335dff31d03666842bbff0f98852a4e0ead1766123f0f52d28fa0f42da6399575716b15e55714d34b7797599f11e5cd77810be8e2c
 DIST mysql-extras-20170302-1359Z.tar.bz2 306816 SHA256 0375bffa8a7b26caab3a13be299b30231f20ad3e8dc82fba9384e5463763a105 SHA512 2c096c68e0d545c98fb5520f92b9e85f6bbc910853793f60f0e67979ee927410bbecadece3400364fdc2b5682f9105664f6a2de8fa0ee1818fb266e063e82869 WHIRLPOOL 6629f0069b77c9add86f4a40168a1dad7bcc0ae18a513f05e44619366a5fdfb82238df2e925de88c358fca2dd50f162ffefd8efea335cb544ccdcf74e73ed25f
 DIST mysql-extras-20170719-1335Z.tar.bz2 311350 SHA256 725dc29fa4a553cfc0bd07dcc1259e5a38a6d945f757e9f49f554a9a7773abe7 SHA512 3450725b4cdcf1e330aee775c1c169510bd7f06f19b874a3e94203227d393b136165eca1e77270bfc37c534f4120aeeeb3df8fbd71704312836b79a99d81a122 WHIRLPOOL f1606df56f82847a8b4b332c1b61cb695aba2a51aef895fa9596495d89208535f829b8fa69a6e97a26d0b9171d817115b83ce447c8232197353dda258a6d38d0
-DIST mysql-extras-20171018-1327Z.tar.bz2 312593 SHA256 644f39ec61152b94811aa4290aa61f2194c5a409bf23fe8d23bdda02de52dbda SHA512 3e6341360556de3e17e60f7f52cc6323f362f0278c8c7e01c32170e60ff8a53d82fb1189c51fd532565d52129e1812059221b27348c8f5dd4492b88363c443d9 WHIRLPOOL d7de2b03e0df5af130a49aae6edced12e99d764b78a422f9d4d39919f4b644a9b86f6846216ec85eb2ddf2870e58d85aa707cf7a6b596994986c75ded45776ef
+DIST mysql-extras-20171018-1948Z.tar.bz2 313540 SHA256 6b910637f7ac2d5132154357db46f47b585f6555846d5f1922e85954e93a527a SHA512 35ba9f3c8462ae188e47f5973e891cbd72e5d742e92fabc09678f93c83bb26337ae11d6fa8400b2a8c5125ba2a771f780e008b7448e3006446b13d3e51adcaba WHIRLPOOL 480c0aa3353076864795f0646a1c833cfeaddeff21e26404e98480f73ff6f4866a9ece39e7dd88e0d1a4ee9c820eb1fd31a46c09bfdb18537f839b0460fc3443

diff --git a/dev-db/mysql/mysql-5.5.58.ebuild b/dev-db/mysql/mysql-5.5.58.ebuild
index 7be1bdd4644..fdf3c8d8ebc 100644
--- a/dev-db/mysql/mysql-5.5.58.ebuild
+++ b/dev-db/mysql/mysql-5.5.58.ebuild
@@ -3,7 +3,7 @@
 
 EAPI="5"
 
-MY_EXTRAS_VER="20171018-1327Z"
+MY_EXTRAS_VER="20171018-1948Z"
 MY_PV="${PV//_alpha_pre/-m}"
 MY_PV="${MY_PV//_/-}"
 

diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
index a14a25fa965..35dc3122c0a 100644
--- a/dev-db/mysql/mysql-5.6.38.ebuild
+++ b/dev-db/mysql/mysql-5.6.38.ebuild
@@ -3,7 +3,7 @@
 
 EAPI="6"
 
-MY_EXTRAS_VER="20171018-1327Z"
+MY_EXTRAS_VER="20171018-1948Z"
 MY_PV="${PV//_alpha_pre/-m}"
 MY_PV="${MY_PV//_/-}"
 HAS_TOOLS_PATCH="1"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-10-18 16:27 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-10-18 16:27 UTC (permalink / raw
  To: gentoo-commits

commit:     546b767ad0c900c4f7abaab0c0ae6499534897a5
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 18 16:27:29 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Oct 18 16:27:29 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=546b767a

dev-db/mysql: Version bump for 5.6.38

Package-Manager: Portage-2.3.11, Repoman-2.3.3

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.6.38.ebuild | 184 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 185 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 8fe19af7a00..915b89125e3 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,6 +1,7 @@
 DIST mysql-5.5.58.tar.gz 21045852 SHA256 9b6912faf261555c8975db24a987f63f36aaa28052a301e85538346ace0009b9 SHA512 a57613034bb7456827d2dfa3e6d1fd006c3bd3f61e6ad4e882bb36a11beca4cf3d76b6b6d2bf0ccdb115d6896a08a7a20d0781a31e22abca2562b7b9a81614b0 WHIRLPOOL 3eb0ebafda2a43982f86c279fdeb32e03593ec8f77e1d9db6b773b14b5a7f18d282bfe5871ae9f8eafc915d909c04f05486d25247bb8de16b41850964057bafa
 DIST mysql-5.6.36.tar.gz 32192348 SHA256 0af81a5538fc7fe2b747295dfa96589ace8831d2a7d4a26660fca456babeb147 SHA512 b3e3bcb1d1e913994f274f4c6dc72c77f1f52b132389e784c675d1720b5913788ce035f045b99ef3754d1b257db55e8300b5c7622ec79c33afafec5968801c18 WHIRLPOOL 628e33a58532dcdca20e489c3120824604b8d51e10d609f1f9c2adb11552124a8f87f206df99766162d288d5877dac22d2cacffdba1458c73fb52b529245a1e6
 DIST mysql-5.6.37.tar.gz 32200158 SHA256 59c4ed39047279ddccd1bed9e247830d2bfad27d56dc2eb48d0b5695c94a1fbd SHA512 6935cf11490fb32832468e2a69a9d81a567b1b4ab0afaa0614896e3ddbb95a74b26406284f307637e4b2b9620ef4d96a167128ce7fcb1d338b0ebbc2cef2e597 WHIRLPOOL d5e7f6445bacfa7cb118a805f0efff5f4c22d96e77c174efa7ae2d286f3889ab7975ece8a0abe6232d278994d5991430d0d0ff89769883f278d2fa233341db25
+DIST mysql-5.6.38.tar.gz 32197625 SHA256 18f249752f6c64af6e39c5b99c89ee1c86d6eb7fac853707603453cf584c54f3 SHA512 8144aec822f053fbdfa11ae542e96d3e7da93552b60ed131f041ec4832f48c95025b322340a2e90a82c18b6ee6bfd708f209735f82e37532198245aad697b93d WHIRLPOOL b27cbf4f36bb805389dc7f335dff31d03666842bbff0f98852a4e0ead1766123f0f52d28fa0f42da6399575716b15e55714d34b7797599f11e5cd77810be8e2c
 DIST mysql-extras-20170302-1359Z.tar.bz2 306816 SHA256 0375bffa8a7b26caab3a13be299b30231f20ad3e8dc82fba9384e5463763a105 SHA512 2c096c68e0d545c98fb5520f92b9e85f6bbc910853793f60f0e67979ee927410bbecadece3400364fdc2b5682f9105664f6a2de8fa0ee1818fb266e063e82869 WHIRLPOOL 6629f0069b77c9add86f4a40168a1dad7bcc0ae18a513f05e44619366a5fdfb82238df2e925de88c358fca2dd50f162ffefd8efea335cb544ccdcf74e73ed25f
 DIST mysql-extras-20170719-1335Z.tar.bz2 311350 SHA256 725dc29fa4a553cfc0bd07dcc1259e5a38a6d945f757e9f49f554a9a7773abe7 SHA512 3450725b4cdcf1e330aee775c1c169510bd7f06f19b874a3e94203227d393b136165eca1e77270bfc37c534f4120aeeeb3df8fbd71704312836b79a99d81a122 WHIRLPOOL f1606df56f82847a8b4b332c1b61cb695aba2a51aef895fa9596495d89208535f829b8fa69a6e97a26d0b9171d817115b83ce447c8232197353dda258a6d38d0
 DIST mysql-extras-20171018-1327Z.tar.bz2 312593 SHA256 644f39ec61152b94811aa4290aa61f2194c5a409bf23fe8d23bdda02de52dbda SHA512 3e6341360556de3e17e60f7f52cc6323f362f0278c8c7e01c32170e60ff8a53d82fb1189c51fd532565d52129e1812059221b27348c8f5dd4492b88363c443d9 WHIRLPOOL d7de2b03e0df5af130a49aae6edced12e99d764b78a422f9d4d39919f4b644a9b86f6846216ec85eb2ddf2870e58d85aa707cf7a6b596994986c75ded45776ef

diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
new file mode 100644
index 00000000000..a14a25fa965
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.38.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_EXTRAS_VER="20171018-1327Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+)
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		#
+		# main.events_2
+		# Fails on date in past without preserve causing the drop to fail
+
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+			main.events_2 \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		for t in main.mysql main.mysql_upgrade ; do
+			mysql-multilib-r1_disable_test  "$t" "Test $t broken upstream - error return value not updated"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-10-18 13:36 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-10-18 13:36 UTC (permalink / raw
  To: gentoo-commits

commit:     6997fe2489e56a94cad42c4b0f46462098009cdd
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 18 13:36:35 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Oct 18 13:36:35 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6997fe24

dev-db/mysql: Drop old security vulnerable versions

Package-Manager: Portage-2.3.11, Repoman-2.3.3

 dev-db/mysql/Manifest            |   4 -
 dev-db/mysql/mysql-5.5.57.ebuild | 133 --------------------------------
 dev-db/mysql/mysql-5.6.35.ebuild | 163 ---------------------------------------
 3 files changed, 300 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 03dc9b5fe37..8fe19af7a00 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,10 +1,6 @@
-DIST mysql-5.5.57.tar.gz 21044615 SHA256 c1c2bd321e524f92e43fe73d0d6745badd538c984c7561b273ae10e9aef57384 SHA512 493e6345a2d8ec407fcfc6ed5b67599c77b6351b7cfb1d676b39f68ac9446959cf0822c0d0bcd2206cea07b8c06c85734aa8501c938d6393ffab220f3f5ee6e8 WHIRLPOOL c321bfc26c7b5a1bdaddf2be9de84c174869743034f4d5b483767c0308875bc583f6705982ccb4935794b8ce94a1234b2b8561c933cced5aba11f48e93fbfe15
 DIST mysql-5.5.58.tar.gz 21045852 SHA256 9b6912faf261555c8975db24a987f63f36aaa28052a301e85538346ace0009b9 SHA512 a57613034bb7456827d2dfa3e6d1fd006c3bd3f61e6ad4e882bb36a11beca4cf3d76b6b6d2bf0ccdb115d6896a08a7a20d0781a31e22abca2562b7b9a81614b0 WHIRLPOOL 3eb0ebafda2a43982f86c279fdeb32e03593ec8f77e1d9db6b773b14b5a7f18d282bfe5871ae9f8eafc915d909c04f05486d25247bb8de16b41850964057bafa
-DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
 DIST mysql-5.6.36.tar.gz 32192348 SHA256 0af81a5538fc7fe2b747295dfa96589ace8831d2a7d4a26660fca456babeb147 SHA512 b3e3bcb1d1e913994f274f4c6dc72c77f1f52b132389e784c675d1720b5913788ce035f045b99ef3754d1b257db55e8300b5c7622ec79c33afafec5968801c18 WHIRLPOOL 628e33a58532dcdca20e489c3120824604b8d51e10d609f1f9c2adb11552124a8f87f206df99766162d288d5877dac22d2cacffdba1458c73fb52b529245a1e6
 DIST mysql-5.6.37.tar.gz 32200158 SHA256 59c4ed39047279ddccd1bed9e247830d2bfad27d56dc2eb48d0b5695c94a1fbd SHA512 6935cf11490fb32832468e2a69a9d81a567b1b4ab0afaa0614896e3ddbb95a74b26406284f307637e4b2b9620ef4d96a167128ce7fcb1d338b0ebbc2cef2e597 WHIRLPOOL d5e7f6445bacfa7cb118a805f0efff5f4c22d96e77c174efa7ae2d286f3889ab7975ece8a0abe6232d278994d5991430d0d0ff89769883f278d2fa233341db25
-DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd
 DIST mysql-extras-20170302-1359Z.tar.bz2 306816 SHA256 0375bffa8a7b26caab3a13be299b30231f20ad3e8dc82fba9384e5463763a105 SHA512 2c096c68e0d545c98fb5520f92b9e85f6bbc910853793f60f0e67979ee927410bbecadece3400364fdc2b5682f9105664f6a2de8fa0ee1818fb266e063e82869 WHIRLPOOL 6629f0069b77c9add86f4a40168a1dad7bcc0ae18a513f05e44619366a5fdfb82238df2e925de88c358fca2dd50f162ffefd8efea335cb544ccdcf74e73ed25f
 DIST mysql-extras-20170719-1335Z.tar.bz2 311350 SHA256 725dc29fa4a553cfc0bd07dcc1259e5a38a6d945f757e9f49f554a9a7773abe7 SHA512 3450725b4cdcf1e330aee775c1c169510bd7f06f19b874a3e94203227d393b136165eca1e77270bfc37c534f4120aeeeb3df8fbd71704312836b79a99d81a122 WHIRLPOOL f1606df56f82847a8b4b332c1b61cb695aba2a51aef895fa9596495d89208535f829b8fa69a6e97a26d0b9171d817115b83ce447c8232197353dda258a6d38d0
-DIST mysql-extras-20170719-1630Z.tar.bz2 311320 SHA256 d21f42035850a3208a89d4271d2c544b8ccbb3b8855390b882248561451ae4cc SHA512 a2369d512b8e490b5859403c4c15cf9d8ff589000e56785f0fb02ad99535af189fe93ba9590035bf0b8cc1d0c7f3656c56d86d94d62ef97fa63cdaeade609f38 WHIRLPOOL aec2eb79350008464499f74cff002589628fc8e4e81970cbcf1d7d3ca0a7714d9ebc6408c7f25e037f452fb0b3397e7885dac83277884692eb3a88a26d6625c4
 DIST mysql-extras-20171018-1327Z.tar.bz2 312593 SHA256 644f39ec61152b94811aa4290aa61f2194c5a409bf23fe8d23bdda02de52dbda SHA512 3e6341360556de3e17e60f7f52cc6323f362f0278c8c7e01c32170e60ff8a53d82fb1189c51fd532565d52129e1812059221b27348c8f5dd4492b88363c443d9 WHIRLPOOL d7de2b03e0df5af130a49aae6edced12e99d764b78a422f9d4d39919f4b644a9b86f6846216ec85eb2ddf2870e58d85aa707cf7a6b596994986c75ded45776ef

diff --git a/dev-db/mysql/mysql-5.5.57.ebuild b/dev-db/mysql/mysql-5.5.57.ebuild
deleted file mode 100644
index b34282c9992..00000000000
--- a/dev-db/mysql/mysql-5.5.57.ebuild
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-MY_EXTRAS_VER="20170719-1630Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-#fails to build with ninja
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-SLOT="0/18"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test main.openssl_1 \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		for t in main.mysql main.mysql_upgrade ; do
-			mysql-v2_disable_test  "$t" "Test $t broken upstream - error return value not updated"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.35.ebuild b/dev-db/mysql/mysql-5.6.35.ebuild
deleted file mode 100644
index c173b55fdf5..00000000000
--- a/dev-db/mysql/mysql-5.6.35.ebuild
+++ /dev/null
@@ -1,163 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-MY_EXTRAS_VER="20160212-0233Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-10-18 13:36 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-10-18 13:36 UTC (permalink / raw
  To: gentoo-commits

commit:     7d38a24696b5618f2b2353a9bb9ef409ae6155bf
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 18 13:34:17 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Oct 18 13:34:17 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d38a246

dev-db/mysql: Version bump for 5.5.58

Package-Manager: Portage-2.3.11, Repoman-2.3.3

 dev-db/mysql/Manifest            |   2 +
 dev-db/mysql/mysql-5.5.58.ebuild | 133 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 135 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index a269145ed5f..03dc9b5fe37 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,5 @@
 DIST mysql-5.5.57.tar.gz 21044615 SHA256 c1c2bd321e524f92e43fe73d0d6745badd538c984c7561b273ae10e9aef57384 SHA512 493e6345a2d8ec407fcfc6ed5b67599c77b6351b7cfb1d676b39f68ac9446959cf0822c0d0bcd2206cea07b8c06c85734aa8501c938d6393ffab220f3f5ee6e8 WHIRLPOOL c321bfc26c7b5a1bdaddf2be9de84c174869743034f4d5b483767c0308875bc583f6705982ccb4935794b8ce94a1234b2b8561c933cced5aba11f48e93fbfe15
+DIST mysql-5.5.58.tar.gz 21045852 SHA256 9b6912faf261555c8975db24a987f63f36aaa28052a301e85538346ace0009b9 SHA512 a57613034bb7456827d2dfa3e6d1fd006c3bd3f61e6ad4e882bb36a11beca4cf3d76b6b6d2bf0ccdb115d6896a08a7a20d0781a31e22abca2562b7b9a81614b0 WHIRLPOOL 3eb0ebafda2a43982f86c279fdeb32e03593ec8f77e1d9db6b773b14b5a7f18d282bfe5871ae9f8eafc915d909c04f05486d25247bb8de16b41850964057bafa
 DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
 DIST mysql-5.6.36.tar.gz 32192348 SHA256 0af81a5538fc7fe2b747295dfa96589ace8831d2a7d4a26660fca456babeb147 SHA512 b3e3bcb1d1e913994f274f4c6dc72c77f1f52b132389e784c675d1720b5913788ce035f045b99ef3754d1b257db55e8300b5c7622ec79c33afafec5968801c18 WHIRLPOOL 628e33a58532dcdca20e489c3120824604b8d51e10d609f1f9c2adb11552124a8f87f206df99766162d288d5877dac22d2cacffdba1458c73fb52b529245a1e6
 DIST mysql-5.6.37.tar.gz 32200158 SHA256 59c4ed39047279ddccd1bed9e247830d2bfad27d56dc2eb48d0b5695c94a1fbd SHA512 6935cf11490fb32832468e2a69a9d81a567b1b4ab0afaa0614896e3ddbb95a74b26406284f307637e4b2b9620ef4d96a167128ce7fcb1d338b0ebbc2cef2e597 WHIRLPOOL d5e7f6445bacfa7cb118a805f0efff5f4c22d96e77c174efa7ae2d286f3889ab7975ece8a0abe6232d278994d5991430d0d0ff89769883f278d2fa233341db25
@@ -6,3 +7,4 @@ DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e
 DIST mysql-extras-20170302-1359Z.tar.bz2 306816 SHA256 0375bffa8a7b26caab3a13be299b30231f20ad3e8dc82fba9384e5463763a105 SHA512 2c096c68e0d545c98fb5520f92b9e85f6bbc910853793f60f0e67979ee927410bbecadece3400364fdc2b5682f9105664f6a2de8fa0ee1818fb266e063e82869 WHIRLPOOL 6629f0069b77c9add86f4a40168a1dad7bcc0ae18a513f05e44619366a5fdfb82238df2e925de88c358fca2dd50f162ffefd8efea335cb544ccdcf74e73ed25f
 DIST mysql-extras-20170719-1335Z.tar.bz2 311350 SHA256 725dc29fa4a553cfc0bd07dcc1259e5a38a6d945f757e9f49f554a9a7773abe7 SHA512 3450725b4cdcf1e330aee775c1c169510bd7f06f19b874a3e94203227d393b136165eca1e77270bfc37c534f4120aeeeb3df8fbd71704312836b79a99d81a122 WHIRLPOOL f1606df56f82847a8b4b332c1b61cb695aba2a51aef895fa9596495d89208535f829b8fa69a6e97a26d0b9171d817115b83ce447c8232197353dda258a6d38d0
 DIST mysql-extras-20170719-1630Z.tar.bz2 311320 SHA256 d21f42035850a3208a89d4271d2c544b8ccbb3b8855390b882248561451ae4cc SHA512 a2369d512b8e490b5859403c4c15cf9d8ff589000e56785f0fb02ad99535af189fe93ba9590035bf0b8cc1d0c7f3656c56d86d94d62ef97fa63cdaeade609f38 WHIRLPOOL aec2eb79350008464499f74cff002589628fc8e4e81970cbcf1d7d3ca0a7714d9ebc6408c7f25e037f452fb0b3397e7885dac83277884692eb3a88a26d6625c4
+DIST mysql-extras-20171018-1327Z.tar.bz2 312593 SHA256 644f39ec61152b94811aa4290aa61f2194c5a409bf23fe8d23bdda02de52dbda SHA512 3e6341360556de3e17e60f7f52cc6323f362f0278c8c7e01c32170e60ff8a53d82fb1189c51fd532565d52129e1812059221b27348c8f5dd4492b88363c443d9 WHIRLPOOL d7de2b03e0df5af130a49aae6edced12e99d764b78a422f9d4d39919f4b644a9b86f6846216ec85eb2ddf2870e58d85aa707cf7a6b596994986c75ded45776ef

diff --git a/dev-db/mysql/mysql-5.5.58.ebuild b/dev-db/mysql/mysql-5.5.58.ebuild
new file mode 100644
index 00000000000..7be1bdd4644
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.58.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+MY_EXTRAS_VER="20171018-1327Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+SLOT="0/18"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test main.openssl_1 \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		for t in main.mysql main.mysql_upgrade ; do
+			mysql-v2_disable_test  "$t" "Test $t broken upstream - error return value not updated"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-09-30  8:40 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2017-09-30  8:40 UTC (permalink / raw
  To: gentoo-commits

commit:     820d1bc1f47d4fcf5a104275ebb7554f7773fce1
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 30 08:40:29 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Sep 30 08:40:38 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=820d1bc1

dev-db/mysql: stable 5.6.37 for ppc, bug #625626

Package-Manager: Portage-2.3.10, Repoman-2.3.3
RepoMan-Options: --include-arches="ppc"

 dev-db/mysql/mysql-5.6.37.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.37.ebuild b/dev-db/mysql/mysql-5.6.37.ebuild
index 545f85e8c20..016e3491ecf 100644
--- a/dev-db/mysql/mysql-5.6.37.ebuild
+++ b/dev-db/mysql/mysql-5.6.37.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-09-30  2:58 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2017-09-30  2:58 UTC (permalink / raw
  To: gentoo-commits

commit:     c2ad4648ddd677729988dc20091d96ae4dd52880
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 30 02:57:02 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Sep 30 02:58:30 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2ad4648

dev-db/mysql: stable 5.6.37 for ppc64, bug #625626

Package-Manager: Portage-2.3.10, Repoman-2.3.3
RepoMan-Options: --include-arches="ppc64"

 dev-db/mysql/mysql-5.6.37.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.37.ebuild b/dev-db/mysql/mysql-5.6.37.ebuild
index 433f6c6a3ff..545f85e8c20 100644
--- a/dev-db/mysql/mysql-5.6.37.ebuild
+++ b/dev-db/mysql/mysql-5.6.37.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-08-25 21:51 Mikle Kolyada
  0 siblings, 0 replies; 393+ messages in thread
From: Mikle Kolyada @ 2017-08-25 21:51 UTC (permalink / raw
  To: gentoo-commits

commit:     d3e9105fe6779c4d5cb8b0cf9b5845ede292d405
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 25 21:51:12 2017 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Fri Aug 25 21:51:12 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3e9105f

dev-db/mysql: amd64 stable wrt bug #625626

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 dev-db/mysql/mysql-5.6.37.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.37.ebuild b/dev-db/mysql/mysql-5.6.37.ebuild
index 936cb92ea8c..433f6c6a3ff 100644
--- a/dev-db/mysql/mysql-5.6.37.ebuild
+++ b/dev-db/mysql/mysql-5.6.37.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-08-23  4:59 Markus Meier
  0 siblings, 0 replies; 393+ messages in thread
From: Markus Meier @ 2017-08-23  4:59 UTC (permalink / raw
  To: gentoo-commits

commit:     2f5ce3f6fbcd65b52bcd1595d83ff259ff600682
Author:     Markus Meier <maekke <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 23 04:56:28 2017 +0000
Commit:     Markus Meier <maekke <AT> gentoo <DOT> org>
CommitDate: Wed Aug 23 04:56:28 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f5ce3f6

dev-db/mysql: arm stable, bug #625626

Package-Manager: Portage-2.3.6, Repoman-2.3.1
RepoMan-Options: --include-arches="arm"

 dev-db/mysql/mysql-5.6.37.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.37.ebuild b/dev-db/mysql/mysql-5.6.37.ebuild
index 6ad5dbaf7d0..936cb92ea8c 100644
--- a/dev-db/mysql/mysql-5.6.37.ebuild
+++ b/dev-db/mysql/mysql-5.6.37.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-08-18 20:25 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2017-08-18 20:25 UTC (permalink / raw
  To: gentoo-commits

commit:     29896540604a59ada3a09f96291bedf1f53f2880
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 18 20:24:52 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Aug 18 20:24:52 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29896540

dev-db/mysql: x86 stable (bug #625626)

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 dev-db/mysql/mysql-5.6.37.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.37.ebuild b/dev-db/mysql/mysql-5.6.37.ebuild
index e3ed7c8615e..6ad5dbaf7d0 100644
--- a/dev-db/mysql/mysql-5.6.37.ebuild
+++ b/dev-db/mysql/mysql-5.6.37.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-08-17 20:18 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2017-08-17 20:18 UTC (permalink / raw
  To: gentoo-commits

commit:     79f9f967bf86f3331f0645c2ad40771595a9cf70
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 17 20:18:36 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Aug 17 20:18:53 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79f9f967

dev-db/mysql: stable 5.6.37 for ia64, bug #625626

Package-Manager: Portage-2.3.7, Repoman-2.3.3
RepoMan-Options: --include-arches="ia64"

 dev-db/mysql/mysql-5.6.37.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.37.ebuild b/dev-db/mysql/mysql-5.6.37.ebuild
index 1242f9b3ab3..e3ed7c8615e 100644
--- a/dev-db/mysql/mysql-5.6.37.ebuild
+++ b/dev-db/mysql/mysql-5.6.37.ebuild
@@ -16,7 +16,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-07-22  0:53 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-07-22  0:53 UTC (permalink / raw
  To: gentoo-commits

commit:     40da18f347974b716360c6e74ce38c2856236df1
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 22 00:52:47 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sat Jul 22 00:52:47 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40da18f3

dev-db/mysql: Add subslot to 5.5.57

Package-Manager: Portage-2.3.6, Repoman-2.3.3

 dev-db/mysql/mysql-5.5.57.ebuild | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dev-db/mysql/mysql-5.5.57.ebuild b/dev-db/mysql/mysql-5.5.57.ebuild
index 3fbfb582d1d..b34282c9992 100644
--- a/dev-db/mysql/mysql-5.5.57.ebuild
+++ b/dev-db/mysql/mysql-5.5.57.ebuild
@@ -28,6 +28,8 @@ EPATCH_EXCLUDE=''
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"
 
+SLOT="0/18"
+
 # Please do not add a naive src_unpack to this ebuild
 # If you want to add a single patch, copy the ebuild to an overlay
 # and create your own mysql-extras tarball, looking at 000_index.txt


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-07-19 18:04 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-07-19 18:04 UTC (permalink / raw
  To: gentoo-commits

commit:     b20fa1adf162543e09b762123b1dbf2942f7a0cc
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 19 18:04:22 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Jul 19 18:04:22 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b20fa1ad

dev-db/mysql: Drop old

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-db/mysql/Manifest               |   2 -
 dev-db/mysql/mysql-5.5.56.ebuild    | 125 -------------------------
 dev-db/mysql/mysql-5.6.35-r1.ebuild | 177 ------------------------------------
 3 files changed, 304 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 9a1b1ea8c7c..a269145ed5f 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,10 +1,8 @@
-DIST mysql-5.5.56.tar.gz 21025832 SHA256 3fd30a24267cef84ee8aeb327a5b08a669d3ab8c4d76d1b1b3b66d26cf777a0a SHA512 58aec4cfc82abac5bb9d5e5594d2545c979910af5b7bbcfe339f9590d157244c869a83659f89a2cca09254353ecb52d2dcb3e2cd55e117219e2a72c54187a975 WHIRLPOOL 5aa01ff21da05a86f5c3d5264afb9c5722001154d36c1042ab88bd38c02b9daae8cba47f933909579eb22872aeafb146e6b2d382f5a4c6319f163e261116de4d
 DIST mysql-5.5.57.tar.gz 21044615 SHA256 c1c2bd321e524f92e43fe73d0d6745badd538c984c7561b273ae10e9aef57384 SHA512 493e6345a2d8ec407fcfc6ed5b67599c77b6351b7cfb1d676b39f68ac9446959cf0822c0d0bcd2206cea07b8c06c85734aa8501c938d6393ffab220f3f5ee6e8 WHIRLPOOL c321bfc26c7b5a1bdaddf2be9de84c174869743034f4d5b483767c0308875bc583f6705982ccb4935794b8ce94a1234b2b8561c933cced5aba11f48e93fbfe15
 DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
 DIST mysql-5.6.36.tar.gz 32192348 SHA256 0af81a5538fc7fe2b747295dfa96589ace8831d2a7d4a26660fca456babeb147 SHA512 b3e3bcb1d1e913994f274f4c6dc72c77f1f52b132389e784c675d1720b5913788ce035f045b99ef3754d1b257db55e8300b5c7622ec79c33afafec5968801c18 WHIRLPOOL 628e33a58532dcdca20e489c3120824604b8d51e10d609f1f9c2adb11552124a8f87f206df99766162d288d5877dac22d2cacffdba1458c73fb52b529245a1e6
 DIST mysql-5.6.37.tar.gz 32200158 SHA256 59c4ed39047279ddccd1bed9e247830d2bfad27d56dc2eb48d0b5695c94a1fbd SHA512 6935cf11490fb32832468e2a69a9d81a567b1b4ab0afaa0614896e3ddbb95a74b26406284f307637e4b2b9620ef4d96a167128ce7fcb1d338b0ebbc2cef2e597 WHIRLPOOL d5e7f6445bacfa7cb118a805f0efff5f4c22d96e77c174efa7ae2d286f3889ab7975ece8a0abe6232d278994d5991430d0d0ff89769883f278d2fa233341db25
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd
-DIST mysql-extras-20170301-2020Z.tar.bz2 306195 SHA256 646eb75c838ac4241598cc0638877f50044ec702c82b1fc3ddefb99f1f4b3fae SHA512 b11b252d11b907e2b3be406e11b9a464092950696100afd575a2be78eac33251a9f56bf128b497beb8c801a2e5d02b11ad37ef78d25aed892a7aa90ca4c9581f WHIRLPOOL 466b18c388160d5c7557ed0e0bddc45eda823b0c1c490540fb61008da759b6559b6012593d7beb3de5123e247521ace925413abc28edd692585c282456d7fbf9
 DIST mysql-extras-20170302-1359Z.tar.bz2 306816 SHA256 0375bffa8a7b26caab3a13be299b30231f20ad3e8dc82fba9384e5463763a105 SHA512 2c096c68e0d545c98fb5520f92b9e85f6bbc910853793f60f0e67979ee927410bbecadece3400364fdc2b5682f9105664f6a2de8fa0ee1818fb266e063e82869 WHIRLPOOL 6629f0069b77c9add86f4a40168a1dad7bcc0ae18a513f05e44619366a5fdfb82238df2e925de88c358fca2dd50f162ffefd8efea335cb544ccdcf74e73ed25f
 DIST mysql-extras-20170719-1335Z.tar.bz2 311350 SHA256 725dc29fa4a553cfc0bd07dcc1259e5a38a6d945f757e9f49f554a9a7773abe7 SHA512 3450725b4cdcf1e330aee775c1c169510bd7f06f19b874a3e94203227d393b136165eca1e77270bfc37c534f4120aeeeb3df8fbd71704312836b79a99d81a122 WHIRLPOOL f1606df56f82847a8b4b332c1b61cb695aba2a51aef895fa9596495d89208535f829b8fa69a6e97a26d0b9171d817115b83ce447c8232197353dda258a6d38d0
 DIST mysql-extras-20170719-1630Z.tar.bz2 311320 SHA256 d21f42035850a3208a89d4271d2c544b8ccbb3b8855390b882248561451ae4cc SHA512 a2369d512b8e490b5859403c4c15cf9d8ff589000e56785f0fb02ad99535af189fe93ba9590035bf0b8cc1d0c7f3656c56d86d94d62ef97fa63cdaeade609f38 WHIRLPOOL aec2eb79350008464499f74cff002589628fc8e4e81970cbcf1d7d3ca0a7714d9ebc6408c7f25e037f452fb0b3397e7885dac83277884692eb3a88a26d6625c4

diff --git a/dev-db/mysql/mysql-5.5.56.ebuild b/dev-db/mysql/mysql-5.5.56.ebuild
deleted file mode 100644
index 483b3462e93..00000000000
--- a/dev-db/mysql/mysql-5.5.56.ebuild
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-MY_EXTRAS_VER="20170301-2020Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE='20019_all_mysql-5.5-mtr-perl-deprecation.patch'
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test main.openssl_1 \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.35-r1.ebuild b/dev-db/mysql/mysql-5.6.35-r1.ebuild
deleted file mode 100644
index 5b094bd6763..00000000000
--- a/dev-db/mysql/mysql-5.6.35-r1.ebuild
+++ /dev/null
@@ -1,177 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-MY_EXTRAS_VER="20170302-1359Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-
-PATCHES=(
-	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
-	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
-	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
-	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink.patch
-	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
-)
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		#
-		# main.events_2
-		# Fails on date in past without preserve causing the drop to fail
-
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-			main.events_2 \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-07-19 18:04 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-07-19 18:04 UTC (permalink / raw
  To: gentoo-commits

commit:     9cabc4e1ed56d1b97a9959ce7e7dda5bbf20d547
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 19 18:00:23 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Jul 19 18:00:23 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cabc4e1

dev-db/mysql: Version bump to 5.5.57

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-db/mysql/Manifest            |   2 +
 dev-db/mysql/mysql-5.5.57.ebuild | 131 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 133 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 3fd9b95eee9..9a1b1ea8c7c 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,5 @@
 DIST mysql-5.5.56.tar.gz 21025832 SHA256 3fd30a24267cef84ee8aeb327a5b08a669d3ab8c4d76d1b1b3b66d26cf777a0a SHA512 58aec4cfc82abac5bb9d5e5594d2545c979910af5b7bbcfe339f9590d157244c869a83659f89a2cca09254353ecb52d2dcb3e2cd55e117219e2a72c54187a975 WHIRLPOOL 5aa01ff21da05a86f5c3d5264afb9c5722001154d36c1042ab88bd38c02b9daae8cba47f933909579eb22872aeafb146e6b2d382f5a4c6319f163e261116de4d
+DIST mysql-5.5.57.tar.gz 21044615 SHA256 c1c2bd321e524f92e43fe73d0d6745badd538c984c7561b273ae10e9aef57384 SHA512 493e6345a2d8ec407fcfc6ed5b67599c77b6351b7cfb1d676b39f68ac9446959cf0822c0d0bcd2206cea07b8c06c85734aa8501c938d6393ffab220f3f5ee6e8 WHIRLPOOL c321bfc26c7b5a1bdaddf2be9de84c174869743034f4d5b483767c0308875bc583f6705982ccb4935794b8ce94a1234b2b8561c933cced5aba11f48e93fbfe15
 DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
 DIST mysql-5.6.36.tar.gz 32192348 SHA256 0af81a5538fc7fe2b747295dfa96589ace8831d2a7d4a26660fca456babeb147 SHA512 b3e3bcb1d1e913994f274f4c6dc72c77f1f52b132389e784c675d1720b5913788ce035f045b99ef3754d1b257db55e8300b5c7622ec79c33afafec5968801c18 WHIRLPOOL 628e33a58532dcdca20e489c3120824604b8d51e10d609f1f9c2adb11552124a8f87f206df99766162d288d5877dac22d2cacffdba1458c73fb52b529245a1e6
 DIST mysql-5.6.37.tar.gz 32200158 SHA256 59c4ed39047279ddccd1bed9e247830d2bfad27d56dc2eb48d0b5695c94a1fbd SHA512 6935cf11490fb32832468e2a69a9d81a567b1b4ab0afaa0614896e3ddbb95a74b26406284f307637e4b2b9620ef4d96a167128ce7fcb1d338b0ebbc2cef2e597 WHIRLPOOL d5e7f6445bacfa7cb118a805f0efff5f4c22d96e77c174efa7ae2d286f3889ab7975ece8a0abe6232d278994d5991430d0d0ff89769883f278d2fa233341db25
@@ -6,3 +7,4 @@ DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e
 DIST mysql-extras-20170301-2020Z.tar.bz2 306195 SHA256 646eb75c838ac4241598cc0638877f50044ec702c82b1fc3ddefb99f1f4b3fae SHA512 b11b252d11b907e2b3be406e11b9a464092950696100afd575a2be78eac33251a9f56bf128b497beb8c801a2e5d02b11ad37ef78d25aed892a7aa90ca4c9581f WHIRLPOOL 466b18c388160d5c7557ed0e0bddc45eda823b0c1c490540fb61008da759b6559b6012593d7beb3de5123e247521ace925413abc28edd692585c282456d7fbf9
 DIST mysql-extras-20170302-1359Z.tar.bz2 306816 SHA256 0375bffa8a7b26caab3a13be299b30231f20ad3e8dc82fba9384e5463763a105 SHA512 2c096c68e0d545c98fb5520f92b9e85f6bbc910853793f60f0e67979ee927410bbecadece3400364fdc2b5682f9105664f6a2de8fa0ee1818fb266e063e82869 WHIRLPOOL 6629f0069b77c9add86f4a40168a1dad7bcc0ae18a513f05e44619366a5fdfb82238df2e925de88c358fca2dd50f162ffefd8efea335cb544ccdcf74e73ed25f
 DIST mysql-extras-20170719-1335Z.tar.bz2 311350 SHA256 725dc29fa4a553cfc0bd07dcc1259e5a38a6d945f757e9f49f554a9a7773abe7 SHA512 3450725b4cdcf1e330aee775c1c169510bd7f06f19b874a3e94203227d393b136165eca1e77270bfc37c534f4120aeeeb3df8fbd71704312836b79a99d81a122 WHIRLPOOL f1606df56f82847a8b4b332c1b61cb695aba2a51aef895fa9596495d89208535f829b8fa69a6e97a26d0b9171d817115b83ce447c8232197353dda258a6d38d0
+DIST mysql-extras-20170719-1630Z.tar.bz2 311320 SHA256 d21f42035850a3208a89d4271d2c544b8ccbb3b8855390b882248561451ae4cc SHA512 a2369d512b8e490b5859403c4c15cf9d8ff589000e56785f0fb02ad99535af189fe93ba9590035bf0b8cc1d0c7f3656c56d86d94d62ef97fa63cdaeade609f38 WHIRLPOOL aec2eb79350008464499f74cff002589628fc8e4e81970cbcf1d7d3ca0a7714d9ebc6408c7f25e037f452fb0b3397e7885dac83277884692eb3a88a26d6625c4

diff --git a/dev-db/mysql/mysql-5.5.57.ebuild b/dev-db/mysql/mysql-5.5.57.ebuild
new file mode 100644
index 00000000000..3fbfb582d1d
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.57.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+MY_EXTRAS_VER="20170719-1630Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test main.openssl_1 \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		for t in main.mysql main.mysql_upgrade ; do
+			mysql-v2_disable_test  "$t" "Test $t broken upstream - error return value not updated"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-07-19 16:17 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-07-19 16:17 UTC (permalink / raw
  To: gentoo-commits

commit:     762d28d68ea892c1c58d1c0815dd3c38a7d99426
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 19 16:17:46 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Jul 19 16:17:46 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=762d28d6

dev-db/mysql: Version bump for 5.6.37

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-db/mysql/Manifest            |   2 +
 dev-db/mysql/mysql-5.6.37.ebuild | 183 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 185 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index e931c6f0558..3fd9b95eee9 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,6 +1,8 @@
 DIST mysql-5.5.56.tar.gz 21025832 SHA256 3fd30a24267cef84ee8aeb327a5b08a669d3ab8c4d76d1b1b3b66d26cf777a0a SHA512 58aec4cfc82abac5bb9d5e5594d2545c979910af5b7bbcfe339f9590d157244c869a83659f89a2cca09254353ecb52d2dcb3e2cd55e117219e2a72c54187a975 WHIRLPOOL 5aa01ff21da05a86f5c3d5264afb9c5722001154d36c1042ab88bd38c02b9daae8cba47f933909579eb22872aeafb146e6b2d382f5a4c6319f163e261116de4d
 DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
 DIST mysql-5.6.36.tar.gz 32192348 SHA256 0af81a5538fc7fe2b747295dfa96589ace8831d2a7d4a26660fca456babeb147 SHA512 b3e3bcb1d1e913994f274f4c6dc72c77f1f52b132389e784c675d1720b5913788ce035f045b99ef3754d1b257db55e8300b5c7622ec79c33afafec5968801c18 WHIRLPOOL 628e33a58532dcdca20e489c3120824604b8d51e10d609f1f9c2adb11552124a8f87f206df99766162d288d5877dac22d2cacffdba1458c73fb52b529245a1e6
+DIST mysql-5.6.37.tar.gz 32200158 SHA256 59c4ed39047279ddccd1bed9e247830d2bfad27d56dc2eb48d0b5695c94a1fbd SHA512 6935cf11490fb32832468e2a69a9d81a567b1b4ab0afaa0614896e3ddbb95a74b26406284f307637e4b2b9620ef4d96a167128ce7fcb1d338b0ebbc2cef2e597 WHIRLPOOL d5e7f6445bacfa7cb118a805f0efff5f4c22d96e77c174efa7ae2d286f3889ab7975ece8a0abe6232d278994d5991430d0d0ff89769883f278d2fa233341db25
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd
 DIST mysql-extras-20170301-2020Z.tar.bz2 306195 SHA256 646eb75c838ac4241598cc0638877f50044ec702c82b1fc3ddefb99f1f4b3fae SHA512 b11b252d11b907e2b3be406e11b9a464092950696100afd575a2be78eac33251a9f56bf128b497beb8c801a2e5d02b11ad37ef78d25aed892a7aa90ca4c9581f WHIRLPOOL 466b18c388160d5c7557ed0e0bddc45eda823b0c1c490540fb61008da759b6559b6012593d7beb3de5123e247521ace925413abc28edd692585c282456d7fbf9
 DIST mysql-extras-20170302-1359Z.tar.bz2 306816 SHA256 0375bffa8a7b26caab3a13be299b30231f20ad3e8dc82fba9384e5463763a105 SHA512 2c096c68e0d545c98fb5520f92b9e85f6bbc910853793f60f0e67979ee927410bbecadece3400364fdc2b5682f9105664f6a2de8fa0ee1818fb266e063e82869 WHIRLPOOL 6629f0069b77c9add86f4a40168a1dad7bcc0ae18a513f05e44619366a5fdfb82238df2e925de88c358fca2dd50f162ffefd8efea335cb544ccdcf74e73ed25f
+DIST mysql-extras-20170719-1335Z.tar.bz2 311350 SHA256 725dc29fa4a553cfc0bd07dcc1259e5a38a6d945f757e9f49f554a9a7773abe7 SHA512 3450725b4cdcf1e330aee775c1c169510bd7f06f19b874a3e94203227d393b136165eca1e77270bfc37c534f4120aeeeb3df8fbd71704312836b79a99d81a122 WHIRLPOOL f1606df56f82847a8b4b332c1b61cb695aba2a51aef895fa9596495d89208535f829b8fa69a6e97a26d0b9171d817115b83ce447c8232197353dda258a6d38d0

diff --git a/dev-db/mysql/mysql-5.6.37.ebuild b/dev-db/mysql/mysql-5.6.37.ebuild
new file mode 100644
index 00000000000..1242f9b3ab3
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.37.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_EXTRAS_VER="20170719-1335Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+)
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		#
+		# main.events_2
+		# Fails on date in past without preserve causing the drop to fail
+
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+			main.events_2 \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		for t in main.mysql main.mysql_upgrade ; do
+			mysql-multilib-r1_disable_test  "$t" "Test $t broken upstream - error return value not updated"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-07-16  9:40 Tobias Klausmann
  0 siblings, 0 replies; 393+ messages in thread
From: Tobias Klausmann @ 2017-07-16  9:40 UTC (permalink / raw
  To: gentoo-commits

commit:     fc91339325977b38ca5332970dc05ff640aad928
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 16 09:40:48 2017 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Sun Jul 16 09:40:48 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc913393

dev-db/mysql-5.6.36-r0: add amd64 keyword

Gentoo-Bug: 616486

 dev-db/mysql/mysql-5.6.36.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.36.ebuild b/dev-db/mysql/mysql-5.6.36.ebuild
index b0f7119f0cd..3ced3a4395b 100644
--- a/dev-db/mysql/mysql-5.6.36.ebuild
+++ b/dev-db/mysql/mysql-5.6.36.ebuild
@@ -14,7 +14,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha ~amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-06-25  8:44 Sergei Trofimovich
  0 siblings, 0 replies; 393+ messages in thread
From: Sergei Trofimovich @ 2017-06-25  8:44 UTC (permalink / raw
  To: gentoo-commits

commit:     57d17c0a77fdd8dfd82849741493e9058c3ffeee
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 25 08:27:02 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jun 25 08:44:52 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57d17c0a

dev-db/mysql: ia64 stable, bug #616486

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-db/mysql/mysql-5.6.36.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.36.ebuild b/dev-db/mysql/mysql-5.6.36.ebuild
index 50d9251be01..b0f7119f0cd 100644
--- a/dev-db/mysql/mysql-5.6.36.ebuild
+++ b/dev-db/mysql/mysql-5.6.36.ebuild
@@ -14,7 +14,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha ~amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha ~amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-05-22 17:32 Tobias Klausmann
  0 siblings, 0 replies; 393+ messages in thread
From: Tobias Klausmann @ 2017-05-22 17:32 UTC (permalink / raw
  To: gentoo-commits

commit:     f9feffd95ffd51367dea7096be35e73695363643
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Mon May 22 17:32:23 2017 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Mon May 22 17:32:23 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9feffd9

dev-db/mysql-5.6.36-r0: add alpha keyword

Gentoo-Bug: 616486

 dev-db/mysql/mysql-5.6.36.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.36.ebuild b/dev-db/mysql/mysql-5.6.36.ebuild
index e5212fb66e5..50d9251be01 100644
--- a/dev-db/mysql/mysql-5.6.36.ebuild
+++ b/dev-db/mysql/mysql-5.6.36.ebuild
@@ -14,7 +14,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha ~amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-05-15 11:24 Michael Weber
  0 siblings, 0 replies; 393+ messages in thread
From: Michael Weber @ 2017-05-15 11:24 UTC (permalink / raw
  To: gentoo-commits

commit:     2c3b7ca399220f71fa0bb41b4c4dc3b5380d6644
Author:     Michael Weber <xmw <AT> gentoo <DOT> org>
AuthorDate: Mon May 15 11:23:33 2017 +0000
Commit:     Michael Weber <xmw <AT> gentoo <DOT> org>
CommitDate: Mon May 15 11:23:47 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c3b7ca3

dev-db/mysql: ppc ppc64 stable (bug 616486).

Package-Manager: Portage-2.3.5, Repoman-2.3.2
RepoMan-Options: --include-arches="ppc ppc64"

 dev-db/mysql/mysql-5.6.36.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.36.ebuild b/dev-db/mysql/mysql-5.6.36.ebuild
index aa03b1b7571..e5212fb66e5 100644
--- a/dev-db/mysql/mysql-5.6.36.ebuild
+++ b/dev-db/mysql/mysql-5.6.36.ebuild
@@ -14,7 +14,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 arm hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-05-13  6:25 Markus Meier
  0 siblings, 0 replies; 393+ messages in thread
From: Markus Meier @ 2017-05-13  6:25 UTC (permalink / raw
  To: gentoo-commits

commit:     210660968ad05206958b5f5412f5dddba48faab2
Author:     Markus Meier <maekke <AT> gentoo <DOT> org>
AuthorDate: Sat May 13 06:25:40 2017 +0000
Commit:     Markus Meier <maekke <AT> gentoo <DOT> org>
CommitDate: Sat May 13 06:25:40 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21066096

dev-db/mysql: arm stable, bug #616486

Package-Manager: Portage-2.3.5, Repoman-2.3.1
RepoMan-Options: --include-arches="arm"

 dev-db/mysql/mysql-5.6.36.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.36.ebuild b/dev-db/mysql/mysql-5.6.36.ebuild
index d0454e0cad9..aa03b1b7571 100644
--- a/dev-db/mysql/mysql-5.6.36.ebuild
+++ b/dev-db/mysql/mysql-5.6.36.ebuild
@@ -14,7 +14,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 arm hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-05-10 10:53 Jeroen Roovers
  0 siblings, 0 replies; 393+ messages in thread
From: Jeroen Roovers @ 2017-05-10 10:53 UTC (permalink / raw
  To: gentoo-commits

commit:     85726d99aff8784e3e2a152ca7eb3a4c0ed9fe25
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Wed May 10 10:53:41 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed May 10 10:53:41 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85726d99

dev-db/mysql: Stable for HPPA (bug #616486).

Package-Manager: Portage-2.3.5, Repoman-2.3.2
RepoMan-Options: --ignore-arches

 dev-db/mysql/mysql-5.6.36.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.36.ebuild b/dev-db/mysql/mysql-5.6.36.ebuild
index 5b094bd6763..d0454e0cad9 100644
--- a/dev-db/mysql/mysql-5.6.36.ebuild
+++ b/dev-db/mysql/mysql-5.6.36.ebuild
@@ -14,7 +14,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-05-07 23:44 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-05-07 23:44 UTC (permalink / raw
  To: gentoo-commits

commit:     42f06d59afa4fdccc941921707553b83fa9e5326
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sun May  7 23:42:08 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun May  7 23:42:08 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42f06d59

dev-db/mysql: Version bump for 5.5.56

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.5.56.ebuild | 125 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 126 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index cf52928b34e..732a560dc5a 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,5 +1,6 @@
 DIST mysql-5.5.54.tar.gz 21041949 SHA256 273bcbcf8cc84061eb07c359308563b2029eb3f70f78b558905bc1b5c5791ab8 SHA512 885e21a59cf7e835dd1ca7254889fc4e5762fdebbb1e625465ef7fa3be6533d48091b68a6d1f2de0297270cfd0ca7e8e643fc2e0b7fc14325f48708e7a55460b WHIRLPOOL bdb8ec54b6b831dba673c5a7b6328809e79b8406a511a108ced93bd3efa42d718d35462cf0bf098db0a1108217d5d47c19c2540d87ad5f1ccfd66c55dd67ca3f
 DIST mysql-5.5.55.tar.gz 21040959 SHA256 9af0a504e2603b0bc0c7c3a4a747df064fb51670a0022b1ad6114f9058b64171 SHA512 3da7a45665e54fd77461980e3096937470aaa6308d89c8b5b9bee54ca11050cc08aab56063f07fb0f166e564329576a1be52ec8815e855ccca9e1076a03faac9 WHIRLPOOL a140850d30e80ae36b4dd43530eb50d52094dd65050f25b50cbd5d28da9985339e3ae59d925014e965e777343fd9550c47ed79a38065deb3dee3af44ca48b097
+DIST mysql-5.5.56.tar.gz 21025832 SHA256 3fd30a24267cef84ee8aeb327a5b08a669d3ab8c4d76d1b1b3b66d26cf777a0a SHA512 58aec4cfc82abac5bb9d5e5594d2545c979910af5b7bbcfe339f9590d157244c869a83659f89a2cca09254353ecb52d2dcb3e2cd55e117219e2a72c54187a975 WHIRLPOOL 5aa01ff21da05a86f5c3d5264afb9c5722001154d36c1042ab88bd38c02b9daae8cba47f933909579eb22872aeafb146e6b2d382f5a4c6319f163e261116de4d
 DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
 DIST mysql-5.6.36.tar.gz 32192348 SHA256 0af81a5538fc7fe2b747295dfa96589ace8831d2a7d4a26660fca456babeb147 SHA512 b3e3bcb1d1e913994f274f4c6dc72c77f1f52b132389e784c675d1720b5913788ce035f045b99ef3754d1b257db55e8300b5c7622ec79c33afafec5968801c18 WHIRLPOOL 628e33a58532dcdca20e489c3120824604b8d51e10d609f1f9c2adb11552124a8f87f206df99766162d288d5877dac22d2cacffdba1458c73fb52b529245a1e6
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd

diff --git a/dev-db/mysql/mysql-5.5.56.ebuild b/dev-db/mysql/mysql-5.5.56.ebuild
new file mode 100644
index 00000000000..483b3462e93
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.56.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+MY_EXTRAS_VER="20170301-2020Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE='20019_all_mysql-5.5-mtr-perl-deprecation.patch'
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test main.openssl_1 \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-05-07 23:44 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-05-07 23:44 UTC (permalink / raw
  To: gentoo-commits

commit:     f4002a1f6df48aab093a074975ad7fadd14ba515
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sun May  7 23:43:54 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun May  7 23:43:54 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4002a1f

dev-db/mysql: Drop security vulnerable versions for the 5.5 series

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 dev-db/mysql/Manifest               |   2 -
 dev-db/mysql/mysql-5.5.54-r1.ebuild | 125 ------------------------------------
 dev-db/mysql/mysql-5.5.55.ebuild    | 125 ------------------------------------
 3 files changed, 252 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 732a560dc5a..e931c6f0558 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,5 +1,3 @@
-DIST mysql-5.5.54.tar.gz 21041949 SHA256 273bcbcf8cc84061eb07c359308563b2029eb3f70f78b558905bc1b5c5791ab8 SHA512 885e21a59cf7e835dd1ca7254889fc4e5762fdebbb1e625465ef7fa3be6533d48091b68a6d1f2de0297270cfd0ca7e8e643fc2e0b7fc14325f48708e7a55460b WHIRLPOOL bdb8ec54b6b831dba673c5a7b6328809e79b8406a511a108ced93bd3efa42d718d35462cf0bf098db0a1108217d5d47c19c2540d87ad5f1ccfd66c55dd67ca3f
-DIST mysql-5.5.55.tar.gz 21040959 SHA256 9af0a504e2603b0bc0c7c3a4a747df064fb51670a0022b1ad6114f9058b64171 SHA512 3da7a45665e54fd77461980e3096937470aaa6308d89c8b5b9bee54ca11050cc08aab56063f07fb0f166e564329576a1be52ec8815e855ccca9e1076a03faac9 WHIRLPOOL a140850d30e80ae36b4dd43530eb50d52094dd65050f25b50cbd5d28da9985339e3ae59d925014e965e777343fd9550c47ed79a38065deb3dee3af44ca48b097
 DIST mysql-5.5.56.tar.gz 21025832 SHA256 3fd30a24267cef84ee8aeb327a5b08a669d3ab8c4d76d1b1b3b66d26cf777a0a SHA512 58aec4cfc82abac5bb9d5e5594d2545c979910af5b7bbcfe339f9590d157244c869a83659f89a2cca09254353ecb52d2dcb3e2cd55e117219e2a72c54187a975 WHIRLPOOL 5aa01ff21da05a86f5c3d5264afb9c5722001154d36c1042ab88bd38c02b9daae8cba47f933909579eb22872aeafb146e6b2d382f5a4c6319f163e261116de4d
 DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
 DIST mysql-5.6.36.tar.gz 32192348 SHA256 0af81a5538fc7fe2b747295dfa96589ace8831d2a7d4a26660fca456babeb147 SHA512 b3e3bcb1d1e913994f274f4c6dc72c77f1f52b132389e784c675d1720b5913788ce035f045b99ef3754d1b257db55e8300b5c7622ec79c33afafec5968801c18 WHIRLPOOL 628e33a58532dcdca20e489c3120824604b8d51e10d609f1f9c2adb11552124a8f87f206df99766162d288d5877dac22d2cacffdba1458c73fb52b529245a1e6

diff --git a/dev-db/mysql/mysql-5.5.54-r1.ebuild b/dev-db/mysql/mysql-5.5.54-r1.ebuild
deleted file mode 100644
index 483b3462e93..00000000000
--- a/dev-db/mysql/mysql-5.5.54-r1.ebuild
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-MY_EXTRAS_VER="20170301-2020Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE='20019_all_mysql-5.5-mtr-perl-deprecation.patch'
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test main.openssl_1 \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.5.55.ebuild b/dev-db/mysql/mysql-5.5.55.ebuild
deleted file mode 100644
index 483b3462e93..00000000000
--- a/dev-db/mysql/mysql-5.5.55.ebuild
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-MY_EXTRAS_VER="20170301-2020Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE='20019_all_mysql-5.5-mtr-perl-deprecation.patch'
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test main.openssl_1 \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-04-10 18:42 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-04-10 18:42 UTC (permalink / raw
  To: gentoo-commits

commit:     b174c20744110aa842255ab48d58ed1c2c185f38
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 10 18:42:14 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Apr 10 18:42:14 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b174c207

dev-db/mysql: Version bump to 5.6.36

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.6.36.ebuild | 177 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 178 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 6a9cc5b93e0..cf52928b34e 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,6 +1,7 @@
 DIST mysql-5.5.54.tar.gz 21041949 SHA256 273bcbcf8cc84061eb07c359308563b2029eb3f70f78b558905bc1b5c5791ab8 SHA512 885e21a59cf7e835dd1ca7254889fc4e5762fdebbb1e625465ef7fa3be6533d48091b68a6d1f2de0297270cfd0ca7e8e643fc2e0b7fc14325f48708e7a55460b WHIRLPOOL bdb8ec54b6b831dba673c5a7b6328809e79b8406a511a108ced93bd3efa42d718d35462cf0bf098db0a1108217d5d47c19c2540d87ad5f1ccfd66c55dd67ca3f
 DIST mysql-5.5.55.tar.gz 21040959 SHA256 9af0a504e2603b0bc0c7c3a4a747df064fb51670a0022b1ad6114f9058b64171 SHA512 3da7a45665e54fd77461980e3096937470aaa6308d89c8b5b9bee54ca11050cc08aab56063f07fb0f166e564329576a1be52ec8815e855ccca9e1076a03faac9 WHIRLPOOL a140850d30e80ae36b4dd43530eb50d52094dd65050f25b50cbd5d28da9985339e3ae59d925014e965e777343fd9550c47ed79a38065deb3dee3af44ca48b097
 DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
+DIST mysql-5.6.36.tar.gz 32192348 SHA256 0af81a5538fc7fe2b747295dfa96589ace8831d2a7d4a26660fca456babeb147 SHA512 b3e3bcb1d1e913994f274f4c6dc72c77f1f52b132389e784c675d1720b5913788ce035f045b99ef3754d1b257db55e8300b5c7622ec79c33afafec5968801c18 WHIRLPOOL 628e33a58532dcdca20e489c3120824604b8d51e10d609f1f9c2adb11552124a8f87f206df99766162d288d5877dac22d2cacffdba1458c73fb52b529245a1e6
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd
 DIST mysql-extras-20170301-2020Z.tar.bz2 306195 SHA256 646eb75c838ac4241598cc0638877f50044ec702c82b1fc3ddefb99f1f4b3fae SHA512 b11b252d11b907e2b3be406e11b9a464092950696100afd575a2be78eac33251a9f56bf128b497beb8c801a2e5d02b11ad37ef78d25aed892a7aa90ca4c9581f WHIRLPOOL 466b18c388160d5c7557ed0e0bddc45eda823b0c1c490540fb61008da759b6559b6012593d7beb3de5123e247521ace925413abc28edd692585c282456d7fbf9
 DIST mysql-extras-20170302-1359Z.tar.bz2 306816 SHA256 0375bffa8a7b26caab3a13be299b30231f20ad3e8dc82fba9384e5463763a105 SHA512 2c096c68e0d545c98fb5520f92b9e85f6bbc910853793f60f0e67979ee927410bbecadece3400364fdc2b5682f9105664f6a2de8fa0ee1818fb266e063e82869 WHIRLPOOL 6629f0069b77c9add86f4a40168a1dad7bcc0ae18a513f05e44619366a5fdfb82238df2e925de88c358fca2dd50f162ffefd8efea335cb544ccdcf74e73ed25f

diff --git a/dev-db/mysql/mysql-5.6.36.ebuild b/dev-db/mysql/mysql-5.6.36.ebuild
new file mode 100644
index 00000000000..5b094bd6763
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.36.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_EXTRAS_VER="20170302-1359Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+)
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		#
+		# main.events_2
+		# Fails on date in past without preserve causing the drop to fail
+
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+			main.events_2 \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-04-10 16:21 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-04-10 16:21 UTC (permalink / raw
  To: gentoo-commits

commit:     22f1bf754888ca60149c8101527a0ca35712ed8a
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 10 16:20:57 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Apr 10 16:20:57 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22f1bf75

dev-db/mysql: Version bump to 5.5.55

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.5.55.ebuild | 125 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 126 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 54082097429..6a9cc5b93e0 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,5 @@
 DIST mysql-5.5.54.tar.gz 21041949 SHA256 273bcbcf8cc84061eb07c359308563b2029eb3f70f78b558905bc1b5c5791ab8 SHA512 885e21a59cf7e835dd1ca7254889fc4e5762fdebbb1e625465ef7fa3be6533d48091b68a6d1f2de0297270cfd0ca7e8e643fc2e0b7fc14325f48708e7a55460b WHIRLPOOL bdb8ec54b6b831dba673c5a7b6328809e79b8406a511a108ced93bd3efa42d718d35462cf0bf098db0a1108217d5d47c19c2540d87ad5f1ccfd66c55dd67ca3f
+DIST mysql-5.5.55.tar.gz 21040959 SHA256 9af0a504e2603b0bc0c7c3a4a747df064fb51670a0022b1ad6114f9058b64171 SHA512 3da7a45665e54fd77461980e3096937470aaa6308d89c8b5b9bee54ca11050cc08aab56063f07fb0f166e564329576a1be52ec8815e855ccca9e1076a03faac9 WHIRLPOOL a140850d30e80ae36b4dd43530eb50d52094dd65050f25b50cbd5d28da9985339e3ae59d925014e965e777343fd9550c47ed79a38065deb3dee3af44ca48b097
 DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd
 DIST mysql-extras-20170301-2020Z.tar.bz2 306195 SHA256 646eb75c838ac4241598cc0638877f50044ec702c82b1fc3ddefb99f1f4b3fae SHA512 b11b252d11b907e2b3be406e11b9a464092950696100afd575a2be78eac33251a9f56bf128b497beb8c801a2e5d02b11ad37ef78d25aed892a7aa90ca4c9581f WHIRLPOOL 466b18c388160d5c7557ed0e0bddc45eda823b0c1c490540fb61008da759b6559b6012593d7beb3de5123e247521ace925413abc28edd692585c282456d7fbf9

diff --git a/dev-db/mysql/mysql-5.5.55.ebuild b/dev-db/mysql/mysql-5.5.55.ebuild
new file mode 100644
index 00000000000..483b3462e93
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.55.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+MY_EXTRAS_VER="20170301-2020Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE='20019_all_mysql-5.5-mtr-perl-deprecation.patch'
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test main.openssl_1 \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-03-02 14:48 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-03-02 14:48 UTC (permalink / raw
  To: gentoo-commits

commit:     39c2f2d4a6335fa23f2f179bf73fee982f4852a7
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  2 14:48:37 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Thu Mar  2 14:48:37 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39c2f2d4

dev-db/mysql: Revision bump to restore Gentoo patches

They were previously applied but lost in the transition to EAPI6

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-db/mysql/Manifest               |   1 +
 dev-db/mysql/mysql-5.6.35-r1.ebuild | 177 ++++++++++++++++++++++++++++++++++++
 2 files changed, 178 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index a1fc29984fe..54082097429 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -2,3 +2,4 @@ DIST mysql-5.5.54.tar.gz 21041949 SHA256 273bcbcf8cc84061eb07c359308563b2029eb3f
 DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd
 DIST mysql-extras-20170301-2020Z.tar.bz2 306195 SHA256 646eb75c838ac4241598cc0638877f50044ec702c82b1fc3ddefb99f1f4b3fae SHA512 b11b252d11b907e2b3be406e11b9a464092950696100afd575a2be78eac33251a9f56bf128b497beb8c801a2e5d02b11ad37ef78d25aed892a7aa90ca4c9581f WHIRLPOOL 466b18c388160d5c7557ed0e0bddc45eda823b0c1c490540fb61008da759b6559b6012593d7beb3de5123e247521ace925413abc28edd692585c282456d7fbf9
+DIST mysql-extras-20170302-1359Z.tar.bz2 306816 SHA256 0375bffa8a7b26caab3a13be299b30231f20ad3e8dc82fba9384e5463763a105 SHA512 2c096c68e0d545c98fb5520f92b9e85f6bbc910853793f60f0e67979ee927410bbecadece3400364fdc2b5682f9105664f6a2de8fa0ee1818fb266e063e82869 WHIRLPOOL 6629f0069b77c9add86f4a40168a1dad7bcc0ae18a513f05e44619366a5fdfb82238df2e925de88c358fca2dd50f162ffefd8efea335cb544ccdcf74e73ed25f

diff --git a/dev-db/mysql/mysql-5.6.35-r1.ebuild b/dev-db/mysql/mysql-5.6.35-r1.ebuild
new file mode 100644
index 00000000000..5b094bd6763
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.35-r1.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_EXTRAS_VER="20170302-1359Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+	"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+	"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+	"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+	"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink.patch
+	"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+)
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		#
+		# main.events_2
+		# Fails on date in past without preserve causing the drop to fail
+
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+			main.events_2 \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-03-01 20:59 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2017-03-01 20:59 UTC (permalink / raw
  To: gentoo-commits

commit:     62004c5b77c62f81b802a11acd3e8ea8cce13a35
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  1 20:57:19 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Mar  1 20:59:08 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62004c5b

dev-db/mysql: Add patch for CVE-2017-3302 to 5.5 branch (bug #611318)

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-db/mysql/Manifest               |   1 +
 dev-db/mysql/mysql-5.5.54-r1.ebuild | 125 ++++++++++++++++++++++++++++++++++++
 2 files changed, 126 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 3bc022334cf..e8e48da8262 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -2,3 +2,4 @@ DIST mysql-5.5.54.tar.gz 21041949 SHA256 273bcbcf8cc84061eb07c359308563b2029eb3f
 DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd
 DIST mysql-extras-20161019-1853Z.tar.bz2 304137 SHA256 985a498fd45b2fb0d9ca06f45c18823b019cd807a6dfea1f3a1fd9e7dde970e4 SHA512 2f46663e268f46db9c8102a0c69d5ded1d1b5cde74d446586f5faf9a74e4de1afbeade79922faab91cd2b214d3dd1298bcd02df915d3f09f07ec649bba1aa390 WHIRLPOOL d0326a0399fa2a79a1446b4dbcd7528089cb14c7598ec83a54817c5d41bc144c9a5215954067c4f19932a4a6ec3d4bc4dca95ba735694b4ef0421a59479ca4f0
+DIST mysql-extras-20170301-2020Z.tar.bz2 306195 SHA256 646eb75c838ac4241598cc0638877f50044ec702c82b1fc3ddefb99f1f4b3fae SHA512 b11b252d11b907e2b3be406e11b9a464092950696100afd575a2be78eac33251a9f56bf128b497beb8c801a2e5d02b11ad37ef78d25aed892a7aa90ca4c9581f WHIRLPOOL 466b18c388160d5c7557ed0e0bddc45eda823b0c1c490540fb61008da759b6559b6012593d7beb3de5123e247521ace925413abc28edd692585c282456d7fbf9

diff --git a/dev-db/mysql/mysql-5.5.54-r1.ebuild b/dev-db/mysql/mysql-5.5.54-r1.ebuild
new file mode 100644
index 00000000000..483b3462e93
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.54-r1.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+MY_EXTRAS_VER="20170301-2020Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE='20019_all_mysql-5.5-mtr-perl-deprecation.patch'
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test main.openssl_1 \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-03-01 20:59 Thomas Deutschmann
  0 siblings, 0 replies; 393+ messages in thread
From: Thomas Deutschmann @ 2017-03-01 20:59 UTC (permalink / raw
  To: gentoo-commits

commit:     50d033dbf53a7777e60a8535ae5d8c51d371e361
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  1 20:58:29 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Mar  1 20:59:10 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50d033db

dev-db/mysql: Drop old security vulnerable version (bug #611318)

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-db/mysql/Manifest            |   1 -
 dev-db/mysql/mysql-5.5.54.ebuild | 125 ---------------------------------------
 2 files changed, 126 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index e8e48da8262..a1fc29984fe 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,5 +1,4 @@
 DIST mysql-5.5.54.tar.gz 21041949 SHA256 273bcbcf8cc84061eb07c359308563b2029eb3f70f78b558905bc1b5c5791ab8 SHA512 885e21a59cf7e835dd1ca7254889fc4e5762fdebbb1e625465ef7fa3be6533d48091b68a6d1f2de0297270cfd0ca7e8e643fc2e0b7fc14325f48708e7a55460b WHIRLPOOL bdb8ec54b6b831dba673c5a7b6328809e79b8406a511a108ced93bd3efa42d718d35462cf0bf098db0a1108217d5d47c19c2540d87ad5f1ccfd66c55dd67ca3f
 DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd
-DIST mysql-extras-20161019-1853Z.tar.bz2 304137 SHA256 985a498fd45b2fb0d9ca06f45c18823b019cd807a6dfea1f3a1fd9e7dde970e4 SHA512 2f46663e268f46db9c8102a0c69d5ded1d1b5cde74d446586f5faf9a74e4de1afbeade79922faab91cd2b214d3dd1298bcd02df915d3f09f07ec649bba1aa390 WHIRLPOOL d0326a0399fa2a79a1446b4dbcd7528089cb14c7598ec83a54817c5d41bc144c9a5215954067c4f19932a4a6ec3d4bc4dca95ba735694b4ef0421a59479ca4f0
 DIST mysql-extras-20170301-2020Z.tar.bz2 306195 SHA256 646eb75c838ac4241598cc0638877f50044ec702c82b1fc3ddefb99f1f4b3fae SHA512 b11b252d11b907e2b3be406e11b9a464092950696100afd575a2be78eac33251a9f56bf128b497beb8c801a2e5d02b11ad37ef78d25aed892a7aa90ca4c9581f WHIRLPOOL 466b18c388160d5c7557ed0e0bddc45eda823b0c1c490540fb61008da759b6559b6012593d7beb3de5123e247521ace925413abc28edd692585c282456d7fbf9

diff --git a/dev-db/mysql/mysql-5.5.54.ebuild b/dev-db/mysql/mysql-5.5.54.ebuild
deleted file mode 100644
index 91a0d96963b..00000000000
--- a/dev-db/mysql/mysql-5.5.54.ebuild
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-MY_EXTRAS_VER="20161019-1853Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE='20019_all_mysql-5.5-mtr-perl-deprecation.patch'
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test main.openssl_1 \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-02-06 14:02 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2017-02-06 14:02 UTC (permalink / raw
  To: gentoo-commits

commit:     abc93cdb904e5cbc3a801038d7bdeddb953e507a
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  6 14:01:46 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Feb  6 14:01:46 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abc93cdb

dev-db/mysql: Drop security vulnerable versions wrt bug 606254

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-db/mysql/Manifest            |   2 -
 dev-db/mysql/mysql-5.5.53.ebuild | 126 ------------------------------
 dev-db/mysql/mysql-5.6.34.ebuild | 164 ---------------------------------------
 3 files changed, 292 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index c0f0022..3bc0223 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,6 +1,4 @@
-DIST mysql-5.5.53.tar.gz 21035716 SHA256 a7a86dd42524e698c9dd8dab2520e6e75377cde077ed71eaf5a3b5a3d1f7d6ea SHA512 b69344149fbb7955221ba961a760ce963271eee732a5009b5ddf202c86af3532042c0a438dcbc38828bdc55a1a6e61ae0c2b1ced90bd3af59ebb1ac030c1069f WHIRLPOOL 0fe92b67faedff1f3edcc34b1c3823b0fed55d91bf2d26de7b214b951f0e9e75d4b79eb3f2db193a3eeff71f772b5eb60e4bbc4a7af05d72684f4b181ffb500c
 DIST mysql-5.5.54.tar.gz 21041949 SHA256 273bcbcf8cc84061eb07c359308563b2029eb3f70f78b558905bc1b5c5791ab8 SHA512 885e21a59cf7e835dd1ca7254889fc4e5762fdebbb1e625465ef7fa3be6533d48091b68a6d1f2de0297270cfd0ca7e8e643fc2e0b7fc14325f48708e7a55460b WHIRLPOOL bdb8ec54b6b831dba673c5a7b6328809e79b8406a511a108ced93bd3efa42d718d35462cf0bf098db0a1108217d5d47c19c2540d87ad5f1ccfd66c55dd67ca3f
-DIST mysql-5.6.34.tar.gz 32094762 SHA256 ee90bafec6af3abe2715ccb0b3cc9345ed8d1cce025d41e6ec2b2b7a7d820823 SHA512 2395455d6b62161695b6923a3da05480f5a6044e695adf3619459655adbfa63e9c82abbbe20f2ba1096a5900bb850af8b5b3a9306526fceb42f4479bae5dd6f2 WHIRLPOOL 888d3cd4d7ed56defe4ae127a6f31c8aa7a3e43285c8b43c001203eefaf5ffb19b5508cb5facd05d0aa5a9edb713dc0dd506b0d46dbf815177f253da29870fab
 DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd
 DIST mysql-extras-20161019-1853Z.tar.bz2 304137 SHA256 985a498fd45b2fb0d9ca06f45c18823b019cd807a6dfea1f3a1fd9e7dde970e4 SHA512 2f46663e268f46db9c8102a0c69d5ded1d1b5cde74d446586f5faf9a74e4de1afbeade79922faab91cd2b214d3dd1298bcd02df915d3f09f07ec649bba1aa390 WHIRLPOOL d0326a0399fa2a79a1446b4dbcd7528089cb14c7598ec83a54817c5d41bc144c9a5215954067c4f19932a4a6ec3d4bc4dca95ba735694b4ef0421a59479ca4f0

diff --git a/dev-db/mysql/mysql-5.5.53.ebuild b/dev-db/mysql/mysql-5.5.53.ebuild
deleted file mode 100644
index 6a9e6af..00000000
--- a/dev-db/mysql/mysql-5.5.53.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20161019-1853Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE='20019_all_mysql-5.5-mtr-perl-deprecation.patch'
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test main.openssl_1 \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.34.ebuild b/dev-db/mysql/mysql-5.6.34.ebuild
deleted file mode 100644
index a85a16a..00000000
--- a/dev-db/mysql/mysql-5.6.34.ebuild
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="6"
-
-MY_EXTRAS_VER="20160212-0233Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-02-05 17:02 Markus Meier
  0 siblings, 0 replies; 393+ messages in thread
From: Markus Meier @ 2017-02-05 17:02 UTC (permalink / raw
  To: gentoo-commits

commit:     3b6ef32786d12eca0bdcfc4acaf122922d8a91ba
Author:     Markus Meier <maekke <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  5 17:02:30 2017 +0000
Commit:     Markus Meier <maekke <AT> gentoo <DOT> org>
CommitDate: Sun Feb  5 17:02:30 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b6ef327

dev-db/mysql: arm stable, bug #606254

Package-Manager: Portage-2.3.3, Repoman-2.3.1
RepoMan-Options: --include-arches="arm"

 dev-db/mysql/mysql-5.6.35.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.35.ebuild b/dev-db/mysql/mysql-5.6.35.ebuild
index f01d392..a85a16a 100644
--- a/dev-db/mysql/mysql-5.6.35.ebuild
+++ b/dev-db/mysql/mysql-5.6.35.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-01-25  6:39 Jeroen Roovers
  0 siblings, 0 replies; 393+ messages in thread
From: Jeroen Roovers @ 2017-01-25  6:39 UTC (permalink / raw
  To: gentoo-commits

commit:     9455c569c2eace55c201c23fcf080d14cde3fd7d
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 25 06:22:38 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed Jan 25 06:38:44 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9455c569

dev-db/mysql: Stable for HPPA (bug #606254).

Package-Manager: Portage-2.3.3, Repoman-2.3.1
RepoMan-Options: --ignore-arches

 dev-db/mysql/mysql-5.6.35.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.35.ebuild b/dev-db/mysql/mysql-5.6.35.ebuild
index 9c15802..e7d2766 100644
--- a/dev-db/mysql/mysql-5.6.35.ebuild
+++ b/dev-db/mysql/mysql-5.6.35.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-01-21 11:37 Tobias Klausmann
  0 siblings, 0 replies; 393+ messages in thread
From: Tobias Klausmann @ 2017-01-21 11:37 UTC (permalink / raw
  To: gentoo-commits

commit:     82e8e0c59d7b8994332b4c89462654f66a1af072
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 21 10:30:18 2017 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Sat Jan 21 11:37:03 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82e8e0c5

dev-db/mysql-5.6.35-r0: stable on alpha

Gentoo-Bug: 606254

 dev-db/mysql/mysql-5.6.35.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.35.ebuild b/dev-db/mysql/mysql-5.6.35.ebuild
index 68bf8a2..d2252f4 100644
--- a/dev-db/mysql/mysql-5.6.35.ebuild
+++ b/dev-db/mysql/mysql-5.6.35.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-01-19 11:34 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2017-01-19 11:34 UTC (permalink / raw
  To: gentoo-commits

commit:     1ba44dfd040db7a40aea902fde1ac8f44d71248d
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 19 11:34:12 2017 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Jan 19 11:34:12 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ba44dfd

dev-db/mysql: x86 stable wrt bug #606254

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.35.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.35.ebuild b/dev-db/mysql/mysql-5.6.35.ebuild
index c19eb96..062576c 100644
--- a/dev-db/mysql/mysql-5.6.35.ebuild
+++ b/dev-db/mysql/mysql-5.6.35.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2017-01-19 11:25 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2017-01-19 11:25 UTC (permalink / raw
  To: gentoo-commits

commit:     1d7016950e9fa292e2c76095073ab8ea8fee86b4
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 19 11:25:38 2017 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Jan 19 11:25:38 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d701695

dev-db/mysql: amd64 stable wrt bug #606254

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.35.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.35.ebuild b/dev-db/mysql/mysql-5.6.35.ebuild
index 81b02ef..c19eb96 100644
--- a/dev-db/mysql/mysql-5.6.35.ebuild
+++ b/dev-db/mysql/mysql-5.6.35.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-12-20 14:02 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-12-20 14:02 UTC (permalink / raw
  To: gentoo-commits

commit:     9abbdc7205262b751b7a53b34e06305c6b0f76f6
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 20 13:57:10 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Dec 20 14:02:05 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9abbdc72

dev-db/mysql: Security cleanup wrt bug 597538

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-db/mysql/Manifest            |   1 -
 dev-db/mysql/mysql-5.6.33.ebuild | 164 ---------------------------------------
 2 files changed, 165 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index cbcb294..c0f0022 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,6 +1,5 @@
 DIST mysql-5.5.53.tar.gz 21035716 SHA256 a7a86dd42524e698c9dd8dab2520e6e75377cde077ed71eaf5a3b5a3d1f7d6ea SHA512 b69344149fbb7955221ba961a760ce963271eee732a5009b5ddf202c86af3532042c0a438dcbc38828bdc55a1a6e61ae0c2b1ced90bd3af59ebb1ac030c1069f WHIRLPOOL 0fe92b67faedff1f3edcc34b1c3823b0fed55d91bf2d26de7b214b951f0e9e75d4b79eb3f2db193a3eeff71f772b5eb60e4bbc4a7af05d72684f4b181ffb500c
 DIST mysql-5.5.54.tar.gz 21041949 SHA256 273bcbcf8cc84061eb07c359308563b2029eb3f70f78b558905bc1b5c5791ab8 SHA512 885e21a59cf7e835dd1ca7254889fc4e5762fdebbb1e625465ef7fa3be6533d48091b68a6d1f2de0297270cfd0ca7e8e643fc2e0b7fc14325f48708e7a55460b WHIRLPOOL bdb8ec54b6b831dba673c5a7b6328809e79b8406a511a108ced93bd3efa42d718d35462cf0bf098db0a1108217d5d47c19c2540d87ad5f1ccfd66c55dd67ca3f
-DIST mysql-5.6.33.tar.gz 32094894 SHA256 60776ec27d78b59f597e71738c5bcdea64dcba33c36fede320d5930320b1fef0 SHA512 d6f96dfd379b7ddaf3897a04ad756169a9d71319894551cba561e5ab2298dc21526004f656f50850c81bbe52af158926f87badc34d07b2b92107bc136e08359a WHIRLPOOL 76c1340114710d7c9ca7e5316a49e4544a2dc52a6dec66f31f2d16fbe2f1060a5bbcb449ea52fc0461facaaf85c4bbb5f483af76da2ae0b76b6169fa91416078
 DIST mysql-5.6.34.tar.gz 32094762 SHA256 ee90bafec6af3abe2715ccb0b3cc9345ed8d1cce025d41e6ec2b2b7a7d820823 SHA512 2395455d6b62161695b6923a3da05480f5a6044e695adf3619459655adbfa63e9c82abbbe20f2ba1096a5900bb850af8b5b3a9306526fceb42f4479bae5dd6f2 WHIRLPOOL 888d3cd4d7ed56defe4ae127a6f31c8aa7a3e43285c8b43c001203eefaf5ffb19b5508cb5facd05d0aa5a9edb713dc0dd506b0d46dbf815177f253da29870fab
 DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd

diff --git a/dev-db/mysql/mysql-5.6.33.ebuild b/dev-db/mysql/mysql-5.6.33.ebuild
deleted file mode 100644
index a9a6c12..00000000
--- a/dev-db/mysql/mysql-5.6.33.ebuild
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="6"
-
-MY_EXTRAS_VER="20160212-0233Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-12-14 17:14 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-12-14 17:14 UTC (permalink / raw
  To: gentoo-commits

commit:     3652d308b127c2a35c3d6d12d138b06c30a1df4e
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 14 17:12:04 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Dec 14 17:14:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3652d308

dev-db/mysql: Version bumps

Package-Manager: portage-2.3.3

 dev-db/mysql/Manifest            |   2 +
 dev-db/mysql/mysql-5.5.54.ebuild | 126 ++++++++++++++++++++++++++++++
 dev-db/mysql/mysql-5.6.35.ebuild | 164 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 292 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 3002687..cbcb294 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,5 +1,7 @@
 DIST mysql-5.5.53.tar.gz 21035716 SHA256 a7a86dd42524e698c9dd8dab2520e6e75377cde077ed71eaf5a3b5a3d1f7d6ea SHA512 b69344149fbb7955221ba961a760ce963271eee732a5009b5ddf202c86af3532042c0a438dcbc38828bdc55a1a6e61ae0c2b1ced90bd3af59ebb1ac030c1069f WHIRLPOOL 0fe92b67faedff1f3edcc34b1c3823b0fed55d91bf2d26de7b214b951f0e9e75d4b79eb3f2db193a3eeff71f772b5eb60e4bbc4a7af05d72684f4b181ffb500c
+DIST mysql-5.5.54.tar.gz 21041949 SHA256 273bcbcf8cc84061eb07c359308563b2029eb3f70f78b558905bc1b5c5791ab8 SHA512 885e21a59cf7e835dd1ca7254889fc4e5762fdebbb1e625465ef7fa3be6533d48091b68a6d1f2de0297270cfd0ca7e8e643fc2e0b7fc14325f48708e7a55460b WHIRLPOOL bdb8ec54b6b831dba673c5a7b6328809e79b8406a511a108ced93bd3efa42d718d35462cf0bf098db0a1108217d5d47c19c2540d87ad5f1ccfd66c55dd67ca3f
 DIST mysql-5.6.33.tar.gz 32094894 SHA256 60776ec27d78b59f597e71738c5bcdea64dcba33c36fede320d5930320b1fef0 SHA512 d6f96dfd379b7ddaf3897a04ad756169a9d71319894551cba561e5ab2298dc21526004f656f50850c81bbe52af158926f87badc34d07b2b92107bc136e08359a WHIRLPOOL 76c1340114710d7c9ca7e5316a49e4544a2dc52a6dec66f31f2d16fbe2f1060a5bbcb449ea52fc0461facaaf85c4bbb5f483af76da2ae0b76b6169fa91416078
 DIST mysql-5.6.34.tar.gz 32094762 SHA256 ee90bafec6af3abe2715ccb0b3cc9345ed8d1cce025d41e6ec2b2b7a7d820823 SHA512 2395455d6b62161695b6923a3da05480f5a6044e695adf3619459655adbfa63e9c82abbbe20f2ba1096a5900bb850af8b5b3a9306526fceb42f4479bae5dd6f2 WHIRLPOOL 888d3cd4d7ed56defe4ae127a6f31c8aa7a3e43285c8b43c001203eefaf5ffb19b5508cb5facd05d0aa5a9edb713dc0dd506b0d46dbf815177f253da29870fab
+DIST mysql-5.6.35.tar.gz 32167628 SHA256 dddcba169b98844d7c65346cbd791c853edf942d78440381685087b84aa35020 SHA512 106c4b05c52cd2bb5378376e4a453aeb55eda0adce527862c435068597c3e60f44e3c64476011befefd688e6fdf30f2245e28320d57d9fccbb2415d87498e7f2 WHIRLPOOL e8972bba163453e54dc3859a7cfd07b4dc38125e0b5f7b41940afa6f1466820079f18e88769ea198b12645383d105340ab5ea998b32a95d083d08689658510bc
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd
 DIST mysql-extras-20161019-1853Z.tar.bz2 304137 SHA256 985a498fd45b2fb0d9ca06f45c18823b019cd807a6dfea1f3a1fd9e7dde970e4 SHA512 2f46663e268f46db9c8102a0c69d5ded1d1b5cde74d446586f5faf9a74e4de1afbeade79922faab91cd2b214d3dd1298bcd02df915d3f09f07ec649bba1aa390 WHIRLPOOL d0326a0399fa2a79a1446b4dbcd7528089cb14c7598ec83a54817c5d41bc144c9a5215954067c4f19932a4a6ec3d4bc4dca95ba735694b4ef0421a59479ca4f0

diff --git a/dev-db/mysql/mysql-5.5.54.ebuild b/dev-db/mysql/mysql-5.5.54.ebuild
new file mode 100644
index 00000000..e2f519a
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.54.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20161019-1853Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE='20019_all_mysql-5.5-mtr-perl-deprecation.patch'
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test main.openssl_1 \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}

diff --git a/dev-db/mysql/mysql-5.6.35.ebuild b/dev-db/mysql/mysql-5.6.35.ebuild
new file mode 100644
index 00000000..81b02ef
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.35.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+MY_EXTRAS_VER="20160212-0233Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-10-31  7:42 Jeroen Roovers
  0 siblings, 0 replies; 393+ messages in thread
From: Jeroen Roovers @ 2016-10-31  7:42 UTC (permalink / raw
  To: gentoo-commits

commit:     22dcddd36c3fe8b35963b2a8b8b2bff2c41bdb03
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 31 07:39:56 2016 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Mon Oct 31 07:39:56 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22dcddd3

dev-db/mysql: Stable for HPPA (bug #597538).

Package-Manager: portage-2.3.2
RepoMan-Options: --ignore-arches

 dev-db/mysql/mysql-5.6.34.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.34.ebuild b/dev-db/mysql/mysql-5.6.34.ebuild
index f3363ac..aa2119a 100644
--- a/dev-db/mysql/mysql-5.6.34.ebuild
+++ b/dev-db/mysql/mysql-5.6.34.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-10-26 16:38 Markus Meier
  0 siblings, 0 replies; 393+ messages in thread
From: Markus Meier @ 2016-10-26 16:38 UTC (permalink / raw
  To: gentoo-commits

commit:     ed7387b80a838a3c10858366cf2ecb8f96117f36
Author:     Markus Meier <maekke <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 26 16:37:57 2016 +0000
Commit:     Markus Meier <maekke <AT> gentoo <DOT> org>
CommitDate: Wed Oct 26 16:37:57 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed7387b8

dev-db/mysql: arm stable, bug #597538

Package-Manager: portage-2.3.2
RepoMan-Options: --include-arches="arm"

 dev-db/mysql/mysql-5.6.34.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.34.ebuild b/dev-db/mysql/mysql-5.6.34.ebuild
index d12a61e..f3363ac 100644
--- a/dev-db/mysql/mysql-5.6.34.ebuild
+++ b/dev-db/mysql/mysql-5.6.34.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-10-23  7:44 Jeroen Roovers
  0 siblings, 0 replies; 393+ messages in thread
From: Jeroen Roovers @ 2016-10-23  7:44 UTC (permalink / raw
  To: gentoo-commits

commit:     dd911990c924ce1d4c5ba30a5161b95445e227b1
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 23 07:28:38 2016 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Oct 23 07:44:45 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd911990

dev-db/mysql: Stable for PPC64 (bug #597538).

Package-Manager: portage-2.3.2
RepoMan-Options: --ignore-arches

 dev-db/mysql/mysql-5.6.34.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.34.ebuild b/dev-db/mysql/mysql-5.6.34.ebuild
index 2d1052f..d12a61e 100644
--- a/dev-db/mysql/mysql-5.6.34.ebuild
+++ b/dev-db/mysql/mysql-5.6.34.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-10-22 11:33 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-10-22 11:33 UTC (permalink / raw
  To: gentoo-commits

commit:     2f035cb480d18754681dfd6c990dcebc8e51f69b
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 22 11:33:37 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sat Oct 22 11:33:37 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f035cb4

dev-db/mysql: x86 stable wrt bug #597538

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.34.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.34.ebuild b/dev-db/mysql/mysql-5.6.34.ebuild
index 1f86f06..2d1052f 100644
--- a/dev-db/mysql/mysql-5.6.34.ebuild
+++ b/dev-db/mysql/mysql-5.6.34.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-10-22 11:33 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-10-22 11:33 UTC (permalink / raw
  To: gentoo-commits

commit:     e50f8c20b8a567ad1c4214fa2916273a499183f5
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 22 11:33:08 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sat Oct 22 11:33:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e50f8c20

dev-db/mysql: amd64 stable wrt bug #597538

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.34.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.34.ebuild b/dev-db/mysql/mysql-5.6.34.ebuild
index ed88003..1f86f06 100644
--- a/dev-db/mysql/mysql-5.6.34.ebuild
+++ b/dev-db/mysql/mysql-5.6.34.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-10-21 15:17 Tobias Klausmann
  0 siblings, 0 replies; 393+ messages in thread
From: Tobias Klausmann @ 2016-10-21 15:17 UTC (permalink / raw
  To: gentoo-commits

commit:     20b8d6e758cd243b801c3453d2809c6b5ad54f4a
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 21 15:17:20 2016 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Fri Oct 21 15:17:33 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20b8d6e7

dev-db/mysql-5.6.34-r0: stable on alpha

Gentoo-Bug: 597538

 dev-db/mysql/mysql-5.6.34.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.34.ebuild b/dev-db/mysql/mysql-5.6.34.ebuild
index 81b02ef..ed88003 100644
--- a/dev-db/mysql/mysql-5.6.34.ebuild
+++ b/dev-db/mysql/mysql-5.6.34.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-10-19 20:34 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-10-19 20:34 UTC (permalink / raw
  To: gentoo-commits

commit:     13e8ac29fb49b2b27ec969663152fbad156adc94
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 19 20:33:44 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Oct 19 20:34:20 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13e8ac29

dev-db/mysql: Drop security vulnerable 5.5.52

Package-Manager: portage-2.3.2

 dev-db/mysql/Manifest            |   2 -
 dev-db/mysql/mysql-5.5.52.ebuild | 126 ---------------------------------------
 2 files changed, 128 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index c0b4721..3002687 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,7 +1,5 @@
-DIST mysql-5.5.52.tar.gz 21032776 SHA256 7820e13de6b3f4dadd255e12b2e9f3de43daf4507c218018c382d45aad8162fd SHA512 78d88609c4a718d783d2ee5a82768df94bc0799831f95f587ae6d991659a42d17060bcff8e081f7523dbe0493c74167e1590a3a9ee543e65dc683c6e5fea0ce4 WHIRLPOOL 4e95687456be2566683f738065e93db8b1de3906c6bc94207a243e7e5dbb9ae7fa498b5fdb4b1ab72ebb41fd38caf9eea4681b5f4fe0b1dcf88571398c2ef77a
 DIST mysql-5.5.53.tar.gz 21035716 SHA256 a7a86dd42524e698c9dd8dab2520e6e75377cde077ed71eaf5a3b5a3d1f7d6ea SHA512 b69344149fbb7955221ba961a760ce963271eee732a5009b5ddf202c86af3532042c0a438dcbc38828bdc55a1a6e61ae0c2b1ced90bd3af59ebb1ac030c1069f WHIRLPOOL 0fe92b67faedff1f3edcc34b1c3823b0fed55d91bf2d26de7b214b951f0e9e75d4b79eb3f2db193a3eeff71f772b5eb60e4bbc4a7af05d72684f4b181ffb500c
 DIST mysql-5.6.33.tar.gz 32094894 SHA256 60776ec27d78b59f597e71738c5bcdea64dcba33c36fede320d5930320b1fef0 SHA512 d6f96dfd379b7ddaf3897a04ad756169a9d71319894551cba561e5ab2298dc21526004f656f50850c81bbe52af158926f87badc34d07b2b92107bc136e08359a WHIRLPOOL 76c1340114710d7c9ca7e5316a49e4544a2dc52a6dec66f31f2d16fbe2f1060a5bbcb449ea52fc0461facaaf85c4bbb5f483af76da2ae0b76b6169fa91416078
 DIST mysql-5.6.34.tar.gz 32094762 SHA256 ee90bafec6af3abe2715ccb0b3cc9345ed8d1cce025d41e6ec2b2b7a7d820823 SHA512 2395455d6b62161695b6923a3da05480f5a6044e695adf3619459655adbfa63e9c82abbbe20f2ba1096a5900bb850af8b5b3a9306526fceb42f4479bae5dd6f2 WHIRLPOOL 888d3cd4d7ed56defe4ae127a6f31c8aa7a3e43285c8b43c001203eefaf5ffb19b5508cb5facd05d0aa5a9edb713dc0dd506b0d46dbf815177f253da29870fab
-DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd
 DIST mysql-extras-20161019-1853Z.tar.bz2 304137 SHA256 985a498fd45b2fb0d9ca06f45c18823b019cd807a6dfea1f3a1fd9e7dde970e4 SHA512 2f46663e268f46db9c8102a0c69d5ded1d1b5cde74d446586f5faf9a74e4de1afbeade79922faab91cd2b214d3dd1298bcd02df915d3f09f07ec649bba1aa390 WHIRLPOOL d0326a0399fa2a79a1446b4dbcd7528089cb14c7598ec83a54817c5d41bc144c9a5215954067c4f19932a4a6ec3d4bc4dca95ba735694b4ef0421a59479ca4f0

diff --git a/dev-db/mysql/mysql-5.5.52.ebuild b/dev-db/mysql/mysql-5.5.52.ebuild
deleted file mode 100644
index aadd3b7..00000000
--- a/dev-db/mysql/mysql-5.5.52.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20150127-1351Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test main.openssl_1 \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-10-19 20:34 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-10-19 20:34 UTC (permalink / raw
  To: gentoo-commits

commit:     7bf4833715ea6e099b0f9a2f5f23c91c4bf8eef6
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 19 20:32:12 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Oct 19 20:34:15 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bf48337

dev-db/mysql: Security bump for bug 597538

Package-Manager: portage-2.3.2

 dev-db/mysql/Manifest            |   2 +
 dev-db/mysql/mysql-5.5.53.ebuild | 126 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 128 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 96f851a..c0b4721 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,5 +1,7 @@
 DIST mysql-5.5.52.tar.gz 21032776 SHA256 7820e13de6b3f4dadd255e12b2e9f3de43daf4507c218018c382d45aad8162fd SHA512 78d88609c4a718d783d2ee5a82768df94bc0799831f95f587ae6d991659a42d17060bcff8e081f7523dbe0493c74167e1590a3a9ee543e65dc683c6e5fea0ce4 WHIRLPOOL 4e95687456be2566683f738065e93db8b1de3906c6bc94207a243e7e5dbb9ae7fa498b5fdb4b1ab72ebb41fd38caf9eea4681b5f4fe0b1dcf88571398c2ef77a
+DIST mysql-5.5.53.tar.gz 21035716 SHA256 a7a86dd42524e698c9dd8dab2520e6e75377cde077ed71eaf5a3b5a3d1f7d6ea SHA512 b69344149fbb7955221ba961a760ce963271eee732a5009b5ddf202c86af3532042c0a438dcbc38828bdc55a1a6e61ae0c2b1ced90bd3af59ebb1ac030c1069f WHIRLPOOL 0fe92b67faedff1f3edcc34b1c3823b0fed55d91bf2d26de7b214b951f0e9e75d4b79eb3f2db193a3eeff71f772b5eb60e4bbc4a7af05d72684f4b181ffb500c
 DIST mysql-5.6.33.tar.gz 32094894 SHA256 60776ec27d78b59f597e71738c5bcdea64dcba33c36fede320d5930320b1fef0 SHA512 d6f96dfd379b7ddaf3897a04ad756169a9d71319894551cba561e5ab2298dc21526004f656f50850c81bbe52af158926f87badc34d07b2b92107bc136e08359a WHIRLPOOL 76c1340114710d7c9ca7e5316a49e4544a2dc52a6dec66f31f2d16fbe2f1060a5bbcb449ea52fc0461facaaf85c4bbb5f483af76da2ae0b76b6169fa91416078
 DIST mysql-5.6.34.tar.gz 32094762 SHA256 ee90bafec6af3abe2715ccb0b3cc9345ed8d1cce025d41e6ec2b2b7a7d820823 SHA512 2395455d6b62161695b6923a3da05480f5a6044e695adf3619459655adbfa63e9c82abbbe20f2ba1096a5900bb850af8b5b3a9306526fceb42f4479bae5dd6f2 WHIRLPOOL 888d3cd4d7ed56defe4ae127a6f31c8aa7a3e43285c8b43c001203eefaf5ffb19b5508cb5facd05d0aa5a9edb713dc0dd506b0d46dbf815177f253da29870fab
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd
+DIST mysql-extras-20161019-1853Z.tar.bz2 304137 SHA256 985a498fd45b2fb0d9ca06f45c18823b019cd807a6dfea1f3a1fd9e7dde970e4 SHA512 2f46663e268f46db9c8102a0c69d5ded1d1b5cde74d446586f5faf9a74e4de1afbeade79922faab91cd2b214d3dd1298bcd02df915d3f09f07ec649bba1aa390 WHIRLPOOL d0326a0399fa2a79a1446b4dbcd7528089cb14c7598ec83a54817c5d41bc144c9a5215954067c4f19932a4a6ec3d4bc4dca95ba735694b4ef0421a59479ca4f0

diff --git a/dev-db/mysql/mysql-5.5.53.ebuild b/dev-db/mysql/mysql-5.5.53.ebuild
new file mode 100644
index 00000000..e2f519a
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.53.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20161019-1853Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE='20019_all_mysql-5.5-mtr-perl-deprecation.patch'
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test main.openssl_1 \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-10-19 16:47 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-10-19 16:47 UTC (permalink / raw
  To: gentoo-commits

commit:     b258c8ed84fa7060f97aa35c63aea59feaf5d251
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 19 16:45:49 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Oct 19 16:47:14 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b258c8ed

dev-db/mysql: Version bump for security bug 597538

Package-Manager: portage-2.3.2

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.6.34.ebuild | 164 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 165 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 572b5ff..96f851a 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,5 @@
 DIST mysql-5.5.52.tar.gz 21032776 SHA256 7820e13de6b3f4dadd255e12b2e9f3de43daf4507c218018c382d45aad8162fd SHA512 78d88609c4a718d783d2ee5a82768df94bc0799831f95f587ae6d991659a42d17060bcff8e081f7523dbe0493c74167e1590a3a9ee543e65dc683c6e5fea0ce4 WHIRLPOOL 4e95687456be2566683f738065e93db8b1de3906c6bc94207a243e7e5dbb9ae7fa498b5fdb4b1ab72ebb41fd38caf9eea4681b5f4fe0b1dcf88571398c2ef77a
 DIST mysql-5.6.33.tar.gz 32094894 SHA256 60776ec27d78b59f597e71738c5bcdea64dcba33c36fede320d5930320b1fef0 SHA512 d6f96dfd379b7ddaf3897a04ad756169a9d71319894551cba561e5ab2298dc21526004f656f50850c81bbe52af158926f87badc34d07b2b92107bc136e08359a WHIRLPOOL 76c1340114710d7c9ca7e5316a49e4544a2dc52a6dec66f31f2d16fbe2f1060a5bbcb449ea52fc0461facaaf85c4bbb5f483af76da2ae0b76b6169fa91416078
+DIST mysql-5.6.34.tar.gz 32094762 SHA256 ee90bafec6af3abe2715ccb0b3cc9345ed8d1cce025d41e6ec2b2b7a7d820823 SHA512 2395455d6b62161695b6923a3da05480f5a6044e695adf3619459655adbfa63e9c82abbbe20f2ba1096a5900bb850af8b5b3a9306526fceb42f4479bae5dd6f2 WHIRLPOOL 888d3cd4d7ed56defe4ae127a6f31c8aa7a3e43285c8b43c001203eefaf5ffb19b5508cb5facd05d0aa5a9edb713dc0dd506b0d46dbf815177f253da29870fab
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd

diff --git a/dev-db/mysql/mysql-5.6.34.ebuild b/dev-db/mysql/mysql-5.6.34.ebuild
new file mode 100644
index 00000000..81b02ef
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.34.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+MY_EXTRAS_VER="20160212-0233Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-10-11 14:16 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-10-11 14:16 UTC (permalink / raw
  To: gentoo-commits

commit:     4018a5440d55cedbaaa556ff84371f40cb8ab501
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 11 14:16:05 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 14:16:05 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4018a544

dev-db/mysql: Remove security vulnerable versions

Package-Manager: portage-2.3.1

 dev-db/mysql/Manifest            |   3 -
 dev-db/mysql/mysql-5.6.30.ebuild | 166 ---------------------------------------
 dev-db/mysql/mysql-5.6.31.ebuild | 166 ---------------------------------------
 dev-db/mysql/mysql-5.6.32.ebuild | 166 ---------------------------------------
 4 files changed, 501 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 2d736a9..572b5ff 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,7 +1,4 @@
 DIST mysql-5.5.52.tar.gz 21032776 SHA256 7820e13de6b3f4dadd255e12b2e9f3de43daf4507c218018c382d45aad8162fd SHA512 78d88609c4a718d783d2ee5a82768df94bc0799831f95f587ae6d991659a42d17060bcff8e081f7523dbe0493c74167e1590a3a9ee543e65dc683c6e5fea0ce4 WHIRLPOOL 4e95687456be2566683f738065e93db8b1de3906c6bc94207a243e7e5dbb9ae7fa498b5fdb4b1ab72ebb41fd38caf9eea4681b5f4fe0b1dcf88571398c2ef77a
-DIST mysql-5.6.30.tar.gz 32223818 SHA256 48464df00aad9b9dfc26c903529ddad944a7562aa28e66e98e4f3f0c35179deb SHA512 b9f5b22a0557fbdd765fd3c379395584dd35bbec2d7504eb132f734129c0d95d24dc538c9b64524870bbecb92fa2f1e95b49ccfe22531ed17ec1e754f08d491b WHIRLPOOL f56d4e9d2ac801605bb941d1a8ba4b876d838a5e3bdac2e644477e87f2e5d439594c28d0e1c1d0c45ebb38fbf4183c429dc8c53bd7aa76aeea95acd1774ca71e
-DIST mysql-5.6.31.tar.gz 32098698 SHA256 6df1389bbf899025aee6be0f4a12b8b0135e6de7db83e3ea20201ad3633ba424 SHA512 dc527e1d3ce7359a86fd91e9469d4ff1bb475c68bbb11aecb2a1897660fc09d0d26a401384117a2ad4e58cd709b5525facabef534e4f7b242119ce171d245cb1 WHIRLPOOL ee5f127037d93ffc567818fb58c8d4689519bafd3a78a2b7479bf34a474477b15086efee5d464d98b4b29e59a85f73272efafad6d9423ccbf306fbcef2b3a841
-DIST mysql-5.6.32.tar.gz 32095208 SHA256 4620ed9d9b5803a3ac7a23492dbea993214d3b5ffd4fb63d42771c616f60e359 SHA512 5af7aaabc1da7d12d16538c89552179423d7f7e2024bc55e75d2f26c99db4fe339e0a1f605e767f91f40dfecee3bcce31c83499a2278204b0f7f24c3411c0d15 WHIRLPOOL 4d0ea8047a32bcceb0135095f9960b70acb57fa35f2ddc1cac25043c47e43fa4b728156112147b660d62a0e93ba5631798e120f34ef77b9fa15e2064e87eb2b5
 DIST mysql-5.6.33.tar.gz 32094894 SHA256 60776ec27d78b59f597e71738c5bcdea64dcba33c36fede320d5930320b1fef0 SHA512 d6f96dfd379b7ddaf3897a04ad756169a9d71319894551cba561e5ab2298dc21526004f656f50850c81bbe52af158926f87badc34d07b2b92107bc136e08359a WHIRLPOOL 76c1340114710d7c9ca7e5316a49e4544a2dc52a6dec66f31f2d16fbe2f1060a5bbcb449ea52fc0461facaaf85c4bbb5f483af76da2ae0b76b6169fa91416078
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd

diff --git a/dev-db/mysql/mysql-5.6.30.ebuild b/dev-db/mysql/mysql-5.6.30.ebuild
deleted file mode 100644
index 74b5529..00000000
--- a/dev-db/mysql/mysql-5.6.30.ebuild
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20160212-0233Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.31.ebuild b/dev-db/mysql/mysql-5.6.31.ebuild
deleted file mode 100644
index 74b5529..00000000
--- a/dev-db/mysql/mysql-5.6.31.ebuild
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20160212-0233Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.32.ebuild b/dev-db/mysql/mysql-5.6.32.ebuild
deleted file mode 100644
index b5b3efb..00000000
--- a/dev-db/mysql/mysql-5.6.32.ebuild
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="6"
-
-MY_EXTRAS_VER="20160212-0233Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-09-29 13:35 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-09-29 13:35 UTC (permalink / raw
  To: gentoo-commits

commit:     e4a5b1da08f9744d110c7c4e06267c0dae49798a
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 13:35:42 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 13:35:42 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4a5b1da

dev-db/mysql: ia64 stable wrt bug #589238

Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="ia64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.31.ebuild b/dev-db/mysql/mysql-5.6.31.ebuild
index 63a2618..74b5529 100644
--- a/dev-db/mysql/mysql-5.6.31.ebuild
+++ b/dev-db/mysql/mysql-5.6.31.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-09-29 13:35 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-09-29 13:35 UTC (permalink / raw
  To: gentoo-commits

commit:     866d94e23af6568d785aa7eccda4f8c99a81b45c
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 13:35:36 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 13:35:36 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=866d94e2

dev-db/mysql: ia64 stable wrt bug #593614

Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="ia64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.33.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.33.ebuild b/dev-db/mysql/mysql-5.6.33.ebuild
index 0c5f447..a9a6c12 100644
--- a/dev-db/mysql/mysql-5.6.33.ebuild
+++ b/dev-db/mysql/mysql-5.6.33.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-09-29 13:08 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-09-29 13:08 UTC (permalink / raw
  To: gentoo-commits

commit:     d383246e80e1db7a2a27433a2341694bd4a08029
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 13:07:33 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 13:07:33 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d383246e

dev-db/mysql: ppc stable wrt bug #593614

Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="ppc"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.33.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.33.ebuild b/dev-db/mysql/mysql-5.6.33.ebuild
index 0a78417..0c5f447 100644
--- a/dev-db/mysql/mysql-5.6.33.ebuild
+++ b/dev-db/mysql/mysql-5.6.33.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-09-29 13:08 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-09-29 13:08 UTC (permalink / raw
  To: gentoo-commits

commit:     9687319ec64af319c346093b3a44e13a33b8660a
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 13:08:30 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 13:08:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9687319e

dev-db/mysql: ppc stable wrt bug #589238

Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="ppc"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.31.ebuild b/dev-db/mysql/mysql-5.6.31.ebuild
index e58baff..63a2618 100644
--- a/dev-db/mysql/mysql-5.6.31.ebuild
+++ b/dev-db/mysql/mysql-5.6.31.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-09-29  9:48 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-09-29  9:48 UTC (permalink / raw
  To: gentoo-commits

commit:     4ff77b076b8f9778955b588efed694f4d0399a90
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 09:48:30 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 09:48:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ff77b07

dev-db/mysql: sparc stable wrt bug #589238

Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="sparc"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.31.ebuild b/dev-db/mysql/mysql-5.6.31.ebuild
index ead3235..e58baff 100644
--- a/dev-db/mysql/mysql-5.6.31.ebuild
+++ b/dev-db/mysql/mysql-5.6.31.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-09-29  9:22 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-09-29  9:22 UTC (permalink / raw
  To: gentoo-commits

commit:     b4e1077de7b76a2dd544575be959d6ae25e467b3
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 09:22:14 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 09:22:14 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4e1077d

dev-db/mysql: sparc stable wrt bug #593614

Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="sparc"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.33.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.33.ebuild b/dev-db/mysql/mysql-5.6.33.ebuild
index aa2119a..0a78417 100644
--- a/dev-db/mysql/mysql-5.6.33.ebuild
+++ b/dev-db/mysql/mysql-5.6.33.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-09-24 19:29 Markus Meier
  0 siblings, 0 replies; 393+ messages in thread
From: Markus Meier @ 2016-09-24 19:29 UTC (permalink / raw
  To: gentoo-commits

commit:     b0f139d9d46aeb2cf9a1ae8bf09c0bec6f503df1
Author:     Markus Meier <maekke <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 24 19:29:34 2016 +0000
Commit:     Markus Meier <maekke <AT> gentoo <DOT> org>
CommitDate: Sat Sep 24 19:29:34 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0f139d9

dev-db/mysql: arm stable, bug #593614

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="arm"

 dev-db/mysql/mysql-5.6.33.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.33.ebuild b/dev-db/mysql/mysql-5.6.33.ebuild
index 11c0fbe..f66fa53 100644
--- a/dev-db/mysql/mysql-5.6.33.ebuild
+++ b/dev-db/mysql/mysql-5.6.33.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-09-24  7:06 Jeroen Roovers
  0 siblings, 0 replies; 393+ messages in thread
From: Jeroen Roovers @ 2016-09-24  7:06 UTC (permalink / raw
  To: gentoo-commits

commit:     ff72190ca94fbb6aac283540f751d1ce7e1776e9
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 24 07:00:50 2016 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Sep 24 07:00:50 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff72190c

dev-db/mysql: Stable for HPPA PPC64 (bug #593614).

Package-Manager: portage-2.3.1
RepoMan-Options: --ignore-arches

 dev-db/mysql/mysql-5.6.33.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.33.ebuild b/dev-db/mysql/mysql-5.6.33.ebuild
index 1f86f06..11c0fbe 100644
--- a/dev-db/mysql/mysql-5.6.33.ebuild
+++ b/dev-db/mysql/mysql-5.6.33.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-09-17  9:52 Tobias Klausmann
  0 siblings, 0 replies; 393+ messages in thread
From: Tobias Klausmann @ 2016-09-17  9:52 UTC (permalink / raw
  To: gentoo-commits

commit:     47123aeb5a2fd2afe04b8b68938c9d43685a9ec5
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 17 09:52:21 2016 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Sat Sep 17 09:52:21 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47123aeb

dev-db/mysql-5.6.33-r0: add alpha keyword

Gentoo-Bug: 593614

 dev-db/mysql/mysql-5.6.33.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.33.ebuild b/dev-db/mysql/mysql-5.6.33.ebuild
index ad71688..1f86f06 100644
--- a/dev-db/mysql/mysql-5.6.33.ebuild
+++ b/dev-db/mysql/mysql-5.6.33.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-09-14  7:28 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-09-14  7:28 UTC (permalink / raw
  To: gentoo-commits

commit:     0da83de011acbdd0888d2c9b1c642f73538495a1
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 14 07:28:08 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Wed Sep 14 07:28:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0da83de0

dev-db/mysql: amd64 stable wrt bug #593614

Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.33.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.33.ebuild b/dev-db/mysql/mysql-5.6.33.ebuild
index 81b02ef..ad71688 100644
--- a/dev-db/mysql/mysql-5.6.33.ebuild
+++ b/dev-db/mysql/mysql-5.6.33.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-09-12 20:00 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-09-12 20:00 UTC (permalink / raw
  To: gentoo-commits

commit:     4a70076de06492fdb818f2881ef7834ef11c0f17
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 12 20:00:06 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Sep 12 20:00:06 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a70076d

dev-db/mysql: Drop old versions

Package-Manager: portage-2.3.0

 dev-db/mysql/Manifest            |   2 -
 dev-db/mysql/mysql-5.5.50.ebuild | 126 ---------------------------------------
 dev-db/mysql/mysql-5.5.51.ebuild | 126 ---------------------------------------
 3 files changed, 254 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 65d6f2a..2d736a9 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,5 +1,3 @@
-DIST mysql-5.5.50.tar.gz 21029856 SHA256 5eac55c8b1b2b18233c006935d90775d805a8422942e6deacf8b5bded432f951 SHA512 81d1327d8e99f57ba7dfd9f834f0e8e75f118b7a92375ca5799fa0cf66b0ec22cf2bd6f11f1d2d9c6bcb766a739743072cd4152f5d9c488203ac46f5471d980b WHIRLPOOL 48dd7bea6a0dddd68902b8993a5b87ed16509c50044b389988f75204acbce078392bfa86a09a92d1f20966ab9d1594c3f00cba605052c796747998fddf059f3f
-DIST mysql-5.5.51.tar.gz 21031206 SHA256 ffa6866cb0cd833cae4a653e4260dfd5a80b62532d6b64e91cfb057bab5a22a7 SHA512 674dea26172ce10ae85c30a092d8487f8136e5e7fdd23da1373092c4d5f4bd10c9778910bcc8ad04fa613231003e9e4ad3ee958dac5bb02ff8aeccd6a599b06b WHIRLPOOL 6a89f719c40c9b80b02e2fead2087c5de1b6a2f9309c1af92ab8c83df445d36e6606d0a59d9a3bd71f0a6321acd099db5a774c2d23792b6ad6dc5591fe4c9c9c
 DIST mysql-5.5.52.tar.gz 21032776 SHA256 7820e13de6b3f4dadd255e12b2e9f3de43daf4507c218018c382d45aad8162fd SHA512 78d88609c4a718d783d2ee5a82768df94bc0799831f95f587ae6d991659a42d17060bcff8e081f7523dbe0493c74167e1590a3a9ee543e65dc683c6e5fea0ce4 WHIRLPOOL 4e95687456be2566683f738065e93db8b1de3906c6bc94207a243e7e5dbb9ae7fa498b5fdb4b1ab72ebb41fd38caf9eea4681b5f4fe0b1dcf88571398c2ef77a
 DIST mysql-5.6.30.tar.gz 32223818 SHA256 48464df00aad9b9dfc26c903529ddad944a7562aa28e66e98e4f3f0c35179deb SHA512 b9f5b22a0557fbdd765fd3c379395584dd35bbec2d7504eb132f734129c0d95d24dc538c9b64524870bbecb92fa2f1e95b49ccfe22531ed17ec1e754f08d491b WHIRLPOOL f56d4e9d2ac801605bb941d1a8ba4b876d838a5e3bdac2e644477e87f2e5d439594c28d0e1c1d0c45ebb38fbf4183c429dc8c53bd7aa76aeea95acd1774ca71e
 DIST mysql-5.6.31.tar.gz 32098698 SHA256 6df1389bbf899025aee6be0f4a12b8b0135e6de7db83e3ea20201ad3633ba424 SHA512 dc527e1d3ce7359a86fd91e9469d4ff1bb475c68bbb11aecb2a1897660fc09d0d26a401384117a2ad4e58cd709b5525facabef534e4f7b242119ce171d245cb1 WHIRLPOOL ee5f127037d93ffc567818fb58c8d4689519bafd3a78a2b7479bf34a474477b15086efee5d464d98b4b29e59a85f73272efafad6d9423ccbf306fbcef2b3a841

diff --git a/dev-db/mysql/mysql-5.5.50.ebuild b/dev-db/mysql/mysql-5.5.50.ebuild
deleted file mode 100644
index aadd3b7..00000000
--- a/dev-db/mysql/mysql-5.5.50.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20150127-1351Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test main.openssl_1 \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.5.51.ebuild b/dev-db/mysql/mysql-5.5.51.ebuild
deleted file mode 100644
index aadd3b7..00000000
--- a/dev-db/mysql/mysql-5.5.51.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20150127-1351Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test main.openssl_1 \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-09-12 20:00 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-09-12 20:00 UTC (permalink / raw
  To: gentoo-commits

commit:     dadc3aae6f70c7f4cc622773f301e930aa01bab7
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 12 19:58:25 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Sep 12 19:58:25 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dadc3aae

dev-db/mysql: Version bump for 5.5.52

Package-Manager: portage-2.3.0

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.5.52.ebuild | 126 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 127 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 6db8348..65d6f2a 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,5 +1,6 @@
 DIST mysql-5.5.50.tar.gz 21029856 SHA256 5eac55c8b1b2b18233c006935d90775d805a8422942e6deacf8b5bded432f951 SHA512 81d1327d8e99f57ba7dfd9f834f0e8e75f118b7a92375ca5799fa0cf66b0ec22cf2bd6f11f1d2d9c6bcb766a739743072cd4152f5d9c488203ac46f5471d980b WHIRLPOOL 48dd7bea6a0dddd68902b8993a5b87ed16509c50044b389988f75204acbce078392bfa86a09a92d1f20966ab9d1594c3f00cba605052c796747998fddf059f3f
 DIST mysql-5.5.51.tar.gz 21031206 SHA256 ffa6866cb0cd833cae4a653e4260dfd5a80b62532d6b64e91cfb057bab5a22a7 SHA512 674dea26172ce10ae85c30a092d8487f8136e5e7fdd23da1373092c4d5f4bd10c9778910bcc8ad04fa613231003e9e4ad3ee958dac5bb02ff8aeccd6a599b06b WHIRLPOOL 6a89f719c40c9b80b02e2fead2087c5de1b6a2f9309c1af92ab8c83df445d36e6606d0a59d9a3bd71f0a6321acd099db5a774c2d23792b6ad6dc5591fe4c9c9c
+DIST mysql-5.5.52.tar.gz 21032776 SHA256 7820e13de6b3f4dadd255e12b2e9f3de43daf4507c218018c382d45aad8162fd SHA512 78d88609c4a718d783d2ee5a82768df94bc0799831f95f587ae6d991659a42d17060bcff8e081f7523dbe0493c74167e1590a3a9ee543e65dc683c6e5fea0ce4 WHIRLPOOL 4e95687456be2566683f738065e93db8b1de3906c6bc94207a243e7e5dbb9ae7fa498b5fdb4b1ab72ebb41fd38caf9eea4681b5f4fe0b1dcf88571398c2ef77a
 DIST mysql-5.6.30.tar.gz 32223818 SHA256 48464df00aad9b9dfc26c903529ddad944a7562aa28e66e98e4f3f0c35179deb SHA512 b9f5b22a0557fbdd765fd3c379395584dd35bbec2d7504eb132f734129c0d95d24dc538c9b64524870bbecb92fa2f1e95b49ccfe22531ed17ec1e754f08d491b WHIRLPOOL f56d4e9d2ac801605bb941d1a8ba4b876d838a5e3bdac2e644477e87f2e5d439594c28d0e1c1d0c45ebb38fbf4183c429dc8c53bd7aa76aeea95acd1774ca71e
 DIST mysql-5.6.31.tar.gz 32098698 SHA256 6df1389bbf899025aee6be0f4a12b8b0135e6de7db83e3ea20201ad3633ba424 SHA512 dc527e1d3ce7359a86fd91e9469d4ff1bb475c68bbb11aecb2a1897660fc09d0d26a401384117a2ad4e58cd709b5525facabef534e4f7b242119ce171d245cb1 WHIRLPOOL ee5f127037d93ffc567818fb58c8d4689519bafd3a78a2b7479bf34a474477b15086efee5d464d98b4b29e59a85f73272efafad6d9423ccbf306fbcef2b3a841
 DIST mysql-5.6.32.tar.gz 32095208 SHA256 4620ed9d9b5803a3ac7a23492dbea993214d3b5ffd4fb63d42771c616f60e359 SHA512 5af7aaabc1da7d12d16538c89552179423d7f7e2024bc55e75d2f26c99db4fe339e0a1f605e767f91f40dfecee3bcce31c83499a2278204b0f7f24c3411c0d15 WHIRLPOOL 4d0ea8047a32bcceb0135095f9960b70acb57fa35f2ddc1cac25043c47e43fa4b728156112147b660d62a0e93ba5631798e120f34ef77b9fa15e2064e87eb2b5

diff --git a/dev-db/mysql/mysql-5.5.52.ebuild b/dev-db/mysql/mysql-5.5.52.ebuild
new file mode 100644
index 00000000..aadd3b7
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.52.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20150127-1351Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test main.openssl_1 \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-09-12 18:56 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-09-12 18:56 UTC (permalink / raw
  To: gentoo-commits

commit:     bf23e19fe685b8a3f6fab6d984c870681eb275c8
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 12 18:55:48 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Sep 12 18:55:48 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf23e19f

dev-db/mysql: Version bump for 5.6.33

Package-Manager: portage-2.3.0

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.6.33.ebuild | 164 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 165 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 7a5343fc..6db8348 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,5 +3,6 @@ DIST mysql-5.5.51.tar.gz 21031206 SHA256 ffa6866cb0cd833cae4a653e4260dfd5a80b625
 DIST mysql-5.6.30.tar.gz 32223818 SHA256 48464df00aad9b9dfc26c903529ddad944a7562aa28e66e98e4f3f0c35179deb SHA512 b9f5b22a0557fbdd765fd3c379395584dd35bbec2d7504eb132f734129c0d95d24dc538c9b64524870bbecb92fa2f1e95b49ccfe22531ed17ec1e754f08d491b WHIRLPOOL f56d4e9d2ac801605bb941d1a8ba4b876d838a5e3bdac2e644477e87f2e5d439594c28d0e1c1d0c45ebb38fbf4183c429dc8c53bd7aa76aeea95acd1774ca71e
 DIST mysql-5.6.31.tar.gz 32098698 SHA256 6df1389bbf899025aee6be0f4a12b8b0135e6de7db83e3ea20201ad3633ba424 SHA512 dc527e1d3ce7359a86fd91e9469d4ff1bb475c68bbb11aecb2a1897660fc09d0d26a401384117a2ad4e58cd709b5525facabef534e4f7b242119ce171d245cb1 WHIRLPOOL ee5f127037d93ffc567818fb58c8d4689519bafd3a78a2b7479bf34a474477b15086efee5d464d98b4b29e59a85f73272efafad6d9423ccbf306fbcef2b3a841
 DIST mysql-5.6.32.tar.gz 32095208 SHA256 4620ed9d9b5803a3ac7a23492dbea993214d3b5ffd4fb63d42771c616f60e359 SHA512 5af7aaabc1da7d12d16538c89552179423d7f7e2024bc55e75d2f26c99db4fe339e0a1f605e767f91f40dfecee3bcce31c83499a2278204b0f7f24c3411c0d15 WHIRLPOOL 4d0ea8047a32bcceb0135095f9960b70acb57fa35f2ddc1cac25043c47e43fa4b728156112147b660d62a0e93ba5631798e120f34ef77b9fa15e2064e87eb2b5
+DIST mysql-5.6.33.tar.gz 32094894 SHA256 60776ec27d78b59f597e71738c5bcdea64dcba33c36fede320d5930320b1fef0 SHA512 d6f96dfd379b7ddaf3897a04ad756169a9d71319894551cba561e5ab2298dc21526004f656f50850c81bbe52af158926f87badc34d07b2b92107bc136e08359a WHIRLPOOL 76c1340114710d7c9ca7e5316a49e4544a2dc52a6dec66f31f2d16fbe2f1060a5bbcb449ea52fc0461facaaf85c4bbb5f483af76da2ae0b76b6169fa91416078
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd

diff --git a/dev-db/mysql/mysql-5.6.33.ebuild b/dev-db/mysql/mysql-5.6.33.ebuild
new file mode 100644
index 00000000..81b02ef
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.33.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+MY_EXTRAS_VER="20160212-0233Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+#		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+#		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-08-17 20:11 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-08-17 20:11 UTC (permalink / raw
  To: gentoo-commits

commit:     bca00e987116f04766479d9b4d8040ec1f3c50a4
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 17 20:10:39 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Aug 17 20:11:16 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bca00e98

dev-db/mysql: Verison bump for 5.6.32

Package-Manager: portage-2.3.0

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.6.32.ebuild | 166 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 167 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index df4e76d..7a5343fc 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -2,5 +2,6 @@ DIST mysql-5.5.50.tar.gz 21029856 SHA256 5eac55c8b1b2b18233c006935d90775d805a842
 DIST mysql-5.5.51.tar.gz 21031206 SHA256 ffa6866cb0cd833cae4a653e4260dfd5a80b62532d6b64e91cfb057bab5a22a7 SHA512 674dea26172ce10ae85c30a092d8487f8136e5e7fdd23da1373092c4d5f4bd10c9778910bcc8ad04fa613231003e9e4ad3ee958dac5bb02ff8aeccd6a599b06b WHIRLPOOL 6a89f719c40c9b80b02e2fead2087c5de1b6a2f9309c1af92ab8c83df445d36e6606d0a59d9a3bd71f0a6321acd099db5a774c2d23792b6ad6dc5591fe4c9c9c
 DIST mysql-5.6.30.tar.gz 32223818 SHA256 48464df00aad9b9dfc26c903529ddad944a7562aa28e66e98e4f3f0c35179deb SHA512 b9f5b22a0557fbdd765fd3c379395584dd35bbec2d7504eb132f734129c0d95d24dc538c9b64524870bbecb92fa2f1e95b49ccfe22531ed17ec1e754f08d491b WHIRLPOOL f56d4e9d2ac801605bb941d1a8ba4b876d838a5e3bdac2e644477e87f2e5d439594c28d0e1c1d0c45ebb38fbf4183c429dc8c53bd7aa76aeea95acd1774ca71e
 DIST mysql-5.6.31.tar.gz 32098698 SHA256 6df1389bbf899025aee6be0f4a12b8b0135e6de7db83e3ea20201ad3633ba424 SHA512 dc527e1d3ce7359a86fd91e9469d4ff1bb475c68bbb11aecb2a1897660fc09d0d26a401384117a2ad4e58cd709b5525facabef534e4f7b242119ce171d245cb1 WHIRLPOOL ee5f127037d93ffc567818fb58c8d4689519bafd3a78a2b7479bf34a474477b15086efee5d464d98b4b29e59a85f73272efafad6d9423ccbf306fbcef2b3a841
+DIST mysql-5.6.32.tar.gz 32095208 SHA256 4620ed9d9b5803a3ac7a23492dbea993214d3b5ffd4fb63d42771c616f60e359 SHA512 5af7aaabc1da7d12d16538c89552179423d7f7e2024bc55e75d2f26c99db4fe339e0a1f605e767f91f40dfecee3bcce31c83499a2278204b0f7f24c3411c0d15 WHIRLPOOL 4d0ea8047a32bcceb0135095f9960b70acb57fa35f2ddc1cac25043c47e43fa4b728156112147b660d62a0e93ba5631798e120f34ef77b9fa15e2064e87eb2b5
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd

diff --git a/dev-db/mysql/mysql-5.6.32.ebuild b/dev-db/mysql/mysql-5.6.32.ebuild
new file mode 100644
index 0000000..b5b3efb
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.32.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+MY_EXTRAS_VER="20160212-0233Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-08-17 18:11 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-08-17 18:11 UTC (permalink / raw
  To: gentoo-commits

commit:     74428662fbf69dcbe263194e0679c28655280e7a
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 17 18:11:08 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Aug 17 18:11:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74428662

dev-db/mysql: Version bump for 5.5.51

Package-Manager: portage-2.3.0

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.5.51.ebuild | 126 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 127 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index bb772c6..df4e76d 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,5 @@
 DIST mysql-5.5.50.tar.gz 21029856 SHA256 5eac55c8b1b2b18233c006935d90775d805a8422942e6deacf8b5bded432f951 SHA512 81d1327d8e99f57ba7dfd9f834f0e8e75f118b7a92375ca5799fa0cf66b0ec22cf2bd6f11f1d2d9c6bcb766a739743072cd4152f5d9c488203ac46f5471d980b WHIRLPOOL 48dd7bea6a0dddd68902b8993a5b87ed16509c50044b389988f75204acbce078392bfa86a09a92d1f20966ab9d1594c3f00cba605052c796747998fddf059f3f
+DIST mysql-5.5.51.tar.gz 21031206 SHA256 ffa6866cb0cd833cae4a653e4260dfd5a80b62532d6b64e91cfb057bab5a22a7 SHA512 674dea26172ce10ae85c30a092d8487f8136e5e7fdd23da1373092c4d5f4bd10c9778910bcc8ad04fa613231003e9e4ad3ee958dac5bb02ff8aeccd6a599b06b WHIRLPOOL 6a89f719c40c9b80b02e2fead2087c5de1b6a2f9309c1af92ab8c83df445d36e6606d0a59d9a3bd71f0a6321acd099db5a774c2d23792b6ad6dc5591fe4c9c9c
 DIST mysql-5.6.30.tar.gz 32223818 SHA256 48464df00aad9b9dfc26c903529ddad944a7562aa28e66e98e4f3f0c35179deb SHA512 b9f5b22a0557fbdd765fd3c379395584dd35bbec2d7504eb132f734129c0d95d24dc538c9b64524870bbecb92fa2f1e95b49ccfe22531ed17ec1e754f08d491b WHIRLPOOL f56d4e9d2ac801605bb941d1a8ba4b876d838a5e3bdac2e644477e87f2e5d439594c28d0e1c1d0c45ebb38fbf4183c429dc8c53bd7aa76aeea95acd1774ca71e
 DIST mysql-5.6.31.tar.gz 32098698 SHA256 6df1389bbf899025aee6be0f4a12b8b0135e6de7db83e3ea20201ad3633ba424 SHA512 dc527e1d3ce7359a86fd91e9469d4ff1bb475c68bbb11aecb2a1897660fc09d0d26a401384117a2ad4e58cd709b5525facabef534e4f7b242119ce171d245cb1 WHIRLPOOL ee5f127037d93ffc567818fb58c8d4689519bafd3a78a2b7479bf34a474477b15086efee5d464d98b4b29e59a85f73272efafad6d9423ccbf306fbcef2b3a841
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4

diff --git a/dev-db/mysql/mysql-5.5.51.ebuild b/dev-db/mysql/mysql-5.5.51.ebuild
new file mode 100644
index 0000000..aadd3b7
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.51.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20150127-1351Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test main.openssl_1 \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-07-28 14:08 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-07-28 14:08 UTC (permalink / raw
  To: gentoo-commits

commit:     36ba5755d27fd8e93c80179ae3bd2a2989398aeb
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 28 14:08:14 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Jul 28 14:08:14 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36ba5755

dev-db/mysql: x86 stable wrt bug #589238

Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.31.ebuild b/dev-db/mysql/mysql-5.6.31.ebuild
index 6fe7540..ead3235 100644
--- a/dev-db/mysql/mysql-5.6.31.ebuild
+++ b/dev-db/mysql/mysql-5.6.31.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-07-28  8:43 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-07-28  8:43 UTC (permalink / raw
  To: gentoo-commits

commit:     eb98064fcad5d3f74fd866716898066b2e379a24
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 28 08:42:46 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Jul 28 08:42:46 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb98064f

dev-db/mysql: amd64 stable wrt bug #589238

Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.31.ebuild b/dev-db/mysql/mysql-5.6.31.ebuild
index 88ca057..6fe7540 100644
--- a/dev-db/mysql/mysql-5.6.31.ebuild
+++ b/dev-db/mysql/mysql-5.6.31.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha ~amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-07-27 20:30 Markus Meier
  0 siblings, 0 replies; 393+ messages in thread
From: Markus Meier @ 2016-07-27 20:30 UTC (permalink / raw
  To: gentoo-commits

commit:     7b790970d004228989c33dcaf995375dd2041e30
Author:     Markus Meier <maekke <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 27 20:30:27 2016 +0000
Commit:     Markus Meier <maekke <AT> gentoo <DOT> org>
CommitDate: Wed Jul 27 20:30:27 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b790970

dev-db/mysql: arm stable, bug #589238

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="arm"

 dev-db/mysql/mysql-5.6.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.31.ebuild b/dev-db/mysql/mysql-5.6.31.ebuild
index b800074..88ca057 100644
--- a/dev-db/mysql/mysql-5.6.31.ebuild
+++ b/dev-db/mysql/mysql-5.6.31.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha ~amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha ~amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-07-26 12:31 Tobias Klausmann
  0 siblings, 0 replies; 393+ messages in thread
From: Tobias Klausmann @ 2016-07-26 12:31 UTC (permalink / raw
  To: gentoo-commits

commit:     cbc767ea73cb1b35279d809c6d13964c24b3f8e9
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 26 12:31:05 2016 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Tue Jul 26 12:31:05 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbc767ea

dev-db/mysql-5.6.31-r0: add alpha keyword

Gentoo-Bug: 589238

 dev-db/mysql/mysql-5.6.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.31.ebuild b/dev-db/mysql/mysql-5.6.31.ebuild
index 5d4c603..b800074 100644
--- a/dev-db/mysql/mysql-5.6.31.ebuild
+++ b/dev-db/mysql/mysql-5.6.31.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha ~amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-07-24 16:03 Jeroen Roovers
  0 siblings, 0 replies; 393+ messages in thread
From: Jeroen Roovers @ 2016-07-24 16:03 UTC (permalink / raw
  To: gentoo-commits

commit:     9906317ed5374dce652c45cb2587c0daffe0b176
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 24 16:00:25 2016 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Jul 24 16:00:25 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9906317e

dev-db/mysql: Stable for HPPA (bug #589238).

Package-Manager: portage-2.3.0
RepoMan-Options: --ignore-arches

 dev-db/mysql/mysql-5.6.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.31.ebuild b/dev-db/mysql/mysql-5.6.31.ebuild
index dced4fa..5d4c603 100644
--- a/dev-db/mysql/mysql-5.6.31.ebuild
+++ b/dev-db/mysql/mysql-5.6.31.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-07-24  8:33 Jeroen Roovers
  0 siblings, 0 replies; 393+ messages in thread
From: Jeroen Roovers @ 2016-07-24  8:33 UTC (permalink / raw
  To: gentoo-commits

commit:     ae9da8176140c8ccb61df74fc870399d338b09e7
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 24 08:23:30 2016 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Jul 24 08:23:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae9da817

dev-db/mysql: Stable for PPC64 (bug #589238).

Package-Manager: portage-2.3.0
RepoMan-Options: --ignore-arches

 dev-db/mysql/mysql-5.6.31.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.31.ebuild b/dev-db/mysql/mysql-5.6.31.ebuild
index 7537cf9..dced4fa 100644
--- a/dev-db/mysql/mysql-5.6.31.ebuild
+++ b/dev-db/mysql/mysql-5.6.31.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-07-20 17:58 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-07-20 17:58 UTC (permalink / raw
  To: gentoo-commits

commit:     0eeda9bfbb583ec2dcff7fd80f379fab3e2e123b
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 20 17:55:37 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Jul 20 17:55:37 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0eeda9bf

dev-db/mysql: Version bump for 5.5.50

Package-Manager: portage-2.3.0

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.5.50.ebuild | 126 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 127 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index c73bec1..b44b341 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,5 @@
 DIST mysql-5.5.49.tar.gz 21202609 SHA256 cd9ca49b01a76bca635f2888b9d4d30fa6583dd198994d407cdd0dd7170e9e1f SHA512 2c4db3003718cf0c8b02986e7daff00653cf1cba57cdc6b157189050f1d4c41c04c4c43f81e4121a9730b1d28e27af81651bc9dc379fa2e049f49bab7dee1fab WHIRLPOOL 8eefce7f4b6d36156184eadf2289a7386566318dd0bf028e5725904bdd77054c2fe422973e4c50438666ab0fe1dfef388dd7e9c06fab7cbc662f88c8ef5c55f2
+DIST mysql-5.5.50.tar.gz 21029856 SHA256 5eac55c8b1b2b18233c006935d90775d805a8422942e6deacf8b5bded432f951 SHA512 81d1327d8e99f57ba7dfd9f834f0e8e75f118b7a92375ca5799fa0cf66b0ec22cf2bd6f11f1d2d9c6bcb766a739743072cd4152f5d9c488203ac46f5471d980b WHIRLPOOL 48dd7bea6a0dddd68902b8993a5b87ed16509c50044b389988f75204acbce078392bfa86a09a92d1f20966ab9d1594c3f00cba605052c796747998fddf059f3f
 DIST mysql-5.6.30.tar.gz 32223818 SHA256 48464df00aad9b9dfc26c903529ddad944a7562aa28e66e98e4f3f0c35179deb SHA512 b9f5b22a0557fbdd765fd3c379395584dd35bbec2d7504eb132f734129c0d95d24dc538c9b64524870bbecb92fa2f1e95b49ccfe22531ed17ec1e754f08d491b WHIRLPOOL f56d4e9d2ac801605bb941d1a8ba4b876d838a5e3bdac2e644477e87f2e5d439594c28d0e1c1d0c45ebb38fbf4183c429dc8c53bd7aa76aeea95acd1774ca71e
 DIST mysql-5.6.31.tar.gz 32098698 SHA256 6df1389bbf899025aee6be0f4a12b8b0135e6de7db83e3ea20201ad3633ba424 SHA512 dc527e1d3ce7359a86fd91e9469d4ff1bb475c68bbb11aecb2a1897660fc09d0d26a401384117a2ad4e58cd709b5525facabef534e4f7b242119ce171d245cb1 WHIRLPOOL ee5f127037d93ffc567818fb58c8d4689519bafd3a78a2b7479bf34a474477b15086efee5d464d98b4b29e59a85f73272efafad6d9423ccbf306fbcef2b3a841
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4

diff --git a/dev-db/mysql/mysql-5.5.50.ebuild b/dev-db/mysql/mysql-5.5.50.ebuild
new file mode 100644
index 0000000..aadd3b7
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.50.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20150127-1351Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test main.openssl_1 \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-07-20 17:58 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-07-20 17:58 UTC (permalink / raw
  To: gentoo-commits

commit:     8daebcd216f54060c34017c2991c9f73b36696dd
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 20 17:58:10 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Jul 20 17:58:10 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8daebcd2

dev-db/mysql: Drop security vulnerable 5.5.49 wrt bug 589238

Package-Manager: portage-2.3.0

 dev-db/mysql/Manifest            |   1 -
 dev-db/mysql/mysql-5.5.49.ebuild | 126 ---------------------------------------
 2 files changed, 127 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index b44b341..bb772c6 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,3 @@
-DIST mysql-5.5.49.tar.gz 21202609 SHA256 cd9ca49b01a76bca635f2888b9d4d30fa6583dd198994d407cdd0dd7170e9e1f SHA512 2c4db3003718cf0c8b02986e7daff00653cf1cba57cdc6b157189050f1d4c41c04c4c43f81e4121a9730b1d28e27af81651bc9dc379fa2e049f49bab7dee1fab WHIRLPOOL 8eefce7f4b6d36156184eadf2289a7386566318dd0bf028e5725904bdd77054c2fe422973e4c50438666ab0fe1dfef388dd7e9c06fab7cbc662f88c8ef5c55f2
 DIST mysql-5.5.50.tar.gz 21029856 SHA256 5eac55c8b1b2b18233c006935d90775d805a8422942e6deacf8b5bded432f951 SHA512 81d1327d8e99f57ba7dfd9f834f0e8e75f118b7a92375ca5799fa0cf66b0ec22cf2bd6f11f1d2d9c6bcb766a739743072cd4152f5d9c488203ac46f5471d980b WHIRLPOOL 48dd7bea6a0dddd68902b8993a5b87ed16509c50044b389988f75204acbce078392bfa86a09a92d1f20966ab9d1594c3f00cba605052c796747998fddf059f3f
 DIST mysql-5.6.30.tar.gz 32223818 SHA256 48464df00aad9b9dfc26c903529ddad944a7562aa28e66e98e4f3f0c35179deb SHA512 b9f5b22a0557fbdd765fd3c379395584dd35bbec2d7504eb132f734129c0d95d24dc538c9b64524870bbecb92fa2f1e95b49ccfe22531ed17ec1e754f08d491b WHIRLPOOL f56d4e9d2ac801605bb941d1a8ba4b876d838a5e3bdac2e644477e87f2e5d439594c28d0e1c1d0c45ebb38fbf4183c429dc8c53bd7aa76aeea95acd1774ca71e
 DIST mysql-5.6.31.tar.gz 32098698 SHA256 6df1389bbf899025aee6be0f4a12b8b0135e6de7db83e3ea20201ad3633ba424 SHA512 dc527e1d3ce7359a86fd91e9469d4ff1bb475c68bbb11aecb2a1897660fc09d0d26a401384117a2ad4e58cd709b5525facabef534e4f7b242119ce171d245cb1 WHIRLPOOL ee5f127037d93ffc567818fb58c8d4689519bafd3a78a2b7479bf34a474477b15086efee5d464d98b4b29e59a85f73272efafad6d9423ccbf306fbcef2b3a841

diff --git a/dev-db/mysql/mysql-5.5.49.ebuild b/dev-db/mysql/mysql-5.5.49.ebuild
deleted file mode 100644
index dbc9696..0000000
--- a/dev-db/mysql/mysql-5.5.49.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20150127-1351Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-07-20 16:05 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-07-20 16:05 UTC (permalink / raw
  To: gentoo-commits

commit:     2a5571bd5ac78fff0289a49a84338f4928f6d753
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 20 16:04:55 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Jul 20 16:04:55 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a5571bd

dev-db/mysql: Security version bump wrt bug 589238

Package-Manager: portage-2.3.0

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.6.31.ebuild | 166 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 167 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index e90d0bd..c73bec1 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,5 @@
 DIST mysql-5.5.49.tar.gz 21202609 SHA256 cd9ca49b01a76bca635f2888b9d4d30fa6583dd198994d407cdd0dd7170e9e1f SHA512 2c4db3003718cf0c8b02986e7daff00653cf1cba57cdc6b157189050f1d4c41c04c4c43f81e4121a9730b1d28e27af81651bc9dc379fa2e049f49bab7dee1fab WHIRLPOOL 8eefce7f4b6d36156184eadf2289a7386566318dd0bf028e5725904bdd77054c2fe422973e4c50438666ab0fe1dfef388dd7e9c06fab7cbc662f88c8ef5c55f2
 DIST mysql-5.6.30.tar.gz 32223818 SHA256 48464df00aad9b9dfc26c903529ddad944a7562aa28e66e98e4f3f0c35179deb SHA512 b9f5b22a0557fbdd765fd3c379395584dd35bbec2d7504eb132f734129c0d95d24dc538c9b64524870bbecb92fa2f1e95b49ccfe22531ed17ec1e754f08d491b WHIRLPOOL f56d4e9d2ac801605bb941d1a8ba4b876d838a5e3bdac2e644477e87f2e5d439594c28d0e1c1d0c45ebb38fbf4183c429dc8c53bd7aa76aeea95acd1774ca71e
+DIST mysql-5.6.31.tar.gz 32098698 SHA256 6df1389bbf899025aee6be0f4a12b8b0135e6de7db83e3ea20201ad3633ba424 SHA512 dc527e1d3ce7359a86fd91e9469d4ff1bb475c68bbb11aecb2a1897660fc09d0d26a401384117a2ad4e58cd709b5525facabef534e4f7b242119ce171d245cb1 WHIRLPOOL ee5f127037d93ffc567818fb58c8d4689519bafd3a78a2b7479bf34a474477b15086efee5d464d98b4b29e59a85f73272efafad6d9423ccbf306fbcef2b3a841
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd

diff --git a/dev-db/mysql/mysql-5.6.31.ebuild b/dev-db/mysql/mysql-5.6.31.ebuild
new file mode 100644
index 0000000..7537cf9
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.31.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20160212-0233Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-07-11  3:49 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-07-11  3:49 UTC (permalink / raw
  To: gentoo-commits

commit:     4fe5f5f7296987d812d3ef23b77aa9e4b7d24e51
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 11 03:48:31 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Jul 11 03:48:31 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fe5f5f7

dev-db/mysql: Drop security vulnerable versions

Package-Manager: portage-2.3.0

 dev-db/mysql/Manifest            |   5 --
 dev-db/mysql/mysql-5.5.47.ebuild | 126 -----------------------------
 dev-db/mysql/mysql-5.5.48.ebuild | 126 -----------------------------
 dev-db/mysql/mysql-5.6.28.ebuild | 166 ---------------------------------------
 dev-db/mysql/mysql-5.6.29.ebuild | 166 ---------------------------------------
 5 files changed, 589 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 0d3419b..e90d0bd 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,9 +1,4 @@
-DIST mysql-5.5.47.tar.gz 21187802 SHA256 77d0997e7ef47885a6682888e6d1282419687d333b2bd2365cb909a089b8db7b SHA512 807d140764ec18f4a7edb8de3ceff24b2003f1b30cf59cce315b6c1f2475a3f3f92bf369e9fe5704611dd45ee5fb676c0c187851230dcb419adde22436678ce3 WHIRLPOOL db188a23b470fc4d556dfeee6feb2a248dcbffe027018c99e28f3a47c2783cfe473378fb96aefbf5a263a6bd4676e62e77f9e6c1e3aac6325f732d9517a4a867
-DIST mysql-5.5.48.tar.gz 21201193 SHA256 cc3f8745879eee0508de1a70fc2d267a2d06b7433faa8bb07a787768dcfed781 SHA512 ac13cdfd89dea70f9ffb443affd5b9abf9984c5ea126b58d7833568e985478a667b73b1c9a4c8c80d80ce8da53168ee720191829ed035cff3f9482f58b5510e4 WHIRLPOOL d4d53f00e370c8c54ac42e30bafc2a4e37a24bba16b7f8d000836c50dfded358371c363bee51dd6bea60cbf4eb1cbcf2f32f61c70e908e344fc1dbcf299c0e84
 DIST mysql-5.5.49.tar.gz 21202609 SHA256 cd9ca49b01a76bca635f2888b9d4d30fa6583dd198994d407cdd0dd7170e9e1f SHA512 2c4db3003718cf0c8b02986e7daff00653cf1cba57cdc6b157189050f1d4c41c04c4c43f81e4121a9730b1d28e27af81651bc9dc379fa2e049f49bab7dee1fab WHIRLPOOL 8eefce7f4b6d36156184eadf2289a7386566318dd0bf028e5725904bdd77054c2fe422973e4c50438666ab0fe1dfef388dd7e9c06fab7cbc662f88c8ef5c55f2
-DIST mysql-5.6.28.tar.gz 32182980 SHA256 217cd96921abdd709b9b4ff3ce2af4cbd237de43679cf19385d19df03a037b21 SHA512 f02f91586567cb240ec882108ed5cc9e49a4e96545738cf00d43ba6c1fbe8d08b3726dccbe6f7b2412136a1bd50098543975d68ed2322f4cdeb7cd9572d48fcc WHIRLPOOL 039bb2af811d13c573d1a62cd9c8c043b03fba9a369a6afd30336dcc5ba999e90e2e86f1d1b5d4e5944d76eed1c2893e515705aa384cec98e24e2e8a8f7437c2
-DIST mysql-5.6.29.tar.gz 32220131 SHA256 6ac85b75b2dfa8c232725dda25469df37bf4e48b408cc0978d0dfc34c25a817f SHA512 d0efb3a03274639e3e585d8af338f8907094643dfeeee457de99d5cd7feabb6d69a8b884ccf9625b10df7531a76bc36df25a3e8713dcb657b578fac991ade8c5 WHIRLPOOL 808c3beaf3873e5e8a4a50bf94f511e2327daee39dad675f87370174dda51604e46a2d4f09e16e0c651092600165bcb65fba650f835d93a5983bb2fcb19b9c94
 DIST mysql-5.6.30.tar.gz 32223818 SHA256 48464df00aad9b9dfc26c903529ddad944a7562aa28e66e98e4f3f0c35179deb SHA512 b9f5b22a0557fbdd765fd3c379395584dd35bbec2d7504eb132f734129c0d95d24dc538c9b64524870bbecb92fa2f1e95b49ccfe22531ed17ec1e754f08d491b WHIRLPOOL f56d4e9d2ac801605bb941d1a8ba4b876d838a5e3bdac2e644477e87f2e5d439594c28d0e1c1d0c45ebb38fbf4183c429dc8c53bd7aa76aeea95acd1774ca71e
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
-DIST mysql-extras-20151105-2051Z.tar.bz2 1490187 SHA256 129d79c2064b08b0afad69e04e27991bf4103c20ccea39c133239b1dd822a49f SHA512 af34a44275b06c1626eb5952b3643b5663b8a1fb1d9ff18a67d51c02daaa51c4476df407d38ab607cc41842b47e5dd7b4cef8ae380a41eb80923df8052b9e521 WHIRLPOOL 01702ca4e2033fbc70db3ab2dd166b2e31072ea0f6bdd42d00c27ae0c0afab5c8451c4dcc90cce6d46f9ea056017e273f7c719e1cfabf969293bdcd15241f5b3
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd

diff --git a/dev-db/mysql/mysql-5.5.47.ebuild b/dev-db/mysql/mysql-5.5.47.ebuild
deleted file mode 100644
index dbc9696..0000000
--- a/dev-db/mysql/mysql-5.5.47.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20150127-1351Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.5.48.ebuild b/dev-db/mysql/mysql-5.5.48.ebuild
deleted file mode 100644
index dbc9696..0000000
--- a/dev-db/mysql/mysql-5.5.48.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20150127-1351Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.28.ebuild b/dev-db/mysql/mysql-5.6.28.ebuild
deleted file mode 100644
index e41cf68..0000000
--- a/dev-db/mysql/mysql-5.6.28.ebuild
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20151105-2051Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.29.ebuild b/dev-db/mysql/mysql-5.6.29.ebuild
deleted file mode 100644
index 7537cf9..0000000
--- a/dev-db/mysql/mysql-5.6.29.ebuild
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20160212-0233Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
-src_prepare() {
-	mysql-multilib-r1_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-07-08 13:28 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-07-08 13:28 UTC (permalink / raw
  To: gentoo-commits

commit:     acc7446e07077705338b844dec88688c312838a1
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Jul  8 13:27:12 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Jul  8 13:27:12 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acc7446e

dev-db/mysql: ia64 stable wrt bug #580832

Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="ia64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.30.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.30.ebuild b/dev-db/mysql/mysql-5.6.30.ebuild
index 63a2618..74b5529 100644
--- a/dev-db/mysql/mysql-5.6.30.ebuild
+++ b/dev-db/mysql/mysql-5.6.30.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-07-08  8:42 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-07-08  8:42 UTC (permalink / raw
  To: gentoo-commits

commit:     176488210655a115e181541de17a48587daffbe5
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Jul  8 08:40:46 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Jul  8 08:40:46 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17648821

dev-db/mysql: sparc stable wrt bug #580832

Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="sparc"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.30.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.30.ebuild b/dev-db/mysql/mysql-5.6.30.ebuild
index 9bc3fa5..63a2618 100644
--- a/dev-db/mysql/mysql-5.6.30.ebuild
+++ b/dev-db/mysql/mysql-5.6.30.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-07-08  8:17 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-07-08  8:17 UTC (permalink / raw
  To: gentoo-commits

commit:     08532108720db6dcd08cbb4fa3e15947eafb6b8f
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Jul  8 08:15:23 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Jul  8 08:15:23 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08532108

dev-db/mysql: ppc stable wrt bug #580832

Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="ppc"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.30.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.30.ebuild b/dev-db/mysql/mysql-5.6.30.ebuild
index ead3235..9bc3fa5 100644
--- a/dev-db/mysql/mysql-5.6.30.ebuild
+++ b/dev-db/mysql/mysql-5.6.30.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-05-21 12:04 Tobias Klausmann
  0 siblings, 0 replies; 393+ messages in thread
From: Tobias Klausmann @ 2016-05-21 12:04 UTC (permalink / raw
  To: gentoo-commits

commit:     b13fa6b0ea848a2220832eef707fe2a3cd1bfc20
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 12:04:24 2016 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Sat May 21 12:04:24 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b13fa6b0

dev-db/mysql-5.6.30-r0: add alpha keyword

Gentoo-Bug: 580832

Package-Manager: portage-2.3.0_rc1

 dev-db/mysql/mysql-5.6.30.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.30.ebuild b/dev-db/mysql/mysql-5.6.30.ebuild
index 3ab8129..ead3235 100644
--- a/dev-db/mysql/mysql-5.6.30.ebuild
+++ b/dev-db/mysql/mysql-5.6.30.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-05-19 18:28 Markus Meier
  0 siblings, 0 replies; 393+ messages in thread
From: Markus Meier @ 2016-05-19 18:28 UTC (permalink / raw
  To: gentoo-commits

commit:     2578e1789a86c5bf846b9fb403cb26d870d04382
Author:     Markus Meier <maekke <AT> gentoo <DOT> org>
AuthorDate: Thu May 19 18:28:36 2016 +0000
Commit:     Markus Meier <maekke <AT> gentoo <DOT> org>
CommitDate: Thu May 19 18:28:36 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2578e178

dev-db/mysql: arm stable, bug #580832

Package-Manager: portage-2.3.0_rc1
RepoMan-Options: --include-arches="arm"

 dev-db/mysql/mysql-5.6.30.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.30.ebuild b/dev-db/mysql/mysql-5.6.30.ebuild
index f42fc95..3ab8129 100644
--- a/dev-db/mysql/mysql-5.6.30.ebuild
+++ b/dev-db/mysql/mysql-5.6.30.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-05-19 14:39 Jeroen Roovers
  0 siblings, 0 replies; 393+ messages in thread
From: Jeroen Roovers @ 2016-05-19 14:39 UTC (permalink / raw
  To: gentoo-commits

commit:     743ec9273d5a64a5358e5fbb669b3b5aa6ebe436
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Thu May 19 14:39:13 2016 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Thu May 19 14:39:13 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=743ec927

dev-db/mysql: Stable for HPPA PPC64 (bug #580832).

Package-Manager: portage-2.3.0_rc1
RepoMan-Options: --ignore-arches

 dev-db/mysql/mysql-5.6.30.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.30.ebuild b/dev-db/mysql/mysql-5.6.30.ebuild
index f5df5d9..f42fc95 100644
--- a/dev-db/mysql/mysql-5.6.30.ebuild
+++ b/dev-db/mysql/mysql-5.6.30.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-05-19  7:42 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-05-19  7:42 UTC (permalink / raw
  To: gentoo-commits

commit:     cbeddfc21dc077b473b56d0955e00497ec41b497
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu May 19 07:41:30 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu May 19 07:41:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbeddfc2

dev-db/mysql: x86 stable wrt bug #580832

Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.30.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.30.ebuild b/dev-db/mysql/mysql-5.6.30.ebuild
index 1667ded..f5df5d9 100644
--- a/dev-db/mysql/mysql-5.6.30.ebuild
+++ b/dev-db/mysql/mysql-5.6.30.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-05-19  7:40 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-05-19  7:40 UTC (permalink / raw
  To: gentoo-commits

commit:     5c7b218ec7a2da51f1e605a6694172bdd00d5cca
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu May 19 07:40:20 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu May 19 07:40:20 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c7b218e

dev-db/mysql: amd64 stable wrt bug #580832

Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.30.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.30.ebuild b/dev-db/mysql/mysql-5.6.30.ebuild
index 7537cf9..1667ded 100644
--- a/dev-db/mysql/mysql-5.6.30.ebuild
+++ b/dev-db/mysql/mysql-5.6.30.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-04-18 18:31 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-04-18 18:31 UTC (permalink / raw
  To: gentoo-commits

commit:     54c9282115e46c684cf8fd79c5a310a65e415c55
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 18 18:26:17 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 18:26:17 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54c92821

dev-db/mysql: Reorder maintainers after GLEP68 change

Package-Manager: portage-2.2.28

 dev-db/mysql/metadata.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index 538f21e..3d742f6 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -1,14 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-	<maintainer type="person">
-    <email>hasufell@gentoo.org</email>
-    <description>Libressl issues. Only assign if it's a direct Libressl issue. Do not directly assign for anything else.</description>
-  </maintainer>
   <maintainer type="project">
     <email>mysql-bugs@gentoo.org</email>
     <name>MySQL</name>
   </maintainer>
+  <maintainer type="person">
+    <email>hasufell@gentoo.org</email>
+    <description>Libressl issues. Only assign if it's a direct Libressl issue. Do not directly assign for anything else.</description>
+  </maintainer>
 <!-- 
 Please note that this list is shared between the following packages:
 dev-db/mysql


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-04-18  8:13 Patrice Clement
  0 siblings, 0 replies; 393+ messages in thread
From: Patrice Clement @ 2016-04-18  8:13 UTC (permalink / raw
  To: gentoo-commits

commit:     912a9f1e2ed5717a7669861b4978dfaf868c5ae7
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 18 06:33:40 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 07:57:59 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=912a9f1e

dev-db/mysql: Fix metadata.xml file.

Package-Manager: portage-2.2.26

 dev-db/mysql/metadata.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index 422ac80..538f21e 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<maintainer restrict="dev-db/mysql[libressl]" type="person">
+	<maintainer type="person">
     <email>hasufell@gentoo.org</email>
     <description>Libressl issues. Only assign if it's a direct Libressl issue. Do not directly assign for anything else.</description>
   </maintainer>
-<maintainer type="project">
+  <maintainer type="project">
     <email>mysql-bugs@gentoo.org</email>
     <name>MySQL</name>
   </maintainer>


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-04-12 18:26 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-04-12 18:26 UTC (permalink / raw
  To: gentoo-commits

commit:     b59cd42f93b6d4381c1f2e6b788d055a03599b7e
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 12 18:26:11 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Apr 12 18:26:45 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b59cd42f

dev-db/mysql: Version bump for 5.5.49 and 5.6.30

Package-Manager: portage-2.2.28

 dev-db/mysql/Manifest            |   2 +
 dev-db/mysql/mysql-5.5.49.ebuild | 126 +++++++++++++++++++++++++++++
 dev-db/mysql/mysql-5.6.30.ebuild | 166 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 294 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index bfa4309..0d3419b 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,7 +1,9 @@
 DIST mysql-5.5.47.tar.gz 21187802 SHA256 77d0997e7ef47885a6682888e6d1282419687d333b2bd2365cb909a089b8db7b SHA512 807d140764ec18f4a7edb8de3ceff24b2003f1b30cf59cce315b6c1f2475a3f3f92bf369e9fe5704611dd45ee5fb676c0c187851230dcb419adde22436678ce3 WHIRLPOOL db188a23b470fc4d556dfeee6feb2a248dcbffe027018c99e28f3a47c2783cfe473378fb96aefbf5a263a6bd4676e62e77f9e6c1e3aac6325f732d9517a4a867
 DIST mysql-5.5.48.tar.gz 21201193 SHA256 cc3f8745879eee0508de1a70fc2d267a2d06b7433faa8bb07a787768dcfed781 SHA512 ac13cdfd89dea70f9ffb443affd5b9abf9984c5ea126b58d7833568e985478a667b73b1c9a4c8c80d80ce8da53168ee720191829ed035cff3f9482f58b5510e4 WHIRLPOOL d4d53f00e370c8c54ac42e30bafc2a4e37a24bba16b7f8d000836c50dfded358371c363bee51dd6bea60cbf4eb1cbcf2f32f61c70e908e344fc1dbcf299c0e84
+DIST mysql-5.5.49.tar.gz 21202609 SHA256 cd9ca49b01a76bca635f2888b9d4d30fa6583dd198994d407cdd0dd7170e9e1f SHA512 2c4db3003718cf0c8b02986e7daff00653cf1cba57cdc6b157189050f1d4c41c04c4c43f81e4121a9730b1d28e27af81651bc9dc379fa2e049f49bab7dee1fab WHIRLPOOL 8eefce7f4b6d36156184eadf2289a7386566318dd0bf028e5725904bdd77054c2fe422973e4c50438666ab0fe1dfef388dd7e9c06fab7cbc662f88c8ef5c55f2
 DIST mysql-5.6.28.tar.gz 32182980 SHA256 217cd96921abdd709b9b4ff3ce2af4cbd237de43679cf19385d19df03a037b21 SHA512 f02f91586567cb240ec882108ed5cc9e49a4e96545738cf00d43ba6c1fbe8d08b3726dccbe6f7b2412136a1bd50098543975d68ed2322f4cdeb7cd9572d48fcc WHIRLPOOL 039bb2af811d13c573d1a62cd9c8c043b03fba9a369a6afd30336dcc5ba999e90e2e86f1d1b5d4e5944d76eed1c2893e515705aa384cec98e24e2e8a8f7437c2
 DIST mysql-5.6.29.tar.gz 32220131 SHA256 6ac85b75b2dfa8c232725dda25469df37bf4e48b408cc0978d0dfc34c25a817f SHA512 d0efb3a03274639e3e585d8af338f8907094643dfeeee457de99d5cd7feabb6d69a8b884ccf9625b10df7531a76bc36df25a3e8713dcb657b578fac991ade8c5 WHIRLPOOL 808c3beaf3873e5e8a4a50bf94f511e2327daee39dad675f87370174dda51604e46a2d4f09e16e0c651092600165bcb65fba650f835d93a5983bb2fcb19b9c94
+DIST mysql-5.6.30.tar.gz 32223818 SHA256 48464df00aad9b9dfc26c903529ddad944a7562aa28e66e98e4f3f0c35179deb SHA512 b9f5b22a0557fbdd765fd3c379395584dd35bbec2d7504eb132f734129c0d95d24dc538c9b64524870bbecb92fa2f1e95b49ccfe22531ed17ec1e754f08d491b WHIRLPOOL f56d4e9d2ac801605bb941d1a8ba4b876d838a5e3bdac2e644477e87f2e5d439594c28d0e1c1d0c45ebb38fbf4183c429dc8c53bd7aa76aeea95acd1774ca71e
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20151105-2051Z.tar.bz2 1490187 SHA256 129d79c2064b08b0afad69e04e27991bf4103c20ccea39c133239b1dd822a49f SHA512 af34a44275b06c1626eb5952b3643b5663b8a1fb1d9ff18a67d51c02daaa51c4476df407d38ab607cc41842b47e5dd7b4cef8ae380a41eb80923df8052b9e521 WHIRLPOOL 01702ca4e2033fbc70db3ab2dd166b2e31072ea0f6bdd42d00c27ae0c0afab5c8451c4dcc90cce6d46f9ea056017e273f7c719e1cfabf969293bdcd15241f5b3
 DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd

diff --git a/dev-db/mysql/mysql-5.5.49.ebuild b/dev-db/mysql/mysql-5.5.49.ebuild
new file mode 100644
index 0000000..dbc9696
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.49.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20150127-1351Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}

diff --git a/dev-db/mysql/mysql-5.6.30.ebuild b/dev-db/mysql/mysql-5.6.30.ebuild
new file mode 100644
index 0000000..7537cf9
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.30.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20160212-0233Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-03-21  2:16 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-03-21  2:16 UTC (permalink / raw
  To: gentoo-commits

commit:     fb695e2885bb2f51889f4af31b35297032bf40c8
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 21 02:09:49 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Mar 21 02:09:49 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb695e28

dev-db/mysql: Drop security vulnerable version

Package-Manager: portage-2.2.28

 dev-db/mysql/Manifest            |   1 -
 dev-db/mysql/mysql-5.6.27.ebuild | 166 ---------------------------------------
 2 files changed, 167 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 5432ee7..bfa4309 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,6 +1,5 @@
 DIST mysql-5.5.47.tar.gz 21187802 SHA256 77d0997e7ef47885a6682888e6d1282419687d333b2bd2365cb909a089b8db7b SHA512 807d140764ec18f4a7edb8de3ceff24b2003f1b30cf59cce315b6c1f2475a3f3f92bf369e9fe5704611dd45ee5fb676c0c187851230dcb419adde22436678ce3 WHIRLPOOL db188a23b470fc4d556dfeee6feb2a248dcbffe027018c99e28f3a47c2783cfe473378fb96aefbf5a263a6bd4676e62e77f9e6c1e3aac6325f732d9517a4a867
 DIST mysql-5.5.48.tar.gz 21201193 SHA256 cc3f8745879eee0508de1a70fc2d267a2d06b7433faa8bb07a787768dcfed781 SHA512 ac13cdfd89dea70f9ffb443affd5b9abf9984c5ea126b58d7833568e985478a667b73b1c9a4c8c80d80ce8da53168ee720191829ed035cff3f9482f58b5510e4 WHIRLPOOL d4d53f00e370c8c54ac42e30bafc2a4e37a24bba16b7f8d000836c50dfded358371c363bee51dd6bea60cbf4eb1cbcf2f32f61c70e908e344fc1dbcf299c0e84
-DIST mysql-5.6.27.tar.gz 33327156 SHA256 8356bba23f3f6c0c2d4806110c41d1c4d6a4b9c50825e11c5be4bbee2b20b71d SHA512 2839a2f481eec52272a7965d1344677c0d0b77d85108e3b4986dc346caebf62d9ef6347756bac156dd943ad57440d6cac9283ee252e30bd3a1e430c492aceb09 WHIRLPOOL 4fdc0db92822809824777c5f712c3e7898af58f178d22ec4ca1a56d9c9b4d782efe47b3b35b7cc9c7b45d31f25f0323cced346e29c24e7bc4e7b9d965c48cfd7
 DIST mysql-5.6.28.tar.gz 32182980 SHA256 217cd96921abdd709b9b4ff3ce2af4cbd237de43679cf19385d19df03a037b21 SHA512 f02f91586567cb240ec882108ed5cc9e49a4e96545738cf00d43ba6c1fbe8d08b3726dccbe6f7b2412136a1bd50098543975d68ed2322f4cdeb7cd9572d48fcc WHIRLPOOL 039bb2af811d13c573d1a62cd9c8c043b03fba9a369a6afd30336dcc5ba999e90e2e86f1d1b5d4e5944d76eed1c2893e515705aa384cec98e24e2e8a8f7437c2
 DIST mysql-5.6.29.tar.gz 32220131 SHA256 6ac85b75b2dfa8c232725dda25469df37bf4e48b408cc0978d0dfc34c25a817f SHA512 d0efb3a03274639e3e585d8af338f8907094643dfeeee457de99d5cd7feabb6d69a8b884ccf9625b10df7531a76bc36df25a3e8713dcb657b578fac991ade8c5 WHIRLPOOL 808c3beaf3873e5e8a4a50bf94f511e2327daee39dad675f87370174dda51604e46a2d4f09e16e0c651092600165bcb65fba650f835d93a5983bb2fcb19b9c94
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4

diff --git a/dev-db/mysql/mysql-5.6.27.ebuild b/dev-db/mysql/mysql-5.6.27.ebuild
deleted file mode 100644
index 4e6a699..0000000
--- a/dev-db/mysql/mysql-5.6.27.ebuild
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20151105-2051Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-SUBSLOT="18"
-
-inherit toolchain-funcs mysql-multilib
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE='20018_all_mysql-5.6.25-without-clientlibs-tools.patch'
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES="-DWITHOUT_VALIDATE_PASSWORD=1"
-
-src_prepare() {
-	mysql-multilib_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-03-20 12:24 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-03-20 12:24 UTC (permalink / raw
  To: gentoo-commits

commit:     ee1f045703ef059cf5ac01d5edd66a818bb597fb
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 20 12:23:05 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sun Mar 20 12:23:05 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee1f0457

dev-db/mysql: ia64 stable wrt bug #572870

Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="ia64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.28.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.28.ebuild b/dev-db/mysql/mysql-5.6.28.ebuild
index ae5831f..e41cf68 100644
--- a/dev-db/mysql/mysql-5.6.28.ebuild
+++ b/dev-db/mysql/mysql-5.6.28.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-03-19 12:28 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-03-19 12:28 UTC (permalink / raw
  To: gentoo-commits

commit:     ddb895ae4f08e5f84b3661f2feac56037ed03f75
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 19 12:27:40 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sat Mar 19 12:27:40 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddb895ae

dev-db/mysql: sparc stable wrt bug #572870

Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="sparc"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.28.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.28.ebuild b/dev-db/mysql/mysql-5.6.28.ebuild
index 7136648..ae5831f 100644
--- a/dev-db/mysql/mysql-5.6.28.ebuild
+++ b/dev-db/mysql/mysql-5.6.28.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-02-12  3:46 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-02-12  3:46 UTC (permalink / raw
  To: gentoo-commits

commit:     6a78657d926c4ffb0c7dfdbdd1cfff2075327f6b
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 12 03:38:31 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Feb 12 03:46:14 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a78657d

dev-db/mysql: Drop old versions and unused USE descriptions

Package-Manager: portage-2.2.27

 dev-db/mysql/Manifest               |   1 -
 dev-db/mysql/metadata.xml           |   2 -
 dev-db/mysql/mysql-5.5.46.ebuild    | 126 --------------------------
 dev-db/mysql/mysql-5.6.27-r1.ebuild | 173 ------------------------------------
 4 files changed, 302 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 3bc0e31..5432ee7 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,3 @@
-DIST mysql-5.5.46.tar.gz 21838374 SHA256 93e0d91f1b380508edcecdd102cbec79a609d6b594a8814922db1c0fd11c8c3e SHA512 c2db730318d4c16793d62dbd937c1ff739fffabab6d1689b94252f5501ff36917ddf80a8144583492c05220b3ae33f29ecbcec10f6d8ae0a0b10142be719fc27 WHIRLPOOL 355260ae0e7385c7d00b289e37af09374bc8320f69a55d7ee0469283382f197fd430be32019668b1f29cda69f9d76965d4ee749cb93f1e8263799673e4f0f535
 DIST mysql-5.5.47.tar.gz 21187802 SHA256 77d0997e7ef47885a6682888e6d1282419687d333b2bd2365cb909a089b8db7b SHA512 807d140764ec18f4a7edb8de3ceff24b2003f1b30cf59cce315b6c1f2475a3f3f92bf369e9fe5704611dd45ee5fb676c0c187851230dcb419adde22436678ce3 WHIRLPOOL db188a23b470fc4d556dfeee6feb2a248dcbffe027018c99e28f3a47c2783cfe473378fb96aefbf5a263a6bd4676e62e77f9e6c1e3aac6325f732d9517a4a867
 DIST mysql-5.5.48.tar.gz 21201193 SHA256 cc3f8745879eee0508de1a70fc2d267a2d06b7433faa8bb07a787768dcfed781 SHA512 ac13cdfd89dea70f9ffb443affd5b9abf9984c5ea126b58d7833568e985478a667b73b1c9a4c8c80d80ce8da53168ee720191829ed035cff3f9482f58b5510e4 WHIRLPOOL d4d53f00e370c8c54ac42e30bafc2a4e37a24bba16b7f8d000836c50dfded358371c363bee51dd6bea60cbf4eb1cbcf2f32f61c70e908e344fc1dbcf299c0e84
 DIST mysql-5.6.27.tar.gz 33327156 SHA256 8356bba23f3f6c0c2d4806110c41d1c4d6a4b9c50825e11c5be4bbee2b20b71d SHA512 2839a2f481eec52272a7965d1344677c0d0b77d85108e3b4986dc346caebf62d9ef6347756bac156dd943ad57440d6cac9283ee252e30bd3a1e430c492aceb09 WHIRLPOOL 4fdc0db92822809824777c5f712c3e7898af58f178d22ec4ca1a56d9c9b4d782efe47b3b35b7cc9c7b45d31f25f0323cced346e29c24e7bc4e7b9d965c48cfd7

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index 35b76a8..422ac80 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -15,7 +15,6 @@ dev-db/mysql
 dev-db/mariadb
 -->
 <use>
-  <flag name="client-libs">Build the libmysqlclient libraries</flag>
   <flag name="cluster">Add support for NDB clustering (deprecated)</flag>
   <flag name="community">Enables the community features from upstream.</flag>
   <flag name="embedded">Build embedded server (libmysqld)</flag>
@@ -30,7 +29,6 @@ dev-db/mariadb
   <flag name="server">Build the server program</flag>
   <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
   <flag name="test">Install upstream testsuites for end use.</flag>
-  <flag name="tools">Build the command line tools (mysql, mysqldump, mysqladmin, etc)</flag>
   <flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag>
 </use>
 </pkgmetadata>

diff --git a/dev-db/mysql/mysql-5.5.46.ebuild b/dev-db/mysql/mysql-5.5.46.ebuild
deleted file mode 100644
index 9a964d7..0000000
--- a/dev-db/mysql/mysql-5.5.46.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20150127-1351Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.27-r1.ebuild b/dev-db/mysql/mysql-5.6.27-r1.ebuild
deleted file mode 100644
index 8a15534..0000000
--- a/dev-db/mysql/mysql-5.6.27-r1.ebuild
+++ /dev/null
@@ -1,173 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20151105-2051Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit toolchain-funcs mysql-multilib
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES="-DWITHOUT_VALIDATE_PASSWORD=1"
-
-src_prepare() {
-	mysql-multilib_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Create a symlink to provided binaries so the tests can find them when client-libs is off
-		if ! use client-libs ; then
-			ln -srf /usr/bin/my_print_defaults "${BUILD_DIR}/client/my_print_defaults" || die
-			ln -srf /usr/bin/perror "${BUILD_DIR}/client/perror" || die
-			mysql-multilib_disable_test main.perror "String mismatch due to not building local perror"
-		fi
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-02-12  3:46 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-02-12  3:46 UTC (permalink / raw
  To: gentoo-commits

commit:     ec0a7bb111ee936f3ded17fc901a46bf1c35b371
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 12 03:34:54 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Feb 12 03:46:11 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec0a7bb1

dev-db/mysql: Version bumps

Package-Manager: portage-2.2.27

 dev-db/mysql/Manifest            |   3 +
 dev-db/mysql/mysql-5.5.48.ebuild | 126 +++++++++++++++++++++++++++++
 dev-db/mysql/mysql-5.6.29.ebuild | 166 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 295 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 28c323a..3bc0e31 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,6 +1,9 @@
 DIST mysql-5.5.46.tar.gz 21838374 SHA256 93e0d91f1b380508edcecdd102cbec79a609d6b594a8814922db1c0fd11c8c3e SHA512 c2db730318d4c16793d62dbd937c1ff739fffabab6d1689b94252f5501ff36917ddf80a8144583492c05220b3ae33f29ecbcec10f6d8ae0a0b10142be719fc27 WHIRLPOOL 355260ae0e7385c7d00b289e37af09374bc8320f69a55d7ee0469283382f197fd430be32019668b1f29cda69f9d76965d4ee749cb93f1e8263799673e4f0f535
 DIST mysql-5.5.47.tar.gz 21187802 SHA256 77d0997e7ef47885a6682888e6d1282419687d333b2bd2365cb909a089b8db7b SHA512 807d140764ec18f4a7edb8de3ceff24b2003f1b30cf59cce315b6c1f2475a3f3f92bf369e9fe5704611dd45ee5fb676c0c187851230dcb419adde22436678ce3 WHIRLPOOL db188a23b470fc4d556dfeee6feb2a248dcbffe027018c99e28f3a47c2783cfe473378fb96aefbf5a263a6bd4676e62e77f9e6c1e3aac6325f732d9517a4a867
+DIST mysql-5.5.48.tar.gz 21201193 SHA256 cc3f8745879eee0508de1a70fc2d267a2d06b7433faa8bb07a787768dcfed781 SHA512 ac13cdfd89dea70f9ffb443affd5b9abf9984c5ea126b58d7833568e985478a667b73b1c9a4c8c80d80ce8da53168ee720191829ed035cff3f9482f58b5510e4 WHIRLPOOL d4d53f00e370c8c54ac42e30bafc2a4e37a24bba16b7f8d000836c50dfded358371c363bee51dd6bea60cbf4eb1cbcf2f32f61c70e908e344fc1dbcf299c0e84
 DIST mysql-5.6.27.tar.gz 33327156 SHA256 8356bba23f3f6c0c2d4806110c41d1c4d6a4b9c50825e11c5be4bbee2b20b71d SHA512 2839a2f481eec52272a7965d1344677c0d0b77d85108e3b4986dc346caebf62d9ef6347756bac156dd943ad57440d6cac9283ee252e30bd3a1e430c492aceb09 WHIRLPOOL 4fdc0db92822809824777c5f712c3e7898af58f178d22ec4ca1a56d9c9b4d782efe47b3b35b7cc9c7b45d31f25f0323cced346e29c24e7bc4e7b9d965c48cfd7
 DIST mysql-5.6.28.tar.gz 32182980 SHA256 217cd96921abdd709b9b4ff3ce2af4cbd237de43679cf19385d19df03a037b21 SHA512 f02f91586567cb240ec882108ed5cc9e49a4e96545738cf00d43ba6c1fbe8d08b3726dccbe6f7b2412136a1bd50098543975d68ed2322f4cdeb7cd9572d48fcc WHIRLPOOL 039bb2af811d13c573d1a62cd9c8c043b03fba9a369a6afd30336dcc5ba999e90e2e86f1d1b5d4e5944d76eed1c2893e515705aa384cec98e24e2e8a8f7437c2
+DIST mysql-5.6.29.tar.gz 32220131 SHA256 6ac85b75b2dfa8c232725dda25469df37bf4e48b408cc0978d0dfc34c25a817f SHA512 d0efb3a03274639e3e585d8af338f8907094643dfeeee457de99d5cd7feabb6d69a8b884ccf9625b10df7531a76bc36df25a3e8713dcb657b578fac991ade8c5 WHIRLPOOL 808c3beaf3873e5e8a4a50bf94f511e2327daee39dad675f87370174dda51604e46a2d4f09e16e0c651092600165bcb65fba650f835d93a5983bb2fcb19b9c94
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20151105-2051Z.tar.bz2 1490187 SHA256 129d79c2064b08b0afad69e04e27991bf4103c20ccea39c133239b1dd822a49f SHA512 af34a44275b06c1626eb5952b3643b5663b8a1fb1d9ff18a67d51c02daaa51c4476df407d38ab607cc41842b47e5dd7b4cef8ae380a41eb80923df8052b9e521 WHIRLPOOL 01702ca4e2033fbc70db3ab2dd166b2e31072ea0f6bdd42d00c27ae0c0afab5c8451c4dcc90cce6d46f9ea056017e273f7c719e1cfabf969293bdcd15241f5b3
+DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd

diff --git a/dev-db/mysql/mysql-5.5.48.ebuild b/dev-db/mysql/mysql-5.5.48.ebuild
new file mode 100644
index 0000000..dbc9696
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.48.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20150127-1351Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}

diff --git a/dev-db/mysql/mysql-5.6.29.ebuild b/dev-db/mysql/mysql-5.6.29.ebuild
new file mode 100644
index 0000000..7537cf9
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.29.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20160212-0233Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+		; do
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-02-03 20:46 Markus Meier
  0 siblings, 0 replies; 393+ messages in thread
From: Markus Meier @ 2016-02-03 20:46 UTC (permalink / raw
  To: gentoo-commits

commit:     0d85bba204054c1940a15cef5e9dfd76871165c3
Author:     Markus Meier <maekke <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  3 20:45:54 2016 +0000
Commit:     Markus Meier <maekke <AT> gentoo <DOT> org>
CommitDate: Wed Feb  3 20:46:11 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d85bba2

dev-db/mysql: arm stable, bug #572870

Package-Manager: portage-2.2.27
RepoMan-Options: --include-arches="arm"

 dev-db/mysql/mysql-5.6.28.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.28.ebuild b/dev-db/mysql/mysql-5.6.28.ebuild
index 3f54023..bc12816 100644
--- a/dev-db/mysql/mysql-5.6.28.ebuild
+++ b/dev-db/mysql/mysql-5.6.28.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-01-31 13:39 Tobias Klausmann
  0 siblings, 0 replies; 393+ messages in thread
From: Tobias Klausmann @ 2016-01-31 13:39 UTC (permalink / raw
  To: gentoo-commits

commit:     fab6983799c5b3119f37eb5b55eaf1ebe8d54733
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 31 13:39:45 2016 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Sun Jan 31 13:39:45 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fab69837

dev-db/mysql: add alpha keyword

Gentoo-Bug: 572870

Package-Manager: portage-2.2.27

 dev-db/mysql/mysql-5.6.28.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.28.ebuild b/dev-db/mysql/mysql-5.6.28.ebuild
index f2f9c5c..3f54023 100644
--- a/dev-db/mysql/mysql-5.6.28.ebuild
+++ b/dev-db/mysql/mysql-5.6.28.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-01-31 11:11 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-01-31 11:11 UTC (permalink / raw
  To: gentoo-commits

commit:     894c08d1bee3ea916470daff97aa558076e3277c
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 31 11:10:57 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sun Jan 31 11:10:57 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=894c08d1

dev-db/mysql: x86 stable wrt bug #572870

Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.28.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.28.ebuild b/dev-db/mysql/mysql-5.6.28.ebuild
index 2983835..f2f9c5c 100644
--- a/dev-db/mysql/mysql-5.6.28.ebuild
+++ b/dev-db/mysql/mysql-5.6.28.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-01-31 11:09 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-01-31 11:09 UTC (permalink / raw
  To: gentoo-commits

commit:     cc9d8f71152b4d1278cc5c46378cb2bd5e2df1aa
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 31 11:09:48 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sun Jan 31 11:09:48 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc9d8f71

dev-db/mysql: amd64 stable wrt bug #572870

Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.28.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.28.ebuild b/dev-db/mysql/mysql-5.6.28.ebuild
index 798e92d..2983835 100644
--- a/dev-db/mysql/mysql-5.6.28.ebuild
+++ b/dev-db/mysql/mysql-5.6.28.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-01-31  9:23 Jeroen Roovers
  0 siblings, 0 replies; 393+ messages in thread
From: Jeroen Roovers @ 2016-01-31  9:23 UTC (permalink / raw
  To: gentoo-commits

commit:     9090d9e88da9e5489d92ff8377043e095f045761
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 31 09:16:41 2016 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Jan 31 09:22:59 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9090d9e8

dev-db/mysql: Stable for HPPA PPC64 (bug #572870).

Package-Manager: portage-2.2.27
RepoMan-Options: --ignore-arches

 dev-db/mysql/mysql-5.6.28.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.28.ebuild b/dev-db/mysql/mysql-5.6.28.ebuild
index ee4c1e8..798e92d 100644
--- a/dev-db/mysql/mysql-5.6.28.ebuild
+++ b/dev-db/mysql/mysql-5.6.28.ebuild
@@ -15,7 +15,7 @@ inherit mysql-multilib-r1
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-01-26  5:11 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-01-26  5:11 UTC (permalink / raw
  To: gentoo-commits

commit:     f2c29e8eb86c0e2678aa976c42299ff1584073be
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 26 05:11:34 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Jan 26 05:11:34 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2c29e8e

dev-db/mysql: Version bump for 5.5 series

Package-Manager: portage-2.2.27

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.5.47.ebuild | 126 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 127 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 47de16b..28c323a 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,4 +1,5 @@
 DIST mysql-5.5.46.tar.gz 21838374 SHA256 93e0d91f1b380508edcecdd102cbec79a609d6b594a8814922db1c0fd11c8c3e SHA512 c2db730318d4c16793d62dbd937c1ff739fffabab6d1689b94252f5501ff36917ddf80a8144583492c05220b3ae33f29ecbcec10f6d8ae0a0b10142be719fc27 WHIRLPOOL 355260ae0e7385c7d00b289e37af09374bc8320f69a55d7ee0469283382f197fd430be32019668b1f29cda69f9d76965d4ee749cb93f1e8263799673e4f0f535
+DIST mysql-5.5.47.tar.gz 21187802 SHA256 77d0997e7ef47885a6682888e6d1282419687d333b2bd2365cb909a089b8db7b SHA512 807d140764ec18f4a7edb8de3ceff24b2003f1b30cf59cce315b6c1f2475a3f3f92bf369e9fe5704611dd45ee5fb676c0c187851230dcb419adde22436678ce3 WHIRLPOOL db188a23b470fc4d556dfeee6feb2a248dcbffe027018c99e28f3a47c2783cfe473378fb96aefbf5a263a6bd4676e62e77f9e6c1e3aac6325f732d9517a4a867
 DIST mysql-5.6.27.tar.gz 33327156 SHA256 8356bba23f3f6c0c2d4806110c41d1c4d6a4b9c50825e11c5be4bbee2b20b71d SHA512 2839a2f481eec52272a7965d1344677c0d0b77d85108e3b4986dc346caebf62d9ef6347756bac156dd943ad57440d6cac9283ee252e30bd3a1e430c492aceb09 WHIRLPOOL 4fdc0db92822809824777c5f712c3e7898af58f178d22ec4ca1a56d9c9b4d782efe47b3b35b7cc9c7b45d31f25f0323cced346e29c24e7bc4e7b9d965c48cfd7
 DIST mysql-5.6.28.tar.gz 32182980 SHA256 217cd96921abdd709b9b4ff3ce2af4cbd237de43679cf19385d19df03a037b21 SHA512 f02f91586567cb240ec882108ed5cc9e49a4e96545738cf00d43ba6c1fbe8d08b3726dccbe6f7b2412136a1bd50098543975d68ed2322f4cdeb7cd9572d48fcc WHIRLPOOL 039bb2af811d13c573d1a62cd9c8c043b03fba9a369a6afd30336dcc5ba999e90e2e86f1d1b5d4e5944d76eed1c2893e515705aa384cec98e24e2e8a8f7437c2
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4

diff --git a/dev-db/mysql/mysql-5.5.47.ebuild b/dev-db/mysql/mysql-5.5.47.ebuild
new file mode 100644
index 0000000..dbc9696
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.47.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20150127-1351Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-01-10 14:29 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2016-01-10 14:29 UTC (permalink / raw
  To: gentoo-commits

commit:     763d15b53c2db8cbc6400d383b032812d04f7d43
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 10 14:29:19 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun Jan 10 14:29:19 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=763d15b5

dev-db/mysql: Remove security vulnerable version wrt bug 564170

Package-Manager: portage-2.2.26

 dev-db/mysql/Manifest            |   2 -
 dev-db/mysql/mysql-5.6.26.ebuild | 166 ---------------------------------------
 2 files changed, 168 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 9b0f84a..47de16b 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,7 +1,5 @@
 DIST mysql-5.5.46.tar.gz 21838374 SHA256 93e0d91f1b380508edcecdd102cbec79a609d6b594a8814922db1c0fd11c8c3e SHA512 c2db730318d4c16793d62dbd937c1ff739fffabab6d1689b94252f5501ff36917ddf80a8144583492c05220b3ae33f29ecbcec10f6d8ae0a0b10142be719fc27 WHIRLPOOL 355260ae0e7385c7d00b289e37af09374bc8320f69a55d7ee0469283382f197fd430be32019668b1f29cda69f9d76965d4ee749cb93f1e8263799673e4f0f535
-DIST mysql-5.6.26.tar.gz 33278710 SHA256 b44c6ce5f95172c56c73edfa8b710b39242ec7af0ab182c040208c41866e5070 SHA512 455bf66e1c63e3368a3dd53f80a3393e33a20605cde320ee0bb61339d0853c2187d4947812405b85ea93a7da722787e958515fc69807c3fab131878fe9604f62 WHIRLPOOL e5fe46e4f1c8a20d955b5921c6773823cb1c01bd78319485528c478f213a37dc8ce8a1bc5c61904595e8931dec1376d471387a3f85119a0791cb8f6d9303eb6f
 DIST mysql-5.6.27.tar.gz 33327156 SHA256 8356bba23f3f6c0c2d4806110c41d1c4d6a4b9c50825e11c5be4bbee2b20b71d SHA512 2839a2f481eec52272a7965d1344677c0d0b77d85108e3b4986dc346caebf62d9ef6347756bac156dd943ad57440d6cac9283ee252e30bd3a1e430c492aceb09 WHIRLPOOL 4fdc0db92822809824777c5f712c3e7898af58f178d22ec4ca1a56d9c9b4d782efe47b3b35b7cc9c7b45d31f25f0323cced346e29c24e7bc4e7b9d965c48cfd7
 DIST mysql-5.6.28.tar.gz 32182980 SHA256 217cd96921abdd709b9b4ff3ce2af4cbd237de43679cf19385d19df03a037b21 SHA512 f02f91586567cb240ec882108ed5cc9e49a4e96545738cf00d43ba6c1fbe8d08b3726dccbe6f7b2412136a1bd50098543975d68ed2322f4cdeb7cd9572d48fcc WHIRLPOOL 039bb2af811d13c573d1a62cd9c8c043b03fba9a369a6afd30336dcc5ba999e90e2e86f1d1b5d4e5944d76eed1c2893e515705aa384cec98e24e2e8a8f7437c2
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
-DIST mysql-extras-20150410-1944Z.tar.bz2 1493690 SHA256 e327adf02be4c2bce5121f01d6b139309c72814b8c50a29559dfddee12a0b4e2 SHA512 e2e5345290134e597734514041e413f0633b8078bfddb8b8e7695468ce7341735b732d5bb602ab7aa9a4045d71571b73aac01a5d96687d4fbd380736f5ed650c WHIRLPOOL f65f294905fd1d04e2be79a803b658ed432338501665a75cbe0cc5b3af8abf0615f1f808465c3ca3c7e850b9277f451f5c77b518977f4bee8dc77d6089ff88fb
 DIST mysql-extras-20151105-2051Z.tar.bz2 1490187 SHA256 129d79c2064b08b0afad69e04e27991bf4103c20ccea39c133239b1dd822a49f SHA512 af34a44275b06c1626eb5952b3643b5663b8a1fb1d9ff18a67d51c02daaa51c4476df407d38ab607cc41842b47e5dd7b4cef8ae380a41eb80923df8052b9e521 WHIRLPOOL 01702ca4e2033fbc70db3ab2dd166b2e31072ea0f6bdd42d00c27ae0c0afab5c8451c4dcc90cce6d46f9ea056017e273f7c719e1cfabf969293bdcd15241f5b3

diff --git a/dev-db/mysql/mysql-5.6.26.ebuild b/dev-db/mysql/mysql-5.6.26.ebuild
deleted file mode 100644
index 3235fd9..0000000
--- a/dev-db/mysql/mysql-5.6.26.ebuild
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20150410-1944Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-SUBSLOT="18"
-
-inherit toolchain-funcs mysql-multilib
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES="-DWITHOUT_VALIDATE_PASSWORD=1"
-
-src_prepare() {
-	mysql-multilib_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-01-10 11:22 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-01-10 11:22 UTC (permalink / raw
  To: gentoo-commits

commit:     1d62419b132f897f75724fe209ac340ed24c14ba
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 10 11:21:58 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sun Jan 10 11:21:58 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d62419b

dev-db/mysql: alpha stable wrt bug #564170

Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="alpha"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.27.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.27.ebuild b/dev-db/mysql/mysql-5.6.27.ebuild
index dd061c3..4e6a699 100644
--- a/dev-db/mysql/mysql-5.6.27.ebuild
+++ b/dev-db/mysql/mysql-5.6.27.ebuild
@@ -14,7 +14,7 @@ inherit toolchain-funcs mysql-multilib
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE='20018_all_mysql-5.6.25-without-clientlibs-tools.patch'


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2016-01-09  7:10 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2016-01-09  7:10 UTC (permalink / raw
  To: gentoo-commits

commit:     420c226179a4e6e30d451154ed7a2d3dcb060f35
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  9 07:09:06 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sat Jan  9 07:09:06 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=420c2261

dev-db/mysql: sparc stable wrt bug #564170

Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="sparc"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-db/mysql/mysql-5.6.27.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.27.ebuild b/dev-db/mysql/mysql-5.6.27.ebuild
index 20c5aeb..dd061c3 100644
--- a/dev-db/mysql/mysql-5.6.27.ebuild
+++ b/dev-db/mysql/mysql-5.6.27.ebuild
@@ -14,7 +14,7 @@ inherit toolchain-funcs mysql-multilib
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE='20018_all_mysql-5.6.25-without-clientlibs-tools.patch'


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-12-15 17:42 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2015-12-15 17:42 UTC (permalink / raw
  To: gentoo-commits

commit:     7559f441d8a99a5c965d62f82d6443d2da02589f
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 15 17:42:00 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 17:42:42 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7559f441

dev-db/mysql: Fix ebuild tests to call the correct disable function

Package-Manager: portage-2.2.26

 dev-db/mysql/mysql-5.6.28.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.28.ebuild b/dev-db/mysql/mysql-5.6.28.ebuild
index 716cd4f..ee4c1e8 100644
--- a/dev-db/mysql/mysql-5.6.28.ebuild
+++ b/dev-db/mysql/mysql-5.6.28.ebuild
@@ -123,13 +123,13 @@ multilib_src_test() {
 			rpl.rpl_plugin_load \
 			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
 		; do
-				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
+				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
 		done
 
 		if ! use extraengine ; then
 			# bug 401673, 530766
 			for t in federated.federated_plugin ; do
-				mysql-multilib_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+				mysql-multilib-r1_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
 			done
 		fi
 


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-12-14 14:36 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2015-12-14 14:36 UTC (permalink / raw
  To: gentoo-commits

commit:     3ebff50c7ef89f55f3830ff1389bab68e25e68b3
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 14 14:27:10 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Dec 14 14:35:21 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ebff50c

dev-db/mysql: Fix tests with removed USE flag

Package-Manager: portage-2.2.26

 dev-db/mysql/mysql-5.6.28.ebuild | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/dev-db/mysql/mysql-5.6.28.ebuild b/dev-db/mysql/mysql-5.6.28.ebuild
index 959b86e..716cd4f 100644
--- a/dev-db/mysql/mysql-5.6.28.ebuild
+++ b/dev-db/mysql/mysql-5.6.28.ebuild
@@ -74,13 +74,6 @@ multilib_src_test() {
 		retstatus_unit=$?
 		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
 
-		# Create a symlink to provided binaries so the tests can find them when client-libs is off
-		if ! use client-libs ; then
-			ln -srf /usr/bin/my_print_defaults "${BUILD_DIR}/client/my_print_defaults" || die
-			ln -srf /usr/bin/perror "${BUILD_DIR}/client/perror" || die
-			mysql-multilib_disable_test main.perror "String mismatch due to not building local perror"
-		fi
-
 		# Ensure that parallel runs don't die
 		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
 		# Enable parallel testing, auto will try to detect number of cores


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-12-13 22:15 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2015-12-13 22:15 UTC (permalink / raw
  To: gentoo-commits

commit:     a5b2abffcb93df0623b0b6b3e58b0d6211185949
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 13 22:15:02 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun Dec 13 22:15:02 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5b2abff

dev-db/mysql: Bump patch version

The missing patch could cause missing build dependencies.
No code changes.

Package-Manager: portage-2.2.26

 dev-db/mysql/Manifest            | 1 -
 dev-db/mysql/mysql-5.6.28.ebuild | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 7832816..9b0f84a 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -4,5 +4,4 @@ DIST mysql-5.6.27.tar.gz 33327156 SHA256 8356bba23f3f6c0c2d4806110c41d1c4d6a4b9c
 DIST mysql-5.6.28.tar.gz 32182980 SHA256 217cd96921abdd709b9b4ff3ce2af4cbd237de43679cf19385d19df03a037b21 SHA512 f02f91586567cb240ec882108ed5cc9e49a4e96545738cf00d43ba6c1fbe8d08b3726dccbe6f7b2412136a1bd50098543975d68ed2322f4cdeb7cd9572d48fcc WHIRLPOOL 039bb2af811d13c573d1a62cd9c8c043b03fba9a369a6afd30336dcc5ba999e90e2e86f1d1b5d4e5944d76eed1c2893e515705aa384cec98e24e2e8a8f7437c2
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20150410-1944Z.tar.bz2 1493690 SHA256 e327adf02be4c2bce5121f01d6b139309c72814b8c50a29559dfddee12a0b4e2 SHA512 e2e5345290134e597734514041e413f0633b8078bfddb8b8e7695468ce7341735b732d5bb602ab7aa9a4045d71571b73aac01a5d96687d4fbd380736f5ed650c WHIRLPOOL f65f294905fd1d04e2be79a803b658ed432338501665a75cbe0cc5b3af8abf0615f1f808465c3ca3c7e850b9277f451f5c77b518977f4bee8dc77d6089ff88fb
-DIST mysql-extras-20150717-1707Z.tar.bz2 1491956 SHA256 d67cc1e2c581ab7c57122b7d29864643869799893a95a158a18e14201d4ffc10 SHA512 3a7cb07773099e766f8e796d4e555d42874b85285cc2c7c60220370cc6aafc36a60eb340008637298d85d83f529e73392895a81c1438ffccff9eb8f354b29ba9 WHIRLPOOL 11e75f4b696e2547c1da40e69d8ab75df4bf7080426204c040632f24846407b07d71061c09c4ff4a1d21a9d14a94769d8f8ef62421d0aecd99efe832caf4dd22
 DIST mysql-extras-20151105-2051Z.tar.bz2 1490187 SHA256 129d79c2064b08b0afad69e04e27991bf4103c20ccea39c133239b1dd822a49f SHA512 af34a44275b06c1626eb5952b3643b5663b8a1fb1d9ff18a67d51c02daaa51c4476df407d38ab607cc41842b47e5dd7b4cef8ae380a41eb80923df8052b9e521 WHIRLPOOL 01702ca4e2033fbc70db3ab2dd166b2e31072ea0f6bdd42d00c27ae0c0afab5c8451c4dcc90cce6d46f9ea056017e273f7c719e1cfabf969293bdcd15241f5b3

diff --git a/dev-db/mysql/mysql-5.6.28.ebuild b/dev-db/mysql/mysql-5.6.28.ebuild
index c41c878..959b86e 100644
--- a/dev-db/mysql/mysql-5.6.28.ebuild
+++ b/dev-db/mysql/mysql-5.6.28.ebuild
@@ -4,7 +4,7 @@
 
 EAPI="5"
 
-MY_EXTRAS_VER="20150717-1707Z"
+MY_EXTRAS_VER="20151105-2051Z"
 MY_PV="${PV//_alpha_pre/-m}"
 MY_PV="${MY_PV//_/-}"
 HAS_TOOLS_PATCH="1"


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-12-13 22:07 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2015-12-13 22:07 UTC (permalink / raw
  To: gentoo-commits

commit:     7cd24c9ff964670a9031fe48037ea7865b75e0cd
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 13 21:54:47 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun Dec 13 21:54:47 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cd24c9f

dev-db/mysql: Version bump

Package-Manager: portage-2.2.26

 dev-db/mysql/Manifest            |   2 +
 dev-db/mysql/mysql-5.6.28.ebuild | 173 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 175 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 6aa33c3..7832816 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,6 +1,8 @@
 DIST mysql-5.5.46.tar.gz 21838374 SHA256 93e0d91f1b380508edcecdd102cbec79a609d6b594a8814922db1c0fd11c8c3e SHA512 c2db730318d4c16793d62dbd937c1ff739fffabab6d1689b94252f5501ff36917ddf80a8144583492c05220b3ae33f29ecbcec10f6d8ae0a0b10142be719fc27 WHIRLPOOL 355260ae0e7385c7d00b289e37af09374bc8320f69a55d7ee0469283382f197fd430be32019668b1f29cda69f9d76965d4ee749cb93f1e8263799673e4f0f535
 DIST mysql-5.6.26.tar.gz 33278710 SHA256 b44c6ce5f95172c56c73edfa8b710b39242ec7af0ab182c040208c41866e5070 SHA512 455bf66e1c63e3368a3dd53f80a3393e33a20605cde320ee0bb61339d0853c2187d4947812405b85ea93a7da722787e958515fc69807c3fab131878fe9604f62 WHIRLPOOL e5fe46e4f1c8a20d955b5921c6773823cb1c01bd78319485528c478f213a37dc8ce8a1bc5c61904595e8931dec1376d471387a3f85119a0791cb8f6d9303eb6f
 DIST mysql-5.6.27.tar.gz 33327156 SHA256 8356bba23f3f6c0c2d4806110c41d1c4d6a4b9c50825e11c5be4bbee2b20b71d SHA512 2839a2f481eec52272a7965d1344677c0d0b77d85108e3b4986dc346caebf62d9ef6347756bac156dd943ad57440d6cac9283ee252e30bd3a1e430c492aceb09 WHIRLPOOL 4fdc0db92822809824777c5f712c3e7898af58f178d22ec4ca1a56d9c9b4d782efe47b3b35b7cc9c7b45d31f25f0323cced346e29c24e7bc4e7b9d965c48cfd7
+DIST mysql-5.6.28.tar.gz 32182980 SHA256 217cd96921abdd709b9b4ff3ce2af4cbd237de43679cf19385d19df03a037b21 SHA512 f02f91586567cb240ec882108ed5cc9e49a4e96545738cf00d43ba6c1fbe8d08b3726dccbe6f7b2412136a1bd50098543975d68ed2322f4cdeb7cd9572d48fcc WHIRLPOOL 039bb2af811d13c573d1a62cd9c8c043b03fba9a369a6afd30336dcc5ba999e90e2e86f1d1b5d4e5944d76eed1c2893e515705aa384cec98e24e2e8a8f7437c2
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20150410-1944Z.tar.bz2 1493690 SHA256 e327adf02be4c2bce5121f01d6b139309c72814b8c50a29559dfddee12a0b4e2 SHA512 e2e5345290134e597734514041e413f0633b8078bfddb8b8e7695468ce7341735b732d5bb602ab7aa9a4045d71571b73aac01a5d96687d4fbd380736f5ed650c WHIRLPOOL f65f294905fd1d04e2be79a803b658ed432338501665a75cbe0cc5b3af8abf0615f1f808465c3ca3c7e850b9277f451f5c77b518977f4bee8dc77d6089ff88fb
+DIST mysql-extras-20150717-1707Z.tar.bz2 1491956 SHA256 d67cc1e2c581ab7c57122b7d29864643869799893a95a158a18e14201d4ffc10 SHA512 3a7cb07773099e766f8e796d4e555d42874b85285cc2c7c60220370cc6aafc36a60eb340008637298d85d83f529e73392895a81c1438ffccff9eb8f354b29ba9 WHIRLPOOL 11e75f4b696e2547c1da40e69d8ab75df4bf7080426204c040632f24846407b07d71061c09c4ff4a1d21a9d14a94769d8f8ef62421d0aecd99efe832caf4dd22
 DIST mysql-extras-20151105-2051Z.tar.bz2 1490187 SHA256 129d79c2064b08b0afad69e04e27991bf4103c20ccea39c133239b1dd822a49f SHA512 af34a44275b06c1626eb5952b3643b5663b8a1fb1d9ff18a67d51c02daaa51c4476df407d38ab607cc41842b47e5dd7b4cef8ae380a41eb80923df8052b9e521 WHIRLPOOL 01702ca4e2033fbc70db3ab2dd166b2e31072ea0f6bdd42d00c27ae0c0afab5c8451c4dcc90cce6d46f9ea056017e273f7c719e1cfabf969293bdcd15241f5b3

diff --git a/dev-db/mysql/mysql-5.6.28.ebuild b/dev-db/mysql/mysql-5.6.28.ebuild
new file mode 100644
index 0000000..c41c878
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.28.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20150717-1707Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
+
+src_prepare() {
+	mysql-multilib-r1_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Create a symlink to provided binaries so the tests can find them when client-libs is off
+		if ! use client-libs ; then
+			ln -srf /usr/bin/my_print_defaults "${BUILD_DIR}/client/my_print_defaults" || die
+			ln -srf /usr/bin/perror "${BUILD_DIR}/client/perror" || die
+			mysql-multilib_disable_test main.perror "String mismatch due to not building local perror"
+		fi
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+		; do
+				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-11-18  9:56 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2015-11-18  9:56 UTC (permalink / raw
  To: gentoo-commits

commit:     d98be08ca8d773ab225211b06d1fb95334ded84a
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 18 09:56:29 2015 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Wed Nov 18 09:56:29 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d98be08c

dev-db/mysql: ia64 stable wrt bug #564170

Package-Manager: portage-2.2.20.1
RepoMan-Options: --include-arches="ia64"

 dev-db/mysql/mysql-5.6.27.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.27.ebuild b/dev-db/mysql/mysql-5.6.27.ebuild
index 149edd4..20c5aeb 100644
--- a/dev-db/mysql/mysql-5.6.27.ebuild
+++ b/dev-db/mysql/mysql-5.6.27.ebuild
@@ -14,7 +14,7 @@ inherit toolchain-funcs mysql-multilib
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE='20018_all_mysql-5.6.25-without-clientlibs-tools.patch'


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-11-14 16:49 Markus Meier
  0 siblings, 0 replies; 393+ messages in thread
From: Markus Meier @ 2015-11-14 16:49 UTC (permalink / raw
  To: gentoo-commits

commit:     8016a84f7b071e9767c128ebf9687ef16c09ea98
Author:     Markus Meier <maekke <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 14 16:49:25 2015 +0000
Commit:     Markus Meier <maekke <AT> gentoo <DOT> org>
CommitDate: Sat Nov 14 16:49:25 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8016a84f

dev-db/mysql: arm stable, bug #564170

Package-Manager: portage-2.2.24
RepoMan-Options: --include-arches="arm"

 dev-db/mysql/mysql-5.6.27.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.27.ebuild b/dev-db/mysql/mysql-5.6.27.ebuild
index 34fe1c2..149edd4 100644
--- a/dev-db/mysql/mysql-5.6.27.ebuild
+++ b/dev-db/mysql/mysql-5.6.27.ebuild
@@ -14,7 +14,7 @@ inherit toolchain-funcs mysql-multilib
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE='20018_all_mysql-5.6.25-without-clientlibs-tools.patch'


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-11-09  8:53 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2015-11-09  8:53 UTC (permalink / raw
  To: gentoo-commits

commit:     2582ba5d52e035a782793a2fb669110624c20567
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  9 08:53:50 2015 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Mon Nov  9 08:53:50 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2582ba5d

dev-db/mysql: ppc stable wrt bug #564170

Package-Manager: portage-2.2.20.1
RepoMan-Options: --include-arches="ppc"

 dev-db/mysql/mysql-5.6.27.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.27.ebuild b/dev-db/mysql/mysql-5.6.27.ebuild
index 7ab2b4b..34fe1c2 100644
--- a/dev-db/mysql/mysql-5.6.27.ebuild
+++ b/dev-db/mysql/mysql-5.6.27.ebuild
@@ -14,7 +14,7 @@ inherit toolchain-funcs mysql-multilib
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE='20018_all_mysql-5.6.25-without-clientlibs-tools.patch'


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-11-08  6:09 Jeroen Roovers
  0 siblings, 0 replies; 393+ messages in thread
From: Jeroen Roovers @ 2015-11-08  6:09 UTC (permalink / raw
  To: gentoo-commits

commit:     24b4d2139ae512c03369a62be19369d1352202a3
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  8 06:05:19 2015 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Nov  8 06:05:19 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24b4d213

dev-db/mysql: Stable for HPPA PPC64 (bug #564170).

Package-Manager: portage-2.2.24
RepoMan-Options: --ignore-arches

 dev-db/mysql/mysql-5.6.27.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.27.ebuild b/dev-db/mysql/mysql-5.6.27.ebuild
index 9754e22..7ab2b4b 100644
--- a/dev-db/mysql/mysql-5.6.27.ebuild
+++ b/dev-db/mysql/mysql-5.6.27.ebuild
@@ -14,7 +14,7 @@ inherit toolchain-funcs mysql-multilib
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE='20018_all_mysql-5.6.25-without-clientlibs-tools.patch'


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-11-06 11:28 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2015-11-06 11:28 UTC (permalink / raw
  To: gentoo-commits

commit:     c8795d5f9a7af702929896880268b6428cf6f338
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  6 11:27:55 2015 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Nov  6 11:27:55 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8795d5f

dev-db/mysql: x86 stable wrt bug #564170

Package-Manager: portage-2.2.20.1
RepoMan-Options: --include-arches="x86"

 dev-db/mysql/mysql-5.6.27.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.27.ebuild b/dev-db/mysql/mysql-5.6.27.ebuild
index b866395..9754e22 100644
--- a/dev-db/mysql/mysql-5.6.27.ebuild
+++ b/dev-db/mysql/mysql-5.6.27.ebuild
@@ -14,7 +14,7 @@ inherit toolchain-funcs mysql-multilib
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE='20018_all_mysql-5.6.25-without-clientlibs-tools.patch'


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-11-06 11:27 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2015-11-06 11:27 UTC (permalink / raw
  To: gentoo-commits

commit:     c9658a96c0a839d4c7eafffc1e5d7d8cf4710d3d
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  6 11:27:16 2015 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Nov  6 11:27:16 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9658a96

dev-db/mysql: amd64 stable wrt bug #564170

Package-Manager: portage-2.2.20.1
RepoMan-Options: --include-arches="amd64"

 dev-db/mysql/mysql-5.6.27.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.27.ebuild b/dev-db/mysql/mysql-5.6.27.ebuild
index 845b953..b866395 100644
--- a/dev-db/mysql/mysql-5.6.27.ebuild
+++ b/dev-db/mysql/mysql-5.6.27.ebuild
@@ -14,7 +14,7 @@ inherit toolchain-funcs mysql-multilib
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE='20018_all_mysql-5.6.25-without-clientlibs-tools.patch'


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-11-05 23:13 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2015-11-05 23:13 UTC (permalink / raw
  To: gentoo-commits

commit:     3bfa6d17cda2bcb6b5ceef97d207760e7085761f
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Thu Nov  5 23:13:13 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Thu Nov  5 23:13:13 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bfa6d17

dev-db/mysql: Add patch for tests and update test instructions

Package-Manager: portage-2.2.23

 dev-db/mysql/Manifest               | 2 +-
 dev-db/mysql/mysql-5.6.27-r1.ebuild | 4 ++--
 dev-db/mysql/mysql-5.6.27.ebuild    | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 4593501..6aa33c3 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,4 +3,4 @@ DIST mysql-5.6.26.tar.gz 33278710 SHA256 b44c6ce5f95172c56c73edfa8b710b39242ec7a
 DIST mysql-5.6.27.tar.gz 33327156 SHA256 8356bba23f3f6c0c2d4806110c41d1c4d6a4b9c50825e11c5be4bbee2b20b71d SHA512 2839a2f481eec52272a7965d1344677c0d0b77d85108e3b4986dc346caebf62d9ef6347756bac156dd943ad57440d6cac9283ee252e30bd3a1e430c492aceb09 WHIRLPOOL 4fdc0db92822809824777c5f712c3e7898af58f178d22ec4ca1a56d9c9b4d782efe47b3b35b7cc9c7b45d31f25f0323cced346e29c24e7bc4e7b9d965c48cfd7
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20150410-1944Z.tar.bz2 1493690 SHA256 e327adf02be4c2bce5121f01d6b139309c72814b8c50a29559dfddee12a0b4e2 SHA512 e2e5345290134e597734514041e413f0633b8078bfddb8b8e7695468ce7341735b732d5bb602ab7aa9a4045d71571b73aac01a5d96687d4fbd380736f5ed650c WHIRLPOOL f65f294905fd1d04e2be79a803b658ed432338501665a75cbe0cc5b3af8abf0615f1f808465c3ca3c7e850b9277f451f5c77b518977f4bee8dc77d6089ff88fb
-DIST mysql-extras-20150717-1707Z.tar.bz2 1491956 SHA256 d67cc1e2c581ab7c57122b7d29864643869799893a95a158a18e14201d4ffc10 SHA512 3a7cb07773099e766f8e796d4e555d42874b85285cc2c7c60220370cc6aafc36a60eb340008637298d85d83f529e73392895a81c1438ffccff9eb8f354b29ba9 WHIRLPOOL 11e75f4b696e2547c1da40e69d8ab75df4bf7080426204c040632f24846407b07d71061c09c4ff4a1d21a9d14a94769d8f8ef62421d0aecd99efe832caf4dd22
+DIST mysql-extras-20151105-2051Z.tar.bz2 1490187 SHA256 129d79c2064b08b0afad69e04e27991bf4103c20ccea39c133239b1dd822a49f SHA512 af34a44275b06c1626eb5952b3643b5663b8a1fb1d9ff18a67d51c02daaa51c4476df407d38ab607cc41842b47e5dd7b4cef8ae380a41eb80923df8052b9e521 WHIRLPOOL 01702ca4e2033fbc70db3ab2dd166b2e31072ea0f6bdd42d00c27ae0c0afab5c8451c4dcc90cce6d46f9ea056017e273f7c719e1cfabf969293bdcd15241f5b3

diff --git a/dev-db/mysql/mysql-5.6.27-r1.ebuild b/dev-db/mysql/mysql-5.6.27-r1.ebuild
index 4ff5c0d..8a15534 100644
--- a/dev-db/mysql/mysql-5.6.27-r1.ebuild
+++ b/dev-db/mysql/mysql-5.6.27-r1.ebuild
@@ -4,7 +4,7 @@
 
 EAPI="5"
 
-MY_EXTRAS_VER="20150717-1707Z"
+MY_EXTRAS_VER="20151105-2051Z"
 MY_PV="${PV//_alpha_pre/-m}"
 MY_PV="${MY_PV//_/-}"
 HAS_TOOLS_PATCH="1"
@@ -40,7 +40,7 @@ src_prepare() {
 }
 
 # Official test instructions:
-# USE='server embedded extraengine perl ssl static-libs community' \
+# USE='server embedded extraengine perl openssl static-libs' \
 # FEATURES='test userpriv -usersandbox' \
 # ebuild mysql-X.X.XX.ebuild \
 # digest clean package

diff --git a/dev-db/mysql/mysql-5.6.27.ebuild b/dev-db/mysql/mysql-5.6.27.ebuild
index 98a209a..845b953 100644
--- a/dev-db/mysql/mysql-5.6.27.ebuild
+++ b/dev-db/mysql/mysql-5.6.27.ebuild
@@ -4,7 +4,7 @@
 
 EAPI="5"
 
-MY_EXTRAS_VER="20150410-1944Z"
+MY_EXTRAS_VER="20151105-2051Z"
 MY_PV="${PV//_alpha_pre/-m}"
 MY_PV="${MY_PV//_/-}"
 SUBSLOT="18"
@@ -17,7 +17,7 @@ IUSE="$IUSE"
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
+EPATCH_EXCLUDE='20018_all_mysql-5.6.25-without-clientlibs-tools.patch'
 
 DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
 RDEPEND="${RDEPEND}"
@@ -39,7 +39,7 @@ src_prepare() {
 }
 
 # Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
+# USE='embedded extraengine perl openssl static-libs' \
 # FEATURES='test userpriv -usersandbox' \
 # ebuild mysql-X.X.XX.ebuild \
 # digest clean package


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-10-26 13:24 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2015-10-26 13:24 UTC (permalink / raw
  To: gentoo-commits

commit:     104e30c633067f9e0cbb4708621646481273de03
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 26 13:22:50 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Oct 26 13:22:50 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=104e30c6

dev-db/mysql: Drop old, unstable, security vulnerable versions

See http://www.oracle.com/technetwork/topics/security/cpuoct2015-2367953.html#AppendixMSQL
for security details

Package-Manager: portage-2.2.23

 dev-db/mysql/Manifest               |   3 -
 dev-db/mysql/mysql-5.5.44.ebuild    | 126 --------------------------
 dev-db/mysql/mysql-5.5.45.ebuild    | 126 --------------------------
 dev-db/mysql/mysql-5.6.26-r1.ebuild | 173 ------------------------------------
 4 files changed, 428 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 059566b..4593501 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,9 +1,6 @@
-DIST mysql-5.5.44.tar.gz 21789766 SHA256 85f05b257db39e63c82ff4b5ce4e0c6d2b07560b5fc1646d47d7ae48eab3e5de SHA512 05707b96c3e0d39ca103d965640aa1a9461a513f788fc7f2acce4b3933ec578b3d66df53955b0dff1b6c9e5acd98441cfe1df5b3154a1058293babc39c26dad5 WHIRLPOOL 870d9728c78f6732fcd6f95e62833a769c937c96298a39bb023b33a9138552e254d2a3f6285d8f4f0b740de9d7397fa1a0987234a0a4dfa13c787fc068053d78
-DIST mysql-5.5.45.tar.gz 21832364 SHA256 744efd3c39265b5fdeebd25f58ecb34a6eb06e02d9ec2febd3164942f2c89332 SHA512 1c8ddf294232b106562537d6e9b4a3956dd1a290562f313d311f2bbe09f1cb95c28e7e9a4c92a1fcc91a394514bc1190d185b1134003a9f6183ecc2a06d618e8 WHIRLPOOL 3daed09edfc1ca7a0ae379b876e061c2318755fdd14be9630b7c5311985e91ea46cf0e0b1eab98c758cc2809d5d562fcfd2f22022100051746343e147f3d4ebc
 DIST mysql-5.5.46.tar.gz 21838374 SHA256 93e0d91f1b380508edcecdd102cbec79a609d6b594a8814922db1c0fd11c8c3e SHA512 c2db730318d4c16793d62dbd937c1ff739fffabab6d1689b94252f5501ff36917ddf80a8144583492c05220b3ae33f29ecbcec10f6d8ae0a0b10142be719fc27 WHIRLPOOL 355260ae0e7385c7d00b289e37af09374bc8320f69a55d7ee0469283382f197fd430be32019668b1f29cda69f9d76965d4ee749cb93f1e8263799673e4f0f535
 DIST mysql-5.6.26.tar.gz 33278710 SHA256 b44c6ce5f95172c56c73edfa8b710b39242ec7af0ab182c040208c41866e5070 SHA512 455bf66e1c63e3368a3dd53f80a3393e33a20605cde320ee0bb61339d0853c2187d4947812405b85ea93a7da722787e958515fc69807c3fab131878fe9604f62 WHIRLPOOL e5fe46e4f1c8a20d955b5921c6773823cb1c01bd78319485528c478f213a37dc8ce8a1bc5c61904595e8931dec1376d471387a3f85119a0791cb8f6d9303eb6f
 DIST mysql-5.6.27.tar.gz 33327156 SHA256 8356bba23f3f6c0c2d4806110c41d1c4d6a4b9c50825e11c5be4bbee2b20b71d SHA512 2839a2f481eec52272a7965d1344677c0d0b77d85108e3b4986dc346caebf62d9ef6347756bac156dd943ad57440d6cac9283ee252e30bd3a1e430c492aceb09 WHIRLPOOL 4fdc0db92822809824777c5f712c3e7898af58f178d22ec4ca1a56d9c9b4d782efe47b3b35b7cc9c7b45d31f25f0323cced346e29c24e7bc4e7b9d965c48cfd7
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20150410-1944Z.tar.bz2 1493690 SHA256 e327adf02be4c2bce5121f01d6b139309c72814b8c50a29559dfddee12a0b4e2 SHA512 e2e5345290134e597734514041e413f0633b8078bfddb8b8e7695468ce7341735b732d5bb602ab7aa9a4045d71571b73aac01a5d96687d4fbd380736f5ed650c WHIRLPOOL f65f294905fd1d04e2be79a803b658ed432338501665a75cbe0cc5b3af8abf0615f1f808465c3ca3c7e850b9277f451f5c77b518977f4bee8dc77d6089ff88fb
 DIST mysql-extras-20150717-1707Z.tar.bz2 1491956 SHA256 d67cc1e2c581ab7c57122b7d29864643869799893a95a158a18e14201d4ffc10 SHA512 3a7cb07773099e766f8e796d4e555d42874b85285cc2c7c60220370cc6aafc36a60eb340008637298d85d83f529e73392895a81c1438ffccff9eb8f354b29ba9 WHIRLPOOL 11e75f4b696e2547c1da40e69d8ab75df4bf7080426204c040632f24846407b07d71061c09c4ff4a1d21a9d14a94769d8f8ef62421d0aecd99efe832caf4dd22
-DIST mysql-extras-20150729-1849Z.tar.bz2 1491783 SHA256 18c3fadae04f1729169e587083135353680d7c59478cdb6ec0784b238ae8d34a SHA512 555156a00305732093173f83dd22dfa545ef0a3215d7cf419298b7f5be0f9bb8a527ae9c03f58d845223b40543e3dbd054ea103a105f282892cdbce67a864308 WHIRLPOOL 56a61fcd4af096b69318d9d158bf012944dc104aff01b2a55d20ae4a53dc462e9d7c67afb4a6643f93eef8da1f150f613b87880044fc244b040cbbc080c96034

diff --git a/dev-db/mysql/mysql-5.5.44.ebuild b/dev-db/mysql/mysql-5.5.44.ebuild
deleted file mode 100644
index 9cd6470..0000000
--- a/dev-db/mysql/mysql-5.5.44.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20150127-1351Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.5.45.ebuild b/dev-db/mysql/mysql-5.5.45.ebuild
deleted file mode 100644
index 45c467c..0000000
--- a/dev-db/mysql/mysql-5.5.45.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20150729-1849Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-# Build type
-BUILD="cmake"
-
-inherit toolchain-funcs mysql-v2
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# Define the mysql-extras source
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-
-		for t in main.mysql_client_test \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-v2_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.26-r1.ebuild b/dev-db/mysql/mysql-5.6.26-r1.ebuild
deleted file mode 100644
index 4ff5c0d..0000000
--- a/dev-db/mysql/mysql-5.6.26-r1.ebuild
+++ /dev/null
@@ -1,173 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20150717-1707Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit toolchain-funcs mysql-multilib
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES="-DWITHOUT_VALIDATE_PASSWORD=1"
-
-src_prepare() {
-	mysql-multilib_src_prepare
-	if use libressl ; then
-		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
-			"${S}/cmake/ssl.cmake" || die
-	fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Create a symlink to provided binaries so the tests can find them when client-libs is off
-		if ! use client-libs ; then
-			ln -srf /usr/bin/my_print_defaults "${BUILD_DIR}/client/my_print_defaults" || die
-			ln -srf /usr/bin/perror "${BUILD_DIR}/client/perror" || die
-			mysql-multilib_disable_test main.perror "String mismatch due to not building local perror"
-		fi
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-10-20 14:52 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2015-10-20 14:52 UTC (permalink / raw
  To: gentoo-commits

commit:     37a22f1242fb0c1e71cf4f6a7285553dcf25a66d
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 14:35:27 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 14:52:25 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37a22f12

dev-db/mysql: Add LibreSSL support

Package-Manager: portage-2.2.23

 dev-db/mysql/metadata.xml           | 7 +++++++
 dev-db/mysql/mysql-5.6.26-r1.ebuild | 8 ++++++++
 dev-db/mysql/mysql-5.6.26.ebuild    | 8 ++++++++
 dev-db/mysql/mysql-5.6.27-r1.ebuild | 8 ++++++++
 dev-db/mysql/mysql-5.6.27.ebuild    | 8 ++++++++
 5 files changed, 39 insertions(+)

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index f5f14d5..c5f04ff 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -2,6 +2,10 @@
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
 <herd>mysql</herd>
+  <maintainer restrict="dev-db/mysql[libressl]">
+    <email>hasufell@gentoo.org</email>
+    <description>Libressl issues. Only assign if it's a direct Libressl issue. Do not directly assign for anything else.</description>
+  </maintainer>
 <!-- 
 Please note that this list is shared between the following packages:
 dev-db/mysql
@@ -15,6 +19,8 @@ dev-db/mariadb
   <flag name='extraengine'>Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>
   <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
   <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag>
+  <flag name='libressl'>Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</pkg></flag>
+  <flag name='openssl'>Enable SSL connections and crypto functions using <pkg>dev-libs/openssl</pkg></flag>
   <flag name='max-idx-128'>Raise the max index per table limit from 64 to 128</flag>
   <flag name='minimal'>Install client programs only, no server</flag>
   <flag name='profiling'>Add support for statement profiling (requires USE=community).</flag>
@@ -22,5 +28,6 @@ dev-db/mariadb
   <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
   <flag name='test'>Install upstream testsuites for end use.</flag>
   <flag name='tools'>Build the command line tools (mysql, mysqldump, mysqladmin, etc)</flag>
+  <flag name='yassl'>Enable SSL connections and crypto functions using the bundled yaSSL</flag>
 </use>
 </pkgmetadata>

diff --git a/dev-db/mysql/mysql-5.6.26-r1.ebuild b/dev-db/mysql/mysql-5.6.26-r1.ebuild
index 365c7de..4ff5c0d 100644
--- a/dev-db/mysql/mysql-5.6.26-r1.ebuild
+++ b/dev-db/mysql/mysql-5.6.26-r1.ebuild
@@ -31,6 +31,14 @@ RDEPEND="${RDEPEND}"
 # disable until we see what happens with it
 MYSQL_CMAKE_NATIVE_DEFINES="-DWITHOUT_VALIDATE_PASSWORD=1"
 
+src_prepare() {
+	mysql-multilib_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
 # Official test instructions:
 # USE='server embedded extraengine perl ssl static-libs community' \
 # FEATURES='test userpriv -usersandbox' \

diff --git a/dev-db/mysql/mysql-5.6.26.ebuild b/dev-db/mysql/mysql-5.6.26.ebuild
index 689d4ae..3235fd9 100644
--- a/dev-db/mysql/mysql-5.6.26.ebuild
+++ b/dev-db/mysql/mysql-5.6.26.ebuild
@@ -30,6 +30,14 @@ RDEPEND="${RDEPEND}"
 # disable until we see what happens with it
 MYSQL_CMAKE_NATIVE_DEFINES="-DWITHOUT_VALIDATE_PASSWORD=1"
 
+src_prepare() {
+	mysql-multilib_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
 # Official test instructions:
 # USE='embedded extraengine perl ssl static-libs community' \
 # FEATURES='test userpriv -usersandbox' \

diff --git a/dev-db/mysql/mysql-5.6.27-r1.ebuild b/dev-db/mysql/mysql-5.6.27-r1.ebuild
index 365c7de..4ff5c0d 100644
--- a/dev-db/mysql/mysql-5.6.27-r1.ebuild
+++ b/dev-db/mysql/mysql-5.6.27-r1.ebuild
@@ -31,6 +31,14 @@ RDEPEND="${RDEPEND}"
 # disable until we see what happens with it
 MYSQL_CMAKE_NATIVE_DEFINES="-DWITHOUT_VALIDATE_PASSWORD=1"
 
+src_prepare() {
+	mysql-multilib_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
 # Official test instructions:
 # USE='server embedded extraengine perl ssl static-libs community' \
 # FEATURES='test userpriv -usersandbox' \

diff --git a/dev-db/mysql/mysql-5.6.27.ebuild b/dev-db/mysql/mysql-5.6.27.ebuild
index e10fde2..98a209a 100644
--- a/dev-db/mysql/mysql-5.6.27.ebuild
+++ b/dev-db/mysql/mysql-5.6.27.ebuild
@@ -30,6 +30,14 @@ RDEPEND="${RDEPEND}"
 # disable until we see what happens with it
 MYSQL_CMAKE_NATIVE_DEFINES="-DWITHOUT_VALIDATE_PASSWORD=1"
 
+src_prepare() {
+	mysql-multilib_src_prepare
+	if use libressl ; then
+		sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+			"${S}/cmake/ssl.cmake" || die
+	fi
+}
+
 # Official test instructions:
 # USE='embedded extraengine perl ssl static-libs community' \
 # FEATURES='test userpriv -usersandbox' \


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-10-12 19:39 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2015-10-12 19:39 UTC (permalink / raw
  To: gentoo-commits

commit:     6b0788303d69e107d0a278c1ff2ddc18226a291c
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 12 19:38:18 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Oct 12 19:39:07 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b078830

dev-db/mysql: Version bump for legacy 5.5 series

Package-Manager: portage-2.2.23

 dev-db/mysql/Manifest            |   1 +
 dev-db/mysql/mysql-5.5.46.ebuild | 126 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 127 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index b071bdf..059566b 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,5 +1,6 @@
 DIST mysql-5.5.44.tar.gz 21789766 SHA256 85f05b257db39e63c82ff4b5ce4e0c6d2b07560b5fc1646d47d7ae48eab3e5de SHA512 05707b96c3e0d39ca103d965640aa1a9461a513f788fc7f2acce4b3933ec578b3d66df53955b0dff1b6c9e5acd98441cfe1df5b3154a1058293babc39c26dad5 WHIRLPOOL 870d9728c78f6732fcd6f95e62833a769c937c96298a39bb023b33a9138552e254d2a3f6285d8f4f0b740de9d7397fa1a0987234a0a4dfa13c787fc068053d78
 DIST mysql-5.5.45.tar.gz 21832364 SHA256 744efd3c39265b5fdeebd25f58ecb34a6eb06e02d9ec2febd3164942f2c89332 SHA512 1c8ddf294232b106562537d6e9b4a3956dd1a290562f313d311f2bbe09f1cb95c28e7e9a4c92a1fcc91a394514bc1190d185b1134003a9f6183ecc2a06d618e8 WHIRLPOOL 3daed09edfc1ca7a0ae379b876e061c2318755fdd14be9630b7c5311985e91ea46cf0e0b1eab98c758cc2809d5d562fcfd2f22022100051746343e147f3d4ebc
+DIST mysql-5.5.46.tar.gz 21838374 SHA256 93e0d91f1b380508edcecdd102cbec79a609d6b594a8814922db1c0fd11c8c3e SHA512 c2db730318d4c16793d62dbd937c1ff739fffabab6d1689b94252f5501ff36917ddf80a8144583492c05220b3ae33f29ecbcec10f6d8ae0a0b10142be719fc27 WHIRLPOOL 355260ae0e7385c7d00b289e37af09374bc8320f69a55d7ee0469283382f197fd430be32019668b1f29cda69f9d76965d4ee749cb93f1e8263799673e4f0f535
 DIST mysql-5.6.26.tar.gz 33278710 SHA256 b44c6ce5f95172c56c73edfa8b710b39242ec7af0ab182c040208c41866e5070 SHA512 455bf66e1c63e3368a3dd53f80a3393e33a20605cde320ee0bb61339d0853c2187d4947812405b85ea93a7da722787e958515fc69807c3fab131878fe9604f62 WHIRLPOOL e5fe46e4f1c8a20d955b5921c6773823cb1c01bd78319485528c478f213a37dc8ce8a1bc5c61904595e8931dec1376d471387a3f85119a0791cb8f6d9303eb6f
 DIST mysql-5.6.27.tar.gz 33327156 SHA256 8356bba23f3f6c0c2d4806110c41d1c4d6a4b9c50825e11c5be4bbee2b20b71d SHA512 2839a2f481eec52272a7965d1344677c0d0b77d85108e3b4986dc346caebf62d9ef6347756bac156dd943ad57440d6cac9283ee252e30bd3a1e430c492aceb09 WHIRLPOOL 4fdc0db92822809824777c5f712c3e7898af58f178d22ec4ca1a56d9c9b4d782efe47b3b35b7cc9c7b45d31f25f0323cced346e29c24e7bc4e7b9d965c48cfd7
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4

diff --git a/dev-db/mysql/mysql-5.5.46.ebuild b/dev-db/mysql/mysql-5.5.46.ebuild
new file mode 100644
index 0000000..9a964d7
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.46.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20150127-1351Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+
+		for t in main.mysql_client_test \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-10-01 16:01 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2015-10-01 16:01 UTC (permalink / raw
  To: gentoo-commits

commit:     15d0c3faf22a642c63990bff536917b97065a826
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  1 16:00:39 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Thu Oct  1 16:00:39 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15d0c3fa

dev-db/mysql: Version bump for 5.6.27

Package-Manager: portage-2.2.22

 dev-db/mysql/Manifest               |   1 +
 dev-db/mysql/mysql-5.6.27-r1.ebuild | 165 ++++++++++++++++++++++++++++++++++++
 dev-db/mysql/mysql-5.6.27.ebuild    | 158 ++++++++++++++++++++++++++++++++++
 3 files changed, 324 insertions(+)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index a42550d..b071bdf 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,6 +1,7 @@
 DIST mysql-5.5.44.tar.gz 21789766 SHA256 85f05b257db39e63c82ff4b5ce4e0c6d2b07560b5fc1646d47d7ae48eab3e5de SHA512 05707b96c3e0d39ca103d965640aa1a9461a513f788fc7f2acce4b3933ec578b3d66df53955b0dff1b6c9e5acd98441cfe1df5b3154a1058293babc39c26dad5 WHIRLPOOL 870d9728c78f6732fcd6f95e62833a769c937c96298a39bb023b33a9138552e254d2a3f6285d8f4f0b740de9d7397fa1a0987234a0a4dfa13c787fc068053d78
 DIST mysql-5.5.45.tar.gz 21832364 SHA256 744efd3c39265b5fdeebd25f58ecb34a6eb06e02d9ec2febd3164942f2c89332 SHA512 1c8ddf294232b106562537d6e9b4a3956dd1a290562f313d311f2bbe09f1cb95c28e7e9a4c92a1fcc91a394514bc1190d185b1134003a9f6183ecc2a06d618e8 WHIRLPOOL 3daed09edfc1ca7a0ae379b876e061c2318755fdd14be9630b7c5311985e91ea46cf0e0b1eab98c758cc2809d5d562fcfd2f22022100051746343e147f3d4ebc
 DIST mysql-5.6.26.tar.gz 33278710 SHA256 b44c6ce5f95172c56c73edfa8b710b39242ec7af0ab182c040208c41866e5070 SHA512 455bf66e1c63e3368a3dd53f80a3393e33a20605cde320ee0bb61339d0853c2187d4947812405b85ea93a7da722787e958515fc69807c3fab131878fe9604f62 WHIRLPOOL e5fe46e4f1c8a20d955b5921c6773823cb1c01bd78319485528c478f213a37dc8ce8a1bc5c61904595e8931dec1376d471387a3f85119a0791cb8f6d9303eb6f
+DIST mysql-5.6.27.tar.gz 33327156 SHA256 8356bba23f3f6c0c2d4806110c41d1c4d6a4b9c50825e11c5be4bbee2b20b71d SHA512 2839a2f481eec52272a7965d1344677c0d0b77d85108e3b4986dc346caebf62d9ef6347756bac156dd943ad57440d6cac9283ee252e30bd3a1e430c492aceb09 WHIRLPOOL 4fdc0db92822809824777c5f712c3e7898af58f178d22ec4ca1a56d9c9b4d782efe47b3b35b7cc9c7b45d31f25f0323cced346e29c24e7bc4e7b9d965c48cfd7
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20150410-1944Z.tar.bz2 1493690 SHA256 e327adf02be4c2bce5121f01d6b139309c72814b8c50a29559dfddee12a0b4e2 SHA512 e2e5345290134e597734514041e413f0633b8078bfddb8b8e7695468ce7341735b732d5bb602ab7aa9a4045d71571b73aac01a5d96687d4fbd380736f5ed650c WHIRLPOOL f65f294905fd1d04e2be79a803b658ed432338501665a75cbe0cc5b3af8abf0615f1f808465c3ca3c7e850b9277f451f5c77b518977f4bee8dc77d6089ff88fb
 DIST mysql-extras-20150717-1707Z.tar.bz2 1491956 SHA256 d67cc1e2c581ab7c57122b7d29864643869799893a95a158a18e14201d4ffc10 SHA512 3a7cb07773099e766f8e796d4e555d42874b85285cc2c7c60220370cc6aafc36a60eb340008637298d85d83f529e73392895a81c1438ffccff9eb8f354b29ba9 WHIRLPOOL 11e75f4b696e2547c1da40e69d8ab75df4bf7080426204c040632f24846407b07d71061c09c4ff4a1d21a9d14a94769d8f8ef62421d0aecd99efe832caf4dd22

diff --git a/dev-db/mysql/mysql-5.6.27-r1.ebuild b/dev-db/mysql/mysql-5.6.27-r1.ebuild
new file mode 100644
index 0000000..365c7de
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.27-r1.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20150717-1707Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+
+inherit toolchain-funcs mysql-multilib
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES="-DWITHOUT_VALIDATE_PASSWORD=1"
+
+# Official test instructions:
+# USE='server embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if use server ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Create a symlink to provided binaries so the tests can find them when client-libs is off
+		if ! use client-libs ; then
+			ln -srf /usr/bin/my_print_defaults "${BUILD_DIR}/client/my_print_defaults" || die
+			ln -srf /usr/bin/perror "${BUILD_DIR}/client/perror" || die
+			mysql-multilib_disable_test main.perror "String mismatch due to not building local perror"
+		fi
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+		; do
+				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+		einfo "Skipping server tests due to minimal build."
+	fi
+}

diff --git a/dev-db/mysql/mysql-5.6.27.ebuild b/dev-db/mysql/mysql-5.6.27.ebuild
new file mode 100644
index 0000000..e10fde2
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.27.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_EXTRAS_VER="20150410-1944Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+SUBSLOT="18"
+
+inherit toolchain-funcs mysql-multilib
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+# disable until we see what happens with it
+MYSQL_CMAKE_NATIVE_DEFINES="-DWITHOUT_VALIDATE_PASSWORD=1"
+
+# Official test instructions:
+# USE='embedded extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+	if ! multilib_is_native_abi ; then
+		einfo "Server tests not available on non-native abi".
+		return 0;
+	fi
+
+	local TESTDIR="${BUILD_DIR}/mysql-test"
+	local retstatus_unit
+	local retstatus_tests
+
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	if ! use "minimal" ; then
+
+		if [[ $UID -eq 0 ]]; then
+			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+		fi
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Run CTest (test-units)
+		cmake-utils_src_test
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+		# Enable parallel testing, auto will try to detect number of cores
+		# You may set this by hand.
+		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+		# create directories because mysqladmin might right out of order
+		mkdir -p "${T}"/var-tests{,/log}
+
+		# create symlink for the tests to find mysql_tzinfo_to_sql
+		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+		# These are failing in MySQL 5.5/5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# funcs_1.is_triggers funcs_1.is_tables_mysql,
+		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# rpl.rpl_plugin_load
+		# fails due to included file not listed in expected result
+		# appears to be poor planning
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# fails due to bad cleanup of previous tests when run in parallel
+		# The tool is deprecated anyway
+		# Bug 532288
+		for t in \
+			binlog.binlog_mysqlbinlog_filter \
+			binlog.binlog_statement_insert_delayed \
+			funcs_1.is_columns_mysql \
+			funcs_1.is_tables_mysql \
+			funcs_1.is_triggers \
+			main.information_schema \
+			main.mysql_client_test \
+			main.mysqld--help-notwin \
+			perfschema.binlog_edge_mix \
+			perfschema.binlog_edge_stmt \
+			rpl.rpl_plugin_load \
+			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+		; do
+				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		if ! use extraengine ; then
+			# bug 401673, 530766
+			for t in federated.federated_plugin ; do
+				mysql-multilib_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
+			done
+		fi
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--suite-timeout=5000 --reorder
+		retstatus_tests=$?
+		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		popd
+
+		# Cleanup is important for these testcases.
+		pkill -9 -f "${S}/ndb" 2>/dev/null
+		pkill -9 -f "${S}/sql" 2>/dev/null
+
+		failures=""
+		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		[[ -z "$failures" ]] || die "Test failures: $failures"
+		einfo "Tests successfully completed"
+
+	else
+
+		einfo "Skipping server tests due to minimal build."
+	fi
+}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-09-15 17:22 Brian Evans
  0 siblings, 0 replies; 393+ messages in thread
From: Brian Evans @ 2015-09-15 17:22 UTC (permalink / raw
  To: gentoo-commits

commit:     c86ffd94d509fa8c98f1506f5d7e80efb6f78b5e
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 15 17:22:48 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Sep 15 17:22:48 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c86ffd94

dev-db/mysql: Drop security vulnerable version wrt Bug 555478

Package-Manager: portage-2.2.20.1

 dev-db/mysql/Manifest               |   2 -
 dev-db/mysql/mysql-5.6.24.ebuild    | 153 ----------------------------------
 dev-db/mysql/mysql-5.6.25-r1.ebuild | 161 ------------------------------------
 dev-db/mysql/mysql-5.6.25.ebuild    | 153 ----------------------------------
 4 files changed, 469 deletions(-)

diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index b6734e4..a42550d 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,7 +1,5 @@
 DIST mysql-5.5.44.tar.gz 21789766 SHA256 85f05b257db39e63c82ff4b5ce4e0c6d2b07560b5fc1646d47d7ae48eab3e5de SHA512 05707b96c3e0d39ca103d965640aa1a9461a513f788fc7f2acce4b3933ec578b3d66df53955b0dff1b6c9e5acd98441cfe1df5b3154a1058293babc39c26dad5 WHIRLPOOL 870d9728c78f6732fcd6f95e62833a769c937c96298a39bb023b33a9138552e254d2a3f6285d8f4f0b740de9d7397fa1a0987234a0a4dfa13c787fc068053d78
 DIST mysql-5.5.45.tar.gz 21832364 SHA256 744efd3c39265b5fdeebd25f58ecb34a6eb06e02d9ec2febd3164942f2c89332 SHA512 1c8ddf294232b106562537d6e9b4a3956dd1a290562f313d311f2bbe09f1cb95c28e7e9a4c92a1fcc91a394514bc1190d185b1134003a9f6183ecc2a06d618e8 WHIRLPOOL 3daed09edfc1ca7a0ae379b876e061c2318755fdd14be9630b7c5311985e91ea46cf0e0b1eab98c758cc2809d5d562fcfd2f22022100051746343e147f3d4ebc
-DIST mysql-5.6.24.tar.gz 33178592 SHA256 37e27305b67d76883c5902dce59c89d596beee9dca7dbadd4a2e117f8101dfeb SHA512 cb4c27f67aad02e2120edb9dfaffa623d8ddb5861ee77055553c50cce76cbfe0a1e473e01cef3cf86b6362c719e1db18e69808a0e4e457f879a37297f14b9fd7 WHIRLPOOL 26e51a1c48d04c2f24f8914beb84bcd8122ecc569b922d001c05271c3b7dc3339652272e27169001c762356c6fffa9ba88a6ccd8b2235e41063b5948e1dd2011
-DIST mysql-5.6.25.tar.gz 33203321 SHA256 15079c0b83d33a092649cbdf402c9225bcd3f33e87388407be5cdbf1432c7fbd SHA512 cd15180281b015a29d5a9f12bafd5878ecb8ca68ada2e0d016916d77f606592b4b9a8e4a3728fc0d90326bcdda26fdd371fc731ca524f06bd06cc3b19ae93243 WHIRLPOOL 68932bcbec0e58aade1c00fe00651ecac1003e80e5cd29298c23a79190df76390c7f16a29fcb5bff9ad63e721f53978d5d727a0ae9c5df0eb97a002a4c3e4194
 DIST mysql-5.6.26.tar.gz 33278710 SHA256 b44c6ce5f95172c56c73edfa8b710b39242ec7af0ab182c040208c41866e5070 SHA512 455bf66e1c63e3368a3dd53f80a3393e33a20605cde320ee0bb61339d0853c2187d4947812405b85ea93a7da722787e958515fc69807c3fab131878fe9604f62 WHIRLPOOL e5fe46e4f1c8a20d955b5921c6773823cb1c01bd78319485528c478f213a37dc8ce8a1bc5c61904595e8931dec1376d471387a3f85119a0791cb8f6d9303eb6f
 DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4
 DIST mysql-extras-20150410-1944Z.tar.bz2 1493690 SHA256 e327adf02be4c2bce5121f01d6b139309c72814b8c50a29559dfddee12a0b4e2 SHA512 e2e5345290134e597734514041e413f0633b8078bfddb8b8e7695468ce7341735b732d5bb602ab7aa9a4045d71571b73aac01a5d96687d4fbd380736f5ed650c WHIRLPOOL f65f294905fd1d04e2be79a803b658ed432338501665a75cbe0cc5b3af8abf0615f1f808465c3ca3c7e850b9277f451f5c77b518977f4bee8dc77d6089ff88fb

diff --git a/dev-db/mysql/mysql-5.6.24.ebuild b/dev-db/mysql/mysql-5.6.24.ebuild
deleted file mode 100644
index 8e67a63..0000000
--- a/dev-db/mysql/mysql-5.6.24.ebuild
+++ /dev/null
@@ -1,153 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20150410-1944Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-inherit toolchain-funcs mysql-multilib
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.25-r1.ebuild b/dev-db/mysql/mysql-5.6.25-r1.ebuild
deleted file mode 100644
index 5a1ac38..0000000
--- a/dev-db/mysql/mysql-5.6.25-r1.ebuild
+++ /dev/null
@@ -1,161 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20150717-1707Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit toolchain-funcs mysql-multilib
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='server embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if use server ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Create a symlink to provided binaries so the tests can find them when client-libs is off
-		if ! use client-libs ; then
-			ln -srf /usr/bin/my_print_defaults "${BUILD_DIR}/client/my_print_defaults" || die
-			ln -srf /usr/bin/perror "${BUILD_DIR}/client/perror" || die
-			mysql-multilib_disable_test main.perror "String mismatch due to not building local perror"
-		fi
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000 --reorder
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-		einfo "Skipping server tests due to minimal build."
-	fi
-}

diff --git a/dev-db/mysql/mysql-5.6.25.ebuild b/dev-db/mysql/mysql-5.6.25.ebuild
deleted file mode 100644
index 0240d41..0000000
--- a/dev-db/mysql/mysql-5.6.25.ebuild
+++ /dev/null
@@ -1,153 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-MY_EXTRAS_VER="20150410-1944Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-
-inherit toolchain-funcs mysql-multilib
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# Official test instructions:
-# USE='embedded extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
-	if ! multilib_is_native_abi ; then
-		einfo "Server tests not available on non-native abi".
-		return 0;
-	fi
-
-	local TESTDIR="${BUILD_DIR}/mysql-test"
-	local retstatus_unit
-	local retstatus_tests
-
-	# Bug #213475 - MySQL _will_ object strenously if your machine is named
-	# localhost. Also causes weird failures.
-	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
-	if ! use "minimal" ; then
-
-		if [[ $UID -eq 0 ]]; then
-			die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-		fi
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		addpredict /this-dir-does-not-exist/t9.MYI
-
-		# Run CTest (test-units)
-		cmake-utils_src_test
-		retstatus_unit=$?
-		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
-		# Ensure that parallel runs don't die
-		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-		# Enable parallel testing, auto will try to detect number of cores
-		# You may set this by hand.
-		# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
-		export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
-		# create directories because mysqladmin might right out of order
-		mkdir -p "${T}"/var-tests{,/log}
-
-		# create symlink for the tests to find mysql_tzinfo_to_sql
-		ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
-		# These are failing in MySQL 5.5/5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# funcs_1.is_triggers funcs_1.is_tables_mysql,
-		# funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
-		# mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
-		# perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# rpl.rpl_plugin_load
-		# fails due to included file not listed in expected result
-		# appears to be poor planning
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# fails due to bad cleanup of previous tests when run in parallel
-		# The tool is deprecated anyway
-		# Bug 532288
-		for t in \
-			binlog.binlog_mysqlbinlog_filter \
-			binlog.binlog_statement_insert_delayed \
-			funcs_1.is_columns_mysql \
-			funcs_1.is_tables_mysql \
-			funcs_1.is_triggers \
-			main.information_schema \
-			main.mysql_client_test \
-			main.mysqld--help-notwin \
-			perfschema.binlog_edge_mix \
-			perfschema.binlog_edge_stmt \
-			rpl.rpl_plugin_load \
-			main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
-		; do
-				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		if ! use extraengine ; then
-			# bug 401673, 530766
-			for t in federated.federated_plugin ; do
-				mysql-multilib_disable_test  "$t" "Test $t requires USE=extraengine (Need federated engine)"
-			done
-		fi
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--suite-timeout=5000
-		retstatus_tests=$?
-		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		popd
-
-		# Cleanup is important for these testcases.
-		pkill -9 -f "${S}/ndb" 2>/dev/null
-		pkill -9 -f "${S}/sql" 2>/dev/null
-
-		failures=""
-		[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
-		[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
-		[[ -z "$failures" ]] || die "Test failures: $failures"
-		einfo "Tests successfully completed"
-
-	else
-
-		einfo "Skipping server tests due to minimal build."
-	fi
-}


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-09-06  8:32 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2015-09-06  8:32 UTC (permalink / raw
  To: gentoo-commits

commit:     471fa25ff583f12a763dd7a9ea1a91b03e52f478
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  6 08:32:08 2015 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sun Sep  6 08:32:08 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=471fa25f

dev-db/mysql: sparc stable wrt bug #555478

Package-Manager: portage-2.2.20.1
RepoMan-Options: --include-arches="sparc"

 dev-db/mysql/mysql-5.6.26.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.26.ebuild b/dev-db/mysql/mysql-5.6.26.ebuild
index 5d9c428..689d4ae 100644
--- a/dev-db/mysql/mysql-5.6.26.ebuild
+++ b/dev-db/mysql/mysql-5.6.26.ebuild
@@ -14,7 +14,7 @@ inherit toolchain-funcs mysql-multilib
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


^ permalink raw reply related	[flat|nested] 393+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/
@ 2015-08-26  7:28 Agostino Sarubbo
  0 siblings, 0 replies; 393+ messages in thread
From: Agostino Sarubbo @ 2015-08-26  7:28 UTC (permalink / raw
  To: gentoo-commits

commit:     85ca8ab97feeca06c28b84506a0d0a54abd061e0
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 26 07:27:52 2015 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Wed Aug 26 07:27:52 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85ca8ab9

dev-db/mysql: ppc stable wrt bug #555478

Package-Manager: portage-2.2.20.1
RepoMan-Options: --include-arches="ppc"

 dev-db/mysql/mysql-5.6.26.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/mysql/mysql-5.6.26.ebuild b/dev-db/mysql/mysql-5.6.26.ebuild
index f244db5..5d9c428 100644
--- a/dev-db/mysql/mysql-5.6.26.ebuild
+++ b/dev-db/mysql/mysql-5.6.26.ebuild
@@ -14,7 +14,7 @@ inherit toolchain-funcs mysql-multilib
 IUSE="$IUSE"
 
 # REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 
 # When MY_EXTRAS is bumped, the index should be revised to exclude these.
 EPATCH_EXCLUDE=''


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

end of thread, other threads:[~2024-07-04  0:29 UTC | newest]

Thread overview: 393+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-16 16:23 [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql/ Thomas Deutschmann
  -- strict thread matches above, loose matches on Subject: below --
2024-07-04  0:29 Sam James
2024-07-01 18:55 Mike Gilbert
2024-06-14  8:16 Sam James
2024-03-04  4:57 Sam James
2024-01-24  6:55 Sam James
2023-12-17 12:39 Sam James
2023-11-27 15:43 Andreas Sturmlechner
2023-10-14  8:34 Sam James
2023-10-14  8:34 Sam James
2023-08-06 11:49 Sam James
2023-08-02 16:41 Sam James
2023-07-15 11:45 Arthur Zamarin
2023-07-15 11:45 Arthur Zamarin
2023-07-15 11:45 Arthur Zamarin
2023-07-15 11:45 Arthur Zamarin
2023-07-15 10:11 Arthur Zamarin
2023-05-06 14:01 Arthur Zamarin
2023-05-06 14:01 Arthur Zamarin
2023-05-06 14:01 Arthur Zamarin
2023-04-02 19:30 Arthur Zamarin
2023-04-02 19:30 Arthur Zamarin
2023-02-14  0:29 Mike Gilbert
2023-02-14  0:29 Mike Gilbert
2023-02-01  9:11 Arthur Zamarin
2023-01-18 22:44 Sam James
2023-01-13 15:02 Arthur Zamarin
2023-01-13 15:02 Arthur Zamarin
2023-01-13 15:02 Arthur Zamarin
2023-01-03  6:23 Sam James
2022-12-02 20:25 Arthur Zamarin
2022-12-02  8:02 Arthur Zamarin
2022-10-31 15:49 Sam James
2022-10-31 15:45 Sam James
2022-10-31 15:45 Sam James
2022-07-29  2:47 Sam James
2022-06-13 12:18 Jakov Smolić
2022-06-13 12:16 Jakov Smolić
2022-05-15  1:00 Sam James
2022-03-09 15:55 David Seifert
2022-03-03 21:22 David Seifert
2022-02-27 22:25 Sam James
2022-02-27 22:25 Sam James
2022-02-27 16:24 Sam James
2022-01-13  4:18 Sam James
2022-01-13  4:18 Sam James
2022-01-13  4:18 Sam James
2022-01-13  4:18 Sam James
2022-01-12  4:09 Sam James
2022-01-12  4:09 Sam James
2022-01-11 21:40 Sam James
2022-01-11 21:40 Sam James
2021-11-18 15:35 Thomas Deutschmann
2021-11-17  1:05 Thomas Deutschmann
2021-11-14 16:06 Thomas Deutschmann
2021-11-14  3:49 Thomas Deutschmann
2021-11-14  3:49 Thomas Deutschmann
2021-10-16  3:42 Sam James
2021-10-16  2:45 Sam James
2021-10-16  2:45 Sam James
2021-10-16  2:45 Sam James
2021-10-14  9:44 Sam James
2021-10-14  9:44 Sam James
2021-10-12  0:10 Sam James
2021-10-12  0:10 Sam James
2021-09-22 12:16 Thomas Deutschmann
2021-08-13 14:16 Marek Szuba
2021-08-04 20:31 Thomas Deutschmann
2021-08-04 19:13 Thomas Deutschmann
2021-08-04 19:13 Thomas Deutschmann
2021-07-06 18:02 Sam James
2021-07-06 18:02 Sam James
2021-06-22 23:49 Thomas Deutschmann
2021-05-24  1:19 Thomas Deutschmann
2021-05-21  2:12 Thomas Deutschmann
2021-05-12 15:38 Thomas Deutschmann
2021-05-03  8:04 Mikle Kolyada
2021-05-01 18:24 Sam James
2021-04-28 13:20 Thomas Deutschmann
2021-04-26  1:03 Thomas Deutschmann
2021-04-26  1:03 Thomas Deutschmann
2021-02-26  8:49 Mikle Kolyada
2021-02-26  8:49 Mikle Kolyada
2021-02-03 23:55 Thomas Deutschmann
2021-01-21 22:32 Thomas Deutschmann
2021-01-21 22:32 Thomas Deutschmann
2021-01-06 18:43 Fabian Groffen
2020-12-25 23:46 Sam James
2020-12-25 23:46 Sam James
2020-12-25 23:41 Sam James
2020-12-25 23:41 Sam James
2020-12-25 23:41 Sam James
2020-12-25 23:41 Sam James
2020-12-25  2:14 Sam James
2020-12-25  2:14 Sam James
2020-12-24 14:11 Sam James
2020-12-24 14:11 Sam James
2020-12-20 21:01 Thomas Deutschmann
2020-11-30  1:18 Thomas Deutschmann
2020-11-25 16:34 Thomas Deutschmann
2020-11-25 16:34 Thomas Deutschmann
2020-11-13 19:46 Sam James
2020-11-13 17:54 Sam James
2020-10-20 18:56 Thomas Deutschmann
2020-10-20 18:56 Thomas Deutschmann
2020-10-20 18:56 Thomas Deutschmann
2020-09-19 20:09 Mikle Kolyada
2020-09-19 20:09 Mikle Kolyada
2020-08-29 17:57 Thomas Deutschmann
2020-08-22 20:24 Thomas Deutschmann
2020-08-07 12:10 Sam James
2020-08-07 12:10 Sam James
2020-08-07  4:26 Sam James
2020-08-07  4:26 Sam James
2020-08-05 19:22 Thomas Deutschmann
2020-07-26 13:28 Thomas Deutschmann
2020-07-26 13:28 Thomas Deutschmann
2020-07-26 13:21 Thomas Deutschmann
2020-07-26  1:46 Thomas Deutschmann
2020-07-26  1:46 Thomas Deutschmann
2020-07-26  0:11 Thomas Deutschmann
2020-06-01 23:16 Thomas Deutschmann
2020-05-24 20:25 Thomas Deutschmann
2020-05-14 21:29 Thomas Deutschmann
2020-05-10 10:11 Mikle Kolyada
2020-05-10 10:11 Mikle Kolyada
2020-05-04 19:57 Mart Raudsepp
2020-05-04 16:01 Thomas Deutschmann
2020-05-03 15:21 Thomas Deutschmann
2020-04-30 23:06 Thomas Deutschmann
2020-04-30 21:43 Thomas Deutschmann
2020-04-30 21:43 Thomas Deutschmann
2020-04-30 20:45 Thomas Deutschmann
2020-04-21  0:14 Thomas Deutschmann
2020-03-19  3:47 Matt Turner
2020-03-17  1:07 Thomas Deutschmann
2020-03-05 11:08 Agostino Sarubbo
2020-02-17 15:23 Agostino Sarubbo
2020-02-16 21:14 Thomas Deutschmann
2020-02-15 12:13 Mikle Kolyada
2020-02-12  9:35 Agostino Sarubbo
2020-02-12  9:34 Agostino Sarubbo
2020-02-08 17:06 David Seifert
2020-01-25 19:53 Thomas Deutschmann
2020-01-25 19:53 Thomas Deutschmann
2020-01-22 20:26 Thomas Deutschmann
2020-01-20 19:26 Thomas Deutschmann
2020-01-20 19:26 Thomas Deutschmann
2019-12-31  3:30 Thomas Deutschmann
2019-12-31  3:30 Thomas Deutschmann
2019-12-09 18:27 Sergei Trofimovich
2019-12-09 18:27 Sergei Trofimovich
2019-10-31  1:41 Thomas Deutschmann
2019-10-16 17:33 Brian Evans
2019-09-15  9:44 Mikle Kolyada
2019-09-13 18:31 Mikle Kolyada
2019-09-13  2:19 Aaron Bauman
2019-09-08 20:00 Thomas Deutschmann
2019-08-22 20:02 Thomas Deutschmann
2019-08-22 20:02 Thomas Deutschmann
2019-08-22 20:02 Thomas Deutschmann
2019-08-22 20:02 Thomas Deutschmann
2019-08-19 18:34 Thomas Deutschmann
2019-08-18 12:34 Thomas Deutschmann
2019-08-17 20:13 Thomas Deutschmann
2019-08-17 18:42 Thomas Deutschmann
2019-08-17 18:42 Thomas Deutschmann
2019-08-17 13:48 Thomas Deutschmann
2019-08-17 13:48 Thomas Deutschmann
2019-08-17  0:50 Thomas Deutschmann
2019-08-17  0:50 Thomas Deutschmann
2019-08-17  0:50 Thomas Deutschmann
2019-08-17  0:50 Thomas Deutschmann
2019-08-14 22:57 Thomas Deutschmann
2019-08-08 19:42 Thomas Deutschmann
2019-08-02 21:58 Thomas Deutschmann
2019-08-02 16:56 Thomas Deutschmann
2019-08-02 16:56 Thomas Deutschmann
2019-08-02 11:23 Mikle Kolyada
2019-08-02 11:23 Mikle Kolyada
2019-08-02 11:23 Mikle Kolyada
2019-08-02 11:23 Mikle Kolyada
2019-08-02 11:23 Mikle Kolyada
2019-08-01 21:11 Aaron Bauman
2019-07-31 14:40 Thomas Deutschmann
2019-07-31 14:40 Thomas Deutschmann
2019-07-02  8:19 Sergei Trofimovich
2019-07-02  8:19 Sergei Trofimovich
2019-06-04 11:36 Thomas Deutschmann
2019-05-24 14:30 Thomas Deutschmann
2019-05-24 10:52 Thomas Deutschmann
2019-05-14  0:41 Thomas Deutschmann
2019-04-25  3:52 Aaron Bauman
2019-04-02 12:18 Mikle Kolyada
2019-03-10 14:37 Mikle Kolyada
2019-03-05 18:46 Thomas Deutschmann
2019-03-05 18:16 Mikle Kolyada
2019-03-03 19:04 Thomas Deutschmann
2019-03-03 18:57 Thomas Deutschmann
2019-01-31  3:12 Brian Evans
2019-01-26 19:23 Thomas Deutschmann
2018-12-18 19:36 Mikle Kolyada
2018-11-30 11:13 Tobias Klausmann
2018-11-29 17:44 Tobias Klausmann
2018-11-28 23:11 Sergei Trofimovich
2018-11-28 23:11 Sergei Trofimovich
2018-11-26 14:49 Mikle Kolyada
2018-11-20 18:07 Mikle Kolyada
2018-11-20  1:42 Thomas Deutschmann
2018-11-19 18:28 Thomas Deutschmann
2018-11-19 16:24 Thomas Deutschmann
2018-11-19 14:10 Thomas Deutschmann
2018-11-14 16:59 Thomas Deutschmann
2018-11-14 16:59 Thomas Deutschmann
2018-11-13 18:26 Brian Evans
2018-11-11 23:19 Thomas Deutschmann
2018-10-30 14:42 Mikle Kolyada
2018-10-27 19:14 Mikle Kolyada
2018-10-27 18:43 Sergei Trofimovich
2018-10-26 21:10 Thomas Deutschmann
2018-10-26 19:24 Thomas Deutschmann
2018-10-23  0:33 Brian Evans
2018-10-19 20:26 Mikle Kolyada
2018-10-18 12:31 Thomas Deutschmann
2018-10-18 11:45 Tobias Klausmann
2018-10-17 22:21 Thomas Deutschmann
2018-10-17  0:46 Thomas Deutschmann
2018-10-15  1:29 Thomas Deutschmann
2018-10-14  1:21 Thomas Deutschmann
2018-09-24 20:38 Brian Evans
2018-09-24 17:18 Brian Evans
2018-09-17 20:38 Brian Evans
2018-09-17 18:03 Matt Turner
2018-09-17 18:03 Matt Turner
2018-09-15 10:28 Michał Górny
2018-09-14 23:16 Brian Evans
2018-09-14 23:16 Brian Evans
2018-09-14 23:16 Brian Evans
2018-09-01 23:18 Sergei Trofimovich
2018-08-05  1:15 Brian Evans
2018-08-05  1:15 Brian Evans
2018-08-05  1:15 Brian Evans
2018-08-05  1:15 Brian Evans
2018-07-23 21:52 Mikle Kolyada
2018-07-23 13:10 Tobias Klausmann
2018-07-21  0:09 Brian Evans
2018-07-20 22:40 Thomas Deutschmann
2018-07-19 14:10 Mikle Kolyada
2018-06-25  2:03 Brian Evans
2018-06-24  1:11 Brian Evans
2018-05-19  2:35 Brian Evans
2018-05-15 17:41 Brian Evans
2018-05-13 18:42 Brian Evans
2018-04-24 23:52 Brian Evans
2018-04-22  1:10 Brian Evans
2018-04-22  1:10 Brian Evans
2018-03-30 12:03 Sergei Trofimovich
2018-03-04 16:23 Tobias Klausmann
2018-02-14 12:59 Thomas Deutschmann
2018-02-14  0:46 Thomas Deutschmann
2018-02-14  0:46 Thomas Deutschmann
2018-02-14  0:46 Thomas Deutschmann
2018-02-05 21:27 Markus Meier
2018-02-04 20:42 Sergei Trofimovich
2018-01-27 21:24 Mikle Kolyada
2018-01-19  2:33 Brian Evans
2018-01-19  2:33 Brian Evans
2018-01-17 16:53 Thomas Deutschmann
2018-01-17  8:24 Thomas Deutschmann
2017-11-21 15:27 Brian Evans
2017-11-19 15:14 Markus Meier
2017-11-06 14:18 Tobias Klausmann
2017-11-03 12:54 Brian Evans
2017-10-28 23:31 Sergei Trofimovich
2017-10-28 21:42 Sergei Trofimovich
2017-10-28 18:11 Thomas Deutschmann
2017-10-28 18:11 Thomas Deutschmann
2017-10-27 13:49 Thomas Deutschmann
2017-10-25  7:06 Sergei Trofimovich
2017-10-24  7:03 Agostino Sarubbo
2017-10-18 19:53 Brian Evans
2017-10-18 16:27 Brian Evans
2017-10-18 13:36 Brian Evans
2017-10-18 13:36 Brian Evans
2017-09-30  8:40 Sergei Trofimovich
2017-09-30  2:58 Sergei Trofimovich
2017-08-25 21:51 Mikle Kolyada
2017-08-23  4:59 Markus Meier
2017-08-18 20:25 Thomas Deutschmann
2017-08-17 20:18 Sergei Trofimovich
2017-07-22  0:53 Brian Evans
2017-07-19 18:04 Brian Evans
2017-07-19 18:04 Brian Evans
2017-07-19 16:17 Brian Evans
2017-07-16  9:40 Tobias Klausmann
2017-06-25  8:44 Sergei Trofimovich
2017-05-22 17:32 Tobias Klausmann
2017-05-15 11:24 Michael Weber
2017-05-13  6:25 Markus Meier
2017-05-10 10:53 Jeroen Roovers
2017-05-07 23:44 Brian Evans
2017-05-07 23:44 Brian Evans
2017-04-10 18:42 Brian Evans
2017-04-10 16:21 Brian Evans
2017-03-02 14:48 Brian Evans
2017-03-01 20:59 Thomas Deutschmann
2017-03-01 20:59 Thomas Deutschmann
2017-02-06 14:02 Brian Evans
2017-02-05 17:02 Markus Meier
2017-01-25  6:39 Jeroen Roovers
2017-01-21 11:37 Tobias Klausmann
2017-01-19 11:34 Agostino Sarubbo
2017-01-19 11:25 Agostino Sarubbo
2016-12-20 14:02 Brian Evans
2016-12-14 17:14 Brian Evans
2016-10-31  7:42 Jeroen Roovers
2016-10-26 16:38 Markus Meier
2016-10-23  7:44 Jeroen Roovers
2016-10-22 11:33 Agostino Sarubbo
2016-10-22 11:33 Agostino Sarubbo
2016-10-21 15:17 Tobias Klausmann
2016-10-19 20:34 Brian Evans
2016-10-19 20:34 Brian Evans
2016-10-19 16:47 Brian Evans
2016-10-11 14:16 Brian Evans
2016-09-29 13:35 Agostino Sarubbo
2016-09-29 13:35 Agostino Sarubbo
2016-09-29 13:08 Agostino Sarubbo
2016-09-29 13:08 Agostino Sarubbo
2016-09-29  9:48 Agostino Sarubbo
2016-09-29  9:22 Agostino Sarubbo
2016-09-24 19:29 Markus Meier
2016-09-24  7:06 Jeroen Roovers
2016-09-17  9:52 Tobias Klausmann
2016-09-14  7:28 Agostino Sarubbo
2016-09-12 20:00 Brian Evans
2016-09-12 20:00 Brian Evans
2016-09-12 18:56 Brian Evans
2016-08-17 20:11 Brian Evans
2016-08-17 18:11 Brian Evans
2016-07-28 14:08 Agostino Sarubbo
2016-07-28  8:43 Agostino Sarubbo
2016-07-27 20:30 Markus Meier
2016-07-26 12:31 Tobias Klausmann
2016-07-24 16:03 Jeroen Roovers
2016-07-24  8:33 Jeroen Roovers
2016-07-20 17:58 Brian Evans
2016-07-20 17:58 Brian Evans
2016-07-20 16:05 Brian Evans
2016-07-11  3:49 Brian Evans
2016-07-08 13:28 Agostino Sarubbo
2016-07-08  8:42 Agostino Sarubbo
2016-07-08  8:17 Agostino Sarubbo
2016-05-21 12:04 Tobias Klausmann
2016-05-19 18:28 Markus Meier
2016-05-19 14:39 Jeroen Roovers
2016-05-19  7:42 Agostino Sarubbo
2016-05-19  7:40 Agostino Sarubbo
2016-04-18 18:31 Brian Evans
2016-04-18  8:13 Patrice Clement
2016-04-12 18:26 Brian Evans
2016-03-21  2:16 Brian Evans
2016-03-20 12:24 Agostino Sarubbo
2016-03-19 12:28 Agostino Sarubbo
2016-02-12  3:46 Brian Evans
2016-02-12  3:46 Brian Evans
2016-02-03 20:46 Markus Meier
2016-01-31 13:39 Tobias Klausmann
2016-01-31 11:11 Agostino Sarubbo
2016-01-31 11:09 Agostino Sarubbo
2016-01-31  9:23 Jeroen Roovers
2016-01-26  5:11 Brian Evans
2016-01-10 14:29 Brian Evans
2016-01-10 11:22 Agostino Sarubbo
2016-01-09  7:10 Agostino Sarubbo
2015-12-15 17:42 Brian Evans
2015-12-14 14:36 Brian Evans
2015-12-13 22:15 Brian Evans
2015-12-13 22:07 Brian Evans
2015-11-18  9:56 Agostino Sarubbo
2015-11-14 16:49 Markus Meier
2015-11-09  8:53 Agostino Sarubbo
2015-11-08  6:09 Jeroen Roovers
2015-11-06 11:28 Agostino Sarubbo
2015-11-06 11:27 Agostino Sarubbo
2015-11-05 23:13 Brian Evans
2015-10-26 13:24 Brian Evans
2015-10-20 14:52 Brian Evans
2015-10-12 19:39 Brian Evans
2015-10-01 16:01 Brian Evans
2015-09-15 17:22 Brian Evans
2015-09-06  8:32 Agostino Sarubbo
2015-08-26  7:28 Agostino Sarubbo

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