public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2015-09-17 18:45 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2015-09-17 18:45 UTC (permalink / raw
  To: gentoo-commits

commit:     bb1639adb2a60000a2d0975bb68ac2ce332b1aa4
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 17 18:44:32 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Thu Sep 17 18:45:13 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb1639ad

dev-db/percona-server: Version bump; drop hppa keyword

hppa dropped due to unsatisfied dependency of dev-util/valgrind

Package-Manager: portage-2.2.20.1

 dev-db/percona-server/Manifest                     |   1 +
 dev-db/percona-server/metadata.xml                 |   2 +
 .../percona-server-5.6.26.74.0.ebuild              | 166 +++++++++++++++++++++
 3 files changed, 169 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index d87b4b5..b53c750 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,4 @@
 DIST mysql-extras-20150113-1853Z.tar.bz2 1494439 SHA256 420553dc8557d0622ad762ee6924900acc74fd4f367fd3840acab03114fada4d SHA512 b1252d905b71a6f42484eaa796ebcd2f0769affc566e6c277ef3bc0ef9bc446a1c22aac3faa48ef7b9305056a1302b37d7ef86b547c44514528a5956ce61d372 WHIRLPOOL d14f0d88358eb0bbd2c338052ec086ab8260988497ef09da934365ded3c30c7e905ea936a0c9817ccb49d1f6e3408b3f6a438455a2455c65c2f26a9fc6367ff3
 DIST mysql-extras-20150717-1707Z.tar.bz2 1491956 SHA256 d67cc1e2c581ab7c57122b7d29864643869799893a95a158a18e14201d4ffc10 SHA512 3a7cb07773099e766f8e796d4e555d42874b85285cc2c7c60220370cc6aafc36a60eb340008637298d85d83f529e73392895a81c1438ffccff9eb8f354b29ba9 WHIRLPOOL 11e75f4b696e2547c1da40e69d8ab75df4bf7080426204c040632f24846407b07d71061c09c4ff4a1d21a9d14a94769d8f8ef62421d0aecd99efe832caf4dd22
 DIST percona-server-5.6.25-73.0.tar.gz 34152178 SHA256 790d056931b9dd5b158a732812490fdaf9407012aaf93d3f1c1b21942dcdc251 SHA512 9bb4ee29ceb7e80460d2ffa779ca0aefaa6c0af1c4e5309c1c5f37840da4e85da1196a936e1862bacb3f36d064a6dcb6ad45b3eb55f60b033f2741ec6b487b9d WHIRLPOOL 76c59da78fda5cf70802117e59ceb0a877513ed83b0069c6d5a3f169595eac43516897bc02c092caa71cb059424ed3d4cbb97133c6946f870ab7734e8ca7a282
+DIST percona-server-5.6.26-74.0.tar.gz 54819177 SHA256 9156038d84bd1190a5b5df963877876584d30bd515ba3ad39e65a532430c1608 SHA512 1874b5e5d40da3ba6a9ea5bf15b7b851b4c067edf3cbca4139c078536000010acaecb8ee94933f5c4482ea091967a30f042b3bd08bef5e3716cae0be8607410e WHIRLPOOL fd8d712d3ed1a785ad455d9d83f537303ad9b58d0562cf73adaba71527ab42513e0682b568aced5601b419e738f9d904d09bb37f387feaa42944795461e96b8e

diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
index 8bb7301..cec456d 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/metadata.xml
@@ -15,6 +15,8 @@
   <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='tokudb'>Add support for TokuDB storage engine</flag>
+  <flag name='tokudb-backup-plugin'>Builds the TokuDB backup plugin</flag>
   <flag name='tools'>Build the command line tools (mysql, mysqldump, mysqladmin, etc)</flag>
 </use>
 </pkgmetadata>

diff --git a/dev-db/percona-server/percona-server-5.6.26.74.0.ebuild b/dev-db/percona-server/percona-server-5.6.26.74.0.ebuild
new file mode 100644
index 0000000..61eb65e
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.26.74.0.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+MY_EXTRAS_VER="20150717-1707Z"
+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 tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+
+# 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 )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )"
+RDEPEND="${RDEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+# 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 percona-server-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="${CMAKE_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 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
+
+		# These are failing in Percona 5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+		# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+		# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+		# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+		# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.percona_bug1289599
+		# Looks to be a syntax error in the test file itself
+		#
+		# main.variables main.myisam main.merge_recover
+		# fails due to ulimit not able to open enough files (needs 5000)
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# Called with bad parameters should be reported upstream
+		#
+		# innodb_stress.innodb_stress
+		# innodb_stress.innodb_stress_blob innodb_stress.innodb_stress_blob_nocompress
+		# innodb_stress.innodb_stress_crash innodb_stress.innodb_stress_crash_blob
+		# innodb_stress.innodb_stress_crash_blob_nocompress innodb_stress.innodb_stress_crash_nocompress
+		# innodb_stress.innodb_stress_nocompress
+		# Dependent on python2 being the system python
+
+		for t in main.mysql_client_test \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+			perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+			funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+			main.variables main.myisam main.merge_recover \
+			engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+			engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+			engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+			main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		for t in innodb_stress.innodb_stress \
+			innodb_stress.innodb_stress_blob innodb_stress.innodb_stress_blob_nocompress \
+			innodb_stress.innodb_stress_crash innodb_stress.innodb_stress_crash_blob \
+			innodb_stress.innodb_stress_crash_blob_nocompress innodb_stress.innodb_stress_crash_nocompress \
+			innodb_stress.innodb_stress_nocompress ; do
+				mysql-multilib_disable_test "$t" "False positives due to python exception syntax"
+		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" \
+			--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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2015-09-17 18:45 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2015-09-17 18:45 UTC (permalink / raw
  To: gentoo-commits

commit:     b22948cc7da9abd2685aff2368a7ae5ecdf2ea88
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 17 18:25:13 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Thu Sep 17 18:45:04 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b22948cc

dev-db/percona-server: Drop old security vulnerable version

Package-Manager: portage-2.2.20.1

 dev-db/percona-server/Manifest                     |   1 -
 .../percona-server-5.6.24.72.2.ebuild              | 138 ---------------------
 2 files changed, 139 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 3d85c62..d87b4b5 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,4 +1,3 @@
 DIST mysql-extras-20150113-1853Z.tar.bz2 1494439 SHA256 420553dc8557d0622ad762ee6924900acc74fd4f367fd3840acab03114fada4d SHA512 b1252d905b71a6f42484eaa796ebcd2f0769affc566e6c277ef3bc0ef9bc446a1c22aac3faa48ef7b9305056a1302b37d7ef86b547c44514528a5956ce61d372 WHIRLPOOL d14f0d88358eb0bbd2c338052ec086ab8260988497ef09da934365ded3c30c7e905ea936a0c9817ccb49d1f6e3408b3f6a438455a2455c65c2f26a9fc6367ff3
 DIST mysql-extras-20150717-1707Z.tar.bz2 1491956 SHA256 d67cc1e2c581ab7c57122b7d29864643869799893a95a158a18e14201d4ffc10 SHA512 3a7cb07773099e766f8e796d4e555d42874b85285cc2c7c60220370cc6aafc36a60eb340008637298d85d83f529e73392895a81c1438ffccff9eb8f354b29ba9 WHIRLPOOL 11e75f4b696e2547c1da40e69d8ab75df4bf7080426204c040632f24846407b07d71061c09c4ff4a1d21a9d14a94769d8f8ef62421d0aecd99efe832caf4dd22
-DIST percona-server-5.6.24-72.2.tar.gz 34099689 SHA256 5aa6469f3a55fe0fd1cfe315f2f9cacb0ce318620086c93821c9000d6e25c0de SHA512 46e013b272d96d995af48e0a55c94e7ded1a2cf6e8a4e3c7e1674171ac288e2b211e5761eecbe6f0cacf40a026dccbf102f517745c7c07865165fe3a8e922088 WHIRLPOOL ee200bbf7454c16afb349713ea031e4d8acf4fab2fe3d594336443997c683c0d987704c6a300451d6b77df271e32905ca892753320666438ca797a484a499856
 DIST percona-server-5.6.25-73.0.tar.gz 34152178 SHA256 790d056931b9dd5b158a732812490fdaf9407012aaf93d3f1c1b21942dcdc251 SHA512 9bb4ee29ceb7e80460d2ffa779ca0aefaa6c0af1c4e5309c1c5f37840da4e85da1196a936e1862bacb3f36d064a6dcb6ad45b3eb55f60b033f2741ec6b487b9d WHIRLPOOL 76c59da78fda5cf70802117e59ceb0a877513ed83b0069c6d5a3f169595eac43516897bc02c092caa71cb059424ed3d4cbb97133c6946f870ab7734e8ca7a282

diff --git a/dev-db/percona-server/percona-server-5.6.24.72.2.ebuild b/dev-db/percona-server/percona-server-5.6.24.72.2.ebuild
deleted file mode 100644
index 7119b47..0000000
--- a/dev-db/percona-server/percona-server-5.6.24.72.2.ebuild
+++ /dev/null
@@ -1,138 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-MY_EXTRAS_VER="20150113-1853Z"
-
-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 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-
-# 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='extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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="${CMAKE_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}
-
-		# These are failing in Percona 5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-		# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-		# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-		# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-		# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.percona_bug1289599
-		# Looks to be a syntax error in the test file itself
-		#
-		# main.variables main.myisam main.merge_recover
-		# fails due to ulimit not able to open enough files (needs 5000)
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# Called with bad parameters should be reported upstream
-
-		for t in main.mysql_client_test \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-			perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-			funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-			main.variables main.myisam main.merge_recover \
-			engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-			engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-			engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-			main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
-		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" \
-			--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
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2015-09-21 16:56 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2015-09-21 16:56 UTC (permalink / raw
  To: gentoo-commits

commit:     0dd0a3502b745c0e89e00fd148dffaf217b61bfa
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 21 16:55:48 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Sep 21 16:55:48 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dd0a350

dev-db/percona-server: Correctly skip innodb_stress test suite wrt bug 561024

Package-Manager: portage-2.2.20.1

 .../percona-server/percona-server-5.6.26.74.0.ebuild   | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.6.26.74.0.ebuild b/dev-db/percona-server/percona-server-5.6.26.74.0.ebuild
index 61eb65e..263f7f9 100644
--- a/dev-db/percona-server/percona-server-5.6.26.74.0.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.26.74.0.ebuild
@@ -104,12 +104,6 @@ multilib_src_test() {
 		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
 		# Called with bad parameters should be reported upstream
 		#
-		# innodb_stress.innodb_stress
-		# innodb_stress.innodb_stress_blob innodb_stress.innodb_stress_blob_nocompress
-		# innodb_stress.innodb_stress_crash innodb_stress.innodb_stress_crash_blob
-		# innodb_stress.innodb_stress_crash_blob_nocompress innodb_stress.innodb_stress_crash_nocompress
-		# innodb_stress.innodb_stress_nocompress
-		# Dependent on python2 being the system python
 
 		for t in main.mysql_client_test \
 			binlog.binlog_statement_insert_delayed main.information_schema \
@@ -124,14 +118,6 @@ multilib_src_test() {
 				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
 		done
 
-		for t in innodb_stress.innodb_stress \
-			innodb_stress.innodb_stress_blob innodb_stress.innodb_stress_blob_nocompress \
-			innodb_stress.innodb_stress_crash innodb_stress.innodb_stress_crash_blob \
-			innodb_stress.innodb_stress_crash_blob_nocompress innodb_stress.innodb_stress_crash_nocompress \
-			innodb_stress.innodb_stress_nocompress ; do
-				mysql-multilib_disable_test "$t" "False positives due to python exception syntax"
-		done
-
 		# Run mysql tests
 		pushd "${TESTDIR}"
 
@@ -139,8 +125,10 @@ multilib_src_test() {
 		ulimit -n 3000
 
 		# run mysql-test tests
+		# We skip the innodb_stress suite because it depends on python2 being system python
 		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder
+			--testcase-timeout=30 --reorder \
+			--skip-test=innodb_stress
 		retstatus_tests=$?
 		[[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
 		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2015-10-20 14:52 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2015-10-20 14:52 UTC (permalink / raw
  To: gentoo-commits

commit:     644884790ca8997f10df3de2ddd9c6001520363d
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 14:46:09 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 14:52:36 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64488479

dev-db/percona-server: Add LibreSSL support

Package-Manager: portage-2.2.23

 dev-db/percona-server/metadata.xml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
index cec456d..d4b579c 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/metadata.xml
@@ -2,6 +2,10 @@
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
 <herd>mysql</herd>
+  <maintainer restrict="dev-db/percona-server[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>
 <use>
   <flag name='client-libs'>Build the libmysqlclient libraries</flag>
   <flag name='cluster'>Add support for NDB clustering (deprecated)</flag>
@@ -10,7 +14,8 @@
   <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='minimal'>Install client programs only, no server</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='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>
@@ -18,5 +23,6 @@
   <flag name='tokudb'>Add support for TokuDB storage engine</flag>
   <flag name='tokudb-backup-plugin'>Builds the TokuDB backup plugin</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>


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2015-11-04 21:45 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2015-11-04 21:45 UTC (permalink / raw
  To: gentoo-commits

commit:     39614a386d2ef875823fc7f52de8c65d64a1a001
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  4 21:45:02 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Nov  4 21:45:02 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39614a38

dev-db/percona-server: Drop old USE descriptions for cluster and community

Package-Manager: portage-2.2.23

 dev-db/percona-server/metadata.xml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
index d4b579c..5bea6cc 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/metadata.xml
@@ -8,8 +8,6 @@
   </maintainer>
 <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>
   <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>


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2015-11-05 23:29 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2015-11-05 23:29 UTC (permalink / raw
  To: gentoo-commits

commit:     077d466041edfe854c5c82387652bc0f9d26f0f9
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Thu Nov  5 23:26:11 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Thu Nov  5 23:29:01 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=077d4660

dev-db/percona-server: Add patch for tests and update test instructions

Package-Manager: portage-2.2.23

 dev-db/percona-server/Manifest                          | 1 +
 dev-db/percona-server/percona-server-5.6.26.74.0.ebuild | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index b53c750..c600cff 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,4 +1,5 @@
 DIST mysql-extras-20150113-1853Z.tar.bz2 1494439 SHA256 420553dc8557d0622ad762ee6924900acc74fd4f367fd3840acab03114fada4d SHA512 b1252d905b71a6f42484eaa796ebcd2f0769affc566e6c277ef3bc0ef9bc446a1c22aac3faa48ef7b9305056a1302b37d7ef86b547c44514528a5956ce61d372 WHIRLPOOL d14f0d88358eb0bbd2c338052ec086ab8260988497ef09da934365ded3c30c7e905ea936a0c9817ccb49d1f6e3408b3f6a438455a2455c65c2f26a9fc6367ff3
 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
 DIST percona-server-5.6.25-73.0.tar.gz 34152178 SHA256 790d056931b9dd5b158a732812490fdaf9407012aaf93d3f1c1b21942dcdc251 SHA512 9bb4ee29ceb7e80460d2ffa779ca0aefaa6c0af1c4e5309c1c5f37840da4e85da1196a936e1862bacb3f36d064a6dcb6ad45b3eb55f60b033f2741ec6b487b9d WHIRLPOOL 76c59da78fda5cf70802117e59ceb0a877513ed83b0069c6d5a3f169595eac43516897bc02c092caa71cb059424ed3d4cbb97133c6946f870ab7734e8ca7a282
 DIST percona-server-5.6.26-74.0.tar.gz 54819177 SHA256 9156038d84bd1190a5b5df963877876584d30bd515ba3ad39e65a532430c1608 SHA512 1874b5e5d40da3ba6a9ea5bf15b7b851b4c067edf3cbca4139c078536000010acaecb8ee94933f5c4482ea091967a30f042b3bd08bef5e3716cae0be8607410e WHIRLPOOL fd8d712d3ed1a785ad455d9d83f537303ad9b58d0562cf73adaba71527ab42513e0682b568aced5601b419e738f9d904d09bb37f387feaa42944795461e96b8e

diff --git a/dev-db/percona-server/percona-server-5.6.26.74.0.ebuild b/dev-db/percona-server/percona-server-5.6.26.74.0.ebuild
index 263f7f9..7dcbc77 100644
--- a/dev-db/percona-server/percona-server-5.6.26.74.0.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.26.74.0.ebuild
@@ -3,7 +3,7 @@
 # $Id$
 
 EAPI="5"
-MY_EXTRAS_VER="20150717-1707Z"
+MY_EXTRAS_VER="20151105-2051Z"
 HAS_TOOLS_PATCH="1"
 SUBSLOT="18"
 
@@ -29,7 +29,7 @@ REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
 # and create your own mysql-extras tarball, looking at 000_index.txt
 
 # Official test instructions:
-# USE='extraengine perl ssl static-libs community' \
+# USE='extraengine perl openssl static-libs' \
 # FEATURES='test userpriv -usersandbox' \
 # ebuild percona-server-X.X.XX.ebuild \
 # digest clean package


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2015-11-06 16:32 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2015-11-06 16:32 UTC (permalink / raw
  To: gentoo-commits

commit:     ca412e7a1f8a581b7008fa6e111ecaebf724c337
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  6 16:30:40 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Nov  6 16:32:01 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca412e7a

dev-db/percona-server: Drop security vulnerable versions

Package-Manager: portage-2.2.23

 dev-db/percona-server/Manifest                     |   4 -
 .../percona-server-5.6.25.73.0-r1.ebuild           | 147 --------------------
 .../percona-server-5.6.25.73.0.ebuild              | 138 ------------------
 .../percona-server-5.6.26.74.0.ebuild              | 154 ---------------------
 4 files changed, 443 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 4fc2bf5..783a03c 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,6 +1,2 @@
-DIST mysql-extras-20150113-1853Z.tar.bz2 1494439 SHA256 420553dc8557d0622ad762ee6924900acc74fd4f367fd3840acab03114fada4d SHA512 b1252d905b71a6f42484eaa796ebcd2f0769affc566e6c277ef3bc0ef9bc446a1c22aac3faa48ef7b9305056a1302b37d7ef86b547c44514528a5956ce61d372 WHIRLPOOL d14f0d88358eb0bbd2c338052ec086ab8260988497ef09da934365ded3c30c7e905ea936a0c9817ccb49d1f6e3408b3f6a438455a2455c65c2f26a9fc6367ff3
-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
-DIST percona-server-5.6.25-73.0.tar.gz 34152178 SHA256 790d056931b9dd5b158a732812490fdaf9407012aaf93d3f1c1b21942dcdc251 SHA512 9bb4ee29ceb7e80460d2ffa779ca0aefaa6c0af1c4e5309c1c5f37840da4e85da1196a936e1862bacb3f36d064a6dcb6ad45b3eb55f60b033f2741ec6b487b9d WHIRLPOOL 76c59da78fda5cf70802117e59ceb0a877513ed83b0069c6d5a3f169595eac43516897bc02c092caa71cb059424ed3d4cbb97133c6946f870ab7734e8ca7a282
-DIST percona-server-5.6.26-74.0.tar.gz 54819177 SHA256 9156038d84bd1190a5b5df963877876584d30bd515ba3ad39e65a532430c1608 SHA512 1874b5e5d40da3ba6a9ea5bf15b7b851b4c067edf3cbca4139c078536000010acaecb8ee94933f5c4482ea091967a30f042b3bd08bef5e3716cae0be8607410e WHIRLPOOL fd8d712d3ed1a785ad455d9d83f537303ad9b58d0562cf73adaba71527ab42513e0682b568aced5601b419e738f9d904d09bb37f387feaa42944795461e96b8e
 DIST percona-server-5.6.27-75.0.tar.gz 54907367 SHA256 7dc4a4efadaee25e11fd78838f4ad2c0d7921ac9cc3b95068626f918c0add8d7 SHA512 c58fe18e3af7c88d9a3269c0b6a20c367bc80af6b3c1ab072fb380787f6b0ad44c8471134e366b7a9572fc4d16a4260d81a26f384aadab4bca99efcf521d3201 WHIRLPOOL 403a7efdbfb8bdaa5cecf72930be351b8762f17ce7166dffcff307e86a69f742546c85ff5badefab182dd001080ed49e71d2d5d587b74801cc22ccba682ac418

diff --git a/dev-db/percona-server/percona-server-5.6.25.73.0-r1.ebuild b/dev-db/percona-server/percona-server-5.6.25.73.0-r1.ebuild
deleted file mode 100644
index 395c76a..0000000
--- a/dev-db/percona-server/percona-server-5.6.25.73.0-r1.ebuild
+++ /dev/null
@@ -1,147 +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"
-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 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-
-# 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='extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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="${CMAKE_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 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
-
-		# These are failing in Percona 5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-		# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-		# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-		# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-		# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.percona_bug1289599
-		# Looks to be a syntax error in the test file itself
-		#
-		# main.variables main.myisam main.merge_recover
-		# fails due to ulimit not able to open enough files (needs 5000)
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# Called with bad parameters should be reported upstream
-
-		for t in main.mysql_client_test \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-			perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-			funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-			main.variables main.myisam main.merge_recover \
-			engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-			engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-			engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-			main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
-		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" \
-			--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/percona-server/percona-server-5.6.25.73.0.ebuild b/dev-db/percona-server/percona-server-5.6.25.73.0.ebuild
deleted file mode 100644
index 7119b47..0000000
--- a/dev-db/percona-server/percona-server-5.6.25.73.0.ebuild
+++ /dev/null
@@ -1,138 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-MY_EXTRAS_VER="20150113-1853Z"
-
-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 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-
-# 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='extraengine perl ssl static-libs community' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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="${CMAKE_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}
-
-		# These are failing in Percona 5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-		# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-		# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-		# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-		# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.percona_bug1289599
-		# Looks to be a syntax error in the test file itself
-		#
-		# main.variables main.myisam main.merge_recover
-		# fails due to ulimit not able to open enough files (needs 5000)
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# Called with bad parameters should be reported upstream
-
-		for t in main.mysql_client_test \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-			perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-			funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-			main.variables main.myisam main.merge_recover \
-			engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-			engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-			engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-			main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
-		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" \
-			--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/percona-server/percona-server-5.6.26.74.0.ebuild b/dev-db/percona-server/percona-server-5.6.26.74.0.ebuild
deleted file mode 100644
index 7dcbc77..0000000
--- a/dev-db/percona-server/percona-server-5.6.26.74.0.ebuild
+++ /dev/null
@@ -1,154 +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"
-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 tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-
-# 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 )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )"
-RDEPEND="${RDEPEND}"
-
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
-
-# 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 openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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="${CMAKE_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 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
-
-		# These are failing in Percona 5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-		# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-		# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-		# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-		# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.percona_bug1289599
-		# Looks to be a syntax error in the test file itself
-		#
-		# main.variables main.myisam main.merge_recover
-		# fails due to ulimit not able to open enough files (needs 5000)
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# Called with bad parameters should be reported upstream
-		#
-
-		for t in main.mysql_client_test \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-			perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-			funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-			main.variables main.myisam main.merge_recover \
-			engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-			engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-			engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-			main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		# We skip the innodb_stress suite because it depends on python2 being system python
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder \
-			--skip-test=innodb_stress
-		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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2015-11-06 16:32 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2015-11-06 16:32 UTC (permalink / raw
  To: gentoo-commits

commit:     4c513d96f95949168a1a00abf62a59cd8c2d00c9
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  6 16:29:19 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Nov  6 16:31:56 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c513d96

dev-db/percona-server: Version bump

Package-Manager: portage-2.2.23

 dev-db/percona-server/Manifest                     |   1 +
 .../percona-server-5.6.27.75.0.ebuild              | 154 +++++++++++++++++++++
 2 files changed, 155 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index c600cff..4fc2bf5 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -3,3 +3,4 @@ DIST mysql-extras-20150717-1707Z.tar.bz2 1491956 SHA256 d67cc1e2c581ab7c57122b7d
 DIST mysql-extras-20151105-2051Z.tar.bz2 1490187 SHA256 129d79c2064b08b0afad69e04e27991bf4103c20ccea39c133239b1dd822a49f SHA512 af34a44275b06c1626eb5952b3643b5663b8a1fb1d9ff18a67d51c02daaa51c4476df407d38ab607cc41842b47e5dd7b4cef8ae380a41eb80923df8052b9e521 WHIRLPOOL 01702ca4e2033fbc70db3ab2dd166b2e31072ea0f6bdd42d00c27ae0c0afab5c8451c4dcc90cce6d46f9ea056017e273f7c719e1cfabf969293bdcd15241f5b3
 DIST percona-server-5.6.25-73.0.tar.gz 34152178 SHA256 790d056931b9dd5b158a732812490fdaf9407012aaf93d3f1c1b21942dcdc251 SHA512 9bb4ee29ceb7e80460d2ffa779ca0aefaa6c0af1c4e5309c1c5f37840da4e85da1196a936e1862bacb3f36d064a6dcb6ad45b3eb55f60b033f2741ec6b487b9d WHIRLPOOL 76c59da78fda5cf70802117e59ceb0a877513ed83b0069c6d5a3f169595eac43516897bc02c092caa71cb059424ed3d4cbb97133c6946f870ab7734e8ca7a282
 DIST percona-server-5.6.26-74.0.tar.gz 54819177 SHA256 9156038d84bd1190a5b5df963877876584d30bd515ba3ad39e65a532430c1608 SHA512 1874b5e5d40da3ba6a9ea5bf15b7b851b4c067edf3cbca4139c078536000010acaecb8ee94933f5c4482ea091967a30f042b3bd08bef5e3716cae0be8607410e WHIRLPOOL fd8d712d3ed1a785ad455d9d83f537303ad9b58d0562cf73adaba71527ab42513e0682b568aced5601b419e738f9d904d09bb37f387feaa42944795461e96b8e
+DIST percona-server-5.6.27-75.0.tar.gz 54907367 SHA256 7dc4a4efadaee25e11fd78838f4ad2c0d7921ac9cc3b95068626f918c0add8d7 SHA512 c58fe18e3af7c88d9a3269c0b6a20c367bc80af6b3c1ab072fb380787f6b0ad44c8471134e366b7a9572fc4d16a4260d81a26f384aadab4bca99efcf521d3201 WHIRLPOOL 403a7efdbfb8bdaa5cecf72930be351b8762f17ce7166dffcff307e86a69f742546c85ff5badefab182dd001080ed49e71d2d5d587b74801cc22ccba682ac418

diff --git a/dev-db/percona-server/percona-server-5.6.27.75.0.ebuild b/dev-db/percona-server/percona-server-5.6.27.75.0.ebuild
new file mode 100644
index 0000000..7dcbc77
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.27.75.0.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+MY_EXTRAS_VER="20151105-2051Z"
+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 tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+
+# 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 )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )"
+RDEPEND="${RDEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+# 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 openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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="${CMAKE_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 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
+
+		# These are failing in Percona 5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+		# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+		# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+		# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+		# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.percona_bug1289599
+		# Looks to be a syntax error in the test file itself
+		#
+		# main.variables main.myisam main.merge_recover
+		# fails due to ulimit not able to open enough files (needs 5000)
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# Called with bad parameters should be reported upstream
+		#
+
+		for t in main.mysql_client_test \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+			perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+			funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+			main.variables main.myisam main.merge_recover \
+			engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+			engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+			engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+			main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+
+		# run mysql-test tests
+		# We skip the innodb_stress suite because it depends on python2 being system python
+		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+			--testcase-timeout=30 --reorder \
+			--skip-test=innodb_stress
+		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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2015-12-13 22:07 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2015-12-13 22:07 UTC (permalink / raw
  To: gentoo-commits

commit:     ac0bd95bed7e7746a5212842995cf9a74f3349b7
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 13 22:07:36 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun Dec 13 22:07:36 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac0bd95b

dev-db/percona-server: Revision bump for new eclasses and python tests

Package-Manager: portage-2.2.26

 .../percona-server-5.6.27.75.0-r1.ebuild           | 175 +++++++++++++++++++++
 1 file changed, 175 insertions(+)

diff --git a/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild b/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild
new file mode 100644
index 0000000..893ad8d
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+MY_EXTRAS_VER="20151105-2051Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit python-any-r1 mysql-multilib-r1
+
+IUSE="pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+# 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
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+src_configure() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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="${CMAKE_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 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
+
+		# These are failing in Percona 5.6 for now and are believed to be
+		# false positives:
+		#
+		# main.information_schema, binlog.binlog_statement_insert_delayed,
+		# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+		# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+		# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+		# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+		# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.percona_bug1289599
+		# Looks to be a syntax error in the test file itself
+		#
+		# main.variables main.myisam main.merge_recover
+		# fails due to ulimit not able to open enough files (needs 5000)
+		#
+		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+		# Called with bad parameters should be reported upstream
+		#
+
+		for t in main.mysql_client_test \
+			binlog.binlog_statement_insert_delayed main.information_schema \
+			main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+			perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+			funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+			main.variables main.myisam main.merge_recover \
+			engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+			engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+			engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+			main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
+		done
+
+		# Run mysql tests
+		pushd "${TESTDIR}"
+
+		# Set file limits higher so tests run
+		ulimit -n 3000
+		python_setup
+		# 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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2015-12-14 14:36 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2015-12-14 14:36 UTC (permalink / raw
  To: gentoo-commits

commit:     78134bea3cbc01e18c89dc168e262bee49e62ca9
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 14 14:31:49 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Dec 14 14:35:26 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78134bea

dev-db/percona-server: Fix tests due to removed USE flag

Package-Manager: portage-2.2.26

 dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild b/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild
index 893ad8d..5d32935 100644
--- a/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild
@@ -96,13 +96,6 @@ multilib_src_test() {
 		# create directories because mysqladmin might right out of order
 		mkdir -p "${T}"/var-tests{,/log}
 
-		# 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
-
 		# These are failing in Percona 5.6 for now and are believed to be
 		# false positives:
 		#


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2015-12-15 14:46 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2015-12-15 14:46 UTC (permalink / raw
  To: gentoo-commits

commit:     ccd3cc6610c83ab03392639bdf1326e33c7b07d5
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 15 14:45:51 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 14:45:51 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccd3cc66

dev-db/percona-server: Fix ebuild tests wrt bug 568328

Package-Manager: portage-2.2.26

 dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild b/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild
index 5d32935..05963ac 100644
--- a/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild
@@ -131,7 +131,7 @@ multilib_src_test() {
 			engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
 			engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
 			main.percona_bug1289599 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
 
 		# Run mysql tests


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2015-12-22 18:46 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2015-12-22 18:46 UTC (permalink / raw
  To: gentoo-commits

commit:     ee94f9105fc0f4789a21c3086ea5ced408fd83eb
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 22 18:45:34 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Dec 22 18:45:34 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee94f910

dev-db/percona-server: Version bump wrt bug 569008

Package-Manager: portage-2.2.26

 dev-db/percona-server/Manifest                     |   1 +
 .../percona-server-5.6.27.76.0.ebuild              | 173 +++++++++++++++++++++
 2 files changed, 174 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 783a03c..953755c 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,2 +1,3 @@
 DIST mysql-extras-20151105-2051Z.tar.bz2 1490187 SHA256 129d79c2064b08b0afad69e04e27991bf4103c20ccea39c133239b1dd822a49f SHA512 af34a44275b06c1626eb5952b3643b5663b8a1fb1d9ff18a67d51c02daaa51c4476df407d38ab607cc41842b47e5dd7b4cef8ae380a41eb80923df8052b9e521 WHIRLPOOL 01702ca4e2033fbc70db3ab2dd166b2e31072ea0f6bdd42d00c27ae0c0afab5c8451c4dcc90cce6d46f9ea056017e273f7c719e1cfabf969293bdcd15241f5b3
 DIST percona-server-5.6.27-75.0.tar.gz 54907367 SHA256 7dc4a4efadaee25e11fd78838f4ad2c0d7921ac9cc3b95068626f918c0add8d7 SHA512 c58fe18e3af7c88d9a3269c0b6a20c367bc80af6b3c1ab072fb380787f6b0ad44c8471134e366b7a9572fc4d16a4260d81a26f384aadab4bca99efcf521d3201 WHIRLPOOL 403a7efdbfb8bdaa5cecf72930be351b8762f17ce7166dffcff307e86a69f742546c85ff5badefab182dd001080ed49e71d2d5d587b74801cc22ccba682ac418
+DIST percona-server-5.6.27-76.0.tar.gz 54946650 SHA256 36d5c1c9a94712874b4d6e12c7e48d1f13c1fffb0ff976bc93aedbb4f73a0fef SHA512 64e2b1643bb06aefd59a1e1caddd31931b4b39ce5cd575ec3ec92f8c824887d112aa17573b10d596996579088c34e729eed83c37d63dd8cbef6755f0c0086805 WHIRLPOOL b203ba373ce312c1e10f0f96ba0fe8722ddc29c218bd075539f868426ad20c4d02c2307756c98fd2c7e21b45398d92c1b2b5145218b503bb0962bcafd908de12

diff --git a/dev-db/percona-server/percona-server-5.6.27.76.0.ebuild b/dev-db/percona-server/percona-server-5.6.27.76.0.ebuild
new file mode 100644
index 0000000..2ba398a
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.27.76.0.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="20151105-2051Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit python-any-r1 mysql-multilib-r1
+
+IUSE="pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+# 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
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+src_configure() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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 || die
+
+	# 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"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-01-20 13:58 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2016-01-20 13:58 UTC (permalink / raw
  To: gentoo-commits

commit:     abee77d08b04e86dabfb5b5233b4fbaa59fe9719
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 18 20:38:51 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Jan 20 13:56:50 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abee77d0

dev-db/percona-server: Version bump

2 Tests failing on initial run

Package-Manager: portage-2.2.26

 dev-db/percona-server/Manifest                     |   1 +
 .../percona-server-5.6.28.76.1.ebuild              | 173 +++++++++++++++++++++
 2 files changed, 174 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 953755c..6bee59f 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,4 @@
 DIST mysql-extras-20151105-2051Z.tar.bz2 1490187 SHA256 129d79c2064b08b0afad69e04e27991bf4103c20ccea39c133239b1dd822a49f SHA512 af34a44275b06c1626eb5952b3643b5663b8a1fb1d9ff18a67d51c02daaa51c4476df407d38ab607cc41842b47e5dd7b4cef8ae380a41eb80923df8052b9e521 WHIRLPOOL 01702ca4e2033fbc70db3ab2dd166b2e31072ea0f6bdd42d00c27ae0c0afab5c8451c4dcc90cce6d46f9ea056017e273f7c719e1cfabf969293bdcd15241f5b3
 DIST percona-server-5.6.27-75.0.tar.gz 54907367 SHA256 7dc4a4efadaee25e11fd78838f4ad2c0d7921ac9cc3b95068626f918c0add8d7 SHA512 c58fe18e3af7c88d9a3269c0b6a20c367bc80af6b3c1ab072fb380787f6b0ad44c8471134e366b7a9572fc4d16a4260d81a26f384aadab4bca99efcf521d3201 WHIRLPOOL 403a7efdbfb8bdaa5cecf72930be351b8762f17ce7166dffcff307e86a69f742546c85ff5badefab182dd001080ed49e71d2d5d587b74801cc22ccba682ac418
 DIST percona-server-5.6.27-76.0.tar.gz 54946650 SHA256 36d5c1c9a94712874b4d6e12c7e48d1f13c1fffb0ff976bc93aedbb4f73a0fef SHA512 64e2b1643bb06aefd59a1e1caddd31931b4b39ce5cd575ec3ec92f8c824887d112aa17573b10d596996579088c34e729eed83c37d63dd8cbef6755f0c0086805 WHIRLPOOL b203ba373ce312c1e10f0f96ba0fe8722ddc29c218bd075539f868426ad20c4d02c2307756c98fd2c7e21b45398d92c1b2b5145218b503bb0962bcafd908de12
+DIST percona-server-5.6.28-76.1.tar.gz 54994379 SHA256 ab8ab794a58a82132645ae84b74de91c7f9a5bcf81f2162628ce8976a00a4fd4 SHA512 fe26903d41034a6a7a240b0d7dbe8f3d7e417f6a23f8444ac42244f07649caee77d3ab781c13fdf45843cd297211a2058a6df5cd013c990497d9df9ed1fb9a9f WHIRLPOOL d9149f027f59d02a0fd0308e6806b5960ac29e347e3262e0b786e018ef16aac00c0e205104de7bc41b3ce20704a835d129ea485326cfc730143adfab01a349d0

diff --git a/dev-db/percona-server/percona-server-5.6.28.76.1.ebuild b/dev-db/percona-server/percona-server-5.6.28.76.1.ebuild
new file mode 100644
index 0000000..17e2f51
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.28.76.1.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+MY_EXTRAS_VER="20151105-2051Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit python-any-r1 mysql-multilib-r1
+
+IUSE="pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+# 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
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+src_configure() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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 || die
+
+	# 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"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-03-09 18:38 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2016-03-09 18:38 UTC (permalink / raw
  To: gentoo-commits

commit:     609c0e5b14058cec8e46f2fa7b6208f5048477b8
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  9 18:37:02 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Mar  9 18:38:33 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=609c0e5b

dev-db/percona-server: Drop old, vulnerable versions of 5.6.27

Package-Manager: portage-2.2.27

 dev-db/percona-server/Manifest                     |   2 -
 dev-db/percona-server/metadata.xml                 |   2 -
 .../percona-server-5.6.27.75.0-r1.ebuild           | 168 --------------------
 .../percona-server-5.6.27.75.0.ebuild              | 154 ------------------
 .../percona-server-5.6.27.76.0.ebuild              | 173 ---------------------
 5 files changed, 499 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 6b3d940..ad4d401 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,6 +1,4 @@
 DIST mysql-extras-20151105-2051Z.tar.bz2 1490187 SHA256 129d79c2064b08b0afad69e04e27991bf4103c20ccea39c133239b1dd822a49f SHA512 af34a44275b06c1626eb5952b3643b5663b8a1fb1d9ff18a67d51c02daaa51c4476df407d38ab607cc41842b47e5dd7b4cef8ae380a41eb80923df8052b9e521 WHIRLPOOL 01702ca4e2033fbc70db3ab2dd166b2e31072ea0f6bdd42d00c27ae0c0afab5c8451c4dcc90cce6d46f9ea056017e273f7c719e1cfabf969293bdcd15241f5b3
 DIST mysql-extras-20160307-1854Z.tar.bz2 298005 SHA256 a6516841d24670a1802e28fd66d4f540b16367396e6b2f687b8429b8e6a5d865 SHA512 d90081bd910dfffe6e1ac250465c0dbd9968edbdfe08f25f213ec328028fbb6fdb016816846c7fcee9202b9b93f4868edaff44ee04a0554cc93c6ecbf088db8f WHIRLPOOL f971804db83f42d717da318deeb647c1b294fa0967db7073e7f83d0fa15476d68089201430aaa882d90d5223a41a1a1668cfbe82bb897dcf864925e3da715c10
-DIST percona-server-5.6.27-75.0.tar.gz 54907367 SHA256 7dc4a4efadaee25e11fd78838f4ad2c0d7921ac9cc3b95068626f918c0add8d7 SHA512 c58fe18e3af7c88d9a3269c0b6a20c367bc80af6b3c1ab072fb380787f6b0ad44c8471134e366b7a9572fc4d16a4260d81a26f384aadab4bca99efcf521d3201 WHIRLPOOL 403a7efdbfb8bdaa5cecf72930be351b8762f17ce7166dffcff307e86a69f742546c85ff5badefab182dd001080ed49e71d2d5d587b74801cc22ccba682ac418
-DIST percona-server-5.6.27-76.0.tar.gz 54946650 SHA256 36d5c1c9a94712874b4d6e12c7e48d1f13c1fffb0ff976bc93aedbb4f73a0fef SHA512 64e2b1643bb06aefd59a1e1caddd31931b4b39ce5cd575ec3ec92f8c824887d112aa17573b10d596996579088c34e729eed83c37d63dd8cbef6755f0c0086805 WHIRLPOOL b203ba373ce312c1e10f0f96ba0fe8722ddc29c218bd075539f868426ad20c4d02c2307756c98fd2c7e21b45398d92c1b2b5145218b503bb0962bcafd908de12
 DIST percona-server-5.6.28-76.1.tar.gz 54994379 SHA256 ab8ab794a58a82132645ae84b74de91c7f9a5bcf81f2162628ce8976a00a4fd4 SHA512 fe26903d41034a6a7a240b0d7dbe8f3d7e417f6a23f8444ac42244f07649caee77d3ab781c13fdf45843cd297211a2058a6df5cd013c990497d9df9ed1fb9a9f WHIRLPOOL d9149f027f59d02a0fd0308e6806b5960ac29e347e3262e0b786e018ef16aac00c0e205104de7bc41b3ce20704a835d129ea485326cfc730143adfab01a349d0
 DIST percona-server-5.6.29-76.2.tar.gz 55032788 SHA256 23217feafc92222f313aeeb6e1806d110c35e50cf0b5f74510a9f8babe22e4b9 SHA512 0765ba02dcceaa3e4cb8f1b7261982f66ea5a14982723a9eb0a47177d03c18ffb3e647f10736780f6312dccb23f082ebcdd1f6330f9bf08ec714e43bf9fb4e57 WHIRLPOOL 8d719fbf0ec5ac4e0e80c40140bbf9a796c4ef1cb3ef1d0f8b92d14385c7e1af49063f0f176ab57e86a31d9729224354a3f72d331330d1a4907d41d6ab5fd92d

diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
index 702456a..57d49a1 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/metadata.xml
@@ -10,7 +10,6 @@
     <name>MySQL</name>
   </maintainer>
 <use>
-  <flag name="client-libs">Build the libmysqlclient libraries</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>
@@ -23,7 +22,6 @@
   <flag name="test">Install upstream testsuites for end use.</flag>
   <flag name="tokudb">Add support for TokuDB storage engine</flag>
   <flag name="tokudb-backup-plugin">Builds the TokuDB backup plugin</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/percona-server/percona-server-5.6.27.75.0-r1.ebuild b/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild
deleted file mode 100644
index 05963ac..0000000
--- a/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild
+++ /dev/null
@@ -1,168 +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"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit python-any-r1 mysql-multilib-r1
-
-IUSE="pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
-
-# 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
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-src_configure() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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="${CMAKE_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}
-
-		# These are failing in Percona 5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-		# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-		# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-		# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-		# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.percona_bug1289599
-		# Looks to be a syntax error in the test file itself
-		#
-		# main.variables main.myisam main.merge_recover
-		# fails due to ulimit not able to open enough files (needs 5000)
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# Called with bad parameters should be reported upstream
-		#
-
-		for t in main.mysql_client_test \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-			perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-			funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-			main.variables main.myisam main.merge_recover \
-			engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-			engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-			engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-			main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-multilib-r1_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-		python_setup
-		# 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/percona-server/percona-server-5.6.27.75.0.ebuild b/dev-db/percona-server/percona-server-5.6.27.75.0.ebuild
deleted file mode 100644
index 7dcbc77..0000000
--- a/dev-db/percona-server/percona-server-5.6.27.75.0.ebuild
+++ /dev/null
@@ -1,154 +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"
-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 tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-
-# 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 )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )"
-RDEPEND="${RDEPEND}"
-
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
-
-# 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 openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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="${CMAKE_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 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
-
-		# These are failing in Percona 5.6 for now and are believed to be
-		# false positives:
-		#
-		# main.information_schema, binlog.binlog_statement_insert_delayed,
-		# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-		# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-		# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-		# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-		# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-		# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-		# fails due to USE=-latin1 / utf8 default
-		#
-		# main.mysql_client_test:
-		# segfaults at random under Portage only, suspect resource limits.
-		#
-		# main.percona_bug1289599
-		# Looks to be a syntax error in the test file itself
-		#
-		# main.variables main.myisam main.merge_recover
-		# fails due to ulimit not able to open enough files (needs 5000)
-		#
-		# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-		# Called with bad parameters should be reported upstream
-		#
-
-		for t in main.mysql_client_test \
-			binlog.binlog_statement_insert_delayed main.information_schema \
-			main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-			perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-			funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-			main.variables main.myisam main.merge_recover \
-			engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-			engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-			engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-			main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-				mysql-multilib_disable_test  "$t" "False positives in Gentoo"
-		done
-
-		# Run mysql tests
-		pushd "${TESTDIR}"
-
-		# Set file limits higher so tests run
-		ulimit -n 3000
-
-		# run mysql-test tests
-		# We skip the innodb_stress suite because it depends on python2 being system python
-		perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
-			--testcase-timeout=30 --reorder \
-			--skip-test=innodb_stress
-		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/percona-server/percona-server-5.6.27.76.0.ebuild b/dev-db/percona-server/percona-server-5.6.27.76.0.ebuild
deleted file mode 100644
index 2ba398a..0000000
--- a/dev-db/percona-server/percona-server-5.6.27.76.0.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"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit python-any-r1 mysql-multilib-r1
-
-IUSE="pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
-
-# 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
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-src_configure() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 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}" || die
-
-	# Set file limits higher so tests run
-	ulimit -n 3000
-	python_setup
-	# 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 || die
-
-	# 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"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-03-09 18:38 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2016-03-09 18:38 UTC (permalink / raw
  To: gentoo-commits

commit:     dcfea3a69c31d5da2cd224cf9549bddf9d91244d
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  9 18:33:24 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Mar  9 18:38:29 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcfea3a6

dev-db/percona-server: Version bump for 5.6.29

Package-Manager: portage-2.2.27

 dev-db/percona-server/Manifest                     |   2 +
 .../percona-server-5.6.29.76.2.ebuild              | 186 +++++++++++++++++++++
 2 files changed, 188 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 6bee59f..6b3d940 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,4 +1,6 @@
 DIST mysql-extras-20151105-2051Z.tar.bz2 1490187 SHA256 129d79c2064b08b0afad69e04e27991bf4103c20ccea39c133239b1dd822a49f SHA512 af34a44275b06c1626eb5952b3643b5663b8a1fb1d9ff18a67d51c02daaa51c4476df407d38ab607cc41842b47e5dd7b4cef8ae380a41eb80923df8052b9e521 WHIRLPOOL 01702ca4e2033fbc70db3ab2dd166b2e31072ea0f6bdd42d00c27ae0c0afab5c8451c4dcc90cce6d46f9ea056017e273f7c719e1cfabf969293bdcd15241f5b3
+DIST mysql-extras-20160307-1854Z.tar.bz2 298005 SHA256 a6516841d24670a1802e28fd66d4f540b16367396e6b2f687b8429b8e6a5d865 SHA512 d90081bd910dfffe6e1ac250465c0dbd9968edbdfe08f25f213ec328028fbb6fdb016816846c7fcee9202b9b93f4868edaff44ee04a0554cc93c6ecbf088db8f WHIRLPOOL f971804db83f42d717da318deeb647c1b294fa0967db7073e7f83d0fa15476d68089201430aaa882d90d5223a41a1a1668cfbe82bb897dcf864925e3da715c10
 DIST percona-server-5.6.27-75.0.tar.gz 54907367 SHA256 7dc4a4efadaee25e11fd78838f4ad2c0d7921ac9cc3b95068626f918c0add8d7 SHA512 c58fe18e3af7c88d9a3269c0b6a20c367bc80af6b3c1ab072fb380787f6b0ad44c8471134e366b7a9572fc4d16a4260d81a26f384aadab4bca99efcf521d3201 WHIRLPOOL 403a7efdbfb8bdaa5cecf72930be351b8762f17ce7166dffcff307e86a69f742546c85ff5badefab182dd001080ed49e71d2d5d587b74801cc22ccba682ac418
 DIST percona-server-5.6.27-76.0.tar.gz 54946650 SHA256 36d5c1c9a94712874b4d6e12c7e48d1f13c1fffb0ff976bc93aedbb4f73a0fef SHA512 64e2b1643bb06aefd59a1e1caddd31931b4b39ce5cd575ec3ec92f8c824887d112aa17573b10d596996579088c34e729eed83c37d63dd8cbef6755f0c0086805 WHIRLPOOL b203ba373ce312c1e10f0f96ba0fe8722ddc29c218bd075539f868426ad20c4d02c2307756c98fd2c7e21b45398d92c1b2b5145218b503bb0962bcafd908de12
 DIST percona-server-5.6.28-76.1.tar.gz 54994379 SHA256 ab8ab794a58a82132645ae84b74de91c7f9a5bcf81f2162628ce8976a00a4fd4 SHA512 fe26903d41034a6a7a240b0d7dbe8f3d7e417f6a23f8444ac42244f07649caee77d3ab781c13fdf45843cd297211a2058a6df5cd013c990497d9df9ed1fb9a9f WHIRLPOOL d9149f027f59d02a0fd0308e6806b5960ac29e347e3262e0b786e018ef16aac00c0e205104de7bc41b3ce20704a835d129ea485326cfc730143adfab01a349d0
+DIST percona-server-5.6.29-76.2.tar.gz 55032788 SHA256 23217feafc92222f313aeeb6e1806d110c35e50cf0b5f74510a9f8babe22e4b9 SHA512 0765ba02dcceaa3e4cb8f1b7261982f66ea5a14982723a9eb0a47177d03c18ffb3e647f10736780f6312dccb23f082ebcdd1f6330f9bf08ec714e43bf9fb4e57 WHIRLPOOL 8d719fbf0ec5ac4e0e80c40140bbf9a796c4ef1cb3ef1d0f8b92d14385c7e1af49063f0f176ab57e86a31d9729224354a3f72d331330d1a4907d41d6ab5fd92d

diff --git a/dev-db/percona-server/percona-server-5.6.29.76.2.ebuild b/dev-db/percona-server/percona-server-5.6.29.76.2.ebuild
new file mode 100644
index 0000000..0febff2
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.29.76.2.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+MY_EXTRAS_VER="20160307-1854Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit python-any-r1 mysql-multilib-r1
+
+IUSE="pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.29.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_percona-server-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
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+src_configure() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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 || die
+
+	# 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"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-04-18  8:13 Patrice Clement
  0 siblings, 0 replies; 121+ messages in thread
From: Patrice Clement @ 2016-04-18  8:13 UTC (permalink / raw
  To: gentoo-commits

commit:     3bc636d350bf6a20e32b5f7180cbe3cebe0803a6
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 18 06:34:40 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 07:58:06 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bc636d3

dev-db/percona-server: Fix metadata.xml file.

Package-Manager: portage-2.2.26

 dev-db/percona-server/metadata.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
index 57d49a1..a8f685f 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/metadata.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<maintainer restrict="dev-db/percona-server[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>


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-04-18 18:31 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2016-04-18 18:31 UTC (permalink / raw
  To: gentoo-commits

commit:     217cdd35dd4dad11c4653cb70f43e146dd9724c1
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 18 18:28:57 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 18:28:57 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=217cdd35

dev-db/percona-server: Reorder maintainers after GLEP68 change

Package-Manager: portage-2.2.28

 dev-db/percona-server/metadata.xml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
index a8f685f..8a74d8f 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/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">
+  <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>
 <use>
   <flag name="embedded">Build embedded server (libmysqld)</flag>
   <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-06-13 18:40 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2016-06-13 18:40 UTC (permalink / raw
  To: gentoo-commits

commit:     2eccb5d67c40c597cb37b78f7428789b07557cc0
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 13 18:39:57 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Jun 13 18:39:57 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2eccb5d6

dev-db/percona-server: Version bump to 5.6.30.76.3 wrt bug 584882

Package-Manager: portage-2.3.0_rc1

 dev-db/percona-server/Manifest                     |   1 +
 .../percona-server-5.6.30.76.3.ebuild              | 186 +++++++++++++++++++++
 2 files changed, 187 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index ad4d401..bf27a1e 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -2,3 +2,4 @@ DIST mysql-extras-20151105-2051Z.tar.bz2 1490187 SHA256 129d79c2064b08b0afad69e0
 DIST mysql-extras-20160307-1854Z.tar.bz2 298005 SHA256 a6516841d24670a1802e28fd66d4f540b16367396e6b2f687b8429b8e6a5d865 SHA512 d90081bd910dfffe6e1ac250465c0dbd9968edbdfe08f25f213ec328028fbb6fdb016816846c7fcee9202b9b93f4868edaff44ee04a0554cc93c6ecbf088db8f WHIRLPOOL f971804db83f42d717da318deeb647c1b294fa0967db7073e7f83d0fa15476d68089201430aaa882d90d5223a41a1a1668cfbe82bb897dcf864925e3da715c10
 DIST percona-server-5.6.28-76.1.tar.gz 54994379 SHA256 ab8ab794a58a82132645ae84b74de91c7f9a5bcf81f2162628ce8976a00a4fd4 SHA512 fe26903d41034a6a7a240b0d7dbe8f3d7e417f6a23f8444ac42244f07649caee77d3ab781c13fdf45843cd297211a2058a6df5cd013c990497d9df9ed1fb9a9f WHIRLPOOL d9149f027f59d02a0fd0308e6806b5960ac29e347e3262e0b786e018ef16aac00c0e205104de7bc41b3ce20704a835d129ea485326cfc730143adfab01a349d0
 DIST percona-server-5.6.29-76.2.tar.gz 55032788 SHA256 23217feafc92222f313aeeb6e1806d110c35e50cf0b5f74510a9f8babe22e4b9 SHA512 0765ba02dcceaa3e4cb8f1b7261982f66ea5a14982723a9eb0a47177d03c18ffb3e647f10736780f6312dccb23f082ebcdd1f6330f9bf08ec714e43bf9fb4e57 WHIRLPOOL 8d719fbf0ec5ac4e0e80c40140bbf9a796c4ef1cb3ef1d0f8b92d14385c7e1af49063f0f176ab57e86a31d9729224354a3f72d331330d1a4907d41d6ab5fd92d
+DIST percona-server-5.6.30-76.3.tar.gz 55067217 SHA256 c762b6795b353ae9edecd2ccbb1b4a2677b04dd78ad760740a6a972b738f16cd SHA512 06428d3ffa6c00cba8d74a8f24a9c931f7069c08ed088b5f84972d29bcf42394c1fa2b9aa8b3542799c6ab460191afe8b942f493dba33b26b5a9a014aa9935b7 WHIRLPOOL 39d4e0fea528599ac9bb7a8e39db42472499c487333cf319a5ee5c02f6b35491966bdd49f3cfae5c004d74ee7f3bd26a7daa26b2c32e87c8c57802471e14f7d6

diff --git a/dev-db/percona-server/percona-server-5.6.30.76.3.ebuild b/dev-db/percona-server/percona-server-5.6.30.76.3.ebuild
new file mode 100644
index 0000000..0febff2
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.30.76.3.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+MY_EXTRAS_VER="20160307-1854Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit python-any-r1 mysql-multilib-r1
+
+IUSE="pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.29.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_percona-server-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
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+src_configure() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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 || die
+
+	# 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"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-07-19 17:43 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2016-07-19 17:43 UTC (permalink / raw
  To: gentoo-commits

commit:     6b9b503b04c6e4c1c4e5587bae2dd88e29584717
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 19 17:43:10 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Jul 19 17:43:10 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b9b503b

dev-db/percona-server: Drop security vulnerable versions

Package-Manager: portage-2.3.0

 dev-db/percona-server/Manifest                     |   3 -
 .../percona-server-5.6.28.76.1.ebuild              | 173 -------------------
 .../percona-server-5.6.29.76.2.ebuild              | 186 ---------------------
 3 files changed, 362 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index bf27a1e..f932634 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,5 +1,2 @@
-DIST mysql-extras-20151105-2051Z.tar.bz2 1490187 SHA256 129d79c2064b08b0afad69e04e27991bf4103c20ccea39c133239b1dd822a49f SHA512 af34a44275b06c1626eb5952b3643b5663b8a1fb1d9ff18a67d51c02daaa51c4476df407d38ab607cc41842b47e5dd7b4cef8ae380a41eb80923df8052b9e521 WHIRLPOOL 01702ca4e2033fbc70db3ab2dd166b2e31072ea0f6bdd42d00c27ae0c0afab5c8451c4dcc90cce6d46f9ea056017e273f7c719e1cfabf969293bdcd15241f5b3
 DIST mysql-extras-20160307-1854Z.tar.bz2 298005 SHA256 a6516841d24670a1802e28fd66d4f540b16367396e6b2f687b8429b8e6a5d865 SHA512 d90081bd910dfffe6e1ac250465c0dbd9968edbdfe08f25f213ec328028fbb6fdb016816846c7fcee9202b9b93f4868edaff44ee04a0554cc93c6ecbf088db8f WHIRLPOOL f971804db83f42d717da318deeb647c1b294fa0967db7073e7f83d0fa15476d68089201430aaa882d90d5223a41a1a1668cfbe82bb897dcf864925e3da715c10
-DIST percona-server-5.6.28-76.1.tar.gz 54994379 SHA256 ab8ab794a58a82132645ae84b74de91c7f9a5bcf81f2162628ce8976a00a4fd4 SHA512 fe26903d41034a6a7a240b0d7dbe8f3d7e417f6a23f8444ac42244f07649caee77d3ab781c13fdf45843cd297211a2058a6df5cd013c990497d9df9ed1fb9a9f WHIRLPOOL d9149f027f59d02a0fd0308e6806b5960ac29e347e3262e0b786e018ef16aac00c0e205104de7bc41b3ce20704a835d129ea485326cfc730143adfab01a349d0
-DIST percona-server-5.6.29-76.2.tar.gz 55032788 SHA256 23217feafc92222f313aeeb6e1806d110c35e50cf0b5f74510a9f8babe22e4b9 SHA512 0765ba02dcceaa3e4cb8f1b7261982f66ea5a14982723a9eb0a47177d03c18ffb3e647f10736780f6312dccb23f082ebcdd1f6330f9bf08ec714e43bf9fb4e57 WHIRLPOOL 8d719fbf0ec5ac4e0e80c40140bbf9a796c4ef1cb3ef1d0f8b92d14385c7e1af49063f0f176ab57e86a31d9729224354a3f72d331330d1a4907d41d6ab5fd92d
 DIST percona-server-5.6.30-76.3.tar.gz 55067217 SHA256 c762b6795b353ae9edecd2ccbb1b4a2677b04dd78ad760740a6a972b738f16cd SHA512 06428d3ffa6c00cba8d74a8f24a9c931f7069c08ed088b5f84972d29bcf42394c1fa2b9aa8b3542799c6ab460191afe8b942f493dba33b26b5a9a014aa9935b7 WHIRLPOOL 39d4e0fea528599ac9bb7a8e39db42472499c487333cf319a5ee5c02f6b35491966bdd49f3cfae5c004d74ee7f3bd26a7daa26b2c32e87c8c57802471e14f7d6

diff --git a/dev-db/percona-server/percona-server-5.6.28.76.1.ebuild b/dev-db/percona-server/percona-server-5.6.28.76.1.ebuild
deleted file mode 100644
index 17e2f51..0000000
--- a/dev-db/percona-server/percona-server-5.6.28.76.1.ebuild
+++ /dev/null
@@ -1,173 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-MY_EXTRAS_VER="20151105-2051Z"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit python-any-r1 mysql-multilib-r1
-
-IUSE="pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
-
-# 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
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-src_configure() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 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}" || die
-
-	# Set file limits higher so tests run
-	ulimit -n 3000
-	python_setup
-	# 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 || die
-
-	# 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"
-}

diff --git a/dev-db/percona-server/percona-server-5.6.29.76.2.ebuild b/dev-db/percona-server/percona-server-5.6.29.76.2.ebuild
deleted file mode 100644
index 0febff2..0000000
--- a/dev-db/percona-server/percona-server-5.6.29.76.2.ebuild
+++ /dev/null
@@ -1,186 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="6"
-MY_EXTRAS_VER="20160307-1854Z"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit python-any-r1 mysql-multilib-r1
-
-IUSE="pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
-
-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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.29.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_percona-server-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
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-src_configure() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 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}" || die
-
-	# Set file limits higher so tests run
-	ulimit -n 3000
-	python_setup
-	# 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 || die
-
-	# 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"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-07-20 13:58 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2016-07-20 13:58 UTC (permalink / raw
  To: gentoo-commits

commit:     c5ba6afee6b8c1cef63c3341e5059a0fbd40db14
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 20 13:57:56 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Jul 20 13:57:56 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5ba6afe

dev-db/percona-server: Drop security vulnerable version

Package-Manager: portage-2.3.0

 dev-db/percona-server/Manifest                     |   1 -
 .../percona-server-5.6.30.76.3.ebuild              | 186 ---------------------
 2 files changed, 187 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 33fcd75..2882440 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,2 @@
 DIST mysql-extras-20160307-1854Z.tar.bz2 298005 SHA256 a6516841d24670a1802e28fd66d4f540b16367396e6b2f687b8429b8e6a5d865 SHA512 d90081bd910dfffe6e1ac250465c0dbd9968edbdfe08f25f213ec328028fbb6fdb016816846c7fcee9202b9b93f4868edaff44ee04a0554cc93c6ecbf088db8f WHIRLPOOL f971804db83f42d717da318deeb647c1b294fa0967db7073e7f83d0fa15476d68089201430aaa882d90d5223a41a1a1668cfbe82bb897dcf864925e3da715c10
-DIST percona-server-5.6.30-76.3.tar.gz 55067217 SHA256 c762b6795b353ae9edecd2ccbb1b4a2677b04dd78ad760740a6a972b738f16cd SHA512 06428d3ffa6c00cba8d74a8f24a9c931f7069c08ed088b5f84972d29bcf42394c1fa2b9aa8b3542799c6ab460191afe8b942f493dba33b26b5a9a014aa9935b7 WHIRLPOOL 39d4e0fea528599ac9bb7a8e39db42472499c487333cf319a5ee5c02f6b35491966bdd49f3cfae5c004d74ee7f3bd26a7daa26b2c32e87c8c57802471e14f7d6
 DIST percona-server-5.6.31-77.0.tar.gz 55086290 SHA256 955fefc5a0a69b2cd44db64378678a773fb98e1260f68a067836473862c89fe7 SHA512 b166f3765052336b593bf2a3c3d0fa998d4ab413b2d86a494d6ef52689e04b7b681c95d434c67bb4536a818a8bebeaf27b519f274ba1ce8c447d36f7346858ee WHIRLPOOL f9ab27930c9727e9e70d992a7425ab5f2fdd575ebbe9c7b7436f9e72aff86bef65030a4b44afe5afda027aa8cd0f11d6a1303a8c262a0e60e12665d0dacb1676

diff --git a/dev-db/percona-server/percona-server-5.6.30.76.3.ebuild b/dev-db/percona-server/percona-server-5.6.30.76.3.ebuild
deleted file mode 100644
index 0febff2..0000000
--- a/dev-db/percona-server/percona-server-5.6.30.76.3.ebuild
+++ /dev/null
@@ -1,186 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="6"
-MY_EXTRAS_VER="20160307-1854Z"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit python-any-r1 mysql-multilib-r1
-
-IUSE="pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
-
-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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.29.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_percona-server-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
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-src_configure() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 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}" || die
-
-	# Set file limits higher so tests run
-	ulimit -n 3000
-	python_setup
-	# 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 || die
-
-	# 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"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-07-20 13:58 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2016-07-20 13:58 UTC (permalink / raw
  To: gentoo-commits

commit:     7fb5980313f054e7ce108dfac7d1b8b9a401f503
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 20 13:56:34 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Jul 20 13:56:34 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fb59803

dev-db/percona-server: Version bump

Package-Manager: portage-2.3.0

 dev-db/percona-server/Manifest                     |   1 +
 .../percona-server-5.6.31.77.0.ebuild              | 189 +++++++++++++++++++++
 2 files changed, 190 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index f932634..33fcd75 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,2 +1,3 @@
 DIST mysql-extras-20160307-1854Z.tar.bz2 298005 SHA256 a6516841d24670a1802e28fd66d4f540b16367396e6b2f687b8429b8e6a5d865 SHA512 d90081bd910dfffe6e1ac250465c0dbd9968edbdfe08f25f213ec328028fbb6fdb016816846c7fcee9202b9b93f4868edaff44ee04a0554cc93c6ecbf088db8f WHIRLPOOL f971804db83f42d717da318deeb647c1b294fa0967db7073e7f83d0fa15476d68089201430aaa882d90d5223a41a1a1668cfbe82bb897dcf864925e3da715c10
 DIST percona-server-5.6.30-76.3.tar.gz 55067217 SHA256 c762b6795b353ae9edecd2ccbb1b4a2677b04dd78ad760740a6a972b738f16cd SHA512 06428d3ffa6c00cba8d74a8f24a9c931f7069c08ed088b5f84972d29bcf42394c1fa2b9aa8b3542799c6ab460191afe8b942f493dba33b26b5a9a014aa9935b7 WHIRLPOOL 39d4e0fea528599ac9bb7a8e39db42472499c487333cf319a5ee5c02f6b35491966bdd49f3cfae5c004d74ee7f3bd26a7daa26b2c32e87c8c57802471e14f7d6
+DIST percona-server-5.6.31-77.0.tar.gz 55086290 SHA256 955fefc5a0a69b2cd44db64378678a773fb98e1260f68a067836473862c89fe7 SHA512 b166f3765052336b593bf2a3c3d0fa998d4ab413b2d86a494d6ef52689e04b7b681c95d434c67bb4536a818a8bebeaf27b519f274ba1ce8c447d36f7346858ee WHIRLPOOL f9ab27930c9727e9e70d992a7425ab5f2fdd575ebbe9c7b7436f9e72aff86bef65030a4b44afe5afda027aa8cd0f11d6a1303a8c262a0e60e12665d0dacb1676

diff --git a/dev-db/percona-server/percona-server-5.6.31.77.0.ebuild b/dev-db/percona-server/percona-server-5.6.31.77.0.ebuild
new file mode 100644
index 0000000..a9530ea
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.31.77.0.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+MY_EXTRAS_VER="20160307-1854Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit python-any-r1 mysql-multilib-r1
+
+IUSE="pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.29.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_percona-server-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
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+src_configure() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $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}"
+	# Silence repoman, this is only valid in tests
+	if use test ; then
+		addpredict /this-dir-does-not-exist/t9.MYI
+	fi
+
+	# 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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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 || die
+
+	# 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"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-07-21 18:52 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2016-07-21 18:52 UTC (permalink / raw
  To: gentoo-commits

commit:     b217cc04ffe316eb458fbd42191fe2c53dd3e2d6
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 21 18:32:07 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Thu Jul 21 18:52:37 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b217cc04

dev-db/percona-server: Mark 2 tests as false positives wrt bug 589280

Tests fixed upstream in next version

Package-Manager: portage-2.3.0

 dev-db/percona-server/percona-server-5.6.31.77.0.ebuild | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/dev-db/percona-server/percona-server-5.6.31.77.0.ebuild b/dev-db/percona-server/percona-server-5.6.31.77.0.ebuild
index a9530ea..db073b5 100644
--- a/dev-db/percona-server/percona-server-5.6.31.77.0.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.31.77.0.ebuild
@@ -140,6 +140,8 @@ multilib_src_test() {
 	# Called with bad parameters should be reported upstream
 	#
 
+	local t
+
 	for t in main.mysql_client_test \
 		binlog.binlog_statement_insert_delayed main.information_schema \
 		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
@@ -160,6 +162,11 @@ multilib_src_test() {
 		done
 	fi
 
+	# Fixed upstream in next version
+	for t in main.ssl_crl main.ssl_ca ; do
+		mysql-multilib-r1_disable_test "${t}" "False positive due to Percona bug 1603073"
+	done
+
 	# Run mysql tests
 	pushd "${TESTDIR}" || die
 


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-08-26 14:39 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2016-08-26 14:39 UTC (permalink / raw
  To: gentoo-commits

commit:     abf9ebf84d9a073a1104a807d50357aacee3cc20
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 26 14:14:58 2016 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Aug 26 14:39:18 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abf9ebf8

dev-db/percona-server: Bump to v5.6.32-78.0

Before this version percona-server automatically enabled NUMA support
when libnuma.so and headers were detected.

Starting with this release you need to enable the new "numa" USE flag
if you want to have NUMA support.

Please keep in mind that next to libnuma.so you also need kernel support
for NUMA.

Gentoo-Bug: https://bugs.gentoo.org/584880

Package-Manager: portage-2.3.0

 dev-db/percona-server/Manifest                     |   1 +
 dev-db/percona-server/metadata.xml                 |   1 +
 .../percona-server-5.6.32.78.0.ebuild              | 216 +++++++++++++++++++++
 3 files changed, 218 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 2882440..e8e9709 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,2 +1,3 @@
 DIST mysql-extras-20160307-1854Z.tar.bz2 298005 SHA256 a6516841d24670a1802e28fd66d4f540b16367396e6b2f687b8429b8e6a5d865 SHA512 d90081bd910dfffe6e1ac250465c0dbd9968edbdfe08f25f213ec328028fbb6fdb016816846c7fcee9202b9b93f4868edaff44ee04a0554cc93c6ecbf088db8f WHIRLPOOL f971804db83f42d717da318deeb647c1b294fa0967db7073e7f83d0fa15476d68089201430aaa882d90d5223a41a1a1668cfbe82bb897dcf864925e3da715c10
 DIST percona-server-5.6.31-77.0.tar.gz 55086290 SHA256 955fefc5a0a69b2cd44db64378678a773fb98e1260f68a067836473862c89fe7 SHA512 b166f3765052336b593bf2a3c3d0fa998d4ab413b2d86a494d6ef52689e04b7b681c95d434c67bb4536a818a8bebeaf27b519f274ba1ce8c447d36f7346858ee WHIRLPOOL f9ab27930c9727e9e70d992a7425ab5f2fdd575ebbe9c7b7436f9e72aff86bef65030a4b44afe5afda027aa8cd0f11d6a1303a8c262a0e60e12665d0dacb1676
+DIST percona-server-5.6.32-78.0.tar.gz 55120585 SHA256 b3f9191dd8660ba4f825c5fa8fa470e66417335ad8455e31bbc2d5f2cac1a923 SHA512 958cc27351c507410fe2a0a7a126ec36a25d1ced19ec6b2a4996a011c65c4f0e42d6a3235e21511f38677762dd8e0efe436fee67a5bf3db64b2c8b25520c43e5 WHIRLPOOL ef821cf1f9a5e3377bda96159d04f179f8ee9e8ef75ccfaed3512626ec51baf197e425b9fe39a300e7898824d7e76187d22314c07b1535bd7e7e00626fde2923

diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
index f44930d..0754114 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/metadata.xml
@@ -11,6 +11,7 @@
   <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="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
   <flag name="openssl">Enable SSL connections and crypto functions using <pkg>dev-libs/openssl</pkg></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/percona-server/percona-server-5.6.32.78.0.ebuild b/dev-db/percona-server/percona-server-5.6.32.78.0.ebuild
new file mode 100644
index 00000000..0d5e6ce
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.32.78.0.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+MY_EXTRAS_VER="20160307-1854Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit linux-info python-any-r1 mysql-multilib-r1
+
+IUSE="numa pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )
+	server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.29.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_percona-server-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
+
+pkg_pretend() {
+	mysql-multilib-r1_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
+}
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+src_configure() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
+			-DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+	# Silence repoman, this is only valid in tests
+	if use test ; then
+		addpredict /this-dir-does-not-exist/t9.MYI
+	fi
+
+	# 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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	local t
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
+				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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"
+
+	popd || die
+
+	# 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"
+
+	if [[ -n "$failures" ]]; then
+		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
+		die "Test failures: $failures"
+	fi
+
+	einfo "Tests successfully completed"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-09-14  0:58 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2016-09-14  0:58 UTC (permalink / raw
  To: gentoo-commits

commit:     0d92d10590a27e1814f60685bc3109d6cc4dea83
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 14 00:58:43 2016 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Sep 14 00:58:43 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d92d105

dev-db/percona-server: Drop old security vulnerable versions

Gentoo-Bug: https://bugs.gentoo.org/593610

Package-Manager: portage-2.3.0

 dev-db/percona-server/Manifest                     |   1 -
 .../percona-server-5.6.31.77.0.ebuild              | 196 ---------------------
 2 files changed, 197 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index e8e9709..98c1ba4 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,2 @@
 DIST mysql-extras-20160307-1854Z.tar.bz2 298005 SHA256 a6516841d24670a1802e28fd66d4f540b16367396e6b2f687b8429b8e6a5d865 SHA512 d90081bd910dfffe6e1ac250465c0dbd9968edbdfe08f25f213ec328028fbb6fdb016816846c7fcee9202b9b93f4868edaff44ee04a0554cc93c6ecbf088db8f WHIRLPOOL f971804db83f42d717da318deeb647c1b294fa0967db7073e7f83d0fa15476d68089201430aaa882d90d5223a41a1a1668cfbe82bb897dcf864925e3da715c10
-DIST percona-server-5.6.31-77.0.tar.gz 55086290 SHA256 955fefc5a0a69b2cd44db64378678a773fb98e1260f68a067836473862c89fe7 SHA512 b166f3765052336b593bf2a3c3d0fa998d4ab413b2d86a494d6ef52689e04b7b681c95d434c67bb4536a818a8bebeaf27b519f274ba1ce8c447d36f7346858ee WHIRLPOOL f9ab27930c9727e9e70d992a7425ab5f2fdd575ebbe9c7b7436f9e72aff86bef65030a4b44afe5afda027aa8cd0f11d6a1303a8c262a0e60e12665d0dacb1676
 DIST percona-server-5.6.32-78.0.tar.gz 55120585 SHA256 b3f9191dd8660ba4f825c5fa8fa470e66417335ad8455e31bbc2d5f2cac1a923 SHA512 958cc27351c507410fe2a0a7a126ec36a25d1ced19ec6b2a4996a011c65c4f0e42d6a3235e21511f38677762dd8e0efe436fee67a5bf3db64b2c8b25520c43e5 WHIRLPOOL ef821cf1f9a5e3377bda96159d04f179f8ee9e8ef75ccfaed3512626ec51baf197e425b9fe39a300e7898824d7e76187d22314c07b1535bd7e7e00626fde2923

diff --git a/dev-db/percona-server/percona-server-5.6.31.77.0.ebuild b/dev-db/percona-server/percona-server-5.6.31.77.0.ebuild
deleted file mode 100644
index db073b5..00000000
--- a/dev-db/percona-server/percona-server-5.6.31.77.0.ebuild
+++ /dev/null
@@ -1,196 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="6"
-MY_EXTRAS_VER="20160307-1854Z"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit python-any-r1 mysql-multilib-r1
-
-IUSE="pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
-
-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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.29.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_percona-server-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
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-src_configure() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $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}"
-	# Silence repoman, this is only valid in tests
-	if use test ; then
-		addpredict /this-dir-does-not-exist/t9.MYI
-	fi
-
-	# 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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	local t
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 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
-
-	# Fixed upstream in next version
-	for t in main.ssl_crl main.ssl_ca ; do
-		mysql-multilib-r1_disable_test "${t}" "False positive due to Percona bug 1603073"
-	done
-
-	# Run mysql tests
-	pushd "${TESTDIR}" || die
-
-	# Set file limits higher so tests run
-	ulimit -n 3000
-	python_setup
-	# 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 || die
-
-	# 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"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-09-22 21:54 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2016-09-22 21:54 UTC (permalink / raw
  To: gentoo-commits

commit:     b3ae687988d49123628757aa8c5422bdd3b444fb
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 22 21:54:13 2016 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Sep 22 21:54:40 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3ae6879

dev-db/percona-server: Drop old version

Package-Manager: portage-2.3.1

 dev-db/percona-server/Manifest                     |   2 -
 .../percona-server-5.6.32.78.0.ebuild              | 216 ---------------------
 2 files changed, 218 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 30bca75..cf89977 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,4 +1,2 @@
-DIST mysql-extras-20160307-1854Z.tar.bz2 298005 SHA256 a6516841d24670a1802e28fd66d4f540b16367396e6b2f687b8429b8e6a5d865 SHA512 d90081bd910dfffe6e1ac250465c0dbd9968edbdfe08f25f213ec328028fbb6fdb016816846c7fcee9202b9b93f4868edaff44ee04a0554cc93c6ecbf088db8f WHIRLPOOL f971804db83f42d717da318deeb647c1b294fa0967db7073e7f83d0fa15476d68089201430aaa882d90d5223a41a1a1668cfbe82bb897dcf864925e3da715c10
 DIST mysql-extras-20160818-1822Z.tar.bz2 302657 SHA256 7e4f42ea0754af120d2ad6b4a3e40dd9bd5a769913ac141453a2c53419bd6c05 SHA512 19bd509fd1a37c537ae28919516406735cdf3d3fbc66583f765b64b3d296bd041cf2bc2291004b7274604a2fda3cb399141d6c672ae5d6f8aced3d019ac81826 WHIRLPOOL 46b4e3c7f415b2de1440aa9d190805dfbc49a8f4a6ed26be5e4bb3e3e9553885cc7e7e13c83c49fadf71a6081bb8fd9d28d5f4d8372540c89a649f2d913fdd9b
-DIST percona-server-5.6.32-78.0.tar.gz 55120585 SHA256 b3f9191dd8660ba4f825c5fa8fa470e66417335ad8455e31bbc2d5f2cac1a923 SHA512 958cc27351c507410fe2a0a7a126ec36a25d1ced19ec6b2a4996a011c65c4f0e42d6a3235e21511f38677762dd8e0efe436fee67a5bf3db64b2c8b25520c43e5 WHIRLPOOL ef821cf1f9a5e3377bda96159d04f179f8ee9e8ef75ccfaed3512626ec51baf197e425b9fe39a300e7898824d7e76187d22314c07b1535bd7e7e00626fde2923
 DIST percona-server-5.6.32-78.1.tar.gz 55115483 SHA256 d94d73bf12459c57fcc8fa8018d7a08775d45ba718999a4ef0a09f543c654778 SHA512 77788932e83c3e3e4bbaa143844a11c809e0cbd87afbdc0f76ea12c462581d7438246d61984f82fe5174c2a099ea38274aa61957b05c6fc5a101a52028477b41 WHIRLPOOL 87561c8ce13809518b0a4fb2429cac9ef6667eedf0dad742f349e8f15736cf8249e4955eb1f49f579ab7cac550409603171b9003bf523c87603b3a2f38fd4ac0

diff --git a/dev-db/percona-server/percona-server-5.6.32.78.0.ebuild b/dev-db/percona-server/percona-server-5.6.32.78.0.ebuild
deleted file mode 100644
index 0d5e6ce..00000000
--- a/dev-db/percona-server/percona-server-5.6.32.78.0.ebuild
+++ /dev/null
@@ -1,216 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="6"
-MY_EXTRAS_VER="20160307-1854Z"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit linux-info python-any-r1 mysql-multilib-r1
-
-IUSE="numa pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="numa? ( sys-process/numactl:= )
-	server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
-
-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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.29.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_percona-server-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
-
-pkg_pretend() {
-	mysql-multilib-r1_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
-}
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-src_configure() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
-			-DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-	# Silence repoman, this is only valid in tests
-	if use test ; then
-		addpredict /this-dir-does-not-exist/t9.MYI
-	fi
-
-	# 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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	local t
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
-				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	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}" || die
-
-	# Set file limits higher so tests run
-	ulimit -n 3000
-	python_setup
-	# 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"
-
-	popd || die
-
-	# 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"
-
-	if [[ -n "$failures" ]]; then
-		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
-		die "Test failures: $failures"
-	fi
-
-	einfo "Tests successfully completed"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-09-22 21:54 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2016-09-22 21:54 UTC (permalink / raw
  To: gentoo-commits

commit:     58dd266b403128484921b2630b08286e50481874
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 22 21:52:36 2016 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Sep 22 21:54:38 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58dd266b

dev-db/percona-server: Bump to v5.6.32-78.1

Link: https://www.percona.com/blog/2016/09/21/percona-server-5-6-32-78-1-is-now-available/

Package-Manager: portage-2.3.1

 dev-db/percona-server/Manifest                     |   2 +
 .../percona-server-5.6.32.78.1.ebuild              | 216 +++++++++++++++++++++
 2 files changed, 218 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 98c1ba4..30bca75 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,2 +1,4 @@
 DIST mysql-extras-20160307-1854Z.tar.bz2 298005 SHA256 a6516841d24670a1802e28fd66d4f540b16367396e6b2f687b8429b8e6a5d865 SHA512 d90081bd910dfffe6e1ac250465c0dbd9968edbdfe08f25f213ec328028fbb6fdb016816846c7fcee9202b9b93f4868edaff44ee04a0554cc93c6ecbf088db8f WHIRLPOOL f971804db83f42d717da318deeb647c1b294fa0967db7073e7f83d0fa15476d68089201430aaa882d90d5223a41a1a1668cfbe82bb897dcf864925e3da715c10
+DIST mysql-extras-20160818-1822Z.tar.bz2 302657 SHA256 7e4f42ea0754af120d2ad6b4a3e40dd9bd5a769913ac141453a2c53419bd6c05 SHA512 19bd509fd1a37c537ae28919516406735cdf3d3fbc66583f765b64b3d296bd041cf2bc2291004b7274604a2fda3cb399141d6c672ae5d6f8aced3d019ac81826 WHIRLPOOL 46b4e3c7f415b2de1440aa9d190805dfbc49a8f4a6ed26be5e4bb3e3e9553885cc7e7e13c83c49fadf71a6081bb8fd9d28d5f4d8372540c89a649f2d913fdd9b
 DIST percona-server-5.6.32-78.0.tar.gz 55120585 SHA256 b3f9191dd8660ba4f825c5fa8fa470e66417335ad8455e31bbc2d5f2cac1a923 SHA512 958cc27351c507410fe2a0a7a126ec36a25d1ced19ec6b2a4996a011c65c4f0e42d6a3235e21511f38677762dd8e0efe436fee67a5bf3db64b2c8b25520c43e5 WHIRLPOOL ef821cf1f9a5e3377bda96159d04f179f8ee9e8ef75ccfaed3512626ec51baf197e425b9fe39a300e7898824d7e76187d22314c07b1535bd7e7e00626fde2923
+DIST percona-server-5.6.32-78.1.tar.gz 55115483 SHA256 d94d73bf12459c57fcc8fa8018d7a08775d45ba718999a4ef0a09f543c654778 SHA512 77788932e83c3e3e4bbaa143844a11c809e0cbd87afbdc0f76ea12c462581d7438246d61984f82fe5174c2a099ea38274aa61957b05c6fc5a101a52028477b41 WHIRLPOOL 87561c8ce13809518b0a4fb2429cac9ef6667eedf0dad742f349e8f15736cf8249e4955eb1f49f579ab7cac550409603171b9003bf523c87603b3a2f38fd4ac0

diff --git a/dev-db/percona-server/percona-server-5.6.32.78.1.ebuild b/dev-db/percona-server/percona-server-5.6.32.78.1.ebuild
new file mode 100644
index 00000000..1d4c2ef
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.32.78.1.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+MY_EXTRAS_VER="20160818-1822Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit linux-info python-any-r1 mysql-multilib-r1
+
+IUSE="numa pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )
+	server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.29.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_percona-server-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
+
+pkg_pretend() {
+	mysql-multilib-r1_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
+}
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+src_configure() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
+			-DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+	# Silence repoman, this is only valid in tests
+	if use test ; then
+		addpredict /this-dir-does-not-exist/t9.MYI
+	fi
+
+	# 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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	local t
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
+				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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"
+
+	popd || die
+
+	# 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"
+
+	if [[ -n "$failures" ]]; then
+		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
+		die "Test failures: $failures"
+	fi
+
+	einfo "Tests successfully completed"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-10-19 20:25 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2016-10-19 20:25 UTC (permalink / raw
  To: gentoo-commits

commit:     2ffd5706e26255afa8bf9b65adbbbc25bbeaf7ef
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 19 20:21:23 2016 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Oct 19 20:25:52 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ffd5706

dev-db/percona-server: Bump to v5.6.33-79.0

Package-Manager: portage-2.3.2

 dev-db/percona-server/Manifest                     |   1 +
 .../percona-server-5.6.33.79.0.ebuild              | 212 +++++++++++++++++++++
 2 files changed, 213 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index cf89977..a8fedc2 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,2 +1,3 @@
 DIST mysql-extras-20160818-1822Z.tar.bz2 302657 SHA256 7e4f42ea0754af120d2ad6b4a3e40dd9bd5a769913ac141453a2c53419bd6c05 SHA512 19bd509fd1a37c537ae28919516406735cdf3d3fbc66583f765b64b3d296bd041cf2bc2291004b7274604a2fda3cb399141d6c672ae5d6f8aced3d019ac81826 WHIRLPOOL 46b4e3c7f415b2de1440aa9d190805dfbc49a8f4a6ed26be5e4bb3e3e9553885cc7e7e13c83c49fadf71a6081bb8fd9d28d5f4d8372540c89a649f2d913fdd9b
 DIST percona-server-5.6.32-78.1.tar.gz 55115483 SHA256 d94d73bf12459c57fcc8fa8018d7a08775d45ba718999a4ef0a09f543c654778 SHA512 77788932e83c3e3e4bbaa143844a11c809e0cbd87afbdc0f76ea12c462581d7438246d61984f82fe5174c2a099ea38274aa61957b05c6fc5a101a52028477b41 WHIRLPOOL 87561c8ce13809518b0a4fb2429cac9ef6667eedf0dad742f349e8f15736cf8249e4955eb1f49f579ab7cac550409603171b9003bf523c87603b3a2f38fd4ac0
+DIST percona-server-5.6.33-79.0.tar.gz 55184504 SHA256 ed8372340740faca1f58735938823eaf65ffbda64a5c65b18d187b959afbd34e SHA512 5a31f9aecf9ec4515e46dcddc614989fbbbd7b23af9c5b351eac30ede3399358413b6f9b204628a12e3260a5e1d6ed94e70769ae487728c27796c81ea0282c85 WHIRLPOOL c341746eb053a74c02df47ea24a3e941bbdc89b840abadf68668e403dc50e071a9f96d429a8bead17b269d2a602bff35b8588179714d99372e068c0494db93c2

diff --git a/dev-db/percona-server/percona-server-5.6.33.79.0.ebuild b/dev-db/percona-server/percona-server-5.6.33.79.0.ebuild
new file mode 100644
index 00000000..8edbd8f
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.33.79.0.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+MY_EXTRAS_VER="20160818-1822Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit linux-info python-any-r1 mysql-multilib-r1
+
+IUSE="numa pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )
+	server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.29.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_percona-server-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
+
+pkg_pretend() {
+	mysql-multilib-r1_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
+}
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+src_configure() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
+			-DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# 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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	local t
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
+				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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"
+
+	popd || die
+
+	# 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"
+
+	if [[ -n "$failures" ]]; then
+		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
+		die "Test failures: $failures"
+	fi
+
+	einfo "Tests successfully completed"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2016-12-03 20:56 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2016-12-03 20:56 UTC (permalink / raw
  To: gentoo-commits

commit:     89a67668381cc860e9ed1c2981dc044cc8c084cf
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  3 20:55:44 2016 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Dec  3 20:56:24 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89a67668

dev-db/percona-server: Bump to v5.6.34.79.1

Package-Manager: portage-2.3.2

 dev-db/percona-server/Manifest                     |   2 +
 .../percona-server-5.6.34.79.1.ebuild              | 212 +++++++++++++++++++++
 2 files changed, 214 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index a8fedc2..ad54c54 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,5 @@
 DIST mysql-extras-20160818-1822Z.tar.bz2 302657 SHA256 7e4f42ea0754af120d2ad6b4a3e40dd9bd5a769913ac141453a2c53419bd6c05 SHA512 19bd509fd1a37c537ae28919516406735cdf3d3fbc66583f765b64b3d296bd041cf2bc2291004b7274604a2fda3cb399141d6c672ae5d6f8aced3d019ac81826 WHIRLPOOL 46b4e3c7f415b2de1440aa9d190805dfbc49a8f4a6ed26be5e4bb3e3e9553885cc7e7e13c83c49fadf71a6081bb8fd9d28d5f4d8372540c89a649f2d913fdd9b
+DIST mysql-extras-20161130-2354Z.tar.bz2 303863 SHA256 b18ce4ccfd023106a802bcb2e17a5bc3a1ec4d99e7bf7f45d047cf18ebb9ad1b SHA512 6c24c581fd471c4ce0ff20ed68bdb32150e310a2f8f000c8bb9892ab98302127f3427165b17967da3f5663e1da5a7f1d26f84021d4cb8292cbb5e0c241505113 WHIRLPOOL de6d896474faedf1d3696e346877cb03fb9908338d66f2b901aa83a24983ec3e0ea5f7f54dfd190bdf7a55f72bb580e21ab826850018ae25629b572cbabf532d
 DIST percona-server-5.6.32-78.1.tar.gz 55115483 SHA256 d94d73bf12459c57fcc8fa8018d7a08775d45ba718999a4ef0a09f543c654778 SHA512 77788932e83c3e3e4bbaa143844a11c809e0cbd87afbdc0f76ea12c462581d7438246d61984f82fe5174c2a099ea38274aa61957b05c6fc5a101a52028477b41 WHIRLPOOL 87561c8ce13809518b0a4fb2429cac9ef6667eedf0dad742f349e8f15736cf8249e4955eb1f49f579ab7cac550409603171b9003bf523c87603b3a2f38fd4ac0
 DIST percona-server-5.6.33-79.0.tar.gz 55184504 SHA256 ed8372340740faca1f58735938823eaf65ffbda64a5c65b18d187b959afbd34e SHA512 5a31f9aecf9ec4515e46dcddc614989fbbbd7b23af9c5b351eac30ede3399358413b6f9b204628a12e3260a5e1d6ed94e70769ae487728c27796c81ea0282c85 WHIRLPOOL c341746eb053a74c02df47ea24a3e941bbdc89b840abadf68668e403dc50e071a9f96d429a8bead17b269d2a602bff35b8588179714d99372e068c0494db93c2
+DIST percona-server-5.6.34-79.1.tar.gz 55763384 SHA256 8db1906e8fae2ac10faa23f44663f083762edd954a8efae2c798bc671b9d12d6 SHA512 3691daf14042cb35ab8cfe487c760e3da8f0758384224511ef84f388f895a5e15cbbf1a5ae1022d8a9d8ff7ee8ae7651ec8f39381cefce14b4f0fe3f2de2608b WHIRLPOOL 03911d171699ecf2c07e27fbdc82baa19a1fb72e2f0cbe17b107b49594e1c7755ae4ace5c2b74576517c262d6a812d0aa376c776e5f87f67c7f57bae37c6f4fd

diff --git a/dev-db/percona-server/percona-server-5.6.34.79.1.ebuild b/dev-db/percona-server/percona-server-5.6.34.79.1.ebuild
new file mode 100644
index 00000000..f89429e
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.34.79.1.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+MY_EXTRAS_VER="20161130-2354Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit linux-info python-any-r1 mysql-multilib-r1
+
+IUSE="numa pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )
+	server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
+
+pkg_pretend() {
+	mysql-multilib-r1_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
+}
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+src_configure() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
+			-DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# 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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	local t
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
+				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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"
+
+	popd || die
+
+	# 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"
+
+	if [[ -n "$failures" ]]; then
+		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
+		die "Test failures: $failures"
+	fi
+
+	einfo "Tests successfully completed"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-02-14 16:30 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2017-02-14 16:30 UTC (permalink / raw
  To: gentoo-commits

commit:     d9398c8f0289d177d43895a927ece2b571e1b27a
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 14 16:29:57 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Feb 14 16:30:22 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9398c8f

dev-db/percona-server: Bump to v5.6.35-80.0

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-db/percona-server/Manifest                     |   1 +
 .../percona-server-5.6.35.80.0.ebuild              | 220 +++++++++++++++++++++
 2 files changed, 221 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index ad54c54e05..98c2d05ad7 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -3,3 +3,4 @@ DIST mysql-extras-20161130-2354Z.tar.bz2 303863 SHA256 b18ce4ccfd023106a802bcb2e
 DIST percona-server-5.6.32-78.1.tar.gz 55115483 SHA256 d94d73bf12459c57fcc8fa8018d7a08775d45ba718999a4ef0a09f543c654778 SHA512 77788932e83c3e3e4bbaa143844a11c809e0cbd87afbdc0f76ea12c462581d7438246d61984f82fe5174c2a099ea38274aa61957b05c6fc5a101a52028477b41 WHIRLPOOL 87561c8ce13809518b0a4fb2429cac9ef6667eedf0dad742f349e8f15736cf8249e4955eb1f49f579ab7cac550409603171b9003bf523c87603b3a2f38fd4ac0
 DIST percona-server-5.6.33-79.0.tar.gz 55184504 SHA256 ed8372340740faca1f58735938823eaf65ffbda64a5c65b18d187b959afbd34e SHA512 5a31f9aecf9ec4515e46dcddc614989fbbbd7b23af9c5b351eac30ede3399358413b6f9b204628a12e3260a5e1d6ed94e70769ae487728c27796c81ea0282c85 WHIRLPOOL c341746eb053a74c02df47ea24a3e941bbdc89b840abadf68668e403dc50e071a9f96d429a8bead17b269d2a602bff35b8588179714d99372e068c0494db93c2
 DIST percona-server-5.6.34-79.1.tar.gz 55763384 SHA256 8db1906e8fae2ac10faa23f44663f083762edd954a8efae2c798bc671b9d12d6 SHA512 3691daf14042cb35ab8cfe487c760e3da8f0758384224511ef84f388f895a5e15cbbf1a5ae1022d8a9d8ff7ee8ae7651ec8f39381cefce14b4f0fe3f2de2608b WHIRLPOOL 03911d171699ecf2c07e27fbdc82baa19a1fb72e2f0cbe17b107b49594e1c7755ae4ace5c2b74576517c262d6a812d0aa376c776e5f87f67c7f57bae37c6f4fd
+DIST percona-server-5.6.35-80.0.tar.gz 55839147 SHA256 259b5aa2c6218958c8cc55170b9381955ea60445127bf46e02aa09903af7f26b SHA512 78b0b9cd69f26dc3ac13e4c6165590736d723b0f07d18a8ac1056281522de22b67d9fd931b035962bc278c97775fe7f98c46791328ece286268c7d31a484b69d WHIRLPOOL a6a6f78f41b1f8b5c26d0899efa6b043256749f4082ae9bffafe9210c3a326f33fe512a4c6578984892797e4f2c94de88ceca4c8c983cde7096cf01e88dec9b7

diff --git a/dev-db/percona-server/percona-server-5.6.35.80.0.ebuild b/dev-db/percona-server/percona-server-5.6.35.80.0.ebuild
new file mode 100644
index 0000000000..e5cc1ea4bb
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.35.80.0.ebuild
@@ -0,0 +1,220 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+MY_EXTRAS_VER="20161130-2354Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit linux-info python-any-r1 mysql-multilib-r1
+
+IUSE="numa pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )
+	server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
+
+pkg_pretend() {
+	mysql-multilib-r1_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
+}
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
+			-DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# 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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	local t
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
+				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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"
+
+	popd || die
+
+	# 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"
+
+	if [[ -n "$failures" ]]; then
+		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
+		die "Test failures: $failures"
+	fi
+
+	einfo "Tests successfully completed"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-03-09 19:18 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2017-03-09 19:18 UTC (permalink / raw
  To: gentoo-commits

commit:     2b80bbeab4f59f5fad26392256f830d2069638db
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  9 19:17:55 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Mar  9 19:17:55 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b80bbea

dev-db/percona-server: Security cleanup (bug #612150)

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-db/percona-server/Manifest                     |   4 -
 .../percona-server-5.6.32.78.1.ebuild              | 215 ---------------------
 .../percona-server-5.6.33.79.0.ebuild              | 211 --------------------
 .../percona-server-5.6.34.79.1.ebuild              | 211 --------------------
 4 files changed, 641 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 98c2d05ad78..0970993b332 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,6 +1,2 @@
-DIST mysql-extras-20160818-1822Z.tar.bz2 302657 SHA256 7e4f42ea0754af120d2ad6b4a3e40dd9bd5a769913ac141453a2c53419bd6c05 SHA512 19bd509fd1a37c537ae28919516406735cdf3d3fbc66583f765b64b3d296bd041cf2bc2291004b7274604a2fda3cb399141d6c672ae5d6f8aced3d019ac81826 WHIRLPOOL 46b4e3c7f415b2de1440aa9d190805dfbc49a8f4a6ed26be5e4bb3e3e9553885cc7e7e13c83c49fadf71a6081bb8fd9d28d5f4d8372540c89a649f2d913fdd9b
 DIST mysql-extras-20161130-2354Z.tar.bz2 303863 SHA256 b18ce4ccfd023106a802bcb2e17a5bc3a1ec4d99e7bf7f45d047cf18ebb9ad1b SHA512 6c24c581fd471c4ce0ff20ed68bdb32150e310a2f8f000c8bb9892ab98302127f3427165b17967da3f5663e1da5a7f1d26f84021d4cb8292cbb5e0c241505113 WHIRLPOOL de6d896474faedf1d3696e346877cb03fb9908338d66f2b901aa83a24983ec3e0ea5f7f54dfd190bdf7a55f72bb580e21ab826850018ae25629b572cbabf532d
-DIST percona-server-5.6.32-78.1.tar.gz 55115483 SHA256 d94d73bf12459c57fcc8fa8018d7a08775d45ba718999a4ef0a09f543c654778 SHA512 77788932e83c3e3e4bbaa143844a11c809e0cbd87afbdc0f76ea12c462581d7438246d61984f82fe5174c2a099ea38274aa61957b05c6fc5a101a52028477b41 WHIRLPOOL 87561c8ce13809518b0a4fb2429cac9ef6667eedf0dad742f349e8f15736cf8249e4955eb1f49f579ab7cac550409603171b9003bf523c87603b3a2f38fd4ac0
-DIST percona-server-5.6.33-79.0.tar.gz 55184504 SHA256 ed8372340740faca1f58735938823eaf65ffbda64a5c65b18d187b959afbd34e SHA512 5a31f9aecf9ec4515e46dcddc614989fbbbd7b23af9c5b351eac30ede3399358413b6f9b204628a12e3260a5e1d6ed94e70769ae487728c27796c81ea0282c85 WHIRLPOOL c341746eb053a74c02df47ea24a3e941bbdc89b840abadf68668e403dc50e071a9f96d429a8bead17b269d2a602bff35b8588179714d99372e068c0494db93c2
-DIST percona-server-5.6.34-79.1.tar.gz 55763384 SHA256 8db1906e8fae2ac10faa23f44663f083762edd954a8efae2c798bc671b9d12d6 SHA512 3691daf14042cb35ab8cfe487c760e3da8f0758384224511ef84f388f895a5e15cbbf1a5ae1022d8a9d8ff7ee8ae7651ec8f39381cefce14b4f0fe3f2de2608b WHIRLPOOL 03911d171699ecf2c07e27fbdc82baa19a1fb72e2f0cbe17b107b49594e1c7755ae4ace5c2b74576517c262d6a812d0aa376c776e5f87f67c7f57bae37c6f4fd
 DIST percona-server-5.6.35-80.0.tar.gz 55839147 SHA256 259b5aa2c6218958c8cc55170b9381955ea60445127bf46e02aa09903af7f26b SHA512 78b0b9cd69f26dc3ac13e4c6165590736d723b0f07d18a8ac1056281522de22b67d9fd931b035962bc278c97775fe7f98c46791328ece286268c7d31a484b69d WHIRLPOOL a6a6f78f41b1f8b5c26d0899efa6b043256749f4082ae9bffafe9210c3a326f33fe512a4c6578984892797e4f2c94de88ceca4c8c983cde7096cf01e88dec9b7

diff --git a/dev-db/percona-server/percona-server-5.6.32.78.1.ebuild b/dev-db/percona-server/percona-server-5.6.32.78.1.ebuild
deleted file mode 100644
index aa480d351ba..00000000000
--- a/dev-db/percona-server/percona-server-5.6.32.78.1.ebuild
+++ /dev/null
@@ -1,215 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20160818-1822Z"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit linux-info python-any-r1 mysql-multilib-r1
-
-IUSE="numa pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="numa? ( sys-process/numactl:= )
-	server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
-
-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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.29.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_percona-server-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
-
-pkg_pretend() {
-	mysql-multilib-r1_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
-}
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-src_configure() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
-			-DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-	# Silence repoman, this is only valid in tests
-	if use test ; then
-		addpredict /this-dir-does-not-exist/t9.MYI
-	fi
-
-	# 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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	local t
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
-				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	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}" || die
-
-	# Set file limits higher so tests run
-	ulimit -n 3000
-	python_setup
-	# 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"
-
-	popd || die
-
-	# 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"
-
-	if [[ -n "$failures" ]]; then
-		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
-		die "Test failures: $failures"
-	fi
-
-	einfo "Tests successfully completed"
-}

diff --git a/dev-db/percona-server/percona-server-5.6.33.79.0.ebuild b/dev-db/percona-server/percona-server-5.6.33.79.0.ebuild
deleted file mode 100644
index ce879820244..00000000000
--- a/dev-db/percona-server/percona-server-5.6.33.79.0.ebuild
+++ /dev/null
@@ -1,211 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20160818-1822Z"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit linux-info python-any-r1 mysql-multilib-r1
-
-IUSE="numa pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="numa? ( sys-process/numactl:= )
-	server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
-
-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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.29.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_percona-server-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
-
-pkg_pretend() {
-	mysql-multilib-r1_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
-}
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-src_configure() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
-			-DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# 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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	local t
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
-				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	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}" || die
-
-	# Set file limits higher so tests run
-	ulimit -n 3000
-	python_setup
-	# 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"
-
-	popd || die
-
-	# 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"
-
-	if [[ -n "$failures" ]]; then
-		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
-		die "Test failures: $failures"
-	fi
-
-	einfo "Tests successfully completed"
-}

diff --git a/dev-db/percona-server/percona-server-5.6.34.79.1.ebuild b/dev-db/percona-server/percona-server-5.6.34.79.1.ebuild
deleted file mode 100644
index e20ed4d1123..00000000000
--- a/dev-db/percona-server/percona-server-5.6.34.79.1.ebuild
+++ /dev/null
@@ -1,211 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20161130-2354Z"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit linux-info python-any-r1 mysql-multilib-r1
-
-IUSE="numa pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="numa? ( sys-process/numactl:= )
-	server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
-
-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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
-
-pkg_pretend() {
-	mysql-multilib-r1_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
-}
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-src_configure() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
-			-DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# 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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	local t
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
-				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	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}" || die
-
-	# Set file limits higher so tests run
-	ulimit -n 3000
-	python_setup
-	# 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"
-
-	popd || die
-
-	# 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"
-
-	if [[ -n "$failures" ]]; then
-		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
-		die "Test failures: $failures"
-	fi
-
-	einfo "Tests successfully completed"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-04-13 21:02 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2017-04-13 21:02 UTC (permalink / raw
  To: gentoo-commits

commit:     922a3cc6693589f4407bded58c0997ae136a4378
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 13 21:02:29 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Apr 13 21:02:48 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=922a3cc6

dev-db/percona-server: Bump to v5.6.35-81.0

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 dev-db/percona-server/Manifest                     |   1 +
 .../percona-server-5.6.35.81.0.ebuild              | 219 +++++++++++++++++++++
 2 files changed, 220 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 0970993b332..2622b86c78b 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,2 +1,3 @@
 DIST mysql-extras-20161130-2354Z.tar.bz2 303863 SHA256 b18ce4ccfd023106a802bcb2e17a5bc3a1ec4d99e7bf7f45d047cf18ebb9ad1b SHA512 6c24c581fd471c4ce0ff20ed68bdb32150e310a2f8f000c8bb9892ab98302127f3427165b17967da3f5663e1da5a7f1d26f84021d4cb8292cbb5e0c241505113 WHIRLPOOL de6d896474faedf1d3696e346877cb03fb9908338d66f2b901aa83a24983ec3e0ea5f7f54dfd190bdf7a55f72bb580e21ab826850018ae25629b572cbabf532d
 DIST percona-server-5.6.35-80.0.tar.gz 55839147 SHA256 259b5aa2c6218958c8cc55170b9381955ea60445127bf46e02aa09903af7f26b SHA512 78b0b9cd69f26dc3ac13e4c6165590736d723b0f07d18a8ac1056281522de22b67d9fd931b035962bc278c97775fe7f98c46791328ece286268c7d31a484b69d WHIRLPOOL a6a6f78f41b1f8b5c26d0899efa6b043256749f4082ae9bffafe9210c3a326f33fe512a4c6578984892797e4f2c94de88ceca4c8c983cde7096cf01e88dec9b7
+DIST percona-server-5.6.35-81.0.tar.gz 56065684 SHA256 c71c3f80662982ade22a0a538c5fd595b1761472c98efc2509124ecc4004d1e7 SHA512 7020946e91d57f6377064a7c3e820b9c9d5149d22f80c9bb509d4b06631862a4378167d7bec40d7ca9ff01bcb498bdb9656cad8a64f2eab985ebc722fd1985aa WHIRLPOOL 51239409fc5742f81b4baa6e3150ac5f2fa6d6f55d55b34e426737968bacc44999427e9ab65a390459ba270b740462b4c1c409d95a3d13781a2aefe716037cdf

diff --git a/dev-db/percona-server/percona-server-5.6.35.81.0.ebuild b/dev-db/percona-server/percona-server-5.6.35.81.0.ebuild
new file mode 100644
index 00000000000..246e89f6191
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.35.81.0.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20161130-2354Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit linux-info python-any-r1 mysql-multilib-r1
+
+IUSE="numa pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )
+	server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
+
+pkg_pretend() {
+	mysql-multilib-r1_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
+}
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
+			-DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# 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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	local t
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
+				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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"
+
+	popd || die
+
+	# 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"
+
+	if [[ -n "$failures" ]]; then
+		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
+		die "Test failures: $failures"
+	fi
+
+	einfo "Tests successfully completed"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-05-27  9:08 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2017-05-27  9:08 UTC (permalink / raw
  To: gentoo-commits

commit:     de0cc85ee94346fcddd7c4dc36844fadf3d26892
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat May 27 09:08:25 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat May 27 09:08:25 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de0cc85e

dev-db/percona-server: Bump to v5.6.36-82.0

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 dev-db/percona-server/Manifest                     |   1 +
 .../percona-server-5.6.36.82.0.ebuild              | 219 +++++++++++++++++++++
 2 files changed, 220 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 2622b86c78b..b3d8b555506 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,4 @@
 DIST mysql-extras-20161130-2354Z.tar.bz2 303863 SHA256 b18ce4ccfd023106a802bcb2e17a5bc3a1ec4d99e7bf7f45d047cf18ebb9ad1b SHA512 6c24c581fd471c4ce0ff20ed68bdb32150e310a2f8f000c8bb9892ab98302127f3427165b17967da3f5663e1da5a7f1d26f84021d4cb8292cbb5e0c241505113 WHIRLPOOL de6d896474faedf1d3696e346877cb03fb9908338d66f2b901aa83a24983ec3e0ea5f7f54dfd190bdf7a55f72bb580e21ab826850018ae25629b572cbabf532d
 DIST percona-server-5.6.35-80.0.tar.gz 55839147 SHA256 259b5aa2c6218958c8cc55170b9381955ea60445127bf46e02aa09903af7f26b SHA512 78b0b9cd69f26dc3ac13e4c6165590736d723b0f07d18a8ac1056281522de22b67d9fd931b035962bc278c97775fe7f98c46791328ece286268c7d31a484b69d WHIRLPOOL a6a6f78f41b1f8b5c26d0899efa6b043256749f4082ae9bffafe9210c3a326f33fe512a4c6578984892797e4f2c94de88ceca4c8c983cde7096cf01e88dec9b7
 DIST percona-server-5.6.35-81.0.tar.gz 56065684 SHA256 c71c3f80662982ade22a0a538c5fd595b1761472c98efc2509124ecc4004d1e7 SHA512 7020946e91d57f6377064a7c3e820b9c9d5149d22f80c9bb509d4b06631862a4378167d7bec40d7ca9ff01bcb498bdb9656cad8a64f2eab985ebc722fd1985aa WHIRLPOOL 51239409fc5742f81b4baa6e3150ac5f2fa6d6f55d55b34e426737968bacc44999427e9ab65a390459ba270b740462b4c1c409d95a3d13781a2aefe716037cdf
+DIST percona-server-5.6.36-82.0.tar.gz 56116691 SHA256 4304ac45de79053128fb78f13527f483ec9cf1c9592498deeacbbe541216fc9d SHA512 c5046f212a893de2ce80afbeed3648915842d862383faf3a354a47515920016ed98b91d4bd42b77ea422b28aa9a5cb691942b031099fc893833127080e5a38b0 WHIRLPOOL 2cfa29d9cd864f5ff828553a3659ff2818589201f983be45a984474a27c625e6868a77f4a751ba0a575a79793ddcf34337f7efa95cb09e0c290c9b9cdaa9b173

diff --git a/dev-db/percona-server/percona-server-5.6.36.82.0.ebuild b/dev-db/percona-server/percona-server-5.6.36.82.0.ebuild
new file mode 100644
index 00000000000..246e89f6191
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.36.82.0.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20161130-2354Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit linux-info python-any-r1 mysql-multilib-r1
+
+IUSE="numa pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )
+	server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
+
+pkg_pretend() {
+	mysql-multilib-r1_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
+}
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
+			-DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# 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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	local t
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
+				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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"
+
+	popd || die
+
+	# 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"
+
+	if [[ -n "$failures" ]]; then
+		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
+		die "Test failures: $failures"
+	fi
+
+	einfo "Tests successfully completed"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-07-17 13:44 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2017-07-17 13:44 UTC (permalink / raw
  To: gentoo-commits

commit:     b1dca7aa49918dd4c4235fb956e6fd4542629070
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 17 13:38:38 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Jul 17 13:43:55 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1dca7aa

dev-db/percona-server: Adjust REQUIRED_USE for GLEP73

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-db/percona-server/percona-server-5.6.35.80.0.ebuild | 2 +-
 dev-db/percona-server/percona-server-5.6.35.81.0.ebuild | 2 +-
 dev-db/percona-server/percona-server-5.6.36.82.0.ebuild | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.6.35.80.0.ebuild b/dev-db/percona-server/percona-server-5.6.35.80.0.ebuild
index 246e89f6191..d80fa4c6880 100644
--- a/dev-db/percona-server/percona-server-5.6.35.80.0.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.35.80.0.ebuild
@@ -28,7 +28,7 @@ DEPEND="${COMMON_DEPEND}
 	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
 RDEPEND="${COMMON_DEPEND}"
 
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
 
 MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
 

diff --git a/dev-db/percona-server/percona-server-5.6.35.81.0.ebuild b/dev-db/percona-server/percona-server-5.6.35.81.0.ebuild
index 246e89f6191..d80fa4c6880 100644
--- a/dev-db/percona-server/percona-server-5.6.35.81.0.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.35.81.0.ebuild
@@ -28,7 +28,7 @@ DEPEND="${COMMON_DEPEND}
 	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
 RDEPEND="${COMMON_DEPEND}"
 
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
 
 MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
 

diff --git a/dev-db/percona-server/percona-server-5.6.36.82.0.ebuild b/dev-db/percona-server/percona-server-5.6.36.82.0.ebuild
index 246e89f6191..d80fa4c6880 100644
--- a/dev-db/percona-server/percona-server-5.6.36.82.0.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.36.82.0.ebuild
@@ -28,7 +28,7 @@ DEPEND="${COMMON_DEPEND}
 	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
 RDEPEND="${COMMON_DEPEND}"
 
-REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
+REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
 
 MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
 


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-08-02 16:46 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2017-08-02 16:46 UTC (permalink / raw
  To: gentoo-commits

commit:     2483939163de91c169fbef1a6da8bc48c8251cc8
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  2 16:45:52 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Aug  2 16:46:06 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24839391

dev-db/percona-server: Cleanup old.

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 dev-db/percona-server/Manifest                     |   2 -
 .../percona-server-5.6.35.80.0.ebuild              | 219 ---------------------
 .../percona-server-5.6.35.81.0.ebuild              | 219 ---------------------
 3 files changed, 440 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index a3c3955de2d..82d35d9c2d3 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,5 +1,3 @@
 DIST mysql-extras-20161130-2354Z.tar.bz2 303863 SHA256 b18ce4ccfd023106a802bcb2e17a5bc3a1ec4d99e7bf7f45d047cf18ebb9ad1b SHA512 6c24c581fd471c4ce0ff20ed68bdb32150e310a2f8f000c8bb9892ab98302127f3427165b17967da3f5663e1da5a7f1d26f84021d4cb8292cbb5e0c241505113 WHIRLPOOL de6d896474faedf1d3696e346877cb03fb9908338d66f2b901aa83a24983ec3e0ea5f7f54dfd190bdf7a55f72bb580e21ab826850018ae25629b572cbabf532d
-DIST percona-server-5.6.35-80.0.tar.gz 55839147 SHA256 259b5aa2c6218958c8cc55170b9381955ea60445127bf46e02aa09903af7f26b SHA512 78b0b9cd69f26dc3ac13e4c6165590736d723b0f07d18a8ac1056281522de22b67d9fd931b035962bc278c97775fe7f98c46791328ece286268c7d31a484b69d WHIRLPOOL a6a6f78f41b1f8b5c26d0899efa6b043256749f4082ae9bffafe9210c3a326f33fe512a4c6578984892797e4f2c94de88ceca4c8c983cde7096cf01e88dec9b7
-DIST percona-server-5.6.35-81.0.tar.gz 56065684 SHA256 c71c3f80662982ade22a0a538c5fd595b1761472c98efc2509124ecc4004d1e7 SHA512 7020946e91d57f6377064a7c3e820b9c9d5149d22f80c9bb509d4b06631862a4378167d7bec40d7ca9ff01bcb498bdb9656cad8a64f2eab985ebc722fd1985aa WHIRLPOOL 51239409fc5742f81b4baa6e3150ac5f2fa6d6f55d55b34e426737968bacc44999427e9ab65a390459ba270b740462b4c1c409d95a3d13781a2aefe716037cdf
 DIST percona-server-5.6.36-82.0.tar.gz 56116691 SHA256 4304ac45de79053128fb78f13527f483ec9cf1c9592498deeacbbe541216fc9d SHA512 c5046f212a893de2ce80afbeed3648915842d862383faf3a354a47515920016ed98b91d4bd42b77ea422b28aa9a5cb691942b031099fc893833127080e5a38b0 WHIRLPOOL 2cfa29d9cd864f5ff828553a3659ff2818589201f983be45a984474a27c625e6868a77f4a751ba0a575a79793ddcf34337f7efa95cb09e0c290c9b9cdaa9b173
 DIST percona-server-5.6.36-82.1.tar.gz 56190395 SHA256 bebab31321e17682bc23f0f1e95211f002ba2a24c21d9a7ce9821cbe2a1ba4ba SHA512 b604772a65cdd94d832c69a2b7984e065bef1ce3b9305c1d35c0f37513b962067f9fcb47f43172a318e55648222b7c7bd6e86fb003314ef75da3696bd2a63a21 WHIRLPOOL 88307c416f066df5a55821d2b6fa4bde98acb4e23defc661cf01a52d635f6e25e132f37a27e5748d302ade80470803aab0afca2585221870b7208edfff6aa7b0

diff --git a/dev-db/percona-server/percona-server-5.6.35.80.0.ebuild b/dev-db/percona-server/percona-server-5.6.35.80.0.ebuild
deleted file mode 100644
index d80fa4c6880..00000000000
--- a/dev-db/percona-server/percona-server-5.6.35.80.0.ebuild
+++ /dev/null
@@ -1,219 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20161130-2354Z"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit linux-info python-any-r1 mysql-multilib-r1
-
-IUSE="numa pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="numa? ( sys-process/numactl:= )
-	server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
-
-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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
-
-pkg_pretend() {
-	mysql-multilib-r1_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
-}
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-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() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
-			-DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# 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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	local t
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
-				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	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}" || die
-
-	# Set file limits higher so tests run
-	ulimit -n 3000
-	python_setup
-	# 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"
-
-	popd || die
-
-	# 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"
-
-	if [[ -n "$failures" ]]; then
-		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
-		die "Test failures: $failures"
-	fi
-
-	einfo "Tests successfully completed"
-}

diff --git a/dev-db/percona-server/percona-server-5.6.35.81.0.ebuild b/dev-db/percona-server/percona-server-5.6.35.81.0.ebuild
deleted file mode 100644
index d80fa4c6880..00000000000
--- a/dev-db/percona-server/percona-server-5.6.35.81.0.ebuild
+++ /dev/null
@@ -1,219 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20161130-2354Z"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit linux-info python-any-r1 mysql-multilib-r1
-
-IUSE="numa pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="numa? ( sys-process/numactl:= )
-	server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
-
-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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
-
-pkg_pretend() {
-	mysql-multilib-r1_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
-}
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-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() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
-			-DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# 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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	local t
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
-				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	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}" || die
-
-	# Set file limits higher so tests run
-	ulimit -n 3000
-	python_setup
-	# 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"
-
-	popd || die
-
-	# 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"
-
-	if [[ -n "$failures" ]]; then
-		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
-		die "Test failures: $failures"
-	fi
-
-	einfo "Tests successfully completed"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-08-02 16:46 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2017-08-02 16:46 UTC (permalink / raw
  To: gentoo-commits

commit:     454b90d63747e228e924d8b20f0f71a5bf6b450f
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  2 16:45:11 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Aug  2 16:46:04 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=454b90d6

dev-db/percona-server: Bump to v5.6.36.82.1

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 dev-db/percona-server/Manifest                     |   1 +
 .../percona-server-5.6.36.82.1.ebuild              | 219 +++++++++++++++++++++
 2 files changed, 220 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index b3d8b555506..a3c3955de2d 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -2,3 +2,4 @@ DIST mysql-extras-20161130-2354Z.tar.bz2 303863 SHA256 b18ce4ccfd023106a802bcb2e
 DIST percona-server-5.6.35-80.0.tar.gz 55839147 SHA256 259b5aa2c6218958c8cc55170b9381955ea60445127bf46e02aa09903af7f26b SHA512 78b0b9cd69f26dc3ac13e4c6165590736d723b0f07d18a8ac1056281522de22b67d9fd931b035962bc278c97775fe7f98c46791328ece286268c7d31a484b69d WHIRLPOOL a6a6f78f41b1f8b5c26d0899efa6b043256749f4082ae9bffafe9210c3a326f33fe512a4c6578984892797e4f2c94de88ceca4c8c983cde7096cf01e88dec9b7
 DIST percona-server-5.6.35-81.0.tar.gz 56065684 SHA256 c71c3f80662982ade22a0a538c5fd595b1761472c98efc2509124ecc4004d1e7 SHA512 7020946e91d57f6377064a7c3e820b9c9d5149d22f80c9bb509d4b06631862a4378167d7bec40d7ca9ff01bcb498bdb9656cad8a64f2eab985ebc722fd1985aa WHIRLPOOL 51239409fc5742f81b4baa6e3150ac5f2fa6d6f55d55b34e426737968bacc44999427e9ab65a390459ba270b740462b4c1c409d95a3d13781a2aefe716037cdf
 DIST percona-server-5.6.36-82.0.tar.gz 56116691 SHA256 4304ac45de79053128fb78f13527f483ec9cf1c9592498deeacbbe541216fc9d SHA512 c5046f212a893de2ce80afbeed3648915842d862383faf3a354a47515920016ed98b91d4bd42b77ea422b28aa9a5cb691942b031099fc893833127080e5a38b0 WHIRLPOOL 2cfa29d9cd864f5ff828553a3659ff2818589201f983be45a984474a27c625e6868a77f4a751ba0a575a79793ddcf34337f7efa95cb09e0c290c9b9cdaa9b173
+DIST percona-server-5.6.36-82.1.tar.gz 56190395 SHA256 bebab31321e17682bc23f0f1e95211f002ba2a24c21d9a7ce9821cbe2a1ba4ba SHA512 b604772a65cdd94d832c69a2b7984e065bef1ce3b9305c1d35c0f37513b962067f9fcb47f43172a318e55648222b7c7bd6e86fb003314ef75da3696bd2a63a21 WHIRLPOOL 88307c416f066df5a55821d2b6fa4bde98acb4e23defc661cf01a52d635f6e25e132f37a27e5748d302ade80470803aab0afca2585221870b7208edfff6aa7b0

diff --git a/dev-db/percona-server/percona-server-5.6.36.82.1.ebuild b/dev-db/percona-server/percona-server-5.6.36.82.1.ebuild
new file mode 100644
index 00000000000..d80fa4c6880
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.36.82.1.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20161130-2354Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit linux-info python-any-r1 mysql-multilib-r1
+
+IUSE="numa pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )
+	server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
+
+pkg_pretend() {
+	mysql-multilib-r1_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
+}
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
+			-DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# 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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	local t
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
+				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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"
+
+	popd || die
+
+	# 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"
+
+	if [[ -n "$failures" ]]; then
+		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
+		die "Test failures: $failures"
+	fi
+
+	einfo "Tests successfully completed"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-09-04 12:32 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2017-09-04 12:32 UTC (permalink / raw
  To: gentoo-commits

commit:     3066716e5fdcbc4d386e94c29911429d600b68c3
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  4 12:32:32 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Sep  4 12:32:50 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3066716e

dev-db/percona-server: Bump to v5.6.37-82.2

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 dev-db/percona-server/Manifest                     |   2 +
 .../percona-server-5.6.37.82.2.ebuild              | 219 +++++++++++++++++++++
 2 files changed, 221 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 82d35d9c2d3..c99afcce2b3 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,5 @@
 DIST mysql-extras-20161130-2354Z.tar.bz2 303863 SHA256 b18ce4ccfd023106a802bcb2e17a5bc3a1ec4d99e7bf7f45d047cf18ebb9ad1b SHA512 6c24c581fd471c4ce0ff20ed68bdb32150e310a2f8f000c8bb9892ab98302127f3427165b17967da3f5663e1da5a7f1d26f84021d4cb8292cbb5e0c241505113 WHIRLPOOL de6d896474faedf1d3696e346877cb03fb9908338d66f2b901aa83a24983ec3e0ea5f7f54dfd190bdf7a55f72bb580e21ab826850018ae25629b572cbabf532d
+DIST mysql-extras-20170820-2245Z.tar.bz2 312101 SHA256 619afb88752e461434709ed91e91c2104845a9a9ee67ac944212833f4a715ed8 SHA512 34868c8ba3509ed5e3625c973e16f5015390ca9fc656cbcdbe8f5568bc7cab3708bb7c88b1af324ebb66f86433dfee71b90adf6451556fcfc12ad4e7d32256dd WHIRLPOOL f8e08f47bb0789c25dc096c76340b1ca9db8a264d89aca816e3b45e4dd984dc9dea90554c6c114179dc972026c703404aa8521b3c93fb882d7eadd1295635fb9
 DIST percona-server-5.6.36-82.0.tar.gz 56116691 SHA256 4304ac45de79053128fb78f13527f483ec9cf1c9592498deeacbbe541216fc9d SHA512 c5046f212a893de2ce80afbeed3648915842d862383faf3a354a47515920016ed98b91d4bd42b77ea422b28aa9a5cb691942b031099fc893833127080e5a38b0 WHIRLPOOL 2cfa29d9cd864f5ff828553a3659ff2818589201f983be45a984474a27c625e6868a77f4a751ba0a575a79793ddcf34337f7efa95cb09e0c290c9b9cdaa9b173
 DIST percona-server-5.6.36-82.1.tar.gz 56190395 SHA256 bebab31321e17682bc23f0f1e95211f002ba2a24c21d9a7ce9821cbe2a1ba4ba SHA512 b604772a65cdd94d832c69a2b7984e065bef1ce3b9305c1d35c0f37513b962067f9fcb47f43172a318e55648222b7c7bd6e86fb003314ef75da3696bd2a63a21 WHIRLPOOL 88307c416f066df5a55821d2b6fa4bde98acb4e23defc661cf01a52d635f6e25e132f37a27e5748d302ade80470803aab0afca2585221870b7208edfff6aa7b0
+DIST percona-server-5.6.37-82.2.tar.gz 56296960 SHA256 3cf04b64c8bf5b9cc1ea1a68c54ba77a4709d9c9051314e70a4cbd4c904da702 SHA512 38905c2429bee6e6ba9c35b232c87c27c414726b349ff5a878cc94bbc4a333bbf76019478f8e82a10274ffeea5ac71c4520ff534cc434c4844b496b48801ea4e WHIRLPOOL 9e3988072d00f60af467a21092cc737529bd9250ce4ebbfa20834455791a3fb093b11da8bb845bd62e3fa33ad37e63bfbda483139700bd4147e1b7be64578659

diff --git a/dev-db/percona-server/percona-server-5.6.37.82.2.ebuild b/dev-db/percona-server/percona-server-5.6.37.82.2.ebuild
new file mode 100644
index 00000000000..887e1891444
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.37.82.2.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20170820-2245Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit linux-info python-any-r1 mysql-multilib-r1
+
+IUSE="numa pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )
+	server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
+
+pkg_pretend() {
+	mysql-multilib-r1_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
+}
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
+			-DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# 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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	local t
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
+				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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"
+
+	popd || die
+
+	# 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"
+
+	if [[ -n "$failures" ]]; then
+		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
+		die "Test failures: $failures"
+	fi
+
+	einfo "Tests successfully completed"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-09-29 20:27 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2017-09-29 20:27 UTC (permalink / raw
  To: gentoo-commits

commit:     573bbb332ccc5a777f1f02b34c8a630e952d8bb5
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 29 20:27:26 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Sep 29 20:27:26 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=573bbb33

dev-db/percona-server: Drop security vulnerable versions (CPU JUL 2017)

Package-Manager: Portage-2.3.10, Repoman-2.3.3

 dev-db/percona-server/Manifest                     |   3 -
 .../percona-server-5.6.36.82.0.ebuild              | 219 ---------------------
 .../percona-server-5.6.36.82.1.ebuild              | 219 ---------------------
 3 files changed, 441 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index c99afcce2b3..45a56a5672e 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,5 +1,2 @@
-DIST mysql-extras-20161130-2354Z.tar.bz2 303863 SHA256 b18ce4ccfd023106a802bcb2e17a5bc3a1ec4d99e7bf7f45d047cf18ebb9ad1b SHA512 6c24c581fd471c4ce0ff20ed68bdb32150e310a2f8f000c8bb9892ab98302127f3427165b17967da3f5663e1da5a7f1d26f84021d4cb8292cbb5e0c241505113 WHIRLPOOL de6d896474faedf1d3696e346877cb03fb9908338d66f2b901aa83a24983ec3e0ea5f7f54dfd190bdf7a55f72bb580e21ab826850018ae25629b572cbabf532d
 DIST mysql-extras-20170820-2245Z.tar.bz2 312101 SHA256 619afb88752e461434709ed91e91c2104845a9a9ee67ac944212833f4a715ed8 SHA512 34868c8ba3509ed5e3625c973e16f5015390ca9fc656cbcdbe8f5568bc7cab3708bb7c88b1af324ebb66f86433dfee71b90adf6451556fcfc12ad4e7d32256dd WHIRLPOOL f8e08f47bb0789c25dc096c76340b1ca9db8a264d89aca816e3b45e4dd984dc9dea90554c6c114179dc972026c703404aa8521b3c93fb882d7eadd1295635fb9
-DIST percona-server-5.6.36-82.0.tar.gz 56116691 SHA256 4304ac45de79053128fb78f13527f483ec9cf1c9592498deeacbbe541216fc9d SHA512 c5046f212a893de2ce80afbeed3648915842d862383faf3a354a47515920016ed98b91d4bd42b77ea422b28aa9a5cb691942b031099fc893833127080e5a38b0 WHIRLPOOL 2cfa29d9cd864f5ff828553a3659ff2818589201f983be45a984474a27c625e6868a77f4a751ba0a575a79793ddcf34337f7efa95cb09e0c290c9b9cdaa9b173
-DIST percona-server-5.6.36-82.1.tar.gz 56190395 SHA256 bebab31321e17682bc23f0f1e95211f002ba2a24c21d9a7ce9821cbe2a1ba4ba SHA512 b604772a65cdd94d832c69a2b7984e065bef1ce3b9305c1d35c0f37513b962067f9fcb47f43172a318e55648222b7c7bd6e86fb003314ef75da3696bd2a63a21 WHIRLPOOL 88307c416f066df5a55821d2b6fa4bde98acb4e23defc661cf01a52d635f6e25e132f37a27e5748d302ade80470803aab0afca2585221870b7208edfff6aa7b0
 DIST percona-server-5.6.37-82.2.tar.gz 56296960 SHA256 3cf04b64c8bf5b9cc1ea1a68c54ba77a4709d9c9051314e70a4cbd4c904da702 SHA512 38905c2429bee6e6ba9c35b232c87c27c414726b349ff5a878cc94bbc4a333bbf76019478f8e82a10274ffeea5ac71c4520ff534cc434c4844b496b48801ea4e WHIRLPOOL 9e3988072d00f60af467a21092cc737529bd9250ce4ebbfa20834455791a3fb093b11da8bb845bd62e3fa33ad37e63bfbda483139700bd4147e1b7be64578659

diff --git a/dev-db/percona-server/percona-server-5.6.36.82.0.ebuild b/dev-db/percona-server/percona-server-5.6.36.82.0.ebuild
deleted file mode 100644
index d80fa4c6880..00000000000
--- a/dev-db/percona-server/percona-server-5.6.36.82.0.ebuild
+++ /dev/null
@@ -1,219 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20161130-2354Z"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit linux-info python-any-r1 mysql-multilib-r1
-
-IUSE="numa pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="numa? ( sys-process/numactl:= )
-	server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
-
-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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
-
-pkg_pretend() {
-	mysql-multilib-r1_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
-}
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-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() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
-			-DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# 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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	local t
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
-				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	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}" || die
-
-	# Set file limits higher so tests run
-	ulimit -n 3000
-	python_setup
-	# 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"
-
-	popd || die
-
-	# 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"
-
-	if [[ -n "$failures" ]]; then
-		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
-		die "Test failures: $failures"
-	fi
-
-	einfo "Tests successfully completed"
-}

diff --git a/dev-db/percona-server/percona-server-5.6.36.82.1.ebuild b/dev-db/percona-server/percona-server-5.6.36.82.1.ebuild
deleted file mode 100644
index d80fa4c6880..00000000000
--- a/dev-db/percona-server/percona-server-5.6.36.82.1.ebuild
+++ /dev/null
@@ -1,219 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20161130-2354Z"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit linux-info python-any-r1 mysql-multilib-r1
-
-IUSE="numa pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="numa? ( sys-process/numactl:= )
-	server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
-
-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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
-
-pkg_pretend() {
-	mysql-multilib-r1_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
-}
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-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() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
-			-DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# 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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	local t
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
-				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	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}" || die
-
-	# Set file limits higher so tests run
-	ulimit -n 3000
-	python_setup
-	# 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"
-
-	popd || die
-
-	# 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"
-
-	if [[ -n "$failures" ]]; then
-		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
-		die "Test failures: $failures"
-	fi
-
-	einfo "Tests successfully completed"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-10-28 18:11 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2017-10-28 18:11 UTC (permalink / raw
  To: gentoo-commits

commit:     6872e94fe014502e591a9a6dbe59b24e35ee0ccf
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 28 18:02:39 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Oct 28 18:10:48 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6872e94f

dev-db/percona-server: Security cleanup (bug #635702)

Package-Manager: Portage-2.3.13, Repoman-2.3.4

 .../percona-server-5.6.37.82.2.ebuild              | 219 ---------------------
 1 file changed, 219 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.6.37.82.2.ebuild b/dev-db/percona-server/percona-server-5.6.37.82.2.ebuild
deleted file mode 100644
index 887e1891444..00000000000
--- a/dev-db/percona-server/percona-server-5.6.37.82.2.ebuild
+++ /dev/null
@@ -1,219 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20170820-2245Z"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-inherit linux-info python-any-r1 mysql-multilib-r1
-
-IUSE="numa pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
-HOMEPAGE="http://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="numa? ( sys-process/numactl:= )
-	server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
-
-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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
-
-pkg_pretend() {
-	mysql-multilib-r1_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
-}
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-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() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
-			-DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# 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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	local t
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
-				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	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}" || die
-
-	# Set file limits higher so tests run
-	ulimit -n 3000
-	python_setup
-	# 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"
-
-	popd || die
-
-	# 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"
-
-	if [[ -n "$failures" ]]; then
-		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
-		die "Test failures: $failures"
-	fi
-
-	einfo "Tests successfully completed"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-10-28 18:11 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2017-10-28 18:11 UTC (permalink / raw
  To: gentoo-commits

commit:     cf74863f8b3c68b028ed8ae8f33e920573c905d8
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 28 18:02:07 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Oct 28 18:10:46 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf74863f

dev-db/percona-server: Rev bump to fix CVE-2017-15945

Bug: https://bugs.gentoo.org/635702
Package-Manager: Portage-2.3.13, Repoman-2.3.4

 .../percona-server-5.6.37.82.2-r1.ebuild           | 219 +++++++++++++++++++++
 1 file changed, 219 insertions(+)

diff --git a/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild b/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild
new file mode 100644
index 00000000000..887e1891444
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20170820-2245Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+inherit linux-info python-any-r1 mysql-multilib-r1
+
+IUSE="numa pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="http://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )
+	server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
+
+pkg_pretend() {
+	mysql-multilib-r1_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
+}
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
+			-DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# 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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	local t
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
+				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	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}" || die
+
+	# Set file limits higher so tests run
+	ulimit -n 3000
+	python_setup
+	# 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"
+
+	popd || die
+
+	# 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"
+
+	if [[ -n "$failures" ]]; then
+		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
+		die "Test failures: $failures"
+	fi
+
+	einfo "Tests successfully completed"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-11-21 16:30 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2017-11-21 16:30 UTC (permalink / raw
  To: gentoo-commits

commit:     190b8440424d0684880808bb8d6587078a7357ef
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 21 16:29:39 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Nov 21 16:29:55 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=190b8440

dev-db/percona-server: Fix building on gcc 7

Backport of commit c6a3a38050e112302534fa1392dc5649ca3d4f36.

Package-Manager: Portage-2.3.13, Repoman-2.3.4

 dev-db/percona-server/Manifest                             | 2 +-
 dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 45a56a5672e..682f7180254 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,2 +1,2 @@
-DIST mysql-extras-20170820-2245Z.tar.bz2 312101 SHA256 619afb88752e461434709ed91e91c2104845a9a9ee67ac944212833f4a715ed8 SHA512 34868c8ba3509ed5e3625c973e16f5015390ca9fc656cbcdbe8f5568bc7cab3708bb7c88b1af324ebb66f86433dfee71b90adf6451556fcfc12ad4e7d32256dd WHIRLPOOL f8e08f47bb0789c25dc096c76340b1ca9db8a264d89aca816e3b45e4dd984dc9dea90554c6c114179dc972026c703404aa8521b3c93fb882d7eadd1295635fb9
+DIST mysql-extras-20171121-1518Z.tar.bz2 313539 SHA256 1afb0cd5cd7eb71b0cfa34d6f0b970ab3e00f8a3ab08a6a09a8fb829c4121f01 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda WHIRLPOOL 67b7d6b4239b43f906477624137946c015f7d1430e309874858d40c8c55dfb633ad1f116b7bb08057c924c5a92a66a296016273ae984ba13d6c5d89ae1e054fc
 DIST percona-server-5.6.37-82.2.tar.gz 56296960 SHA256 3cf04b64c8bf5b9cc1ea1a68c54ba77a4709d9c9051314e70a4cbd4c904da702 SHA512 38905c2429bee6e6ba9c35b232c87c27c414726b349ff5a878cc94bbc4a333bbf76019478f8e82a10274ffeea5ac71c4520ff534cc434c4844b496b48801ea4e WHIRLPOOL 9e3988072d00f60af467a21092cc737529bd9250ce4ebbfa20834455791a3fb093b11da8bb845bd62e3fa33ad37e63bfbda483139700bd4147e1b7be64578659

diff --git a/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild b/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild
index 887e1891444..bb675e54533 100644
--- a/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20170820-2245Z"
+MY_EXTRAS_VER="20171121-1518Z"
 SUBSLOT="18"
 PYTHON_COMPAT=( python2_7 )
 inherit linux-info python-any-r1 mysql-multilib-r1
@@ -41,6 +41,7 @@ PATCHES=(
 	"${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_percona-server-5.6.25-without-clientlibs-tools.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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-12-05 11:51 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2017-12-05 11:51 UTC (permalink / raw
  To: gentoo-commits

commit:     c2259917e6bd535ae3d17cfdbbba2506ea83327c
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  5 11:51:33 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Dec  5 11:51:53 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2259917

dev-db/percona-server: Add test depedency on dev-perl/JSON atom; Raise ulimits for test suite

dev-perl/JSON is used by main.myisam_explain_json_non_select_all, main.myisam_explain_json_non_select_none,
main.innodb_explain_js, on_non_select_all and main.innodb_explain_json_non_select_none test.

Ulimits raised to allow to expand test coverage to include parts.partition_* tests. Also, per
default, some tests are expecting at least 4162 max_open_files or will show a warning.

Package-Manager: Portage-2.3.16, Repoman-2.3.6

 dev-db/percona-server/Manifest                             | 4 ++--
 dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild | 8 ++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 682f7180254..642b6283827 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,2 +1,2 @@
-DIST mysql-extras-20171121-1518Z.tar.bz2 313539 SHA256 1afb0cd5cd7eb71b0cfa34d6f0b970ab3e00f8a3ab08a6a09a8fb829c4121f01 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda WHIRLPOOL 67b7d6b4239b43f906477624137946c015f7d1430e309874858d40c8c55dfb633ad1f116b7bb08057c924c5a92a66a296016273ae984ba13d6c5d89ae1e054fc
-DIST percona-server-5.6.37-82.2.tar.gz 56296960 SHA256 3cf04b64c8bf5b9cc1ea1a68c54ba77a4709d9c9051314e70a4cbd4c904da702 SHA512 38905c2429bee6e6ba9c35b232c87c27c414726b349ff5a878cc94bbc4a333bbf76019478f8e82a10274ffeea5ac71c4520ff534cc434c4844b496b48801ea4e WHIRLPOOL 9e3988072d00f60af467a21092cc737529bd9250ce4ebbfa20834455791a3fb093b11da8bb845bd62e3fa33ad37e63bfbda483139700bd4147e1b7be64578659
+DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
+DIST percona-server-5.6.37-82.2.tar.gz 56296960 BLAKE2B 70d0c40c96be3c3f674466d2406b5622a7a37cc59d9daee7f0315ce6dd2ce13751f48d440646a0f377ca86aecd6bc749d050ab4f58bfa7400bcd35167ab8d480 SHA512 38905c2429bee6e6ba9c35b232c87c27c414726b349ff5a878cc94bbc4a333bbf76019478f8e82a10274ffeea5ac71c4520ff534cc434c4844b496b48801ea4e

diff --git a/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild b/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild
index bb675e54533..5f0ae209006 100644
--- a/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild
@@ -25,7 +25,10 @@ COMMON_DEPEND="numa? ( sys-process/numactl:= )
 
 DEPEND="${COMMON_DEPEND}
 	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
+	test? (
+		$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
+		dev-perl/JSON
+	)"
 RDEPEND="${COMMON_DEPEND}"
 
 REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
@@ -193,7 +196,8 @@ multilib_src_test() {
 	pushd "${TESTDIR}" || die
 
 	# Set file limits higher so tests run
-	ulimit -n 3000
+	# Upper limit comes from parts.partition_* tests
+	ulimit -n 16500
 	python_setup
 	# run mysql-test tests
 	perl mysql-test-run.pl --force --vardir="${T}/var-tests" \


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-12-05 15:43 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2017-12-05 15:43 UTC (permalink / raw
  To: gentoo-commits

commit:     15794394956f3ada8ea91b75fd52c3769f8c0b1d
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  5 15:42:53 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Dec  5 15:43:25 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15794394

dev-db/percona-server: Rev bump to block package for >gcc-6

Bug: https://bugs.gentoo.org/639936
Package-Manager: Portage-2.3.16, Repoman-2.3.6

 ...ebuild => percona-server-5.6.37.82.2-r2.ebuild} | 33 ++++++++++++++++++++--
 1 file changed, 30 insertions(+), 3 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild b/dev-db/percona-server/percona-server-5.6.37.82.2-r2.ebuild
similarity index 84%
rename from dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild
rename to dev-db/percona-server/percona-server-5.6.37.82.2-r2.ebuild
index 5f0ae209006..1381d7da22c 100644
--- a/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.37.82.2-r2.ebuild
@@ -5,7 +5,7 @@ EAPI="6"
 MY_EXTRAS_VER="20171121-1518Z"
 SUBSLOT="18"
 PYTHON_COMPAT=( python2_7 )
-inherit linux-info python-any-r1 mysql-multilib-r1
+inherit linux-info python-any-r1 mysql-multilib-r1 toolchain-funcs
 
 IUSE="numa pam tokudb tokudb-backup-plugin"
 
@@ -54,6 +54,15 @@ PATCHES=(
 pkg_pretend() {
 	mysql-multilib-r1_pkg_pretend
 
+	if [[ ${MERGE_TYPE} != binary && tc-is-gcc ]]; then
+		if [[ $(gcc-major-version) -gt 6 ]]; then
+			# https://bugs.gentoo.org/639936
+			eerror "${P} is incompatible with >gcc-6.x."
+			eerror "Please use gcc-config or package.env file to switch to <gcc-7.x for this package."
+			die
+		fi
+	fi
+
 	if use numa; then
 		local CONFIG_CHECK="~NUMA"
 
@@ -196,8 +205,26 @@ multilib_src_test() {
 	pushd "${TESTDIR}" || die
 
 	# Set file limits higher so tests run
-	# Upper limit comes from parts.partition_* tests
-	ulimit -n 16500
+	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
+
 	python_setup
 	# run mysql-test tests
 	perl mysql-test-run.pl --force --vardir="${T}/var-tests" \


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-12-06  2:33 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2017-12-06  2:33 UTC (permalink / raw
  To: gentoo-commits

commit:     2a505a42c79f885f830f2eeefeb926589a524559
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  6 02:32:14 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Dec  6 02:33:09 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a505a42

dev-db/percona-server: Restrict to emake as ninja fails

Package-Manager: Portage-2.3.16, Repoman-2.3.6

 dev-db/percona-server/percona-server-5.6.37.82.2-r2.ebuild | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dev-db/percona-server/percona-server-5.6.37.82.2-r2.ebuild b/dev-db/percona-server/percona-server-5.6.37.82.2-r2.ebuild
index 1381d7da22c..e56e97809f8 100644
--- a/dev-db/percona-server/percona-server-5.6.37.82.2-r2.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.37.82.2-r2.ebuild
@@ -5,6 +5,8 @@ EAPI="6"
 MY_EXTRAS_VER="20171121-1518Z"
 SUBSLOT="18"
 PYTHON_COMPAT=( python2_7 )
+# Build fails with ninja
+CMAKE_MAKEFILE_GENERATOR="emake"
 inherit linux-info python-any-r1 mysql-multilib-r1 toolchain-funcs
 
 IUSE="numa pam tokudb tokudb-backup-plugin"


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2017-12-18 16:50 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2017-12-18 16:50 UTC (permalink / raw
  To: gentoo-commits

commit:     4c165124a170ea0c650cd7907e3d4496d7b7c220
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 18 16:50:20 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Dec 18 16:50:37 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c165124

dev-db/percona-server: Bump to v5.6.38-83.0

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 dev-db/percona-server/Manifest                     |   1 +
 .../percona-server-5.6.38.83.0.ebuild              | 243 +++++++++++++++++++++
 2 files changed, 244 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 642b6283827..2fffc30a44e 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,2 +1,3 @@
 DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
 DIST percona-server-5.6.37-82.2.tar.gz 56296960 BLAKE2B 70d0c40c96be3c3f674466d2406b5622a7a37cc59d9daee7f0315ce6dd2ce13751f48d440646a0f377ca86aecd6bc749d050ab4f58bfa7400bcd35167ab8d480 SHA512 38905c2429bee6e6ba9c35b232c87c27c414726b349ff5a878cc94bbc4a333bbf76019478f8e82a10274ffeea5ac71c4520ff534cc434c4844b496b48801ea4e
+DIST percona-server-5.6.38-83.0.tar.gz 56390422 BLAKE2B 2c5ae8c021c95da210402b79314698b7286ca7791c35f059260537b19660e33bd6a06701f24f121b7b051faab38b41b037ea3d1305d281abaadd07c3c432a13d SHA512 25b3dbee188e0608f3783acdf70eb3ded276ff25dae3ee879a70e3eefc8df5ac15e3b5fbe310537f84ccde9434de51ac5927322de13f6b89e0530ebbd7d36f6d

diff --git a/dev-db/percona-server/percona-server-5.6.38.83.0.ebuild b/dev-db/percona-server/percona-server-5.6.38.83.0.ebuild
new file mode 100644
index 00000000000..ebb378805f4
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.38.83.0.ebuild
@@ -0,0 +1,243 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20171121-1518Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+# Build fails with ninja
+CMAKE_MAKEFILE_GENERATOR="emake"
+inherit linux-info python-any-r1 mysql-multilib-r1 toolchain-funcs
+
+IUSE="numa pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+HOMEPAGE="https://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )
+	server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? (
+		$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
+		dev-perl/JSON
+	)"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
+
+pkg_pretend() {
+	mysql-multilib-r1_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
+}
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
+			-DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# 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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	local t
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
+				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	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}" || die
+
+	# Set file limits higher so tests run
+	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
+
+	python_setup
+	# 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"
+
+	popd || die
+
+	# 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"
+
+	if [[ -n "$failures" ]]; then
+		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
+		die "Test failures: $failures"
+	fi
+
+	einfo "Tests successfully completed"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-02-12 23:32 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-02-12 23:32 UTC (permalink / raw
  To: gentoo-commits

commit:     cea369ecd717946c63ad0e359aecd148b526b75b
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 12 23:30:13 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Feb 12 23:32:28 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cea369ec

dev-db/percona-server: Bump to v5.6.39-83.1

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-db/percona-server/Manifest                     |   1 +
 .../percona-server-5.6.39.83.1.ebuild              | 243 +++++++++++++++++++++
 2 files changed, 244 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 2fffc30a44e..807a4cd5c18 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,4 @@
 DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
 DIST percona-server-5.6.37-82.2.tar.gz 56296960 BLAKE2B 70d0c40c96be3c3f674466d2406b5622a7a37cc59d9daee7f0315ce6dd2ce13751f48d440646a0f377ca86aecd6bc749d050ab4f58bfa7400bcd35167ab8d480 SHA512 38905c2429bee6e6ba9c35b232c87c27c414726b349ff5a878cc94bbc4a333bbf76019478f8e82a10274ffeea5ac71c4520ff534cc434c4844b496b48801ea4e
 DIST percona-server-5.6.38-83.0.tar.gz 56390422 BLAKE2B 2c5ae8c021c95da210402b79314698b7286ca7791c35f059260537b19660e33bd6a06701f24f121b7b051faab38b41b037ea3d1305d281abaadd07c3c432a13d SHA512 25b3dbee188e0608f3783acdf70eb3ded276ff25dae3ee879a70e3eefc8df5ac15e3b5fbe310537f84ccde9434de51ac5927322de13f6b89e0530ebbd7d36f6d
+DIST percona-server-5.6.39-83.1.tar.gz 56307662 BLAKE2B 474e497a83e7a8f7bf628b2622a0bfeead0f5003ed87dd4228e85a8b1c75bfdfc40f75604e9ed621f6d143d69bcada29163bf140b765951cf0b23e5660623e52 SHA512 d014bc0ebf8d8f1842b4a79eb0a868e3c9e0e33d3eb3cbf301b5504dcb341e1f2a0d6c2c4003666f59fbf75eb274356ee6b059ff2cddf2b457143ee5e1aba471

diff --git a/dev-db/percona-server/percona-server-5.6.39.83.1.ebuild b/dev-db/percona-server/percona-server-5.6.39.83.1.ebuild
new file mode 100644
index 00000000000..2e7499a7dc6
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.39.83.1.ebuild
@@ -0,0 +1,243 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20171121-1518Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+# Build fails with ninja
+CMAKE_MAKEFILE_GENERATOR="emake"
+inherit linux-info python-any-r1 mysql-multilib-r1 toolchain-funcs
+
+IUSE="numa pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-linux"
+HOMEPAGE="https://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )
+	server? ( pam? ( virtual/pam:0= ) )
+	tokudb? ( app-arch/snappy )
+	tokudb-backup-plugin? ( dev-util/valgrind )
+	"
+
+DEPEND="${COMMON_DEPEND}
+	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+	test? (
+		$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
+		dev-perl/JSON
+	)"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
+
+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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
+
+pkg_pretend() {
+	mysql-multilib-r1_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
+}
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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() {
+	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
+			-DWITH_PAM=$(usex pam)
+			$(mysql-cmake_use_plugin tokudb TOKUDB)
+	)
+	if use tokudb ; then
+		# TokuDB Backup plugin requires valgrind unconditionally
+		MYSQL_CMAKE_NATIVE_DEFINES+=(
+			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+		)
+	fi
+	mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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
+
+	if ! use server ; then
+		einfo "Skipping server tests due to minimal build."
+		return 0
+	fi
+
+	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
+		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+	fi
+
+	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+	# 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}
+
+	# These are failing in Percona 5.6 for now and are believed to be
+	# false positives:
+	#
+	# main.information_schema, binlog.binlog_statement_insert_delayed,
+	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+	# fails due to USE=-latin1 / utf8 default
+	#
+	# main.mysql_client_test:
+	# segfaults at random under Portage only, suspect resource limits.
+	#
+	# main.percona_bug1289599
+	# Looks to be a syntax error in the test file itself
+	#
+	# main.variables main.myisam main.merge_recover
+	# fails due to ulimit not able to open enough files (needs 5000)
+	#
+	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+	# Called with bad parameters should be reported upstream
+	#
+
+	local t
+
+	for t in main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
+				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	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}" || die
+
+	# Set file limits higher so tests run
+	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
+
+	python_setup
+	# 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"
+
+	popd || die
+
+	# 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"
+
+	if [[ -n "$failures" ]]; then
+		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
+		die "Test failures: $failures"
+	fi
+
+	einfo "Tests successfully completed"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-07-21  0:09 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2018-07-21  0:09 UTC (permalink / raw
  To: gentoo-commits

commit:     7ea4d846284b35ccb938553c248ffa91f7dbca23
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 20 22:40:03 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sat Jul 21 00:09:02 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ea4d846

dev-db/percona-server: Version bump with client-libs USE

Package-Manager: Portage-2.3.42, Repoman-2.3.9

 dev-db/percona-server/Manifest                     |   2 +
 dev-db/percona-server/metadata.xml                 |   4 +-
 .../percona-server-5.6.40.84.0.ebuild              | 944 +++++++++++++++++++++
 3 files changed, 949 insertions(+), 1 deletion(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 13b910881d3..e8c4a3e7e94 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,2 +1,4 @@
 DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
+DIST mysql-extras-20180628-0201Z.tar.bz2 322141 BLAKE2B fce35cfea4ffa9860908fcdf440cd0d714c402c42ee2afb22cec9e727971c216310c7db561ca1b37deebb2cea5137fe24f19b491ad500949e3170ccec3de0b13 SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a
 DIST percona-server-5.6.39-83.1.tar.gz 56307662 BLAKE2B 474e497a83e7a8f7bf628b2622a0bfeead0f5003ed87dd4228e85a8b1c75bfdfc40f75604e9ed621f6d143d69bcada29163bf140b765951cf0b23e5660623e52 SHA512 d014bc0ebf8d8f1842b4a79eb0a868e3c9e0e33d3eb3cbf301b5504dcb341e1f2a0d6c2c4003666f59fbf75eb274356ee6b059ff2cddf2b457143ee5e1aba471
+DIST percona-server-5.6.40-84.0.tar.gz 52684007 BLAKE2B 11658be2319880f7e8815c7b620b7d460dd7a559316ca96905573b0fa2d7180b084ed425f76f6d850f06862e424b5a8d6ced8356f9075826b77e89e86095eb40 SHA512 b1075933bdf1afb726acd799e834cb45a1d2a15d3f37f313da71f8da03a7b9480d7ccfb4cb6a820fb6ccf58851d8c9473bce975203cd6bc007a2b74b36a1127f

diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
index 0754114167f..7f9daa6409f 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/metadata.xml
@@ -6,6 +6,7 @@
     <name>MySQL</name>
   </maintainer>
 <use>
+  <flag name="client-libs">Build the libmysqlclient libraries</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>
@@ -14,9 +15,10 @@
   <flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
   <flag name="openssl">Enable SSL connections and crypto functions using <pkg>dev-libs/openssl</pkg></flag>
   <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
+  <flag name="rocksdb">Add support for RocksDB; a key/value, LSM database optimized for flash storage</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>
+  <flag name="test-suite">Install upstream testsuites for end use.</flag>
   <flag name="tokudb">Add support for TokuDB storage engine</flag>
   <flag name="tokudb-backup-plugin">Builds the TokuDB backup plugin</flag>
   <flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag>

diff --git a/dev-db/percona-server/percona-server-5.6.40.84.0.ebuild b/dev-db/percona-server/percona-server-5.6.40.84.0.ebuild
new file mode 100644
index 00000000000..4dc1de94493
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.40.84.0.ebuild
@@ -0,0 +1,944 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180628-0201Z"
+PYTHON_COMPAT=( python2_7 )
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit linux-info python-any-r1 eutils flag-o-matic prefix toolchain-funcs \
+	versionator user cmake-utils multilib-minimal
+
+MY_PV=$(replace_version_separator 3 '-')
+MY_PN="Percona-Server"
+MY_MAJOR_PV=$(get_version_component_range 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/5.6/release-notes/release-notes_index.html"
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${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
+		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.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="-client-libs cracklib debug jemalloc latin1 libressl numa pam +perl profiling rocksdb selinux
+	+server static static-libs systemtap tcmalloc test test-suite tokudb tokudb-backup-plugin yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc ) ?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.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_percona-server-5.6.39-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=
+	)
+	>=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? (
+		>=dev-libs/boost-1.65.0:=
+		numa? ( sys-process/numactl )
+		pam? ( virtual/pam:0= )
+		tokudb? ( app-arch/snappy )
+		tokudb-backup-plugin? ( dev-util/valgrind )
+	)
+	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+	static? ( sys-libs/ncurses[static-libs] )
+	test? (
+		$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
+		dev-perl/JSON
+	)
+	${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 ) )
+	${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 )"
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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)
+		if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} with tokudb 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
+		# 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"
+}
+
+src_unpack() {
+	unpack ${A}
+
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${PN}-${MY_PV}" "${S}" || die
+}
+
+src_prepare() {
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	elif use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Don't build bundled xz-utils
+	if [[ -d "${S}/storage/tokudb/ft-index" ]] ; then
+		echo > "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die
+		sed -i 's/ build_lzma//' "${S}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die
+	elif [[ -d "${S}/storage/tokudb/PerconaFT" ]] ; then
+		echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+		sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+		sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+	fi
+
+	if [[ -d "${S}/plugin/tokudb-backup-plugin" ]] && ! use tokudb-backup-plugin ; then
+		 rm -r "${S}/plugin/tokudb-backup-plugin/Percona-TokuBackup" || 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
+
+	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_SQLBENCHDIR=NO
+		-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
+	)
+	if use test || use test-suite ; 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_PAM=$(usex pam)
+			-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_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			$(usex tokudb '' -DWITHOUT_TOKUDB=1)
+		)
+
+		if use tokudb ; then
+			# TokuDB Backup plugin requires valgrind unconditionally
+			mycmakeargs+=(
+				$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+			)
+		fi
+
+	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:
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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"
+
+	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 "Failed to create \"${T}/var-tests{,/log}\""
+
+	# Run mysql tests
+	pushd "${TESTDIR}" > /dev/null || die "Failed to chdir into \"${TESTDIR}\""
+
+	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 main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; 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_buffer_pool_populate_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	# Set file limits higher so tests run
+	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
+
+	python_setup
+	# run mysql-test tests
+	perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+		--testcase-timeout=30 --reorder --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"
+
+	if [[ -n "$failures" ]] ; then
+		if has usersandbox ${FEATURES}; then
+			ewarn "Some tests may have failed due to FEATURES=usersandbox"
+			ewarn "Please confirm test failure with FEATURES=-usersandbox before reporting a bug."
+		fi
+
+		die "Test failures: $failures"
+	fi
+
+	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-suite ; then
+		rm -rf "${D%/}/${MY_SHAREDSTATEDIR#/}/mysql-test" || die
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	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"
+		for script in \
+			"${S}"/support-files/my-*.cnf.sh \
+			"${S}"/support-files/magic \
+			"${S}"/support-files/ndb-config-2-node.ini.sh
+		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"
+}
+
+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 "${EROOT%/}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${EROOT%/}${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
+			local _replacing_version=
+			for _replacing_version in ${REPLACING_VERSIONS}; do
+				local _new_version_branch=$(get_version_component_range 1-3 "${PV}")
+				local _replacing_version_branch=$(get_version_component_range 1-3 "${_replacing_version}")
+				debug-print "Updating an existing installation (v${_replacing_version}; branch '${_replacing_version_branch}') ..."
+
+				if ! version_is_at_least "${_new_version_branch}" "${_replacing_version_branch}"; then
+					debug-print "Upgrading from v${_replacing_version_branch} to v${_new_version_branch} ..."
+					# https://www.percona.com/blog/2014/09/19/mysql-upgrade-best-practices/
+
+					einfo
+					elog "You are upgrading an existing ${PN} installation, you should review"
+					elog "release notes at ${MY_RELEASE_NOTES_URI}"
+					elog "and run the mysql_upgrade tool."
+					einfo
+
+					// Break loop - we only want to show this hint once
+					break
+				fi
+			done
+		fi
+
+		elog "Since ${PN}-5.6.39.83.1-r1 we no longer provide client libs."
+		elog "Applications depending on client libs should migrate to virtual/libmysqlclient"
+		elog "which will pull-in dev-db/mysql-connector-c as their new client lib provider."
+		einfo
+	fi
+}
+
+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"
+	}
+
+	# 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"
+
+	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="${EROOT%/}/${MY_DATADIR#/}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${EROOT%/}/${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
+
+	# These are dir+prefix
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	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%/}/${MY_DATADIR#/}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${EROOT%/}/${MY_DATADIR#/}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	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
+
+	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
+
+	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 "${EROOT%/}/${MY_DATADIR#/}" ]] ; then
+		install -d -m 750 -o mysql -g mysql "${EROOT%/}/${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=${EROOT%/}/usr" ${options} "--datadir=${EROOT%/}/${MY_DATADIR#/}" "--tmpdir=${EROOT%/}/${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 ${EROOT%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${EROOT%/}/${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=${EROOT%/}/${MY_DATADIR#/} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile}
+		--tmpdir=${EROOT%/}/${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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-07-21 13:11 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2018-07-21 13:11 UTC (permalink / raw
  To: gentoo-commits

commit:     2f9bf6dc3151d2844259ea264f89283195348eb7
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 21 13:11:01 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sat Jul 21 13:11:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f9bf6dc

dev-db/percona-server: Fix package blocking itself

This was copied and modified from another, similar ebuild
However this piece was missed.

Package-Manager: Portage-2.3.42, Repoman-2.3.9

 dev-db/percona-server/percona-server-5.6.40.84.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/percona-server/percona-server-5.6.40.84.0.ebuild b/dev-db/percona-server/percona-server-5.6.40.84.0.ebuild
index 4dc1de94493..c56c135cbbb 100644
--- a/dev-db/percona-server/percona-server-5.6.40.84.0.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.40.84.0.ebuild
@@ -110,7 +110,7 @@ DEPEND="virtual/yacc
 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
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !dev-db/mysql-cluster
 	server? ( !prefix? ( dev-db/mysql-init-scripts ) )
 	${COMMON_DEPEND}
 "


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-08-20  0:26 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-08-20  0:26 UTC (permalink / raw
  To: gentoo-commits

commit:     27b219651ca6b287f65bbd0d94c9952ff6f7e0b9
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 20 00:26:06 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Aug 20 00:26:27 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27b21965

dev-db/percona-server: bump to v5.6.41-84.1

Package-Manager: Portage-2.3.47, Repoman-2.3.10

 dev-db/percona-server/Manifest                     |   1 +
 .../percona-server-5.6.41.84.1.ebuild              | 954 +++++++++++++++++++++
 2 files changed, 955 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index e8c4a3e7e94..7a72bb867ed 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -2,3 +2,4 @@ DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda2093
 DIST mysql-extras-20180628-0201Z.tar.bz2 322141 BLAKE2B fce35cfea4ffa9860908fcdf440cd0d714c402c42ee2afb22cec9e727971c216310c7db561ca1b37deebb2cea5137fe24f19b491ad500949e3170ccec3de0b13 SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a
 DIST percona-server-5.6.39-83.1.tar.gz 56307662 BLAKE2B 474e497a83e7a8f7bf628b2622a0bfeead0f5003ed87dd4228e85a8b1c75bfdfc40f75604e9ed621f6d143d69bcada29163bf140b765951cf0b23e5660623e52 SHA512 d014bc0ebf8d8f1842b4a79eb0a868e3c9e0e33d3eb3cbf301b5504dcb341e1f2a0d6c2c4003666f59fbf75eb274356ee6b059ff2cddf2b457143ee5e1aba471
 DIST percona-server-5.6.40-84.0.tar.gz 52684007 BLAKE2B 11658be2319880f7e8815c7b620b7d460dd7a559316ca96905573b0fa2d7180b084ed425f76f6d850f06862e424b5a8d6ced8356f9075826b77e89e86095eb40 SHA512 b1075933bdf1afb726acd799e834cb45a1d2a15d3f37f313da71f8da03a7b9480d7ccfb4cb6a820fb6ccf58851d8c9473bce975203cd6bc007a2b74b36a1127f
+DIST percona-server-5.6.41-84.1.tar.gz 52736448 BLAKE2B 1ec5e17f08274caa3882f829f25bbf74a3b37d2ba208f62376106f0d89e5470f461f7852e365d5da9503d5500702e28f08461e5aa0c5ae6b1a30a0e98dbb426b SHA512 60783154f9ab097083a484c34e584b396eeba4aa53dc8616c467ca9c85cc626be08e3165740703453cc4fb35f3af94ac34260f1e2bb133d60f832661251cbb3c

diff --git a/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild b/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild
new file mode 100644
index 00000000000..746ff1dba26
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild
@@ -0,0 +1,954 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180628-0201Z"
+PYTHON_COMPAT=( python2_7 )
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit linux-info python-any-r1 eutils flag-o-matic prefix toolchain-funcs \
+	versionator user cmake-utils multilib-minimal
+
+MY_PV=$(replace_version_separator 3 '-')
+MY_PN="Percona-Server"
+MY_MAJOR_PV=$(get_version_component_range 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/5.6/release-notes/release-notes_index.html"
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${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
+		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.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="-client-libs cracklib debug jemalloc latin1 libressl numa pam +perl profiling rocksdb selinux
+	+server static static-libs systemtap tcmalloc test test-suite tokudb tokudb-backup-plugin yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc ) ?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.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_percona-server-5.6.39-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=
+	)
+	>=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? (
+		>=dev-libs/boost-1.65.0:=
+		numa? ( sys-process/numactl )
+		pam? ( virtual/pam:0= )
+		tokudb? ( app-arch/snappy )
+		tokudb-backup-plugin? ( dev-util/valgrind )
+	)
+	!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+	static? ( sys-libs/ncurses[static-libs] )
+	test? (
+		$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
+		dev-perl/JSON
+	)
+	${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/mysql !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 )"
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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)
+
+		if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
+			${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+			eerror "${PN} with tokudb 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 "Unsupported GCC version"
+		fi
+
+		# 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 "Unsupported GCC version"
+		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."
+			die "FEATURES=test with FEATURES=-userpriv is not supported"
+	fi
+
+	if has test ${FEATURES} && ! use test ; then
+		eerror "FEATURES=test requires USE=test."
+		die "FEATURES=test set but not USE=test"
+	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"
+
+	use test && python-any-r1_pkg_setup
+}
+
+src_unpack() {
+	unpack ${A}
+
+	# Grab the patches
+	[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+	mv -f "${WORKDIR}/${PN}-${MY_PV}" "${S}" || die
+}
+
+src_prepare() {
+	if use jemalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	elif use tcmalloc ; then
+		echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+	fi
+
+	# Don't build bundled xz-utils
+	if [[ -d "${S}/storage/tokudb/ft-index" ]] ; then
+		echo > "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die
+		sed -i 's/ build_lzma//' "${S}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die
+	elif [[ -d "${S}/storage/tokudb/PerconaFT" ]] ; then
+		echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+		sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+		sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+	fi
+
+	if [[ -d "${S}/plugin/tokudb-backup-plugin" ]] && ! use tokudb-backup-plugin ; then
+		 rm -r "${S}/plugin/tokudb-backup-plugin/Percona-TokuBackup" || 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
+
+	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_SQLBENCHDIR=NO
+		-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
+	)
+	if use test || use test-suite ; 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_PAM=$(usex pam)
+			-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_FEDERATED_STORAGE_ENGINE=1
+			-DWITH_INNODB_MEMCACHED=0
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			$(usex tokudb '' -DWITHOUT_TOKUDB=1)
+		)
+
+		if use tokudb ; then
+			# TokuDB Backup plugin requires valgrind unconditionally
+			mycmakeargs+=(
+				$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+			)
+		fi
+
+	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:
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-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"
+
+	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 "Failed to create \"${T}/var-tests{,/log}\""
+
+	# Run mysql tests
+	pushd "${TESTDIR}" > /dev/null || die "Failed to chdir into \"${TESTDIR}\""
+
+	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 main.mysql_client_test \
+		binlog.binlog_statement_insert_delayed main.information_schema \
+		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+		main.variables main.myisam main.merge_recover \
+		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; 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_buffer_pool_populate_basic ; do
+				_disable_test "$t" "Test $t requires system with NUMA support"
+			done
+		fi
+	fi
+
+	# Set file limits higher so tests run
+	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" \
+		--testcase-timeout=30 --reorder --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"
+
+	if [[ -n "$failures" ]] ; then
+		if has usersandbox ${FEATURES}; then
+			ewarn "Some tests may have failed due to FEATURES=usersandbox"
+			ewarn "Please confirm test failure with FEATURES=-usersandbox before reporting a bug."
+		fi
+
+		die "Test failures: $failures"
+	fi
+
+	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-suite ; then
+		rm -rf "${D%/}/${MY_SHAREDSTATEDIR#/}/mysql-test" || die
+	fi
+
+	# Configuration stuff
+	einfo "Building default configuration ..."
+	insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+	[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+	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"
+		for script in \
+			"${S}"/support-files/my-*.cnf.sh \
+			"${S}"/support-files/magic \
+			"${S}"/support-files/ndb-config-2-node.ini.sh
+		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"
+}
+
+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 "${EROOT%/}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${EROOT%/}${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
+			local _replacing_version=
+			for _replacing_version in ${REPLACING_VERSIONS}; do
+				local _new_version_branch=$(get_version_component_range 1-3 "${PV}")
+				local _replacing_version_branch=$(get_version_component_range 1-3 "${_replacing_version}")
+				debug-print "Updating an existing installation (v${_replacing_version}; branch '${_replacing_version_branch}') ..."
+
+				if ! version_is_at_least "${_new_version_branch}" "${_replacing_version_branch}"; then
+					debug-print "Upgrading from v${_replacing_version_branch} to v${_new_version_branch} ..."
+					# https://www.percona.com/blog/2014/09/19/mysql-upgrade-best-practices/
+
+					einfo
+					elog "You are upgrading an existing ${PN} installation, you should review"
+					elog "release notes at ${MY_RELEASE_NOTES_URI}"
+					elog "and run the mysql_upgrade tool."
+					einfo
+
+					// Break loop - we only want to show this hint once
+					break
+				fi
+			done
+		fi
+
+		elog "Since ${PN}-5.6.39.83.1-r1 we no longer provide client libs."
+		elog "Applications depending on client libs should migrate to virtual/libmysqlclient"
+		elog "which will pull-in dev-db/mysql-connector-c as their new client lib provider."
+		einfo
+	fi
+}
+
+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"
+	}
+
+	# 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"
+
+	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="${EROOT%/}/${MY_DATADIR#/}"
+		MY_DATADIR_s="${MY_DATADIR_s%%/}"
+		local old_MY_DATADIR_s="${EROOT%/}/${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
+
+	# These are dir+prefix
+	MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+	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%/}/${MY_DATADIR#/}/mysql" ]] ; then
+		ewarn "You have already a MySQL database in place."
+		ewarn "(${EROOT%/}/${MY_DATADIR#/}/*)"
+		ewarn "Please rename or delete it if you wish to replace it."
+		die "MySQL database already exists!"
+	fi
+
+	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
+
+	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
+
+	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 "${EROOT%/}/${MY_DATADIR#/}" ]] ; then
+		install -d -m 750 -o mysql -g mysql "${EROOT%/}/${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=${EROOT%/}/usr" ${options} "--datadir=${EROOT%/}/${MY_DATADIR#/}" "--tmpdir=${EROOT%/}/${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 ${EROOT%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+	fi
+	popd &>/dev/null || die
+	[[ -f "${EROOT%/}/${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=${EROOT%/}/${MY_DATADIR#/} \
+		--max_allowed_packet=8M \
+		--net_buffer_length=16K \
+		--socket=${socket} \
+		--pid-file=${pidfile}
+		--tmpdir=${EROOT%/}/${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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-08-20  0:38 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-08-20  0:38 UTC (permalink / raw
  To: gentoo-commits

commit:     4976f3ee0aae2a6c7eac7bc08f90bc153b0edcff
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 20 00:37:24 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Aug 20 00:38:19 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4976f3ee

dev-db/percona-server: only check FEATURES on non-binary merge

Package-Manager: Portage-2.3.47, Repoman-2.3.10

 .../percona-server-5.6.41.84.1.ebuild              | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild b/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild
index 746ff1dba26..a46ac7790a7 100644
--- a/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild
@@ -209,24 +209,24 @@ pkg_setup() {
 			eerror "Please use gcc-config to switch to gcc-4.7 or later version."
 			die "Unsupported GCC version"
 		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."
-			die "FEATURES=test with FEATURES=-userpriv is not supported"
-	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."
+				die "FEATURES=test with FEATURES=-userpriv is not supported"
+		fi
 
-	if has test ${FEATURES} && ! use test ; then
-		eerror "FEATURES=test requires USE=test."
-		die "FEATURES=test set but not USE=test"
+		if has test ${FEATURES} && ! use test ; then
+			eerror "FEATURES=test requires USE=test."
+			die "FEATURES=test set but not USE=test"
+		fi
+
+		use test && python-any-r1_pkg_setup
 	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"
-
-	use test && python-any-r1_pkg_setup
 }
 
 src_unpack() {


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-08-20 19:45 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-08-20 19:45 UTC (permalink / raw
  To: gentoo-commits

commit:     f53741fd866b410509e007d666cd1b7e39ea4871
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 20 19:44:30 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Aug 20 19:44:30 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f53741fd

dev-db/percona-server: remove FEATURES check

Bug: https://bugs.gentoo.org/664104
Package-Manager: Portage-2.3.47, Repoman-2.3.10

 dev-db/percona-server/percona-server-5.6.41.84.1.ebuild | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild b/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild
index a46ac7790a7..0f90f84fff8 100644
--- a/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild
@@ -35,7 +35,8 @@ IUSE="-client-libs cracklib debug jemalloc latin1 libressl numa pam +perl profil
 	+server static static-libs systemtap tcmalloc test test-suite tokudb tokudb-backup-plugin yassl"
 
 # Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="libressl? ( test )"
+RESTRICT="libressl? ( test )
+	!test? ( test )"
 
 REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc ) ?? ( tcmalloc jemalloc ) static? ( yassl )"
 
@@ -210,17 +211,6 @@ pkg_setup() {
 			die "Unsupported GCC version"
 		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."
-				die "FEATURES=test with FEATURES=-userpriv is not supported"
-		fi
-
-		if has test ${FEATURES} && ! use test ; then
-			eerror "FEATURES=test requires USE=test."
-			die "FEATURES=test set but not USE=test"
-		fi
-
 		use test && python-any-r1_pkg_setup
 	fi
 


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-09-18 14:11 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2018-09-18 14:11 UTC (permalink / raw
  To: gentoo-commits

commit:     14d0f95d88e6c1b3a6cdea59c8c3d8290407da87
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 18 13:53:33 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Sep 18 14:11:31 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14d0f95d

dev-db/percona-server: Drop old

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 dev-db/percona-server/Manifest                     |   2 -
 dev-db/percona-server/metadata.xml                 |   3 -
 .../percona-server-5.6.39.83.1.ebuild              | 243 ---------------------
 3 files changed, 248 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 7a72bb867ed..a46d86613b8 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,5 +1,3 @@
-DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
 DIST mysql-extras-20180628-0201Z.tar.bz2 322141 BLAKE2B fce35cfea4ffa9860908fcdf440cd0d714c402c42ee2afb22cec9e727971c216310c7db561ca1b37deebb2cea5137fe24f19b491ad500949e3170ccec3de0b13 SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a
-DIST percona-server-5.6.39-83.1.tar.gz 56307662 BLAKE2B 474e497a83e7a8f7bf628b2622a0bfeead0f5003ed87dd4228e85a8b1c75bfdfc40f75604e9ed621f6d143d69bcada29163bf140b765951cf0b23e5660623e52 SHA512 d014bc0ebf8d8f1842b4a79eb0a868e3c9e0e33d3eb3cbf301b5504dcb341e1f2a0d6c2c4003666f59fbf75eb274356ee6b059ff2cddf2b457143ee5e1aba471
 DIST percona-server-5.6.40-84.0.tar.gz 52684007 BLAKE2B 11658be2319880f7e8815c7b620b7d460dd7a559316ca96905573b0fa2d7180b084ed425f76f6d850f06862e424b5a8d6ced8356f9075826b77e89e86095eb40 SHA512 b1075933bdf1afb726acd799e834cb45a1d2a15d3f37f313da71f8da03a7b9480d7ccfb4cb6a820fb6ccf58851d8c9473bce975203cd6bc007a2b74b36a1127f
 DIST percona-server-5.6.41-84.1.tar.gz 52736448 BLAKE2B 1ec5e17f08274caa3882f829f25bbf74a3b37d2ba208f62376106f0d89e5470f461f7852e365d5da9503d5500702e28f08461e5aa0c5ae6b1a30a0e98dbb426b SHA512 60783154f9ab097083a484c34e584b396eeba4aa53dc8616c467ca9c85cc626be08e3165740703453cc4fb35f3af94ac34260f1e2bb133d60f832661251cbb3c

diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
index 7f9daa6409f..f3ddb7484a2 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/metadata.xml
@@ -7,13 +7,10 @@
   </maintainer>
 <use>
   <flag name="client-libs">Build the libmysqlclient libraries</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="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
-  <flag name="openssl">Enable SSL connections and crypto functions using <pkg>dev-libs/openssl</pkg></flag>
   <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
   <flag name="rocksdb">Add support for RocksDB; a key/value, LSM database optimized for flash storage</flag>
   <flag name="server">Build the server program</flag>

diff --git a/dev-db/percona-server/percona-server-5.6.39.83.1.ebuild b/dev-db/percona-server/percona-server-5.6.39.83.1.ebuild
deleted file mode 100644
index 2e7499a7dc6..00000000000
--- a/dev-db/percona-server/percona-server-5.6.39.83.1.ebuild
+++ /dev/null
@@ -1,243 +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"
-SUBSLOT="18"
-PYTHON_COMPAT=( python2_7 )
-# Build fails with ninja
-CMAKE_MAKEFILE_GENERATOR="emake"
-inherit linux-info python-any-r1 mysql-multilib-r1 toolchain-funcs
-
-IUSE="numa pam tokudb tokudb-backup-plugin"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-linux"
-HOMEPAGE="https://www.percona.com/software/percona-server"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-COMMON_DEPEND="numa? ( sys-process/numactl:= )
-	server? ( pam? ( virtual/pam:0= ) )
-	tokudb? ( app-arch/snappy )
-	tokudb-backup-plugin? ( dev-util/valgrind )
-	"
-
-DEPEND="${COMMON_DEPEND}
-	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-	test? (
-		$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
-		dev-perl/JSON
-	)"
-RDEPEND="${COMMON_DEPEND}"
-
-REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
-
-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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
-	"${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.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_percona-server-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
-
-pkg_pretend() {
-	mysql-multilib-r1_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
-}
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-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() {
-	local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
-			-DWITH_PAM=$(usex pam)
-			$(mysql-cmake_use_plugin tokudb TOKUDB)
-	)
-	if use tokudb ; then
-		# TokuDB Backup plugin requires valgrind unconditionally
-		MYSQL_CMAKE_NATIVE_DEFINES+=(
-			$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-		)
-	fi
-	mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild percona-server-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
-
-	if ! use server ; then
-		einfo "Skipping server tests due to minimal build."
-		return 0
-	fi
-
-	local TESTDIR="${CMAKE_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 [[ $UID -eq 0 ]]; then
-		die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
-	fi
-
-	einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
-	# 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}
-
-	# These are failing in Percona 5.6 for now and are believed to be
-	# false positives:
-	#
-	# main.information_schema, binlog.binlog_statement_insert_delayed,
-	# main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
-	# perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
-	# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
-	# engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
-	# engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
-	# engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
-	# fails due to USE=-latin1 / utf8 default
-	#
-	# main.mysql_client_test:
-	# segfaults at random under Portage only, suspect resource limits.
-	#
-	# main.percona_bug1289599
-	# Looks to be a syntax error in the test file itself
-	#
-	# main.variables main.myisam main.merge_recover
-	# fails due to ulimit not able to open enough files (needs 5000)
-	#
-	# main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
-	# Called with bad parameters should be reported upstream
-	#
-
-	local t
-
-	for t in main.mysql_client_test \
-		binlog.binlog_statement_insert_delayed main.information_schema \
-		main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
-		perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
-		funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
-		main.variables main.myisam main.merge_recover \
-		engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
-		engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
-		engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
-		main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
-			mysql-multilib-r1_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_buffer_pool_populate_basic ; do
-				mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
-			done
-		fi
-	fi
-
-	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}" || die
-
-	# Set file limits higher so tests run
-	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
-
-	python_setup
-	# 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"
-
-	popd || die
-
-	# 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"
-
-	if [[ -n "$failures" ]]; then
-		has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
-		die "Test failures: $failures"
-	fi
-
-	einfo "Tests successfully completed"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-09-18 14:11 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2018-09-18 14:11 UTC (permalink / raw
  To: gentoo-commits

commit:     b9fb307b2c082f70555cb8ba0d530aef070b25d9
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 18 14:06:26 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Sep 18 14:11:38 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9fb307b

dev-db/percona-server: Drop versionator for eapi7-ver

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 dev-db/percona-server/percona-server-5.6.40.84.0.ebuild | 12 ++++++------
 dev-db/percona-server/percona-server-5.6.41.84.1.ebuild | 12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.6.40.84.0.ebuild b/dev-db/percona-server/percona-server-5.6.40.84.0.ebuild
index c56c135cbbb..e9264582226 100644
--- a/dev-db/percona-server/percona-server-5.6.40.84.0.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.40.84.0.ebuild
@@ -9,11 +9,11 @@ CMAKE_MAKEFILE_GENERATOR=emake
 # Keeping eutils in EAPI=6 for emktemp in pkg_config
 
 inherit linux-info python-any-r1 eutils flag-o-matic prefix toolchain-funcs \
-	versionator user cmake-utils multilib-minimal
+	eapi7-ver user cmake-utils multilib-minimal
 
-MY_PV=$(replace_version_separator 3 '-')
+MY_PV=$(ver_rs 3 '-')
 MY_PN="Percona-Server"
-MY_MAJOR_PV=$(get_version_component_range 1-2)
+MY_MAJOR_PV=$(ver_cut 1-2)
 MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/5.6/release-notes/release-notes_index.html"
 SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz"
 
@@ -680,12 +680,12 @@ pkg_postinst() {
 			einfo
 		else
 			local _replacing_version=
+			local _new_version_branch=$(ver_cut 1-3 "${PV}")
 			for _replacing_version in ${REPLACING_VERSIONS}; do
-				local _new_version_branch=$(get_version_component_range 1-3 "${PV}")
-				local _replacing_version_branch=$(get_version_component_range 1-3 "${_replacing_version}")
+				local _replacing_version_branch=$(ver_cut 1-3 "${_replacing_version}")
 				debug-print "Updating an existing installation (v${_replacing_version}; branch '${_replacing_version_branch}') ..."
 
-				if ! version_is_at_least "${_new_version_branch}" "${_replacing_version_branch}"; then
+				if ver_test "${_new_version_branch}" -gt "${_replacing_version_branch}"; then
 					debug-print "Upgrading from v${_replacing_version_branch} to v${_new_version_branch} ..."
 					# https://www.percona.com/blog/2014/09/19/mysql-upgrade-best-practices/
 

diff --git a/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild b/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild
index 0f90f84fff8..52760d63376 100644
--- a/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild
@@ -9,11 +9,11 @@ CMAKE_MAKEFILE_GENERATOR=emake
 # Keeping eutils in EAPI=6 for emktemp in pkg_config
 
 inherit linux-info python-any-r1 eutils flag-o-matic prefix toolchain-funcs \
-	versionator user cmake-utils multilib-minimal
+	eapi7-ver user cmake-utils multilib-minimal
 
-MY_PV=$(replace_version_separator 3 '-')
+MY_PV=$(ver_rs 3 '-')
 MY_PN="Percona-Server"
-MY_MAJOR_PV=$(get_version_component_range 1-2)
+MY_MAJOR_PV=$(ver_cut 1-2)
 MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/5.6/release-notes/release-notes_index.html"
 SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz"
 
@@ -680,12 +680,12 @@ pkg_postinst() {
 			einfo
 		else
 			local _replacing_version=
+			local _new_version_branch=$(ver_cut 1-3 "${PV}")
 			for _replacing_version in ${REPLACING_VERSIONS}; do
-				local _new_version_branch=$(get_version_component_range 1-3 "${PV}")
-				local _replacing_version_branch=$(get_version_component_range 1-3 "${_replacing_version}")
+				local _replacing_version_branch=$(ver_cut 1-3 "${_replacing_version}")
 				debug-print "Updating an existing installation (v${_replacing_version}; branch '${_replacing_version_branch}') ..."
 
-				if ! version_is_at_least "${_new_version_branch}" "${_replacing_version_branch}"; then
+				if ver_test "${_new_version_branch}" -gt "${_replacing_version_branch}"; then
 					debug-print "Upgrading from v${_replacing_version_branch} to v${_new_version_branch} ..."
 					# https://www.percona.com/blog/2014/09/19/mysql-upgrade-best-practices/
 


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-10-16 16:23 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-10-16 16:23 UTC (permalink / raw
  To: gentoo-commits

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

dev-db/percona-server: 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

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

 ...3.ebuild => percona-server-5.7.23.23-r1.ebuild} | 45 ++++++++--------------
 1 file changed, 17 insertions(+), 28 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.7.23.23.ebuild b/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
similarity index 98%
rename from dev-db/percona-server/percona-server-5.7.23.23.ebuild
rename to dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
index d87397f9aea..bc88d79f260 100644
--- a/dev-db/percona-server/percona-server-5.7.23.23.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20181014-2320Z"
+MY_EXTRAS_VER="20181016-1606Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
@@ -92,14 +92,17 @@ COMMON_DEPEND="net-misc/curl:=
 	server? (
 		>=app-arch/lz4-0_p131:=
 		cjk? ( app-text/mecab:= )
-		numa? ( sys-process/numactl )
-		pam? ( virtual/pam:0= )
 		experimental? (
 			dev-libs/libevent:=
 			dev-libs/protobuf:=
 			net-libs/libtirpc:=
 		)
-		rocksdb? ( app-arch/zstd:= )
+		numa? ( sys-process/numactl )
+		pam? ( virtual/pam:0= )
+		rocksdb? (
+			app-arch/zstd:=
+			dev-libs/protobuf:=
+		)
 		tokudb? (
 			app-arch/snappy:=
 			app-arch/xz-utils:=
@@ -121,8 +124,10 @@ COMMON_DEPEND="net-misc/curl:=
 "
 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] )
@@ -279,9 +284,9 @@ pkg_postinst() {
 	# 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/${PN}.d."
+	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
@@ -323,11 +328,11 @@ src_prepare() {
 	# 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}"/libevent \
-		"${S}"/zlib \
 		"${S}"/extra/protobuf \
+		"${S}"/libevent \
 		"${S}"/storage/rocksdb/third_party \
 		"${S}"/storage/tokudb/PerconaFT/third_party \
+		"${S}"/zlib \
 		|| die
 
 	# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
@@ -773,31 +778,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
 
 		if use tokudb ; then
 			# Remove some unwanted files
@@ -810,12 +805,6 @@ multilib_src_install_all() {
 		fi
 	fi
 
-	if ! use client-libs ; then
-		rm -rv \
-			"${ED%/}"/usr/$(get_libdir)/pkgconfig \
-			|| die
-	fi
-
 	#Remove mytop if perl is not selected
 	[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
 }


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-10-16 17:28 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-10-16 17:28 UTC (permalink / raw
  To: gentoo-commits

commit:     bc59765aacedba0cf91b835fbeb7af5d2a2970cb
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 16 17:28:09 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Oct 16 17:28:22 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc59765a

dev-db/percona-server: fix Manifest

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

 dev-db/percona-server/Manifest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 7d72c5c2537..2f434e65af7 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,6 +1,6 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST mysql-extras-20180628-0201Z.tar.bz2 322141 BLAKE2B fce35cfea4ffa9860908fcdf440cd0d714c402c42ee2afb22cec9e727971c216310c7db561ca1b37deebb2cea5137fe24f19b491ad500949e3170ccec3de0b13 SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a
-DIST mysql-extras-20181014-2320Z.tar.bz2 327547 BLAKE2B 8d7d77de0fb92ca4b9a980eec5e2e6a2a68427da67d67e734509f96e05d9dd29daa1a702b3bf2d4313c0a4ff8318a69a70cb24cbd9bb0f3cfb15811e06b25d76 SHA512 5b97aa3c1fc42e3c87aa458a43bdeb1c86194026c7ee5ff7ad64c140e97a77685836971b7f2b3fb02fac440680e62507f96b428d8dc96c75f6358191a3e3084a
+DIST mysql-extras-20181016-1606Z.tar.bz2 327537 BLAKE2B 885b21b9f576844edf7e850cb8c7484fdadb469297adcbcd885ed0d12bb4a24324f26c4546a1fa077502f7f306b436ed48667fbfccce11be8873ff723f435b85 SHA512 b6fb00c2971cf91f0765b08b4f0449179eb5701b0eb92a184103f1129f365fee2271d27150c30a3f2fb3c2e8b669f77e65a54956f2862c6d3fe6be49e4bc0f88
 DIST percona-server-5.6.40-84.0.tar.gz 52684007 BLAKE2B 11658be2319880f7e8815c7b620b7d460dd7a559316ca96905573b0fa2d7180b084ed425f76f6d850f06862e424b5a8d6ced8356f9075826b77e89e86095eb40 SHA512 b1075933bdf1afb726acd799e834cb45a1d2a15d3f37f313da71f8da03a7b9480d7ccfb4cb6a820fb6ccf58851d8c9473bce975203cd6bc007a2b74b36a1127f
 DIST percona-server-5.6.41-84.1.tar.gz 52736448 BLAKE2B 1ec5e17f08274caa3882f829f25bbf74a3b37d2ba208f62376106f0d89e5470f461f7852e365d5da9503d5500702e28f08461e5aa0c5ae6b1a30a0e98dbb426b SHA512 60783154f9ab097083a484c34e584b396eeba4aa53dc8616c467ca9c85cc626be08e3165740703453cc4fb35f3af94ac34260f1e2bb133d60f832661251cbb3c
 DIST percona-server-5.7.23-23.tar.gz 79165468 BLAKE2B a460ac88886fa2be65abb0520d541db54413274599e02d8de3a01a68f8c3da431bfe819eb32bf80518fdff69bbcfae90ee089d2a096ee6210f9e4efe60dbab25 SHA512 351d40d3f7c3fe72f733443a6ef3902e1455390835e52e73d7eb48698ac6f2363e07811d40b22af5b1c7607622017d613279581940522c5e99660fac89d4d4c6


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-10-17  0:46 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-10-17  0:46 UTC (permalink / raw
  To: gentoo-commits

commit:     ae3ca10e0ac7b991483e849c9e4c0e92f95bb77e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 17 00:40:19 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Oct 17 00:46:03 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae3ca10e

dev-db/percona-server: 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/percona-server/Manifest                           | 2 +-
 dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 2f434e65af7..47fac2091bc 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,6 +1,6 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST mysql-extras-20180628-0201Z.tar.bz2 322141 BLAKE2B fce35cfea4ffa9860908fcdf440cd0d714c402c42ee2afb22cec9e727971c216310c7db561ca1b37deebb2cea5137fe24f19b491ad500949e3170ccec3de0b13 SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a
-DIST mysql-extras-20181016-1606Z.tar.bz2 327537 BLAKE2B 885b21b9f576844edf7e850cb8c7484fdadb469297adcbcd885ed0d12bb4a24324f26c4546a1fa077502f7f306b436ed48667fbfccce11be8873ff723f435b85 SHA512 b6fb00c2971cf91f0765b08b4f0449179eb5701b0eb92a184103f1129f365fee2271d27150c30a3f2fb3c2e8b669f77e65a54956f2862c6d3fe6be49e4bc0f88
+DIST mysql-extras-20181017-0033Z.tar.bz2 327867 BLAKE2B 6422ef22c497724253aec513bbaece43b8172d9b46c5a0823a3613b98141f66596121bf5573d9667e1a5c7c4ca50e3b22686df8d464e9a7ed6609b6b0325cdbc SHA512 ca361b48744ebfac74a3efa30cc664d6af6850e09b76284a6b32bc0145fcc193283950c52e5c20ae943cb7bdde9f6edb9ebad899593c8062dd2a62fa5f155d57
 DIST percona-server-5.6.40-84.0.tar.gz 52684007 BLAKE2B 11658be2319880f7e8815c7b620b7d460dd7a559316ca96905573b0fa2d7180b084ed425f76f6d850f06862e424b5a8d6ced8356f9075826b77e89e86095eb40 SHA512 b1075933bdf1afb726acd799e834cb45a1d2a15d3f37f313da71f8da03a7b9480d7ccfb4cb6a820fb6ccf58851d8c9473bce975203cd6bc007a2b74b36a1127f
 DIST percona-server-5.6.41-84.1.tar.gz 52736448 BLAKE2B 1ec5e17f08274caa3882f829f25bbf74a3b37d2ba208f62376106f0d89e5470f461f7852e365d5da9503d5500702e28f08461e5aa0c5ae6b1a30a0e98dbb426b SHA512 60783154f9ab097083a484c34e584b396eeba4aa53dc8616c467ca9c85cc626be08e3165740703453cc4fb35f3af94ac34260f1e2bb133d60f832661251cbb3c
 DIST percona-server-5.7.23-23.tar.gz 79165468 BLAKE2B a460ac88886fa2be65abb0520d541db54413274599e02d8de3a01a68f8c3da431bfe819eb32bf80518fdff69bbcfae90ee089d2a096ee6210f9e4efe60dbab25 SHA512 351d40d3f7c3fe72f733443a6ef3902e1455390835e52e73d7eb48698ac6f2363e07811d40b22af5b1c7607622017d613279581940522c5e99660fac89d4d4c6

diff --git a/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild b/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
index bc88d79f260..0c86bd67a52 100644
--- a/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.23.23-r1.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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-10-17 10:38 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-10-17 10:38 UTC (permalink / raw
  To: gentoo-commits

commit:     9d2b85eec218ab8160ec4f0796d99db810b3f6c7
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 17 10:38:11 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Oct 17 10:38:28 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d2b85ee

dev-db/percona-server: bump patch set

Bug: 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/percona-server/Manifest                           | 2 +-
 dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 47fac2091bc..f7706828f30 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,6 +1,6 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST mysql-extras-20180628-0201Z.tar.bz2 322141 BLAKE2B fce35cfea4ffa9860908fcdf440cd0d714c402c42ee2afb22cec9e727971c216310c7db561ca1b37deebb2cea5137fe24f19b491ad500949e3170ccec3de0b13 SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a
-DIST mysql-extras-20181017-0033Z.tar.bz2 327867 BLAKE2B 6422ef22c497724253aec513bbaece43b8172d9b46c5a0823a3613b98141f66596121bf5573d9667e1a5c7c4ca50e3b22686df8d464e9a7ed6609b6b0325cdbc SHA512 ca361b48744ebfac74a3efa30cc664d6af6850e09b76284a6b32bc0145fcc193283950c52e5c20ae943cb7bdde9f6edb9ebad899593c8062dd2a62fa5f155d57
+DIST mysql-extras-20181017-1034Z.tar.bz2 328118 BLAKE2B 1f1fe1175d61f954bdf34cacfc7e098ff8dcadc42f0022c4b09f0de2c69c51f37f97f7ccdb29c289bd49bdc6816fc4dbf88f766715697db7562705cd4d686362 SHA512 5e147d75fcbf5909f3fed1f4b3cda69e98314546199f854d87717b7808b782b7549c795bcbc105c3cb250bd71cb56686838061124ee00199c99308c24b180bc9
 DIST percona-server-5.6.40-84.0.tar.gz 52684007 BLAKE2B 11658be2319880f7e8815c7b620b7d460dd7a559316ca96905573b0fa2d7180b084ed425f76f6d850f06862e424b5a8d6ced8356f9075826b77e89e86095eb40 SHA512 b1075933bdf1afb726acd799e834cb45a1d2a15d3f37f313da71f8da03a7b9480d7ccfb4cb6a820fb6ccf58851d8c9473bce975203cd6bc007a2b74b36a1127f
 DIST percona-server-5.6.41-84.1.tar.gz 52736448 BLAKE2B 1ec5e17f08274caa3882f829f25bbf74a3b37d2ba208f62376106f0d89e5470f461f7852e365d5da9503d5500702e28f08461e5aa0c5ae6b1a30a0e98dbb426b SHA512 60783154f9ab097083a484c34e584b396eeba4aa53dc8616c467ca9c85cc626be08e3165740703453cc4fb35f3af94ac34260f1e2bb133d60f832661251cbb3c
 DIST percona-server-5.7.23-23.tar.gz 79165468 BLAKE2B a460ac88886fa2be65abb0520d541db54413274599e02d8de3a01a68f8c3da431bfe819eb32bf80518fdff69bbcfae90ee089d2a096ee6210f9e4efe60dbab25 SHA512 351d40d3f7c3fe72f733443a6ef3902e1455390835e52e73d7eb48698ac6f2363e07811d40b22af5b1c7607622017d613279581940522c5e99660fac89d4d4c6

diff --git a/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild b/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
index 0c86bd67a52..fe80047f2da 100644
--- a/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.23.23-r1.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-1034Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 
@@ -64,7 +64,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_percona-server-5.7.23-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-libressl-support.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-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


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-10-17 12:30 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-10-17 12:30 UTC (permalink / raw
  To: gentoo-commits

commit:     afc907ca875892f77d2d46b47e82a3099e01b82c
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 17 12:27:20 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Oct 17 12:29:45 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afc907ca

dev-db/percona-server: bum patch set

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

 dev-db/percona-server/Manifest                           | 2 +-
 dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index f7706828f30..80f18983b86 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,6 +1,6 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST mysql-extras-20180628-0201Z.tar.bz2 322141 BLAKE2B fce35cfea4ffa9860908fcdf440cd0d714c402c42ee2afb22cec9e727971c216310c7db561ca1b37deebb2cea5137fe24f19b491ad500949e3170ccec3de0b13 SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a
-DIST mysql-extras-20181017-1034Z.tar.bz2 328118 BLAKE2B 1f1fe1175d61f954bdf34cacfc7e098ff8dcadc42f0022c4b09f0de2c69c51f37f97f7ccdb29c289bd49bdc6816fc4dbf88f766715697db7562705cd4d686362 SHA512 5e147d75fcbf5909f3fed1f4b3cda69e98314546199f854d87717b7808b782b7549c795bcbc105c3cb250bd71cb56686838061124ee00199c99308c24b180bc9
+DIST mysql-extras-20181017-1223Z.tar.bz2 328072 BLAKE2B 2a7deb20146db8532e8ed2a942d43c61d0245253037af975acc5cdc668b8f4662348e555ba4e87724f50653138a9dde095512c150aa5bbabff030ea9dd4fd9ac SHA512 12c4d1c0c32ca1c1b39b7e547cde5199456a5008bae1d180a11247fcd52c9e90f2c5a3a5a65060ec998d2a388330dd7fd47065455bb5dfdda951b0e7ef70dfc8
 DIST percona-server-5.6.40-84.0.tar.gz 52684007 BLAKE2B 11658be2319880f7e8815c7b620b7d460dd7a559316ca96905573b0fa2d7180b084ed425f76f6d850f06862e424b5a8d6ced8356f9075826b77e89e86095eb40 SHA512 b1075933bdf1afb726acd799e834cb45a1d2a15d3f37f313da71f8da03a7b9480d7ccfb4cb6a820fb6ccf58851d8c9473bce975203cd6bc007a2b74b36a1127f
 DIST percona-server-5.6.41-84.1.tar.gz 52736448 BLAKE2B 1ec5e17f08274caa3882f829f25bbf74a3b37d2ba208f62376106f0d89e5470f461f7852e365d5da9503d5500702e28f08461e5aa0c5ae6b1a30a0e98dbb426b SHA512 60783154f9ab097083a484c34e584b396eeba4aa53dc8616c467ca9c85cc626be08e3165740703453cc4fb35f3af94ac34260f1e2bb133d60f832661251cbb3c
 DIST percona-server-5.7.23-23.tar.gz 79165468 BLAKE2B a460ac88886fa2be65abb0520d541db54413274599e02d8de3a01a68f8c3da431bfe819eb32bf80518fdff69bbcfae90ee089d2a096ee6210f9e4efe60dbab25 SHA512 351d40d3f7c3fe72f733443a6ef3902e1455390835e52e73d7eb48698ac6f2363e07811d40b22af5b1c7607622017d613279581940522c5e99660fac89d4d4c6

diff --git a/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild b/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
index fe80047f2da..adff7eb10c8 100644
--- a/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20181017-1034Z"
+MY_EXTRAS_VER="20181017-1223Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-10-17 22:21 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-10-17 22:21 UTC (permalink / raw
  To: gentoo-commits

commit:     8a4bca74f2b009ecc93483295e0cca20be138ef9
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 17 22:04:24 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Oct 17 22:21:02 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a4bca74

dev-db/percona-server: bump patch set

Bug: 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/percona-server/Manifest                           | 2 +-
 dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 80f18983b86..4dab80e05a1 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,6 +1,6 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST mysql-extras-20180628-0201Z.tar.bz2 322141 BLAKE2B fce35cfea4ffa9860908fcdf440cd0d714c402c42ee2afb22cec9e727971c216310c7db561ca1b37deebb2cea5137fe24f19b491ad500949e3170ccec3de0b13 SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a
-DIST mysql-extras-20181017-1223Z.tar.bz2 328072 BLAKE2B 2a7deb20146db8532e8ed2a942d43c61d0245253037af975acc5cdc668b8f4662348e555ba4e87724f50653138a9dde095512c150aa5bbabff030ea9dd4fd9ac SHA512 12c4d1c0c32ca1c1b39b7e547cde5199456a5008bae1d180a11247fcd52c9e90f2c5a3a5a65060ec998d2a388330dd7fd47065455bb5dfdda951b0e7ef70dfc8
+DIST mysql-extras-20181017-2201Z.tar.bz2 328311 BLAKE2B f1b179e0f2d63105f03ba238125e6cfa2c0cbf2084251b6c344bd02517899322bd161470eddab28c514349caac6401c35909b2f37264fdaf2dc196a309d3cc27 SHA512 26e26a3ad926bc9267d89f0bc34b030bc6292f21d3007185c4c1155beaa608566b4268f93edb64fd6156dbae80ac4f2817e78c1e92e90985e2675c2b1f97854e
 DIST percona-server-5.6.40-84.0.tar.gz 52684007 BLAKE2B 11658be2319880f7e8815c7b620b7d460dd7a559316ca96905573b0fa2d7180b084ed425f76f6d850f06862e424b5a8d6ced8356f9075826b77e89e86095eb40 SHA512 b1075933bdf1afb726acd799e834cb45a1d2a15d3f37f313da71f8da03a7b9480d7ccfb4cb6a820fb6ccf58851d8c9473bce975203cd6bc007a2b74b36a1127f
 DIST percona-server-5.6.41-84.1.tar.gz 52736448 BLAKE2B 1ec5e17f08274caa3882f829f25bbf74a3b37d2ba208f62376106f0d89e5470f461f7852e365d5da9503d5500702e28f08461e5aa0c5ae6b1a30a0e98dbb426b SHA512 60783154f9ab097083a484c34e584b396eeba4aa53dc8616c467ca9c85cc626be08e3165740703453cc4fb35f3af94ac34260f1e2bb133d60f832661251cbb3c
 DIST percona-server-5.7.23-23.tar.gz 79165468 BLAKE2B a460ac88886fa2be65abb0520d541db54413274599e02d8de3a01a68f8c3da431bfe819eb32bf80518fdff69bbcfae90ee089d2a096ee6210f9e4efe60dbab25 SHA512 351d40d3f7c3fe72f733443a6ef3902e1455390835e52e73d7eb48698ac6f2363e07811d40b22af5b1c7607622017d613279581940522c5e99660fac89d4d4c6

diff --git a/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild b/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
index adff7eb10c8..d4d61e03477 100644
--- a/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
-MY_EXTRAS_VER="20181017-1223Z"
+MY_EXTRAS_VER="20181017-2201Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-11-13 18:26 Brian Evans
  0 siblings, 0 replies; 121+ messages in thread
From: Brian Evans @ 2018-11-13 18:26 UTC (permalink / raw
  To: gentoo-commits

commit:     60091f8e66410d548dd1f525a6aaea68752d6563
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 13 18:19:22 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Nov 13 18:25:56 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60091f8e

dev-db/percona-server: 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/percona-server/percona-server-5.6.40.84.0.ebuild  | 4 ++--
 dev-db/percona-server/percona-server-5.6.41.84.1.ebuild  | 4 ++--
 dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.6.40.84.0.ebuild b/dev-db/percona-server/percona-server-5.6.40.84.0.ebuild
index e9264582226..2e7c3b95a1f 100644
--- a/dev-db/percona-server/percona-server-5.6.40.84.0.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.40.84.0.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"
@@ -895,7 +895,7 @@ pkg_config() {
 		--max_allowed_packet=8M \
 		--net_buffer_length=16K \
 		--socket=${socket} \
-		--pid-file=${pidfile}
+		--pid-file=${pidfile} \
 		--tmpdir=${EROOT%/}/${MYSQL_TMPDIR#/}"
 	#einfo "About to start mysqld: ${mysqld}"
 	ebegin "Starting mysqld"

diff --git a/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild b/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild
index 52760d63376..636f75b830f 100644
--- a/dev-db/percona-server/percona-server-5.6.41.84.1.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.41.84.1.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"
@@ -895,7 +895,7 @@ pkg_config() {
 		--max_allowed_packet=8M \
 		--net_buffer_length=16K \
 		--socket=${socket} \
-		--pid-file=${pidfile}
+		--pid-file=${pidfile} \
 		--tmpdir=${EROOT%/}/${MYSQL_TMPDIR#/}"
 	#einfo "About to start mysqld: ${mysqld}"
 	ebegin "Starting mysqld"

diff --git a/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild b/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
index d4d61e03477..4ef133731f5 100644
--- a/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.23.23-r1.ebuild
@@ -1001,7 +1001,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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-11-14 19:23 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-11-14 19:23 UTC (permalink / raw
  To: gentoo-commits

commit:     6e91f95f022c6e1b50c72e1ed057790d9d7fcc7f
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 14 19:21:57 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Nov 14 19:22:23 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e91f95f

dev-db/percona-server: bump to v5.7.23-24

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

 dev-db/percona-server/Manifest                     |    1 +
 .../percona-server/percona-server-5.7.23.24.ebuild | 1040 ++++++++++++++++++++
 2 files changed, 1041 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 4dab80e05a1..fecd9fea416 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -4,3 +4,4 @@ DIST mysql-extras-20181017-2201Z.tar.bz2 328311 BLAKE2B f1b179e0f2d63105f03ba238
 DIST percona-server-5.6.40-84.0.tar.gz 52684007 BLAKE2B 11658be2319880f7e8815c7b620b7d460dd7a559316ca96905573b0fa2d7180b084ed425f76f6d850f06862e424b5a8d6ced8356f9075826b77e89e86095eb40 SHA512 b1075933bdf1afb726acd799e834cb45a1d2a15d3f37f313da71f8da03a7b9480d7ccfb4cb6a820fb6ccf58851d8c9473bce975203cd6bc007a2b74b36a1127f
 DIST percona-server-5.6.41-84.1.tar.gz 52736448 BLAKE2B 1ec5e17f08274caa3882f829f25bbf74a3b37d2ba208f62376106f0d89e5470f461f7852e365d5da9503d5500702e28f08461e5aa0c5ae6b1a30a0e98dbb426b SHA512 60783154f9ab097083a484c34e584b396eeba4aa53dc8616c467ca9c85cc626be08e3165740703453cc4fb35f3af94ac34260f1e2bb133d60f832661251cbb3c
 DIST percona-server-5.7.23-23.tar.gz 79165468 BLAKE2B a460ac88886fa2be65abb0520d541db54413274599e02d8de3a01a68f8c3da431bfe819eb32bf80518fdff69bbcfae90ee089d2a096ee6210f9e4efe60dbab25 SHA512 351d40d3f7c3fe72f733443a6ef3902e1455390835e52e73d7eb48698ac6f2363e07811d40b22af5b1c7607622017d613279581940522c5e99660fac89d4d4c6
+DIST percona-server-5.7.23-24.tar.gz 81641623 BLAKE2B f23e8787f7c3b38517e22b8b12da38f549b03343091cdb7ff17b0b719036a10aa954f30162fdf032fa4813f6ee59881fa9334f7ce6d1a646fa2c338b4bf3f2cb SHA512 9449cf4f5e6b9abb062b17652a258ddf99397d82efd89c9b0c1b20ddfef3d3531c2c1b71cb91664ea6ee897c136310af58fcc900d5f80d37e8eb73a2a616fa41

diff --git a/dev-db/percona-server/percona-server-5.7.23.24.ebuild b/dev-db/percona-server/percona-server-5.7.23.24.ebuild
new file mode 100644
index 00000000000..dea13fd0c16
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.7.23.24.ebuild
@@ -0,0 +1,1040 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20181017-2201Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Python2 required for innodb_stress.innodb_stress{,_blob,_crash} test
+PYTHON_COMPAT=( python2_7 )
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eapi7-ver cmake-utils eutils flag-o-matic linux-info \
+	prefix python-any-r1 toolchain-funcs user multilib-minimal
+
+MY_PV=$(ver_rs 3 '-')
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/5.7/release-notes/release-notes_index.html"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+	mirror://sourceforge/boost/boost_1_59_0.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.percona.com/software/mysql-database/percona-server"
+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 pam +perl profiling rocksdb
+	selinux +server static static-libs systemtap tcmalloc test tokudb tokudb-backup-plugin 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}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-5.7.23-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-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_percona-server-5.7.23-rocksdb-use-system-libs.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 )
+		pam? ( virtual/pam:0= )
+		rocksdb? (
+			app-arch/zstd:=
+			dev-libs/protobuf:=
+		)
+		tokudb? (
+			app-arch/snappy:=
+			app-arch/xz-utils:=
+		)
+		tokudb-backup-plugin? ( dev-util/valgrind )
+	)
+	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? (
+		$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !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 )"
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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
+
+		use test && python-any-r1_pkg_setup
+	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)/libperconaserverclient.so" ]] ; then
+		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libperconaserverclient.so")
+		elog "Due to ABI changes when switching between different client libraries,"
+		elog "revdep-rebuild must find and rebuild all packages linking to libperconaserverclient."
+		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}/${MY_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
+
+	# Don't build bundled xz-utils
+	if [[ -d "${S}/storage/tokudb/ft-index" ]] ; then
+		echo > "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die
+		sed -i 's/ build_lzma//' "${S}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die
+	elif [[ -d "${S}/storage/tokudb/PerconaFT" ]] ; then
+		echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+		sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+		sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+	fi
+
+	if [[ -d "${S}/plugin/tokudb-backup-plugin" ]] && ! use tokudb-backup-plugin ; then
+		 rm -r "${S}/plugin/tokudb-backup-plugin/Percona-TokuBackup" || 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}"/storage/rocksdb/third_party \
+		"${S}"/storage/tokudb/PerconaFT/third_party \
+		"${S}"/zlib \
+		|| 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
+
+	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 tokudb ; then
+		# https://jira.percona.com/browse/PS-4399
+		append-cxxflags -Wno-error=shadow
+	fi
+
+	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="${WORKDIR}/boost_1_59_0"
+		-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_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
+			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
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			$(usex tokudb '' -DWITHOUT_TOKUDB=1)
+		)
+
+		if use tokudb ; then
+			# TokuDB Backup plugin requires valgrind unconditionally
+			mycmakeargs+=(
+				$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+			)
+		fi
+
+	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 percona-server-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 Percona-Server 5.7 for now and are believed to be
+	# false positives or are known to fail:
+	#
+	# group_replication.gr_communication_configuration: requires a valid local network address
+	#                                                   which clashes with FEATURES=network-sandbox
+	# main.mysqlshow:                                   https://jira.percona.com/browse/PS-5017
+	# main.percona_bug1289599:                          https://jira.percona.com/browse/PS-2072
+	# keyring_vault.keyring_vault_timeout:              requires network access to vault.public-ci.percona.com
+	#                                                   which clashes with FEATURES=network-sandbox
+	# perfschema.show_sanity:                           https://jira.percona.com/browse/PS-5018
+	#
+	local t
+
+	for t in \
+		group_replication.gr_communication_configuration \
+		main.mysqlshow \
+		main.percona_bug1289599 \
+		keyring_vault.keyring_vault_timeout \
+		perfschema.show_sanity \
+	; do
+			_disable_test "$t" "False positives in Gentoo / Known bug"
+	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 tokudb ; then
+		if [[ -f "/sys/kernel/mm/transparent_hugepage/enabled" ]] ; then
+			if grep -q -E "\[always\]" /sys/kernel/mm/transparent_hugepage/enabled &>/dev/null ; then
+				# TokuDB refuses to start when transparent hugepages are enabled
+				for t in \
+					tokudb.rows-32m-rand-insert \
+					tokudb.savepoint-2 \
+					tokudb.savepoint-3 \
+					tokudb.savepoint-4 \
+					tokudb.savepoint-1078 \
+					tokudb.savepoint-1078-2 \
+					tokudb.savepoint-1078-3 \
+					tokudb.savepoint-1078-4 \
+				; do
+						_disable_test "$t" "TokuDB will not work with transparent hugepages enabled"
+				done
+			fi
+		else
+			einfo "Cannot determine transparent hugepage status."
+			einfo "Please note that TokuDB refuses to start when transparent hugepages are enabled!"
+		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
+
+		if use tokudb ; then
+			# Remove some unwanted files
+			rm -fv \
+				"${ED%/}"/usr/COPYING.AGPLv3 \
+				"${ED%/}"/usr/COPYING.GPLv2 \
+				"${ED%/}"/usr/PATENTS \
+				"${ED%/}"/usr/README.md \
+				|| die
+		fi
+	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-11-16 23:00 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-11-16 23:00 UTC (permalink / raw
  To: gentoo-commits

commit:     57803e992dc7f3ccc2b600bd5d792a6061ced530
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 16 23:00:11 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Nov 16 23:00:32 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57803e99

dev-db/percona-server: update known test failures

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

 .../percona-server/percona-server-5.7.23.24.ebuild | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/dev-db/percona-server/percona-server-5.7.23.24.ebuild b/dev-db/percona-server/percona-server-5.7.23.24.ebuild
index dea13fd0c16..9887b0d1eb4 100644
--- a/dev-db/percona-server/percona-server-5.7.23.24.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.23.24.ebuild
@@ -597,6 +597,7 @@ src_test() {
 	# These are failing in Percona-Server 5.7 for now and are believed to be
 	# false positives or are known to fail:
 	#
+	# encryption.innodb_encryption_tables:              https://jira.percona.com/browse/PS-5036
 	# group_replication.gr_communication_configuration: requires a valid local network address
 	#                                                   which clashes with FEATURES=network-sandbox
 	# main.mysqlshow:                                   https://jira.percona.com/browse/PS-5017
@@ -604,15 +605,36 @@ src_test() {
 	# keyring_vault.keyring_vault_timeout:              requires network access to vault.public-ci.percona.com
 	#                                                   which clashes with FEATURES=network-sandbox
 	# perfschema.show_sanity:                           https://jira.percona.com/browse/PS-5018
+	# rocksdb.rocksdb:                                  https://jira.percona.com/browse/PS-5034
+	# rocksdb.show_engine:                              https://jira.percona.com/browse/PS-5033
+	# rocksdb.show_table_status:                        https://jira.percona.com/browse/PS-5035
+	# x.crud_insert_cast:                               https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_column:                        https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_numcolumns:                    https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_column_type:                   https://jira.percona.com/browse/PS-5032
+	# x.insert_table:                                   https://jira.percona.com/browse/PS-5032
+	# x.update_crud_arrayappend_o:                      https://jira.percona.com/browse/PS-5032
+	# x.update_crud_arrayinsert_o:                      https://jira.percona.com/browse/PS-5032
 	#
 	local t
 
 	for t in \
+		encryption.innodb_encryption_tables \
 		group_replication.gr_communication_configuration \
 		main.mysqlshow \
 		main.percona_bug1289599 \
 		keyring_vault.keyring_vault_timeout \
 		perfschema.show_sanity \
+		rocksdb.rocksdb \
+		rocksdb.show_engine \
+		rocksdb.show_table_status \
+		x.crud_insert_cast \
+		x.insert_table_bad_column \
+		x.insert_table_bad_numcolumns \
+		x.insert_table_bad_column_type \
+		x.insert_table \
+		x.update_crud_arrayappend_o \
+		x.update_crud_arrayinsert_o \
 	; do
 			_disable_test "$t" "False positives in Gentoo / Known bug"
 	done


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-11-18 21:43 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-11-18 21:43 UTC (permalink / raw
  To: gentoo-commits

commit:     4d4435c062d1d5292081c895a6a5be6d973a2760
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 18 21:42:58 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 18 21:43:17 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d4435c0

dev-db/percona-server: update known test failures

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

 dev-db/percona-server/percona-server-5.7.23.24.ebuild | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dev-db/percona-server/percona-server-5.7.23.24.ebuild b/dev-db/percona-server/percona-server-5.7.23.24.ebuild
index 9887b0d1eb4..2c75a45d8e3 100644
--- a/dev-db/percona-server/percona-server-5.7.23.24.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.23.24.ebuild
@@ -608,6 +608,8 @@ src_test() {
 	# rocksdb.rocksdb:                                  https://jira.percona.com/browse/PS-5034
 	# rocksdb.show_engine:                              https://jira.percona.com/browse/PS-5033
 	# rocksdb.show_table_status:                        https://jira.percona.com/browse/PS-5035
+	# rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch:   https://bugs.mysql.com/bug.php?id=89223
+	# rpl.rpl_multi_source_mts_reset_worker_info:       https://jira.percona.com/browse/PS-3786
 	# x.crud_insert_cast:                               https://jira.percona.com/browse/PS-5032
 	# x.insert_table_bad_column:                        https://jira.percona.com/browse/PS-5032
 	# x.insert_table_bad_numcolumns:                    https://jira.percona.com/browse/PS-5032
@@ -628,6 +630,8 @@ src_test() {
 		rocksdb.rocksdb \
 		rocksdb.show_engine \
 		rocksdb.show_table_status \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_multi_source_mts_reset_worker_info \
 		x.crud_insert_cast \
 		x.insert_table_bad_column \
 		x.insert_table_bad_numcolumns \


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-12-02 22:13 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-12-02 22:13 UTC (permalink / raw
  To: gentoo-commits

commit:     f3aa74dda25ee40afd0156f94e78153786e566ee
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Dec  2 22:05:37 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Dec  2 22:13:18 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3aa74dd

dev-db/percona-server: bump to v5.7.23-25

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

 dev-db/percona-server/Manifest                     |    1 +
 .../percona-server/percona-server-5.7.23.25.ebuild | 1066 ++++++++++++++++++++
 2 files changed, 1067 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index fecd9fea416..2b2f81d9082 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -5,3 +5,4 @@ DIST percona-server-5.6.40-84.0.tar.gz 52684007 BLAKE2B 11658be2319880f7e8815c7b
 DIST percona-server-5.6.41-84.1.tar.gz 52736448 BLAKE2B 1ec5e17f08274caa3882f829f25bbf74a3b37d2ba208f62376106f0d89e5470f461f7852e365d5da9503d5500702e28f08461e5aa0c5ae6b1a30a0e98dbb426b SHA512 60783154f9ab097083a484c34e584b396eeba4aa53dc8616c467ca9c85cc626be08e3165740703453cc4fb35f3af94ac34260f1e2bb133d60f832661251cbb3c
 DIST percona-server-5.7.23-23.tar.gz 79165468 BLAKE2B a460ac88886fa2be65abb0520d541db54413274599e02d8de3a01a68f8c3da431bfe819eb32bf80518fdff69bbcfae90ee089d2a096ee6210f9e4efe60dbab25 SHA512 351d40d3f7c3fe72f733443a6ef3902e1455390835e52e73d7eb48698ac6f2363e07811d40b22af5b1c7607622017d613279581940522c5e99660fac89d4d4c6
 DIST percona-server-5.7.23-24.tar.gz 81641623 BLAKE2B f23e8787f7c3b38517e22b8b12da38f549b03343091cdb7ff17b0b719036a10aa954f30162fdf032fa4813f6ee59881fa9334f7ce6d1a646fa2c338b4bf3f2cb SHA512 9449cf4f5e6b9abb062b17652a258ddf99397d82efd89c9b0c1b20ddfef3d3531c2c1b71cb91664ea6ee897c136310af58fcc900d5f80d37e8eb73a2a616fa41
+DIST percona-server-5.7.23-25.tar.gz 81600024 BLAKE2B 5db3f3abe5a88b4178bb7f93801a8169994a75caa3677e7653a169e380c221a9bd8c390254207b0104e3b74bd751476720ba25f65cd965d7e4b0ad86174f749d SHA512 1ce27b4a08f1e882e8635c688d44f593d95bfe30dc0678a0e6779381e80c081bf147047b40d990613893cfcb5e0d870ac3fcec1f24cd52b64efd0ed78ed05ccb

diff --git a/dev-db/percona-server/percona-server-5.7.23.25.ebuild b/dev-db/percona-server/percona-server-5.7.23.25.ebuild
new file mode 100644
index 00000000000..2c75a45d8e3
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.7.23.25.ebuild
@@ -0,0 +1,1066 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20181017-2201Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Python2 required for innodb_stress.innodb_stress{,_blob,_crash} test
+PYTHON_COMPAT=( python2_7 )
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eapi7-ver cmake-utils eutils flag-o-matic linux-info \
+	prefix python-any-r1 toolchain-funcs user multilib-minimal
+
+MY_PV=$(ver_rs 3 '-')
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/5.7/release-notes/release-notes_index.html"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+	mirror://sourceforge/boost/boost_1_59_0.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.percona.com/software/mysql-database/percona-server"
+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 pam +perl profiling rocksdb
+	selinux +server static static-libs systemtap tcmalloc test tokudb tokudb-backup-plugin 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}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-5.7.23-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-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_percona-server-5.7.23-rocksdb-use-system-libs.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 )
+		pam? ( virtual/pam:0= )
+		rocksdb? (
+			app-arch/zstd:=
+			dev-libs/protobuf:=
+		)
+		tokudb? (
+			app-arch/snappy:=
+			app-arch/xz-utils:=
+		)
+		tokudb-backup-plugin? ( dev-util/valgrind )
+	)
+	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? (
+		$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !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 )"
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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
+
+		use test && python-any-r1_pkg_setup
+	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)/libperconaserverclient.so" ]] ; then
+		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libperconaserverclient.so")
+		elog "Due to ABI changes when switching between different client libraries,"
+		elog "revdep-rebuild must find and rebuild all packages linking to libperconaserverclient."
+		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}/${MY_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
+
+	# Don't build bundled xz-utils
+	if [[ -d "${S}/storage/tokudb/ft-index" ]] ; then
+		echo > "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die
+		sed -i 's/ build_lzma//' "${S}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die
+	elif [[ -d "${S}/storage/tokudb/PerconaFT" ]] ; then
+		echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+		sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+		sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+	fi
+
+	if [[ -d "${S}/plugin/tokudb-backup-plugin" ]] && ! use tokudb-backup-plugin ; then
+		 rm -r "${S}/plugin/tokudb-backup-plugin/Percona-TokuBackup" || 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}"/storage/rocksdb/third_party \
+		"${S}"/storage/tokudb/PerconaFT/third_party \
+		"${S}"/zlib \
+		|| 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
+
+	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 tokudb ; then
+		# https://jira.percona.com/browse/PS-4399
+		append-cxxflags -Wno-error=shadow
+	fi
+
+	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="${WORKDIR}/boost_1_59_0"
+		-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_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
+			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
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			$(usex tokudb '' -DWITHOUT_TOKUDB=1)
+		)
+
+		if use tokudb ; then
+			# TokuDB Backup plugin requires valgrind unconditionally
+			mycmakeargs+=(
+				$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+			)
+		fi
+
+	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 percona-server-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 Percona-Server 5.7 for now and are believed to be
+	# false positives or are known to fail:
+	#
+	# encryption.innodb_encryption_tables:              https://jira.percona.com/browse/PS-5036
+	# group_replication.gr_communication_configuration: requires a valid local network address
+	#                                                   which clashes with FEATURES=network-sandbox
+	# main.mysqlshow:                                   https://jira.percona.com/browse/PS-5017
+	# main.percona_bug1289599:                          https://jira.percona.com/browse/PS-2072
+	# keyring_vault.keyring_vault_timeout:              requires network access to vault.public-ci.percona.com
+	#                                                   which clashes with FEATURES=network-sandbox
+	# perfschema.show_sanity:                           https://jira.percona.com/browse/PS-5018
+	# rocksdb.rocksdb:                                  https://jira.percona.com/browse/PS-5034
+	# rocksdb.show_engine:                              https://jira.percona.com/browse/PS-5033
+	# rocksdb.show_table_status:                        https://jira.percona.com/browse/PS-5035
+	# rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch:   https://bugs.mysql.com/bug.php?id=89223
+	# rpl.rpl_multi_source_mts_reset_worker_info:       https://jira.percona.com/browse/PS-3786
+	# x.crud_insert_cast:                               https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_column:                        https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_numcolumns:                    https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_column_type:                   https://jira.percona.com/browse/PS-5032
+	# x.insert_table:                                   https://jira.percona.com/browse/PS-5032
+	# x.update_crud_arrayappend_o:                      https://jira.percona.com/browse/PS-5032
+	# x.update_crud_arrayinsert_o:                      https://jira.percona.com/browse/PS-5032
+	#
+	local t
+
+	for t in \
+		encryption.innodb_encryption_tables \
+		group_replication.gr_communication_configuration \
+		main.mysqlshow \
+		main.percona_bug1289599 \
+		keyring_vault.keyring_vault_timeout \
+		perfschema.show_sanity \
+		rocksdb.rocksdb \
+		rocksdb.show_engine \
+		rocksdb.show_table_status \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_multi_source_mts_reset_worker_info \
+		x.crud_insert_cast \
+		x.insert_table_bad_column \
+		x.insert_table_bad_numcolumns \
+		x.insert_table_bad_column_type \
+		x.insert_table \
+		x.update_crud_arrayappend_o \
+		x.update_crud_arrayinsert_o \
+	; do
+			_disable_test "$t" "False positives in Gentoo / Known bug"
+	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 tokudb ; then
+		if [[ -f "/sys/kernel/mm/transparent_hugepage/enabled" ]] ; then
+			if grep -q -E "\[always\]" /sys/kernel/mm/transparent_hugepage/enabled &>/dev/null ; then
+				# TokuDB refuses to start when transparent hugepages are enabled
+				for t in \
+					tokudb.rows-32m-rand-insert \
+					tokudb.savepoint-2 \
+					tokudb.savepoint-3 \
+					tokudb.savepoint-4 \
+					tokudb.savepoint-1078 \
+					tokudb.savepoint-1078-2 \
+					tokudb.savepoint-1078-3 \
+					tokudb.savepoint-1078-4 \
+				; do
+						_disable_test "$t" "TokuDB will not work with transparent hugepages enabled"
+				done
+			fi
+		else
+			einfo "Cannot determine transparent hugepage status."
+			einfo "Please note that TokuDB refuses to start when transparent hugepages are enabled!"
+		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
+
+		if use tokudb ; then
+			# Remove some unwanted files
+			rm -fv \
+				"${ED%/}"/usr/COPYING.AGPLv3 \
+				"${ED%/}"/usr/COPYING.GPLv2 \
+				"${ED%/}"/usr/PATENTS \
+				"${ED%/}"/usr/README.md \
+				|| die
+		fi
+	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2018-12-20  1:10 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2018-12-20  1:10 UTC (permalink / raw
  To: gentoo-commits

commit:     40f449f494d16f2047273dbf7c1e7858c4bbf97b
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 00:34:06 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Dec 20 01:00:14 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40f449f4

dev-db/percona-server: bump to v5.7.24-27

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

 dev-db/percona-server/Manifest                     |    1 +
 .../percona-server/percona-server-5.7.24.27.ebuild | 1062 ++++++++++++++++++++
 2 files changed, 1063 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 2b2f81d9082..c00c6e6cf18 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -6,3 +6,4 @@ DIST percona-server-5.6.41-84.1.tar.gz 52736448 BLAKE2B 1ec5e17f08274caa3882f829
 DIST percona-server-5.7.23-23.tar.gz 79165468 BLAKE2B a460ac88886fa2be65abb0520d541db54413274599e02d8de3a01a68f8c3da431bfe819eb32bf80518fdff69bbcfae90ee089d2a096ee6210f9e4efe60dbab25 SHA512 351d40d3f7c3fe72f733443a6ef3902e1455390835e52e73d7eb48698ac6f2363e07811d40b22af5b1c7607622017d613279581940522c5e99660fac89d4d4c6
 DIST percona-server-5.7.23-24.tar.gz 81641623 BLAKE2B f23e8787f7c3b38517e22b8b12da38f549b03343091cdb7ff17b0b719036a10aa954f30162fdf032fa4813f6ee59881fa9334f7ce6d1a646fa2c338b4bf3f2cb SHA512 9449cf4f5e6b9abb062b17652a258ddf99397d82efd89c9b0c1b20ddfef3d3531c2c1b71cb91664ea6ee897c136310af58fcc900d5f80d37e8eb73a2a616fa41
 DIST percona-server-5.7.23-25.tar.gz 81600024 BLAKE2B 5db3f3abe5a88b4178bb7f93801a8169994a75caa3677e7653a169e380c221a9bd8c390254207b0104e3b74bd751476720ba25f65cd965d7e4b0ad86174f749d SHA512 1ce27b4a08f1e882e8635c688d44f593d95bfe30dc0678a0e6779381e80c081bf147047b40d990613893cfcb5e0d870ac3fcec1f24cd52b64efd0ed78ed05ccb
+DIST percona-server-5.7.24-27.tar.gz 81757023 BLAKE2B 80c28ca3195874133b127ba7268aa6a6af89f4d1a38ee34f0a761e8c35b8da2c8a94781e7672e241164b9887549846875fc294e36e4229f8e2c4d3f65562350e SHA512 f2a5af3c75577da911bcee5bf962e5b6d723ede1a21f19f9211cda1a7e37a3523d904ea0af6fa9787418959c8824c0cf48726b8b0a426b81df01e5a51214b70d

diff --git a/dev-db/percona-server/percona-server-5.7.24.27.ebuild b/dev-db/percona-server/percona-server-5.7.24.27.ebuild
new file mode 100644
index 00000000000..a980f25cd9d
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.7.24.27.ebuild
@@ -0,0 +1,1062 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20181017-2201Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Python2 required for innodb_stress.innodb_stress{,_blob,_crash} test
+PYTHON_COMPAT=( python2_7 )
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eapi7-ver cmake-utils eutils flag-o-matic linux-info \
+	prefix python-any-r1 toolchain-funcs user multilib-minimal
+
+MY_PV=$(ver_rs 3 '-')
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/5.7/release-notes/release-notes_index.html"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+	mirror://sourceforge/boost/boost_1_59_0.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.percona.com/software/mysql-database/percona-server"
+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 pam +perl profiling rocksdb
+	selinux +server static static-libs systemtap tcmalloc test tokudb tokudb-backup-plugin 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}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-5.7.23-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-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_percona-server-5.7.23-rocksdb-use-system-libs.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 )
+		pam? ( virtual/pam:0= )
+		rocksdb? (
+			app-arch/zstd:=
+			dev-libs/protobuf:=
+		)
+		tokudb? (
+			app-arch/snappy:=
+			app-arch/xz-utils:=
+		)
+		tokudb-backup-plugin? ( dev-util/valgrind )
+	)
+	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? (
+		$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !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 )"
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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
+
+		use test && python-any-r1_pkg_setup
+	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)/libperconaserverclient.so" ]] ; then
+		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libperconaserverclient.so")
+		elog "Due to ABI changes when switching between different client libraries,"
+		elog "revdep-rebuild must find and rebuild all packages linking to libperconaserverclient."
+		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}/${MY_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
+
+	# Don't build bundled xz-utils
+	if [[ -d "${S}/storage/tokudb/ft-index" ]] ; then
+		echo > "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die
+		sed -i 's/ build_lzma//' "${S}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die
+	elif [[ -d "${S}/storage/tokudb/PerconaFT" ]] ; then
+		echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+		sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+		sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+	fi
+
+	if [[ -d "${S}/plugin/tokudb-backup-plugin" ]] && ! use tokudb-backup-plugin ; then
+		 rm -r "${S}/plugin/tokudb-backup-plugin/Percona-TokuBackup" || 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}"/storage/rocksdb/third_party \
+		"${S}"/storage/tokudb/PerconaFT/third_party \
+		"${S}"/zlib \
+		|| 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
+
+	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 tokudb ; then
+		# https://jira.percona.com/browse/PS-4399
+		append-cxxflags -Wno-error=shadow
+	fi
+
+	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="${WORKDIR}/boost_1_59_0"
+		-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_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
+			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
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			$(usex tokudb '' -DWITHOUT_TOKUDB=1)
+		)
+
+		if use tokudb ; then
+			# TokuDB Backup plugin requires valgrind unconditionally
+			mycmakeargs+=(
+				$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+			)
+		fi
+
+	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 percona-server-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 Percona-Server 5.7 for now and are believed to be
+	# false positives or are known to fail:
+	#
+	# encryption.innodb_encryption_tables:              https://jira.percona.com/browse/PS-5036
+	# group_replication.gr_communication_configuration: requires a valid local network address
+	#                                                   which clashes with FEATURES=network-sandbox
+	# main.mysqlshow:                                   https://jira.percona.com/browse/PS-5017
+	# main.percona_bug1289599:                          https://jira.percona.com/browse/PS-2072
+	# keyring_vault.keyring_vault_timeout:              requires network access to vault.public-ci.percona.com
+	#                                                   which clashes with FEATURES=network-sandbox
+	# perfschema.show_sanity:                           https://jira.percona.com/browse/PS-5018
+	# rocksdb.prefix_extractor_override:                https://jira.percona.com/browse/PS-5199
+	# rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch:   https://bugs.mysql.com/bug.php?id=89223
+	# rpl.rpl_multi_source_mts_reset_worker_info:       https://jira.percona.com/browse/PS-3786
+	# x.crud_insert_cast:                               https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_column:                        https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_numcolumns:                    https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_column_type:                   https://jira.percona.com/browse/PS-5032
+	# x.insert_table:                                   https://jira.percona.com/browse/PS-5032
+	# x.update_crud_arrayappend_o:                      https://jira.percona.com/browse/PS-5032
+	# x.update_crud_arrayinsert_o:                      https://jira.percona.com/browse/PS-5032
+	#
+	local t
+
+	for t in \
+		encryption.innodb_encryption_tables \
+		group_replication.gr_communication_configuration \
+		main.mysqlshow \
+		main.percona_bug1289599 \
+		keyring_vault.keyring_vault_timeout \
+		perfschema.show_sanity \
+		rocksdb.prefix_extractor_override \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_multi_source_mts_reset_worker_info \
+		x.crud_insert_cast \
+		x.insert_table_bad_column \
+		x.insert_table_bad_numcolumns \
+		x.insert_table_bad_column_type \
+		x.insert_table \
+		x.update_crud_arrayappend_o \
+		x.update_crud_arrayinsert_o \
+	; do
+			_disable_test "$t" "False positives in Gentoo / Known bug"
+	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 tokudb ; then
+		if [[ -f "/sys/kernel/mm/transparent_hugepage/enabled" ]] ; then
+			if grep -q -E "\[always\]" /sys/kernel/mm/transparent_hugepage/enabled &>/dev/null ; then
+				# TokuDB refuses to start when transparent hugepages are enabled
+				for t in \
+					tokudb.rows-32m-rand-insert \
+					tokudb.savepoint-2 \
+					tokudb.savepoint-3 \
+					tokudb.savepoint-4 \
+					tokudb.savepoint-1078 \
+					tokudb.savepoint-1078-2 \
+					tokudb.savepoint-1078-3 \
+					tokudb.savepoint-1078-4 \
+				; do
+						_disable_test "$t" "TokuDB will not work with transparent hugepages enabled"
+				done
+			fi
+		else
+			einfo "Cannot determine transparent hugepage status."
+			einfo "Please note that TokuDB refuses to start when transparent hugepages are enabled!"
+		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
+
+		if use tokudb ; then
+			# Remove some unwanted files
+			rm -fv \
+				"${ED%/}"/usr/COPYING.AGPLv3 \
+				"${ED%/}"/usr/COPYING.GPLv2 \
+				"${ED%/}"/usr/PATENTS \
+				"${ED%/}"/usr/README.md \
+				|| die
+		fi
+	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-03-02 18:58 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-03-02 18:58 UTC (permalink / raw
  To: gentoo-commits

commit:     077aab1eab78e27a1a2f64eec67da21b47ea72b3
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  2 18:57:49 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Mar  2 18:58:09 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=077aab1e

dev-db/percona-server: bump to v5.7.25-28

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

 dev-db/percona-server/Manifest                     |    2 +
 .../percona-server/percona-server-5.7.25.28.ebuild | 1093 ++++++++++++++++++++
 2 files changed, 1095 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index e532723c966..69641f4e470 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,5 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST mysql-extras-20181017-2201Z.tar.bz2 328311 BLAKE2B f1b179e0f2d63105f03ba238125e6cfa2c0cbf2084251b6c344bd02517899322bd161470eddab28c514349caac6401c35909b2f37264fdaf2dc196a309d3cc27 SHA512 26e26a3ad926bc9267d89f0bc34b030bc6292f21d3007185c4c1155beaa608566b4268f93edb64fd6156dbae80ac4f2817e78c1e92e90985e2675c2b1f97854e
+DIST mysql-extras-20190126-1919Z.tar.bz2 331144 BLAKE2B 27fe6846a2c98a3027d0a63ad08d72e29f0dfff456de2ad942760a5d1005ea6fe5bbebacacf44308975eacd3ed824883b74e1be3930bd329965e2ec1a4d0384f SHA512 e3a54f721e71cbd9db2b907500cb42c526914be1307a316bbba27e8124580b574c1c9a1fe6d30228cc6d2a1a6ba0797cee3628a69f1536e0467bbcb5151986cd
 DIST percona-server-5.7.24-27.tar.gz 81757023 BLAKE2B 80c28ca3195874133b127ba7268aa6a6af89f4d1a38ee34f0a761e8c35b8da2c8a94781e7672e241164b9887549846875fc294e36e4229f8e2c4d3f65562350e SHA512 f2a5af3c75577da911bcee5bf962e5b6d723ede1a21f19f9211cda1a7e37a3523d904ea0af6fa9787418959c8824c0cf48726b8b0a426b81df01e5a51214b70d
+DIST percona-server-5.7.25-28.tar.gz 82296869 BLAKE2B eb12f185be6885e124f8fe5d434c0bba22a67fc2d82a28a52b6f7852722ce046a9a5c30ee5c55280b8046786c39336b131c94c05601580ab81ccf0113254f609 SHA512 e323e092d2af39969edc36d647400c20b50ec059b379f9ac32e71d88524940130639ebb2591d4126d6796e111c31c3a03ab1d00726471be00e1662417e5e63b3

diff --git a/dev-db/percona-server/percona-server-5.7.25.28.ebuild b/dev-db/percona-server/percona-server-5.7.25.28.ebuild
new file mode 100644
index 00000000000..caf112a00f4
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.7.25.28.ebuild
@@ -0,0 +1,1093 @@
+# 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
+
+# Python2 required for innodb_stress.innodb_stress{,_blob,_crash} test
+PYTHON_COMPAT=( python2_7 )
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eapi7-ver cmake-utils eutils flag-o-matic linux-info \
+	prefix python-any-r1 toolchain-funcs user multilib-minimal
+
+MY_PV=$(ver_rs 3 '-')
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/5.7/release-notes/release-notes_index.html"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+	mirror://sourceforge/boost/boost_1_59_0.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.percona.com/software/mysql-database/percona-server"
+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 pam +perl profiling rocksdb
+	selinux +server static static-libs systemtap tcmalloc test tokudb tokudb-backup-plugin 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}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-5.7.23-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-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_percona-server-5.7.23-rocksdb-use-system-libs.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 )
+		pam? ( virtual/pam:0= )
+		rocksdb? (
+			app-arch/zstd:=
+			dev-libs/protobuf:=
+		)
+		tokudb? (
+			app-arch/snappy:=
+			app-arch/xz-utils:=
+		)
+		tokudb-backup-plugin? ( dev-util/valgrind )
+	)
+	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? (
+		$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
+		dev-perl/JSON
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !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 )"
+
+python_check_deps() {
+	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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
+
+		use test && python-any-r1_pkg_setup
+	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)/libperconaserverclient.so" ]] ; then
+		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libperconaserverclient.so")
+		elog "Due to ABI changes when switching between different client libraries,"
+		elog "revdep-rebuild must find and rebuild all packages linking to libperconaserverclient."
+		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}/${MY_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
+
+	# Don't build bundled xz-utils
+	if [[ -d "${S}/storage/tokudb/ft-index" ]] ; then
+		echo > "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die
+		sed -i 's/ build_lzma//' "${S}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die
+	elif [[ -d "${S}/storage/tokudb/PerconaFT" ]] ; then
+		echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+		sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+		sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+	fi
+
+	if [[ -d "${S}/plugin/tokudb-backup-plugin" ]] && ! use tokudb-backup-plugin ; then
+		 rm -r "${S}/plugin/tokudb-backup-plugin/Percona-TokuBackup" || 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}"/storage/rocksdb/third_party \
+		"${S}"/storage/tokudb/PerconaFT/third_party \
+		"${S}"/zlib \
+		|| 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
+
+	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 tokudb ; then
+		# https://jira.percona.com/browse/PS-4399
+		append-cxxflags -Wno-error=shadow
+	fi
+
+	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="${WORKDIR}/boost_1_59_0"
+		-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_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
+			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
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			$(usex tokudb '' -DWITHOUT_TOKUDB=1)
+		)
+
+		if use tokudb ; then
+			# TokuDB Backup plugin requires valgrind unconditionally
+			mycmakeargs+=(
+				$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+			)
+		fi
+
+	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 percona-server-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 Percona-Server 5.7 for now and are believed to be
+	# false positives or are known to fail:
+	#
+	# group_replication.gr_communication_configuration: requires a valid local network address
+	#                                                   which clashes with FEATURES=network-sandbox
+	# innodb.xtradb_compressed_columns_consistency:     long running test which tends to timeout
+	#                                                   on a busy host
+	# keyring_vault.keyring_vault_timeout:              requires network access to vault.public-ci.percona.com
+	#                                                   which clashes with FEATURES=network-sandbox
+	# rocksdb.prefix_extractor_override:                https://jira.percona.com/browse/PS-5199
+	# rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch:   https://bugs.mysql.com/bug.php?id=89223
+	# rpl.rpl_multi_source_mts_reset_worker_info:       https://jira.percona.com/browse/PS-3786
+	# x.crud_insert_cast:                               https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_column:                        https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_numcolumns:                    https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_column_type:                   https://jira.percona.com/browse/PS-5032
+	# x.insert_table:                                   https://jira.percona.com/browse/PS-5032
+	# x.update_crud_arrayappend_o:                      https://jira.percona.com/browse/PS-5032
+	# x.update_crud_arrayinsert_o:                      https://jira.percona.com/browse/PS-5032
+	# x.mysqlxtest_help:                                https://jira.percona.com/browse/PS-5019
+	# x.admin_kill_client_mysqlx:                       https://jira.percona.com/browse/PS-5019
+	#
+	local t
+
+	for t in \
+		group_replication.gr_communication_configuration \
+		innodb.xtradb_compressed_columns_consistency \
+		keyring_vault.keyring_vault_timeout \
+		rocksdb.prefix_extractor_override \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_multi_source_mts_reset_worker_info \
+		x.crud_insert_cast \
+		x.insert_table_bad_column \
+		x.insert_table_bad_numcolumns \
+		x.insert_table_bad_column_type \
+		x.insert_table \
+		x.update_crud_arrayappend_o \
+		x.update_crud_arrayinsert_o \
+		x.mysqlxtest_help \
+		x.admin_kill_client_mysqlx \
+	; do
+			_disable_test "$t" "False positives in Gentoo / Known bug"
+	done
+
+	if has_version ">=dev-libs/openssl-1.1.1" ; then
+		for t in \
+			main.ssl_8k_key \
+			auth_sec.mysql_ssl_connection \
+			main.ssl_verify_identity \
+			main.ssl_crl \
+			main.grant_alter_user_qa \
+			auth_sec.ssl_auto_detect \
+			encryption.innodb_onlinealter_encryption \
+			main.ssl_ca \
+			main.ssl_cipher \
+			main.grant_user_lock_qa \
+			auth_sec.openssl_cert_generation \
+			main.ssl_bug75311 \
+			main.ssl_compress \
+			main.ssl \
+			main.plugin_auth_sha256_tls \
+			main.ssl_ecdh \
+			main.openssl_1 \
+			auth_sec.cert_verify \
+			main.mysql_ssl_default \
+			main.percona_tls \
+			auth_sec.tls \
+			auth_sec.ssl_mode \
+			binlog.binlog_grant_alter_user \
+			x.connection_tls_version \
+			x.connection_openssl \
+		; do
+			_disable_test "$t" "Known >=openssl-1.1.1 failures"
+		done
+	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 tokudb ; then
+		if [[ -f "/sys/kernel/mm/transparent_hugepage/enabled" ]] ; then
+			if grep -q -E "\[always\]" /sys/kernel/mm/transparent_hugepage/enabled &>/dev/null ; then
+				# TokuDB refuses to start when transparent hugepages are enabled
+				for t in \
+					tokudb.rows-32m-rand-insert \
+					tokudb.savepoint-2 \
+					tokudb.savepoint-3 \
+					tokudb.savepoint-4 \
+					tokudb.savepoint-1078 \
+					tokudb.savepoint-1078-2 \
+					tokudb.savepoint-1078-3 \
+					tokudb.savepoint-1078-4 \
+				; do
+						_disable_test "$t" "TokuDB will not work with transparent hugepages enabled"
+				done
+			fi
+		else
+			einfo "Cannot determine transparent hugepage status."
+			einfo "Please note that TokuDB refuses to start when transparent hugepages are enabled!"
+		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-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
+
+		if use tokudb ; then
+			# Remove some unwanted files
+			rm -fv \
+				"${ED%/}"/usr/COPYING.AGPLv3 \
+				"${ED%/}"/usr/COPYING.GPLv2 \
+				"${ED%/}"/usr/PATENTS \
+				"${ED%/}"/usr/README.md \
+				|| die
+		fi
+	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-03-02 19:55 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-03-02 19:55 UTC (permalink / raw
  To: gentoo-commits

commit:     5b91c01987b5f146a86b4bf33b4bcc2f12318c40
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  2 19:55:29 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Mar  2 19:55:43 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b91c019

dev-db/percona-server: disable flaky test tokudb.bugs.5733_tokudb

Bug: https://jira.percona.com/browse/PS-4274
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/percona-server/percona-server-5.7.25.28.ebuild | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dev-db/percona-server/percona-server-5.7.25.28.ebuild b/dev-db/percona-server/percona-server-5.7.25.28.ebuild
index caf112a00f4..e2bb3596ff7 100644
--- a/dev-db/percona-server/percona-server-5.7.25.28.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.25.28.ebuild
@@ -606,6 +606,7 @@ src_test() {
 	# rocksdb.prefix_extractor_override:                https://jira.percona.com/browse/PS-5199
 	# rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch:   https://bugs.mysql.com/bug.php?id=89223
 	# rpl.rpl_multi_source_mts_reset_worker_info:       https://jira.percona.com/browse/PS-3786
+	# tokudb.bugs.5733_tokudb:                          https://jira.percona.com/browse/PS-4274
 	# x.crud_insert_cast:                               https://jira.percona.com/browse/PS-5032
 	# x.insert_table_bad_column:                        https://jira.percona.com/browse/PS-5032
 	# x.insert_table_bad_numcolumns:                    https://jira.percona.com/browse/PS-5032
@@ -625,6 +626,7 @@ src_test() {
 		rocksdb.prefix_extractor_override \
 		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
 		rpl.rpl_multi_source_mts_reset_worker_info \
+		tokudb.bugs.5733_tokudb \
 		x.crud_insert_cast \
 		x.insert_table_bad_column \
 		x.insert_table_bad_numcolumns \


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-03-03 18:57 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-03-03 18:57 UTC (permalink / raw
  To: gentoo-commits

commit:     a4d1a7b57651eeb9f0769fcfcfebc96d7e156855
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  3 18:56:04 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Mar  3 18:57:01 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4d1a7b5

dev-db/percona-server: fix LibreSSL build

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

 dev-db/percona-server/Manifest                        | 2 +-
 dev-db/percona-server/percona-server-5.7.25.28.ebuild | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 69641f4e470..9cf76ad08fb 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,5 +1,5 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST mysql-extras-20181017-2201Z.tar.bz2 328311 BLAKE2B f1b179e0f2d63105f03ba238125e6cfa2c0cbf2084251b6c344bd02517899322bd161470eddab28c514349caac6401c35909b2f37264fdaf2dc196a309d3cc27 SHA512 26e26a3ad926bc9267d89f0bc34b030bc6292f21d3007185c4c1155beaa608566b4268f93edb64fd6156dbae80ac4f2817e78c1e92e90985e2675c2b1f97854e
-DIST mysql-extras-20190126-1919Z.tar.bz2 331144 BLAKE2B 27fe6846a2c98a3027d0a63ad08d72e29f0dfff456de2ad942760a5d1005ea6fe5bbebacacf44308975eacd3ed824883b74e1be3930bd329965e2ec1a4d0384f SHA512 e3a54f721e71cbd9db2b907500cb42c526914be1307a316bbba27e8124580b574c1c9a1fe6d30228cc6d2a1a6ba0797cee3628a69f1536e0467bbcb5151986cd
+DIST mysql-extras-20190303-1852Z.tar.bz2 331026 BLAKE2B ee033fce8f1b6a58f1f690710fb9709a585cd45564b35e71d4f840a3a7f83a5d80f53c24236c9976319abd89c68c62c74a7111517f1b9721d3cbd0898bf0dd8d SHA512 30361a0b848ed27f9170b1116458a9bc13b1b585c5fa1933c99927541c31e9bda4008b0563f2fc7db286f998089ebebf1fe3f18fce7a45e62acbf769ac62d8c1
 DIST percona-server-5.7.24-27.tar.gz 81757023 BLAKE2B 80c28ca3195874133b127ba7268aa6a6af89f4d1a38ee34f0a761e8c35b8da2c8a94781e7672e241164b9887549846875fc294e36e4229f8e2c4d3f65562350e SHA512 f2a5af3c75577da911bcee5bf962e5b6d723ede1a21f19f9211cda1a7e37a3523d904ea0af6fa9787418959c8824c0cf48726b8b0a426b81df01e5a51214b70d
 DIST percona-server-5.7.25-28.tar.gz 82296869 BLAKE2B eb12f185be6885e124f8fe5d434c0bba22a67fc2d82a28a52b6f7852722ce046a9a5c30ee5c55280b8046786c39336b131c94c05601580ab81ccf0113254f609 SHA512 e323e092d2af39969edc36d647400c20b50ec059b379f9ac32e71d88524940130639ebb2591d4126d6796e111c31c3a03ab1d00726471be00e1662417e5e63b3

diff --git a/dev-db/percona-server/percona-server-5.7.25.28.ebuild b/dev-db/percona-server/percona-server-5.7.25.28.ebuild
index e2bb3596ff7..5a434521485 100644
--- a/dev-db/percona-server/percona-server-5.7.25.28.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.25.28.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
 
@@ -64,7 +64,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_percona-server-5.7.23-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_percona-server-5.7.23-fix-libressl-support.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-05-14 13:14 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-05-14 13:14 UTC (permalink / raw
  To: gentoo-commits

commit:     e0218b03f15959f9dd8651a977ab00e8db3a38ee
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue May 14 00:43:39 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue May 14 13:14:30 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0218b03

dev-db/percona-server: drop old

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

 dev-db/percona-server/Manifest                     |    2 -
 .../percona-server/percona-server-5.7.24.27.ebuild | 1062 --------------------
 2 files changed, 1064 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 9cf76ad08fb..3ad0662b40b 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,5 +1,3 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
-DIST mysql-extras-20181017-2201Z.tar.bz2 328311 BLAKE2B f1b179e0f2d63105f03ba238125e6cfa2c0cbf2084251b6c344bd02517899322bd161470eddab28c514349caac6401c35909b2f37264fdaf2dc196a309d3cc27 SHA512 26e26a3ad926bc9267d89f0bc34b030bc6292f21d3007185c4c1155beaa608566b4268f93edb64fd6156dbae80ac4f2817e78c1e92e90985e2675c2b1f97854e
 DIST mysql-extras-20190303-1852Z.tar.bz2 331026 BLAKE2B ee033fce8f1b6a58f1f690710fb9709a585cd45564b35e71d4f840a3a7f83a5d80f53c24236c9976319abd89c68c62c74a7111517f1b9721d3cbd0898bf0dd8d SHA512 30361a0b848ed27f9170b1116458a9bc13b1b585c5fa1933c99927541c31e9bda4008b0563f2fc7db286f998089ebebf1fe3f18fce7a45e62acbf769ac62d8c1
-DIST percona-server-5.7.24-27.tar.gz 81757023 BLAKE2B 80c28ca3195874133b127ba7268aa6a6af89f4d1a38ee34f0a761e8c35b8da2c8a94781e7672e241164b9887549846875fc294e36e4229f8e2c4d3f65562350e SHA512 f2a5af3c75577da911bcee5bf962e5b6d723ede1a21f19f9211cda1a7e37a3523d904ea0af6fa9787418959c8824c0cf48726b8b0a426b81df01e5a51214b70d
 DIST percona-server-5.7.25-28.tar.gz 82296869 BLAKE2B eb12f185be6885e124f8fe5d434c0bba22a67fc2d82a28a52b6f7852722ce046a9a5c30ee5c55280b8046786c39336b131c94c05601580ab81ccf0113254f609 SHA512 e323e092d2af39969edc36d647400c20b50ec059b379f9ac32e71d88524940130639ebb2591d4126d6796e111c31c3a03ab1d00726471be00e1662417e5e63b3

diff --git a/dev-db/percona-server/percona-server-5.7.24.27.ebuild b/dev-db/percona-server/percona-server-5.7.24.27.ebuild
deleted file mode 100644
index a980f25cd9d..00000000000
--- a/dev-db/percona-server/percona-server-5.7.24.27.ebuild
+++ /dev/null
@@ -1,1062 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20181017-2201Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Python2 required for innodb_stress.innodb_stress{,_blob,_crash} test
-PYTHON_COMPAT=( python2_7 )
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eapi7-ver cmake-utils eutils flag-o-matic linux-info \
-	prefix python-any-r1 toolchain-funcs user multilib-minimal
-
-MY_PV=$(ver_rs 3 '-')
-MY_PN="Percona-Server"
-MY_P="${PN}-${MY_PV}"
-MY_MAJOR_PV=$(ver_cut 1-2)
-MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/5.7/release-notes/release-notes_index.html"
-
-SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
-	mirror://sourceforge/boost/boost_1_59_0.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.percona.com/software/mysql-database/percona-server"
-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 pam +perl profiling rocksdb
-	selinux +server static static-libs systemtap tcmalloc test tokudb tokudb-backup-plugin 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}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
-	"${MY_PATCH_DIR}"/20018_all_percona-server-5.7.23-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_percona-server-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_percona-server-5.7.23-rocksdb-use-system-libs.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 )
-		pam? ( virtual/pam:0= )
-		rocksdb? (
-			app-arch/zstd:=
-			dev-libs/protobuf:=
-		)
-		tokudb? (
-			app-arch/snappy:=
-			app-arch/xz-utils:=
-		)
-		tokudb-backup-plugin? ( dev-util/valgrind )
-	)
-	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? (
-		$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !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 )"
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-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
-
-		use test && python-any-r1_pkg_setup
-	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)/libperconaserverclient.so" ]] ; then
-		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libperconaserverclient.so")
-		elog "Due to ABI changes when switching between different client libraries,"
-		elog "revdep-rebuild must find and rebuild all packages linking to libperconaserverclient."
-		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}/${MY_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
-
-	# Don't build bundled xz-utils
-	if [[ -d "${S}/storage/tokudb/ft-index" ]] ; then
-		echo > "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die
-		sed -i 's/ build_lzma//' "${S}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die
-	elif [[ -d "${S}/storage/tokudb/PerconaFT" ]] ; then
-		echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
-		sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
-		sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
-	fi
-
-	if [[ -d "${S}/plugin/tokudb-backup-plugin" ]] && ! use tokudb-backup-plugin ; then
-		 rm -r "${S}/plugin/tokudb-backup-plugin/Percona-TokuBackup" || 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}"/storage/rocksdb/third_party \
-		"${S}"/storage/tokudb/PerconaFT/third_party \
-		"${S}"/zlib \
-		|| 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
-
-	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 tokudb ; then
-		# https://jira.percona.com/browse/PS-4399
-		append-cxxflags -Wno-error=shadow
-	fi
-
-	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="${WORKDIR}/boost_1_59_0"
-		-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_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
-			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
-			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
-			$(usex tokudb '' -DWITHOUT_TOKUDB=1)
-		)
-
-		if use tokudb ; then
-			# TokuDB Backup plugin requires valgrind unconditionally
-			mycmakeargs+=(
-				$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-			)
-		fi
-
-	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 percona-server-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 Percona-Server 5.7 for now and are believed to be
-	# false positives or are known to fail:
-	#
-	# encryption.innodb_encryption_tables:              https://jira.percona.com/browse/PS-5036
-	# group_replication.gr_communication_configuration: requires a valid local network address
-	#                                                   which clashes with FEATURES=network-sandbox
-	# main.mysqlshow:                                   https://jira.percona.com/browse/PS-5017
-	# main.percona_bug1289599:                          https://jira.percona.com/browse/PS-2072
-	# keyring_vault.keyring_vault_timeout:              requires network access to vault.public-ci.percona.com
-	#                                                   which clashes with FEATURES=network-sandbox
-	# perfschema.show_sanity:                           https://jira.percona.com/browse/PS-5018
-	# rocksdb.prefix_extractor_override:                https://jira.percona.com/browse/PS-5199
-	# rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch:   https://bugs.mysql.com/bug.php?id=89223
-	# rpl.rpl_multi_source_mts_reset_worker_info:       https://jira.percona.com/browse/PS-3786
-	# x.crud_insert_cast:                               https://jira.percona.com/browse/PS-5032
-	# x.insert_table_bad_column:                        https://jira.percona.com/browse/PS-5032
-	# x.insert_table_bad_numcolumns:                    https://jira.percona.com/browse/PS-5032
-	# x.insert_table_bad_column_type:                   https://jira.percona.com/browse/PS-5032
-	# x.insert_table:                                   https://jira.percona.com/browse/PS-5032
-	# x.update_crud_arrayappend_o:                      https://jira.percona.com/browse/PS-5032
-	# x.update_crud_arrayinsert_o:                      https://jira.percona.com/browse/PS-5032
-	#
-	local t
-
-	for t in \
-		encryption.innodb_encryption_tables \
-		group_replication.gr_communication_configuration \
-		main.mysqlshow \
-		main.percona_bug1289599 \
-		keyring_vault.keyring_vault_timeout \
-		perfschema.show_sanity \
-		rocksdb.prefix_extractor_override \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_multi_source_mts_reset_worker_info \
-		x.crud_insert_cast \
-		x.insert_table_bad_column \
-		x.insert_table_bad_numcolumns \
-		x.insert_table_bad_column_type \
-		x.insert_table \
-		x.update_crud_arrayappend_o \
-		x.update_crud_arrayinsert_o \
-	; do
-			_disable_test "$t" "False positives in Gentoo / Known bug"
-	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 tokudb ; then
-		if [[ -f "/sys/kernel/mm/transparent_hugepage/enabled" ]] ; then
-			if grep -q -E "\[always\]" /sys/kernel/mm/transparent_hugepage/enabled &>/dev/null ; then
-				# TokuDB refuses to start when transparent hugepages are enabled
-				for t in \
-					tokudb.rows-32m-rand-insert \
-					tokudb.savepoint-2 \
-					tokudb.savepoint-3 \
-					tokudb.savepoint-4 \
-					tokudb.savepoint-1078 \
-					tokudb.savepoint-1078-2 \
-					tokudb.savepoint-1078-3 \
-					tokudb.savepoint-1078-4 \
-				; do
-						_disable_test "$t" "TokuDB will not work with transparent hugepages enabled"
-				done
-			fi
-		else
-			einfo "Cannot determine transparent hugepage status."
-			einfo "Please note that TokuDB refuses to start when transparent hugepages are enabled!"
-		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
-
-		if use tokudb ; then
-			# Remove some unwanted files
-			rm -fv \
-				"${ED%/}"/usr/COPYING.AGPLv3 \
-				"${ED%/}"/usr/COPYING.GPLv2 \
-				"${ED%/}"/usr/PATENTS \
-				"${ED%/}"/usr/README.md \
-				|| die
-		fi
-	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-05-24 10:52 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-05-24 10:52 UTC (permalink / raw
  To: gentoo-commits

commit:     fbc194dfc09da2d92f8c9afdba7b18e15f443aeb
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri May 24 10:51:32 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri May 24 10:51:32 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fbc194df

dev-db/percona-server: fix LibreSSL support

Closes: https://bugs.gentoo.org/669216
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/percona-server/Manifest                        | 2 +-
 dev-db/percona-server/percona-server-5.7.25.28.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 3ad0662b40b..2c939b3272b 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,3 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
-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 percona-server-5.7.25-28.tar.gz 82296869 BLAKE2B eb12f185be6885e124f8fe5d434c0bba22a67fc2d82a28a52b6f7852722ce046a9a5c30ee5c55280b8046786c39336b131c94c05601580ab81ccf0113254f609 SHA512 e323e092d2af39969edc36d647400c20b50ec059b379f9ac32e71d88524940130639ebb2591d4126d6796e111c31c3a03ab1d00726471be00e1662417e5e63b3

diff --git a/dev-db/percona-server/percona-server-5.7.25.28.ebuild b/dev-db/percona-server/percona-server-5.7.25.28.ebuild
index 5a434521485..f32804b6b57 100644
--- a/dev-db/percona-server/percona-server-5.7.25.28.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.25.28.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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-07-22 14:33 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-07-22 14:33 UTC (permalink / raw
  To: gentoo-commits

commit:     734234ed122e1788021e6ac0e2fdf8bf2c17d92a
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 22 14:33:03 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Jul 22 14:33:14 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=734234ed

dev-db/percona-server: drop old

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

 dev-db/percona-server/Manifest                     |    1 -
 .../percona-server/percona-server-5.7.25.28.ebuild | 1095 --------------------
 2 files changed, 1096 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 2998754d82a..29c99a0b8d7 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,4 +1,3 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST mysql-extras-20190524-1046Z.tar.bz2 331517 BLAKE2B e6d48e34b0a7f7176de8740971f8151923beb20a520df73c22d44005059ef6779ad5aa8437e30018b9bbfe1d6d69043cbd8522b6f3662746205193b44372a6b3 SHA512 2f7238578f3aabd1701e1c54da36bc0100c9479871e3c77b22131fd6cde865037307f93b3343ea5e52251c45ef35cdc52cc2dec5a26d44fd41700598282c5c2c
-DIST percona-server-5.7.25-28.tar.gz 82296869 BLAKE2B eb12f185be6885e124f8fe5d434c0bba22a67fc2d82a28a52b6f7852722ce046a9a5c30ee5c55280b8046786c39336b131c94c05601580ab81ccf0113254f609 SHA512 e323e092d2af39969edc36d647400c20b50ec059b379f9ac32e71d88524940130639ebb2591d4126d6796e111c31c3a03ab1d00726471be00e1662417e5e63b3
 DIST percona-server-5.7.26-29.tar.gz 84327421 BLAKE2B beedb4b5025c337a63ae56644e47991e90c2c0e57c6d03f1562095f9470cef4b67c8df6c3774d88dfc6ed6dfb81f9dd4b62325db30bc26802651279921bd3a2d SHA512 c8100e69f7e29a5aa2de9dddbc1a3cba9836fe485b7f829a8db0a7e5ac1d1bdabfb1360dacad90665f4c9c78ac91226209c6c15158ef449e84519e36bb06f0a1

diff --git a/dev-db/percona-server/percona-server-5.7.25.28.ebuild b/dev-db/percona-server/percona-server-5.7.25.28.ebuild
deleted file mode 100644
index f32804b6b57..00000000000
--- a/dev-db/percona-server/percona-server-5.7.25.28.ebuild
+++ /dev/null
@@ -1,1095 +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
-
-# Python2 required for innodb_stress.innodb_stress{,_blob,_crash} test
-PYTHON_COMPAT=( python2_7 )
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eapi7-ver cmake-utils eutils flag-o-matic linux-info \
-	prefix python-any-r1 toolchain-funcs user multilib-minimal
-
-MY_PV=$(ver_rs 3 '-')
-MY_PN="Percona-Server"
-MY_P="${PN}-${MY_PV}"
-MY_MAJOR_PV=$(ver_cut 1-2)
-MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/5.7/release-notes/release-notes_index.html"
-
-SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
-	mirror://sourceforge/boost/boost_1_59_0.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.percona.com/software/mysql-database/percona-server"
-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 pam +perl profiling rocksdb
-	selinux +server static static-libs systemtap tcmalloc test tokudb tokudb-backup-plugin 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}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
-	"${MY_PATCH_DIR}"/20018_all_percona-server-5.7.23-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_percona-server-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_percona-server-5.7.23-rocksdb-use-system-libs.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 )
-		pam? ( virtual/pam:0= )
-		rocksdb? (
-			app-arch/zstd:=
-			dev-libs/protobuf:=
-		)
-		tokudb? (
-			app-arch/snappy:=
-			app-arch/xz-utils:=
-		)
-		tokudb-backup-plugin? ( dev-util/valgrind )
-	)
-	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? (
-		$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
-		dev-perl/JSON
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !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 )"
-
-python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-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
-
-		use test && python-any-r1_pkg_setup
-	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)/libperconaserverclient.so" ]] ; then
-		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libperconaserverclient.so")
-		elog "Due to ABI changes when switching between different client libraries,"
-		elog "revdep-rebuild must find and rebuild all packages linking to libperconaserverclient."
-		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}/${MY_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
-
-	# Don't build bundled xz-utils
-	if [[ -d "${S}/storage/tokudb/ft-index" ]] ; then
-		echo > "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die
-		sed -i 's/ build_lzma//' "${S}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die
-	elif [[ -d "${S}/storage/tokudb/PerconaFT" ]] ; then
-		echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
-		sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
-		sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
-	fi
-
-	if [[ -d "${S}/plugin/tokudb-backup-plugin" ]] && ! use tokudb-backup-plugin ; then
-		 rm -r "${S}/plugin/tokudb-backup-plugin/Percona-TokuBackup" || 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}"/storage/rocksdb/third_party \
-		"${S}"/storage/tokudb/PerconaFT/third_party \
-		"${S}"/zlib \
-		|| 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
-
-	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 tokudb ; then
-		# https://jira.percona.com/browse/PS-4399
-		append-cxxflags -Wno-error=shadow
-	fi
-
-	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="${WORKDIR}/boost_1_59_0"
-		-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_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
-			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
-			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
-			$(usex tokudb '' -DWITHOUT_TOKUDB=1)
-		)
-
-		if use tokudb ; then
-			# TokuDB Backup plugin requires valgrind unconditionally
-			mycmakeargs+=(
-				$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-			)
-		fi
-
-	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 percona-server-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 Percona-Server 5.7 for now and are believed to be
-	# false positives or are known to fail:
-	#
-	# group_replication.gr_communication_configuration: requires a valid local network address
-	#                                                   which clashes with FEATURES=network-sandbox
-	# innodb.xtradb_compressed_columns_consistency:     long running test which tends to timeout
-	#                                                   on a busy host
-	# keyring_vault.keyring_vault_timeout:              requires network access to vault.public-ci.percona.com
-	#                                                   which clashes with FEATURES=network-sandbox
-	# rocksdb.prefix_extractor_override:                https://jira.percona.com/browse/PS-5199
-	# rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch:   https://bugs.mysql.com/bug.php?id=89223
-	# rpl.rpl_multi_source_mts_reset_worker_info:       https://jira.percona.com/browse/PS-3786
-	# tokudb.bugs.5733_tokudb:                          https://jira.percona.com/browse/PS-4274
-	# x.crud_insert_cast:                               https://jira.percona.com/browse/PS-5032
-	# x.insert_table_bad_column:                        https://jira.percona.com/browse/PS-5032
-	# x.insert_table_bad_numcolumns:                    https://jira.percona.com/browse/PS-5032
-	# x.insert_table_bad_column_type:                   https://jira.percona.com/browse/PS-5032
-	# x.insert_table:                                   https://jira.percona.com/browse/PS-5032
-	# x.update_crud_arrayappend_o:                      https://jira.percona.com/browse/PS-5032
-	# x.update_crud_arrayinsert_o:                      https://jira.percona.com/browse/PS-5032
-	# x.mysqlxtest_help:                                https://jira.percona.com/browse/PS-5019
-	# x.admin_kill_client_mysqlx:                       https://jira.percona.com/browse/PS-5019
-	#
-	local t
-
-	for t in \
-		group_replication.gr_communication_configuration \
-		innodb.xtradb_compressed_columns_consistency \
-		keyring_vault.keyring_vault_timeout \
-		rocksdb.prefix_extractor_override \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_multi_source_mts_reset_worker_info \
-		tokudb.bugs.5733_tokudb \
-		x.crud_insert_cast \
-		x.insert_table_bad_column \
-		x.insert_table_bad_numcolumns \
-		x.insert_table_bad_column_type \
-		x.insert_table \
-		x.update_crud_arrayappend_o \
-		x.update_crud_arrayinsert_o \
-		x.mysqlxtest_help \
-		x.admin_kill_client_mysqlx \
-	; do
-			_disable_test "$t" "False positives in Gentoo / Known bug"
-	done
-
-	if has_version ">=dev-libs/openssl-1.1.1" ; then
-		for t in \
-			main.ssl_8k_key \
-			auth_sec.mysql_ssl_connection \
-			main.ssl_verify_identity \
-			main.ssl_crl \
-			main.grant_alter_user_qa \
-			auth_sec.ssl_auto_detect \
-			encryption.innodb_onlinealter_encryption \
-			main.ssl_ca \
-			main.ssl_cipher \
-			main.grant_user_lock_qa \
-			auth_sec.openssl_cert_generation \
-			main.ssl_bug75311 \
-			main.ssl_compress \
-			main.ssl \
-			main.plugin_auth_sha256_tls \
-			main.ssl_ecdh \
-			main.openssl_1 \
-			auth_sec.cert_verify \
-			main.mysql_ssl_default \
-			main.percona_tls \
-			auth_sec.tls \
-			auth_sec.ssl_mode \
-			binlog.binlog_grant_alter_user \
-			x.connection_tls_version \
-			x.connection_openssl \
-		; do
-			_disable_test "$t" "Known >=openssl-1.1.1 failures"
-		done
-	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 tokudb ; then
-		if [[ -f "/sys/kernel/mm/transparent_hugepage/enabled" ]] ; then
-			if grep -q -E "\[always\]" /sys/kernel/mm/transparent_hugepage/enabled &>/dev/null ; then
-				# TokuDB refuses to start when transparent hugepages are enabled
-				for t in \
-					tokudb.rows-32m-rand-insert \
-					tokudb.savepoint-2 \
-					tokudb.savepoint-3 \
-					tokudb.savepoint-4 \
-					tokudb.savepoint-1078 \
-					tokudb.savepoint-1078-2 \
-					tokudb.savepoint-1078-3 \
-					tokudb.savepoint-1078-4 \
-				; do
-						_disable_test "$t" "TokuDB will not work with transparent hugepages enabled"
-				done
-			fi
-		else
-			einfo "Cannot determine transparent hugepage status."
-			einfo "Please note that TokuDB refuses to start when transparent hugepages are enabled!"
-		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-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
-
-		if use tokudb ; then
-			# Remove some unwanted files
-			rm -fv \
-				"${ED%/}"/usr/COPYING.AGPLv3 \
-				"${ED%/}"/usr/COPYING.GPLv2 \
-				"${ED%/}"/usr/PATENTS \
-				"${ED%/}"/usr/README.md \
-				|| die
-		fi
-	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-08-02 16:56 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-08-02 16:56 UTC (permalink / raw
  To: gentoo-commits

commit:     e8a03f6f28dbc3607c4fce461675767e728fd100
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  2 16:48:24 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Aug  2 16:56:20 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8a03f6f

dev-db/percona-server: 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/percona-server/percona-server-5.7.26.29.ebuild | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/dev-db/percona-server/percona-server-5.7.26.29.ebuild b/dev-db/percona-server/percona-server-5.7.26.29.ebuild
index 61f7b02b6e2..b69fc97ed14 100644
--- a/dev-db/percona-server/percona-server-5.7.26.29.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.26.29.ebuild
@@ -335,6 +335,13 @@ 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
+
 	# 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


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-08-22 20:02 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-08-22 20:02 UTC (permalink / raw
  To: gentoo-commits

commit:     e55b9e4b1b3bba584d408f31b3a514b717696b1c
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 22 19:18:19 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Aug 22 19:45:24 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e55b9e4b

dev-db/percona-server: migrate to GLEP 81

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

 dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild b/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild
index edd2ef17363..1eccb63ed0a 100644
--- a/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild
@@ -12,7 +12,7 @@ PYTHON_COMPAT=( python2_7 )
 # Keeping eutils in EAPI=6 for emktemp in pkg_config
 
 inherit eapi7-ver cmake-utils eutils flag-o-matic linux-info \
-	prefix python-any-r1 toolchain-funcs user multilib-minimal
+	prefix python-any-r1 toolchain-funcs multilib-minimal
 
 MY_PV=$(ver_rs 3 '-')
 MY_PN="Percona-Server"
@@ -132,6 +132,7 @@ DEPEND="${COMMON_DEPEND}
 	)
 	static? ( sys-libs/ncurses[static-libs] )
 	test? (
+		acct-group/mysql acct-user/mysql
 		$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
 		dev-perl/JSON
 	)
@@ -140,7 +141,12 @@ RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !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
@@ -237,10 +243,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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-08-22 20:02 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-08-22 20:02 UTC (permalink / raw
  To: gentoo-commits

commit:     73abb68265e8d15ab53233ce430db533c965e2a2
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 22 19:14:55 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Aug 22 19:45:22 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73abb682

dev-db/percona-server: 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/percona-server/Manifest                                        | 2 +-
 ...ona-server-5.7.26.29.ebuild => percona-server-5.7.26.29-r1.ebuild} | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 29c99a0b8d7..3826da2c265 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,3 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
-DIST mysql-extras-20190524-1046Z.tar.bz2 331517 BLAKE2B e6d48e34b0a7f7176de8740971f8151923beb20a520df73c22d44005059ef6779ad5aa8437e30018b9bbfe1d6d69043cbd8522b6f3662746205193b44372a6b3 SHA512 2f7238578f3aabd1701e1c54da36bc0100c9479871e3c77b22131fd6cde865037307f93b3343ea5e52251c45ef35cdc52cc2dec5a26d44fd41700598282c5c2c
+DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST percona-server-5.7.26-29.tar.gz 84327421 BLAKE2B beedb4b5025c337a63ae56644e47991e90c2c0e57c6d03f1562095f9470cef4b67c8df6c3774d88dfc6ed6dfb81f9dd4b62325db30bc26802651279921bd3a2d SHA512 c8100e69f7e29a5aa2de9dddbc1a3cba9836fe485b7f829a8db0a7e5ac1d1bdabfb1360dacad90665f4c9c78ac91226209c6c15158ef449e84519e36bb06f0a1

diff --git a/dev-db/percona-server/percona-server-5.7.26.29.ebuild b/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild
similarity index 99%
rename from dev-db/percona-server/percona-server-5.7.26.29.ebuild
rename to dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild
index b69fc97ed14..edd2ef17363 100644
--- a/dev-db/percona-server/percona-server-5.7.26.29.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.26.29-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
 
@@ -63,7 +63,7 @@ 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}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
-	"${MY_PATCH_DIR}"/20018_all_percona-server-5.7.23-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-5.7.26-without-clientlibs-tools.patch
 	"${MY_PATCH_DIR}"/20018_all_percona-server-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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-08-23 20:04 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-08-23 20:04 UTC (permalink / raw
  To: gentoo-commits

commit:     cfc9cf48bd080d734ee8e178b8c5a3750c81513d
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 23 19:46:35 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Aug 23 20:03:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfc9cf48

dev-db/percona-server: allow for dev-python/mysqlclient

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

 dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild b/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild
index 1eccb63ed0a..81b46f88e3a 100644
--- a/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild
@@ -133,8 +133,11 @@ DEPEND="${COMMON_DEPEND}
 	static? ( sys-libs/ncurses[static-libs] )
 	test? (
 		acct-group/mysql acct-user/mysql
-		$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
 		dev-perl/JSON
+		|| (
+			$(python_gen_any_dep 'dev-python/mysqlclient[${PYTHON_USEDEP}]')
+			$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
+		)
 	)
 "
 RDEPEND="${COMMON_DEPEND}
@@ -153,7 +156,8 @@ RDEPEND="${COMMON_DEPEND}
 PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
 
 python_check_deps() {
-	has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+	has_version "dev-python/mysqlclient[${PYTHON_USEDEP}]" \
+		|| has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
 }
 
 mysql_init_vars() {


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-08-28 16:29 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-08-28 16:29 UTC (permalink / raw
  To: gentoo-commits

commit:     a5b2344e237f0dff5748a270d0504c6ac0478f33
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 28 16:28:43 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Aug 28 16:29:05 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5b2344e

dev-db/percona-server: bump to v5.7.27-30

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

 dev-db/percona-server/Manifest                     |    1 +
 .../percona-server/percona-server-5.7.27.30.ebuild | 1135 ++++++++++++++++++++
 2 files changed, 1136 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 3826da2c265..f766c8cf7fc 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,4 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST percona-server-5.7.26-29.tar.gz 84327421 BLAKE2B beedb4b5025c337a63ae56644e47991e90c2c0e57c6d03f1562095f9470cef4b67c8df6c3774d88dfc6ed6dfb81f9dd4b62325db30bc26802651279921bd3a2d SHA512 c8100e69f7e29a5aa2de9dddbc1a3cba9836fe485b7f829a8db0a7e5ac1d1bdabfb1360dacad90665f4c9c78ac91226209c6c15158ef449e84519e36bb06f0a1
+DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e8eb73adb3db7c761906c15eff182e54634ef091a3ffa0d4f3498a93dbfbf65cd5cdd12102871abaaaa0f32378ba3068d083b2b SHA512 d62c66de3128df87dce52292ad1671e01fe2c923e668ef0faf9cb663c11c9cd0b976345aea1de6ea2bc458d0e1066b42c022849e422121d96cea082ed12c8f4b

diff --git a/dev-db/percona-server/percona-server-5.7.27.30.ebuild b/dev-db/percona-server/percona-server-5.7.27.30.ebuild
new file mode 100644
index 00000000000..f6e26e0c232
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.7.27.30.ebuild
@@ -0,0 +1,1135 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20190822-1908Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Python2 required for innodb_stress.innodb_stress{,_blob,_crash} test
+PYTHON_COMPAT=( python2_7 )
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eapi7-ver cmake-utils eutils flag-o-matic linux-info \
+	prefix python-any-r1 toolchain-funcs multilib-minimal
+
+MY_PV=$(ver_rs 3 '-')
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/5.7/release-notes/release-notes_index.html"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+	mirror://sourceforge/boost/boost_1_59_0.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.percona.com/software/mysql-database/percona-server"
+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 pam +perl profiling rocksdb
+	selinux +server static static-libs systemtap tcmalloc test tokudb tokudb-backup-plugin 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}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-5.7.26-without-clientlibs-tools.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-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_percona-server-5.7.23-rocksdb-use-system-libs.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 )
+		pam? ( virtual/pam:0= )
+		rocksdb? (
+			app-arch/zstd:=
+			dev-libs/protobuf:=
+		)
+		tokudb? (
+			app-arch/snappy:=
+			app-arch/xz-utils:=
+		)
+		tokudb-backup-plugin? ( dev-util/valgrind )
+	)
+	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
+		|| (
+			$(python_gen_any_dep 'dev-python/mysqlclient[${PYTHON_USEDEP}]')
+			$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
+		)
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !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 )"
+
+python_check_deps() {
+	has_version "dev-python/mysqlclient[${PYTHON_USEDEP}]" \
+		|| has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+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
+
+		use test && python-any-r1_pkg_setup
+	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)/libperconaserverclient.so" ]] ; then
+		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libperconaserverclient.so")
+		elog "Due to ABI changes when switching between different client libraries,"
+		elog "revdep-rebuild must find and rebuild all packages linking to libperconaserverclient."
+		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}/${MY_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
+
+	# Don't build bundled xz-utils
+	if [[ -d "${S}/storage/tokudb/ft-index" ]] ; then
+		echo > "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die
+		sed -i 's/ build_lzma//' "${S}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die
+	elif [[ -d "${S}/storage/tokudb/PerconaFT" ]] ; then
+		echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+		sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+		sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+	fi
+
+	if [[ -d "${S}/plugin/tokudb-backup-plugin" ]] && ! use tokudb-backup-plugin ; then
+		 rm -r "${S}/plugin/tokudb-backup-plugin/Percona-TokuBackup" || 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}"/storage/rocksdb/third_party \
+		"${S}"/storage/tokudb/PerconaFT/third_party \
+		"${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
+
+	# 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
+}
+
+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 tokudb ; then
+		# https://jira.percona.com/browse/PS-4399
+		append-cxxflags -Wno-error=shadow
+	fi
+
+	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="${WORKDIR}/boost_1_59_0"
+		-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_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
+			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
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			$(usex tokudb '' -DWITHOUT_TOKUDB=1)
+		)
+
+		if use tokudb ; then
+			# TokuDB Backup plugin requires valgrind unconditionally
+			mycmakeargs+=(
+				$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+			)
+		fi
+
+	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 percona-server-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 Percona-Server 5.7 for now and are believed to be
+	# false positives or are known to fail:
+	#
+	# group_replication.gr_communication_configuration: requires a valid local network address
+	#                                                   which clashes with FEATURES=network-sandbox
+	# innodb.xtradb_compressed_columns_consistency:     long running test which tends to timeout
+	#                                                   on a busy host
+	# keyring_vault.keyring_vault_timeout:              requires network access to vault.public-ci.percona.com
+	#                                                   which clashes with FEATURES=network-sandbox
+	# rocksdb.prefix_extractor_override:                https://jira.percona.com/browse/PS-5199
+	# rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch:   https://bugs.mysql.com/bug.php?id=89223
+	# rpl.rpl_multi_source_mts_reset_worker_info:       https://jira.percona.com/browse/PS-3786
+	# tokudb.bugs.5733_tokudb:                          https://jira.percona.com/browse/PS-4274
+	# x.crud_insert_cast:                               https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_column:                        https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_numcolumns:                    https://jira.percona.com/browse/PS-5032
+	# x.insert_table_bad_column_type:                   https://jira.percona.com/browse/PS-5032
+	# x.insert_table:                                   https://jira.percona.com/browse/PS-5032
+	# x.update_crud_arrayappend_o:                      https://jira.percona.com/browse/PS-5032
+	# x.update_crud_arrayinsert_o:                      https://jira.percona.com/browse/PS-5032
+	# x.mysqlxtest_help:                                https://jira.percona.com/browse/PS-5019
+	# x.admin_kill_client_mysqlx:                       https://jira.percona.com/browse/PS-5019
+	#
+	local t
+
+	for t in \
+		group_replication.gr_communication_configuration \
+		innodb.xtradb_compressed_columns_consistency \
+		keyring_vault.keyring_vault_timeout \
+		rocksdb.prefix_extractor_override \
+		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+		rpl.rpl_multi_source_mts_reset_worker_info \
+		tokudb.bugs.5733_tokudb \
+		x.crud_insert_cast \
+		x.insert_table_bad_column \
+		x.insert_table_bad_numcolumns \
+		x.insert_table_bad_column_type \
+		x.insert_table \
+		x.update_crud_arrayappend_o \
+		x.update_crud_arrayinsert_o \
+		x.mysqlxtest_help \
+		x.admin_kill_client_mysqlx \
+	; do
+			_disable_test "$t" "False positives in Gentoo / Known bug"
+	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_centroid \
+		gis.spatial_analysis_functions_distance \
+		gis.spatial_op_testingfunc_mix \
+		gis.spatial_utility_function_distance_sphere \
+		gis.spatial_utility_function_simplify \
+	; do
+		_disable_test "$t" "Known rounding error with latest AMD processors"
+	done
+
+	if has_version ">=dev-libs/openssl-1.1.1" ; then
+		for t in \
+			main.ssl_8k_key \
+			auth_sec.mysql_ssl_connection \
+			main.ssl_verify_identity \
+			main.ssl_crl \
+			main.grant_alter_user_qa \
+			auth_sec.ssl_auto_detect \
+			encryption.innodb_onlinealter_encryption \
+			main.ssl_ca \
+			main.ssl_cipher \
+			main.grant_user_lock_qa \
+			auth_sec.openssl_cert_generation \
+			main.ssl_bug75311 \
+			main.ssl_compress \
+			main.ssl \
+			main.plugin_auth_sha256_tls \
+			main.ssl_ecdh \
+			main.openssl_1 \
+			auth_sec.cert_verify \
+			main.mysql_ssl_default \
+			main.percona_tls \
+			auth_sec.tls \
+			auth_sec.ssl_mode \
+			binlog.binlog_grant_alter_user \
+			x.connection_tls_version \
+			x.connection_openssl \
+		; do
+			_disable_test "$t" "Known >=openssl-1.1.1 failures"
+		done
+	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 tokudb ; then
+		if [[ -f "/sys/kernel/mm/transparent_hugepage/enabled" ]] ; then
+			if grep -q -E "\[always\]" /sys/kernel/mm/transparent_hugepage/enabled &>/dev/null ; then
+				# TokuDB refuses to start when transparent hugepages are enabled
+				for t in \
+					tokudb.rows-32m-rand-insert \
+					tokudb.savepoint-2 \
+					tokudb.savepoint-3 \
+					tokudb.savepoint-4 \
+					tokudb.savepoint-1078 \
+					tokudb.savepoint-1078-2 \
+					tokudb.savepoint-1078-3 \
+					tokudb.savepoint-1078-4 \
+				; do
+						_disable_test "$t" "TokuDB will not work with transparent hugepages enabled"
+				done
+			fi
+		else
+			einfo "Cannot determine transparent hugepage status."
+			einfo "Please note that TokuDB refuses to start when transparent hugepages are enabled!"
+		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-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
+
+		if use tokudb ; then
+			# Remove some unwanted files
+			rm -fv \
+				"${ED%/}"/usr/COPYING.AGPLv3 \
+				"${ED%/}"/usr/COPYING.GPLv2 \
+				"${ED%/}"/usr/PATENTS \
+				"${ED%/}"/usr/README.md \
+				|| die
+		fi
+	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-10-12 18:44 Mikle Kolyada
  0 siblings, 0 replies; 121+ messages in thread
From: Mikle Kolyada @ 2019-10-12 18:44 UTC (permalink / raw
  To: gentoo-commits

commit:     ad2f78347d5a2bd7f8b112377eb9feb67dc8a49d
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 12 18:44:13 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sat Oct 12 18:44:13 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad2f7834

dev-db/percona-server: migrate to sys-libs/pam

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

 dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild | 2 +-
 dev-db/percona-server/percona-server-5.7.27.30.ebuild    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild b/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild
index 81b46f88e3a..5c07b92757d 100644
--- a/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild
@@ -98,7 +98,7 @@ COMMON_DEPEND="net-misc/curl:=
 			net-libs/libtirpc:=
 		)
 		numa? ( sys-process/numactl )
-		pam? ( virtual/pam:0= )
+		pam? ( sys-libs/pam:0= )
 		rocksdb? (
 			app-arch/zstd:=
 			dev-libs/protobuf:=

diff --git a/dev-db/percona-server/percona-server-5.7.27.30.ebuild b/dev-db/percona-server/percona-server-5.7.27.30.ebuild
index f6e26e0c232..54ce90a8b64 100644
--- a/dev-db/percona-server/percona-server-5.7.27.30.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.27.30.ebuild
@@ -98,7 +98,7 @@ COMMON_DEPEND="net-misc/curl:=
 			net-libs/libtirpc:=
 		)
 		numa? ( sys-process/numactl )
-		pam? ( virtual/pam:0= )
+		pam? ( sys-libs/pam:0= )
 		rocksdb? (
 			app-arch/zstd:=
 			dev-libs/protobuf:=


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-10-31  1:41 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-10-31  1:41 UTC (permalink / raw
  To: gentoo-commits

commit:     1675444a6cc3f7b25911b91bf4f9076a08b5ec63
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 31 01:38:08 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Oct 31 01:41:22 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1675444a

dev-db/percona-server: bump to v8.0.17-8

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

 dev-db/percona-server/Manifest                     |    3 +
 dev-db/percona-server/metadata.xml                 |    1 +
 .../percona-server/percona-server-8.0.17.8.ebuild  | 1128 ++++++++++++++++++++
 3 files changed, 1132 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index f766c8cf7fc..27e6e7919bb 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,4 +1,7 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
+DIST boost_1_69_0.tar.bz2 95078138 BLAKE2B ccab52b911066ed41db6555fe13fbc142cd51250ad620665d3fcf25508e158b7b766f4f3654333b4a19517215ebe4a6ce14e64395b093b9604b3f0e570419841 SHA512 d0e9bb858c44880d56c0291afef6a1b011a62f659a2d8f58dcb6147ea0899f9157bd8db3097896618fee0116847ebeac78b6d0f0fec8a92c3469500828bbe552
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
+DIST mysql-extras-20191031-0134Z.tar.bz2 340718 BLAKE2B 8c228d6953aa888449a006ab1000ef3ecb1747fd055f58a8eaa5f5680b223fa840debbb7fce7404aa7ef4524ce71144a6a970483ad6536ff7521bd949f4dfa90 SHA512 6d61c4a70980759ac90fc3ac35a677a340d88f63260fb2c130ef70de0c05654895fe17b5f4915ca6d96f2406f215559182af61f7d88c1a4157e9bcbcc0f4d4e2
 DIST percona-server-5.7.26-29.tar.gz 84327421 BLAKE2B beedb4b5025c337a63ae56644e47991e90c2c0e57c6d03f1562095f9470cef4b67c8df6c3774d88dfc6ed6dfb81f9dd4b62325db30bc26802651279921bd3a2d SHA512 c8100e69f7e29a5aa2de9dddbc1a3cba9836fe485b7f829a8db0a7e5ac1d1bdabfb1360dacad90665f4c9c78ac91226209c6c15158ef449e84519e36bb06f0a1
 DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e8eb73adb3db7c761906c15eff182e54634ef091a3ffa0d4f3498a93dbfbf65cd5cdd12102871abaaaa0f32378ba3068d083b2b SHA512 d62c66de3128df87dce52292ad1671e01fe2c923e668ef0faf9cb663c11c9cd0b976345aea1de6ea2bc458d0e1066b42c022849e422121d96cea082ed12c8f4b
+DIST percona-server-8.0.17-8.tar.gz 249562136 BLAKE2B d3bf20d9fee43f17b8aef3e403e74d9c5924a5a012d0c4208b22ffffce37f48867a2a1fb7992d7837f35492d5c5871901f3e0f68cde54793090bb2c089cee310 SHA512 c875492e8b67307aef439ae54b8ff6320464ac495a2d06029f1b33b2117e56bd1c2b3ce4ba7b406c1bd6604d0016d04a5c3f36643097cbf36425d60a44b6adc3

diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
index 01da26f9882..f282af30876 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/metadata.xml
@@ -14,6 +14,7 @@
   <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="rocksdb">Add support for RocksDB; a key/value, LSM database optimized for flash storage</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="tokudb">Add support for TokuDB storage engine</flag>

diff --git a/dev-db/percona-server/percona-server-8.0.17.8.ebuild b/dev-db/percona-server/percona-server-8.0.17.8.ebuild
new file mode 100644
index 00000000000..4d7c2105e69
--- /dev/null
+++ b/dev-db/percona-server/percona-server-8.0.17.8.ebuild
@@ -0,0 +1,1128 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+MY_EXTRAS_VER="20191031-0134Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit cmake-utils flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs check-reqs
+
+MY_BOOST_VERSION="1.69.0"
+MY_PV=$(ver_rs 3 '-')
+MY_PV="${MY_PV//_pre*}"
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
+"
+
+# 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.percona.com/software/mysql-database/percona-server"
+DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
+
+# 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.17.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-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_percona-server-8.0.17-fix-libressl-support.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-8.0.16-dont-install-tokudb-misc-files.patch
+	"${MY_PATCH_DIR}"/20038_all_percona-server-8.0.16-PS-5873.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=
+	)
+	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 )
+	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 )"
+
+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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
+		-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
+
+	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
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			-DWITH_TOKUDB=$(usex tokudb 1 0)
+		)
+	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;Know failure - no upstream bug yet" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
+	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
+
+	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-10-31 12:10 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-10-31 12:10 UTC (permalink / raw
  To: gentoo-commits

commit:     5d24b3742f84b24c32c167d63573b29a4381fecc
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 31 12:10:02 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Oct 31 12:10:02 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d24b374

dev-db/percona-server: fix self block

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

 dev-db/percona-server/percona-server-8.0.17.8.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/percona-server/percona-server-8.0.17.8.ebuild b/dev-db/percona-server/percona-server-8.0.17.8.ebuild
index 4d7c2105e69..e2666362cd2 100644
--- a/dev-db/percona-server/percona-server-8.0.17.8.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.17.8.ebuild
@@ -101,7 +101,7 @@ DEPEND="${COMMON_DEPEND}
 	)
 "
 RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !dev-db/mysql-cluster
 	selinux? ( sec-policy/selinux-mysql )
 	!prefix? (
 		acct-group/mysql acct-user/mysql


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-12-09 22:01 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-12-09 22:01 UTC (permalink / raw
  To: gentoo-commits

commit:     995bdce1cfbe72851ccdc834ce6c1e23f44eafe1
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Dec  9 22:00:58 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Dec  9 22:01:15 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=995bdce1

dev-db/percona-server: re-add USE=pam

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

 dev-db/percona-server/percona-server-8.0.17.8.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dev-db/percona-server/percona-server-8.0.17.8.ebuild b/dev-db/percona-server/percona-server-8.0.17.8.ebuild
index e2666362cd2..d30980a003d 100644
--- a/dev-db/percona-server/percona-server-8.0.17.8.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.17.8.ebuild
@@ -34,7 +34,7 @@ HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server"
 DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+IUSE="cjk cracklib debug jemalloc latin1 libressl numa pam +perl profiling
 	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
 
 # Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
@@ -87,6 +87,9 @@ COMMON_DEPEND="
 	libressl? ( dev-libs/libressl:0= )
 	!libressl? ( >=dev-libs/openssl-1.0.0:0= )
 	numa? ( sys-process/numactl )
+	server? (
+		pam? ( sys-libs/pam:0= )
+	)
 	tcmalloc? ( dev-util/google-perftools:0= )
 "
 DEPEND="${COMMON_DEPEND}
@@ -308,6 +311,7 @@ src_configure(){
 		mycmakeargs+=(
 			-DWITH_EXTRA_CHARSETS=all
 			-DWITH_DEBUG=$(usex debug)
+			-DWITH_PAM=$(usex pam)
 		)
 
 		if use profiling ; then


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2019-12-31  3:30 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2019-12-31  3:30 UTC (permalink / raw
  To: gentoo-commits

commit:     8e70a3f76aca1807ca9453892783d08263e729ad
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 03:22:02 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Dec 31 03:27:17 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e70a3f7

dev-db/percona-server: 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/percona-server/percona-server-8.0.17.8.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/percona-server/percona-server-8.0.17.8.ebuild b/dev-db/percona-server/percona-server-8.0.17.8.ebuild
index 0fbc6f60a16..4bb5df6ecd4 100644
--- a/dev-db/percona-server/percona-server-8.0.17.8.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.17.8.ebuild
@@ -76,6 +76,7 @@ COMMON_DEPEND="
 	dev-libs/icu:=
 	dev-libs/libedit
 	dev-libs/libevent:=
+	>=dev-libs/protobuf-3.8:=
 	net-libs/libtirpc:=
 	>=sys-libs/zlib-1.2.3:0=
 	cjk? ( app-text/mecab:= )
@@ -95,7 +96,6 @@ COMMON_DEPEND="
 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? (


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-01-22 20:26 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-01-22 20:26 UTC (permalink / raw
  To: gentoo-commits

commit:     06a83f7538fd6af4647b2585d5e7b3e75375ba72
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 20:12:15 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Jan 22 20:25:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06a83f75

dev-db/percona-server: drop old

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

 dev-db/percona-server/Manifest                     |    4 -
 .../percona-server-5.7.26.29-r1.ebuild             | 1108 -------------------
 .../percona-server/percona-server-8.0.17.8.ebuild  | 1132 --------------------
 3 files changed, 2244 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index bee9002e731..8a3cd032910 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,10 +1,6 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
-DIST boost_1_69_0.tar.bz2 95078138 BLAKE2B ccab52b911066ed41db6555fe13fbc142cd51250ad620665d3fcf25508e158b7b766f4f3654333b4a19517215ebe4a6ce14e64395b093b9604b3f0e570419841 SHA512 d0e9bb858c44880d56c0291afef6a1b011a62f659a2d8f58dcb6147ea0899f9157bd8db3097896618fee0116847ebeac78b6d0f0fec8a92c3469500828bbe552
 DIST boost_1_70_0.tar.bz2 97887058 BLAKE2B dc7a974c6dc2662b767dbd87cb832cd1749c24fb745779d1059b73f19f7e52b33b645adfe72b0296c5e098e5cdb3b9f5eddd382374f33fbcd2ad5739287b2206 SHA512 7f2ea9636baf0210e8ed1d21ee798efb6ce23c0710ff8228b285e2214f82193bcd2d912fd435929c554289a59101c7be2e27ce798f93833f307976f0dd070b49
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
-DIST mysql-extras-20191031-0134Z.tar.bz2 340718 BLAKE2B 8c228d6953aa888449a006ab1000ef3ecb1747fd055f58a8eaa5f5680b223fa840debbb7fce7404aa7ef4524ce71144a6a970483ad6536ff7521bd949f4dfa90 SHA512 6d61c4a70980759ac90fc3ac35a677a340d88f63260fb2c130ef70de0c05654895fe17b5f4915ca6d96f2406f215559182af61f7d88c1a4157e9bcbcc0f4d4e2
 DIST mysql-extras-20200122-2007Z.tar.bz2 344188 BLAKE2B e12a9886bb0c55f1af1ea979c9b1491b65195a54f927f0060f466fe858ea9dd2faffb6eeb7acb7efd28dfb37383b6730c314ea54fbaed2ec3e54655546c883e3 SHA512 ef43324b70081214f3e02eb677bde0e4e3575d2b3b1cb7fb8da18f50ff43a9554e13d13594c0d875bd1438695725ed28a586e4f67f4f4e39054d54671f9525de
-DIST percona-server-5.7.26-29.tar.gz 84327421 BLAKE2B beedb4b5025c337a63ae56644e47991e90c2c0e57c6d03f1562095f9470cef4b67c8df6c3774d88dfc6ed6dfb81f9dd4b62325db30bc26802651279921bd3a2d SHA512 c8100e69f7e29a5aa2de9dddbc1a3cba9836fe485b7f829a8db0a7e5ac1d1bdabfb1360dacad90665f4c9c78ac91226209c6c15158ef449e84519e36bb06f0a1
 DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e8eb73adb3db7c761906c15eff182e54634ef091a3ffa0d4f3498a93dbfbf65cd5cdd12102871abaaaa0f32378ba3068d083b2b SHA512 d62c66de3128df87dce52292ad1671e01fe2c923e668ef0faf9cb663c11c9cd0b976345aea1de6ea2bc458d0e1066b42c022849e422121d96cea082ed12c8f4b
-DIST percona-server-8.0.17-8.tar.gz 249562136 BLAKE2B d3bf20d9fee43f17b8aef3e403e74d9c5924a5a012d0c4208b22ffffce37f48867a2a1fb7992d7837f35492d5c5871901f3e0f68cde54793090bb2c089cee310 SHA512 c875492e8b67307aef439ae54b8ff6320464ac495a2d06029f1b33b2117e56bd1c2b3ce4ba7b406c1bd6604d0016d04a5c3f36643097cbf36425d60a44b6adc3
 DIST percona-server-8.0.18-9.tar.gz 256867152 BLAKE2B 34c7b7b320f973313ecd95e658999a17748fc70ff46b1dc58144df02c17b7870cf33d68a555ee8aaaecb66c5b1003e6023154f7100a6f413514e89d495330dd2 SHA512 ce537a160b48e7c3dc35b15a293c39142a5b633111b5c9c5f9c1150476f0faa5e9cf81b34c9ca85286463455e3ae3fce7a200d253d880e3b67b3c71eefdbdcd4

diff --git a/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild b/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild
deleted file mode 100644
index 6f2590a7c1a..00000000000
--- a/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild
+++ /dev/null
@@ -1,1108 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20190822-1908Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Python2 required for innodb_stress.innodb_stress{,_blob,_crash} test
-PYTHON_COMPAT=( python2_7 )
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eapi7-ver cmake-utils eutils flag-o-matic linux-info \
-	prefix python-any-r1 toolchain-funcs multilib-minimal
-
-MY_PV=$(ver_rs 3 '-')
-MY_PN="Percona-Server"
-MY_P="${PN}-${MY_PV}"
-MY_MAJOR_PV=$(ver_cut 1-2)
-MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/5.7/release-notes/release-notes_index.html"
-
-SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
-	mirror://sourceforge/boost/boost_1_59_0.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.percona.com/software/mysql-database/percona-server"
-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 pam +perl profiling rocksdb
-	selinux +server static static-libs systemtap tcmalloc test tokudb tokudb-backup-plugin 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 ~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}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
-	"${MY_PATCH_DIR}"/20018_all_percona-server-5.7.26-without-clientlibs-tools.patch
-	"${MY_PATCH_DIR}"/20018_all_percona-server-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_percona-server-5.7.23-rocksdb-use-system-libs.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 )
-		pam? ( sys-libs/pam:0= )
-		rocksdb? (
-			app-arch/zstd:=
-			dev-libs/protobuf:=
-		)
-		tokudb? (
-			app-arch/snappy:=
-			app-arch/xz-utils:=
-		)
-		tokudb-backup-plugin? ( dev-util/valgrind )
-	)
-	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
-		|| (
-			$(python_gen_any_dep 'dev-python/mysqlclient[${PYTHON_USEDEP}]')
-			$(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
-		)
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !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 )"
-
-python_check_deps() {
-	has_version "dev-python/mysqlclient[${PYTHON_USEDEP}]" \
-		|| has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
-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
-
-		use test && python-any-r1_pkg_setup
-	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)/libperconaserverclient.so" ]] ; then
-		libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libperconaserverclient.so")
-		elog "Due to ABI changes when switching between different client libraries,"
-		elog "revdep-rebuild must find and rebuild all packages linking to libperconaserverclient."
-		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}/${MY_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
-
-	# Don't build bundled xz-utils
-	if [[ -d "${S}/storage/tokudb/ft-index" ]] ; then
-		echo > "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die
-		sed -i 's/ build_lzma//' "${S}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die
-	elif [[ -d "${S}/storage/tokudb/PerconaFT" ]] ; then
-		echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
-		sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
-		sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
-	fi
-
-	if [[ -d "${S}/plugin/tokudb-backup-plugin" ]] && ! use tokudb-backup-plugin ; then
-		 rm -r "${S}/plugin/tokudb-backup-plugin/Percona-TokuBackup" || 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}"/storage/rocksdb/third_party \
-		"${S}"/storage/tokudb/PerconaFT/third_party \
-		"${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
-
-	# 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
-}
-
-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 tokudb ; then
-		# https://jira.percona.com/browse/PS-4399
-		append-cxxflags -Wno-error=shadow
-	fi
-
-	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="${WORKDIR}/boost_1_59_0"
-		-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_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
-			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
-			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
-			$(usex tokudb '' -DWITHOUT_TOKUDB=1)
-		)
-
-		if use tokudb ; then
-			# TokuDB Backup plugin requires valgrind unconditionally
-			mycmakeargs+=(
-				$(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
-			)
-		fi
-
-	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 percona-server-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 Percona-Server 5.7 for now and are believed to be
-	# false positives or are known to fail:
-	#
-	# group_replication.gr_communication_configuration: requires a valid local network address
-	#                                                   which clashes with FEATURES=network-sandbox
-	# innodb.xtradb_compressed_columns_consistency:     long running test which tends to timeout
-	#                                                   on a busy host
-	# keyring_vault.keyring_vault_timeout:              requires network access to vault.public-ci.percona.com
-	#                                                   which clashes with FEATURES=network-sandbox
-	# rocksdb.prefix_extractor_override:                https://jira.percona.com/browse/PS-5199
-	# rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch:   https://bugs.mysql.com/bug.php?id=89223
-	# rpl.rpl_multi_source_mts_reset_worker_info:       https://jira.percona.com/browse/PS-3786
-	# tokudb.bugs.5733_tokudb:                          https://jira.percona.com/browse/PS-4274
-	# x.crud_insert_cast:                               https://jira.percona.com/browse/PS-5032
-	# x.insert_table_bad_column:                        https://jira.percona.com/browse/PS-5032
-	# x.insert_table_bad_numcolumns:                    https://jira.percona.com/browse/PS-5032
-	# x.insert_table_bad_column_type:                   https://jira.percona.com/browse/PS-5032
-	# x.insert_table:                                   https://jira.percona.com/browse/PS-5032
-	# x.update_crud_arrayappend_o:                      https://jira.percona.com/browse/PS-5032
-	# x.update_crud_arrayinsert_o:                      https://jira.percona.com/browse/PS-5032
-	# x.mysqlxtest_help:                                https://jira.percona.com/browse/PS-5019
-	# x.admin_kill_client_mysqlx:                       https://jira.percona.com/browse/PS-5019
-	#
-	local t
-
-	for t in \
-		group_replication.gr_communication_configuration \
-		innodb.xtradb_compressed_columns_consistency \
-		keyring_vault.keyring_vault_timeout \
-		rocksdb.prefix_extractor_override \
-		rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
-		rpl.rpl_multi_source_mts_reset_worker_info \
-		tokudb.bugs.5733_tokudb \
-		x.crud_insert_cast \
-		x.insert_table_bad_column \
-		x.insert_table_bad_numcolumns \
-		x.insert_table_bad_column_type \
-		x.insert_table \
-		x.update_crud_arrayappend_o \
-		x.update_crud_arrayinsert_o \
-		x.mysqlxtest_help \
-		x.admin_kill_client_mysqlx \
-	; do
-			_disable_test "$t" "False positives in Gentoo / Known bug"
-	done
-
-	if has_version ">=dev-libs/openssl-1.1.1" ; then
-		for t in \
-			main.ssl_8k_key \
-			auth_sec.mysql_ssl_connection \
-			main.ssl_verify_identity \
-			main.ssl_crl \
-			main.grant_alter_user_qa \
-			auth_sec.ssl_auto_detect \
-			encryption.innodb_onlinealter_encryption \
-			main.ssl_ca \
-			main.ssl_cipher \
-			main.grant_user_lock_qa \
-			auth_sec.openssl_cert_generation \
-			main.ssl_bug75311 \
-			main.ssl_compress \
-			main.ssl \
-			main.plugin_auth_sha256_tls \
-			main.ssl_ecdh \
-			main.openssl_1 \
-			auth_sec.cert_verify \
-			main.mysql_ssl_default \
-			main.percona_tls \
-			auth_sec.tls \
-			auth_sec.ssl_mode \
-			binlog.binlog_grant_alter_user \
-			x.connection_tls_version \
-			x.connection_openssl \
-		; do
-			_disable_test "$t" "Known >=openssl-1.1.1 failures"
-		done
-	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 tokudb ; then
-		if [[ -f "/sys/kernel/mm/transparent_hugepage/enabled" ]] ; then
-			if grep -q -E "\[always\]" /sys/kernel/mm/transparent_hugepage/enabled &>/dev/null ; then
-				# TokuDB refuses to start when transparent hugepages are enabled
-				for t in \
-					tokudb.rows-32m-rand-insert \
-					tokudb.savepoint-2 \
-					tokudb.savepoint-3 \
-					tokudb.savepoint-4 \
-					tokudb.savepoint-1078 \
-					tokudb.savepoint-1078-2 \
-					tokudb.savepoint-1078-3 \
-					tokudb.savepoint-1078-4 \
-				; do
-						_disable_test "$t" "TokuDB will not work with transparent hugepages enabled"
-				done
-			fi
-		else
-			einfo "Cannot determine transparent hugepage status."
-			einfo "Please note that TokuDB refuses to start when transparent hugepages are enabled!"
-		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-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
-
-		if use tokudb ; then
-			# Remove some unwanted files
-			rm -fv \
-				"${ED%/}"/usr/COPYING.AGPLv3 \
-				"${ED%/}"/usr/COPYING.GPLv2 \
-				"${ED%/}"/usr/PATENTS \
-				"${ED%/}"/usr/README.md \
-				|| die
-		fi
-	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/percona-server/percona-server-8.0.17.8.ebuild b/dev-db/percona-server/percona-server-8.0.17.8.ebuild
deleted file mode 100644
index 4bb5df6ecd4..00000000000
--- a/dev-db/percona-server/percona-server-8.0.17.8.ebuild
+++ /dev/null
@@ -1,1132 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-MY_EXTRAS_VER="20191031-0134Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit cmake-utils flag-o-matic linux-info \
-	multiprocessing prefix toolchain-funcs check-reqs
-
-MY_BOOST_VERSION="1.69.0"
-MY_PV=$(ver_rs 3 '-')
-MY_PV="${MY_PV//_pre*}"
-MY_PN="Percona-Server"
-MY_P="${PN}-${MY_PV}"
-MY_MAJOR_PV=$(ver_cut 1-2)
-MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
-
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
-	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
-"
-
-# 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.percona.com/software/mysql-database/percona-server"
-DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="cjk cracklib debug jemalloc latin1 libressl numa pam +perl profiling
-	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
-
-# 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_percona-server-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_percona-server-8.0.17-fix-libressl-support.patch
-	"${MY_PATCH_DIR}"/20018_all_percona-server-8.0.16-dont-install-tokudb-misc-files.patch
-	"${MY_PATCH_DIR}"/20038_all_percona-server-8.0.16-PS-5873.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:=
-	>=dev-libs/protobuf-3.8:=
-	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 )
-	server? (
-		pam? ( sys-libs/pam: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
-	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/mysql !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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
-		-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
-
-	if use server ; then
-		mycmakeargs+=(
-			-DWITH_EXTRA_CHARSETS=all
-			-DWITH_DEBUG=$(usex debug)
-			-DWITH_PAM=$(usex pam)
-		)
-
-		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
-			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
-			-DWITH_TOKUDB=$(usex tokudb 1 0)
-		)
-	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;Know failure - no upstream bug yet" )
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
-	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
-	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
-
-	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-01-22 20:26 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-01-22 20:26 UTC (permalink / raw
  To: gentoo-commits

commit:     6a89c9796d557e4611248fe359578cf3210c7ec8
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 20:11:32 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Jan 22 20:25:49 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a89c979

dev-db/percona-server: bump to v8.0.18-9

Closes: https://bugs.gentoo.org/699010
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 dev-db/percona-server/Manifest                     |    3 +
 .../percona-server/percona-server-8.0.18.9.ebuild  | 1147 ++++++++++++++++++++
 2 files changed, 1150 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 27e6e7919bb..bee9002e731 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,7 +1,10 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST boost_1_69_0.tar.bz2 95078138 BLAKE2B ccab52b911066ed41db6555fe13fbc142cd51250ad620665d3fcf25508e158b7b766f4f3654333b4a19517215ebe4a6ce14e64395b093b9604b3f0e570419841 SHA512 d0e9bb858c44880d56c0291afef6a1b011a62f659a2d8f58dcb6147ea0899f9157bd8db3097896618fee0116847ebeac78b6d0f0fec8a92c3469500828bbe552
+DIST boost_1_70_0.tar.bz2 97887058 BLAKE2B dc7a974c6dc2662b767dbd87cb832cd1749c24fb745779d1059b73f19f7e52b33b645adfe72b0296c5e098e5cdb3b9f5eddd382374f33fbcd2ad5739287b2206 SHA512 7f2ea9636baf0210e8ed1d21ee798efb6ce23c0710ff8228b285e2214f82193bcd2d912fd435929c554289a59101c7be2e27ce798f93833f307976f0dd070b49
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST mysql-extras-20191031-0134Z.tar.bz2 340718 BLAKE2B 8c228d6953aa888449a006ab1000ef3ecb1747fd055f58a8eaa5f5680b223fa840debbb7fce7404aa7ef4524ce71144a6a970483ad6536ff7521bd949f4dfa90 SHA512 6d61c4a70980759ac90fc3ac35a677a340d88f63260fb2c130ef70de0c05654895fe17b5f4915ca6d96f2406f215559182af61f7d88c1a4157e9bcbcc0f4d4e2
+DIST mysql-extras-20200122-2007Z.tar.bz2 344188 BLAKE2B e12a9886bb0c55f1af1ea979c9b1491b65195a54f927f0060f466fe858ea9dd2faffb6eeb7acb7efd28dfb37383b6730c314ea54fbaed2ec3e54655546c883e3 SHA512 ef43324b70081214f3e02eb677bde0e4e3575d2b3b1cb7fb8da18f50ff43a9554e13d13594c0d875bd1438695725ed28a586e4f67f4f4e39054d54671f9525de
 DIST percona-server-5.7.26-29.tar.gz 84327421 BLAKE2B beedb4b5025c337a63ae56644e47991e90c2c0e57c6d03f1562095f9470cef4b67c8df6c3774d88dfc6ed6dfb81f9dd4b62325db30bc26802651279921bd3a2d SHA512 c8100e69f7e29a5aa2de9dddbc1a3cba9836fe485b7f829a8db0a7e5ac1d1bdabfb1360dacad90665f4c9c78ac91226209c6c15158ef449e84519e36bb06f0a1
 DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e8eb73adb3db7c761906c15eff182e54634ef091a3ffa0d4f3498a93dbfbf65cd5cdd12102871abaaaa0f32378ba3068d083b2b SHA512 d62c66de3128df87dce52292ad1671e01fe2c923e668ef0faf9cb663c11c9cd0b976345aea1de6ea2bc458d0e1066b42c022849e422121d96cea082ed12c8f4b
 DIST percona-server-8.0.17-8.tar.gz 249562136 BLAKE2B d3bf20d9fee43f17b8aef3e403e74d9c5924a5a012d0c4208b22ffffce37f48867a2a1fb7992d7837f35492d5c5871901f3e0f68cde54793090bb2c089cee310 SHA512 c875492e8b67307aef439ae54b8ff6320464ac495a2d06029f1b33b2117e56bd1c2b3ce4ba7b406c1bd6604d0016d04a5c3f36643097cbf36425d60a44b6adc3
+DIST percona-server-8.0.18-9.tar.gz 256867152 BLAKE2B 34c7b7b320f973313ecd95e658999a17748fc70ff46b1dc58144df02c17b7870cf33d68a555ee8aaaecb66c5b1003e6023154f7100a6f413514e89d495330dd2 SHA512 ce537a160b48e7c3dc35b15a293c39142a5b633111b5c9c5f9c1150476f0faa5e9cf81b34c9ca85286463455e3ae3fce7a200d253d880e3b67b3c71eefdbdcd4

diff --git a/dev-db/percona-server/percona-server-8.0.18.9.ebuild b/dev-db/percona-server/percona-server-8.0.18.9.ebuild
new file mode 100644
index 00000000000..86ea26ade39
--- /dev/null
+++ b/dev-db/percona-server/percona-server-8.0.18.9.ebuild
@@ -0,0 +1,1147 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+MY_EXTRAS_VER="20200122-2007Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit cmake-utils flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs check-reqs
+
+MY_BOOST_VERSION="1.70.0"
+MY_PV=$(ver_rs 3 '-')
+MY_PV="${MY_PV//_pre*}"
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
+"
+
+# 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.percona.com/software/mysql-database/percona-server"
+DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="cjk cracklib debug jemalloc latin1 libressl numa pam +perl profiling
+	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
+
+# 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_percona-server-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_percona-server-8.0.18-fix-libressl-support.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-8.0.16-dont-install-tokudb-misc-files.patch
+	"${MY_PATCH_DIR}"/20038_all_percona-server-8.0.16-PS-5873.patch
+	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.19-fix-events_bugs-test.patch
+	"${MY_PATCH_DIR}"/20018_all_percona-server-8.0.18-fix-building-with-make-4.3.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=
+	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:=
+		net-misc/curl:=
+		cjk? ( app-text/mecab:= )
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		pam? ( sys-libs/pam: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/mysql !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)
+		# 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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
+		-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_LIBEVENT=system
+			-DWITH_MECAB=$(usex cjk system OFF)
+			-DWITH_NUMA=$(usex numa ON OFF)
+			-DWITH_PAM=$(usex pam)
+			-DWITH_PROTOBUF=system
+		)
+
+		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
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			-DWITH_TOKUDB=$(usex tokudb 1 0)
+		)
+	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;Know failure - no upstream bug yet" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
+	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
+	disabled_tests+=( "x.message_protobuf_nested;6803;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
+
+	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-01-25 19:53 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-01-25 19:53 UTC (permalink / raw
  To: gentoo-commits

commit:     2af8d2fd8f9571a3d194e85ea4cf5a66c10d7b71
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 25 19:53:19 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Jan 25 19:53:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2af8d2fd

dev-db/percona-server: 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/percona-server/Manifest                       | 2 +-
 dev-db/percona-server/percona-server-8.0.18.9.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 8a3cd032910..bda335417e2 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,6 +1,6 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST boost_1_70_0.tar.bz2 97887058 BLAKE2B dc7a974c6dc2662b767dbd87cb832cd1749c24fb745779d1059b73f19f7e52b33b645adfe72b0296c5e098e5cdb3b9f5eddd382374f33fbcd2ad5739287b2206 SHA512 7f2ea9636baf0210e8ed1d21ee798efb6ce23c0710ff8228b285e2214f82193bcd2d912fd435929c554289a59101c7be2e27ce798f93833f307976f0dd070b49
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
-DIST mysql-extras-20200122-2007Z.tar.bz2 344188 BLAKE2B e12a9886bb0c55f1af1ea979c9b1491b65195a54f927f0060f466fe858ea9dd2faffb6eeb7acb7efd28dfb37383b6730c314ea54fbaed2ec3e54655546c883e3 SHA512 ef43324b70081214f3e02eb677bde0e4e3575d2b3b1cb7fb8da18f50ff43a9554e13d13594c0d875bd1438695725ed28a586e4f67f4f4e39054d54671f9525de
+DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1
 DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e8eb73adb3db7c761906c15eff182e54634ef091a3ffa0d4f3498a93dbfbf65cd5cdd12102871abaaaa0f32378ba3068d083b2b SHA512 d62c66de3128df87dce52292ad1671e01fe2c923e668ef0faf9cb663c11c9cd0b976345aea1de6ea2bc458d0e1066b42c022849e422121d96cea082ed12c8f4b
 DIST percona-server-8.0.18-9.tar.gz 256867152 BLAKE2B 34c7b7b320f973313ecd95e658999a17748fc70ff46b1dc58144df02c17b7870cf33d68a555ee8aaaecb66c5b1003e6023154f7100a6f413514e89d495330dd2 SHA512 ce537a160b48e7c3dc35b15a293c39142a5b633111b5c9c5f9c1150476f0faa5e9cf81b34c9ca85286463455e3ae3fce7a200d253d880e3b67b3c71eefdbdcd4

diff --git a/dev-db/percona-server/percona-server-8.0.18.9.ebuild b/dev-db/percona-server/percona-server-8.0.18.9.ebuild
index 86ea26ade39..a3c7cca8223 100644
--- a/dev-db/percona-server/percona-server-8.0.18.9.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.18.9.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
-MY_EXTRAS_VER="20200122-2007Z"
+MY_EXTRAS_VER="20200125-1945Z"
 
 CMAKE_MAKEFILE_GENERATOR=emake
 


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-02-08 17:06 David Seifert
  0 siblings, 0 replies; 121+ messages in thread
From: David Seifert @ 2020-02-08 17:06 UTC (permalink / raw
  To: gentoo-commits

commit:     8b6bab1aefa0e2deaa0e4aff9e673c9d23131866
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  8 17:05:07 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Feb  8 17:05:07 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b6bab1a

dev-db/percona-server: [QA] Remove unnecessary -DCMAKE_INSTALL_PREFIX arguments

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-db/percona-server/percona-server-5.7.27.30.ebuild | 1 -
 dev-db/percona-server/percona-server-8.0.18.9.ebuild  | 1 -
 2 files changed, 2 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.7.27.30.ebuild b/dev-db/percona-server/percona-server-5.7.27.30.ebuild
index 1a748045c83..e936725d18d 100644
--- a/dev-db/percona-server/percona-server-5.7.27.30.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.27.30.ebuild
@@ -395,7 +395,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/percona-server/percona-server-8.0.18.9.ebuild b/dev-db/percona-server/percona-server-8.0.18.9.ebuild
index a3c7cca8223..93fbfaacf7f 100644
--- a/dev-db/percona-server/percona-server-8.0.18.9.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.18.9.ebuild
@@ -233,7 +233,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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-03-17  1:07 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-03-17  1:07 UTC (permalink / raw
  To: gentoo-commits

commit:     e88e9befc9c78bde1469f924ef10d3d21ccefbfd
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 17 01:07:24 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Mar 17 01:07:36 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e88e9bef

dev-db/percona-server: 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/percona-server/Manifest                       | 2 +-
 dev-db/percona-server/percona-server-8.0.18.9.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index bda335417e2..d14e6835d49 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,6 +1,6 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST boost_1_70_0.tar.bz2 97887058 BLAKE2B dc7a974c6dc2662b767dbd87cb832cd1749c24fb745779d1059b73f19f7e52b33b645adfe72b0296c5e098e5cdb3b9f5eddd382374f33fbcd2ad5739287b2206 SHA512 7f2ea9636baf0210e8ed1d21ee798efb6ce23c0710ff8228b285e2214f82193bcd2d912fd435929c554289a59101c7be2e27ce798f93833f307976f0dd070b49
 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
 DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e8eb73adb3db7c761906c15eff182e54634ef091a3ffa0d4f3498a93dbfbf65cd5cdd12102871abaaaa0f32378ba3068d083b2b SHA512 d62c66de3128df87dce52292ad1671e01fe2c923e668ef0faf9cb663c11c9cd0b976345aea1de6ea2bc458d0e1066b42c022849e422121d96cea082ed12c8f4b
 DIST percona-server-8.0.18-9.tar.gz 256867152 BLAKE2B 34c7b7b320f973313ecd95e658999a17748fc70ff46b1dc58144df02c17b7870cf33d68a555ee8aaaecb66c5b1003e6023154f7100a6f413514e89d495330dd2 SHA512 ce537a160b48e7c3dc35b15a293c39142a5b633111b5c9c5f9c1150476f0faa5e9cf81b34c9ca85286463455e3ae3fce7a200d253d880e3b67b3c71eefdbdcd4

diff --git a/dev-db/percona-server/percona-server-8.0.18.9.ebuild b/dev-db/percona-server/percona-server-8.0.18.9.ebuild
index 55c42cf99f5..8cfab4888b9 100644
--- a/dev-db/percona-server/percona-server-8.0.18.9.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.18.9.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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-03-19  3:47 Matt Turner
  0 siblings, 0 replies; 121+ messages in thread
From: Matt Turner @ 2020-03-19  3:47 UTC (permalink / raw
  To: gentoo-commits

commit:     20e06a3f7ff812f9e068e85995356d891b4de547
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 19 03:35:42 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Mar 19 03:47:00 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20e06a3f

dev-db/percona-server: drop alpha keywords

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 dev-db/percona-server/percona-server-5.7.27.30.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/percona-server/percona-server-5.7.27.30.ebuild b/dev-db/percona-server/percona-server-5.7.27.30.ebuild
index 200a7c0f743..300c67c7036 100644
--- a/dev-db/percona-server/percona-server-5.7.27.30.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.27.30.ebuild
@@ -43,7 +43,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


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

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

commit:     99940d3fc6c2aa5383a3aa25d4937c76d95e44e9
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 30 17:47:52 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Apr 30 20:44:54 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99940d3f

dev-db/percona-server: bump to v8.0.19-10

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

 dev-db/percona-server/Manifest                     |    2 +
 .../percona-server/percona-server-8.0.19.10.ebuild | 1148 ++++++++++++++++++++
 2 files changed, 1150 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index d14e6835d49..d6e859f244c 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -4,3 +4,5 @@ DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d898281
 DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f
 DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e8eb73adb3db7c761906c15eff182e54634ef091a3ffa0d4f3498a93dbfbf65cd5cdd12102871abaaaa0f32378ba3068d083b2b SHA512 d62c66de3128df87dce52292ad1671e01fe2c923e668ef0faf9cb663c11c9cd0b976345aea1de6ea2bc458d0e1066b42c022849e422121d96cea082ed12c8f4b
 DIST percona-server-8.0.18-9.tar.gz 256867152 BLAKE2B 34c7b7b320f973313ecd95e658999a17748fc70ff46b1dc58144df02c17b7870cf33d68a555ee8aaaecb66c5b1003e6023154f7100a6f413514e89d495330dd2 SHA512 ce537a160b48e7c3dc35b15a293c39142a5b633111b5c9c5f9c1150476f0faa5e9cf81b34c9ca85286463455e3ae3fce7a200d253d880e3b67b3c71eefdbdcd4
+DIST percona-server-8.0.19-10.tar.gz 490703179 BLAKE2B 731e9498c4934eb53451c202e8b1de93618190d9b6334b761428ab223756d515d958db77515517e6b5db3ba6cd908c8b238c18b63f4c73b256ec251f8b161ff3 SHA512 39aa805474c6655980e70c97e0d2c0f21ae16e2c1e2e9c7e1d615f46320f1615620368fbdfc24f5d1784aae856090856c3ccda3d6f09ed86c6c9ffe3197be90e
+DIST percona-server-8.0.19.10-patches-01.tar.xz 8288 BLAKE2B 2f79c538ac1512b052210439a27b71491917cb9eab08ac3a3b21c188458c2989f0c998d973b8dd654a7d7606acd70ccf374f1e2f5e0088d0c6b96a794dc4c4a5 SHA512 43313797ec405be82f15745185bfab25fda093045f981a8caa8a019522e432415e4b3cca4ca5ffb735d102f98b3c2fccafccbd4695bd2d1f011707f709fcc2b3

diff --git a/dev-db/percona-server/percona-server-8.0.19.10.ebuild b/dev-db/percona-server/percona-server-8.0.19.10.ebuild
new file mode 100644
index 00000000000..1058698b5f1
--- /dev/null
+++ b/dev-db/percona-server/percona-server-8.0.19.10.ebuild
@@ -0,0 +1,1148 @@
+# 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_BOOST_VERSION="1.70.0"
+MY_PV=$(ver_rs 3 '-')
+MY_PV="${MY_PV//_pre*}"
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.19.10-patches-01.tar.xz"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
+	${PATCH_SET}
+"
+
+HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
+DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="cjk cracklib debug jemalloc latin1 libressl numa pam +perl profiling
+	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
+
+# 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:=
+		net-misc/curl:=
+		cjk? ( app-text/mecab:= )
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		pam? ( sys-libs/pam: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/mysql !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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
+		-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)
+			-DWITH_PAM=$(usex pam)
+		)
+
+		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
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			-DWITH_TOKUDB=$(usex tokudb 1 0)
+		)
+	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+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" )
+	disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" )
+	disabled_tests+=( "main.myisam-blob;0;Sporadic failing test" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
+	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
+	disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
+	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;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.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;6803;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
+
+	if [[ -z "${MTR_VAULT_TOKEN}" ]] ; then
+		local impossible_test
+		for impossible_test in \
+			encryption.default_table_encryption_var \
+			keyring_vault.innodb_online_alter_encryption \
+			keyring_vault.innodb_row_log_encryption \
+			keyring_vault.install_keyring_vault \
+			keyring_vault.keyring_udf \
+			keyring_vault.keyring_vault_config \
+			keyring_vault.keyring_vault_config_qa \
+			keyring_vault.keyring_vault_timeout \
+			keyring_vault.key_rotation_qa \
+			keyring_vault.rpl_key_rotation \
+			keyring_vault.table_encrypt_2 \
+			keyring_vault.table_encrypt_2_directory \
+			keyring_vault.table_encrypt_2_keyring \
+			keyring_vault.table_encrypt_5 \
+			keyring_vault.table_encrypt_5_directory \
+			keyring_vault.table_encrypt_kill \
+			keyring_vault.temp_table_encrypt_keyring_vault \
+		; do
+			_disable_test "${impossible_test}" "0" "MTR_VAULT_TOKEN is not 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() {
+	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-05-02  8:04 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-05-02  8:04 UTC (permalink / raw
  To: gentoo-commits

commit:     a1a0aa9fff35b9f4e32b068edd21dec26a533eba
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat May  2 08:03:41 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat May  2 08:03:58 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1a0aa9f

dev-db/percona-server: update required disk space

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

 dev-db/percona-server/percona-server-8.0.19.10.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/percona-server/percona-server-8.0.19.10.ebuild b/dev-db/percona-server/percona-server-8.0.19.10.ebuild
index 1058698b5f1..ddd3e89b9be 100644
--- a/dev-db/percona-server/percona-server-8.0.19.10.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.19.10.ebuild
@@ -94,7 +94,7 @@ RDEPEND="${COMMON_DEPEND}
 # dev-perl/DBD-mysql is needed by some scripts installed by MySQL
 PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
 
-CHECKREQS_DISK_BUILD="8G"
+CHECKREQS_DISK_BUILD="9G"
 
 mysql_init_vars() {
 	: ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-05-04 16:01 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-05-04 16:01 UTC (permalink / raw
  To: gentoo-commits

commit:     451bc86d3939704990ec941f11ccb26ab72c14a5
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon May  4 15:30:36 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon May  4 16:00:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=451bc86d

dev-db/percona-server: disable more tests

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

 dev-db/percona-server/percona-server-8.0.19.10.ebuild | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dev-db/percona-server/percona-server-8.0.19.10.ebuild b/dev-db/percona-server/percona-server-8.0.19.10.ebuild
index ddd3e89b9be..0eb015df2a8 100644
--- a/dev-db/percona-server/percona-server-8.0.19.10.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.19.10.ebuild
@@ -405,12 +405,18 @@ src_test() {
 	disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
 	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;6804;Known rounding error with latest AMD processors" )
 	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.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
 	disabled_tests+=( "x.message_protobuf_nested;6803;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_ds
 	for test_infos_str in "${disabled_tests[@]}" ; do
 		IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-05-25 11:57 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-05-25 11:57 UTC (permalink / raw
  To: gentoo-commits

commit:     aea109af79202aa443e04d7861951d822fc8761f
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon May 25 11:56:07 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon May 25 11:56:07 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aea109af

dev-db/percona-server: fix pkg_config

Backport of commit ab0818d2ba2fd2ab8efa5e1ba9bcb2503975a8b1.

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

 .../percona-server/percona-server-8.0.19.10.ebuild | 183 ++++++++++++---------
 1 file changed, 106 insertions(+), 77 deletions(-)

diff --git a/dev-db/percona-server/percona-server-8.0.19.10.ebuild b/dev-db/percona-server/percona-server-8.0.19.10.ebuild
index 0eb015df2a8..58abf336ca0 100644
--- a/dev-db/percona-server/percona-server-8.0.19.10.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.19.10.ebuild
@@ -598,43 +598,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}="
@@ -699,6 +662,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"
 
@@ -718,8 +716,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'")"
@@ -773,7 +769,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
@@ -786,28 +782,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!"
 
@@ -815,6 +791,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}" \
@@ -832,7 +826,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
@@ -857,7 +851,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
@@ -865,6 +859,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"
@@ -910,6 +942,8 @@ pkg_config() {
 					;;
 			esac
 
+			echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
 			unset user_answer
 		fi
 
@@ -1015,19 +1049,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=(
@@ -1050,15 +1081,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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-05-25 11:57 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-05-25 11:57 UTC (permalink / raw
  To: gentoo-commits

commit:     ae1e4c326685d50d189008a30022de321f8d765f
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon May 25 11:57:08 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon May 25 11:57:08 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae1e4c32

dev-db/percona-server: drop old

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

 dev-db/percona-server/Manifest                     |    2 -
 .../percona-server/percona-server-8.0.18.9.ebuild  | 1146 --------------------
 2 files changed, 1148 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index d6e859f244c..c18584ba690 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,8 +1,6 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST boost_1_70_0.tar.bz2 97887058 BLAKE2B dc7a974c6dc2662b767dbd87cb832cd1749c24fb745779d1059b73f19f7e52b33b645adfe72b0296c5e098e5cdb3b9f5eddd382374f33fbcd2ad5739287b2206 SHA512 7f2ea9636baf0210e8ed1d21ee798efb6ce23c0710ff8228b285e2214f82193bcd2d912fd435929c554289a59101c7be2e27ce798f93833f307976f0dd070b49
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
-DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f
 DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e8eb73adb3db7c761906c15eff182e54634ef091a3ffa0d4f3498a93dbfbf65cd5cdd12102871abaaaa0f32378ba3068d083b2b SHA512 d62c66de3128df87dce52292ad1671e01fe2c923e668ef0faf9cb663c11c9cd0b976345aea1de6ea2bc458d0e1066b42c022849e422121d96cea082ed12c8f4b
-DIST percona-server-8.0.18-9.tar.gz 256867152 BLAKE2B 34c7b7b320f973313ecd95e658999a17748fc70ff46b1dc58144df02c17b7870cf33d68a555ee8aaaecb66c5b1003e6023154f7100a6f413514e89d495330dd2 SHA512 ce537a160b48e7c3dc35b15a293c39142a5b633111b5c9c5f9c1150476f0faa5e9cf81b34c9ca85286463455e3ae3fce7a200d253d880e3b67b3c71eefdbdcd4
 DIST percona-server-8.0.19-10.tar.gz 490703179 BLAKE2B 731e9498c4934eb53451c202e8b1de93618190d9b6334b761428ab223756d515d958db77515517e6b5db3ba6cd908c8b238c18b63f4c73b256ec251f8b161ff3 SHA512 39aa805474c6655980e70c97e0d2c0f21ae16e2c1e2e9c7e1d615f46320f1615620368fbdfc24f5d1784aae856090856c3ccda3d6f09ed86c6c9ffe3197be90e
 DIST percona-server-8.0.19.10-patches-01.tar.xz 8288 BLAKE2B 2f79c538ac1512b052210439a27b71491917cb9eab08ac3a3b21c188458c2989f0c998d973b8dd654a7d7606acd70ccf374f1e2f5e0088d0c6b96a794dc4c4a5 SHA512 43313797ec405be82f15745185bfab25fda093045f981a8caa8a019522e432415e4b3cca4ca5ffb735d102f98b3c2fccafccbd4695bd2d1f011707f709fcc2b3

diff --git a/dev-db/percona-server/percona-server-8.0.18.9.ebuild b/dev-db/percona-server/percona-server-8.0.18.9.ebuild
deleted file mode 100644
index 8cfab4888b9..00000000000
--- a/dev-db/percona-server/percona-server-8.0.18.9.ebuild
+++ /dev/null
@@ -1,1146 +0,0 @@
-# Copyright 1999-2020 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_BOOST_VERSION="1.70.0"
-MY_PV=$(ver_rs 3 '-')
-MY_PV="${MY_PV//_pre*}"
-MY_PN="Percona-Server"
-MY_P="${PN}-${MY_PV}"
-MY_MAJOR_PV=$(ver_cut 1-2)
-MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
-
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
-	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
-"
-
-# 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.percona.com/software/mysql-database/percona-server"
-DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="cjk cracklib debug jemalloc latin1 libressl numa pam +perl profiling
-	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
-
-# 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_percona-server-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_percona-server-8.0.18-fix-libressl-support.patch
-	"${MY_PATCH_DIR}"/20018_all_percona-server-8.0.16-dont-install-tokudb-misc-files.patch
-	"${MY_PATCH_DIR}"/20038_all_percona-server-8.0.16-PS-5873.patch
-	"${MY_PATCH_DIR}"/20018_all_mysql-8.0.19-fix-events_bugs-test.patch
-	"${MY_PATCH_DIR}"/20018_all_percona-server-8.0.18-fix-building-with-make-4.3.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=
-	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:=
-		net-misc/curl:=
-		cjk? ( app-text/mecab:= )
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-		pam? ( sys-libs/pam: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/mysql !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')"
-		-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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
-		-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_LIBEVENT=system
-			-DWITH_MECAB=$(usex cjk system OFF)
-			-DWITH_NUMA=$(usex numa ON OFF)
-			-DWITH_PAM=$(usex pam)
-			-DWITH_PROTOBUF=system
-		)
-
-		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
-			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
-			-DWITH_TOKUDB=$(usex tokudb 1 0)
-		)
-	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;Know failure - no upstream bug yet" )
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
-	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
-	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
-	disabled_tests+=( "x.message_protobuf_nested;6803;False positive caused by protobuff-3.11+" )
-	disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
-
-	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-07-25  1:32 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-07-25  1:32 UTC (permalink / raw
  To: gentoo-commits

commit:     104ca17a660b2b74bace66c46a466aad9da50666
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 25 01:32:11 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Jul 25 01:32:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=104ca17a

dev-db/percona-server: bump to v8.0.20-11

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

 dev-db/percona-server/Manifest                     |    2 +
 .../percona-server/percona-server-8.0.20.11.ebuild | 1199 ++++++++++++++++++++
 2 files changed, 1201 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index c18584ba690..fee4b5bef11 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -4,3 +4,5 @@ DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d898281
 DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e8eb73adb3db7c761906c15eff182e54634ef091a3ffa0d4f3498a93dbfbf65cd5cdd12102871abaaaa0f32378ba3068d083b2b SHA512 d62c66de3128df87dce52292ad1671e01fe2c923e668ef0faf9cb663c11c9cd0b976345aea1de6ea2bc458d0e1066b42c022849e422121d96cea082ed12c8f4b
 DIST percona-server-8.0.19-10.tar.gz 490703179 BLAKE2B 731e9498c4934eb53451c202e8b1de93618190d9b6334b761428ab223756d515d958db77515517e6b5db3ba6cd908c8b238c18b63f4c73b256ec251f8b161ff3 SHA512 39aa805474c6655980e70c97e0d2c0f21ae16e2c1e2e9c7e1d615f46320f1615620368fbdfc24f5d1784aae856090856c3ccda3d6f09ed86c6c9ffe3197be90e
 DIST percona-server-8.0.19.10-patches-01.tar.xz 8288 BLAKE2B 2f79c538ac1512b052210439a27b71491917cb9eab08ac3a3b21c188458c2989f0c998d973b8dd654a7d7606acd70ccf374f1e2f5e0088d0c6b96a794dc4c4a5 SHA512 43313797ec405be82f15745185bfab25fda093045f981a8caa8a019522e432415e4b3cca4ca5ffb735d102f98b3c2fccafccbd4695bd2d1f011707f709fcc2b3
+DIST percona-server-8.0.20-11.tar.gz 494288758 BLAKE2B 202f0cbd7395a6b8ae367ed96d1b6d2c6ae2a56ba6d85e8aad55a6b36a6966a0c3285836dc829e1583a46e28fd2903540e520f6347b1e8c18d99b08f58daef8b SHA512 cf8aa999bd0205bded526838246d023eae5dfadeec1aaf0be99565def5a1cdcc8041bcff90ba6a49f5e903e4f436d416181a9f134555d5c71b7cf44d2ba58a6d
+DIST percona-server-8.0.20.11-patches-01.tar.xz 8668 BLAKE2B 1f598c1b381de3efe8b8605d915b0b63d04214ba4f6e51ce154a020f3e2c4d76a3b4e96b4c9c958c6949b4bdf8cc2b754875049beccdafc99b3a3ad8abf0b315 SHA512 4ca0f58bf1cbf6e7a5a33b46efa5250c28226fa7f23c1327bda050e7de3ec0f16dc46c1cd1c481d50f8b167a4c07653db8a3daf44e8f3f96bbb0aa8f8f66d5b2

diff --git a/dev-db/percona-server/percona-server-8.0.20.11.ebuild b/dev-db/percona-server/percona-server-8.0.20.11.ebuild
new file mode 100644
index 00000000000..67c89a1518b
--- /dev/null
+++ b/dev-db/percona-server/percona-server-8.0.20.11.ebuild
@@ -0,0 +1,1199 @@
+# 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_BOOST_VERSION="1.70.0"
+MY_PV=$(ver_rs 3 '-')
+MY_PV="${MY_PV//_pre*}"
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.20.11-patches-01.tar.xz"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
+	${PATCH_SET}
+"
+
+HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
+DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="cjk cracklib debug jemalloc latin1 ldap libressl numa pam +perl profiling
+	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
+
+# 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:=
+		net-misc/curl:=
+		cjk? ( app-text/mecab:= )
+		ldap? (
+			dev-libs/cyrus-sasl
+			net-nds/openldap
+		)
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		pam? ( sys-libs/pam: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/mysql !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="9G"
+
+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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
+		-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_AUTHENTICATION_LDAP=$(usex ldap system OFF)
+			-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)
+			-DWITH_PAM=$(usex pam)
+		)
+
+		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
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			-DWITH_TOKUDB=$(usex tokudb 1 0)
+		)
+	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+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" )
+	disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" )
+	disabled_tests+=( "main.myisam-blob;0;Sporadic failing test" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
+	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
+	disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
+	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;6804;Known rounding error with latest AMD processors" )
+	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.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;6803;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_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
+
+	if [[ -z "${MTR_VAULT_TOKEN}" ]] ; then
+		local impossible_test
+		for impossible_test in \
+			encryption.default_table_encryption_var \
+			keyring_vault.innodb_online_alter_encryption \
+			keyring_vault.innodb_row_log_encryption \
+			keyring_vault.install_keyring_vault \
+			keyring_vault.keyring_udf \
+			keyring_vault.keyring_vault_config \
+			keyring_vault.keyring_vault_config_qa \
+			keyring_vault.keyring_vault_timeout \
+			keyring_vault.key_rotation_qa \
+			keyring_vault.rpl_key_rotation \
+			keyring_vault.table_encrypt_2 \
+			keyring_vault.table_encrypt_2_directory \
+			keyring_vault.table_encrypt_2_keyring \
+			keyring_vault.table_encrypt_5 \
+			keyring_vault.table_encrypt_5_directory \
+			keyring_vault.table_encrypt_kill \
+			keyring_vault.temp_table_encrypt_keyring_vault \
+		; do
+			_disable_test "${impossible_test}" "0" "MTR_VAULT_TOKEN is not 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() {
+	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'")"
+	# 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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-07-25 18:45 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-07-25 18:45 UTC (permalink / raw
  To: gentoo-commits

commit:     1bfa4a43b6577c42a81168446899e8ccce908a50
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 25 18:45:18 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Jul 25 18:45:32 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bfa4a43

dev-db/percona-server: update known test failures

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

 dev-db/percona-server/percona-server-8.0.20.11.ebuild | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/dev-db/percona-server/percona-server-8.0.20.11.ebuild b/dev-db/percona-server/percona-server-8.0.20.11.ebuild
index 67c89a1518b..0d4ac0f7b98 100644
--- a/dev-db/percona-server/percona-server-8.0.20.11.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.20.11.ebuild
@@ -412,8 +412,12 @@ 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+=( "group_replication.gr_ssl_options2;0;Sporadic failing test" )
 	disabled_tests+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" )
 	disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" )
+	disabled_tests+=( "innodb.percona_log_encrypt_failure;0;Requires proper keyring setup" )
+	disabled_tests+=( "innodb.percona_log_encrypt_change_mk;6039;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_log_encrypt_change_rk;6805;False positive on Gentoo (PS)" )
 	disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" )
 	disabled_tests+=( "main.myisam-blob;0;Sporadic failing test" )
 	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
@@ -428,6 +432,15 @@ src_test() {
 	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
 	disabled_tests+=( "x.message_protobuf_nested;6803;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.partition_upgrade_create;0;Requires app-arch/zip" )


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-07-25 23:39 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-07-25 23:39 UTC (permalink / raw
  To: gentoo-commits

commit:     f8bfc9b4917c25aadd2a45c454261cc195d4cd7b
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 25 23:38:53 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Jul 25 23:39:21 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8bfc9b4

dev-db/percona-server: introduce slots

While we still don't support installing multiple dev-db/percona-server
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>

 ...cona-server-5.7.27.30.ebuild => percona-server-5.7.27.30-r1.ebuild} | 3 ++-
 ...cona-server-8.0.19.10.ebuild => percona-server-8.0.19.10-r1.ebuild} | 3 ++-
 ...cona-server-8.0.20.11.ebuild => percona-server-8.0.20.11-r1.ebuild} | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dev-db/percona-server/percona-server-5.7.27.30.ebuild b/dev-db/percona-server/percona-server-5.7.27.30-r1.ebuild
similarity index 99%
rename from dev-db/percona-server/percona-server-5.7.27.30.ebuild
rename to dev-db/percona-server/percona-server-5.7.27.30-r1.ebuild
index 300c67c7036..ca7c5af799c 100644
--- a/dev-db/percona-server/percona-server-5.7.27.30.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.27.30-r1.ebuild
@@ -34,7 +34,7 @@ fi
 HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server"
 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 pam +perl profiling rocksdb
 	selinux +server static static-libs systemtap tcmalloc test tokudb tokudb-backup-plugin yassl"
 
@@ -142,6 +142,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !dev-db/mysql-cluster
+	!dev-db/percona-server: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/percona-server/percona-server-8.0.19.10.ebuild b/dev-db/percona-server/percona-server-8.0.19.10-r1.ebuild
similarity index 99%
rename from dev-db/percona-server/percona-server-8.0.19.10.ebuild
rename to dev-db/percona-server/percona-server-8.0.19.10-r1.ebuild
index 58abf336ca0..c43502a7815 100644
--- a/dev-db/percona-server/percona-server-8.0.19.10.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.19.10-r1.ebuild
@@ -27,7 +27,7 @@ SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY
 HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
 DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
 LICENSE="GPL-2"
-SLOT="0"
+SLOT="8.0"
 IUSE="cjk cracklib debug jemalloc latin1 libressl numa pam +perl profiling
 	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
 
@@ -84,6 +84,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !dev-db/mysql-cluster
+	!dev-db/percona-server:5.7
 	selinux? ( sec-policy/selinux-mysql )
 	!prefix? (
 		acct-group/mysql acct-user/mysql

diff --git a/dev-db/percona-server/percona-server-8.0.20.11.ebuild b/dev-db/percona-server/percona-server-8.0.20.11-r1.ebuild
similarity index 99%
rename from dev-db/percona-server/percona-server-8.0.20.11.ebuild
rename to dev-db/percona-server/percona-server-8.0.20.11-r1.ebuild
index 0d4ac0f7b98..e8d4b4079bb 100644
--- a/dev-db/percona-server/percona-server-8.0.20.11.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.20.11-r1.ebuild
@@ -27,7 +27,7 @@ SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY
 HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
 DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
 LICENSE="GPL-2"
-SLOT="0"
+SLOT="8.0"
 IUSE="cjk cracklib debug jemalloc latin1 ldap libressl numa pam +perl profiling
 	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
 
@@ -88,6 +88,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !dev-db/mysql-cluster
+	!dev-db/percona-server:5.7
 	selinux? ( sec-policy/selinux-mysql )
 	!prefix? (
 		acct-group/mysql acct-user/mysql


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-07-26 13:21 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-07-26 13:21 UTC (permalink / raw
  To: gentoo-commits

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

dev-db/percona-server: add soft blocker on slot 0

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

 dev-db/percona-server/percona-server-5.7.27.30-r1.ebuild | 1 +
 dev-db/percona-server/percona-server-8.0.19.10-r1.ebuild | 1 +
 dev-db/percona-server/percona-server-8.0.20.11-r1.ebuild | 1 +
 3 files changed, 3 insertions(+)

diff --git a/dev-db/percona-server/percona-server-5.7.27.30-r1.ebuild b/dev-db/percona-server/percona-server-5.7.27.30-r1.ebuild
index ca7c5af799c..86283b34ba4 100644
--- a/dev-db/percona-server/percona-server-5.7.27.30-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.7.27.30-r1.ebuild
@@ -142,6 +142,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !dev-db/mysql-cluster
+	!dev-db/percona-server:0
 	!dev-db/percona-server: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/percona-server/percona-server-8.0.19.10-r1.ebuild b/dev-db/percona-server/percona-server-8.0.19.10-r1.ebuild
index c43502a7815..44544aaf5cc 100644
--- a/dev-db/percona-server/percona-server-8.0.19.10-r1.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.19.10-r1.ebuild
@@ -84,6 +84,7 @@ DEPEND="${COMMON_DEPEND}
 "
 RDEPEND="${COMMON_DEPEND}
 	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !dev-db/mysql-cluster
+	!dev-db/percona-server:0
 	!dev-db/percona-server:5.7
 	selinux? ( sec-policy/selinux-mysql )
 	!prefix? (

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


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-10-08 23:45 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-10-08 23:45 UTC (permalink / raw
  To: gentoo-commits

commit:     216421cf4adf995129c87ef0b38ee68b1b3f798e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  8 23:41:15 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Oct  8 23:45:21 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=216421cf

dev-db/percona-server: remove -Werror

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

 dev-db/percona-server/Manifest                           | 2 +-
 dev-db/percona-server/percona-server-8.0.20.11-r2.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index fee4b5bef11..a67ac8cb269 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -5,4 +5,4 @@ DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e
 DIST percona-server-8.0.19-10.tar.gz 490703179 BLAKE2B 731e9498c4934eb53451c202e8b1de93618190d9b6334b761428ab223756d515d958db77515517e6b5db3ba6cd908c8b238c18b63f4c73b256ec251f8b161ff3 SHA512 39aa805474c6655980e70c97e0d2c0f21ae16e2c1e2e9c7e1d615f46320f1615620368fbdfc24f5d1784aae856090856c3ccda3d6f09ed86c6c9ffe3197be90e
 DIST percona-server-8.0.19.10-patches-01.tar.xz 8288 BLAKE2B 2f79c538ac1512b052210439a27b71491917cb9eab08ac3a3b21c188458c2989f0c998d973b8dd654a7d7606acd70ccf374f1e2f5e0088d0c6b96a794dc4c4a5 SHA512 43313797ec405be82f15745185bfab25fda093045f981a8caa8a019522e432415e4b3cca4ca5ffb735d102f98b3c2fccafccbd4695bd2d1f011707f709fcc2b3
 DIST percona-server-8.0.20-11.tar.gz 494288758 BLAKE2B 202f0cbd7395a6b8ae367ed96d1b6d2c6ae2a56ba6d85e8aad55a6b36a6966a0c3285836dc829e1583a46e28fd2903540e520f6347b1e8c18d99b08f58daef8b SHA512 cf8aa999bd0205bded526838246d023eae5dfadeec1aaf0be99565def5a1cdcc8041bcff90ba6a49f5e903e4f436d416181a9f134555d5c71b7cf44d2ba58a6d
-DIST percona-server-8.0.20.11-patches-01.tar.xz 8668 BLAKE2B 1f598c1b381de3efe8b8605d915b0b63d04214ba4f6e51ce154a020f3e2c4d76a3b4e96b4c9c958c6949b4bdf8cc2b754875049beccdafc99b3a3ad8abf0b315 SHA512 4ca0f58bf1cbf6e7a5a33b46efa5250c28226fa7f23c1327bda050e7de3ec0f16dc46c1cd1c481d50f8b167a4c07653db8a3daf44e8f3f96bbb0aa8f8f66d5b2
+DIST percona-server-8.0.20.11-patches-02.tar.xz 8876 BLAKE2B 34cb3cd0c6d6fb8b2fca98efa53e6e163e4f6b251f629e40169018c328da5319a77ecceec92c925019d13a4ba2dba8c96a23dccf8ba8a3aa95452d4dc9278ffa SHA512 372885f22e7e37bcd63f382d4b064d99b6f826cd2d053148fcdfa1c7f062f51531d5366c198976797f9a3349539e59f5ba96187dc79fdf00365c618b0f83b7c2

diff --git a/dev-db/percona-server/percona-server-8.0.20.11-r2.ebuild b/dev-db/percona-server/percona-server-8.0.20.11-r2.ebuild
index d7b23f1ffd2..e75b78da170 100644
--- a/dev-db/percona-server/percona-server-8.0.20.11-r2.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.20.11-r2.ebuild
@@ -17,7 +17,7 @@ MY_MAJOR_PV=$(ver_cut 1-2)
 MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
 
 # Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.20.11-patches-01.tar.xz"
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.20.11-patches-02.tar.xz"
 
 SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
 	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-10-08 23:45 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-10-08 23:45 UTC (permalink / raw
  To: gentoo-commits

commit:     ab5e3b6e61ded724acf221cde6f0de8b8ac63a4a
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  8 22:56:12 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Oct  8 23:45:21 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab5e3b6e

dev-db/percona-server: use app-arch/zstd from system

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

 ...na-server-8.0.20.11-r1.ebuild => percona-server-8.0.20.11-r2.ebuild} | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dev-db/percona-server/percona-server-8.0.20.11-r1.ebuild b/dev-db/percona-server/percona-server-8.0.20.11-r2.ebuild
similarity index 99%
rename from dev-db/percona-server/percona-server-8.0.20.11-r1.ebuild
rename to dev-db/percona-server/percona-server-8.0.20.11-r2.ebuild
index dd3addaa154..d7b23f1ffd2 100644
--- a/dev-db/percona-server/percona-server-8.0.20.11-r1.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.20.11-r2.ebuild
@@ -52,6 +52,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= )
@@ -280,6 +281,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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-11-08 23:44 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-11-08 23:44 UTC (permalink / raw
  To: gentoo-commits

commit:     f5fb3a642acdc18e1a717686972eca217aa5cdee
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  8 22:53:52 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Nov  8 23:44:09 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5fb3a64

dev-db/percona-server: bump to v8.0.21-12

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

 dev-db/percona-server/Manifest                     |    3 +
 .../percona-server/percona-server-8.0.21.12.ebuild | 1219 ++++++++++++++++++++
 2 files changed, 1222 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index a67ac8cb269..ebe13c616cf 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,8 +1,11 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST boost_1_70_0.tar.bz2 97887058 BLAKE2B dc7a974c6dc2662b767dbd87cb832cd1749c24fb745779d1059b73f19f7e52b33b645adfe72b0296c5e098e5cdb3b9f5eddd382374f33fbcd2ad5739287b2206 SHA512 7f2ea9636baf0210e8ed1d21ee798efb6ce23c0710ff8228b285e2214f82193bcd2d912fd435929c554289a59101c7be2e27ce798f93833f307976f0dd070b49
+DIST boost_1_72_0.tar.bz2 106907358 BLAKE2B ab270a0e3cb24da687d86785e2d2e6d7731b4dbc07bd839eadb642dfa5a428ad584acb1f3529661a8de9a986008ff3427491041059ea2b742348d02e00761cd8 SHA512 63bbd1743e7c904b2e69fdc2eafd1c2a8a30fd70d960dcd366059d0100f000cb605d56cbd9397bb18421631f1c9552a772c434d0f0caddbe56302273f51fd1f6
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e8eb73adb3db7c761906c15eff182e54634ef091a3ffa0d4f3498a93dbfbf65cd5cdd12102871abaaaa0f32378ba3068d083b2b SHA512 d62c66de3128df87dce52292ad1671e01fe2c923e668ef0faf9cb663c11c9cd0b976345aea1de6ea2bc458d0e1066b42c022849e422121d96cea082ed12c8f4b
 DIST percona-server-8.0.19-10.tar.gz 490703179 BLAKE2B 731e9498c4934eb53451c202e8b1de93618190d9b6334b761428ab223756d515d958db77515517e6b5db3ba6cd908c8b238c18b63f4c73b256ec251f8b161ff3 SHA512 39aa805474c6655980e70c97e0d2c0f21ae16e2c1e2e9c7e1d615f46320f1615620368fbdfc24f5d1784aae856090856c3ccda3d6f09ed86c6c9ffe3197be90e
 DIST percona-server-8.0.19.10-patches-01.tar.xz 8288 BLAKE2B 2f79c538ac1512b052210439a27b71491917cb9eab08ac3a3b21c188458c2989f0c998d973b8dd654a7d7606acd70ccf374f1e2f5e0088d0c6b96a794dc4c4a5 SHA512 43313797ec405be82f15745185bfab25fda093045f981a8caa8a019522e432415e4b3cca4ca5ffb735d102f98b3c2fccafccbd4695bd2d1f011707f709fcc2b3
 DIST percona-server-8.0.20-11.tar.gz 494288758 BLAKE2B 202f0cbd7395a6b8ae367ed96d1b6d2c6ae2a56ba6d85e8aad55a6b36a6966a0c3285836dc829e1583a46e28fd2903540e520f6347b1e8c18d99b08f58daef8b SHA512 cf8aa999bd0205bded526838246d023eae5dfadeec1aaf0be99565def5a1cdcc8041bcff90ba6a49f5e903e4f436d416181a9f134555d5c71b7cf44d2ba58a6d
 DIST percona-server-8.0.20.11-patches-02.tar.xz 8876 BLAKE2B 34cb3cd0c6d6fb8b2fca98efa53e6e163e4f6b251f629e40169018c328da5319a77ecceec92c925019d13a4ba2dba8c96a23dccf8ba8a3aa95452d4dc9278ffa SHA512 372885f22e7e37bcd63f382d4b064d99b6f826cd2d053148fcdfa1c7f062f51531d5366c198976797f9a3349539e59f5ba96187dc79fdf00365c618b0f83b7c2
+DIST percona-server-8.0.21-12.tar.gz 522004727 BLAKE2B bc6bf77d862a4827839d1942f58e4124f4692abfa9298eaa7cebdaaa7a6cff036247edda51d9cbb878b0e79858e54cbe5326bc30479b1d5977a655240df438fd SHA512 66076a6774cf18af1111b83aa8977a55e1a2d634c30e190d3bd8e82ba079fb772ac2a2402356be0b79677b54ca0b24c441d87444b68d1e66cd298ca6a0108d31
+DIST percona-server-8.0.21.12-patches-01.tar.xz 8916 BLAKE2B 3a40f63383ad0c63830056b15453a0e7429f2507e8205cca660aaf6787c9d6ed9e741df8d09fc887fe07b82f86e7aa53730b3aa97788421ed4dde3e83c992c01 SHA512 f7599293dced8ea2bc98d88e8dfc4f20288974fecfe481f446b071c1d393119c22317819fcc054bf9cdd4c557044332d450ffc99b3a14c91b51a4c0b6c1c0896

diff --git a/dev-db/percona-server/percona-server-8.0.21.12.ebuild b/dev-db/percona-server/percona-server-8.0.21.12.ebuild
new file mode 100644
index 00000000000..14f08b79a9b
--- /dev/null
+++ b/dev-db/percona-server/percona-server-8.0.21.12.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 check-reqs cmake flag-o-matic linux-info \
+	multiprocessing prefix toolchain-funcs
+
+MY_BOOST_VERSION="1.72.0"
+MY_PV=$(ver_rs 3 '-')
+MY_PV="${MY_PV//_pre*}"
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.21.12-patches-01.tar.xz"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
+	${PATCH_SET}
+"
+
+HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
+DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 ldap libressl numa pam +perl profiling
+	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
+
+# 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:=[ssl]
+		>=dev-libs/protobuf-3.8:=
+		net-libs/libtirpc:=
+		net-misc/curl:=
+		cjk? ( app-text/mecab:= )
+		ldap? (
+			dev-libs/cyrus-sasl
+			net-nds/openldap
+		)
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		pam? ( sys-libs/pam: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/mysql !dev-db/mysql-cluster
+	!dev-db/percona-server:0
+	!dev-db/percona-server: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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
+		-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_AUTHENTICATION_LDAP=$(usex ldap system OFF)
+			-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)
+			-DWITH_PAM=$(usex pam)
+		)
+
+		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
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			-DWITH_TOKUDB=$(usex tokudb 1 0)
+		)
+	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+=( "group_replication.gr_ssl_options2;0;Sporadic failing test" )
+	disabled_tests+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" )
+	disabled_tests+=( "innodb.percona_log_encrypt_failure;0;Requires proper keyring setup" )
+	disabled_tests+=( "innodb.percona_log_encrypt_change_mk;6039;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_log_encrypt_change_rk;6805;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" )
+	disabled_tests+=( "main.myisam-blob;0;Sporadic failing test" )
+	disabled_tests+=( "main.mysql_load_data_local_dir;7416;Known test failure" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
+	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
+	disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
+	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;6804;Known rounding error with latest AMD processors" )
+	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+=( "sys_vars.innodb_sys_tablespace_encrypt_basic;7415;Known test failure" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;6803;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_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
+
+	if [[ -z "${MTR_VAULT_TOKEN}" ]] ; then
+		local impossible_test
+		for impossible_test in \
+			encryption.default_table_encryption_var \
+			keyring_vault.innodb_online_alter_encryption \
+			keyring_vault.innodb_row_log_encryption \
+			keyring_vault.install_keyring_vault \
+			keyring_vault.keyring_udf \
+			keyring_vault.keyring_vault_config \
+			keyring_vault.keyring_vault_config_qa \
+			keyring_vault.keyring_vault_timeout \
+			keyring_vault.key_rotation_qa \
+			keyring_vault.rpl_key_rotation \
+			keyring_vault.table_encrypt_2 \
+			keyring_vault.table_encrypt_2_directory \
+			keyring_vault.table_encrypt_2_keyring \
+			keyring_vault.table_encrypt_5 \
+			keyring_vault.table_encrypt_5_directory \
+			keyring_vault.table_encrypt_kill \
+			keyring_vault.temp_table_encrypt_keyring_vault \
+			main.persisted_variables \
+		; do
+			_disable_test "${impossible_test}" "0" "MTR_VAULT_TOKEN is not 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() {
+	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-12-20 21:01 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-12-20 21:01 UTC (permalink / raw
  To: gentoo-commits

commit:     8d28301fa270fc97e42628a64efbb065c63791e1
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 20 20:59:06 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=8d28301f

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

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

 dev-db/percona-server/Manifest                        | 2 +-
 dev-db/percona-server/percona-server-8.0.21.12.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index ebe13c616cf..4239cd33522 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -8,4 +8,4 @@ DIST percona-server-8.0.19.10-patches-01.tar.xz 8288 BLAKE2B 2f79c538ac1512b0522
 DIST percona-server-8.0.20-11.tar.gz 494288758 BLAKE2B 202f0cbd7395a6b8ae367ed96d1b6d2c6ae2a56ba6d85e8aad55a6b36a6966a0c3285836dc829e1583a46e28fd2903540e520f6347b1e8c18d99b08f58daef8b SHA512 cf8aa999bd0205bded526838246d023eae5dfadeec1aaf0be99565def5a1cdcc8041bcff90ba6a49f5e903e4f436d416181a9f134555d5c71b7cf44d2ba58a6d
 DIST percona-server-8.0.20.11-patches-02.tar.xz 8876 BLAKE2B 34cb3cd0c6d6fb8b2fca98efa53e6e163e4f6b251f629e40169018c328da5319a77ecceec92c925019d13a4ba2dba8c96a23dccf8ba8a3aa95452d4dc9278ffa SHA512 372885f22e7e37bcd63f382d4b064d99b6f826cd2d053148fcdfa1c7f062f51531d5366c198976797f9a3349539e59f5ba96187dc79fdf00365c618b0f83b7c2
 DIST percona-server-8.0.21-12.tar.gz 522004727 BLAKE2B bc6bf77d862a4827839d1942f58e4124f4692abfa9298eaa7cebdaaa7a6cff036247edda51d9cbb878b0e79858e54cbe5326bc30479b1d5977a655240df438fd SHA512 66076a6774cf18af1111b83aa8977a55e1a2d634c30e190d3bd8e82ba079fb772ac2a2402356be0b79677b54ca0b24c441d87444b68d1e66cd298ca6a0108d31
-DIST percona-server-8.0.21.12-patches-01.tar.xz 8916 BLAKE2B 3a40f63383ad0c63830056b15453a0e7429f2507e8205cca660aaf6787c9d6ed9e741df8d09fc887fe07b82f86e7aa53730b3aa97788421ed4dde3e83c992c01 SHA512 f7599293dced8ea2bc98d88e8dfc4f20288974fecfe481f446b071c1d393119c22317819fcc054bf9cdd4c557044332d450ffc99b3a14c91b51a4c0b6c1c0896
+DIST percona-server-8.0.21.12-patches-02.tar.xz 9276 BLAKE2B 97aa38dedcd1c09e88d2b17c462da8adbf1defbe1596abbc33eeca1ef1f14e3a2acddeca82da04e7c4d3a4c0dec70c53ee39d1011ba86c836492a2f8599a6732 SHA512 e7876088778a6190c0f0dbfbc44d5794c2d0903a2303bbb913fc1d4d7f462000108e33d3e764399c9fedbaa5b642004243316505f4a6f0566e1b250a9faded14

diff --git a/dev-db/percona-server/percona-server-8.0.21.12.ebuild b/dev-db/percona-server/percona-server-8.0.21.12.ebuild
index 14f08b79a9b..5081142e8ad 100644
--- a/dev-db/percona-server/percona-server-8.0.21.12.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.21.12.ebuild
@@ -17,7 +17,7 @@ MY_MAJOR_PV=$(ver_cut 1-2)
 MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
 
 # Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.21.12-patches-01.tar.xz"
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.21.12-patches-02.tar.xz"
 
 SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
 	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2020-12-20 22:54 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2020-12-20 22:54 UTC (permalink / raw
  To: gentoo-commits

commit:     f64d9a41dc4217c93571a1dbe49ba45bb2d0cea0
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 20 22:51:59 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Dec 20 22:54:26 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f64d9a41

dev-db/percona-server: bump to v8.0.22-13

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

 dev-db/percona-server/Manifest                     |    3 +
 .../percona-server/percona-server-8.0.22.13.ebuild | 1209 ++++++++++++++++++++
 2 files changed, 1212 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 4239cd33522..fd27b582d1e 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,6 +1,7 @@
 DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
 DIST boost_1_70_0.tar.bz2 97887058 BLAKE2B dc7a974c6dc2662b767dbd87cb832cd1749c24fb745779d1059b73f19f7e52b33b645adfe72b0296c5e098e5cdb3b9f5eddd382374f33fbcd2ad5739287b2206 SHA512 7f2ea9636baf0210e8ed1d21ee798efb6ce23c0710ff8228b285e2214f82193bcd2d912fd435929c554289a59101c7be2e27ce798f93833f307976f0dd070b49
 DIST boost_1_72_0.tar.bz2 106907358 BLAKE2B ab270a0e3cb24da687d86785e2d2e6d7731b4dbc07bd839eadb642dfa5a428ad584acb1f3529661a8de9a986008ff3427491041059ea2b742348d02e00761cd8 SHA512 63bbd1743e7c904b2e69fdc2eafd1c2a8a30fd70d960dcd366059d0100f000cb605d56cbd9397bb18421631f1c9552a772c434d0f0caddbe56302273f51fd1f6
+DIST boost_1_73_0.tar.bz2 109247910 BLAKE2B 5995ff6ca21f45988b187b94bf743795cca97531baa8355f488be0987b9426289dd85d6ce25b7eb03ccd690109f05ba56252a95bca50505ad9cd66f4e0e234e8 SHA512 86c296511c0766145097625a62bf099c3d155284d250ad6e528e788bc90b2945838498dfe473c6c6c78d1694b6fba8e19f7dee0d064a043841e6231603fff668
 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
 DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e8eb73adb3db7c761906c15eff182e54634ef091a3ffa0d4f3498a93dbfbf65cd5cdd12102871abaaaa0f32378ba3068d083b2b SHA512 d62c66de3128df87dce52292ad1671e01fe2c923e668ef0faf9cb663c11c9cd0b976345aea1de6ea2bc458d0e1066b42c022849e422121d96cea082ed12c8f4b
 DIST percona-server-8.0.19-10.tar.gz 490703179 BLAKE2B 731e9498c4934eb53451c202e8b1de93618190d9b6334b761428ab223756d515d958db77515517e6b5db3ba6cd908c8b238c18b63f4c73b256ec251f8b161ff3 SHA512 39aa805474c6655980e70c97e0d2c0f21ae16e2c1e2e9c7e1d615f46320f1615620368fbdfc24f5d1784aae856090856c3ccda3d6f09ed86c6c9ffe3197be90e
@@ -9,3 +10,5 @@ DIST percona-server-8.0.20-11.tar.gz 494288758 BLAKE2B 202f0cbd7395a6b8ae367ed96
 DIST percona-server-8.0.20.11-patches-02.tar.xz 8876 BLAKE2B 34cb3cd0c6d6fb8b2fca98efa53e6e163e4f6b251f629e40169018c328da5319a77ecceec92c925019d13a4ba2dba8c96a23dccf8ba8a3aa95452d4dc9278ffa SHA512 372885f22e7e37bcd63f382d4b064d99b6f826cd2d053148fcdfa1c7f062f51531d5366c198976797f9a3349539e59f5ba96187dc79fdf00365c618b0f83b7c2
 DIST percona-server-8.0.21-12.tar.gz 522004727 BLAKE2B bc6bf77d862a4827839d1942f58e4124f4692abfa9298eaa7cebdaaa7a6cff036247edda51d9cbb878b0e79858e54cbe5326bc30479b1d5977a655240df438fd SHA512 66076a6774cf18af1111b83aa8977a55e1a2d634c30e190d3bd8e82ba079fb772ac2a2402356be0b79677b54ca0b24c441d87444b68d1e66cd298ca6a0108d31
 DIST percona-server-8.0.21.12-patches-02.tar.xz 9276 BLAKE2B 97aa38dedcd1c09e88d2b17c462da8adbf1defbe1596abbc33eeca1ef1f14e3a2acddeca82da04e7c4d3a4c0dec70c53ee39d1011ba86c836492a2f8599a6732 SHA512 e7876088778a6190c0f0dbfbc44d5794c2d0903a2303bbb913fc1d4d7f462000108e33d3e764399c9fedbaa5b642004243316505f4a6f0566e1b250a9faded14
+DIST percona-server-8.0.22-13.tar.gz 530806570 BLAKE2B 256e5afa2e3908617c41ffcab591ccdbfd932a8ba3ce25fbf2a0be2cdfa80991b0c2d090c11ffae64e4bb3d8cf9f3011b70974ab22cbab023f6625ac422f3c73 SHA512 9b7a1d06885eb4412361bb3920adc9f050f8da95584eb910c97c8877a433ead04d02f2908e5e9648b1d79cdba677727fdb745377feac3c958339588d5f0cdf2b
+DIST percona-server-8.0.22.13-patches-01.tar.xz 9236 BLAKE2B d75d32782902d5d095389c8f79587b196e65508223503616d92304a2cb09520959adca04eac96fd4501cccf46ca684702b55c7a0327e6c3477b68245fe96e82b SHA512 e884d8bbd31f6df7f3a585feb970f82f78484a90404c40dc3e5daf46c3836a59c6bcef34fd8a3e9191a12820ba7ae441d53a7c010256dd0296e7eeb00313d6a0

diff --git a/dev-db/percona-server/percona-server-8.0.22.13.ebuild b/dev-db/percona-server/percona-server-8.0.22.13.ebuild
new file mode 100644
index 00000000000..42612652afc
--- /dev/null
+++ b/dev-db/percona-server/percona-server-8.0.22.13.ebuild
@@ -0,0 +1,1209 @@
+# 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_BOOST_VERSION="1.73.0"
+MY_PV=$(ver_rs 3 '-')
+MY_PV="${MY_PV//_pre*}"
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.22.13-patches-01.tar.xz"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
+	${PATCH_SET}
+"
+
+HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
+DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 ldap libressl numa pam +perl profiling
+	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
+
+# 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:=[ssl,threads]
+		>=dev-libs/protobuf-3.8:=
+		net-libs/libtirpc:=
+		net-misc/curl:=
+		cjk? ( app-text/mecab:= )
+		ldap? (
+			dev-libs/cyrus-sasl
+			net-nds/openldap
+		)
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		pam? ( sys-libs/pam: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/mysql !dev-db/mysql-cluster
+	!dev-db/percona-server:0
+	!dev-db/percona-server: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
+		# 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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
+		-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_AUTHENTICATION_LDAP=$(usex ldap system OFF)
+			-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)
+			-DWITH_PAM=$(usex pam)
+		)
+
+		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
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			-DWITH_TOKUDB=$(usex tokudb 1 0)
+		)
+	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+=( "group_replication.gr_ssl_options2;0;Sporadic failing test" )
+	disabled_tests+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" )
+	disabled_tests+=( "innodb.percona_log_encrypt_failure;0;Requires proper keyring setup" )
+	disabled_tests+=( "innodb.percona_log_encrypt_change_mk;6039;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_log_encrypt_change_rk;6805;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" )
+	disabled_tests+=( "main.myisam-blob;0;Sporadic failing test" )
+	disabled_tests+=( "main.mysql_load_data_local_dir;7416;Known test failure" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
+	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
+	disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
+	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;6804;Known rounding error with latest AMD processors" )
+	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+=( "sys_vars.innodb_sys_tablespace_encrypt_basic;7415;Known test failure" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;6803;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
+
+	if [[ -z "${MTR_VAULT_TOKEN}" ]] ; then
+		local impossible_test
+		for impossible_test in \
+			encryption.default_table_encryption_var \
+			keyring_vault.innodb_online_alter_encryption \
+			keyring_vault.innodb_row_log_encryption \
+			keyring_vault.install_keyring_vault \
+			keyring_vault.keyring_udf \
+			keyring_vault.keyring_vault_config \
+			keyring_vault.keyring_vault_config_qa \
+			keyring_vault.keyring_vault_timeout \
+			keyring_vault.key_rotation_qa \
+			keyring_vault.rpl_key_rotation \
+			keyring_vault.table_encrypt_2 \
+			keyring_vault.table_encrypt_2_directory \
+			keyring_vault.table_encrypt_2_keyring \
+			keyring_vault.table_encrypt_5 \
+			keyring_vault.table_encrypt_5_directory \
+			keyring_vault.table_encrypt_kill \
+			keyring_vault.temp_table_encrypt_keyring_vault \
+			main.persisted_variables \
+		; do
+			_disable_test "${impossible_test}" "0" "MTR_VAULT_TOKEN is not 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() {
+	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2021-01-06 18:43 Fabian Groffen
  0 siblings, 0 replies; 121+ messages in thread
From: Fabian Groffen @ 2021-01-06 18:43 UTC (permalink / raw
  To: gentoo-commits

commit:     c01b00c63fc7d563e07531c9293dee36be060d5c
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  6 18:41:19 2021 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Jan  6 18:41:19 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c01b00c6

dev-db/percona-server: drop x86-macos

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

 dev-db/percona-server/percona-server-8.0.21.12.ebuild | 4 ++--
 dev-db/percona-server/percona-server-8.0.22.13.ebuild | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dev-db/percona-server/percona-server-8.0.21.12.ebuild b/dev-db/percona-server/percona-server-8.0.21.12.ebuild
index 5081142e8ad..ae1e6e9e3ea 100644
--- a/dev-db/percona-server/percona-server-8.0.21.12.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.21.12.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"
@@ -42,7 +42,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/percona-server/percona-server-8.0.22.13.ebuild b/dev-db/percona-server/percona-server-8.0.22.13.ebuild
index 42612652afc..caac1480fda 100644
--- a/dev-db/percona-server/percona-server-8.0.22.13.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.22.13.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"
@@ -42,7 +42,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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2021-04-28 13:20 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2021-04-28 13:20 UTC (permalink / raw
  To: gentoo-commits

commit:     4d221e21a621e20074c87fe9e619c31db8cc2a7d
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 28 12:20:30 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Apr 28 13:19:20 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d221e21

dev-db/percona-server: drop old

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

 dev-db/percona-server/Manifest                     |    3 -
 .../percona-server/percona-server-8.0.21.12.ebuild | 1219 --------------------
 2 files changed, 1222 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index ef3eea1e4ea..b7a91b5b885 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,6 +1,3 @@
-DIST boost_1_72_0.tar.bz2 106907358 BLAKE2B ab270a0e3cb24da687d86785e2d2e6d7731b4dbc07bd839eadb642dfa5a428ad584acb1f3529661a8de9a986008ff3427491041059ea2b742348d02e00761cd8 SHA512 63bbd1743e7c904b2e69fdc2eafd1c2a8a30fd70d960dcd366059d0100f000cb605d56cbd9397bb18421631f1c9552a772c434d0f0caddbe56302273f51fd1f6
 DIST boost_1_73_0.tar.bz2 109247910 BLAKE2B 5995ff6ca21f45988b187b94bf743795cca97531baa8355f488be0987b9426289dd85d6ce25b7eb03ccd690109f05ba56252a95bca50505ad9cd66f4e0e234e8 SHA512 86c296511c0766145097625a62bf099c3d155284d250ad6e528e788bc90b2945838498dfe473c6c6c78d1694b6fba8e19f7dee0d064a043841e6231603fff668
-DIST percona-server-8.0.21-12.tar.gz 522004727 BLAKE2B bc6bf77d862a4827839d1942f58e4124f4692abfa9298eaa7cebdaaa7a6cff036247edda51d9cbb878b0e79858e54cbe5326bc30479b1d5977a655240df438fd SHA512 66076a6774cf18af1111b83aa8977a55e1a2d634c30e190d3bd8e82ba079fb772ac2a2402356be0b79677b54ca0b24c441d87444b68d1e66cd298ca6a0108d31
-DIST percona-server-8.0.21.12-patches-02.tar.xz 9276 BLAKE2B 97aa38dedcd1c09e88d2b17c462da8adbf1defbe1596abbc33eeca1ef1f14e3a2acddeca82da04e7c4d3a4c0dec70c53ee39d1011ba86c836492a2f8599a6732 SHA512 e7876088778a6190c0f0dbfbc44d5794c2d0903a2303bbb913fc1d4d7f462000108e33d3e764399c9fedbaa5b642004243316505f4a6f0566e1b250a9faded14
 DIST percona-server-8.0.22-13.tar.gz 530806570 BLAKE2B 256e5afa2e3908617c41ffcab591ccdbfd932a8ba3ce25fbf2a0be2cdfa80991b0c2d090c11ffae64e4bb3d8cf9f3011b70974ab22cbab023f6625ac422f3c73 SHA512 9b7a1d06885eb4412361bb3920adc9f050f8da95584eb910c97c8877a433ead04d02f2908e5e9648b1d79cdba677727fdb745377feac3c958339588d5f0cdf2b
 DIST percona-server-8.0.22.13-patches-01.tar.xz 9236 BLAKE2B d75d32782902d5d095389c8f79587b196e65508223503616d92304a2cb09520959adca04eac96fd4501cccf46ca684702b55c7a0327e6c3477b68245fe96e82b SHA512 e884d8bbd31f6df7f3a585feb970f82f78484a90404c40dc3e5daf46c3836a59c6bcef34fd8a3e9191a12820ba7ae441d53a7c010256dd0296e7eeb00313d6a0

diff --git a/dev-db/percona-server/percona-server-8.0.21.12.ebuild b/dev-db/percona-server/percona-server-8.0.21.12.ebuild
deleted file mode 100644
index ae1e6e9e3ea..00000000000
--- a/dev-db/percona-server/percona-server-8.0.21.12.ebuild
+++ /dev/null
@@ -1,1219 +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_BOOST_VERSION="1.72.0"
-MY_PV=$(ver_rs 3 '-')
-MY_PV="${MY_PV//_pre*}"
-MY_PN="Percona-Server"
-MY_P="${PN}-${MY_PV}"
-MY_MAJOR_PV=$(ver_cut 1-2)
-MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.21.12-patches-02.tar.xz"
-
-SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
-	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
-	${PATCH_SET}
-"
-
-HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
-DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 ldap libressl numa pam +perl profiling
-	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
-
-# 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]
-		>=dev-libs/protobuf-3.8:=
-		net-libs/libtirpc:=
-		net-misc/curl:=
-		cjk? ( app-text/mecab:= )
-		ldap? (
-			dev-libs/cyrus-sasl
-			net-nds/openldap
-		)
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-		pam? ( sys-libs/pam: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/mysql !dev-db/mysql-cluster
-	!dev-db/percona-server:0
-	!dev-db/percona-server: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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
-		-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_AUTHENTICATION_LDAP=$(usex ldap system OFF)
-			-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)
-			-DWITH_PAM=$(usex pam)
-		)
-
-		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
-			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
-			-DWITH_TOKUDB=$(usex tokudb 1 0)
-		)
-	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+=( "group_replication.gr_ssl_options2;0;Sporadic failing test" )
-	disabled_tests+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" )
-	disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" )
-	disabled_tests+=( "innodb.percona_log_encrypt_failure;0;Requires proper keyring setup" )
-	disabled_tests+=( "innodb.percona_log_encrypt_change_mk;6039;False positive on Gentoo (PS)" )
-	disabled_tests+=( "innodb.percona_log_encrypt_change_rk;6805;False positive on Gentoo (PS)" )
-	disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" )
-	disabled_tests+=( "main.myisam-blob;0;Sporadic failing test" )
-	disabled_tests+=( "main.mysql_load_data_local_dir;7416;Known test failure" )
-	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
-	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
-	disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
-	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;6804;Known rounding error with latest AMD processors" )
-	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+=( "sys_vars.innodb_sys_tablespace_encrypt_basic;7415;Known test failure" )
-	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
-	disabled_tests+=( "x.message_protobuf_nested;6803;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_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
-
-	if [[ -z "${MTR_VAULT_TOKEN}" ]] ; then
-		local impossible_test
-		for impossible_test in \
-			encryption.default_table_encryption_var \
-			keyring_vault.innodb_online_alter_encryption \
-			keyring_vault.innodb_row_log_encryption \
-			keyring_vault.install_keyring_vault \
-			keyring_vault.keyring_udf \
-			keyring_vault.keyring_vault_config \
-			keyring_vault.keyring_vault_config_qa \
-			keyring_vault.keyring_vault_timeout \
-			keyring_vault.key_rotation_qa \
-			keyring_vault.rpl_key_rotation \
-			keyring_vault.table_encrypt_2 \
-			keyring_vault.table_encrypt_2_directory \
-			keyring_vault.table_encrypt_2_keyring \
-			keyring_vault.table_encrypt_5 \
-			keyring_vault.table_encrypt_5_directory \
-			keyring_vault.table_encrypt_kill \
-			keyring_vault.temp_table_encrypt_keyring_vault \
-			main.persisted_variables \
-		; do
-			_disable_test "${impossible_test}" "0" "MTR_VAULT_TOKEN is not 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() {
-	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2021-04-28 13:20 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2021-04-28 13:20 UTC (permalink / raw
  To: gentoo-commits

commit:     21ff1654826c8c7e07404d92276d970946511766
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 28 12:21:35 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Apr 28 13:19:20 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21ff1654

dev-db/percona-server: force C++14

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

 dev-db/percona-server/percona-server-8.0.22.13.ebuild | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dev-db/percona-server/percona-server-8.0.22.13.ebuild b/dev-db/percona-server/percona-server-8.0.22.13.ebuild
index caac1480fda..d277c94e16e 100644
--- a/dev-db/percona-server/percona-server-8.0.22.13.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.22.13.ebuild
@@ -212,6 +212,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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2021-04-28 18:26 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2021-04-28 18:26 UTC (permalink / raw
  To: gentoo-commits

commit:     f9da7a860e4e27c345aa1280b0e24868bd3fa785
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 28 18:10:30 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Apr 28 18:26:22 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9da7a86

dev-db/percona-server: disable bundled coredumper

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

 dev-db/percona-server/percona-server-8.0.22.13.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-db/percona-server/percona-server-8.0.22.13.ebuild b/dev-db/percona-server/percona-server-8.0.22.13.ebuild
index d277c94e16e..709d8a54267 100644
--- a/dev-db/percona-server/percona-server-8.0.22.13.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.22.13.ebuild
@@ -309,6 +309,7 @@ src_configure() {
 	if use server ; then
 		mycmakeargs+=(
 			-DWITH_AUTHENTICATION_LDAP=$(usex ldap system OFF)
+			-DWITH_COREDUMPER=OFF
 			-DWITH_EXTRA_CHARSETS=all
 			-DWITH_DEBUG=$(usex debug)
 			-DWITH_MECAB=$(usex cjk system OFF)


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2021-04-28 18:26 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2021-04-28 18:26 UTC (permalink / raw
  To: gentoo-commits

commit:     ec859df7ec975ea0c31195ea336293675a22d840
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 28 18:24:18 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Apr 28 18:26:22 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec859df7

dev-db/percona-server: fix building against GCC 11

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

 dev-db/percona-server/Manifest                        | 2 +-
 dev-db/percona-server/percona-server-8.0.22.13.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index b7a91b5b885..61b75f28779 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,3 @@
 DIST boost_1_73_0.tar.bz2 109247910 BLAKE2B 5995ff6ca21f45988b187b94bf743795cca97531baa8355f488be0987b9426289dd85d6ce25b7eb03ccd690109f05ba56252a95bca50505ad9cd66f4e0e234e8 SHA512 86c296511c0766145097625a62bf099c3d155284d250ad6e528e788bc90b2945838498dfe473c6c6c78d1694b6fba8e19f7dee0d064a043841e6231603fff668
 DIST percona-server-8.0.22-13.tar.gz 530806570 BLAKE2B 256e5afa2e3908617c41ffcab591ccdbfd932a8ba3ce25fbf2a0be2cdfa80991b0c2d090c11ffae64e4bb3d8cf9f3011b70974ab22cbab023f6625ac422f3c73 SHA512 9b7a1d06885eb4412361bb3920adc9f050f8da95584eb910c97c8877a433ead04d02f2908e5e9648b1d79cdba677727fdb745377feac3c958339588d5f0cdf2b
-DIST percona-server-8.0.22.13-patches-01.tar.xz 9236 BLAKE2B d75d32782902d5d095389c8f79587b196e65508223503616d92304a2cb09520959adca04eac96fd4501cccf46ca684702b55c7a0327e6c3477b68245fe96e82b SHA512 e884d8bbd31f6df7f3a585feb970f82f78484a90404c40dc3e5daf46c3836a59c6bcef34fd8a3e9191a12820ba7ae441d53a7c010256dd0296e7eeb00313d6a0
+DIST percona-server-8.0.22.13-patches-02.tar.xz 9620 BLAKE2B c04e97ed422719bec5008b668e2ce3ecd5b848338a9f2f2ecd2fc867307b7fce9bae4cb0efd44f9b950f74d7f31394c06248d1c72784e9c0790378e2ea4d7934 SHA512 2476ee2f4096eaee211017609f82cf8fa9817cda6345336f478257711b64b8c37340b482a02f3d0b19e16e01055cf619cdd1b66d5fbfa0fd1d8edbd529c4096f

diff --git a/dev-db/percona-server/percona-server-8.0.22.13.ebuild b/dev-db/percona-server/percona-server-8.0.22.13.ebuild
index 709d8a54267..eea3260fd47 100644
--- a/dev-db/percona-server/percona-server-8.0.22.13.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.22.13.ebuild
@@ -17,7 +17,7 @@ MY_MAJOR_PV=$(ver_cut 1-2)
 MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
 
 # Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.22.13-patches-01.tar.xz"
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.22.13-patches-02.tar.xz"
 
 SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
 	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2021-05-01 18:24 Sam James
  0 siblings, 0 replies; 121+ messages in thread
From: Sam James @ 2021-05-01 18:24 UTC (permalink / raw
  To: gentoo-commits

commit:     6bfbb077ac6beacdba06a434f2a4c79064d7c99b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May  1 18:19:33 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May  1 18:24:09 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6bfbb077

dev-db/percona-server: 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/percona-server/metadata.xml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
index 4b72b897bda..4801ce495b3 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/metadata.xml
@@ -8,7 +8,6 @@
 <use>
   <flag name="cjk">Add CJK support for InnoDB fulltext search using <pkg>app-text/mecab</pkg></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="rocksdb">Add support for RocksDB; a key/value, LSM database optimized for flash storage</flag>


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2021-05-03  8:18 Mikle Kolyada
  0 siblings, 0 replies; 121+ messages in thread
From: Mikle Kolyada @ 2021-05-03  8:18 UTC (permalink / raw
  To: gentoo-commits

commit:     eb20941f91729eacc5d6d408e6da456b88edc79d
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Mon May  3 08:17:59 2021 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Mon May  3 08:17:59 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb20941f

dev-db/percona-server: remove libressl support

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

 dev-db/percona-server/percona-server-8.0.22.13.ebuild | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/dev-db/percona-server/percona-server-8.0.22.13.ebuild b/dev-db/percona-server/percona-server-8.0.22.13.ebuild
index eea3260fd47..8b514bd03ae 100644
--- a/dev-db/percona-server/percona-server-8.0.22.13.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.22.13.ebuild
@@ -28,11 +28,10 @@ HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https:/
 DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
 LICENSE="GPL-2"
 SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 ldap libressl numa pam +perl profiling
+IUSE="cjk cracklib debug jemalloc latin1 ldap numa pam +perl profiling
 	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
 
-# 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 )
@@ -55,8 +54,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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2021-05-21  2:12 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2021-05-21  2:12 UTC (permalink / raw
  To: gentoo-commits

commit:     1c7c655e7cdb8200025ba497686ff5d592c10f3b
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri May 21 02:11:29 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=1c7c655e

dev-db/percona-server: bump to v8.0.23-14

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

 dev-db/percona-server/Manifest                     |    2 +
 .../percona-server/percona-server-8.0.23.14.ebuild | 1214 ++++++++++++++++++++
 2 files changed, 1216 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 61b75f28779..e14ff707c05 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,5 @@
 DIST boost_1_73_0.tar.bz2 109247910 BLAKE2B 5995ff6ca21f45988b187b94bf743795cca97531baa8355f488be0987b9426289dd85d6ce25b7eb03ccd690109f05ba56252a95bca50505ad9cd66f4e0e234e8 SHA512 86c296511c0766145097625a62bf099c3d155284d250ad6e528e788bc90b2945838498dfe473c6c6c78d1694b6fba8e19f7dee0d064a043841e6231603fff668
 DIST percona-server-8.0.22-13.tar.gz 530806570 BLAKE2B 256e5afa2e3908617c41ffcab591ccdbfd932a8ba3ce25fbf2a0be2cdfa80991b0c2d090c11ffae64e4bb3d8cf9f3011b70974ab22cbab023f6625ac422f3c73 SHA512 9b7a1d06885eb4412361bb3920adc9f050f8da95584eb910c97c8877a433ead04d02f2908e5e9648b1d79cdba677727fdb745377feac3c958339588d5f0cdf2b
 DIST percona-server-8.0.22.13-patches-02.tar.xz 9620 BLAKE2B c04e97ed422719bec5008b668e2ce3ecd5b848338a9f2f2ecd2fc867307b7fce9bae4cb0efd44f9b950f74d7f31394c06248d1c72784e9c0790378e2ea4d7934 SHA512 2476ee2f4096eaee211017609f82cf8fa9817cda6345336f478257711b64b8c37340b482a02f3d0b19e16e01055cf619cdd1b66d5fbfa0fd1d8edbd529c4096f
+DIST percona-server-8.0.23-14.tar.gz 528227168 BLAKE2B c497e69d3e7f370e6ffd71ef8129fccb35d8814e713bf78da04b7517f56e7d733d0b54543e86a24568587ae270bd7ca7add36646845e8f7dc5c288aebd1db8c7 SHA512 199669fc53b80426be709a2d7026f6aa821f2d98e5763b3311f564550687cc6401def191f56c615ffed69264a09aaec78ca8371d35a6a69386832f24f30df71b
+DIST percona-server-8.0.23.14-patches-01.tar.xz 5808 BLAKE2B d5a74a3cc5a84f545fc8aaef21c03992836e60cfdf9fbd602ffe929ed626186762f55641a4eec94327d7ac39acc0fe6baa81671472e4d8fd4a026864f5e9a25a SHA512 d23661b8669481d650bf3deca0336b73a680c88ac441fc8d80753ca50ac569f62658615ae30cc7c1a25318cdaa2987c912d09f0cb016b14860b4afdd213fc820

diff --git a/dev-db/percona-server/percona-server-8.0.23.14.ebuild b/dev-db/percona-server/percona-server-8.0.23.14.ebuild
new file mode 100644
index 00000000000..65bf6f855cb
--- /dev/null
+++ b/dev-db/percona-server/percona-server-8.0.23.14.ebuild
@@ -0,0 +1,1214 @@
+# 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_BOOST_VERSION="1.73.0"
+MY_PV=$(ver_rs 3 '-')
+MY_PV="${MY_PV//_pre*}"
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.23.14-patches-01.tar.xz"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
+	${PATCH_SET}
+"
+
+HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
+DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 ldap numa pam +perl profiling
+	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
+
+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:=
+		net-misc/curl:=
+		cjk? ( app-text/mecab:= )
+		ldap? (
+			dev-libs/cyrus-sasl
+			net-nds/openldap
+		)
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		pam? ( sys-libs/pam: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/mysql !dev-db/mysql-cluster
+	!dev-db/percona-server:0
+	!dev-db/percona-server: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
+
+	# 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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
+		-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_AUTHENTICATION_LDAP=$(usex ldap system OFF)
+			-DWITH_COREDUMPER=OFF
+			-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)
+			-DWITH_PAM=$(usex pam)
+		)
+
+		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
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			-DWITH_TOKUDB=$(usex tokudb 1 0)
+		)
+	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+=( "group_replication.gr_ssl_options2;0;Sporadic failing test" )
+	disabled_tests+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" )
+	disabled_tests+=( "innodb.percona_log_encrypt_failure;0;Requires proper keyring setup" )
+	disabled_tests+=( "innodb.percona_log_encrypt_change_mk;6039;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_log_encrypt_change_rk;6805;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" )
+	disabled_tests+=( "main.coredump;0;Known test failure" )
+	disabled_tests+=( "main.myisam-blob;0;Sporadic failing test" )
+	disabled_tests+=( "main.mysql_load_data_local_dir;7416;Known test failure" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
+	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
+	disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
+	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;6804;Known rounding error with latest AMD processors" )
+	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+=( "sys_vars.innodb_sys_tablespace_encrypt_basic;7415;Known test failure" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;6803;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
+
+	if [[ -z "${MTR_VAULT_TOKEN}" ]] ; then
+		local impossible_test
+		for impossible_test in \
+			encryption.default_table_encryption_var \
+			keyring_vault.innodb_online_alter_encryption \
+			keyring_vault.innodb_row_log_encryption \
+			keyring_vault.install_keyring_vault \
+			keyring_vault.keyring_udf \
+			keyring_vault.keyring_vault_config \
+			keyring_vault.keyring_vault_config_qa \
+			keyring_vault.keyring_vault_timeout \
+			keyring_vault.key_rotation_qa \
+			keyring_vault.rpl_key_rotation \
+			keyring_vault.table_encrypt_2 \
+			keyring_vault.table_encrypt_2_directory \
+			keyring_vault.table_encrypt_2_keyring \
+			keyring_vault.table_encrypt_5 \
+			keyring_vault.table_encrypt_5_directory \
+			keyring_vault.table_encrypt_kill \
+			keyring_vault.temp_table_encrypt_keyring_vault \
+			main.persisted_variables \
+		; do
+			_disable_test "${impossible_test}" "0" "MTR_VAULT_TOKEN is not 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() {
+	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2021-05-21  8:22 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2021-05-21  8:22 UTC (permalink / raw
  To: gentoo-commits

commit:     962b91f809290f6504d319ace691a4c1f1bcae36
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri May 21 08:22:21 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri May 21 08:22:33 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=962b91f8

dev-db/percona-server: update patch set

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

 dev-db/percona-server/Manifest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index e14ff707c05..0c4d4ebe8de 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -2,4 +2,4 @@ DIST boost_1_73_0.tar.bz2 109247910 BLAKE2B 5995ff6ca21f45988b187b94bf743795cca9
 DIST percona-server-8.0.22-13.tar.gz 530806570 BLAKE2B 256e5afa2e3908617c41ffcab591ccdbfd932a8ba3ce25fbf2a0be2cdfa80991b0c2d090c11ffae64e4bb3d8cf9f3011b70974ab22cbab023f6625ac422f3c73 SHA512 9b7a1d06885eb4412361bb3920adc9f050f8da95584eb910c97c8877a433ead04d02f2908e5e9648b1d79cdba677727fdb745377feac3c958339588d5f0cdf2b
 DIST percona-server-8.0.22.13-patches-02.tar.xz 9620 BLAKE2B c04e97ed422719bec5008b668e2ce3ecd5b848338a9f2f2ecd2fc867307b7fce9bae4cb0efd44f9b950f74d7f31394c06248d1c72784e9c0790378e2ea4d7934 SHA512 2476ee2f4096eaee211017609f82cf8fa9817cda6345336f478257711b64b8c37340b482a02f3d0b19e16e01055cf619cdd1b66d5fbfa0fd1d8edbd529c4096f
 DIST percona-server-8.0.23-14.tar.gz 528227168 BLAKE2B c497e69d3e7f370e6ffd71ef8129fccb35d8814e713bf78da04b7517f56e7d733d0b54543e86a24568587ae270bd7ca7add36646845e8f7dc5c288aebd1db8c7 SHA512 199669fc53b80426be709a2d7026f6aa821f2d98e5763b3311f564550687cc6401def191f56c615ffed69264a09aaec78ca8371d35a6a69386832f24f30df71b
-DIST percona-server-8.0.23.14-patches-01.tar.xz 5808 BLAKE2B d5a74a3cc5a84f545fc8aaef21c03992836e60cfdf9fbd602ffe929ed626186762f55641a4eec94327d7ac39acc0fe6baa81671472e4d8fd4a026864f5e9a25a SHA512 d23661b8669481d650bf3deca0336b73a680c88ac441fc8d80753ca50ac569f62658615ae30cc7c1a25318cdaa2987c912d09f0cb016b14860b4afdd213fc820
+DIST percona-server-8.0.23.14-patches-01.tar.xz 5908 BLAKE2B 968fbe0f8e3666ada008d81e9e07a5149dc6137908bf955bdf37c6bc6703cdb7a1d9a7395435d6b8772865b08d6d6716690331968069e4c1d3059a38b3c8ca49 SHA512 31983837d7fbd42b5e227f6617e2b59303ce185c613f620a61a9b9d26cd075feaf58969e3d8b415c70ee796bd1e912204cd5780e6d07cf6e2b0dc28ca41b6f70


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2021-08-04 20:31 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2021-08-04 20:31 UTC (permalink / raw
  To: gentoo-commits

commit:     34315eef7a95b4eef88d0138d7d1df0564adb32e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  4 19:53:16 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=34315eef

dev-db/percona-server: bump to v8.0.25-15

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

 dev-db/percona-server/Manifest                     |    2 +
 .../percona-server/percona-server-8.0.25.15.ebuild | 1273 ++++++++++++++++++++
 2 files changed, 1275 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 0c4d4ebe8de..c827fc6678e 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -3,3 +3,5 @@ DIST percona-server-8.0.22-13.tar.gz 530806570 BLAKE2B 256e5afa2e3908617c41ffcab
 DIST percona-server-8.0.22.13-patches-02.tar.xz 9620 BLAKE2B c04e97ed422719bec5008b668e2ce3ecd5b848338a9f2f2ecd2fc867307b7fce9bae4cb0efd44f9b950f74d7f31394c06248d1c72784e9c0790378e2ea4d7934 SHA512 2476ee2f4096eaee211017609f82cf8fa9817cda6345336f478257711b64b8c37340b482a02f3d0b19e16e01055cf619cdd1b66d5fbfa0fd1d8edbd529c4096f
 DIST percona-server-8.0.23-14.tar.gz 528227168 BLAKE2B c497e69d3e7f370e6ffd71ef8129fccb35d8814e713bf78da04b7517f56e7d733d0b54543e86a24568587ae270bd7ca7add36646845e8f7dc5c288aebd1db8c7 SHA512 199669fc53b80426be709a2d7026f6aa821f2d98e5763b3311f564550687cc6401def191f56c615ffed69264a09aaec78ca8371d35a6a69386832f24f30df71b
 DIST percona-server-8.0.23.14-patches-01.tar.xz 5908 BLAKE2B 968fbe0f8e3666ada008d81e9e07a5149dc6137908bf955bdf37c6bc6703cdb7a1d9a7395435d6b8772865b08d6d6716690331968069e4c1d3059a38b3c8ca49 SHA512 31983837d7fbd42b5e227f6617e2b59303ce185c613f620a61a9b9d26cd075feaf58969e3d8b415c70ee796bd1e912204cd5780e6d07cf6e2b0dc28ca41b6f70
+DIST percona-server-8.0.25-15.tar.gz 531072362 BLAKE2B aa6867a8ac72325596393723cf8735329f638cfe11f790c7690dc5f45dcf01f99f9f999c551b2ad6b9f287f8763e8b262fef7c9327b82882493b576acd8d7a69 SHA512 500fc4ab5d275d7d1d2b048920d22d725074450d9f356b4ea739a4c276bfe767db76e2b52a358867d77805ef288cfdb80ab6e230bfa77a84b97536bf153c443f
+DIST percona-server-8.0.25.15-patches-01.tar.xz 7624 BLAKE2B b06495859f3df546bc42e69ec77007a335103020313524ed728309764fea8ca2ea6f246938852ab2fb5ea12b4d901af5ebb9abff4d99b7e56d6ffd501d10bd38 SHA512 69b2d478046666d7c5dbffe662f4e000fd1c2c8789bcaeea72b8bb229ad85d8cd54a293c74440f93c56dc07a06143553ff989711787e6cd610a8e23bb353a1df

diff --git a/dev-db/percona-server/percona-server-8.0.25.15.ebuild b/dev-db/percona-server/percona-server-8.0.25.15.ebuild
new file mode 100644
index 00000000000..f81b726f135
--- /dev/null
+++ b/dev-db/percona-server/percona-server-8.0.25.15.ebuild
@@ -0,0 +1,1273 @@
+# 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_BOOST_VERSION="1.73.0"
+MY_PV=$(ver_rs 3 '-')
+MY_PV="${MY_PV//_pre*}"
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.25.15-patches-01.tar.xz"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
+	${PATCH_SET}
+"
+
+HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
+DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 ldap numa pam +perl profiling
+	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
+
+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:=
+		net-misc/curl:=
+		cjk? ( app-text/mecab:= )
+		ldap? (
+			dev-libs/cyrus-sasl
+			net-nds/openldap
+		)
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		pam? ( sys-libs/pam: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/mysql !dev-db/mysql-cluster
+	!dev-db/percona-server:0
+	!dev-db/percona-server: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
+
+	# 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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
+		-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_AUTHENTICATION_LDAP=$(usex ldap system OFF)
+			-DWITH_COREDUMPER=OFF
+			-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)
+			-DWITH_PAM=$(usex pam)
+		)
+
+		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
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			-DWITH_TOKUDB=$(usex tokudb 1 0)
+		)
+	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+=( "group_replication.gr_ssl_options2;0;Sporadic failing test" )
+	disabled_tests+=( "innodb.alter_kill;0;Known test failure -- no upstream bug yet" )
+	disabled_tests+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" )
+	disabled_tests+=( "innodb.percona_log_encrypt_change_mk;6039;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_log_encrypt_change_rk;6805;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_log_encrypt_failure;0;Requires proper keyring setup" )
+	disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" )
+	disabled_tests+=( "main.coredump;0;Known test failure" )
+	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.myisam-blob;0;Sporadic failing test" )
+	disabled_tests+=( "main.mysql_load_data_local_dir;7416;Known test failure" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
+	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
+	disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
+	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;6804;Known rounding error with latest AMD processors" )
+	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.innodb_sys_tablespace_encrypt_basic;7415;Known test failure" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;6803;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
+
+	if [[ -z "${MTR_VAULT_TOKEN}" ]] ; then
+		local impossible_test
+		for impossible_test in \
+			encryption.default_table_encryption_var \
+			keyring_vault.innodb_online_alter_encryption \
+			keyring_vault.innodb_row_log_encryption \
+			keyring_vault.install_keyring_vault \
+			keyring_vault.keyring_udf \
+			keyring_vault.keyring_vault_config \
+			keyring_vault.keyring_vault_config_qa \
+			keyring_vault.keyring_vault_timeout \
+			keyring_vault.key_rotation_qa \
+			keyring_vault.rpl_key_rotation \
+			keyring_vault.table_encrypt_2 \
+			keyring_vault.table_encrypt_2_directory \
+			keyring_vault.table_encrypt_2_keyring \
+			keyring_vault.table_encrypt_5 \
+			keyring_vault.table_encrypt_5_directory \
+			keyring_vault.table_encrypt_kill \
+			keyring_vault.temp_table_encrypt_keyring_vault \
+			main.persisted_variables \
+		; do
+			_disable_test "${impossible_test}" "0" "MTR_VAULT_TOKEN is not 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() {
+	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] 121+ messages in thread

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

commit:     5285c8f5b145344fcdd00cab216982319245ed5d
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 14 01:47:34 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 14 03:49:49 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5285c8f5

dev-db/percona-server: drop old

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

 dev-db/percona-server/Manifest                     |    4 -
 .../percona-server/percona-server-8.0.22.13.ebuild | 1211 -------------------
 .../percona-server/percona-server-8.0.23.14.ebuild | 1214 --------------------
 3 files changed, 2429 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index c827fc6678e6..4ba376190db0 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,7 +1,3 @@
 DIST boost_1_73_0.tar.bz2 109247910 BLAKE2B 5995ff6ca21f45988b187b94bf743795cca97531baa8355f488be0987b9426289dd85d6ce25b7eb03ccd690109f05ba56252a95bca50505ad9cd66f4e0e234e8 SHA512 86c296511c0766145097625a62bf099c3d155284d250ad6e528e788bc90b2945838498dfe473c6c6c78d1694b6fba8e19f7dee0d064a043841e6231603fff668
-DIST percona-server-8.0.22-13.tar.gz 530806570 BLAKE2B 256e5afa2e3908617c41ffcab591ccdbfd932a8ba3ce25fbf2a0be2cdfa80991b0c2d090c11ffae64e4bb3d8cf9f3011b70974ab22cbab023f6625ac422f3c73 SHA512 9b7a1d06885eb4412361bb3920adc9f050f8da95584eb910c97c8877a433ead04d02f2908e5e9648b1d79cdba677727fdb745377feac3c958339588d5f0cdf2b
-DIST percona-server-8.0.22.13-patches-02.tar.xz 9620 BLAKE2B c04e97ed422719bec5008b668e2ce3ecd5b848338a9f2f2ecd2fc867307b7fce9bae4cb0efd44f9b950f74d7f31394c06248d1c72784e9c0790378e2ea4d7934 SHA512 2476ee2f4096eaee211017609f82cf8fa9817cda6345336f478257711b64b8c37340b482a02f3d0b19e16e01055cf619cdd1b66d5fbfa0fd1d8edbd529c4096f
-DIST percona-server-8.0.23-14.tar.gz 528227168 BLAKE2B c497e69d3e7f370e6ffd71ef8129fccb35d8814e713bf78da04b7517f56e7d733d0b54543e86a24568587ae270bd7ca7add36646845e8f7dc5c288aebd1db8c7 SHA512 199669fc53b80426be709a2d7026f6aa821f2d98e5763b3311f564550687cc6401def191f56c615ffed69264a09aaec78ca8371d35a6a69386832f24f30df71b
-DIST percona-server-8.0.23.14-patches-01.tar.xz 5908 BLAKE2B 968fbe0f8e3666ada008d81e9e07a5149dc6137908bf955bdf37c6bc6703cdb7a1d9a7395435d6b8772865b08d6d6716690331968069e4c1d3059a38b3c8ca49 SHA512 31983837d7fbd42b5e227f6617e2b59303ce185c613f620a61a9b9d26cd075feaf58969e3d8b415c70ee796bd1e912204cd5780e6d07cf6e2b0dc28ca41b6f70
 DIST percona-server-8.0.25-15.tar.gz 531072362 BLAKE2B aa6867a8ac72325596393723cf8735329f638cfe11f790c7690dc5f45dcf01f99f9f999c551b2ad6b9f287f8763e8b262fef7c9327b82882493b576acd8d7a69 SHA512 500fc4ab5d275d7d1d2b048920d22d725074450d9f356b4ea739a4c276bfe767db76e2b52a358867d77805ef288cfdb80ab6e230bfa77a84b97536bf153c443f
 DIST percona-server-8.0.25.15-patches-01.tar.xz 7624 BLAKE2B b06495859f3df546bc42e69ec77007a335103020313524ed728309764fea8ca2ea6f246938852ab2fb5ea12b4d901af5ebb9abff4d99b7e56d6ffd501d10bd38 SHA512 69b2d478046666d7c5dbffe662f4e000fd1c2c8789bcaeea72b8bb229ad85d8cd54a293c74440f93c56dc07a06143553ff989711787e6cd610a8e23bb353a1df

diff --git a/dev-db/percona-server/percona-server-8.0.22.13.ebuild b/dev-db/percona-server/percona-server-8.0.22.13.ebuild
deleted file mode 100644
index 8b514bd03ae3..000000000000
--- a/dev-db/percona-server/percona-server-8.0.22.13.ebuild
+++ /dev/null
@@ -1,1211 +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_BOOST_VERSION="1.73.0"
-MY_PV=$(ver_rs 3 '-')
-MY_PV="${MY_PV//_pre*}"
-MY_PN="Percona-Server"
-MY_P="${PN}-${MY_PV}"
-MY_MAJOR_PV=$(ver_cut 1-2)
-MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.22.13-patches-02.tar.xz"
-
-SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
-	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
-	${PATCH_SET}
-"
-
-HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
-DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 ldap numa pam +perl profiling
-	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
-
-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:=
-		net-misc/curl:=
-		cjk? ( app-text/mecab:= )
-		ldap? (
-			dev-libs/cyrus-sasl
-			net-nds/openldap
-		)
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-		pam? ( sys-libs/pam: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/mysql !dev-db/mysql-cluster
-	!dev-db/percona-server:0
-	!dev-db/percona-server: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
-
-	# 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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
-		-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_AUTHENTICATION_LDAP=$(usex ldap system OFF)
-			-DWITH_COREDUMPER=OFF
-			-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)
-			-DWITH_PAM=$(usex pam)
-		)
-
-		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
-			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
-			-DWITH_TOKUDB=$(usex tokudb 1 0)
-		)
-	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+=( "group_replication.gr_ssl_options2;0;Sporadic failing test" )
-	disabled_tests+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" )
-	disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" )
-	disabled_tests+=( "innodb.percona_log_encrypt_failure;0;Requires proper keyring setup" )
-	disabled_tests+=( "innodb.percona_log_encrypt_change_mk;6039;False positive on Gentoo (PS)" )
-	disabled_tests+=( "innodb.percona_log_encrypt_change_rk;6805;False positive on Gentoo (PS)" )
-	disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" )
-	disabled_tests+=( "main.myisam-blob;0;Sporadic failing test" )
-	disabled_tests+=( "main.mysql_load_data_local_dir;7416;Known test failure" )
-	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
-	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
-	disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
-	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;6804;Known rounding error with latest AMD processors" )
-	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+=( "sys_vars.innodb_sys_tablespace_encrypt_basic;7415;Known test failure" )
-	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
-	disabled_tests+=( "x.message_protobuf_nested;6803;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
-
-	if [[ -z "${MTR_VAULT_TOKEN}" ]] ; then
-		local impossible_test
-		for impossible_test in \
-			encryption.default_table_encryption_var \
-			keyring_vault.innodb_online_alter_encryption \
-			keyring_vault.innodb_row_log_encryption \
-			keyring_vault.install_keyring_vault \
-			keyring_vault.keyring_udf \
-			keyring_vault.keyring_vault_config \
-			keyring_vault.keyring_vault_config_qa \
-			keyring_vault.keyring_vault_timeout \
-			keyring_vault.key_rotation_qa \
-			keyring_vault.rpl_key_rotation \
-			keyring_vault.table_encrypt_2 \
-			keyring_vault.table_encrypt_2_directory \
-			keyring_vault.table_encrypt_2_keyring \
-			keyring_vault.table_encrypt_5 \
-			keyring_vault.table_encrypt_5_directory \
-			keyring_vault.table_encrypt_kill \
-			keyring_vault.temp_table_encrypt_keyring_vault \
-			main.persisted_variables \
-		; do
-			_disable_test "${impossible_test}" "0" "MTR_VAULT_TOKEN is not 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() {
-	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/percona-server/percona-server-8.0.23.14.ebuild b/dev-db/percona-server/percona-server-8.0.23.14.ebuild
deleted file mode 100644
index 65bf6f855cba..000000000000
--- a/dev-db/percona-server/percona-server-8.0.23.14.ebuild
+++ /dev/null
@@ -1,1214 +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_BOOST_VERSION="1.73.0"
-MY_PV=$(ver_rs 3 '-')
-MY_PV="${MY_PV//_pre*}"
-MY_PN="Percona-Server"
-MY_P="${PN}-${MY_PV}"
-MY_MAJOR_PV=$(ver_cut 1-2)
-MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.23.14-patches-01.tar.xz"
-
-SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
-	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
-	${PATCH_SET}
-"
-
-HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
-DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 ldap numa pam +perl profiling
-	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
-
-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:=
-		net-misc/curl:=
-		cjk? ( app-text/mecab:= )
-		ldap? (
-			dev-libs/cyrus-sasl
-			net-nds/openldap
-		)
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-		pam? ( sys-libs/pam: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/mysql !dev-db/mysql-cluster
-	!dev-db/percona-server:0
-	!dev-db/percona-server: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
-
-	# 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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
-		-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_AUTHENTICATION_LDAP=$(usex ldap system OFF)
-			-DWITH_COREDUMPER=OFF
-			-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)
-			-DWITH_PAM=$(usex pam)
-		)
-
-		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
-			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
-			-DWITH_TOKUDB=$(usex tokudb 1 0)
-		)
-	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+=( "group_replication.gr_ssl_options2;0;Sporadic failing test" )
-	disabled_tests+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" )
-	disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" )
-	disabled_tests+=( "innodb.percona_log_encrypt_failure;0;Requires proper keyring setup" )
-	disabled_tests+=( "innodb.percona_log_encrypt_change_mk;6039;False positive on Gentoo (PS)" )
-	disabled_tests+=( "innodb.percona_log_encrypt_change_rk;6805;False positive on Gentoo (PS)" )
-	disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" )
-	disabled_tests+=( "main.coredump;0;Known test failure" )
-	disabled_tests+=( "main.myisam-blob;0;Sporadic failing test" )
-	disabled_tests+=( "main.mysql_load_data_local_dir;7416;Known test failure" )
-	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
-	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
-	disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
-	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;6804;Known rounding error with latest AMD processors" )
-	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+=( "sys_vars.innodb_sys_tablespace_encrypt_basic;7415;Known test failure" )
-	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
-	disabled_tests+=( "x.message_protobuf_nested;6803;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
-
-	if [[ -z "${MTR_VAULT_TOKEN}" ]] ; then
-		local impossible_test
-		for impossible_test in \
-			encryption.default_table_encryption_var \
-			keyring_vault.innodb_online_alter_encryption \
-			keyring_vault.innodb_row_log_encryption \
-			keyring_vault.install_keyring_vault \
-			keyring_vault.keyring_udf \
-			keyring_vault.keyring_vault_config \
-			keyring_vault.keyring_vault_config_qa \
-			keyring_vault.keyring_vault_timeout \
-			keyring_vault.key_rotation_qa \
-			keyring_vault.rpl_key_rotation \
-			keyring_vault.table_encrypt_2 \
-			keyring_vault.table_encrypt_2_directory \
-			keyring_vault.table_encrypt_2_keyring \
-			keyring_vault.table_encrypt_5 \
-			keyring_vault.table_encrypt_5_directory \
-			keyring_vault.table_encrypt_kill \
-			keyring_vault.temp_table_encrypt_keyring_vault \
-			main.persisted_variables \
-		; do
-			_disable_test "${impossible_test}" "0" "MTR_VAULT_TOKEN is not 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() {
-	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] 121+ messages in thread

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

commit:     4bdc1a708b13ad21a291f7459b59c2022b4721be
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 14 03:45:40 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 14 03:49:50 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bdc1a70

dev-db/percona-server: bump to v8.0.26-15

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

 dev-db/percona-server/Manifest                     |    2 +
 .../percona-server/percona-server-8.0.26.16.ebuild | 1276 ++++++++++++++++++++
 2 files changed, 1278 insertions(+)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 4ba376190db0..534ab19c2607 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,5 @@
 DIST boost_1_73_0.tar.bz2 109247910 BLAKE2B 5995ff6ca21f45988b187b94bf743795cca97531baa8355f488be0987b9426289dd85d6ce25b7eb03ccd690109f05ba56252a95bca50505ad9cd66f4e0e234e8 SHA512 86c296511c0766145097625a62bf099c3d155284d250ad6e528e788bc90b2945838498dfe473c6c6c78d1694b6fba8e19f7dee0d064a043841e6231603fff668
 DIST percona-server-8.0.25-15.tar.gz 531072362 BLAKE2B aa6867a8ac72325596393723cf8735329f638cfe11f790c7690dc5f45dcf01f99f9f999c551b2ad6b9f287f8763e8b262fef7c9327b82882493b576acd8d7a69 SHA512 500fc4ab5d275d7d1d2b048920d22d725074450d9f356b4ea739a4c276bfe767db76e2b52a358867d77805ef288cfdb80ab6e230bfa77a84b97536bf153c443f
 DIST percona-server-8.0.25.15-patches-01.tar.xz 7624 BLAKE2B b06495859f3df546bc42e69ec77007a335103020313524ed728309764fea8ca2ea6f246938852ab2fb5ea12b4d901af5ebb9abff4d99b7e56d6ffd501d10bd38 SHA512 69b2d478046666d7c5dbffe662f4e000fd1c2c8789bcaeea72b8bb229ad85d8cd54a293c74440f93c56dc07a06143553ff989711787e6cd610a8e23bb353a1df
+DIST percona-server-8.0.26-16.tar.gz 532328971 BLAKE2B bef32f7a26261f3b0d89bd9b95b826101e2e84c662ce2200a2d9d8a612d949804d233905db71bfab5aa04458e7773231659d67ea09e08e68df8ef5eca4391f39 SHA512 9ae60e2d81dfaabc214692cd0919c2fc3ba698bd0a399e42df662766c1d67714f6f3cfe6416019b26e7866bc59b78d99fc5767f64ede1ca8e5a344995c1ff4c0
+DIST percona-server-8.0.26.16-patches-01.tar.xz 8144 BLAKE2B 28a4eaec657c09a6f8290b654dd5316d44a4cbf94e418edee3754742f21df56a058de9332c15abbb7c8bbd3ed6fc63e48e6c5fa77524dccf44ff1d5a89085a6b SHA512 4a128a89abc1f48582b0c6ab841643fa0b7e018eaa32414e775705cd1e8c2dcacecd334face9db33775ca3a2a862528e1cc7f2bfd8b259b7367f0f2ebdee52c4

diff --git a/dev-db/percona-server/percona-server-8.0.26.16.ebuild b/dev-db/percona-server/percona-server-8.0.26.16.ebuild
new file mode 100644
index 000000000000..c8fd325a9307
--- /dev/null
+++ b/dev-db/percona-server/percona-server-8.0.26.16.ebuild
@@ -0,0 +1,1276 @@
+# 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_BOOST_VERSION="1.73.0"
+MY_PV=$(ver_rs 3 '-')
+MY_PV="${MY_PV//_pre*}"
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.26.16-patches-01.tar.xz"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
+	${PATCH_SET}
+"
+
+HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
+DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 ldap numa pam +perl profiling
+	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
+
+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 -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:=
+		net-misc/curl:=
+		cjk? ( app-text/mecab:= )
+		ldap? (
+			dev-libs/cyrus-sasl
+			net-nds/openldap
+		)
+		jemalloc? ( dev-libs/jemalloc:0= )
+		kernel_linux? (
+			dev-libs/libaio:0=
+			sys-process/procps:0=
+		)
+		numa? ( sys-process/numactl )
+		pam? ( sys-libs/pam: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/mysql !dev-db/mysql-cluster
+	!dev-db/percona-server:0
+	!dev-db/percona-server: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
+
+	# 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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
+		-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_AUTHENTICATION_LDAP=$(usex ldap system OFF)
+			-DWITH_COREDUMPER=OFF
+			-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)
+			-DWITH_PAM=$(usex pam)
+		)
+
+		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
+			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
+			-DWITH_TOKUDB=$(usex tokudb 1 0)
+		)
+	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+=( "group_replication.gr_ssl_options2;0;Sporadic failing test" )
+	disabled_tests+=( "innodb.alter_kill;0;Known test failure -- no upstream bug yet" )
+	disabled_tests+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" )
+	disabled_tests+=( "innodb.percona_log_encrypt_change_mk;6039;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_log_encrypt_change_rk;6805;False positive on Gentoo (PS)" )
+	disabled_tests+=( "innodb.percona_log_encrypt_failure;0;Requires proper keyring setup" )
+	disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" )
+	disabled_tests+=( "main.coredump;0;Known test failure" )
+	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.mtr_unit_tests;7975;Known test failure (PS)" )
+	disabled_tests+=( "main.myisam-blob;0;Sporadic failing test" )
+	disabled_tests+=( "main.mysql_load_data_local_dir;7416;Known test failure" )
+	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
+	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
+	disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
+	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;6804;Known rounding error with latest AMD processors" )
+	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.innodb_sys_tablespace_encrypt_basic;7415;Known test failure" )
+	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware" )
+	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+	disabled_tests+=( "x.message_protobuf_nested;6803;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
+
+	if [[ -z "${MTR_VAULT_TOKEN}" ]] ; then
+		local impossible_test
+		for impossible_test in \
+			encryption.default_table_encryption_var \
+			encryption.innodb-redo-nokeys2_release \
+			keyring_vault.innodb_online_alter_encryption \
+			keyring_vault.innodb_row_log_encryption \
+			keyring_vault.install_keyring_vault \
+			keyring_vault.keyring_udf \
+			keyring_vault.keyring_vault_config \
+			keyring_vault.keyring_vault_config_qa \
+			keyring_vault.keyring_vault_timeout \
+			keyring_vault.key_rotation_qa \
+			keyring_vault.rpl_key_rotation \
+			keyring_vault.table_encrypt_2 \
+			keyring_vault.table_encrypt_2_directory \
+			keyring_vault.table_encrypt_2_keyring \
+			keyring_vault.table_encrypt_5 \
+			keyring_vault.table_encrypt_5_directory \
+			keyring_vault.table_encrypt_kill \
+			keyring_vault.temp_table_encrypt_keyring_vault \
+			main.persisted_variables \
+		; do
+			_disable_test "${impossible_test}" "0" "MTR_VAULT_TOKEN is not 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() {
+	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2021-11-18 15:35 Thomas Deutschmann
  0 siblings, 0 replies; 121+ messages in thread
From: Thomas Deutschmann @ 2021-11-18 15:35 UTC (permalink / raw
  To: gentoo-commits

commit:     f135659c826a8d11fb437ff0cecba2c8fb5b96ee
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 18 15:32:43 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=f135659c

dev-db/percona-server: 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/percona-server/percona-server-8.0.26.16.ebuild | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/dev-db/percona-server/percona-server-8.0.26.16.ebuild b/dev-db/percona-server/percona-server-8.0.26.16.ebuild
index c8fd325a9307..9098b344ce11 100644
--- a/dev-db/percona-server/percona-server-8.0.26.16.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.26.16.ebuild
@@ -366,12 +366,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))"
@@ -578,10 +578,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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2022-03-22 23:32 Sam James
  0 siblings, 0 replies; 121+ messages in thread
From: Sam James @ 2022-03-22 23:32 UTC (permalink / raw
  To: gentoo-commits

commit:     3a440d1f4368c725832e655498d853cd2e31d7b7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 22 22:58:06 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar 22 23:26:59 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a440d1f

dev-db/percona-server: add version limit on OpenLDAP (needs ldap_r)

We need (for now) the reentrant library from OpenLDAP which is gone.

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

 ...na-server-8.0.25.15.ebuild => percona-server-8.0.25.15-r1.ebuild} | 5 +++--
 ...na-server-8.0.26.16.ebuild => percona-server-8.0.26.16-r1.ebuild} | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dev-db/percona-server/percona-server-8.0.25.15.ebuild b/dev-db/percona-server/percona-server-8.0.25.15-r1.ebuild
similarity index 99%
rename from dev-db/percona-server/percona-server-8.0.25.15.ebuild
rename to dev-db/percona-server/percona-server-8.0.25.15-r1.ebuild
index a6db5af0b52e..1960a9053c03 100644
--- a/dev-db/percona-server/percona-server-8.0.25.15.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.25.15-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"
@@ -49,6 +49,7 @@ S="${WORKDIR}/mysql"
 
 # Be warned, *DEPEND are version-dependant
 # These are used for both runtime and compiletime
+# openldap < dep for bug #835647 (we need ldap_r)
 COMMON_DEPEND="
 	>=app-arch/lz4-0_p131:=
 	app-arch/zstd:=
@@ -64,7 +65,7 @@ COMMON_DEPEND="
 		cjk? ( app-text/mecab:= )
 		ldap? (
 			dev-libs/cyrus-sasl
-			net-nds/openldap
+			<net-nds/openldap-2.6:=
 		)
 		jemalloc? ( dev-libs/jemalloc:0= )
 		kernel_linux? (

diff --git a/dev-db/percona-server/percona-server-8.0.26.16.ebuild b/dev-db/percona-server/percona-server-8.0.26.16-r1.ebuild
similarity index 99%
rename from dev-db/percona-server/percona-server-8.0.26.16.ebuild
rename to dev-db/percona-server/percona-server-8.0.26.16-r1.ebuild
index 9098b344ce11..6264df78a218 100644
--- a/dev-db/percona-server/percona-server-8.0.26.16.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.26.16-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"
@@ -49,6 +49,7 @@ S="${WORKDIR}/mysql"
 
 # Be warned, *DEPEND are version-dependant
 # These are used for both runtime and compiletime
+# openldap < dep for bug #835647 (we need ldap_r)
 COMMON_DEPEND="
 	>=app-arch/lz4-0_p131:=
 	app-arch/zstd:=
@@ -64,7 +65,7 @@ COMMON_DEPEND="
 		cjk? ( app-text/mecab:= )
 		ldap? (
 			dev-libs/cyrus-sasl
-			net-nds/openldap
+			<net-nds/openldap-2.6:=
 		)
 		jemalloc? ( dev-libs/jemalloc:0= )
 		kernel_linux? (


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2022-05-15  1:00 Sam James
  0 siblings, 0 replies; 121+ messages in thread
From: Sam James @ 2022-05-15  1:00 UTC (permalink / raw
  To: gentoo-commits

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

dev-db/percona-server: egrep -> grep -E

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

 dev-db/percona-server/percona-server-8.0.25.15-r1.ebuild | 2 +-
 dev-db/percona-server/percona-server-8.0.26.16-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/percona-server/percona-server-8.0.25.15-r1.ebuild b/dev-db/percona-server/percona-server-8.0.25.15-r1.ebuild
index 1960a9053c03..190b425a5460 100644
--- a/dev-db/percona-server/percona-server-8.0.25.15-r1.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.25.15-r1.ebuild
@@ -1135,7 +1135,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/percona-server/percona-server-8.0.26.16-r1.ebuild b/dev-db/percona-server/percona-server-8.0.26.16-r1.ebuild
index 6264df78a218..6774c64be097 100644
--- a/dev-db/percona-server/percona-server-8.0.26.16-r1.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.26.16-r1.ebuild
@@ -1137,7 +1137,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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2022-12-14  1:53 Sam James
  0 siblings, 0 replies; 121+ messages in thread
From: Sam James @ 2022-12-14  1:53 UTC (permalink / raw
  To: gentoo-commits

commit:     fbec97ced3996de476437dda0502af42078712d1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 14 01:51:32 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 14 01:52:48 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fbec97ce

dev-db/percona-server: drop 8.0.25.15-r1

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

 dev-db/percona-server/Manifest                     |    2 -
 .../percona-server-8.0.25.15-r1.ebuild             | 1274 --------------------
 2 files changed, 1276 deletions(-)

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 534ab19c2607..6b0b0a608769 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,5 +1,3 @@
 DIST boost_1_73_0.tar.bz2 109247910 BLAKE2B 5995ff6ca21f45988b187b94bf743795cca97531baa8355f488be0987b9426289dd85d6ce25b7eb03ccd690109f05ba56252a95bca50505ad9cd66f4e0e234e8 SHA512 86c296511c0766145097625a62bf099c3d155284d250ad6e528e788bc90b2945838498dfe473c6c6c78d1694b6fba8e19f7dee0d064a043841e6231603fff668
-DIST percona-server-8.0.25-15.tar.gz 531072362 BLAKE2B aa6867a8ac72325596393723cf8735329f638cfe11f790c7690dc5f45dcf01f99f9f999c551b2ad6b9f287f8763e8b262fef7c9327b82882493b576acd8d7a69 SHA512 500fc4ab5d275d7d1d2b048920d22d725074450d9f356b4ea739a4c276bfe767db76e2b52a358867d77805ef288cfdb80ab6e230bfa77a84b97536bf153c443f
-DIST percona-server-8.0.25.15-patches-01.tar.xz 7624 BLAKE2B b06495859f3df546bc42e69ec77007a335103020313524ed728309764fea8ca2ea6f246938852ab2fb5ea12b4d901af5ebb9abff4d99b7e56d6ffd501d10bd38 SHA512 69b2d478046666d7c5dbffe662f4e000fd1c2c8789bcaeea72b8bb229ad85d8cd54a293c74440f93c56dc07a06143553ff989711787e6cd610a8e23bb353a1df
 DIST percona-server-8.0.26-16.tar.gz 532328971 BLAKE2B bef32f7a26261f3b0d89bd9b95b826101e2e84c662ce2200a2d9d8a612d949804d233905db71bfab5aa04458e7773231659d67ea09e08e68df8ef5eca4391f39 SHA512 9ae60e2d81dfaabc214692cd0919c2fc3ba698bd0a399e42df662766c1d67714f6f3cfe6416019b26e7866bc59b78d99fc5767f64ede1ca8e5a344995c1ff4c0
 DIST percona-server-8.0.26.16-patches-01.tar.xz 8144 BLAKE2B 28a4eaec657c09a6f8290b654dd5316d44a4cbf94e418edee3754742f21df56a058de9332c15abbb7c8bbd3ed6fc63e48e6c5fa77524dccf44ff1d5a89085a6b SHA512 4a128a89abc1f48582b0c6ab841643fa0b7e018eaa32414e775705cd1e8c2dcacecd334face9db33775ca3a2a862528e1cc7f2bfd8b259b7367f0f2ebdee52c4

diff --git a/dev-db/percona-server/percona-server-8.0.25.15-r1.ebuild b/dev-db/percona-server/percona-server-8.0.25.15-r1.ebuild
deleted file mode 100644
index 24020d02fca1..000000000000
--- a/dev-db/percona-server/percona-server-8.0.25.15-r1.ebuild
+++ /dev/null
@@ -1,1274 +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
-
-MY_BOOST_VERSION="1.73.0"
-MY_PV=$(ver_rs 3 '-')
-MY_PV="${MY_PV//_pre*}"
-MY_PN="Percona-Server"
-MY_P="${PN}-${MY_PV}"
-MY_MAJOR_PV=$(ver_cut 1-2)
-MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.25.15-patches-01.tar.xz"
-
-SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
-	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
-	${PATCH_SET}
-"
-
-HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
-DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 ldap numa pam +perl profiling
-	rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
-
-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 -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
-# openldap < dep for bug #835647 (we need ldap_r)
-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:=
-		net-misc/curl:=
-		cjk? ( app-text/mecab:= )
-		ldap? (
-			dev-libs/cyrus-sasl
-			<net-nds/openldap-2.6:=
-		)
-		jemalloc? ( dev-libs/jemalloc:0= )
-		kernel_linux? (
-			dev-libs/libaio:0=
-			sys-process/procps:0=
-		)
-		numa? ( sys-process/numactl )
-		pam? ( sys-libs/pam:0= )
-		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/mysql !dev-db/mysql-cluster
-	!dev-db/percona-server:0
-	!dev-db/percona-server: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
-
-	# 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="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
-		-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_AUTHENTICATION_LDAP=$(usex ldap system OFF)
-			-DWITH_COREDUMPER=OFF
-			-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)
-			-DWITH_PAM=$(usex pam)
-		)
-
-		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
-			-DWITH_ROCKSDB=$(usex rocksdb 1 0)
-			-DWITH_TOKUDB=$(usex tokudb 1 0)
-		)
-	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+=( "group_replication.gr_ssl_options2;0;Sporadic failing test" )
-	disabled_tests+=( "innodb.alter_kill;0;Known test failure -- no upstream bug yet" )
-	disabled_tests+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" )
-	disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" )
-	disabled_tests+=( "innodb.percona_log_encrypt_change_mk;6039;False positive on Gentoo (PS)" )
-	disabled_tests+=( "innodb.percona_log_encrypt_change_rk;6805;False positive on Gentoo (PS)" )
-	disabled_tests+=( "innodb.percona_log_encrypt_failure;0;Requires proper keyring setup" )
-	disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" )
-	disabled_tests+=( "main.coredump;0;Known test failure" )
-	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.myisam-blob;0;Sporadic failing test" )
-	disabled_tests+=( "main.mysql_load_data_local_dir;7416;Known test failure" )
-	disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
-	disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
-	disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
-	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;6804;Known rounding error with latest AMD processors" )
-	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.innodb_sys_tablespace_encrypt_basic;7415;Known test failure" )
-	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware" )
-	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
-	disabled_tests+=( "x.message_protobuf_nested;6803;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
-
-	if [[ -z "${MTR_VAULT_TOKEN}" ]] ; then
-		local impossible_test
-		for impossible_test in \
-			encryption.default_table_encryption_var \
-			keyring_vault.innodb_online_alter_encryption \
-			keyring_vault.innodb_row_log_encryption \
-			keyring_vault.install_keyring_vault \
-			keyring_vault.keyring_udf \
-			keyring_vault.keyring_vault_config \
-			keyring_vault.keyring_vault_config_qa \
-			keyring_vault.keyring_vault_timeout \
-			keyring_vault.key_rotation_qa \
-			keyring_vault.rpl_key_rotation \
-			keyring_vault.table_encrypt_2 \
-			keyring_vault.table_encrypt_2_directory \
-			keyring_vault.table_encrypt_2_keyring \
-			keyring_vault.table_encrypt_5 \
-			keyring_vault.table_encrypt_5_directory \
-			keyring_vault.table_encrypt_kill \
-			keyring_vault.temp_table_encrypt_keyring_vault \
-			main.persisted_variables \
-		; do
-			_disable_test "${impossible_test}" "0" "MTR_VAULT_TOKEN is not 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() {
-	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] 121+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2023-02-14  0:29 Mike Gilbert
  0 siblings, 0 replies; 121+ messages in thread
From: Mike Gilbert @ 2023-02-14  0:29 UTC (permalink / raw
  To: gentoo-commits

commit:     ac9be014f43ea7d4a5d407732fee6811c589fa04
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 13 20:05:12 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Feb 14 00:29:22 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac9be014

dev-db/percona-server: adjust libevent dependency

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

 ...na-server-8.0.26.16-r1.ebuild => percona-server-8.0.26.16-r2.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/percona-server/percona-server-8.0.26.16-r1.ebuild b/dev-db/percona-server/percona-server-8.0.26.16-r2.ebuild
similarity index 99%
rename from dev-db/percona-server/percona-server-8.0.26.16-r1.ebuild
rename to dev-db/percona-server/percona-server-8.0.26.16-r2.ebuild
index 1d61ecef9370..6cda9fcd379e 100644
--- a/dev-db/percona-server/percona-server-8.0.26.16-r1.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.26.16-r2.ebuild
@@ -58,7 +58,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:=
 		net-misc/curl:=


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2023-04-18  8:26 Sam James
  0 siblings, 0 replies; 121+ messages in thread
From: Sam James @ 2023-04-18  8:26 UTC (permalink / raw
  To: gentoo-commits

commit:     c4b6b96d0e4beaf84116300863811ca4bffbb4e1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 18 08:25:35 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 18 08:25:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4b6b96d

dev-db/percona-server: add github upstream metadata

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

 dev-db/percona-server/metadata.xml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
index f237cfbc6d1a..d3a175b143da 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/metadata.xml
@@ -16,4 +16,7 @@
   <flag name="tokudb">Add support for TokuDB storage engine</flag>
   <flag name="tokudb-backup-plugin">Builds the TokuDB backup plugin</flag>
 </use>
+<upstream>
+  <remote-id type="github">percona/percona-server</remote-id>
+</upstream>
 </pkgmetadata>


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2023-07-04 22:20 Sam James
  0 siblings, 0 replies; 121+ messages in thread
From: Sam James @ 2023-07-04 22:20 UTC (permalink / raw
  To: gentoo-commits

commit:     dbe60f7ea017a23fd79ac3b1828cd5599e4941cd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  4 22:19:34 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul  4 22:20:09 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbe60f7e

dev-db/percona-server: drop to maintainer-needed

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

 dev-db/percona-server/metadata.xml | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
index d3a175b143da..f83d7bb2f364 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/metadata.xml
@@ -1,10 +1,7 @@
 <?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>
+<!-- maintainer-needed -->
 <use>
   <flag name="cjk">Add CJK support for InnoDB fulltext search using <pkg>app-text/mecab</pkg></flag>
   <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2024-01-24  6:55 Sam James
  0 siblings, 0 replies; 121+ messages in thread
From: Sam James @ 2024-01-24  6:55 UTC (permalink / raw
  To: gentoo-commits

commit:     2b24ee1bfeab752876df2d1d1deba201c5f6da88
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Tue Jan 23 20:49:59 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=2b24ee1b

dev-db/percona-server: 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/percona-server/percona-server-8.0.26.16-r2.ebuild | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/dev-db/percona-server/percona-server-8.0.26.16-r2.ebuild b/dev-db/percona-server/percona-server-8.0.26.16-r2.ebuild
index ee421f4b5a3f..ebf0aeb32043 100644
--- a/dev-db/percona-server/percona-server-8.0.26.16-r2.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.26.16-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="7"
@@ -259,15 +259,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


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

* [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
@ 2024-07-01 18:55 Mike Gilbert
  0 siblings, 0 replies; 121+ messages in thread
From: Mike Gilbert @ 2024-07-01 18:55 UTC (permalink / raw
  To: gentoo-commits

commit:     0fe8b7c0eb9af0a558f815c8fe24469254b02ec7
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  1 18:38:53 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=0fe8b7c0

dev-db/percona-server: update SRC_URI

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

 dev-db/percona-server/percona-server-8.0.26.16-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-db/percona-server/percona-server-8.0.26.16-r2.ebuild b/dev-db/percona-server/percona-server-8.0.26.16-r2.ebuild
index ebf0aeb32043..b0e0d9ef4d84 100644
--- a/dev-db/percona-server/percona-server-8.0.26.16-r2.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.26.16-r2.ebuild
@@ -17,7 +17,7 @@ MY_MAJOR_PV=$(ver_cut 1-2)
 MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
 
 # Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.26.16-patches-01.tar.xz"
+PATCH_SET="mirror://gentoo/fb/${PN}-8.0.26.16-patches-01.tar.xz"
 
 SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
 	https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2


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

end of thread, other threads:[~2024-07-01 18:55 UTC | newest]

Thread overview: 121+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-16 23:00 [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/ Thomas Deutschmann
  -- strict thread matches above, loose matches on Subject: below --
2024-07-01 18:55 Mike Gilbert
2024-01-24  6:55 Sam James
2023-07-04 22:20 Sam James
2023-04-18  8:26 Sam James
2023-02-14  0:29 Mike Gilbert
2022-12-14  1:53 Sam James
2022-05-15  1:00 Sam James
2022-03-22 23:32 Sam James
2021-11-18 15:35 Thomas Deutschmann
2021-11-14  3:49 Thomas Deutschmann
2021-11-14  3:49 Thomas Deutschmann
2021-08-04 20:31 Thomas Deutschmann
2021-05-21  8:22 Thomas Deutschmann
2021-05-21  2:12 Thomas Deutschmann
2021-05-03  8:18 Mikle Kolyada
2021-05-01 18:24 Sam James
2021-04-28 18:26 Thomas Deutschmann
2021-04-28 18:26 Thomas Deutschmann
2021-04-28 13:20 Thomas Deutschmann
2021-04-28 13:20 Thomas Deutschmann
2021-01-06 18:43 Fabian Groffen
2020-12-20 22:54 Thomas Deutschmann
2020-12-20 21:01 Thomas Deutschmann
2020-11-08 23:44 Thomas Deutschmann
2020-10-08 23:45 Thomas Deutschmann
2020-10-08 23:45 Thomas Deutschmann
2020-07-26 13:21 Thomas Deutschmann
2020-07-25 23:39 Thomas Deutschmann
2020-07-25 18:45 Thomas Deutschmann
2020-07-25  1:32 Thomas Deutschmann
2020-05-25 11:57 Thomas Deutschmann
2020-05-25 11:57 Thomas Deutschmann
2020-05-04 16:01 Thomas Deutschmann
2020-05-02  8:04 Thomas Deutschmann
2020-04-30 20:45 Thomas Deutschmann
2020-03-19  3:47 Matt Turner
2020-03-17  1:07 Thomas Deutschmann
2020-02-08 17:06 David Seifert
2020-01-25 19:53 Thomas Deutschmann
2020-01-22 20:26 Thomas Deutschmann
2020-01-22 20:26 Thomas Deutschmann
2019-12-31  3:30 Thomas Deutschmann
2019-12-09 22:01 Thomas Deutschmann
2019-10-31 12:10 Thomas Deutschmann
2019-10-31  1:41 Thomas Deutschmann
2019-10-12 18:44 Mikle Kolyada
2019-08-28 16:29 Thomas Deutschmann
2019-08-23 20:04 Thomas Deutschmann
2019-08-22 20:02 Thomas Deutschmann
2019-08-22 20:02 Thomas Deutschmann
2019-08-02 16:56 Thomas Deutschmann
2019-07-22 14:33 Thomas Deutschmann
2019-05-24 10:52 Thomas Deutschmann
2019-05-14 13:14 Thomas Deutschmann
2019-03-03 18:57 Thomas Deutschmann
2019-03-02 19:55 Thomas Deutschmann
2019-03-02 18:58 Thomas Deutschmann
2018-12-20  1:10 Thomas Deutschmann
2018-12-02 22:13 Thomas Deutschmann
2018-11-18 21:43 Thomas Deutschmann
2018-11-14 19:23 Thomas Deutschmann
2018-11-13 18:26 Brian Evans
2018-10-17 22:21 Thomas Deutschmann
2018-10-17 12:30 Thomas Deutschmann
2018-10-17 10:38 Thomas Deutschmann
2018-10-17  0:46 Thomas Deutschmann
2018-10-16 17:28 Thomas Deutschmann
2018-10-16 16:23 Thomas Deutschmann
2018-09-18 14:11 Brian Evans
2018-09-18 14:11 Brian Evans
2018-08-20 19:45 Thomas Deutschmann
2018-08-20  0:38 Thomas Deutschmann
2018-08-20  0:26 Thomas Deutschmann
2018-07-21 13:11 Brian Evans
2018-07-21  0:09 Brian Evans
2018-02-12 23:32 Thomas Deutschmann
2017-12-18 16:50 Thomas Deutschmann
2017-12-06  2:33 Brian Evans
2017-12-05 15:43 Thomas Deutschmann
2017-12-05 11:51 Thomas Deutschmann
2017-11-21 16:30 Thomas Deutschmann
2017-10-28 18:11 Thomas Deutschmann
2017-10-28 18:11 Thomas Deutschmann
2017-09-29 20:27 Brian Evans
2017-09-04 12:32 Thomas Deutschmann
2017-08-02 16:46 Thomas Deutschmann
2017-08-02 16:46 Thomas Deutschmann
2017-07-17 13:44 Brian Evans
2017-05-27  9:08 Thomas Deutschmann
2017-04-13 21:02 Thomas Deutschmann
2017-03-09 19:18 Thomas Deutschmann
2017-02-14 16:30 Thomas Deutschmann
2016-12-03 20:56 Thomas Deutschmann
2016-10-19 20:25 Thomas Deutschmann
2016-09-22 21:54 Thomas Deutschmann
2016-09-22 21:54 Thomas Deutschmann
2016-09-14  0:58 Thomas Deutschmann
2016-08-26 14:39 Thomas Deutschmann
2016-07-21 18:52 Brian Evans
2016-07-20 13:58 Brian Evans
2016-07-20 13:58 Brian Evans
2016-07-19 17:43 Brian Evans
2016-06-13 18:40 Brian Evans
2016-04-18 18:31 Brian Evans
2016-04-18  8:13 Patrice Clement
2016-03-09 18:38 Brian Evans
2016-03-09 18:38 Brian Evans
2016-01-20 13:58 Brian Evans
2015-12-22 18:46 Brian Evans
2015-12-15 14:46 Brian Evans
2015-12-14 14:36 Brian Evans
2015-12-13 22:07 Brian Evans
2015-11-06 16:32 Brian Evans
2015-11-06 16:32 Brian Evans
2015-11-05 23:29 Brian Evans
2015-11-04 21:45 Brian Evans
2015-10-20 14:52 Brian Evans
2015-09-21 16:56 Brian Evans
2015-09-17 18:45 Brian Evans
2015-09-17 18:45 Brian Evans

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