diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2014-07-30 06:26:21 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2014-07-30 06:26:21 +0000 |
commit | 77326968ba9130642d888289d58f6c4a494a899d (patch) | |
tree | ad0325a110c6a728363d52edc20cbe2e81ec4d89 /dev-db | |
parent | Bring MariaDB-Galera from the overlay into the tree. Thanks to the great work... (diff) | |
download | gentoo-2-77326968ba9130642d888289d58f6c4a494a899d.tar.gz gentoo-2-77326968ba9130642d888289d58f6c4a494a899d.tar.bz2 gentoo-2-77326968ba9130642d888289d58f6c4a494a899d.zip |
Bring MariaDB-Galera from the overlay into the tree. Thanks to the great work of Brian Evans <grknight@gentoo.org>.
(Portage version: 2.2.10/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/mariadb-galera/ChangeLog | 10 | ||||
-rw-r--r-- | dev-db/mariadb-galera/files/my.cnf-5.5 | 159 | ||||
-rw-r--r-- | dev-db/mariadb-galera/mariadb-galera-10.0.12.ebuild | 116 | ||||
-rw-r--r-- | dev-db/mariadb-galera/metadata.xml | 26 |
4 files changed, 311 insertions, 0 deletions
diff --git a/dev-db/mariadb-galera/ChangeLog b/dev-db/mariadb-galera/ChangeLog new file mode 100644 index 000000000000..bd9b542ad160 --- /dev/null +++ b/dev-db/mariadb-galera/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for dev-db/mariadb-galera +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mariadb-galera/ChangeLog,v 1.1 2014/07/30 06:26:21 robbat2 Exp $ + +*mariadb-galera-10.0.12 (30 Jul 2014) + + 30 Jul 2014; Robin H. Johnson <robbat2@gentoo.org> +files/my.cnf-5.5, + +mariadb-galera-10.0.12.ebuild, +metadata.xml: + Bring MariaDB-Galera from the overlay into the tree. Thanks to the great work + of Brian Evans <grknight@gentoo.org>. diff --git a/dev-db/mariadb-galera/files/my.cnf-5.5 b/dev-db/mariadb-galera/files/my.cnf-5.5 new file mode 100644 index 000000000000..bca13a70f76a --- /dev/null +++ b/dev-db/mariadb-galera/files/my.cnf-5.5 @@ -0,0 +1,159 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. +# $Header: /var/cvsroot/gentoo-x86/dev-db/mariadb-galera/files/my.cnf-5.5,v 1.1 2014/07/30 06:26:21 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_size = 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 + +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 + +# 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 + +# These settings are required for Galera clustering +#mysql settings +binlog_format=ROW +default-storage-engine=innodb +innodb_autoinc_lock_mode=2 +query_cache_size=0 +query_cache_type=0 +bind-address=0.0.0.0 +# Uncomment this section to activate Galera clustering +#wsrep_provider=@GENTOO_PORTAGE_EPREFIX@/usr/lib/galera/libgalera_smm.so +# You should change this name to something meaningful +#wsrep_cluster_name="my_wsrep_cluster" +# List all nodes of the cluster including this one +#wsrep_cluster_address="gcomm://172.16.8.5,172.16.8.6,172.16.8.4" +#wsrep_sst_method=rsync + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +# uncomment the next directive if you are not familiar with SQL +#safe-updates + +[isamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer_size = 2M +write_buffer_size = 2M + +[mysqlhotcopy] +interactive-timeout diff --git a/dev-db/mariadb-galera/mariadb-galera-10.0.12.ebuild b/dev-db/mariadb-galera/mariadb-galera-10.0.12.ebuild new file mode 100644 index 000000000000..d323bb064f9b --- /dev/null +++ b/dev-db/mariadb-galera/mariadb-galera-10.0.12.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mariadb-galera/mariadb-galera-10.0.12.ebuild,v 1.1 2014/07/30 06:26:21 robbat2 Exp $ + +EAPI="5" +MY_EXTRAS_VER="20140729-2200Z" +WSREP_REVISION="25" + +# Build system +BUILD="cmake" + +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="~amd64 ~x86" + +# 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='-cluster embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mariadb-galera-X.X.XX.ebuild \ +# digest clean package +src_test() { + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + + # create directories because mysqladmin might right out of order + mkdir -p "${S}"/mysql-test/var-tests{,/log} + + # These are failing in MariaDB 10.0 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test, main.mysql_client_test_nonblock: + # segfaults at random under Portage only, suspect resource limits. + # + # plugins.unix_socket + # fails because portage strips out the USER enviornment variable + # + + for t in main.mysql_client_test main.mysql_client_test_nonblock \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help plugins.unix_socket \ + funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do + mysql-v2_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + # Skip all CONNECT engine tests until upstream respondes to how to reference data files + perl mysql-test-run.pl --force --vardir="${S}/mysql-test/var-tests" \ + --skip-test=connect --parallel=auto + 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/mariadb-galera/metadata.xml b/dev-db/mariadb-galera/metadata.xml new file mode 100644 index 000000000000..59e6784cf0e2 --- /dev/null +++ b/dev-db/mariadb-galera/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>mysql</herd> +<!-- +Please note that this list is shared between the following packages: +dev-db/mysql +dev-db/mariadb +--> +<use> + <flag name='cluster'>Add support for NDB clustering (deprecated)</flag> + <flag name='community'>Enables the community features from upstream.</flag> + <flag name='embedded'>Build embedded server (libmysqld)</flag> + <flag name='extraengine'>Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag> + <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag> + <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag> + <flag name='max-idx-128'>Raise the max index per table limit from 64 to 128</flag> + <flag name='minimal'>Install client programs only, no server</flag> + <flag name='oqgraph'>Add support for the Open Query GRAPH engine</flag> + <flag name='profiling'>Add support for statement profiling (requires USE=community).</flag> + <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag> + <flag name='sphinx'>Add suport for the sphinx full-text search engine</flag> + <flag name='test'>Install upstream testsuites for end use.</flag> + <flag name='tokudb'>Add support for TokuDB storage engine</flag> +</use> +</pkgmetadata> |