Сравнение mysql-8.0.31-r2 с mysql-8.0.32-r2

/usr/portage/dev-db/mysql/mysql-8.0.32-r2.ebuild 2023-10-09 14:52:29.324368346 +0300
4 4
EAPI=8
5 5

  
6 6
CMAKE_MAKEFILE_GENERATOR=emake
7
inherit check-reqs cmake flag-o-matic linux-info multiprocessing prefix toolchain-funcs
7
inherit check-reqs cmake edo flag-o-matic linux-info multiprocessing prefix toolchain-funcs
8 8

  
9 9
MY_PV="${PV//_pre*}"
10 10
MY_P="${PN}-${MY_PV}"
11 11

  
12 12
# Patch version
13
PATCH_SET=( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patches-01.tar.xz )
13
PATCH_SET=( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-8.0.31-patches-01.tar.xz )
14 14

  
15 15
HOMEPAGE="https://www.mysql.com/"
16 16
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
......
39 39
# Be warned, *DEPEND are version-dependent
40 40
# These are used for both runtime and compiletime
41 41
COMMON_DEPEND="
42
	>=app-arch/lz4-0_p131:=
42
	>=app-arch/lz4-1.9.4:=
43 43
	app-arch/zstd:=
44
	sys-libs/ncurses:0=
45
	>=sys-libs/zlib-1.2.3:0=
46
	>=dev-libs/openssl-1.0.0:0=
44
	>=dev-libs/openssl-1.0.0:=
45
	sys-libs/ncurses:=
46
	>=sys-libs/zlib-1.2.13:=
47 47
	server? (
48 48
		dev-libs/icu:=
49 49
		dev-libs/libevent:=[ssl,threads(+)]
50 50
		>=dev-libs/protobuf-3.8:=
51 51
		net-libs/libtirpc:=
52 52
		cjk? ( app-text/mecab:= )
53
		jemalloc? ( dev-libs/jemalloc:0= )
53
		jemalloc? ( dev-libs/jemalloc:= )
54 54
		kernel_linux? (
55
			dev-libs/libaio:0=
56
			sys-process/procps:0=
55
			dev-libs/libaio:=
56
			sys-process/procps:=
57 57
		)
58 58
		numa? ( sys-process/numactl )
59
		tcmalloc? ( dev-util/google-perftools:0= )
59
		tcmalloc? ( dev-util/google-perftools:= )
60 60
	)
61 61
"
62

  
63 62
DEPEND="
64 63
	${COMMON_DEPEND}
65
	|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
66 64
	app-alternatives/yacc
67 65
	server? ( net-libs/rpcsvc-proto )
68 66
	test? (
......
70 68
		dev-perl/JSON
71 69
	)
72 70
"
73

  
74 71
RDEPEND="
75 72
	${COMMON_DEPEND}
76
	!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
73
	!dev-db/mariadb
74
	!dev-db/mariadb-galera
75
	!dev-db/percona-server
76
	!dev-db/mysql-cluster
77 77
	!dev-db/mysql:0
78 78
	!dev-db/mysql:5.7
79 79
	selinux? ( sec-policy/selinux-mysql )
......
82 82
		dev-db/mysql-init-scripts
83 83
	)
