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/percona-server/
Date: Sun, 13 Dec 2015 22:08:01
Message-Id: 1450044456.ac0bd95bed7e7746a5212842995cf9a74f3349b7.grknight@gentoo
1 commit: ac0bd95bed7e7746a5212842995cf9a74f3349b7
2 Author: Brian Evans <grknight <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 13 22:07:36 2015 +0000
4 Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 13 22:07:36 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac0bd95b
7
8 dev-db/percona-server: Revision bump for new eclasses and python tests
9
10 Package-Manager: portage-2.2.26
11
12 .../percona-server-5.6.27.75.0-r1.ebuild | 175 +++++++++++++++++++++
13 1 file changed, 175 insertions(+)
14
15 diff --git a/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild b/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild
16 new file mode 100644
17 index 0000000..893ad8d
18 --- /dev/null
19 +++ b/dev-db/percona-server/percona-server-5.6.27.75.0-r1.ebuild
20 @@ -0,0 +1,175 @@
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="20151105-2051Z"
27 +SUBSLOT="18"
28 +PYTHON_COMPAT=( python2_7 )
29 +inherit python-any-r1 mysql-multilib-r1
30 +
31 +IUSE="pam tokudb tokudb-backup-plugin"
32 +
33 +# REMEMBER: also update eclass/mysql*.eclass before committing!
34 +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
35 +HOMEPAGE="http://www.percona.com/software/percona-server"
36 +DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
37 +
38 +# When MY_EXTRAS is bumped, the index should be revised to exclude these.
39 +EPATCH_EXCLUDE=''
40 +
41 +COMMON_DEPEND="server? ( pam? ( virtual/pam:0= ) )
42 + tokudb? ( app-arch/snappy )
43 + tokudb-backup-plugin? ( dev-util/valgrind )
44 + "
45 +
46 +DEPEND="${COMMON_DEPEND}
47 + || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
48 + test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
49 +RDEPEND="${COMMON_DEPEND}"
50 +
51 +REQUIRED_USE="tokudb? ( jemalloc ) tokudb-backup-plugin? ( tokudb )"
52 +
53 +# Please do not add a naive src_unpack to this ebuild
54 +# If you want to add a single patch, copy the ebuild to an overlay
55 +# and create your own mysql-extras tarball, looking at 000_index.txt
56 +
57 +python_check_deps() {
58 + has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
59 +}
60 +
61 +src_configure() {
62 + local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_PAM=$(usex pam)
63 + $(mysql-cmake_use_plugin tokudb TOKUDB)
64 + )
65 + if use tokudb ; then
66 + # TokuDB Backup plugin requires valgrind unconditionally
67 + MYSQL_CMAKE_NATIVE_DEFINES+=(
68 + $(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
69 + )
70 + fi
71 + mysql-multilib-r1_src_configure
72 +}
73 +
74 +# Official test instructions:
75 +# USE='extraengine perl openssl static-libs' \
76 +# FEATURES='test userpriv -usersandbox' \
77 +# ebuild percona-server-X.X.XX.ebuild \
78 +# digest clean package
79 +multilib_src_test() {
80 +
81 + if ! multilib_is_native_abi ; then
82 + einfo "Server tests not available on non-native abi".
83 + return 0;
84 + fi
85 +
86 + local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test"
87 + local retstatus_unit
88 + local retstatus_tests
89 +
90 + # Bug #213475 - MySQL _will_ object strenously if your machine is named
91 + # localhost. Also causes weird failures.
92 + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
93 +
94 + if use server ; then
95 +
96 + if [[ $UID -eq 0 ]]; then
97 + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
98 + fi
99 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
100 +
101 + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
102 + addpredict /this-dir-does-not-exist/t9.MYI
103 +
104 + # Run CTest (test-units)
105 + cmake-utils_src_test
106 + retstatus_unit=$?
107 + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
108 +
109 + # Ensure that parallel runs don't die
110 + export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
111 + # Enable parallel testing, auto will try to detect number of cores
112 + # You may set this by hand.
113 + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
114 + export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
115 +
116 + # create directories because mysqladmin might right out of order
117 + mkdir -p "${T}"/var-tests{,/log}
118 +
119 + # Create a symlink to provided binaries so the tests can find them when client-libs is off
120 + if ! use client-libs ; then
121 + ln -srf /usr/bin/my_print_defaults "${BUILD_DIR}/client/my_print_defaults" || die
122 + ln -srf /usr/bin/perror "${BUILD_DIR}/client/perror" || die
123 + mysql-multilib_disable_test main.perror "String mismatch due to not building local perror"
124 + fi
125 +
126 + # These are failing in Percona 5.6 for now and are believed to be
127 + # false positives:
128 + #
129 + # main.information_schema, binlog.binlog_statement_insert_delayed,
130 + # main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
131 + # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
132 + # funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
133 + # engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
134 + # engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
135 + # engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
136 + # fails due to USE=-latin1 / utf8 default
137 + #
138 + # main.mysql_client_test:
139 + # segfaults at random under Portage only, suspect resource limits.
140 + #
141 + # main.percona_bug1289599
142 + # Looks to be a syntax error in the test file itself
143 + #
144 + # main.variables main.myisam main.merge_recover
145 + # fails due to ulimit not able to open enough files (needs 5000)
146 + #
147 + # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
148 + # Called with bad parameters should be reported upstream
149 + #
150 +
151 + for t in main.mysql_client_test \
152 + binlog.binlog_statement_insert_delayed main.information_schema \
153 + main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
154 + perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
155 + funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
156 + main.variables main.myisam main.merge_recover \
157 + engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
158 + engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
159 + engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
160 + main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
161 + mysql-multilib_disable_test "$t" "False positives in Gentoo"
162 + done
163 +
164 + # Run mysql tests
165 + pushd "${TESTDIR}"
166 +
167 + # Set file limits higher so tests run
168 + ulimit -n 3000
169 + python_setup
170 + # run mysql-test tests
171 + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
172 + --testcase-timeout=30 --reorder
173 + retstatus_tests=$?
174 + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
175 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
176 +
177 + popd
178 +
179 + # Cleanup is important for these testcases.
180 + pkill -9 -f "${S}/ndb" 2>/dev/null
181 + pkill -9 -f "${S}/sql" 2>/dev/null
182 +
183 + failures=""
184 + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
185 + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
186 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
187 +
188 + [[ -z "$failures" ]] || die "Test failures: $failures"
189 + einfo "Tests successfully completed"
190 +
191 + else
192 +
193 + einfo "Skipping server tests due to minimal build."
194 + fi
195 +}