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/mysql-cluster/
Date: Sun, 12 Nov 2017 02:19:19
Message-Id: 1510453142.926f9314afc813f90d67215a8c9d2fcacf8d765f.grknight@gentoo
1 commit: 926f9314afc813f90d67215a8c9d2fcacf8d765f
2 Author: Brian Evans <grknight <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 12 02:19:02 2017 +0000
4 Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 12 02:19:02 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=926f9314
7
8 dev-db/mysql-cluster: Convert 7.3.19 to mysql-multilib-r1 eclass
9
10 Package-Manager: Portage-2.3.13, Repoman-2.3.4
11
12 dev-db/mysql-cluster/mysql-cluster-7.3.19.ebuild | 92 +++++++++++++++++-------
13 1 file changed, 68 insertions(+), 24 deletions(-)
14
15 diff --git a/dev-db/mysql-cluster/mysql-cluster-7.3.19.ebuild b/dev-db/mysql-cluster/mysql-cluster-7.3.19.ebuild
16 index 7a18a355e0a..01e3c5a9412 100644
17 --- a/dev-db/mysql-cluster/mysql-cluster-7.3.19.ebuild
18 +++ b/dev-db/mysql-cluster/mysql-cluster-7.3.19.ebuild
19 @@ -1,38 +1,71 @@
20 # Copyright 1999-2017 Gentoo Foundation
21 # Distributed under the terms of the GNU General Public License v2
22
23 -EAPI=5
24 +EAPI=6
25 MY_EXTRAS_VER="20171108-2050Z"
26 SUBSLOT="18"
27 +MYSQL_PV_MAJOR="5.6"
28 #fails to build with ninja
29 CMAKE_MAKEFILE_GENERATOR=emake
30
31 -inherit toolchain-funcs java-pkg-opt-2 mysql-multilib
32 +inherit java-utils-2 mysql-multilib-r1
33 # only to make repoman happy. it is really set in the eclass
34 -IUSE="$IUSE"
35 +IUSE="$IUSE numa"
36
37 # REMEMBER: also update eclass/mysql*.eclass before committing!
38 KEYWORDS="~amd64 ~x86"
39 +COMMON_DEPEND="numa? ( sys-process/numactl ) dev-libs/libevent:0= ${JAVA_PKG_E_DEPEND}"
40 +DEPEND="${COMMON_DEPEND} || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) >=virtual/jdk-1.6"
41 +RDEPEND="${COMMON_DEPEND} !media-sound/amarok[embedded] >=virtual/jre-1.6"
42
43 -# When MY_EXTRAS is bumped, the index should be revised to exclude these.
44 -# This is often broken still
45 -#EPATCH_EXCLUDE=''
46 +MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
47
48 -DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
49 -RDEPEND="!media-sound/amarok[embedded]"
50 +PATCHES=(
51 + "${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
52 + "${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
53 + "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
54 + "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
55 +# "${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
56 + "${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
57 + "${MY_PATCH_DIR}"/30000_all_mysql-cluster-multilib-property.patch
58 +)
59 +
60 +MULTILIB_WRAPPED_HEADERS+=( /usr/include/mysql/storage/ndb/ndb_types.h )
61
62 # Please do not add a naive src_unpack to this ebuild
63 # If you want to add a single patch, copy the ebuild to an overlay
64 # and create your own mysql-extras tarball, looking at 000_index.txt
65
66 +pkg_setup() {
67 + mysql-multilib-r1_pkg_setup
68 + java-pkg_init
69 +}
70 +
71 src_prepare() {
72 - mysql-multilib_src_prepare
73 + mysql-multilib-r1_src_prepare
74 + java-utils-2_src_prepare
75 if use libressl ; then
76 sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
77 "${S}/cmake/ssl.cmake" || die
78 fi
79 }
80
81 +src_configure() {
82 + # validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
83 + # disable until we see what happens with it
84 + local MYSQL_CMAKE_NATIVE_DEFINES=(
85 + -DWITHOUT_VALIDATE_PASSWORD=1
86 + -DWITH_NUMA=$(usex numa ON OFF)
87 + -DWITH_NDBCLUSTER=1 -DWITH_PARTITION_STORAGE_ENGINE=1
88 + -DWITHOUT_PARTITION_STORAGE_ENGINE=0 )
89 + mysql-multilib-r1_src_configure
90 +}
91 +
92 +pkg_preinst() {
93 + java-utils-2_pkg_preinst
94 + mysql-multilib-r1_pkg_preinst
95 +}
96 +
97 # Official test instructions:
98 # USE='extraengine perl openssl' \
99 # FEATURES='test userpriv -usersandbox' \
100 @@ -45,6 +78,14 @@ multilib_src_test() {
101 return 0;
102 fi
103
104 + _disable_test() {
105 + local rawtestname reason
106 + rawtestname="${1}" ; shift
107 + reason="${@}"
108 + ewarn "test '${rawtestname}' disabled: '${reason}'"
109 + echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
110 + }
111 +
112 local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test"
113 local retstatus_unit
114 local retstatus_tests
115 @@ -53,7 +94,7 @@ multilib_src_test() {
116 # localhost. Also causes weird failures.
117 [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
118
119 - if ! use "minimal" ; then
120 + if use server ; then
121
122 if [[ $UID -eq 0 ]]; then
123 die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
124 @@ -61,12 +102,6 @@ multilib_src_test() {
125 has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
126
127 einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
128 - addpredict /this-dir-does-not-exist/t9.MYI
129 -
130 - # Run CTest (test-units)
131 - cmake-utils_src_test
132 - retstatus_unit=$?
133 - [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
134
135 # Ensure that parallel runs don't die
136 export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
137 @@ -78,6 +113,10 @@ multilib_src_test() {
138 # create directories because mysqladmin might right out of order
139 mkdir -p "${T}"/var-tests{,/log}
140
141 + # create symlink for the tests to find mysql_tzinfo_to_sql
142 + ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
143 +
144 + touch "${T}/disabled.def"
145 # These are failing in MySQL 5.5/5.6 for now and are believed to be
146 # false positives:
147 #
148 @@ -105,26 +144,31 @@ multilib_src_test() {
149 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
150 perfschema.binlog_edge_mix \
151 perfschema.binlog_edge_stmt \
152 + rpl.rpl_plugin_load main.mysql \
153 + main.mysql_upgrade \
154 ; do
155 - mysql-multilib_disable_test "$t" "False positives in Gentoo"
156 + _disable_test "$t" "False positives in Gentoo"
157 done
158 # ndb.ndbinfo, ndb_binlog.ndb_binlog_index: latin1/utf8
159 for t in \
160 - ndb.ndbinfo \
161 + ndb.ndbinfo ndb.ndb_tools_connect \
162 ndb_binlog.ndb_binlog_index ; do
163 - mysql-multilib_disable_test "$t" "False positives in Gentoo (NDB)"
164 + _disable_test "$t" "False positives in Gentoo (NDB) (Latin1/UTF8)"
165 done
166
167 + # Set file limits higher so tests run
168 + ulimit -n 3000
169 +
170 # Run mysql tests
171 - pushd "${TESTDIR}"
172 + pushd "${TESTDIR}" > /dev/null || die
173
174 # run mysql-test tests
175 - perl mysql-test-run.pl --force --vardir="${T}/var-tests"
176 + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
177 + --suite-timeout=5000 --reorder --skip-test-list="${T}/disabled.def" \
178 + --nounit-tests
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 + popd > /dev/null || die
185
186 # Cleanup is important for these testcases.
187 pkill -9 -f "${S}/ndb" 2>/dev/null