From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-489603-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 4A47313800E
	for <garchives@archives.gentoo.org>; Fri, 27 Jul 2012 16:11:00 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 31CE8E0605;
	Fri, 27 Jul 2012 16:09:13 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id CDA5CE0605
	for <gentoo-commits@lists.gentoo.org>; Fri, 27 Jul 2012 16:09:12 +0000 (UTC)
Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 1AB051B40BB
	for <gentoo-commits@lists.gentoo.org>; Fri, 27 Jul 2012 16:09:07 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id B31D2E544F
	for <gentoo-commits@lists.gentoo.org>; Fri, 27 Jul 2012 16:09:04 +0000 (UTC)
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" <robbat2@gentoo.org>
Message-ID: <1335459752.833aa2e4cb6775f0dc944e18bb5a86ecbb731e4d.robbat2@gentoo>
Subject: [gentoo-commits] proj/mysql:master commit in: dev-db/mariadb/
X-VCS-Repository: proj/mysql
X-VCS-Files: dev-db/mariadb/Manifest dev-db/mariadb/mariadb-5.1.62-r1.ebuild dev-db/mariadb/mariadb-5.2.12-r1.ebuild dev-db/mariadb/mariadb-5.3.6-r1.ebuild
X-VCS-Directories: dev-db/mariadb/
X-VCS-Committer: robbat2
X-VCS-Committer-Name: Robin H. Johnson
X-VCS-Revision: 833aa2e4cb6775f0dc944e18bb5a86ecbb731e4d
X-VCS-Branch: master
Date: Fri, 27 Jul 2012 16:09:04 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 9f68ea7e-7481-41ac-9bbd-7e2c72cfe030
X-Archives-Hash: 99fc905a3736947266ddf265dd60dd7e

commit:     833aa2e4cb6775f0dc944e18bb5a86ecbb731e4d
Author:     Brian Evans <grknight <AT> lavabit <DOT> com>
AuthorDate: Thu Apr 26 17:02:32 2012 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Thu Apr 26 17:02:32 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=833aa2e4

Revision bump for new patch on unit tests

---
 dev-db/mariadb/Manifest                 |    4 +
 dev-db/mariadb/mariadb-5.1.62-r1.ebuild |  171 ++++++++++++++++++++++++++++++
 dev-db/mariadb/mariadb-5.2.12-r1.ebuild |  171 ++++++++++++++++++++++++++++++
 dev-db/mariadb/mariadb-5.3.6-r1.ebuild  |  174 +++++++++++++++++++++++++++++++
 4 files changed, 520 insertions(+), 0 deletions(-)

diff --git a/dev-db/mariadb/Manifest b/dev-db/mariadb/Manifest
index 4aff89c..641df53 100644
--- a/dev-db/mariadb/Manifest
+++ b/dev-db/mariadb/Manifest
@@ -7,9 +7,13 @@ DIST mariadb-5.3.6.tar.gz 26724631 RMD160 5fdad331d9bff10282f55b54cb701d14b0544d
 DIST mariadb-5.5.23.tar.gz 27432223 RMD160 d09e1cf072aa3b1c08df05fddbc19f7a699452d3 SHA1 a4dc62758d562feab29904c9329a8497786e5c30 SHA256 e4ce1f31739d97f43768cf3c1efaf05d291d9758e6097fd2512fafa5686a2797
 DIST mysql-extras-20110426-1046Z.tar.bz2 1312102 RMD160 4971583f7f6737c2f0863b3cea38ed3d995036ef SHA1 e614c46a756425ce5e602d1a3cd807b3699ca1cb SHA256 e49636b2527d96bc4fe6d2143b00af47c63202ad999fed332a544aa6b7b1ffa8
 DIST mysql-extras-20120416-2021Z.tar.bz2 1874771 RMD160 d09f3b16c2123b50d96b75c6cdd878dd16a06518 SHA1 f197fbea8a76de959cc4c61ab47e61ad648cd56a SHA256 af780a9c41a5073d7a66e991e9b1c468bea89b1efd7fbea7e6daa5f75d235e33
+DIST mysql-extras-20120425-1449Z.tar.bz2 1836573 RMD160 13bc759ef9c4ce7dddaca46e49f60ff3e5b8133c SHA1 119f009ab4f07ccccdc276445afdaf5bd86e1c54 SHA256 92d7a3f425225bc4d9774e1b7617a7aaaa65097bc62ca7106698c976afc47e50
 EBUILD mariadb-5.1.55.ebuild 6142 RMD160 d37d437fb6ca06ed401562d940b2e3fd247bdb58 SHA1 9fd86aef888681f6153b34a9a1726cdab64768d4 SHA256 02ac78bb31848b3d2146c3e34942716ed800d383bcf87698c26af03155868676
