Gentoo Archives: gentoo-commits

From: "Jorge Manuel B. S. Vicetto" <jmbsvicetto@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mysql:master commit in: dev-db/mariadb-galera/, eclass/
Date: Mon, 29 Apr 2013 21:35:00
Message-Id: 1367271107.a179762f68cd812f79cbe898820fe990c9a0094c.jmbsvicetto@gentoo
1 commit: a179762f68cd812f79cbe898820fe990c9a0094c
2 Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 29 21:31:47 2013 +0000
4 Commit: Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 29 21:31:47 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=a179762f
7
8 [dev-db/mariadb-galera] Adding mariadb-galera for testing.
9
10 ---
11 dev-db/mariadb-galera/Manifest | 2 +
12 dev-db/mariadb-galera/mariadb-galera-5.5.29.ebuild | 128 ++++++++++++++++++++
13 dev-db/mariadb-galera/metadata.xml | 28 +++++
14 eclass/mysql-v2.eclass | 4 +-
15 4 files changed, 160 insertions(+), 2 deletions(-)
16
17 diff --git a/dev-db/mariadb-galera/Manifest b/dev-db/mariadb-galera/Manifest
18 new file mode 100644
19 index 0000000..97737f2
20 --- /dev/null
21 +++ b/dev-db/mariadb-galera/Manifest
22 @@ -0,0 +1,2 @@
23 +DIST mysql-5.5.29.tar.gz 24870769 SHA256 22b50c089038913b3468c7055fc288f7b5d973199ca37c563cd3a3292e812ae5 SHA512 167bc48c0d4e5351af342828d1f14c003b0d62f7388dd15b1b816df708cc4f06cfe8f7c4177af76fb1c1cbaba5adafe9cb884f76bf75d21a067da25896b29210 WHIRLPOOL 06b4e45c5ed6950d45d4a0623f7626af3b2a9d35656a96867b7cdc4bfc0534207c10afd9b3bcca703b826c67cea62e08992b2de99bdd8d661108c16071fb9773
24 +DIST mysql-extras-20130120-0100Z.tar.bz2 1899297 SHA256 56db6daa26070cb10b220cb06e7b4d4a84214932a5a04500ed0e76b938c01776 SHA512 9fc9b21e547ec0e1ae37b288a1ade28b11c03a89129302226c36018cf69842fda95665799ded84f04cccffaf54555acde40bf2ae6e2ea39ec63b3876382af1ba WHIRLPOOL 25f31d91d6004e7472ef6f2ff0d02b9dde9915f56fc84da600145ac09d1d56751c2ef85c897d3b7bacd29b1010b304445517452254a1e9208bc7bfa9c2e9bf2e
25
26 diff --git a/dev-db/mariadb-galera/mariadb-galera-5.5.29.ebuild b/dev-db/mariadb-galera/mariadb-galera-5.5.29.ebuild
27 new file mode 100644
28 index 0000000..7e94379
29 --- /dev/null
30 +++ b/dev-db/mariadb-galera/mariadb-galera-5.5.29.ebuild
31 @@ -0,0 +1,128 @@
32 +# Copyright 1999-2013 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mariadb/mariadb-5.5.29.ebuild,v 1.1 2013/02/13 00:47:45 robbat2 Exp $
35 +
36 +EAPI="4"
37 +MY_EXTRAS_VER="20130120-0100Z"
38 +
39 +# Build system
40 +BUILD="cmake"
41 +
42 +inherit toolchain-funcs mysql-v2
43 +# only to make repoman happy. it is really set in the eclass
44 +IUSE="$IUSE"
45 +
46 +# REMEMBER: also update eclass/mysql*.eclass before committing!
47 +KEYWORDS="~alpha ~amd64 ~arm ~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"
48 +
49 +# When MY_EXTRAS is bumped, the index should be revised to exclude these.
50 +EPATCH_EXCLUDE=''
51 +
52 +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
53 +RDEPEND="${RDEPEND}"
54 +
55 +# Please do not add a naive src_unpack to this ebuild
56 +# If you want to add a single patch, copy the ebuild to an overlay
57 +# and create your own mysql-extras tarball, looking at 000_index.txt
58 +
59 +# Official test instructions:
60 +# USE='berkdb -cluster embedded extraengine perl ssl community' \
61 +# FEATURES='test userpriv -usersandbox' \
62 +# ebuild mariadb-X.X.XX.ebuild \
63 +# digest clean package
64 +src_test() {
65 +
66 + local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test"
67 + local retstatus_unit
68 + local retstatus_tests
69 +
70 + # Bug #213475 - MySQL _will_ object strenously if your machine is named
71 + # localhost. Also causes weird failures.
72 + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
73 +
74 + if ! use "minimal" ; then
75 +
76 + if [[ $UID -eq 0 ]]; then
77 + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
78 + fi
79 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
80 +
81 + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
82 + addpredict /this-dir-does-not-exist/t9.MYI
83 +
84 + # Run CTest (test-units)
85 + cmake-utils_src_test
86 + retstatus_unit=$?
87 + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
88 +
89 + # Ensure that parallel runs don't die
90 + export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
91 +
92 + # create directories because mysqladmin might right out of order
93 + mkdir -p "${S}"/mysql-test/var-tests{,/log}
94 +
95 + # These are failing in MySQL 5.5 for now and are believed to be
96 + # false positives:
97 + #
98 + # main.information_schema, binlog.binlog_statement_insert_delayed,
99 + # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql,
100 + # funcs_1.is_columns_mysql
101 + # fails due to USE=-latin1 / utf8 default
102 + #
103 + # main.mysql_client_test, main.mysql_client_test_nonblock:
104 + # segfaults at random under Portage only, suspect resource limits.
105 + #
106 + # sys_vars.plugin_dir_basic
107 + # fails because PLUGIN_DIR is set to MYSQL_LIBDIR64/plugin
108 + # instead of MYSQL_LIBDIR/plugin
109 + #
110 + # main.flush_read_lock_kill
111 + # fails because of unknown system variable 'DEBUG_SYNC'
112 + #
113 + # main.openssl_1
114 + # error message changing
115 + # -mysqltest: Could not open connection 'default': 2026 SSL connection
116 + # error: ASN: bad other signature confirmation
117 + # +mysqltest: Could not open connection 'default': 2026 SSL connection
118 + # error: error:00000001:lib(0):func(0):reason(1)
119 + #
120 + # plugins.unix_socket
121 + # fails because portage strips out the USER enviornment variable
122 + #
123 +
124 + for t in main.mysql_client_test main.mysql_client_test_nonblock \
125 + binlog.binlog_statement_insert_delayed main.information_schema \
126 + main.mysqld--help main.flush_read_lock_kill \
127 + sys_vars.plugin_dir_basic main.openssl_1 plugins.unix_socket \
128 + funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do
129 + mysql-v2_disable_test "$t" "False positives in Gentoo"
130 + done
131 +
132 + # Run mysql tests
133 + pushd "${TESTDIR}"
134 +
135 + # run mysql-test tests
136 + perl mysql-test-run.pl --force --vardir="${S}/mysql-test/var-tests"
137 + retstatus_tests=$?
138 + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
139 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
140 +
141 + popd
142 +
143 + # Cleanup is important for these testcases.
144 + pkill -9 -f "${S}/ndb" 2>/dev/null
145 + pkill -9 -f "${S}/sql" 2>/dev/null
146 +
147 + failures=""
148 + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
149 + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
150 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
151 +
152 + [[ -z "$failures" ]] || die "Test failures: $failures"
153 + einfo "Tests successfully completed"
154 +
155 + else
156 +
157 + einfo "Skipping server tests due to minimal build."
158 + fi
159 +}
160
161 diff --git a/dev-db/mariadb-galera/metadata.xml b/dev-db/mariadb-galera/metadata.xml
162 new file mode 100644
163 index 0000000..8fb0475
164 --- /dev/null
165 +++ b/dev-db/mariadb-galera/metadata.xml
166 @@ -0,0 +1,28 @@
167 +<?xml version="1.0" encoding="UTF-8"?>
168 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
169 +<pkgmetadata>
170 +<herd>mysql</herd>
171 +<!--
172 +Please note that this list is shared between the following packages:
173 +dev-db/mysql
174 +dev-db/mariadb
175 +-->
176 +<use>
177 + <flag name='big-tables'>Make tables contain up to 1.844E+19 rows</flag>
178 + <flag name='cluster'>Add support for NDB clustering (deprecated)</flag>
179 + <flag name='community'>Enables the community features from upstream.</flag>
180 + <flag name='embedded'>Build embedded server (libmysqld)</flag>
181 + <flag name='extraengine'>Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>
182 + <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
183 + <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag>
184 + <flag name='libevent'>Use libevent for connection handling</flag>
185 + <flag name='max-idx-128'>Raise the max index per table limit from 64 to 128</flag>
186 + <flag name='minimal'>Install client programs only, no server</flag>
187 + <flag name='oqgraph'>Add support for the Open Query GRAPH engine</flag>
188 + <flag name='pbxt'>Add experimental support for PBXT storage engine</flag>
189 + <flag name='profiling'>Add support for statement profiling (requires USE=community).</flag>
190 + <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
191 + <flag name='sphinx'>Add suport for the sphinx full-text search engine</flag>
192 + <flag name='test'>Install upstream testsuites for end use.</flag>
193 +</use>
194 +</pkgmetadata>
195
196 diff --git a/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass
197 index 6329684..0f2922e 100644
198 --- a/eclass/mysql-v2.eclass
199 +++ b/eclass/mysql-v2.eclass
200 @@ -11,7 +11,7 @@
201 # @BLURB: This eclass provides most of the functions for mysql ebuilds
202 # @DESCRIPTION:
203 # The mysql-v2.eclass is the base eclass to build the mysql and
204 -# alternative projects (mariadb) ebuilds.
205 +# alternative projects (mariadb and percona) ebuilds.
206 # This eclass uses the mysql-autotools and mysql-cmake eclasses for the
207 # specific bits related to the build system.
208 # It provides the src_unpack, src_prepare, src_configure, src_compile,
209 @@ -220,7 +220,7 @@ DEPEND="
210 && DEPEND="${DEPEND} libevent? ( >=dev-libs/libevent-1.4 )"
211
212 # Having different flavours at the same time is not a good idea
213 -for i in "mysql" "mariadb" ; do
214 +for i in "mysql" "mariadb" "mariadb-galera" ; do
215 [[ ${i} == ${PN} ]] ||
216 DEPEND="${DEPEND} !dev-db/${i}"
217 done