Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/percona-server/
Date: Sat, 28 Oct 2017 18:11:27
Message-Id: 1509214246.cf74863f8b3c68b028ed8ae8f33e920573c905d8.whissi@gentoo
1 commit: cf74863f8b3c68b028ed8ae8f33e920573c905d8
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 28 18:02:07 2017 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 28 18:10:46 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf74863f
7
8 dev-db/percona-server: Rev bump to fix CVE-2017-15945
9
10 Bug: https://bugs.gentoo.org/635702
11 Package-Manager: Portage-2.3.13, Repoman-2.3.4
12
13 .../percona-server-5.6.37.82.2-r1.ebuild | 219 +++++++++++++++++++++
14 1 file changed, 219 insertions(+)
15
16 diff --git a/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild b/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild
17 new file mode 100644
18 index 00000000000..887e1891444
19 --- /dev/null
20 +++ b/dev-db/percona-server/percona-server-5.6.37.82.2-r1.ebuild
21 @@ -0,0 +1,219 @@
22 +# Copyright 1999-2017 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI="6"
26 +MY_EXTRAS_VER="20170820-2245Z"
27 +SUBSLOT="18"
28 +PYTHON_COMPAT=( python2_7 )
29 +inherit linux-info python-any-r1 mysql-multilib-r1
30 +
31 +IUSE="numa 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="numa? ( sys-process/numactl:= )
42 + server? ( pam? ( virtual/pam:0= ) )
43 + tokudb? ( app-arch/snappy )
44 + tokudb-backup-plugin? ( dev-util/valgrind )
45 + "
46 +
47 +DEPEND="${COMMON_DEPEND}
48 + || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
49 + test? ( $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') )"
50 +RDEPEND="${COMMON_DEPEND}"
51 +
52 +REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
53 +
54 +MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
55 +
56 +PATCHES=(
57 + "${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
58 + "${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
59 + "${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
60 + "${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.patch
61 + "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
62 + "${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
63 + "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
64 + "${MY_PATCH_DIR}"/20018_all_percona-server-5.6.25-without-clientlibs-tools.patch
65 +)
66 +
67 +# Please do not add a naive src_unpack to this ebuild
68 +# If you want to add a single patch, copy the ebuild to an overlay
69 +# and create your own mysql-extras tarball, looking at 000_index.txt
70 +
71 +pkg_pretend() {
72 + mysql-multilib-r1_pkg_pretend
73 +
74 + if use numa; then
75 + local CONFIG_CHECK="~NUMA"
76 +
77 + local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
78 + WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
79 +
80 + check_extra_config
81 + fi
82 +}
83 +
84 +python_check_deps() {
85 + has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
86 +}
87 +
88 +src_prepare() {
89 + mysql-multilib-r1_src_prepare
90 + if use libressl ; then
91 + sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
92 + "${S}/cmake/ssl.cmake" || die
93 + fi
94 +}
95 +
96 +src_configure() {
97 + local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
98 + -DWITH_PAM=$(usex pam)
99 + $(mysql-cmake_use_plugin tokudb TOKUDB)
100 + )
101 + if use tokudb ; then
102 + # TokuDB Backup plugin requires valgrind unconditionally
103 + MYSQL_CMAKE_NATIVE_DEFINES+=(
104 + $(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
105 + )
106 + fi
107 + mysql-multilib-r1_src_configure
108 +}
109 +
110 +# Official test instructions:
111 +# USE='extraengine perl openssl static-libs' \
112 +# FEATURES='test userpriv -usersandbox' \
113 +# ebuild percona-server-X.X.XX.ebuild \
114 +# digest clean package
115 +multilib_src_test() {
116 +
117 + if ! multilib_is_native_abi ; then
118 + einfo "Server tests not available on non-native abi".
119 + return 0;
120 + fi
121 +
122 + if ! use server ; then
123 + einfo "Skipping server tests due to minimal build."
124 + return 0
125 + fi
126 +
127 + local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test"
128 + local retstatus_unit
129 + local retstatus_tests
130 +
131 + # Bug #213475 - MySQL _will_ object strenously if your machine is named
132 + # localhost. Also causes weird failures.
133 + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
134 +
135 + if [[ $UID -eq 0 ]]; then
136 + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
137 + fi
138 +
139 + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
140 +
141 + # Run CTest (test-units)
142 + cmake-utils_src_test
143 + retstatus_unit=$?
144 + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
145 +
146 + # Ensure that parallel runs don't die
147 + export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
148 + # Enable parallel testing, auto will try to detect number of cores
149 + # You may set this by hand.
150 + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
151 + export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
152 +
153 + # create directories because mysqladmin might right out of order
154 + mkdir -p "${T}"/var-tests{,/log}
155 +
156 + # These are failing in Percona 5.6 for now and are believed to be
157 + # false positives:
158 + #
159 + # main.information_schema, binlog.binlog_statement_insert_delayed,
160 + # main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
161 + # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
162 + # funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
163 + # engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
164 + # engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
165 + # engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
166 + # fails due to USE=-latin1 / utf8 default
167 + #
168 + # main.mysql_client_test:
169 + # segfaults at random under Portage only, suspect resource limits.
170 + #
171 + # main.percona_bug1289599
172 + # Looks to be a syntax error in the test file itself
173 + #
174 + # main.variables main.myisam main.merge_recover
175 + # fails due to ulimit not able to open enough files (needs 5000)
176 + #
177 + # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
178 + # Called with bad parameters should be reported upstream
179 + #
180 +
181 + local t
182 +
183 + for t in main.mysql_client_test \
184 + binlog.binlog_statement_insert_delayed main.information_schema \
185 + main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
186 + perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
187 + funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
188 + main.variables main.myisam main.merge_recover \
189 + engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
190 + engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
191 + engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
192 + main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
193 + mysql-multilib-r1_disable_test "$t" "False positives in Gentoo"
194 + done
195 +
196 + if use numa && use kernel_linux ; then
197 + # bug 584880
198 + if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
199 + for t in sys_vars.innodb_buffer_pool_populate_basic ; do
200 + mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
201 + done
202 + fi
203 + fi
204 +
205 + if ! use extraengine ; then
206 + # bug 401673, 530766
207 + for t in federated.federated_plugin ; do
208 + mysql-multilib-r1_disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)"
209 + done
210 + fi
211 +
212 + # Run mysql tests
213 + pushd "${TESTDIR}" || die
214 +
215 + # Set file limits higher so tests run
216 + ulimit -n 3000
217 + python_setup
218 + # run mysql-test tests
219 + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
220 + --testcase-timeout=30 --reorder
221 + retstatus_tests=$?
222 + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
223 +
224 + popd || die
225 +
226 + # Cleanup is important for these testcases.
227 + pkill -9 -f "${S}/ndb" 2>/dev/null
228 + pkill -9 -f "${S}/sql" 2>/dev/null
229 +
230 + failures=""
231 + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
232 + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
233 +
234 + if [[ -n "$failures" ]]; then
235 + has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
236 + die "Test failures: $failures"
237 + fi
238 +
239 + einfo "Tests successfully completed"
240 +}