+EBUILD mariadb-5.1.62-r1.ebuild 6142 RMD160 0171a3a40e5b228d3f5da1679cc71569925c502a SHA1 e63fea90056cc60f81b57fcc38afb708cfff520b SHA256 a639e9a097cc28bc109f789d505d85b504259e07b88356f90501311176520649
 EBUILD mariadb-5.1.62.ebuild 6142 RMD160 74136010c7440e6cbe836dbb92fdc205f3f5df8b SHA1 082ec1bc120988a4c591d67b4443be05dd5b390d SHA256 3f2a5bc08df049564a7139f9d5a6ccf13c7ca721473161773203b83d88d6fd13
+EBUILD mariadb-5.2.12-r1.ebuild 6046 RMD160 af90a34c3edc97e9e66b03602e9af252a9188517 SHA1 9097926f67a9d8e4a7a70a290b809c02db6ce100 SHA256 56a6b154ca1014ea18dde3fe1bec15981220eb50d914496db00755225ac66f72
 EBUILD mariadb-5.2.12.ebuild 6046 RMD160 c317f66b2697f6a8ea7deb77d6622a69b0359499 SHA1 bf0e7f28626fad0d1e1cc52d5577e8c8857664b7 SHA256 db2572c5088e5588a3d42dc9b6028e5227be58453f75496d64eda5d32b251a2f
+EBUILD mariadb-5.3.6-r1.ebuild 6072 RMD160 f585fd23af45573f58860eb44671a27b8b9d69f3 SHA1 d6bc5eb24c2ce3e2195db13be8bb88af73d40be0 SHA256 0a70660b819466cd4120db8ea9e8e259f79f021c20f4d9e643714e0fdd9f1c82
 EBUILD mariadb-5.3.6.ebuild 6072 RMD160 5a998436022c66d34609c0cdf5c107078ca23873 SHA1 7fbfa71d03f315920886dda4f638fec54a9c0975 SHA256 33225bdde427062b0562bf4efb6c5030ad69c1393586a6d5ad9e3c79fb52f972
 EBUILD mariadb-5.5.23.ebuild 4531 RMD160 46f81c31bf8934d9f0f5b5eea79d0a44abbdd05f SHA1 89ebd0ef358fe85e611dc3821cbe296f4edb78bf SHA256 63c86e8e3be008bee8ce10bb155965e3afdac8f0e6a519adc19906df02ca2cd8
 MISC ChangeLog 4748 RMD160 fd1104bc4093238a078829d99f699f7cb7bf5592 SHA1 e1522463c7b327d50bf231bd78951669d89534f3 SHA256 af66e5983ec5f17648e82ebb8b50685a2b8ec7f1fa45d3db92ad29bad7dc5592

