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/
Date: Thu, 08 Aug 2019 19:42:28
Message-Id: 1565293336.684ed130d446891ecd16927e0c2703283af52919.whissi@gentoo
1 commit: 684ed130d446891ecd16927e0c2703283af52919
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 8 19:41:49 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 8 19:42:16 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=684ed130
7
8 dev-db/mysql: bump
9
10 - Remove USE=static which is broken upstream:
11
12 CMake Error at scripts/CMakeLists.txt:395 (GET_TARGET_PROPERTY):
13 get_target_property() called with non-existent target "libmysql".
14
15 - Remove subslot because we don't install any lib anymore (USE=client-lib
16 was removed)
17
18 - Update DEPEND/RDEPEND
19
20 - Die early in pkg_setup instead of src_test
21
22 - Limit MTR_PARALLEL to 4 instead of "auto" to avoid test failures
23 because other settings like ulimit, fs.aio-max-nr must allow running
24 so many servers in parallel. User can still override.
25
26 - Disable test "auth_sec.keyring_file_data_qa" by default which won't
27 work in sandbox/with user privs.
28
29 Package-Manager: Portage-2.3.71, Repoman-2.3.17
30 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
31
32 ...8.0.17_pre1.ebuild => mysql-8.0.17_pre2.ebuild} | 135 +++++++++++----------
33 1 file changed, 70 insertions(+), 65 deletions(-)
34
35 diff --git a/dev-db/mysql/mysql-8.0.17_pre1.ebuild b/dev-db/mysql/mysql-8.0.17_pre2.ebuild
36 similarity index 92%
37 rename from dev-db/mysql/mysql-8.0.17_pre1.ebuild
38 rename to dev-db/mysql/mysql-8.0.17_pre2.ebuild
39 index a1c1a4d312e..c6e2674b422 100644
40 --- a/dev-db/mysql/mysql-8.0.17_pre1.ebuild
41 +++ b/dev-db/mysql/mysql-8.0.17_pre2.ebuild
42 @@ -6,10 +6,8 @@ MY_EXTRAS_VER="20190802-1549Z"
43
44 CMAKE_MAKEFILE_GENERATOR=emake
45
46 -# Keeping eutils in EAPI=6 for emktemp in pkg_config
47 -
48 inherit cmake-utils eutils flag-o-matic linux-info \
49 - prefix toolchain-funcs
50 + multiprocessing prefix toolchain-funcs
51
52 MY_PV="${PV//_pre*}"
53 MY_P="${PN}-${MY_PV}"
54 @@ -30,9 +28,9 @@ fi
55 HOMEPAGE="https://www.mysql.com/"
56 DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
57 LICENSE="GPL-2"
58 -SLOT="0/21"
59 -IUSE="cjk cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
60 - router selinux ssl static tcmalloc test"
61 +SLOT="0"
62 +IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
63 + router selinux ssl tcmalloc test"
64
65 # Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
66 RESTRICT="libressl? ( test )"
67 @@ -65,36 +63,32 @@ PATCHES=(
68
69 # Be warned, *DEPEND are version-dependant
70 # These are used for both runtime and compiletime
71 -COMMON_DEPEND="net-misc/curl:=
72 - >=sys-apps/sed-4
73 - >=sys-apps/texinfo-4.7-r1
74 - sys-libs/ncurses:0=
75 - dev-db/mysql-connector-c
76 - >=dev-libs/protobuf-3.8
77 +COMMON_DEPEND="
78 >=app-arch/lz4-0_p131:=
79 + dev-libs/icu:=
80 dev-libs/libedit
81 - cjk? ( app-text/mecab:= )
82 dev-libs/libevent:=
83 net-libs/libtirpc:=
84 - numa? ( sys-process/numactl )
85 >=sys-libs/zlib-1.2.3:0=
86 + cjk? ( app-text/mecab:= )
87 jemalloc? ( dev-libs/jemalloc:0= )
88 kernel_linux? (
89 dev-libs/libaio:0=
90 sys-process/procps:0=
91 )
92 - tcmalloc? ( dev-util/google-perftools:0= )
93 + numa? ( sys-process/numactl )
94 ssl? (
95 !libressl? ( >=dev-libs/openssl-1.0.0:0= )
96 libressl? ( dev-libs/libressl:0= )
97 )
98 + tcmalloc? ( dev-util/google-perftools:0= )
99 "
100 DEPEND="${COMMON_DEPEND}
101 || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
102 + dev-libs/re2
103 + >=dev-libs/protobuf-3.8
104 + net-libs/rpcsvc-proto
105 virtual/yacc
106 - dev-libs/libevent
107 - experimental? ( net-libs/rpcsvc-proto )
108 - static? ( sys-libs/ncurses[static-libs] )
109 test? (
110 acct-group/mysql acct-user/mysql
111 dev-perl/JSON
112 @@ -168,14 +162,39 @@ mysql_init_vars() {
113 export MY_DATADIR
114 }
115
116 -pkg_pretend() {
117 - if use numa ; then
118 - local CONFIG_CHECK="~NUMA"
119 +pkg_setup() {
120 + [[ ${MERGE_TYPE} == binary ]] && return
121 +
122 + if has test ${FEATURES} ; then
123 + # Bug #213475 - MySQL _will_ object strenuously if your machine is named
124 + # localhost. Also causes weird failures.
125 + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
126
127 - local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
128 - WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
129 + if ! has userpriv ${FEATURES} ; then
130 + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
131 + fi
132 +
133 + local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
134 + [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
135 + && die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
136
137 - check_extra_config
138 + if use latin1 ; then
139 + # Upstream only supports tests with default charset
140 + die "Testing with USE=latin1 is not supported."
141 + fi
142 + fi
143 +
144 + if use kernel_linux ; then
145 + if use numa ; then
146 + linux-info_get_any_version
147 +
148 + local CONFIG_CHECK="~NUMA"
149 +
150 + local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
151 + WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
152 +
153 + check_extra_config
154 + fi
155 fi
156 }
157
158 @@ -215,6 +234,7 @@ pkg_postinst() {
159
160 src_unpack() {
161 unpack ${A}
162 +
163 # Grab the patches
164 [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
165
166 @@ -235,7 +255,7 @@ src_prepare() {
167 echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
168 fi
169
170 - # man pages for client-lib tools we don't install
171 + # Remove man pages for client-lib tools we don't install
172 rm \
173 man/my_print_defaults.1 \
174 man/perror.1 \
175 @@ -345,7 +365,7 @@ src_configure(){
176
177 mycmakeargs+=(
178 -DWITH_EXTRA_CHARSETS=all
179 - -DDISABLE_SHARED=$(usex static YES NO)
180 + -DDISABLE_SHARED=NO
181 -DWITH_DEBUG=$(usex debug)
182 )
183
184 @@ -356,10 +376,6 @@ src_configure(){
185 mycmakeargs+=( -DENABLED_PROFILING=ON )
186 fi
187
188 - if use static ; then
189 - mycmakeargs+=( -DWITH_PIC=1 )
190 - fi
191 -
192 # Storage engines
193 mycmakeargs+=(
194 -DWITH_EXAMPLE_STORAGE_ENGINE=0
195 @@ -380,7 +396,7 @@ src_configure(){
196 # Official test instructions:
197 # ulimit -n 16500 && \
198 # USE='perl server' \
199 -# FEATURES='test userpriv -usersandbox' \
200 +# FEATURES='test userpriv' \
201 # ebuild mysql-X.X.XX.ebuild \
202 # digest clean package
203 src_test() {
204 @@ -397,32 +413,29 @@ src_test() {
205 local retstatus_unit
206 local retstatus_tests
207
208 - # Bug #213475 - MySQL _will_ object strenously if your machine is named
209 - # localhost. Also causes weird failures.
210 - [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
211 -
212 - if [[ $UID -eq 0 ]] ; then
213 - die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
214 - fi
215 - has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
216 -
217 - if use latin1 ; then
218 - # Upstream only supports tests with default charset
219 - die "Testing with USE=latin1 is not supported."
220 - fi
221 -
222 - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
223 -
224 # Run CTest (test-units)
225 cmake-utils_src_test
226 retstatus_unit=$?
227
228 # Ensure that parallel runs don't die
229 export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
230 - # Enable parallel testing, auto will try to detect number of cores
231 - # You may set this by hand.
232 - # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
233 - export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
234 +
235 + if [[ -z "${MTR_PARALLEL}" ]] ; then
236 + local -x MTR_PARALLEL=$(makeopts_jobs)
237 +
238 + if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
239 + # Running multiple tests in parallel usually require higher ulimit
240 + # and fs.aio-max-nr setting. In addition, tests like main.multi_update
241 + # are known to hit timeout when system is busy.
242 + # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
243 + # using "auto".
244 + local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
245 + info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
246 + einfo "${info_msg}"
247 + unset info_msg
248 + MTR_PARALLEL=4
249 + fi
250 + fi
251
252 # create directories because mysqladmin might run out of order
253 mkdir -p "${T}"/var-tests{,/log} || die
254 @@ -433,6 +446,7 @@ src_test() {
255 touch "${T}/disabled.def"
256
257 local -a disabled_tests
258 + disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges")
259 disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)")
260 disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)")
261 disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)")
262 @@ -443,16 +457,16 @@ src_test() {
263 disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)")
264 disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)")
265 disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)")
266 + disabled_tests+=( "main.mysqlslap;1253001;Known failure - no upstream bug yet (RH)" )
267 disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet")
268 disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet")
269 - disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
270 - disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
271 - disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Know failure - no upstream bug yet" )
272 - disabled_tests+=( "x.connection;0;Know failure - no upstream bug yet" )
273 - disabled_tests+=( "main.mysqlslap;1253001;Known failure - no upstream bug yet (RH)" )
274 disabled_tests+=( "perfschema.idx_threads;0;Know failure - no upstream bug yet" )
275 disabled_tests+=( "perfschema.idx_session_connect_attrs;0;Know failure - no upstream bug yet" )
276 disabled_tests+=( "perfschema.idx_session_account_connect_attrs;0;Know failure - no upstream bug yet" )
277 + disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
278 + disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Know failure - no upstream bug yet" )
279 + disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
280 + disabled_tests+=( "x.connection;0;Know failure - no upstream bug yet" )
281
282 local test_ds
283 for test_infos_str in "${disabled_tests[@]}" ; do
284 @@ -487,15 +501,6 @@ src_test() {
285 einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
286 fi
287
288 - local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
289 - if [[ ${aio_max_nr} -lt 250000 ]] ; then
290 - if ! sysctl -w fs.aio-max-nr=250000 2>&1 ; then
291 - ewarn "Failed to rais fs.aio-max-nr to >=250000! Expect test failures ..."
292 - else
293 - einfo "fs.aio-max-nr raised to 250000!"
294 - fi
295 - fi
296 -
297 # run mysql-test tests
298 perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
299 retstatus_tests=$?