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/mysql-cluster/
Date: Sat, 28 Oct 2017 18:11:27
Message-Id: 1509214257.f83155f18d53fdead7a4cd3679b612d112897252.whissi@gentoo
1 commit: f83155f18d53fdead7a4cd3679b612d112897252
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 28 18:10:07 2017 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 28 18:10:57 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f83155f1
7
8 dev-db/mysql-cluster: Rev bump to fix CVE-2017-15945
9
10 Bug: https://bugs.gentoo.org/635708
11 Package-Manager: Portage-2.3.13, Repoman-2.3.4
12
13 .../mysql-cluster/mysql-cluster-7.2.22-r1.ebuild | 124 ++++++++++++++++++
14 .../mysql-cluster/mysql-cluster-7.3.11-r1.ebuild | 143 +++++++++++++++++++++
15 2 files changed, 267 insertions(+)
16
17 diff --git a/dev-db/mysql-cluster/mysql-cluster-7.2.22-r1.ebuild b/dev-db/mysql-cluster/mysql-cluster-7.2.22-r1.ebuild
18 new file mode 100644
19 index 00000000000..09d32b5a664
20 --- /dev/null
21 +++ b/dev-db/mysql-cluster/mysql-cluster-7.2.22-r1.ebuild
22 @@ -0,0 +1,124 @@
23 +# Copyright 1999-2017 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=5
27 +MY_EXTRAS_VER="20151117-2040Z"
28 +BUILD="cmake"
29 +
30 +inherit toolchain-funcs java-pkg-opt-2 mysql-v2
31 +# only to make repoman happy. it is really set in the eclass
32 +IUSE="$IUSE"
33 +
34 +# REMEMBER: also update eclass/mysql*.eclass before committing!
35 +KEYWORDS="~amd64 ~x86"
36 +
37 +# When MY_EXTRAS is bumped, the index should be revised to exclude these.
38 +# This is often broken still
39 +#EPATCH_EXCLUDE=''
40 +
41 +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
42 +RDEPEND="!media-sound/amarok[embedded]"
43 +
44 +# Please do not add a naive src_unpack to this ebuild
45 +# If you want to add a single patch, copy the ebuild to an overlay
46 +# and create your own mysql-extras tarball, looking at 000_index.txt
47 +
48 +# Official test instructions:
49 +# USE='cluster extraengine perl ssl community' \
50 +# FEATURES='test userpriv -usersandbox' \
51 +# ebuild mysql-cluster-X.X.XX.ebuild \
52 +# digest clean package
53 +src_test() {
54 +
55 + local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test"
56 + local retstatus_unit
57 + local retstatus_tests
58 +
59 + # Bug #213475 - MySQL _will_ object strenously if your machine is named
60 + # localhost. Also causes weird failures.
61 + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
62 +
63 + if ! use "minimal" ; then
64 +
65 + if [[ $UID -eq 0 ]]; then
66 + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
67 + fi
68 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
69 +
70 + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
71 + addpredict /this-dir-does-not-exist/t9.MYI
72 +
73 + # Run CTest (test-units)
74 + cmake-utils_src_test
75 + retstatus_unit=$?
76 + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
77 +
78 + # Ensure that parallel runs don't die
79 + export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
80 +
81 + # create directories because mysqladmin might right out of order
82 + mkdir -p "${T}"/var-tests{,/log}
83 +
84 + # These are failing in MySQL 5.5 for now and are believed to be
85 + # false positives:
86 + #
87 + # main.information_schema, binlog.binlog_statement_insert_delayed,
88 + # main.mysqld--help-notwin, ndb.ndbinfo, ndb_binlog.ndb_binlog_index
89 + # fails due to USE=-latin1 / utf8 default
90 + #
91 + # main.mysql_client_test:
92 + # segfaults at random under Portage only, suspect resource limits.
93 + #
94 + # sys_vars.plugin_dir_basic
95 + # fails because PLUGIN_DIR is set to MYSQL_LIBDIR64/plugin
96 + # instead of MYSQL_LIBDIR/plugin
97 + #
98 + # main.flush_read_lock_kill
99 + # fails because of unknown system variable 'DEBUG_SYNC'
100 + #
101 + # main.openssl_1
102 + # error message changing
103 + # -mysqltest: Could not open connection 'default': 2026 SSL connection
104 + # error: ASN: bad other signature confirmation
105 + # +mysqltest: Could not open connection 'default': 2026 SSL connection
106 + # error: error:00000001:lib(0):func(0):reason(1)
107 + #
108 +
109 + for t in main.mysql_client_test \
110 + binlog.binlog_statement_insert_delayed main.information_schema \
111 + main.mysqld--help-notwin main.flush_read_lock_kill \
112 + sys_vars.plugin_dir_basic main.openssl_1 \
113 + main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
114 + ndb.ndbinfo ndb_binlog.ndb_binlog_index ; do
115 + mysql-v2_disable_test "$t" "False positives in Gentoo"
116 + done
117 +
118 + # Run mysql tests
119 + pushd "${TESTDIR}"
120 +
121 + # run mysql-test tests
122 + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
123 + --parallel=auto
124 + retstatus_tests=$?
125 + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
126 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
127 +
128 + popd
129 +
130 + # Cleanup is important for these testcases.
131 + pkill -9 -f "${S}/ndb" 2>/dev/null
132 + pkill -9 -f "${S}/sql" 2>/dev/null
133 +
134 + failures=""
135 + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
136 + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
137 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
138 +
139 + [[ -z "$failures" ]] || die "Test failures: $failures"
140 + einfo "Tests successfully completed"
141 +
142 + else
143 +
144 + einfo "Skipping server tests due to minimal build."
145 + fi
146 +}
147
148 diff --git a/dev-db/mysql-cluster/mysql-cluster-7.3.11-r1.ebuild b/dev-db/mysql-cluster/mysql-cluster-7.3.11-r1.ebuild
149 new file mode 100644
150 index 00000000000..f8fb8c1896a
151 --- /dev/null
152 +++ b/dev-db/mysql-cluster/mysql-cluster-7.3.11-r1.ebuild
153 @@ -0,0 +1,143 @@
154 +# Copyright 1999-2017 Gentoo Foundation
155 +# Distributed under the terms of the GNU General Public License v2
156 +
157 +EAPI=5
158 +MY_EXTRAS_VER="20151117-2040Z"
159 +SUBSLOT="18"
160 +
161 +inherit toolchain-funcs java-pkg-opt-2 mysql-multilib
162 +# only to make repoman happy. it is really set in the eclass
163 +IUSE="$IUSE"
164 +
165 +# REMEMBER: also update eclass/mysql*.eclass before committing!
166 +KEYWORDS="~amd64 ~x86"
167 +
168 +# When MY_EXTRAS is bumped, the index should be revised to exclude these.
169 +# This is often broken still
170 +#EPATCH_EXCLUDE=''
171 +
172 +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
173 +RDEPEND="!media-sound/amarok[embedded]"
174 +
175 +# Please do not add a naive src_unpack to this ebuild
176 +# If you want to add a single patch, copy the ebuild to an overlay
177 +# and create your own mysql-extras tarball, looking at 000_index.txt
178 +
179 +src_prepare() {
180 + mysql-multilib_src_prepare
181 + if use libressl ; then
182 + sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
183 + "${S}/cmake/ssl.cmake" || die
184 + fi
185 +}
186 +
187 +# Official test instructions:
188 +# USE='extraengine perl openssl' \
189 +# FEATURES='test userpriv -usersandbox' \
190 +# ebuild mysql-cluster-X.X.XX.ebuild \
191 +# digest clean package
192 +multilib_src_test() {
193 +
194 + if ! multilib_is_native_abi ; then
195 + einfo "Server tests not available on non-native abi".
196 + return 0;
197 + fi
198 +
199 + local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test"
200 + local retstatus_unit
201 + local retstatus_tests
202 +
203 + # Bug #213475 - MySQL _will_ object strenously if your machine is named
204 + # localhost. Also causes weird failures.
205 + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
206 +
207 + if ! use "minimal" ; then
208 +
209 + if [[ $UID -eq 0 ]]; then
210 + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
211 + fi
212 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
213 +
214 + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
215 + addpredict /this-dir-does-not-exist/t9.MYI
216 +
217 + # Run CTest (test-units)
218 + cmake-utils_src_test
219 + retstatus_unit=$?
220 + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
221 +
222 + # Ensure that parallel runs don't die
223 + export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
224 + # Enable parallel testing, auto will try to detect number of cores
225 + # You may set this by hand.
226 + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
227 + export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
228 +
229 + # create directories because mysqladmin might right out of order
230 + mkdir -p "${T}"/var-tests{,/log}
231 +
232 + # These are failing in MySQL 5.5/5.6 for now and are believed to be
233 + # false positives:
234 + #
235 + # main.information_schema, binlog.binlog_statement_insert_delayed,
236 + # main.mysqld--help-notwin, funcs_1.is_triggers funcs_1.is_tables_mysql,
237 + # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
238 + # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
239 + # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
240 + # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
241 + # fails due to USE=-latin1 / utf8 default
242 + #
243 + # main.mysql_client_test:
244 + # segfaults at random under Portage only, suspect resource limits.
245 + #
246 + for t in \
247 + binlog.binlog_mysqlbinlog_filter \
248 + binlog.binlog_statement_insert_delayed \
249 + funcs_1.is_columns_mysql \
250 + funcs_1.is_tables_mysql \
251 + funcs_1.is_triggers \
252 + main.information_schema \
253 + main.mysqld--help-notwinfuncs_1.is_triggers \
254 + main.mysql_client_test \
255 + mysqld--help-notwin \
256 + main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
257 + perfschema.binlog_edge_mix \
258 + perfschema.binlog_edge_stmt \
259 + ; do
260 + mysql-multilib_disable_test "$t" "False positives in Gentoo"
261 + done
262 + # ndb.ndbinfo, ndb_binlog.ndb_binlog_index: latin1/utf8
263 + for t in \
264 + ndb.ndbinfo \
265 + ndb_binlog.ndb_binlog_index ; do
266 + mysql-multilib_disable_test "$t" "False positives in Gentoo (NDB)"
267 + done
268 +
269 + # Run mysql tests
270 + pushd "${TESTDIR}"
271 +
272 + # run mysql-test tests
273 + perl mysql-test-run.pl --force --vardir="${T}/var-tests"
274 + retstatus_tests=$?
275 + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
276 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
277 +
278 + popd
279 +
280 + # Cleanup is important for these testcases.
281 + pkill -9 -f "${S}/ndb" 2>/dev/null
282 + pkill -9 -f "${S}/sql" 2>/dev/null
283 +
284 + failures=""
285 + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
286 + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
287 + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
288 +
289 + [[ -z "$failures" ]] || die "Test failures: $failures"
290 + einfo "Tests successfully completed"
291 +
292 + else
293 +
294 + einfo "Skipping server tests due to minimal build."
295 + fi
296 +}