1 |
commit: c3f948792073c6f485cdd1fa99ad9dce6602d757 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 28 18:08:13 2017 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 28 18:10:54 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3f94879 |
7 |
|
8 |
dev-db/mysql: Rev bump to fix CVE-2017-15945 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/635706 |
11 |
Package-Manager: Portage-2.3.13, Repoman-2.3.4 |
12 |
RepoMan-Options: --force |
13 |
|
14 |
dev-db/mysql/mysql-5.6.36-r1.ebuild | 177 ++++++++++++++++++++++++++++++++++ |
15 |
dev-db/mysql/mysql-5.6.37-r1.ebuild | 183 ++++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 360 insertions(+) |
17 |
|
18 |
diff --git a/dev-db/mysql/mysql-5.6.36-r1.ebuild b/dev-db/mysql/mysql-5.6.36-r1.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..3ced3a4395b |
21 |
--- /dev/null |
22 |
+++ b/dev-db/mysql/mysql-5.6.36-r1.ebuild |
23 |
@@ -0,0 +1,177 @@ |
24 |
+# Copyright 1999-2017 Gentoo Foundation |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI="6" |
28 |
+ |
29 |
+MY_EXTRAS_VER="20170302-1359Z" |
30 |
+MY_PV="${PV//_alpha_pre/-m}" |
31 |
+MY_PV="${MY_PV//_/-}" |
32 |
+HAS_TOOLS_PATCH="1" |
33 |
+SUBSLOT="18" |
34 |
+ |
35 |
+inherit mysql-multilib-r1 |
36 |
+# only to make repoman happy. it is really set in the eclass |
37 |
+IUSE="$IUSE" |
38 |
+ |
39 |
+# REMEMBER: also update eclass/mysql*.eclass before committing! |
40 |
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" |
41 |
+ |
42 |
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" |
43 |
+RDEPEND="${RDEPEND}" |
44 |
+ |
45 |
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}" |
46 |
+ |
47 |
+PATCHES=( |
48 |
+ "${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch |
49 |
+ "${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch |
50 |
+ "${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch |
51 |
+ "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch |
52 |
+ "${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink.patch |
53 |
+ "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch |
54 |
+ "${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch |
55 |
+) |
56 |
+ |
57 |
+# Please do not add a naive src_unpack to this ebuild |
58 |
+# If you want to add a single patch, copy the ebuild to an overlay |
59 |
+# and create your own mysql-extras tarball, looking at 000_index.txt |
60 |
+ |
61 |
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7) |
62 |
+# disable until we see what happens with it |
63 |
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 ) |
64 |
+ |
65 |
+src_prepare() { |
66 |
+ mysql-multilib-r1_src_prepare |
67 |
+ if use libressl ; then |
68 |
+ sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \ |
69 |
+ "${S}/cmake/ssl.cmake" || die |
70 |
+ fi |
71 |
+} |
72 |
+ |
73 |
+# Official test instructions: |
74 |
+# USE='server embedded extraengine perl openssl static-libs' \ |
75 |
+# FEATURES='test userpriv -usersandbox' \ |
76 |
+# ebuild mysql-X.X.XX.ebuild \ |
77 |
+# digest clean package |
78 |
+multilib_src_test() { |
79 |
+ |
80 |
+ if ! multilib_is_native_abi ; then |
81 |
+ einfo "Server tests not available on non-native abi". |
82 |
+ return 0; |
83 |
+ fi |
84 |
+ |
85 |
+ local TESTDIR="${BUILD_DIR}/mysql-test" |
86 |
+ local retstatus_unit |
87 |
+ local retstatus_tests |
88 |
+ |
89 |
+ # Bug #213475 - MySQL _will_ object strenously if your machine is named |
90 |
+ # localhost. Also causes weird failures. |
91 |
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" |
92 |
+ |
93 |
+ if use server ; then |
94 |
+ |
95 |
+ if [[ $UID -eq 0 ]]; then |
96 |
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." |
97 |
+ fi |
98 |
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox" |
99 |
+ |
100 |
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
101 |
+ |
102 |
+ # Run CTest (test-units) |
103 |
+ cmake-utils_src_test |
104 |
+ retstatus_unit=$? |
105 |
+ |
106 |
+ # Ensure that parallel runs don't die |
107 |
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))" |
108 |
+ # Enable parallel testing, auto will try to detect number of cores |
109 |
+ # You may set this by hand. |
110 |
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased |
111 |
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}" |
112 |
+ |
113 |
+ # create directories because mysqladmin might right out of order |
114 |
+ mkdir -p "${T}"/var-tests{,/log} |
115 |
+ |
116 |
+ # create symlink for the tests to find mysql_tzinfo_to_sql |
117 |
+ ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/" |
118 |
+ |
119 |
+ # These are failing in MySQL 5.5/5.6 for now and are believed to be |
120 |
+ # false positives: |
121 |
+ # |
122 |
+ # main.information_schema, binlog.binlog_statement_insert_delayed, |
123 |
+ # funcs_1.is_triggers funcs_1.is_tables_mysql, |
124 |
+ # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter, |
125 |
+ # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt, |
126 |
+ # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql |
127 |
+ # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter |
128 |
+ # fails due to USE=-latin1 / utf8 default |
129 |
+ # |
130 |
+ # main.mysql_client_test: |
131 |
+ # segfaults at random under Portage only, suspect resource limits. |
132 |
+ # |
133 |
+ # rpl.rpl_plugin_load |
134 |
+ # fails due to included file not listed in expected result |
135 |
+ # appears to be poor planning |
136 |
+ # |
137 |
+ # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam |
138 |
+ # fails due to bad cleanup of previous tests when run in parallel |
139 |
+ # The tool is deprecated anyway |
140 |
+ # Bug 532288 |
141 |
+ # |
142 |
+ # main.events_2 |
143 |
+ # Fails on date in past without preserve causing the drop to fail |
144 |
+ |
145 |
+ for t in \ |
146 |
+ binlog.binlog_mysqlbinlog_filter \ |
147 |
+ binlog.binlog_statement_insert_delayed \ |
148 |
+ funcs_1.is_columns_mysql \ |
149 |
+ funcs_1.is_tables_mysql \ |
150 |
+ funcs_1.is_triggers \ |
151 |
+ main.information_schema \ |
152 |
+ main.mysql_client_test \ |
153 |
+ main.mysqld--help-notwin \ |
154 |
+ perfschema.binlog_edge_mix \ |
155 |
+ perfschema.binlog_edge_stmt \ |
156 |
+ rpl.rpl_plugin_load \ |
157 |
+ main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ |
158 |
+ main.events_2 \ |
159 |
+ ; do |
160 |
+ mysql-multilib-r1_disable_test "$t" "False positives in Gentoo" |
161 |
+ done |
162 |
+ |
163 |
+ if ! use extraengine ; then |
164 |
+ # bug 401673, 530766 |
165 |
+ for t in federated.federated_plugin ; do |
166 |
+ mysql-multilib-r1_disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)" |
167 |
+ done |
168 |
+ fi |
169 |
+ |
170 |
+ # Run mysql tests |
171 |
+ pushd "${TESTDIR}" |
172 |
+ |
173 |
+ # Set file limits higher so tests run |
174 |
+ ulimit -n 3000 |
175 |
+ |
176 |
+ # run mysql-test tests |
177 |
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ |
178 |
+ --suite-timeout=5000 --reorder |
179 |
+ retstatus_tests=$? |
180 |
+# [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" |
181 |
+# has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" |
182 |
+ |
183 |
+ popd |
184 |
+ |
185 |
+ # Cleanup is important for these testcases. |
186 |
+ pkill -9 -f "${S}/ndb" 2>/dev/null |
187 |
+ pkill -9 -f "${S}/sql" 2>/dev/null |
188 |
+ |
189 |
+ failures="" |
190 |
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" |
191 |
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" |
192 |
+# has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" |
193 |
+ |
194 |
+ [[ -z "$failures" ]] || die "Test failures: $failures" |
195 |
+ einfo "Tests successfully completed" |
196 |
+ |
197 |
+ else |
198 |
+ einfo "Skipping server tests due to minimal build." |
199 |
+ fi |
200 |
+} |
201 |
|
202 |
diff --git a/dev-db/mysql/mysql-5.6.37-r1.ebuild b/dev-db/mysql/mysql-5.6.37-r1.ebuild |
203 |
new file mode 100644 |
204 |
index 00000000000..016e3491ecf |
205 |
--- /dev/null |
206 |
+++ b/dev-db/mysql/mysql-5.6.37-r1.ebuild |
207 |
@@ -0,0 +1,183 @@ |
208 |
+# Copyright 1999-2017 Gentoo Foundation |
209 |
+# Distributed under the terms of the GNU General Public License v2 |
210 |
+ |
211 |
+EAPI="6" |
212 |
+ |
213 |
+MY_EXTRAS_VER="20170719-1335Z" |
214 |
+MY_PV="${PV//_alpha_pre/-m}" |
215 |
+MY_PV="${MY_PV//_/-}" |
216 |
+HAS_TOOLS_PATCH="1" |
217 |
+SUBSLOT="18" |
218 |
+#fails to build with ninja |
219 |
+CMAKE_MAKEFILE_GENERATOR=emake |
220 |
+ |
221 |
+inherit mysql-multilib-r1 |
222 |
+# only to make repoman happy. it is really set in the eclass |
223 |
+IUSE="$IUSE" |
224 |
+ |
225 |
+# REMEMBER: also update eclass/mysql*.eclass before committing! |
226 |
+KEYWORDS="~alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" |
227 |
+ |
228 |
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" |
229 |
+RDEPEND="${RDEPEND}" |
230 |
+ |
231 |
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}" |
232 |
+ |
233 |
+PATCHES=( |
234 |
+ "${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch |
235 |
+ "${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch |
236 |
+ "${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch |
237 |
+ "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch |
238 |
+ "${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch |
239 |
+ "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch |
240 |
+ "${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch |
241 |
+) |
242 |
+ |
243 |
+# Please do not add a naive src_unpack to this ebuild |
244 |
+# If you want to add a single patch, copy the ebuild to an overlay |
245 |
+# and create your own mysql-extras tarball, looking at 000_index.txt |
246 |
+ |
247 |
+# validate_password plugin uses exceptions when it shouldn't yet (until 5.7) |
248 |
+# disable until we see what happens with it |
249 |
+MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 ) |
250 |
+ |
251 |
+src_prepare() { |
252 |
+ mysql-multilib-r1_src_prepare |
253 |
+ if use libressl ; then |
254 |
+ sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \ |
255 |
+ "${S}/cmake/ssl.cmake" || die |
256 |
+ fi |
257 |
+} |
258 |
+ |
259 |
+# Official test instructions: |
260 |
+# USE='server embedded extraengine perl openssl static-libs' \ |
261 |
+# FEATURES='test userpriv -usersandbox' \ |
262 |
+# ebuild mysql-X.X.XX.ebuild \ |
263 |
+# digest clean package |
264 |
+multilib_src_test() { |
265 |
+ |
266 |
+ if ! multilib_is_native_abi ; then |
267 |
+ einfo "Server tests not available on non-native abi". |
268 |
+ return 0; |
269 |
+ fi |
270 |
+ |
271 |
+ local TESTDIR="${BUILD_DIR}/mysql-test" |
272 |
+ local retstatus_unit |
273 |
+ local retstatus_tests |
274 |
+ |
275 |
+ # Bug #213475 - MySQL _will_ object strenously if your machine is named |
276 |
+ # localhost. Also causes weird failures. |
277 |
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" |
278 |
+ |
279 |
+ if use server ; then |
280 |
+ |
281 |
+ if [[ $UID -eq 0 ]]; then |
282 |
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." |
283 |
+ fi |
284 |
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox" |
285 |
+ |
286 |
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
287 |
+ |
288 |
+ # Run CTest (test-units) |
289 |
+ cmake-utils_src_test |
290 |
+ retstatus_unit=$? |
291 |
+ |
292 |
+ # Ensure that parallel runs don't die |
293 |
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))" |
294 |
+ # Enable parallel testing, auto will try to detect number of cores |
295 |
+ # You may set this by hand. |
296 |
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased |
297 |
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}" |
298 |
+ |
299 |
+ # create directories because mysqladmin might right out of order |
300 |
+ mkdir -p "${T}"/var-tests{,/log} |
301 |
+ |
302 |
+ # create symlink for the tests to find mysql_tzinfo_to_sql |
303 |
+ ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/" |
304 |
+ |
305 |
+ # These are failing in MySQL 5.5/5.6 for now and are believed to be |
306 |
+ # false positives: |
307 |
+ # |
308 |
+ # main.information_schema, binlog.binlog_statement_insert_delayed, |
309 |
+ # funcs_1.is_triggers funcs_1.is_tables_mysql, |
310 |
+ # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter, |
311 |
+ # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt, |
312 |
+ # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql |
313 |
+ # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter |
314 |
+ # fails due to USE=-latin1 / utf8 default |
315 |
+ # |
316 |
+ # main.mysql_client_test: |
317 |
+ # segfaults at random under Portage only, suspect resource limits. |
318 |
+ # |
319 |
+ # rpl.rpl_plugin_load |
320 |
+ # fails due to included file not listed in expected result |
321 |
+ # appears to be poor planning |
322 |
+ # |
323 |
+ # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam |
324 |
+ # fails due to bad cleanup of previous tests when run in parallel |
325 |
+ # The tool is deprecated anyway |
326 |
+ # Bug 532288 |
327 |
+ # |
328 |
+ # main.events_2 |
329 |
+ # Fails on date in past without preserve causing the drop to fail |
330 |
+ |
331 |
+ for t in \ |
332 |
+ binlog.binlog_mysqlbinlog_filter \ |
333 |
+ binlog.binlog_statement_insert_delayed \ |
334 |
+ funcs_1.is_columns_mysql \ |
335 |
+ funcs_1.is_tables_mysql \ |
336 |
+ funcs_1.is_triggers \ |
337 |
+ main.information_schema \ |
338 |
+ main.mysql_client_test \ |
339 |
+ main.mysqld--help-notwin \ |
340 |
+ perfschema.binlog_edge_mix \ |
341 |
+ perfschema.binlog_edge_stmt \ |
342 |
+ rpl.rpl_plugin_load \ |
343 |
+ main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ |
344 |
+ main.events_2 \ |
345 |
+ ; do |
346 |
+ mysql-multilib-r1_disable_test "$t" "False positives in Gentoo" |
347 |
+ done |
348 |
+ |
349 |
+ if ! use extraengine ; then |
350 |
+ # bug 401673, 530766 |
351 |
+ for t in federated.federated_plugin ; do |
352 |
+ mysql-multilib-r1_disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)" |
353 |
+ done |
354 |
+ fi |
355 |
+ |
356 |
+ for t in main.mysql main.mysql_upgrade ; do |
357 |
+ mysql-multilib-r1_disable_test "$t" "Test $t broken upstream - error return value not updated" |
358 |
+ done |
359 |
+ |
360 |
+ # Run mysql tests |
361 |
+ pushd "${TESTDIR}" |
362 |
+ |
363 |
+ # Set file limits higher so tests run |
364 |
+ ulimit -n 3000 |
365 |
+ |
366 |
+ # run mysql-test tests |
367 |
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ |
368 |
+ --suite-timeout=5000 --reorder |
369 |
+ retstatus_tests=$? |
370 |
+# [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" |
371 |
+# has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" |
372 |
+ |
373 |
+ popd |
374 |
+ |
375 |
+ # Cleanup is important for these testcases. |
376 |
+ pkill -9 -f "${S}/ndb" 2>/dev/null |
377 |
+ pkill -9 -f "${S}/sql" 2>/dev/null |
378 |
+ |
379 |
+ failures="" |
380 |
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" |
381 |
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" |
382 |
+# has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" |
383 |
+ |
384 |
+ [[ -z "$failures" ]] || die "Test failures: $failures" |
385 |
+ einfo "Tests successfully completed" |
386 |
+ |
387 |
+ else |
388 |
+ einfo "Skipping server tests due to minimal build." |
389 |
+ fi |
390 |
+} |