84 84
"
85

  
86 85
# For other stuff to bring us in
87 86
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
88 87
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
89 88

  
90 89
PATCHES=(
91 90
	"${WORKDIR}"/mysql-patches
92
	"${FILESDIR}"/mysql-8.0.31-build-tmpdir-nodefault.patch
91
	"${FILESDIR}"/${PN}-8.0.32-gcc13.patch
93 92
)
94 93

  
95 94
mysql_init_vars() {
......
109 108
		if use server ; then
110 109
			CHECKREQS_DISK_BUILD="3G"
111 110

  
112
			if has test $FEATURES ; then
111
			if has test ${FEATURES} ; then
113 112
				CHECKREQS_DISK_BUILD="9G"
114 113
			fi
115 114

  
......
134 133
			fi
135 134

  
136 135
			local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
137
			[[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
138
				&& die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
136
			if [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] ; then
137
				die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
138
			fi
139 139

  
140 140
			if use latin1 ; then
141 141
				# Upstream only supports tests with default charset
......
143 143
			fi
144 144
		fi
145 145

  
146
		if use kernel_linux ; then
147
			if use numa ; then
148
				linux-info_get_any_version
146
		if use kernel_linux && use numa ; then
147
			linux-info_get_any_version
149 148

  
150
				local CONFIG_CHECK="~NUMA"
149
			local CONFIG_CHECK="~NUMA"
151 150

  
152
				local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
153
				WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
151
			local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
152
			WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
154 153

  
155
				check_extra_config
156
			fi
154
			check_extra_config
157 155
		fi
158 156

  
159 157
		use server && check-reqs_pkg_setup
......
194 192
	# Code is now requiring C++17 due to https://github.com/mysql/mysql-server/commit/236ab55bedd8c9eacd80766d85edde2a8afacd08
195 193
	append-cxxflags -std=c++17
196 194

  
197
	CMAKE_BUILD_TYPE="RelWithDebInfo"
195
	# Broken with FORTIFY_SOURCE=3
196
	# Our toolchain sets F_S=2 by default w/ >= -O2, so we need
197
	# to unset F_S first, then explicitly set 2, to negate any default
198
	# and anything set by the user if they're choosing 3 (or if they've
199
	# modified GCC to set 3).
200
	#
201
	# bug #891259
202
	if tc-enables-fortify-source ; then
203
		filter-flags -D_FORTIFY_SOURCE=3
204
		append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
205
	fi
198 206

  
199 207
	# debug hack wrt #497532
200 208
	local mycmakeargs=(
......
334 342
}
335 343

  
336 344
# Official test instructions:
337
# ulimit -n 16500 && \
338
# USE='perl server' \
339
# FEATURES='test userpriv' \
340
# ebuild mysql-X.X.XX.ebuild \
341
# digest clean package
345
# ulimit -n 16500 && USE='perl server' FEATURES='test userpriv' \
346
# ebuild mysql-X.X.XX.ebuild digest clean test install
342 347
src_test() {
343 348
	_disable_test() {
344 349
		local rawtestname bug reason
345 350
		rawtestname="${1}" ; shift
346 351
		bug="${1}" ; shift
347 352
		reason="${@}"
353

  
348 354
		ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
349
		echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
355
		echo "${rawtestname} : BUG#${bug} ${reason}" >> "${T}/disabled.def"
350 356
	}
351 357

  
352 358
	local TESTDIR="${BUILD_DIR}/mysql-test"
353 359
	local retstatus_tests
354 360

  
361
	einfo "Official test instructions:"
362
	einfo "ulimit -n 16500 && USE='perl server' FEATURES='test userpriv' ebuild ..."
363

  
355 364
	if ! use server ; then
356
		einfo "Skipping server tests due to minimal build."
365
		ewarn "Skipping server tests due to minimal build!"
357 366
		return 0
358 367
	fi
359 368

  
......
365 374

  
366 375
		if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
367 376
			# Running multiple tests in parallel usually require higher ulimit
368
			# and fs.aio-max-nr setting. In addition, tests like main.multi_update
369
			# are known to hit timeout when system is busy.
377
			# and fs.aio-max-nr settings. In addition, tests like main.multi_update
378
			# are known to hit timeouts when the system is busy.
379
			#
370 380
			# To avoid test failure we will limit MTR_PARALLEL to 4 instead of
371 381
			# using "auto".
372
			local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
373
			info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
374
			einfo "${info_msg}"
375
			unset info_msg
382
			einfo "Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
383
			einfo "to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
376 384
			MTR_PARALLEL=4
377 385
		fi
378 386
	else
379 387
		einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
380 388
	fi
381 389

  
382
	# create directories because mysqladmin might run out of order
390
	# Create directories because mysqladmin might run out of order
383 391
	mkdir -p "${T}"/var-tests{,/log} || die
384 392

  
385 393
	# Run mysql tests
386 394
	pushd "${TESTDIR}" &>/dev/null || die
387 395

  
388
	touch "${T}/disabled.def"
396
	touch "${T}/disabled.def" || die
389 397

  
390
	local -a disabled_tests
391
	disabled_tests+=( "auth_sec.atomic_rename_user;103512;Depends on user running test" )
392
	disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
393
	disabled_tests+=( "auth_sec.openssl_without_fips;94718;Known test failure" )
394
	disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
395
	disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
396
	disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
397
	disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
398
	disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
399
	disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
400
	disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
401
	disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
402
	disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
403
	disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
404
	disabled_tests+=( "gis.st_symdifference;5452;Known rounding error with latest AMD processors (PS)" )
405
	disabled_tests+=( "innodb.alter_kill;0;Known test failure -- no upstream bug yet" )
406
	disabled_tests+=( "main.derived_limit;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
407
	disabled_tests+=( "main.explain_tree;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
408
	disabled_tests+=( "main.gis-precise;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
409
	disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure -- no upstream bug yet" )
410
	disabled_tests+=( "main.select_icp_mrr;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
411
	disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
412
	disabled_tests+=( "main.subquery_sj_dupsweed;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
413
	disabled_tests+=( "main.subquery_sj_dupsweed_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
414
	disabled_tests+=( "main.subquery_sj_dupsweed_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
415
	disabled_tests+=( "main.subquery_sj_firstmatch;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
416
	disabled_tests+=( "main.subquery_sj_firstmatch_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
417
	disabled_tests+=( "main.subquery_sj_firstmatch_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
418
	disabled_tests+=( "main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
419
	disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
420
	disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
421
	disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
422
	disabled_tests+=( "perfschema.statement_digest_query_sample;0;Test will fail on slow hardware")
423
	disabled_tests+=( "rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch;0;Unstable test" )
424
	disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
425
	disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
426
	disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
427
	disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
428
	disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
429
	disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
398
	local -a disabled_tests=(
399
		"auth_sec.atomic_rename_user;103512;Depends on user running test"
400
		"auth_sec.keyring_file_data_qa;0;Won't work with user privileges"
401
		"auth_sec.openssl_without_fips;94718;Known test failure"
402

  
403
		"gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)"
404
		"gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)"
405
		"gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)"
406
		"gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)"
407
		"gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)"
408
		"gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)"
409
		"gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)"
410
		"gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)"
411
		"gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)"
412
		"gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)"
413
		"gis.st_symdifference;5452;Known rounding error with latest AMD processors (PS)"
414

  
415
		"innodb.alter_kill;0;Known test failure -- no upstream bug yet"
416

  
417
		"main.derived_limit;0;Known rounding error with latest AMD processors -- no upstream bug yet"
418
		"main.explain_tree;0;Known rounding error with latest AMD processors -- no upstream bug yet"
419
		"main.gis-precise;0;Known rounding error with latest AMD processors -- no upstream bug yet"
420
		"main.mysql_load_data_local_dir;0;Known test failure -- no upstream bug yet"
421
		"main.select_icp_mrr;0;Known rounding error with latest AMD processors -- no upstream bug yet"
422
		"main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet"
423
		"main.subquery_sj_dupsweed;0;Known rounding error with latest AMD processors -- no upstream bug yet"
424
		"main.subquery_sj_dupsweed_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet"
425
		"main.subquery_sj_dupsweed_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
426
		"main.subquery_sj_firstmatch;0;Known rounding error with latest AMD processors -- no upstream bug yet"
427
		"main.subquery_sj_firstmatch_bka;0;Known rounding error with latest AMD processors -- no upstream bug yet"
428
		"main.subquery_sj_firstmatch_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
429
		"main.subquery_sj_mat_bka_nobnl;0;Known rounding error with latest AMD processors -- no upstream bug yet"
430
		"main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet"
431
		"main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet"
432
		"main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet"
433
		"perfschema.statement_digest_query_sample;0;Test will fail on slow hardware"
434

  
435
		"rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch;0;Unstable test"
436
		"rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure"
437
		"rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet"
438

  
439
		"sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware"
440

  
441
		"x.connection;0;Known failure - no upstream bug yet"
442
		"x.message_compressed_payload;0;False positive caused by protobuff-3.11+"
443
		"x.message_protobuf_nested;0;False positive caused by protobuff-3.11+"
444
	)
430 445

  
431 446
	if ! hash zip 1>/dev/null 2>&1 ; then
432
		# no need to force dep app-arch/zip for one test
433
		disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
434
		disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
447
		# No need to force dep app-arch/zip for one test
448
		disabled_tests+=(
449
			"innodb.discarded_partition_create;0;Requires app-arch/zip"
450
			"innodb.partition_upgrade_create;0;Requires app-arch/zip"
451
		)
435 452
	fi
436 453

  
437 454
	if has_version ">=dev-libs/openssl-3" ; then
438 455
		# >=dev-libs/openssl-3 defaults to security level 1 which disallow
439 456
		# TLSv1/1.1 but tests will require TLSv1/1.1.
440 457
		einfo "Set OpenSSL configuration for test suite ..."
458

  
441 459
		cat > "${T}/openssl_tlsv1.cnf" <<- EOF || die
442 460
		openssl_conf = default_conf
443 461

  
......
498 516
	# Try to increase file limits to increase test coverage
499 517
	if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
500 518
		# Upper limit comes from parts.partition_* tests
501
		ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
519
		ewarn "For maximum test coverage, please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
502 520

  
503 521
		if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
504 522
			# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
505 523
			ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
506 524

  
507 525
			if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
508
				ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
526
				ewarn "For minimum test coverage, please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
509 527
			else
510 528
				einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
511 529
			fi
......
517 535
	fi
518 536

  
519 537
	# run mysql-test tests
520
	perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
538
	nonfatal edo perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
521 539
	retstatus_tests=$?
522 540

  
523 541
	popd &>/dev/null || die
......
536 554
src_install() {
537 555
	cmake_src_install
538 556

  
557
	# Not a GNU info file, more like a tiny README.
558
	rm "${ED}"/usr/share/info/mysql.info || die
559

  
539 560
	# Make sure the vars are correctly initialized
540 561
	mysql_init_vars
541 562

  
Спасибо!