Created
August 21, 2013 12:54
-
-
Save ablyler/6294103 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 77c607e6348c4cd603ffdd61356b0161d3a15eca | |
Author: Andy Blyler <andy@blyler.cc> | |
Date: Wed Aug 21 13:26:02 2013 +0000 | |
add percona-server 5.6 ebuild and required eclass changes | |
diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest | |
index 0bc083f..9019a15 100644 | |
--- a/dev-db/percona-server/Manifest | |
+++ b/dev-db/percona-server/Manifest | |
@@ -1 +1,2 @@ | |
DIST Percona-Server-5.5.30-rel30.2.tar.gz 22542120 SHA256 d30876033cd5590f8e1d68aff6a2eaad677dbe59168d4610c580c4e4e2e923a7 SHA512 0ff7fe9a1ea11295b7e817ae7b492078babd5b1dd1cc302b4745f5eeb5700d01c26a0d00b0341e1591db4d40b1f111fe90f4bb7be82b55454a303ec6a5eadf98 WHIRLPOOL 21cb0b5d80256a3eb2c7bbcb33a81fe466002eac5ab36f7b07dfad480a03ef6201eac307673649a2ebde902c80e694958298cf9cf92933f6d782ba7126b62e26 | |
+DIST Percona-Server-5.6.12-rc60.4.tar.gz 33285170 SHA256 546d23e0f70c233ff737ace34370b8651dae33f1fb2062540a083c8773886cb7 SHA512 2bc6366c8b2e65b36bb9198e45b4feafec1bf5a5a31686a268a896329d0fc93945b24d7f1ed79c864f5c33b3077523744fa92ba701fea3b9606f4a3ce85d7b7b WHIRLPOOL 47e7b225957f8bbaf31d41f701627649e94881b3119586a527636364660171512fda9ede026289842cae79221f16980732991dd5383670b8810b80c3b7f171c0 | |
diff --git a/dev-db/percona-server/files/my.cnf-5.6 b/dev-db/percona-server/files/my.cnf-5.6 | |
new file mode 100644 | |
index 0000000..f43d535 | |
--- /dev/null | |
+++ b/dev-db/percona-server/files/my.cnf-5.6 | |
@@ -0,0 +1,153 @@ | |
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. | |
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-5.5,v 1.2 2013/01/20 02:40:02 robbat2 Exp $ | |
+ | |
+# The following options will be passed to all MySQL clients | |
+[client] | |
+#password = your_password | |
+port = 3306 | |
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock | |
+ | |
+[mysql] | |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets | |
+default-character-set=utf8 | |
+ | |
+[mysqladmin] | |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets | |
+default-character-set=utf8 | |
+ | |
+[mysqlcheck] | |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets | |
+default-character-set=utf8 | |
+ | |
+[mysqldump] | |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets | |
+default-character-set=utf8 | |
+ | |
+[mysqlimport] | |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets | |
+default-character-set=utf8 | |
+ | |
+[mysqlshow] | |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets | |
+default-character-set=utf8 | |
+ | |
+[myisamchk] | |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets | |
+ | |
+[myisampack] | |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets | |
+ | |
+# use [safe_mysqld] with mysql-3 | |
+[mysqld_safe] | |
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err | |
+ | |
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations | |
+[mysqld] | |
+character-set-server = utf8 | |
+user = mysql | |
+port = 3306 | |
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock | |
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid | |
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err | |
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr | |
+datadir = @DATADIR@ | |
+skip-external-locking | |
+key_buffer = 16M | |
+max_allowed_packet = 1M | |
+table_open_cache = 64 | |
+sort_buffer_size = 512K | |
+net_buffer_length = 8K | |
+read_buffer_size = 256K | |
+read_rnd_buffer_size = 512K | |
+myisam_sort_buffer_size = 8M | |
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql | |
+#Set this to your desired error message language | |
+lc_messages = en_US | |
+ | |
+# security: | |
+# using "localhost" in connects uses sockets by default | |
+# skip-networking | |
+bind-address = 127.0.0.1 | |
+ | |
+log-bin | |
+server-id = 1 | |
+ | |
+# point the following paths to different dedicated disks | |
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ | |
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname | |
+ | |
+# you need the debug USE flag enabled to use the following directives, | |
+# if needed, uncomment them, start the server and issue | |
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace | |
+# this will show you *exactly* what's happening in your server ;) | |
+ | |
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql | |
+#gdb | |
+#debug = d:t:i:o,/tmp/mysqld.trace | |
+#one-thread | |
+ | |
+# uncomment the following directives if you are using BDB tables | |
+#bdb_cache_size = 4M | |
+#bdb_max_lock = 10000 | |
+ | |
+# the following is the InnoDB configuration | |
+# if you wish to disable innodb instead | |
+# uncomment just the next line | |
+#skip-innodb | |
+# | |
+# the rest of the innodb config follows: | |
+# don't eat too much memory, we're trying to be safe on 64Mb boxes | |
+# you might want to bump this up a bit on boxes with more RAM | |
+innodb_buffer_pool_size = 16M | |
+# this is the default, increase it if you have lots of tables | |
+innodb_additional_mem_pool_size = 2M | |
+# | |
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( | |
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route | |
+# we have to take for the moment | |
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ | |
+#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ | |
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ | |
+# you may wish to change this size to be more suitable for your system | |
+# the max is there to avoid run-away growth on your machine | |
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M | |
+# we keep this at around 25% of of innodb_buffer_pool_size | |
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) | |
+innodb_log_file_size = 5M | |
+# this is the default, increase it if you have very large transactions going on | |
+innodb_log_buffer_size = 8M | |
+# this is the default and won't hurt you | |
+# you shouldn't need to tweak it | |
+innodb_log_files_in_group=2 | |
+# see the innodb config docs, the other options are not always safe | |
+innodb_flush_log_at_trx_commit = 1 | |
+innodb_lock_wait_timeout = 50 | |
+innodb_file_per_table | |
+ | |
+# Uncomment this to get FEDERATED engine support | |
+#plugin-load=federated=ha_federated.so | |
+loose-federated | |
+ | |
+[mysqldump] | |
+quick | |
+max_allowed_packet = 16M | |
+ | |
+[mysql] | |
+# uncomment the next directive if you are not familiar with SQL | |
+#safe-updates | |
+ | |
+[isamchk] | |
+key_buffer = 20M | |
+sort_buffer_size = 20M | |
+read_buffer = 2M | |
+write_buffer = 2M | |
+ | |
+[myisamchk] | |
+key_buffer = 20M | |
+sort_buffer_size = 20M | |
+read_buffer = 2M | |
+write_buffer = 2M | |
+ | |
+[mysqlhotcopy] | |
+interactive-timeout | |
+ | |
diff --git a/dev-db/percona-server/percona-server-5.6.12.4.ebuild b/dev-db/percona-server/percona-server-5.6.12.4.ebuild | |
new file mode 100644 | |
index 0000000..05ca569 | |
--- /dev/null | |
+++ b/dev-db/percona-server/percona-server-5.6.12.4.ebuild | |
@@ -0,0 +1,129 @@ | |
+# Copyright 1999-2013 Gentoo Foundation | |
+# Distributed under the terms of the GNU General Public License v2 | |
+# $Header: $ | |
+ | |
+EAPI="4" | |
+ | |
+MY_EXTRAS_VER="live" | |
+MY_PV="${PV//_alpha_pre/-m}" | |
+MY_PV="${MY_PV//_/-}" | |
+ | |
+# Build type | |
+BUILD="cmake" | |
+ | |
+inherit toolchain-funcs mysql-v2 | |
+# only to make repoman happy. it is really set in the eclass | |
+IUSE="$IUSE" | |
+ | |
+# Define the mysql-extras source | |
+EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/mysql-extras.git" | |
+ | |
+# 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='berkdb -cluster embedded extraengine perl ssl community' \ | |
+# FEATURES='test userpriv -usersandbox' \ | |
+# ebuild percona-server-X.X.XX.ebuild \ | |
+# digest clean package | |
+src_test() { | |
+ | |
+ 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))" | |
+ | |
+ # create directories because mysqladmin might right out of order | |
+ mkdir -p "${S}"/mysql-test/var-tests{,/log} | |
+ | |
+ # These are failing in MySQL 5.5 for now and are believed to be | |
+ # false positives: | |
+ # | |
+ # main.information_schema, binlog.binlog_statement_insert_delayed, | |
+ # main.mysqld--help-notwin | |
+ # fails due to USE=-latin1 / utf8 default | |
+ # | |
+ # main.mysql_client_test: | |
+ # segfaults at random under Portage only, suspect resource limits. | |
+ # | |
+ # sys_vars.plugin_dir_basic | |
+ # fails because PLUGIN_DIR is set to MYSQL_LIBDIR64/plugin | |
+ # instead of MYSQL_LIBDIR/plugin | |
+ # | |
+ # main.flush_read_lock_kill | |
+ # fails because of unknown system variable 'DEBUG_SYNC' | |
+ # | |
+ # main.openssl_1 | |
+ # error message changing | |
+ # -mysqltest: Could not open connection 'default': 2026 SSL connection | |
+ # error: ASN: bad other signature confirmation | |
+ # +mysqltest: Could not open connection 'default': 2026 SSL connection | |
+ # error: error:00000001:lib(0):func(0):reason(1) | |
+ # | |
+ | |
+ for t in main.mysql_client_test \ | |
+ binlog.binlog_statement_insert_delayed main.information_schema \ | |
+ main.mysqld--help-notwin main.flush_read_lock_kill \ | |
+ sys_vars.plugin_dir_basic main.openssl_1 ; do | |
+ mysql-v2_disable_test "$t" "False positives in Gentoo" | |
+ done | |
+ | |
+ # Run mysql tests | |
+ pushd "${TESTDIR}" | |
+ | |
+ # run mysql-test tests | |
+ perl mysql-test-run.pl --force --vardir="${S}/mysql-test/var-tests" | |
+ 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/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass | |
index 81e5b56..0431251 100644 | |
--- a/eclass/mysql-v2.eclass | |
+++ b/eclass/mysql-v2.eclass | |
@@ -137,8 +137,11 @@ if [[ -z ${SERVER_URI} ]]; then | |
MIRROR_PV=$(get_version_component_range 1-2 ${PV}) | |
MY_PV=$(get_version_component_range 1-3 ${PV}) | |
MY_PATCH=$(get_version_component_range 4 ${PV}) | |
- SERVER_URI="http://www.percona.com/redir/downloads/${PERCONA_PN}-${MIRROR_PV}/LATEST/source/${PERCONA_PN}-${MY_PV}-rel30.${MY_PATCH}.tar.gz" | |
-# http://www.percona.com/redir/downloads/Percona-Server-5.5/LATEST/source/Percona-Server-5.5.30-rel30.2.tar.gz | |
+ if mysql_version_is_at_least "5.6"; then | |
+ SERVER_URI="http://www.percona.com/redir/downloads/${PERCONA_PN}-${MIRROR_PV}/LATEST/source/${PERCONA_PN}-${MY_PV}-rc60.${MY_PATCH}.tar.gz" | |
+ else | |
+ SERVER_URI="http://www.percona.com/redir/downloads/${PERCONA_PN}-${MIRROR_PV}/LATEST/source/${PERCONA_PN}-${MY_PV}-rel30.${MY_PATCH}.tar.gz" | |
+ fi | |
else | |
if [[ "${PN}" == "mysql-cluster" ]] ; then | |
URI_DIR="MySQL-Cluster" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment