Gentoo Archives: gentoo-commits

From: Brian Evans <grknight@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mariadb/
Date: Sun, 13 Dec 2015 22:08:01
Message-Id: 1450043818.d474f525c90af8552545da820b2349184fdc4647.grknight@gentoo
1 commit: d474f525c90af8552545da820b2349184fdc4647
2 Author: Brian Evans <grknight <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 13 21:56:58 2015 +0000
4 Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 13 21:56:58 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d474f525
7
8 dev-db/mariadb: Revision bump to work with new eclass
9
10 Package-Manager: portage-2.2.26
11
12 dev-db/mariadb/mariadb-10.1.9-r1.ebuild | 207 ++++++++++++++++++++++++++++++++
13 1 file changed, 207 insertions(+)
14
15 diff --git a/dev-db/mariadb/mariadb-10.1.9-r1.ebuild b/dev-db/mariadb/mariadb-10.1.9-r1.ebuild
16 new file mode 100644
17 index 0000000..6fbdc74
18 --- /dev/null
19 +++ b/dev-db/mariadb/mariadb-10.1.9-r1.ebuild
20 @@ -0,0 +1,207 @@
21 +# Copyright 1999-2015 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI="5"
26 +MY_EXTRAS_VER="20151123-1643Z"
27 +# The wsrep API version must match between upstream WSREP and sys-cluster/galera major number
28 +WSREP_REVISION="25"
29 +SUBSLOT="18"
30 +MYSQL_PV_MAJOR="5.6"
31 +
32 +inherit toolchain-funcs mysql-multilib-r1
33 +
34 +HOMEPAGE="http://mariadb.org/"
35 +DESCRIPTION="An enhanced, drop-in replacement for MySQL"
36 +
37 +IUSE="bindist cracklib galera innodb-lz4 innodb-lzo innodb-snappy mroonga odbc oqgraph pam sphinx sst-rsync sst-xtrabackup tokudb systemd xml"
38 +RESTRICT="!bindist? ( bindist )"
39 +
40 +REQUIRED_USE="tokudb? ( jemalloc ) static? ( !pam )"
41 +
42 +# REMEMBER: also update eclass/mysql*.eclass before committing!
43 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~hppa ~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"
44 +
45 +# When MY_EXTRAS is bumped, the index should be revised to exclude these.
46 +#EPATCH_EXCLUDE=''
47 +
48 +COMMON_DEPEND="
49 + mroonga? ( app-text/groonga-normalizer-mysql )
50 + systemd? ( sys-apps/systemd:= )
51 + !bindist? ( >=sys-libs/readline-4.1:0= )
52 + server? (
53 + cracklib? ( sys-libs/cracklib:0= )
54 + extraengine? (
55 + odbc? ( dev-db/unixODBC:0= )
56 + xml? ( dev-libs/libxml2:2= )
57 + )
58 + innodb-lz4? ( app-arch/lz4 )
59 + innodb-lzo? ( dev-libs/lzo )
60 + innodb-snappy? ( app-arch/snappy )
61 + oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
62 + pam? ( virtual/pam:0= )
63 + )
64 + >=dev-libs/libpcre-8.35:3=
65 +"
66 +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
67 + ${COMMON_DEPEND}"
68 +RDEPEND="${RDEPEND} ${COMMON_DEPEND}
69 + galera? (
70 + sys-apps/iproute2
71 + =sys-cluster/galera-${WSREP_REVISION}*
72 + sst-rsync? ( sys-process/lsof )
73 + sst-xtrabackup? ( net-misc/socat[ssl] )
74 + )
75 + perl? ( !dev-db/mytop
76 + virtual/perl-Getopt-Long
77 + dev-perl/TermReadKey
78 + virtual/perl-Term-ANSIColor
79 + virtual/perl-Time-HiRes )
80 +"
81 +# xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
82 +PDEPEND="galera? ( sst-xtrabackup? ( >=dev-db/xtrabackup-bin-2.2.4 ) )"
83 +
84 +MULTILIB_WRAPPED_HEADERS+=( /usr/include/mysql/mysql_version.h )
85 +
86 +src_configure(){
87 + # bug 508724 mariadb cannot use ld.gold
88 + tc-ld-disable-gold
89 + local MYSQL_CMAKE_NATIVE_DEFINES=(
90 + -DWITH_JEMALLOC=$(usex jemalloc system)
91 + -DWITH_PCRE=system
92 + )
93 + if use server ; then
94 + # Federated{,X} must be treated special otherwise they will not be built as plugins
95 + if ! use extraengine ; then
96 + MYSQL_CMAKE_NATIVE_DEFINES+=(
97 + -DPLUGIN_FEDERATED=NO
98 + -DPLUGIN_FEDERATEDX=NO )
99 + fi
100 +
101 + MYSQL_CMAKE_NATIVE_DEFINES+=(
102 + -DPLUGIN_OQGRAPH=$(usex oqgraph YES NO)
103 + -DPLUGIN_SPHINX=$(usex sphinx YES NO)
104 + -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
105 + -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
106 + -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
107 + -DPLUGIN_CASSANDRA=NO
108 + -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
109 + -DPLUGIN_SPIDER=$(usex extraengine YES NO)
110 + -DPLUGIN_CONNECT=$(usex extraengine YES NO)
111 + -DCONNECT_WITH_MYSQL=1
112 + -DCONNECT_WITH_LIBXML2=$(usex xml)
113 + -DCONNECT_WITH_ODBC=$(usex odbc)
114 + -DWITH_WSREP=$(usex galera)
115 + -DWITH_INNODB_LZ4=$(usex innodb-lz4)
116 + -DWITH_INNODB_LZO=$(usex innodb-lzo)
117 + -DWITH_INNODB_SNAPPY=$(usex innodb-snappy)
118 + )
119 +
120 + use mroonga || MYSQL_CMAKE_NATIVE_DEFINES+=( -DWITHOUT_MROONGA=1 )
121 + fi
122 + mysql-multilib-r1_src_configure
123 +}
124 +
125 +# Official test instructions:
126 +# USE='embedded extraengine perl server openssl static-libs' \
127 +# FEATURES='test userpriv -usersandbox' \
128 +# ebuild mariadb-X.X.XX.ebuild \
129 +# digest clean package
130 +multilib_src_test() {
131 +
132 + if ! multilib_is_native_abi ; then
133 + einfo "Server tests not available on non-native abi".
134 + return 0;
135 + fi
136 +
137 + local TESTDIR="${BUILD_DIR}/mysql-test"
138 + local retstatus_unit
139 + local retstatus_tests
140 +
141 + if use server ; then
142 +
143 + # Bug #213475 - MySQL _will_ object strenously if your machine is named
144 + # localhost. Also causes weird failures.
145 + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
146 +
147 + if [[ $UID -eq 0 ]]; then
148 + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
149 + fi
150 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
151 +
152 + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
153 + addpredict /this-dir-does-not-exist/t9.MYI
154 +
155 + # Run CTest (test-units)
156 + cmake-utils_src_test
157 + retstatus_unit=$?
158 + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
159 +
160 + # Create a symlink to provided binaries so the tests can find them when client-libs is off
161 + if ! use client-libs ; then
162 + ln -srf /usr/bin/my_print_defaults "${BUILD_DIR}/client/my_print_defaults" || die
163 + ln -srf /usr/bin/perror "${BUILD_DIR}/client/perror" || die
164 + mysql-multilib-r1_disable_test main.perror "String mismatch due to not building local perror"
165 + fi
166 +
167 + # Ensure that parallel runs don't die
168 + export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
169 + # Enable parallel testing, auto will try to detect number of cores
170 + # You may set this by hand.
171 + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
172 + export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
173 +
174 + # create directories because mysqladmin might run out of order
175 + mkdir -p "${T}"/var-tests{,/log}
176 +
177 + # These are failing in MariaDB 10.0 for now and are believed to be
178 + # false positives:
179 + #
180 + # main.information_schema, binlog.binlog_statement_insert_delayed,
181 + # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql,
182 + # funcs_1.is_columns_mysql main.bootstrap
183 + # fails due to USE=-latin1 / utf8 default
184 + #
185 + # main.mysql_client_test, main.mysql_client_test_nonblock
186 + # main.mysql_client_test_comp:
187 + # segfaults at random under Portage only, suspect resource limits.
188 + #
189 + # plugins.cracklib_password_check
190 + # Can randomly fail due to cracklib return message
191 +
192 + for t in main.mysql_client_test main.mysql_client_test_nonblock \
193 + main.mysql_client_test_comp main.bootstrap \
194 + binlog.binlog_statement_insert_delayed main.information_schema \
195 + main.mysqld--help plugins.cracklib_password_check \
196 + funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do
197 + mysql-multilib_disable_test "$t" "False positives in Gentoo"
198 + done
199 +
200 + # Run mysql tests
201 + pushd "${TESTDIR}" || die
202 +
203 + # run mysql-test tests
204 + perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder
205 +
206 + retstatus_tests=$?
207 + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
208 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
209 +
210 + popd || die
211 +
212 + # Cleanup is important for these testcases.
213 + pkill -9 -f "${S}/ndb" 2>/dev/null
214 + pkill -9 -f "${S}/sql" 2>/dev/null
215 +
216 + failures=""
217 + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
218 + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
219 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
220 +
221 + [[ -z "$failures" ]] || die "Test failures: $failures"
222 + einfo "Tests successfully completed"
223 +
224 + else
225 + einfo "Skipping server tests due to minimal build."
226 + fi
227 +}