diff --git a/dev-db/mariadb/mariadb-5.1.62-r1.ebuild b/dev-db/mariadb/mariadb-5.1.62-r1.ebuild
new file mode 100644
index 0000000..0c7a7e3
--- /dev/null
+++ b/dev-db/mariadb/mariadb-5.1.62-r1.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-5.0.84-r1.ebuild,v 1.7 2009/11/09 18:00:20 fauli Exp $
+
+MY_EXTRAS_VER="20120425-1449Z"
+EAPI="4"
+
+# Build system
+BUILD="autotools"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+src_prepare() {
+	sed -i \
+		-e '/^noinst_PROGRAMS/s/basic-t//g' \
+		"${S}"/unittest/mytap/t/Makefile.am
+	mysql-v2_src_prepare
+}
+
+# Official test instructions:
+# USE='berkdb -cluster embedded extraengine perl ssl community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	emake check || die "make check failed"
+	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"
+		cd "${S}"
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		local retstatus_unit
+		local retstatus_ns
+		local retstatus_ps
+		local t
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+		# The entire 5.0 series has pre-generated SSL certificates, they have
+		# mostly expired now. ${S}/mysql-tests/std-data/*.pem
+		# The certs really SHOULD be generated for the tests, so that they are
+		# not expiring like this. We cannot do so ourselves as the tests look
+		# closely as the cert path data, and we do not have the CA key to regen
+		# ourselves. Alternatively, upstream should generate them with at least
+		# 50-year validity.
+		#
+		# Known expiry points:
+		# 4.1.*, 5.0.0-5.0.22, 5.1.7: Expires 2013/09/09
+		# 5.0.23-5.0.77, 5.1.7-5.1.22?: Expires 2009/01/27
+		# 5.0.78-5.0.90, 5.1.??-5.1.42: Expires 2010/01/28
+		#
+		# mysql-test/std_data/untrusted-cacert.pem is MEANT to be
+		# expired/invalid.
+		case ${PV} in
+			5.1.*|5.4.*|5.5.*)
+				for t in openssl_1 rpl_openssl rpl.rpl_ssl rpl.rpl_ssl1 ssl ssl_8k_key \
+					ssl_compress ssl_connect rpl.rpl_heartbeat_ssl ; do \
+					mysql-v2_disable_test \
+						"$t" \
+						"These OpenSSL tests break due to expired certificates"
+				done
+			;;
+		esac
+
+		# These are also failing in MySQL 5.1 for now, and are believed to be
+		# false positives:
+		#
+		# main.mysql_comment, main.mysql_upgrade, main.information_schema,
+		# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers:
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.not_partition:
+		# Failure reason unknown at this time, must resolve before package.mask
+		# removal FIXME
+		case ${PV} in
+			5.1.*|5.2.*|5.4.*|5.5.*)
+			for t in main.mysql_client_test main.mysql_comments \
+				main.mysql_upgrade  \
+				main.information_schema \
+				main.not_partition funcs_1.is_columns_mysql \
+				funcs_1.is_tables_mysql funcs_1.is_triggers; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+			done
+			;;
+		esac
+
+		# New failures in 5.1.50/5.1.51, reported by jmbsvicetto.
+		# These tests are picking up a 'connect-timeout' config from somewhere,
+		# which is not valid, and since it does not have 'loose-' in front of
+		# it, it's causing a failure
+		case ${PV} in
+			5.1.5*|5.4.*|5.5.*|6*)
+			for t in rpl.rpl_mysql_upgrade main.log_tables_upgrade ; do
+				mysql-v2_disable_test  "$t" \
+					"False positives in Gentoo: connect-timeout"
+			done
+			;;
+		esac
+
+		use profiling && use community \
+		|| mysql-v2_disable_test main.profiling \
+			"Profiling test needs profiling support"
+
+		if [ "${PN}" == "mariadb" ]; then
+			for t in \
+				parts.part_supported_sql_func_ndb \
+				parts.partition_auto_increment_ndb ; do
+					mysql-v2_disable_test $t "ndb not supported in mariadb"
+			done
+		fi
+
+		# create directories because mysqladmin might make out of order
+		mkdir -p "${S}"/mysql-test/var-{ps,ns}{,/log}
+
+		# We run the test protocols seperately
+		emake test-unit
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		emake test-ns force="--force --vardir=${S}/mysql-test/var-ns"
+		retstatus_ns=$?
+		[[ $retstatus_ns -eq 0 ]] || eerror "test-ns failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		emake test-ps force="--force --vardir=${S}/mysql-test/var-ps"
+		retstatus_ps=$?
+		[[ $retstatus_ps -eq 0 ]] || eerror "test-ps failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		# TODO:
+		# When upstream enables the pr and nr testsuites, we need those as well.
+
+		# 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_ns -eq 0 ]] || failures="${failures} test-ns"
+		[[ $retstatus_ps -eq 0 ]] || failures="${failures} test-ps"
+		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/mariadb/mariadb-5.2.12-r1.ebuild b/dev-db/mariadb/mariadb-5.2.12-r1.ebuild
new file mode 100644
index 0000000..6b00eea
--- /dev/null
+++ b/dev-db/mariadb/mariadb-5.2.12-r1.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+MY_EXTRAS_VER="20120425-1449Z"
+EAPI="4"
+
+# Build system
+BUILD="autotools"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+src_prepare() {
+	sed -i \
+		-e '/^noinst_PROGRAMS/s/basic-t//g' \
+		"${S}"/unittest/mytap/t/Makefile.am
+	mysql-v2_src_prepare
+}
+
+# Official test instructions:
+# USE='berkdb -cluster embedded extraengine perl ssl community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	emake check || die "make check failed"
+	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"
+		cd "${S}"
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		local retstatus_unit
+		local retstatus_ns
+		local retstatus_ps
+		local t
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+		# The entire 5.0 series has pre-generated SSL certificates, they have
+		# mostly expired now. ${S}/mysql-tests/std-data/*.pem
+		# The certs really SHOULD be generated for the tests, so that they are
+		# not expiring like this. We cannot do so ourselves as the tests look
+		# closely as the cert path data, and we do not have the CA key to regen
+		# ourselves. Alternatively, upstream should generate them with at least
+		# 50-year validity.
+		#
+		# Known expiry points:
+		# 4.1.*, 5.0.0-5.0.22, 5.1.7: Expires 2013/09/09
+		# 5.0.23-5.0.77, 5.1.7-5.1.22?: Expires 2009/01/27
+		# 5.0.78-5.0.90, 5.1.??-5.1.42: Expires 2010/01/28
+		#
+		# mysql-test/std_data/untrusted-cacert.pem is MEANT to be
+		# expired/invalid.
+		case ${PV} in
+			5.1.*|5.4.*|5.5.*)
+				for t in openssl_1 rpl_openssl rpl.rpl_ssl rpl.rpl_ssl1 ssl ssl_8k_key \
+					ssl_compress ssl_connect rpl.rpl_heartbeat_ssl ; do \
+					mysql-v2_disable_test \
+						"$t" \
+						"These OpenSSL tests break due to expired certificates"
+				done
+			;;
+		esac
+
+		# These are also failing in MySQL 5.1 for now, and are believed to be
+		# false positives:
+		#
+		# main.mysql_comment, main.mysql_upgrade, main.information_schema,
+		# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers:
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.not_partition:
+		# Failure reason unknown at this time, must resolve before package.mask
+		# removal FIXME
+		case ${PV} in
+			5.1.*|5.2.*|5.4.*|5.5.*)
+			for t in main.mysql_client_test main.mysql_comments \
+				main.mysql_upgrade  \
+				main.information_schema \
+				main.not_partition funcs_1.is_columns_mysql \
+				funcs_1.is_tables_mysql funcs_1.is_triggers; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+			done
+			;;
+		esac
+
+		# New failures in 5.1.50/5.1.51, reported by jmbsvicetto.
+		# These tests are picking up a 'connect-timeout' config from somewhere,
+		# which is not valid, and since it does not have 'loose-' in front of
+		# it, it's causing a failure
+		case ${PV} in
+			5.1.5*|5.4.*|5.5.*|6*)
+			for t in rpl.rpl_mysql_upgrade main.log_tables_upgrade ; do
+				mysql-v2_disable_test  "$t" \
+					"False positives in Gentoo: connect-timeout"
+			done
+			;;
+		esac
+
+		use profiling && use community \
+		|| mysql-v2_disable_test main.profiling \
+			"Profiling test needs profiling support"
+
+		if [ "${PN}" == "mariadb" ]; then
+			for t in \
+				parts.part_supported_sql_func_ndb \
+				parts.partition_auto_increment_ndb ; do
+					mysql-v2_disable_test $t "ndb not supported in mariadb"
+			done
+		fi
+
+		# create directories because mysqladmin might make out of order
+		mkdir -p "${S}"/mysql-test/var-{ps,ns}{,/log}
+
+		# We run the test protocols seperately
+		emake test-unit
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		emake test-ns force="--force --vardir=${S}/mysql-test/var-ns"
+		retstatus_ns=$?
+		[[ $retstatus_ns -eq 0 ]] || eerror "test-ns failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		emake test-ps force="--force --vardir=${S}/mysql-test/var-ps"
+		retstatus_ps=$?
+		[[ $retstatus_ps -eq 0 ]] || eerror "test-ps failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		# TODO:
+		# When upstream enables the pr and nr testsuites, we need those as well.
+
+		# 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_ns -eq 0 ]] || failures="${failures} test-ns"
+		[[ $retstatus_ps -eq 0 ]] || failures="${failures} test-ps"
+		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/mariadb/mariadb-5.3.6-r1.ebuild b/dev-db/mariadb/mariadb-5.3.6-r1.ebuild
new file mode 100644
index 0000000..91c0198
--- /dev/null
+++ b/dev-db/mariadb/mariadb-5.3.6-r1.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+MY_EXTRAS_VER="20120425-1449Z"
+EAPI="4"
+
+# Build system
+BUILD="autotools"
+
+# Suffix on files...
+#MY_PV="$PV-ga"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+src_prepare() {
+	sed -i \
+		-e '/^noinst_PROGRAMS/s/basic-t//g' \
+		"${S}"/unittest/mytap/t/Makefile.am
+	mysql-v2_src_prepare
+}
+
+# Official test instructions:
+# USE='berkdb -cluster embedded extraengine perl ssl community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+	# Bug #213475 - MySQL _will_ object strenously if your machine is named
+	# localhost. Also causes weird failures.
+	[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+	emake check || die "make check failed"
+	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"
+		cd "${S}"
+		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+		local retstatus_unit
+		local retstatus_ns
+		local retstatus_ps
+		local t
+		addpredict /this-dir-does-not-exist/t9.MYI
+
+		# Ensure that parallel runs don't die
+		export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+		# The entire 5.0 series has pre-generated SSL certificates, they have
+		# mostly expired now. ${S}/mysql-tests/std-data/*.pem
+		# The certs really SHOULD be generated for the tests, so that they are
+		# not expiring like this. We cannot do so ourselves as the tests look
+		# closely as the cert path data, and we do not have the CA key to regen
+		# ourselves. Alternatively, upstream should generate them with at least
+		# 50-year validity.
+		#
+		# Known expiry points:
+		# 4.1.*, 5.0.0-5.0.22, 5.1.7: Expires 2013/09/09
+		# 5.0.23-5.0.77, 5.1.7-5.1.22?: Expires 2009/01/27
+		# 5.0.78-5.0.90, 5.1.??-5.1.42: Expires 2010/01/28
+		#
+		# mysql-test/std_data/untrusted-cacert.pem is MEANT to be
+		# expired/invalid.
+		case ${PV} in
+			5.1.*|5.5.*)
+				for t in openssl_1 rpl_openssl rpl.rpl_ssl rpl.rpl_ssl1 ssl ssl_8k_key \
+					ssl_compress ssl_connect rpl.rpl_heartbeat_ssl ; do \
+					mysql-v2_disable_test \
+						"$t" \
+						"These OpenSSL tests break due to expired certificates"
+				done
+			;;
+		esac
+
+		# These are also failing in MySQL 5.1 for now, and are believed to be
+		# false positives:
+		#
+		# main.mysql_comment, main.mysql_upgrade, main.information_schema,
+		# funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers:
+		# fails due to USE=-latin1 / utf8 default
+		#
+		# main.mysql_client_test:
+		# segfaults at random under Portage only, suspect resource limits.
+		#
+		# main.not_partition:
+		# Failure reason unknown at this time, must resolve before package.mask
+		# removal FIXME
+		case ${PV} in
+			5.1.*|5.2.*|5.3.*|5.5.*)
+			for t in main.mysql_client_test main.mysql_comments \
+				main.mysql_upgrade  \
+				main.information_schema \
+				main.not_partition funcs_1.is_columns_mysql \
+				funcs_1.is_tables_mysql funcs_1.is_triggers; do
+				mysql-v2_disable_test  "$t" "False positives in Gentoo"
+			done
+			;;
+		esac
+
+		# New failures in 5.1.50/5.1.51, reported by jmbsvicetto.
+		# These tests are picking up a 'connect-timeout' config from somewhere,
+		# which is not valid, and since it does not have 'loose-' in front of
+		# it, it's causing a failure
+		case ${PV} in
+			5.1.5*|5.5.*|6*)
+			for t in rpl.rpl_mysql_upgrade main.log_tables_upgrade ; do
+				mysql-v2_disable_test  "$t" \
+					"False positives in Gentoo: connect-timeout"
+			done
+			;;
+		esac
+
+		use profiling && use community \
+		|| mysql-v2_disable_test main.profiling \
+			"Profiling test needs profiling support"
+
+		if [ "${PN}" == "mariadb" ]; then
+			for t in \
+				parts.part_supported_sql_func_ndb \
+				parts.partition_auto_increment_ndb ; do
+					mysql-v2_disable_test $t "ndb not supported in mariadb"
+			done
+		fi
+
+		# create directories because mysqladmin might make out of order
+		mkdir -p "${S}"/mysql-test/var-{ps,ns}{,/log}
+
+		# We run the test protocols seperately
+		emake test-unit
+		retstatus_unit=$?
+		[[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+		emake test-ns force="--force --vardir=${S}/mysql-test/var-ns"
+		retstatus_ns=$?
+		[[ $retstatus_ns -eq 0 ]] || eerror "test-ns failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		emake test-ps force="--force --vardir=${S}/mysql-test/var-ps"
+		retstatus_ps=$?
+		[[ $retstatus_ps -eq 0 ]] || eerror "test-ps failed"
+		has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+		# TODO:
+		# When upstream enables the pr and nr testsuites, we need those as well.
+
+		# 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_ns -eq 0 ]] || failures="${failures} test-ns"
+		[[ $retstatus_ps -eq 0 ]] || failures="${failures} test-ps"
+		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
+}