Compare commits
No commits in common. "imports/c9-beta/mysql-8.0.22-7.el9" and "c8-stream-8.0" have entirely different histories.
imports/c9
...
c8-stream-
|
@ -1 +1 @@
|
|||
SOURCES/mysql-boost-8.0.22.tar.gz
|
||||
SOURCES/mysql-boost-8.0.36.tar.gz
|
||||
|
|
|
@ -1 +1 @@
|
|||
0bf6f95fa5cf925e9cee1edab765c694cb7571bd SOURCES/mysql-boost-8.0.22.tar.gz
|
||||
fdbf5b1b37a5d882643695593ca25d0a75eb69ed SOURCES/mysql-boost-8.0.36.tar.gz
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
From d1343f28dcbe25b100b082b34775bd92ead4602c Mon Sep 17 00:00:00 2001
|
||||
From: jzmaddock <john@johnmaddock.co.uk>
|
||||
Date: Tue, 25 Jan 2022 09:27:40 +0000
|
||||
Subject: [PATCH] Update gcc Intel intrinsic usage config. Fixes
|
||||
https://github.com/boostorg/multiprecision/issues/419.
|
||||
|
||||
---
|
||||
include/boost/multiprecision/cpp_int/intel_intrinsics.hpp | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp b/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp
|
||||
index eb4624bb4..37717cd51 100644
|
||||
--- a/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp
|
||||
+++ b/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp
|
||||
@@ -19,7 +19,11 @@
|
||||
// If this is GCC/clang, then check that the actual intrinsic exists:
|
||||
//
|
||||
#if defined(__has_builtin) && defined(__GNUC__)
|
||||
-#if !__has_builtin(__builtin_ia32_addcarryx_u64) && defined(BOOST_MP_HAS_IMMINTRIN_H) && !(defined(BOOST_GCC) && (__GNUC__ >= 9))
|
||||
+#if !__has_builtin(__builtin_ia32_addcarryx_u64) && defined(BOOST_MP_HAS_IMMINTRIN_H) \
|
||||
+ && !(defined(BOOST_GCC) && (__GNUC__ >= 9) \
|
||||
+ && (defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64)\
|
||||
+ || defined(i386) || defined(__i386) || defined(__i386__) || defined(_M_AMD64) \
|
||||
+ || defined(_M_X64) || defined(__amd64__) || defined(_M_X64)))
|
||||
#undef BOOST_MP_HAS_IMMINTRIN_H
|
||||
#endif
|
||||
#elif defined(BOOST_MP_HAS_IMMINTRIN_H) && defined(__GNUC__) && !(defined(BOOST_GCC) && (__GNUC__ >= 9))
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This helper script is necessary for having proper SELinux context of daemon
|
||||
# process run in SCL environment via systemd unit file.
|
||||
# Without this script the process looses SELinux type because /usr/bin/scl
|
||||
# has context bin_t and unit_t -> bin_t results in unconfined process running.
|
||||
# If this helper script has the same SELinux context as the original binary,
|
||||
# the process will have proper SELinux context.
|
||||
#
|
||||
# This script was designed to be usable the same as the scl command is used,
|
||||
# including the collections given as more arguments, separated from binary
|
||||
# itself by -- separator.
|
||||
# So it is possible to use the list of collections to be enabled via
|
||||
# environment file.
|
||||
# Thus, instead of:
|
||||
# /usr/bin/scl enable scl1 scl2 -- /path/to/bin arg1 arg2
|
||||
# you can use:
|
||||
# /usr/bin/this-script enable scl1 scl2 -- /path/to/bin arg1 arg2
|
||||
#
|
||||
# Notice: do not forget to set proper SELinux context for this file.
|
||||
# The context should be the same as the binary running has.
|
||||
#
|
||||
# More information at http://bugzilla.redhat.com/show_bug.cgi?id=1172683
|
||||
|
||||
action="$1"
|
||||
shift
|
||||
|
||||
while [ -n "$1" ] && [ "$1" != "--" ] ; do
|
||||
source scl_source "$action" "$1"
|
||||
shift
|
||||
done
|
||||
|
||||
if [ $# -le 2 ] ; then
|
||||
echo "Usage `basename $0` enable sclname [sclname ...] -- /path/to/bin [arg ...]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
shift
|
||||
|
||||
exec "$@"
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
#
|
||||
# MySQL 8.0.4 introduced 'caching_sha2_password' as its default authentication plugin.
|
||||
# It is faster and provides better security then the previous default authentication plugin.
|
||||
#
|
||||
# Until now (09/2018), it does not work with some other software (eg. MariaDB client, MariaDB connectors, ...)
|
||||
#
|
||||
# This configuration file changes MySQL default server configuration, so it behaves the same way as in MySQL 5.7.
|
||||
#
|
||||
# To change the behaviour back to the upstream default, comment out the following lines:
|
||||
|
||||
[mysqld]
|
||||
default_authentication_plugin=mysql_native_password
|
|
@ -0,0 +1,48 @@
|
|||
# Filtered out until upstream fixes them
|
||||
# Upstream bug: http://bugs.mysql.com/68518
|
||||
addFilter("incorrect-fsf-address")
|
||||
|
||||
# Done to avoid _prefix/lib64/tmpfiles.d
|
||||
addFilter("E: hardcoded-library-path in %\{_prefix\}/lib/tmpfiles.d")
|
||||
|
||||
# Keeping the old summary for now
|
||||
addFilter("W: name-repeated-in-summary C MySQL")
|
||||
|
||||
# Spellchecked
|
||||
addFilter("W: spelling-error %description -l en_US multi -> mulch, mufti")
|
||||
addFilter("W: spelling-error %description -l en_US benchmarking -> bench marking, bench-marking, benchmark")
|
||||
addFilter("W: spelling-error Summary(en_US) embeddable -> embedded")
|
||||
addFilter("W: spelling-error.*embeddable -> embedded")
|
||||
|
||||
# As long as the manual is part of the original tarball, we have do to
|
||||
# this
|
||||
addFilter("mysql.src: W: invalid-url Source0: mysql-5.6.[0-9]+-nodocs.tar.gz")
|
||||
|
||||
# Leave the logfile where it is for now
|
||||
addFilter("E: non-root-user-log-file /var/log/mysqld.log mysql")
|
||||
addFilter("E: non-root-group-log-file /var/log/mysqld.log mysql")
|
||||
addFilter("E: non-ghost-file /var/log/mysqld.log")
|
||||
addFilter("E: zero-length /var/log/mysqld.log")
|
||||
|
||||
addFilter("E: incoherent-logrotate-file /etc/logrotate.d/mysqld")
|
||||
|
||||
# Hidden files and zero lenght files is normal for some tests
|
||||
addFilter("W: hidden-file-or-dir /usr/share/mysql-test/std_data/.mylogin.cnf")
|
||||
addFilter("E: zero-length /usr/share/mysql-test/suite/parts/t/disabled.def")
|
||||
addFilter("E: zero-length /usr/share/mysql-test/std_data/bug37631.MYD")
|
||||
addFilter("E: zero-length /usr/share/mysql-test/std_data/cluster_7022_table.MYD")
|
||||
addFilter("E: zero-length /usr/share/mysql-test/collections/disabled-weekly.list")
|
||||
addFilter("E: zero-length /usr/share/mysql-test/collections/disabled-daily.list")
|
||||
|
||||
# debuginfo bug?
|
||||
addFilter("E: non-standard-dir-perm /usr/src/debug/tmp 01777")
|
||||
|
||||
# mysql-config *script* in lib
|
||||
addFilter("W: only-non-binary-in-usr-lib")
|
||||
|
||||
# missing
|
||||
addFilter("W: no-manual-page-for-binary my_safe_process")
|
||||
|
||||
# cluster is gone
|
||||
addFilter("W: obsolete-not-provided mysql-cluster")
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
--- mysql-8.0.22/mysql-test/include/mtr_warnings.sql.old 2020-10-21 11:25:49.779775116 +0200
|
||||
+++ mysql-8.0.22/mysql-test/include/mtr_warnings.sql 2020-10-21 11:26:29.507185307 +0200
|
||||
@@ -299,6 +299,11 @@
|
||||
("NOTIFY_SOCKET not set in environment. sd_notify messages will not be sent!"),
|
||||
("Invalid systemd notify socket, cannot send: "),
|
||||
diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql
|
||||
index 78b09285..b7153445 100644
|
||||
--- a/mysql-test/include/mtr_warnings.sql
|
||||
+++ b/mysql-test/include/mtr_warnings.sql
|
||||
@@ -376,6 +376,11 @@ INSERT INTO global_suppressions VALUES
|
||||
|
||||
("'mysql_native_password' is deprecated and will be removed in a future release."),
|
||||
|
||||
+ /*
|
||||
+ ARM32 don't support timers and get this warning in every test.
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
diff -ur mysql-8.0.35.orig/plugin/innodb_memcached/daemon_memcached/daemon/memcached.c mysql-8.0.35/plugin/innodb_memcached/daemon_memcached/daemon/memcached.c
|
||||
--- mysql-8.0.35.orig/plugin/innodb_memcached/daemon_memcached/daemon/memcached.c 2023-10-12 13:45:01.000000000 +0200
|
||||
+++ mysql-8.0.35/plugin/innodb_memcached/daemon_memcached/daemon/memcached.c 2023-12-19 10:48:46.718006624 +0100
|
||||
@@ -4070,7 +4070,7 @@
|
||||
do {
|
||||
while(key_token->length != 0) {
|
||||
/* whether there are more keys to fetch */
|
||||
- bool next_get = (key_token + 1)->value;
|
||||
+ bool next_get = (key_token + 1)->value != NULL;
|
||||
|
||||
key = key_token->value;
|
||||
nkey = key_token->length;
|
|
@ -1,24 +0,0 @@
|
|||
Fix things so that chains of certificates work in the server and client
|
||||
certificate files.
|
||||
|
||||
This only really works for OpenSSL-based builds, as yassl is unable to read
|
||||
multiple certificates from a file. The patch below to yassl/src/ssl.cpp
|
||||
doesn't fix that, but just arranges that the viosslfactories.c patch won't
|
||||
have any ill effects in a yassl build. Since we don't use yassl in Red Hat/
|
||||
Fedora builds, I'm not feeling motivated to try to fix yassl for this.
|
||||
|
||||
See RH bug #598656. Filed upstream at http://bugs.mysql.com/bug.php?id=54158
|
||||
|
||||
diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
|
||||
index 5e881e3..2927e7f 100644
|
||||
--- a/vio/viosslfactories.cc
|
||||
+++ b/vio/viosslfactories.cc
|
||||
@@ -198,7 +198,7 @@ static int vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file,
|
||||
if (!key_file && cert_file) key_file = cert_file;
|
||||
|
||||
if (cert_file &&
|
||||
- SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0) {
|
||||
+ SSL_CTX_use_certificate_chain_file(ctx, cert_file) <= 0) {
|
||||
*error = SSL_INITERR_CERT;
|
||||
DBUG_PRINT("error",
|
||||
("%s from file '%s'", sslGetErrString(*error), cert_file));
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
|
||||
source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common"
|
||||
|
||||
upgrade_info_file="$datadir/mysql_upgrade_info"
|
||||
version=0
|
||||
# get version as integer from mysql_upgrade_info file
|
||||
if [ -f "$upgrade_info_file" ] && [ -r "$upgrade_info_file" ] ; then
|
||||
version_major=$(cat "$upgrade_info_file" | head -n 1 | sed -e 's/\([0-9]*\)\.\([0-9]*\)\..*$/\1/')
|
||||
version_minor=$(cat "$upgrade_info_file" | head -n 1 | sed -e 's/\([0-9]*\)\.\([0-9]*\)\..*$/\2/')
|
||||
if [[ $version_major =~ ^[0-9]+$ ]] && [[ $version_minor =~ ^[0-9]+$ ]] ; then
|
||||
version=$((version_major*100+version_minor))
|
||||
fi
|
||||
fi
|
||||
|
||||
# compute current version as integer
|
||||
thisversion=$((@MAJOR_VERSION@*100+@MINOR_VERSION@))
|
||||
|
||||
# provide warning in cases we should run mysql_upgrade
|
||||
if [ $version -ne $thisversion ] ; then
|
||||
|
||||
# give extra warning if some version seems to be skipped
|
||||
if [ $version -gt 0 ] && [ $version -lt 505 ] ; then
|
||||
echo "The datadir located at $datadir seems to be older than of a version 5.5. Please, mind that as a general rule, to upgrade from one release series to another, go to the next series rather than skipping a series." >&2
|
||||
fi
|
||||
|
||||
cat <<EOF >&2
|
||||
The datadir located at $datadir needs to be upgraded using 'mysql_upgrade' tool. This can be done using the following steps:
|
||||
|
||||
1. Back-up your data before with 'mysql_upgrade'
|
||||
2. Start the database daemon using 'service @DAEMON_NAME@ start'
|
||||
3. Run 'mysql_upgrade' with a database user that has sufficient privileges
|
||||
|
||||
Read more about 'mysql_upgrade' usage at:
|
||||
http://dev.mysql.com/doc/refman/5.6/en/mysql-upgrade.html
|
||||
EOF
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -1,25 +0,0 @@
|
|||
index a826a081..00000000
|
||||
diff --git a/include/mysql/components/services/page_track_service.h b/include/mysql/components/services/page_track_service.h
|
||||
index 103b5135..e6b3ba6f 100644
|
||||
--- a/include/mysql/components/services/page_track_service.h
|
||||
+++ b/include/mysql/components/services/page_track_service.h
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include <mysql/components/service.h>
|
||||
#include <functional>
|
||||
+#include <cstddef>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
diff --git a/sql-common/sql_string.cc b/sql-common/sql_string.cc
|
||||
index 40435729..8b6ee827 100644
|
||||
--- a/sql-common/sql_string.cc
|
||||
+++ b/sql-common/sql_string.cc
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "sql_string.h"
|
||||
|
||||
#include <algorithm>
|
||||
+#include <limits>
|
||||
|
||||
#include "my_dbug.h"
|
||||
#include "my_macros.h"
|
|
@ -0,0 +1,11 @@
|
|||
--- mysql-8.0.11/support-files/mysql-log-rotate.in.old 2018-09-13 18:43:03.595891364 +0200
|
||||
+++ mysql-8.0.11/support-files/mysql-log-rotate.in 2018-09-13 18:43:36.774236649 +0200
|
||||
@@ -41,7 +41,7 @@
|
||||
# ATTENTION: The /root/.my.cnf file should be readable
|
||||
# _ONLY_ by root !
|
||||
|
||||
-@localstatedir@/mysqld.log {
|
||||
+@LOG_LOCATION@ {
|
||||
# create 600 mysql mysql
|
||||
notifempty
|
||||
daily
|
|
@ -0,0 +1,104 @@
|
|||
Avoid errors like:
|
||||
|
||||
| Path length (109) is longer than maximum supported length (108) and will be truncated at /usr/lib64/perl5/vendor_perl/Socket.pm line 880, <GEN16094> line 1.
|
||||
| worker[2] mysql-test-run: *** ERROR: Socket path '/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.s390x/usr/share/mysql-test/var/tmp/2' too long,
|
||||
| it would be truncated and thus not possible to use for connection to MySQL Server. Set a shorter with --tmpdir=<path> option
|
||||
|
||||
===
|
||||
|
||||
On Fedora 32:
|
||||
|
||||
| $ grep -e "PATH" /usr/include/linux/limits.h
|
||||
| #define PATH_MAX 4096 /* # chars in a path name including nul */
|
||||
|
||||
===
|
||||
|
||||
Thus setting the maximum path length on Fedora to 108 characters is just too short.
|
||||
|
||||
BTW on the modern filesystems you can easily create path longer than PATH_MAX.
|
||||
The PATH_MAX constant is unsafe.
|
||||
Interesting article: https://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
|
||||
|
||||
===
|
||||
|
||||
The question is why haven't I encountered this issue until recently ?
|
||||
|
||||
After the recent tweaks to the testsuite (between 8.0.24 and 8.0.25 release), the generated --tmpdir path changed from
|
||||
| --tmpdir=/builddir/build/BUILD/mysql-8.0.24/x86_64-redhat-linux-gnu/mysql-test/var/tmp/
|
||||
to
|
||||
| --tmpdir=/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/tmp/
|
||||
|
||||
===
|
||||
|
||||
The whole setup changed as follows:
|
||||
BEFORE:
|
||||
|
||||
| Installing system database
|
||||
| ### safe_path: /builddir/build/BUILD/mysql-8.0.24/x86_64-redhat-linux-gnu/runtime_output_directory///mysqltest_safe_process --verbose -- /builddir/build/BUILD/mysql-8.0.24/x86_64-redhat-linux-gnu/runtime_output_directory/mysqld --no-defaults --initialize-insecure --loose-skip-ndbcluster --tmpdir=/builddir/build/BUILD/mysql-8.0.24/x86_64-redhat-linux-gnu/mysql-test/var/tmp/ --core-file --datadir=/builddir/build/BUILD/mysql-8.0.24/x86_64-redhat-linux-gnu/mysql-test/var/data/ --secure-file-priv=/builddir/build/BUILD/mysql-8.0.24/x86_64-redhat-linux-gnu/mysql-test/var --innodb_buffer_pool_size=24M --innodb-log-file-size=5M --innodb_autoextend_increment=8 --character-sets-dir=/builddir/build/BUILD/mysql-8.0.24/share/charsets --loose-auto_generate_certs=OFF --loose-sha256_password_auto_generate_rsa_keys=OFF --loose-caching_sha2_password_auto_generate_rsa_keys=OFF --init-file=/builddir/build/BUILD/mysql-8.0.24/x86_64-redhat-linux-gnu/mysql-test/var/tmp/bootstrap.sql
|
||||
|
||||
AFTER:
|
||||
|
||||
| Installing system database
|
||||
| ### safe_path: /builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/bin//mysqltest_safe_process --verbose -- /builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/libexec/mysqld --no-defaults --initialize-insecure --loose-skip-ndbcluster --tmpdir=/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/tmp/ --core-file --datadir=/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/data/ --secure-file-priv=/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var --innodb_buffer_pool_size=24M --innodb-log-file-size=5M --innodb_autoextend_increment=8 --character-sets-dir=/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/community-mysql/charsets --loose-auto_generate_certs=OFF --loose-sha256_password_auto_generate_rsa_keys=OFF --loose-caching_sha2_password_auto_generate_rsa_keys=OFF --init-file=/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/tmp/bootstrap.sql
|
||||
|
||||
===
|
||||
|
||||
The likely cause is the added
|
||||
|
||||
| cd %{buildroot}%{_datadir}/mysql-test
|
||||
|
||||
which was not originally present in the SPECfile.
|
||||
|
||||
However the MariaDB implementation does not have this issue, even though it has the same SPECfile %check phase code.
|
||||
|
||||
|
||||
===
|
||||
|
||||
In the extended log, you can see '/tmp/XfTFAis2Jl' being created and deleted short after.
|
||||
Even though the script warns about the path length, tries to workaround it; it destroyes that workaround short after and use the too-long path instead.
|
||||
|
||||
I'm not sure whether the output is synchronous, but even if it wasn'tit still looks weird.
|
||||
|
||||
| + cd /builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test
|
||||
| Logging: ./mysql-test-run.pl --verbose --parallel=auto --force --retry=2 --suite-timeout=900 --testcase-timeout=30 --mysqld=--binlog-format=mixed --max-test-fail=5 --report-unstable-tests --clean-vardir --suite=main --mem --skip-test-list=platform-specific-tests.list
|
||||
| Path length (109) is longer than maximum supported length (108) and will be truncated at /usr/lib64/perl5/vendor_perl/Socket.pm line 880.
|
||||
| Too long tmpdir path '/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/tmp' creating a shorter one
|
||||
| - Using tmpdir: '/tmp/XfTFAis2Jl'
|
||||
| > Collecting: main
|
||||
| > testdir: /builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/t
|
||||
| > resdir: /builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/r
|
||||
| > Collecting: i_main
|
||||
| Removing old var directory
|
||||
| > opt_vardir: /builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var
|
||||
| > Removing /builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var/
|
||||
| > Removing /dev/shm/var_933_jfTb
|
||||
| > Removing /tmp/XfTFAis2Jl/
|
||||
| Creating var directory '/builddir/build/BUILDROOT/community-mysql-8.0.24-1.fc35.x86_64/usr/share/mysql-test/var'
|
||||
| > Creating /dev/shm/var_933_jfTb
|
||||
| - symlinking 'var' to '/dev/shm/var_933_jfTb'
|
||||
|
||||
|
||||
|
||||
|
||||
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
|
||||
index 26e6c92c..9d85c6d6 100755
|
||||
--- a/mysql-test/mysql-test-run.pl
|
||||
+++ b/mysql-test/mysql-test-run.pl
|
||||
@@ -3533,17 +3533,6 @@ sub setup_vardir() {
|
||||
mkpath("$opt_vardir/tmp");
|
||||
mkpath($opt_tmpdir) if ($opt_tmpdir ne "$opt_vardir/tmp");
|
||||
|
||||
- # On some operating systems, there is a limit to the length of a
|
||||
- # UNIX domain socket's path far below PATH_MAX. Don't allow that
|
||||
- # to happen.
|
||||
- my $res =
|
||||
- check_socket_path_length("$opt_tmpdir/mysqld.NN.sock", $opt_parallel);
|
||||
- if ($res) {
|
||||
- mtr_error("Socket path '$opt_tmpdir' too long, it would be ",
|
||||
- "truncated and thus not possible to use for connection to ",
|
||||
- "MySQL Server. Set a shorter with --tmpdir=<path> option");
|
||||
- }
|
||||
-
|
||||
# Copy all files from std_data into var/std_data
|
||||
# and make them world readable
|
||||
copytree("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data", "0022")
|
|
@ -1,206 +0,0 @@
|
|||
Make MySQL compile with openssl 3.x without FIPS properly implemented
|
||||
|
||||
This change takes some pieces from MariaDB, including compat_ssl.h and
|
||||
changes in my_md5.cc.
|
||||
|
||||
MySQL utilizes FIPS_mode() and FIPS_mode_set() functions that are not
|
||||
available in OpenSSL 3.x any more. This patch only mocks the call of
|
||||
those functions, returning 0 every time, which effectively makes usage
|
||||
of those functions non working. For making the MySQL build with
|
||||
OpenSSL 3.x this seems to be enough though.
|
||||
|
||||
Resolves: #1952951
|
||||
|
||||
diff -rup mysql-8.0.22-orig/cmake/ssl.cmake mysql-8.0.22/cmake/ssl.cmake
|
||||
--- mysql-8.0.22-orig/cmake/ssl.cmake 2021-05-19 21:36:33.161996422 +0200
|
||||
+++ mysql-8.0.22/cmake/ssl.cmake 2021-05-19 23:06:54.211877057 +0200
|
||||
@@ -227,8 +227,7 @@ MACRO (MYSQL_CHECK_SSL)
|
||||
ENDIF()
|
||||
IF(OPENSSL_INCLUDE_DIR AND
|
||||
OPENSSL_LIBRARY AND
|
||||
- CRYPTO_LIBRARY AND
|
||||
- OPENSSL_MAJOR_VERSION STREQUAL "1"
|
||||
+ CRYPTO_LIBRARY
|
||||
)
|
||||
SET(OPENSSL_FOUND TRUE)
|
||||
FIND_PROGRAM(OPENSSL_EXECUTABLE openssl
|
||||
diff -rup mysql-8.0.22-orig/include/ssl_compat.h mysql-8.0.22/include/ssl_compat.h
|
||||
--- mysql-8.0.22-orig/include/ssl_compat.h 2021-05-19 23:19:36.152956356 +0200
|
||||
+++ mysql-8.0.22/include/ssl_compat.h 2021-05-19 23:06:55.048885933 +0200
|
||||
@@ -0,0 +1,105 @@
|
||||
+/*
|
||||
+ Copyright (c) 2016, 2021, MariaDB Corporation.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; version 2 of the License.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, write to the Free Software
|
||||
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
+
|
||||
+#include <openssl/opensslv.h>
|
||||
+
|
||||
+/* OpenSSL version specific definitions */
|
||||
+#if defined(OPENSSL_VERSION_NUMBER)
|
||||
+
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
+#define HAVE_OPENSSL11 1
|
||||
+#define SSL_LIBRARY OpenSSL_version(OPENSSL_VERSION)
|
||||
+#define ERR_remove_state(X) ERR_clear_error()
|
||||
+#define EVP_CIPHER_CTX_SIZE 176
|
||||
+#define EVP_MD_CTX_SIZE 48
|
||||
+#undef EVP_MD_CTX_init
|
||||
+#define EVP_MD_CTX_init(X) do { memset((X), 0, EVP_MD_CTX_SIZE); EVP_MD_CTX_reset(X); } while(0)
|
||||
+#undef EVP_CIPHER_CTX_init
|
||||
+#define EVP_CIPHER_CTX_init(X) do { memset((X), 0, EVP_CIPHER_CTX_SIZE); EVP_CIPHER_CTX_reset(X); } while(0)
|
||||
+
|
||||
+/*
|
||||
+ Macros below are deprecated. OpenSSL 1.1 may define them or not,
|
||||
+ depending on how it was built.
|
||||
+*/
|
||||
+#undef ERR_free_strings
|
||||
+#define ERR_free_strings()
|
||||
+#undef EVP_cleanup
|
||||
+#define EVP_cleanup()
|
||||
+#undef CRYPTO_cleanup_all_ex_data
|
||||
+#define CRYPTO_cleanup_all_ex_data()
|
||||
+#undef SSL_load_error_strings
|
||||
+#define SSL_load_error_strings()
|
||||
+
|
||||
+#else
|
||||
+#define HAVE_OPENSSL10 1
|
||||
+#ifdef HAVE_WOLFSSL
|
||||
+#define SSL_LIBRARY "WolfSSL " WOLFSSL_VERSION
|
||||
+#else
|
||||
+#define SSL_LIBRARY SSLeay_version(SSLEAY_VERSION)
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_WOLFSSL
|
||||
+#undef ERR_remove_state
|
||||
+#define ERR_remove_state(x) do {} while(0)
|
||||
+#elif defined (HAVE_ERR_remove_thread_state)
|
||||
+#define ERR_remove_state(X) ERR_remove_thread_state(NULL)
|
||||
+#endif /* HAVE_ERR_remove_thread_state */
|
||||
+
|
||||
+#endif /* HAVE_OPENSSL11 */
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_WOLFSSL
|
||||
+#define EVP_MD_CTX_SIZE sizeof(wc_Md5)
|
||||
+#endif
|
||||
+
|
||||
+#ifndef HAVE_OPENSSL11
|
||||
+#ifndef ASN1_STRING_get0_data
|
||||
+#define ASN1_STRING_get0_data(X) ASN1_STRING_data(X)
|
||||
+#endif
|
||||
+#ifndef EVP_MD_CTX_SIZE
|
||||
+#define EVP_MD_CTX_SIZE sizeof(EVP_MD_CTX)
|
||||
+#endif
|
||||
+
|
||||
+#define DH_set0_pqg(D,P,Q,G) ((D)->p= (P), (D)->g= (G))
|
||||
+#define EVP_CIPHER_CTX_buf_noconst(ctx) ((ctx)->buf)
|
||||
+#define EVP_CIPHER_CTX_encrypting(ctx) ((ctx)->encrypt)
|
||||
+#define EVP_CIPHER_CTX_SIZE sizeof(EVP_CIPHER_CTX)
|
||||
+
|
||||
+#ifndef HAVE_WOLFSSL
|
||||
+#define OPENSSL_init_ssl(X,Y) SSL_library_init()
|
||||
+#define EVP_MD_CTX_reset(X) EVP_MD_CTX_cleanup(X)
|
||||
+#define EVP_CIPHER_CTX_reset(X) EVP_CIPHER_CTX_cleanup(X)
|
||||
+#define X509_get0_notBefore(X) X509_get_notBefore(X)
|
||||
+#define X509_get0_notAfter(X) X509_get_notAfter(X)
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
+#ifndef TLS1_3_VERSION
|
||||
+//#define SSL_CTX_set_ciphersuites(X,Y) 0
|
||||
+#endif
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif /* __cplusplus */
|
||||
+
|
||||
+int check_openssl_compatibility();
|
||||
+
|
||||
+#define FIPS_mode_set(X) 0
|
||||
+#define FIPS_mode() 0
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
diff -rup mysql-8.0.22-orig/mysys/my_md5.cc mysql-8.0.22/mysys/my_md5.cc
|
||||
--- mysql-8.0.22-orig/mysys/my_md5.cc 2021-05-19 21:36:31.738980913 +0200
|
||||
+++ mysql-8.0.22/mysys/my_md5.cc 2021-05-19 23:13:41.380194493 +0200
|
||||
@@ -34,13 +34,12 @@
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/md5.h>
|
||||
+#include <openssl/evp.h>
|
||||
+#include <ssl_compat.h>
|
||||
|
||||
static void my_md5_hash(unsigned char *digest, unsigned const char *buf,
|
||||
int len) {
|
||||
- MD5_CTX ctx;
|
||||
- MD5_Init(&ctx);
|
||||
- MD5_Update(&ctx, buf, len);
|
||||
- MD5_Final(digest, &ctx);
|
||||
+ MD5(buf, len, digest);
|
||||
}
|
||||
|
||||
/**
|
||||
diff -rup mysql-8.0.22-orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc mysql-8.0.22/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
|
||||
--- mysql-8.0.22-orig/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc 2021-05-19 21:36:14.531793376 +0200
|
||||
+++ mysql-8.0.22/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc 2021-05-19 23:06:55.049885943 +0200
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
+#include <openssl/crypto.h>
|
||||
#include <openssl/dh.h>
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/x509v3.h>
|
||||
@@ -35,6 +36,7 @@
|
||||
#endif
|
||||
|
||||
#include "openssl/engine.h"
|
||||
+#include <ssl_compat.h>
|
||||
|
||||
#include "xcom/task_debug.h"
|
||||
#include "xcom/x_platform.h"
|
||||
diff -rup mysql-8.0.22-orig/plugin/x/client/xconnection_impl.cc mysql-8.0.22/plugin/x/client/xconnection_impl.cc
|
||||
--- mysql-8.0.22-orig/plugin/x/client/xconnection_impl.cc 2021-05-19 21:36:14.388791818 +0200
|
||||
+++ mysql-8.0.22/plugin/x/client/xconnection_impl.cc 2021-05-19 23:06:55.049885943 +0200
|
||||
@@ -31,6 +31,7 @@
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif // HAVE_NETINET_IN_H
|
||||
+#include <openssl/crypto.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <cassert>
|
||||
#include <chrono> // NOLINT(build/c++11)
|
||||
@@ -38,6 +39,7 @@
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
+#include <ssl_compat.h>
|
||||
|
||||
#include "errmsg.h" // NOLINT(build/include_subdir)
|
||||
#include "my_config.h" // NOLINT(build/include_subdir)
|
||||
diff -rup mysql-8.0.22-orig/vio/viosslfactories.cc mysql-8.0.22/vio/viosslfactories.cc
|
||||
--- mysql-8.0.22-orig/vio/viosslfactories.cc 2021-05-19 21:36:33.310998046 +0200
|
||||
+++ mysql-8.0.22/vio/viosslfactories.cc 2021-05-19 23:06:55.049885943 +0200
|
||||
@@ -39,7 +39,9 @@
|
||||
#include "mysys_err.h"
|
||||
#include "vio/vio_priv.h"
|
||||
|
||||
+#include <openssl/crypto.h>
|
||||
#include <openssl/dh.h>
|
||||
+#include <ssl_compat.h>
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10002000L
|
||||
#include <openssl/ec.h>
|
|
@ -1,41 +0,0 @@
|
|||
Support s390/s390x in performance schema's cycle-counting functions.
|
||||
Filed upstream at http://bugs.mysql.com/bug.php?id=59953
|
||||
|
||||
diff --git a/include/my_rdtsc.h b/include/my_rdtsc.h
|
||||
index 65f7df19..a28f470c 100644
|
||||
--- a/include/my_rdtsc.h
|
||||
+++ b/include/my_rdtsc.h
|
||||
@@ -128,5 +128,6 @@ void my_timer_init(MY_TIMER_INFO *mti);
|
||||
#define MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME 26
|
||||
#define MY_TIMER_ROUTINE_ASM_SUNPRO_X86_64 27
|
||||
#define MY_TIMER_ROUTINE_ASM_AARCH64 28
|
||||
+#define MY_TIMER_ROUTINE_ASM_S390 29
|
||||
|
||||
#endif
|
||||
diff --git a/mysys/my_rdtsc.cc b/mysys/my_rdtsc.cc
|
||||
index 54d19691..f18c182f 100644
|
||||
--- a/mysys/my_rdtsc.cc
|
||||
+++ b/mysys/my_rdtsc.cc
|
||||
@@ -204,6 +204,13 @@ ulonglong my_timer_cycles(void) {
|
||||
__asm __volatile__("mrs %[rt],cntvct_el0" : [ rt ] "=r"(result));
|
||||
return result;
|
||||
}
|
||||
+#elif defined(__GNUC__) && defined(__s390__)
|
||||
+ /* covers both s390 and s390x */
|
||||
+ {
|
||||
+ ulonglong result;
|
||||
+ __asm__ __volatile__ ("stck %0" : "=Q" (result) : : "cc");
|
||||
+ return result;
|
||||
+ }
|
||||
#elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
|
||||
/* gethrtime may appear as either cycle or nanosecond counter */
|
||||
return (ulonglong)gethrtime();
|
||||
@@ -505,6 +512,8 @@ void my_timer_init(MY_TIMER_INFO *mti) {
|
||||
mti->cycles.routine = MY_TIMER_ROUTINE_ASM_GCC_SPARC32;
|
||||
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||
mti->cycles.routine = MY_TIMER_ROUTINE_ASM_AARCH64;
|
||||
+#elif defined(__GNUC__) && defined(__s390__)
|
||||
+ mti->cycles.routine = MY_TIMER_ROUTINE_ASM_S390;
|
||||
#elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
|
||||
mti->cycles.routine = MY_TIMER_ROUTINE_GETHRTIME;
|
||||
#else
|
|
@ -0,0 +1,144 @@
|
|||
diff -up mysql-8.0.11/scripts/mysqld_safe.sh.p90 mysql-8.0.11/scripts/mysqld_safe.sh
|
||||
--- mysql-8.0.11/scripts/mysqld_safe.sh.p90 2018-04-08 08:44:49.000000000 +0200
|
||||
+++ mysql-8.0.11/scripts/mysqld_safe.sh 2018-06-23 21:28:20.533825845 +0200
|
||||
@@ -11,6 +11,12 @@
|
||||
# mysql.server works by first doing a cd to the base directory and from there
|
||||
# executing mysqld_safe
|
||||
|
||||
+# we want start daemon only inside "scl enable" invocation
|
||||
+if ! scl_enabled @SCL_NAME@ ; then
|
||||
+ echo "Use \"scl enable @SCL_NAME@ 'service ...'\" invocation"
|
||||
+ exit 1
|
||||
+fi
|
||||
+
|
||||
# Initialize script globals
|
||||
KILL_MYSQLD=1;
|
||||
MYSQLD=
|
||||
diff -up mysql-8.0.11/scripts/mysql.init.in.p90 mysql-8.0.11/scripts/mysql.init.in
|
||||
--- mysql-8.0.11/scripts/mysql.init.in.p90 2018-06-23 21:28:20.531825833 +0200
|
||||
+++ mysql-8.0.11/scripts/mysql.init.in 2018-06-23 21:28:20.533825845 +0200
|
||||
@@ -71,8 +71,8 @@ start(){
|
||||
action $"Starting $prog: " /bin/true
|
||||
ret=0
|
||||
else
|
||||
- @libexecdir@/mysql-check-socket || return 1
|
||||
- su - $MYUSER -s /bin/bash -c "@libexecdir@/mysql-prepare-db-dir $MYUSER $MYGROUP" || return 4
|
||||
+ scl enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- @libexecdir@/mysql-check-socket || return 1
|
||||
+ su - $MYUSER -s /bin/bash -c "scl enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- @libexecdir@/mysql-prepare-db-dir $MYUSER $MYGROUP" || return 4
|
||||
|
||||
# Pass all the options determined above, to ensure consistent behavior.
|
||||
# In many cases mysqld_safe would arrive at the same conclusions anyway
|
||||
@@ -81,13 +81,13 @@ start(){
|
||||
# and some users might prefer to configure logging to syslog.)
|
||||
# Note: set --basedir to prevent probes that might trigger SELinux
|
||||
# alarms, per bug #547485
|
||||
- su - $MYUSER -s /bin/bash -c "$exec --datadir='$datadir' --socket='$socketfile' \
|
||||
+ su - $MYUSER -s /bin/bash -c "scl enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- $exec --datadir='$datadir' --socket='$socketfile' \
|
||||
--pid-file='$pidfile' \
|
||||
--basedir=@prefix@ --user=$MYUSER" >/dev/null 2>&1 &
|
||||
safe_pid=$!
|
||||
|
||||
# Wait until the daemon is up
|
||||
- su - $MYUSER -s /bin/bash -c "@libexecdir@/mysql-wait-ready '$safe_pid'"
|
||||
+ su - $MYUSER -s /bin/bash -c "scl enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- @libexecdir@/mysql-wait-ready '$safe_pid'"
|
||||
ret=$?
|
||||
|
||||
if [ $ret -eq 0 ]; then
|
||||
@@ -154,6 +154,18 @@ condrestart(){
|
||||
[ -e $lockfile ] && restart || :
|
||||
}
|
||||
|
||||
+# We have to re-enable SCL environment, because /sbin/service
|
||||
+# clears almost all environment variables.
|
||||
+# Since X_SCLS is cleared as well, we lose information about other
|
||||
+# collections enabled.
|
||||
+source @SCL_SCRIPTS@/service-environment
|
||||
+source scl_source enable $@SCL_NAME_UPPER@_SCLS_ENABLED
|
||||
+
|
||||
+# we want start daemon only inside "scl enable" invocation
|
||||
+if ! scl_enabled @SCL_NAME@ ; then
|
||||
+ echo "Collection @SCL_NAME@ has to be listed in @SCL_SCRIPTS@/service-environment"
|
||||
+ exit 1
|
||||
+fi
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
diff -up mysql-8.0.11/scripts/mysql.service.in.p90 mysql-8.0.11/scripts/mysql.service.in
|
||||
--- mysql-8.0.11/scripts/mysql.service.in.p90 2018-06-23 21:28:20.531825833 +0200
|
||||
+++ mysql-8.0.11/scripts/mysql.service.in 2018-06-23 21:34:19.940881913 +0200
|
||||
@@ -32,16 +32,23 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
+NotifyAccess=all
|
||||
User=mysql
|
||||
Group=mysql
|
||||
|
||||
-ExecStartPre=@libexecdir@/mysql-check-socket
|
||||
-ExecStartPre=@libexecdir@/mysql-prepare-db-dir %n
|
||||
+# Load collections set to enabled for this service
|
||||
+EnvironmentFile=@SCL_SCRIPTS@/service-environment
|
||||
+
|
||||
+# We want to start server only inside "scl enable" invocation
|
||||
+ExecStartPre=/usr/bin/scl enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- /usr/bin/scl_enabled @SCL_NAME@
|
||||
+
|
||||
+ExecStartPre=/usr/bin/scl enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- @libexecdir@/mysql-check-socket
|
||||
+ExecStartPre=/usr/bin/scl enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- @libexecdir@/mysql-prepare-db-dir %n
|
||||
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
|
||||
# per bug #547485
|
||||
-ExecStart=@libexecdir@/mysqld --basedir=@prefix@
|
||||
-ExecStartPost=@libexecdir@/mysql-check-upgrade
|
||||
-ExecStopPost=@libexecdir@/mysql-wait-stop
|
||||
+ExecStart=@libexecdir@/mysqld-scl-helper enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- @libexecdir@/mysqld --basedir=@prefix@
|
||||
+ExecStartPost=/usr/bin/scl enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- @libexecdir@/mysql-check-upgrade
|
||||
+ExecStopPost=/usr/bin/scl enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- @libexecdir@/mysql-wait-stop
|
||||
|
||||
# Give a reasonable amount of time for the server to start up/shut down
|
||||
TimeoutSec=300
|
||||
diff -up mysql-8.0.11/scripts/mysql@.service.in.p90 mysql-8.0.11/scripts/mysql@.service.in
|
||||
--- mysql-8.0.11/scripts/mysql@.service.in.p90 2018-06-23 21:28:20.531825833 +0200
|
||||
+++ mysql-8.0.11/scripts/mysql@.service.in 2018-06-23 21:34:30.583942800 +0200
|
||||
@@ -32,16 +32,23 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
+NotifyAccess=all
|
||||
User=mysql
|
||||
Group=mysql
|
||||
|
||||
-ExecStartPre=@libexecdir@/mysql-check-socket --defaults-group-suffix=.%I
|
||||
-ExecStartPre=@libexecdir@/mysql-prepare-db-dir --defaults-group-suffix=.%I %n
|
||||
+# Load collections set to enabled for this service
|
||||
+EnvironmentFile=@SCL_SCRIPTS@/service-environment
|
||||
+
|
||||
+# We want to start server only inside "scl enable" invocation
|
||||
+ExecStartPre=/usr/bin/scl enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- /usr/bin/scl_enabled @SCL_NAME@
|
||||
+
|
||||
+ExecStartPre=/usr/bin/scl enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- @libexecdir@/mysql-check-socket --defaults-group-suffix=.%I
|
||||
+ExecStartPre=/usr/bin/scl enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- @libexecdir@/mysql-prepare-db-dir --defaults-group-suffix=.%I %n
|
||||
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
|
||||
# per bug #547485
|
||||
-ExecStart=@libexecdir@/mysqld --defaults-group-suffix=.%I --basedir=@prefix@
|
||||
-ExecStartPost=@libexecdir@/mysql-check-upgrade --defaults-group-suffix=.%I
|
||||
-ExecStopPost=@libexecdir@/mysql-wait-stop --defaults-group-suffix=.%I
|
||||
+ExecStart=@libexecdir@/mysqld-scl-helper enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- @libexecdir@/mysqld --defaults-group-suffix=.%I --basedir=@prefix@
|
||||
+ExecStartPost=/usr/bin/scl enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- @libexecdir@/mysql-check-upgrade --defaults-group-suffix=.%I
|
||||
+ExecStopPost=/usr/bin/scl enable $@SCL_NAME_UPPER@_SCLS_ENABLED -- @libexecdir@/mysql-wait-stop --defaults-group-suffix=.%I
|
||||
|
||||
# Give a reasonable amount of time for the server to start up/shut down
|
||||
TimeoutSec=300
|
||||
diff -up mysql-8.0.11/support-files/mysql-log-rotate.sh.p90 mysql-8.0.11/support-files/mysql-log-rotate.sh
|
||||
--- mysql-8.0.11/support-files/mysql-log-rotate.sh.p90 2018-04-08 08:44:49.000000000 +0200
|
||||
+++ mysql-8.0.11/support-files/mysql-log-rotate.sh 2018-06-23 21:28:20.533825845 +0200
|
||||
@@ -51,9 +51,9 @@
|
||||
postrotate
|
||||
# just if mysqld is really running
|
||||
if test -x @bindir@/mysqladmin && \
|
||||
- @bindir@/mysqladmin ping &>/dev/null
|
||||
+ /usr/bin/scl enable @SCL_NAME@ -- @bindir@/mysqladmin ping &>/dev/null
|
||||
then
|
||||
- @bindir@/mysqladmin flush-logs
|
||||
+ /usr/bin/scl enable @SCL_NAME@ -- @bindir@/mysqladmin flush-logs
|
||||
fi
|
||||
endscript
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
--- mysql-8.0.22/scripts/CMakeLists.txt.old 2020-10-21 11:08:50.654252563 +0200
|
||||
+++ mysql-8.0.22/scripts/CMakeLists.txt 2020-10-21 11:11:33.635935366 +0200
|
||||
@@ -507,4 +507,30 @@
|
||||
--- mysql-8.0.22/scripts/CMakeLists.txt.old 2020-10-26 10:23:30.666696561 +0100
|
||||
+++ mysql-8.0.22/scripts/CMakeLists.txt 2020-10-26 10:25:14.447914251 +0100
|
||||
@@ -507,4 +507,33 @@
|
||||
)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
@ -11,10 +11,13 @@
|
|||
+ mysql.service
|
||||
+ mysql@.service
|
||||
+ mysql-prepare-db-dir
|
||||
+ mysql-wait-ready
|
||||
+ mysql-wait-stop
|
||||
+ mysql-check-socket
|
||||
+ mysql-check-upgrade
|
||||
+ mysql-scripts-common
|
||||
+ mysql_config_multilib
|
||||
+ mysql.init
|
||||
+ my.cnf
|
||||
+ server.cnf
|
||||
+ )
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
module mysql-sysnice 1.0;
|
||||
|
||||
require {
|
||||
type mysqld_t;
|
||||
class capability sys_nice;
|
||||
}
|
||||
|
||||
#============= mysqld_t ==============
|
||||
allow mysqld_t self:capability sys_nice;
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
|
||||
source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common"
|
||||
|
||||
# This script waits for mysqld to be ready to accept connections
|
||||
# (which can be many seconds or even minutes after launch, if there's
|
||||
# a lot of crash-recovery work to do).
|
||||
# Running this as ExecStartPost is useful so that services declared as
|
||||
# "After mysqld" won't be started until the database is really ready.
|
||||
|
||||
if [ $# -ne 1 ] ; then
|
||||
echo "You need to pass daemon pid as an argument for this script."
|
||||
exit 20
|
||||
fi
|
||||
|
||||
# Service file passes us the daemon's PID (actually, mysqld_safe's PID)
|
||||
daemon_pid="$1"
|
||||
|
||||
# Wait for the server to come up or for the mysqld process to disappear
|
||||
ret=0
|
||||
while /bin/true; do
|
||||
# Check process still exists
|
||||
if ! [ -d "/proc/${daemon_pid}" ] ; then
|
||||
ret=1
|
||||
break
|
||||
fi
|
||||
RESPONSE=`@bindir@/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1`
|
||||
mret=$?
|
||||
if [ $mret -eq 0 ] ; then
|
||||
break
|
||||
fi
|
||||
# exit codes 1, 11 (EXIT_CANNOT_CONNECT_TO_SERVICE) are expected,
|
||||
# anything else suggests a configuration error
|
||||
if [ $mret -ne 1 -a $mret -ne 11 ]; then
|
||||
echo "Cannot check for @NICE_PROJECT_NAME@ Daemon startup because of mysqladmin failure." >&2
|
||||
ret=$mret
|
||||
break
|
||||
fi
|
||||
# "Access denied" also means the server is alive
|
||||
echo "$RESPONSE" | grep -q "Access denied for user" && break
|
||||
|
||||
sleep 1
|
||||
done
|
||||
|
||||
exit $ret
|
|
@ -0,0 +1,186 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# @DAEMON_NAME@ This shell script takes care of starting and stopping
|
||||
# the MySQL subsystem (mysqld).
|
||||
#
|
||||
# chkconfig: - 64 36
|
||||
# description: MySQL database server.
|
||||
# processname: mysqld
|
||||
# config: @sysconfdir@/my.cnf
|
||||
# pidfile: /var/run/@DAEMON_NAME@/@DAEMON_NO_PREFIX@.pid
|
||||
### BEGIN INIT INFO
|
||||
# Provides: mysqld
|
||||
# Required-Start: $local_fs $remote_fs $network $named $syslog $time
|
||||
# Required-Stop: $local_fs $remote_fs $network $named $syslog $time
|
||||
# Short-Description: start and stop MySQL server
|
||||
# Description: MySQL database server
|
||||
### END INIT INFO
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
# Source networking configuration.
|
||||
. /etc/sysconfig/network
|
||||
|
||||
|
||||
exec="@bindir@/mysqld_safe"
|
||||
prog="@DAEMON_NAME@"
|
||||
|
||||
# Set timeouts here so they can be overridden from @sysconfdir@/sysconfig/@DAEMON_NO_PREFIX@
|
||||
STARTTIMEOUT=300
|
||||
STOPTIMEOUT=60
|
||||
|
||||
# User and group the daemon will run under
|
||||
MYUSER=mysql
|
||||
MYGROUP=mysql
|
||||
|
||||
# Edit the following file in order to re-write some of the environment
|
||||
# variables defined above, like $STARTTIMEOUT, $STOPTIMEOUT, $exec
|
||||
[ -e @sysconfdir@/sysconfig/@DAEMON_NO_PREFIX@ ] && . @sysconfdir@/sysconfig/@DAEMON_NO_PREFIX@
|
||||
|
||||
lockfile=/var/lock/subsys/$prog
|
||||
|
||||
# get options from my.cnf
|
||||
source "@libexecdir@/mysql-scripts-common"
|
||||
|
||||
start(){
|
||||
[ -x $exec ] || exit 5
|
||||
|
||||
# check permissions
|
||||
if ! touch $(dirname $socketfile) &>/dev/null ; then
|
||||
action $"Starting $prog: " /bin/false
|
||||
return 4
|
||||
fi
|
||||
|
||||
# check to see if it's already running
|
||||
MYSQLDRUNNING=0
|
||||
if [ -f "$pidfile" ]; then
|
||||
MYSQLPID=`cat "$pidfile" 2>/dev/null`
|
||||
if [ -n "$MYSQLPID" ] && [ -d "/proc/$MYSQLPID" ] ; then
|
||||
MYSQLDRUNNING=1
|
||||
fi
|
||||
fi
|
||||
RESPONSE=`@bindir@/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1`
|
||||
if [ $MYSQLDRUNNING = 1 ] && [ $? = 0 ]; then
|
||||
# already running, do nothing
|
||||
action $"Starting $prog: " /bin/true
|
||||
ret=0
|
||||
elif [ $MYSQLDRUNNING = 1 ] && echo "$RESPONSE" | grep -q "Access denied for user"
|
||||
then
|
||||
# already running, do nothing
|
||||
action $"Starting $prog: " /bin/true
|
||||
ret=0
|
||||
else
|
||||
@libexecdir@/mysql-check-socket || return 1
|
||||
su - $MYUSER -s /bin/bash -c "@libexecdir@/mysql-prepare-db-dir $MYUSER $MYGROUP" || return 4
|
||||
|
||||
# Pass all the options determined above, to ensure consistent behavior.
|
||||
# In many cases mysqld_safe would arrive at the same conclusions anyway
|
||||
# but we need to be sure. (An exception is that we don't force the
|
||||
# log-error setting, since this script doesn't really depend on that,
|
||||
# and some users might prefer to configure logging to syslog.)
|
||||
# Note: set --basedir to prevent probes that might trigger SELinux
|
||||
# alarms, per bug #547485
|
||||
su - $MYUSER -s /bin/bash -c "$exec --datadir='$datadir' --socket='$socketfile' \
|
||||
--pid-file='$pidfile' \
|
||||
--basedir=@prefix@ --user=$MYUSER" >/dev/null 2>&1 &
|
||||
safe_pid=$!
|
||||
|
||||
# Wait until the daemon is up
|
||||
su - $MYUSER -s /bin/bash -c "@libexecdir@/mysql-wait-ready '$safe_pid'"
|
||||
ret=$?
|
||||
|
||||
if [ $ret -eq 0 ]; then
|
||||
action $"Starting $prog: " /bin/true
|
||||
chmod o+r $pidfile >/dev/null 2>&1
|
||||
touch $lockfile
|
||||
else
|
||||
action $"Starting $prog: " /bin/false
|
||||
fi
|
||||
fi
|
||||
return $ret
|
||||
}
|
||||
|
||||
stop(){
|
||||
if [ ! -f "$pidfile" ]; then
|
||||
# not running; per LSB standards this is "ok"
|
||||
action $"Stopping $prog: " /bin/true
|
||||
return 0
|
||||
fi
|
||||
MYSQLPID=`cat "$pidfile" 2>/dev/null`
|
||||
if [ -n "$MYSQLPID" ]; then
|
||||
if ! [ -d "/proc/$MYSQLPID" ] ; then
|
||||
# process doesn't run anymore
|
||||
action $"Stopping $prog: " /bin/true
|
||||
return 0
|
||||
fi
|
||||
/bin/kill "$MYSQLPID" >/dev/null 2>&1
|
||||
ret=$?
|
||||
if [ $ret -eq 0 ]; then
|
||||
TIMEOUT="$STOPTIMEOUT"
|
||||
while [ $TIMEOUT -gt 0 ]; do
|
||||
/bin/kill -0 "$MYSQLPID" >/dev/null 2>&1 || break
|
||||
sleep 1
|
||||
let TIMEOUT=${TIMEOUT}-1
|
||||
done
|
||||
if [ $TIMEOUT -eq 0 ]; then
|
||||
echo "Timeout error occurred trying to stop MySQL Daemon."
|
||||
ret=1
|
||||
action $"Stopping $prog: " /bin/false
|
||||
else
|
||||
rm -f $lockfile
|
||||
rm -f "$socketfile"
|
||||
action $"Stopping $prog: " /bin/true
|
||||
fi
|
||||
else
|
||||
# kill command failed, probably insufficient permissions
|
||||
action $"Stopping $prog: " /bin/false
|
||||
ret=4
|
||||
fi
|
||||
else
|
||||
# failed to read pidfile, probably insufficient permissions
|
||||
action $"Stopping $prog: " /bin/false
|
||||
ret=4
|
||||
fi
|
||||
return $ret
|
||||
}
|
||||
|
||||
restart(){
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
condrestart(){
|
||||
[ -e $lockfile ] && restart || :
|
||||
}
|
||||
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
status -p "$pidfile" $prog
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
condrestart
|
||||
;;
|
||||
reload)
|
||||
exit 3
|
||||
;;
|
||||
force-reload)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
|
||||
exit 2
|
||||
esac
|
||||
|
||||
exit $?
|
|
@ -1,37 +0,0 @@
|
|||
# THIS FILE SERVES FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON
|
||||
# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors
|
||||
|
||||
# (same file in python3 package served as a great example)
|
||||
|
||||
|
||||
|
||||
# Spelling errors
|
||||
addFilter(r'spelling-error .* en_US (cnf|mysqld|subpackage) ')
|
||||
|
||||
# Debug symlinks
|
||||
addFilter(r'dangling-relative-symlink /usr/lib/.build-id')
|
||||
|
||||
# Testsuite
|
||||
# Some expected tests results are zero-length files
|
||||
addFilter(r'(zero-length|pem-certificate|hidden-file-or-dir) /usr/share/mysql-test/*')
|
||||
|
||||
# Chroot function
|
||||
# False positive; checked by upstream
|
||||
addFilter(r'missing-call-to-chdir-with-chroot')
|
||||
|
||||
# Missing documentation
|
||||
# I don't think that's on the upstream priority list
|
||||
addFilter(r'no-documentation')
|
||||
addFilter(r'no-manual-page-for-binary')
|
||||
|
||||
# Cluster is gone
|
||||
addFilter("W: obsolete-not-provided mysql-cluster")
|
||||
addFilter("W: obsolete-not-provided mysql-bench")
|
||||
addFilter("W: obsolete-not-provided community-mysql-bench")
|
||||
|
||||
# Config file without noreplace flag
|
||||
# Don't replace logs that may contain old entries
|
||||
addFilter(r'conffile-without-noreplace-flag /var/log/mariadb/mariadb.log')
|
||||
|
||||
# Seems pretty standard to me ...
|
||||
addFilter(r'non-standard-dir-perm /var/log/mysql 750')
|
|
@ -40,6 +40,7 @@ ExecStartPre=@libexecdir@/mysql-prepare-db-dir %n
|
|||
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
|
||||
# per bug #547485
|
||||
ExecStart=@libexecdir@/mysqld --basedir=@prefix@
|
||||
ExecStartPost=@libexecdir@/mysql-check-upgrade
|
||||
ExecStopPost=@libexecdir@/mysql-wait-stop
|
||||
|
||||
# Give a reasonable amount of time for the server to start up/shut down
|
||||
|
|
|
@ -40,6 +40,7 @@ ExecStartPre=@libexecdir@/mysql-prepare-db-dir --defaults-group-suffix=.%I %n
|
|||
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
|
||||
# per bug #547485
|
||||
ExecStart=@libexecdir@/mysqld --defaults-group-suffix=.%I --basedir=@prefix@
|
||||
ExecStartPost=@libexecdir@/mysql-check-upgrade --defaults-group-suffix=.%I
|
||||
ExecStopPost=@libexecdir@/mysql-wait-stop --defaults-group-suffix=.%I
|
||||
|
||||
# Give a reasonable amount of time for the server to start up/shut down
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# Failing on C9S & RHEL 9 for MySQL release 8.0.27
|
||||
sys_vars.innodb_buffer_pool_size_basic : BUG#0
|
||||
|
||||
# Unstable on aarch64 since MySQL 8.0.28
|
||||
innodb_undo.undo_settings : BUG#0
|
||||
|
||||
# Unstable on aarch64 since MySQL 8.0.36
|
||||
sys_vars.myisam_data_pointer_size_func : BUG#0
|
||||
rpl.rpl_eventlog_psi_memory : BUG#0
|
|
@ -0,0 +1,46 @@
|
|||
auth_sec.tls12_tls1 : BUG#0
|
||||
auth_sec.tls13_tls1 : BUG#0
|
||||
x.connection_tls_version : BUG#0
|
||||
|
||||
# x86_64
|
||||
auth_sec.keyring_file_data_qa : BUG#0
|
||||
main.mysql_load_data_local_dir : BUG#0
|
||||
# i686
|
||||
main.ctype_unicode900_as_cs : BUG#0
|
||||
collations.chinese : BUG#0
|
||||
main.mysql_load_data_local_dir : BUG#0
|
||||
|
||||
# x86_64, s390x
|
||||
main.mysqld--defaults-file : BUG#0
|
||||
main.mysqltest_json : BUG#0
|
||||
main.mtr_unit_tests : BUG#0
|
||||
main.mysqld--help-notwin : BUG#0
|
||||
|
||||
# Unstable since 8.0.27
|
||||
innodb.innodb_read_only-2 : BUG#0
|
||||
|
||||
# Failing on 32-bit arches: armv7hl i686 s390x; since MySQL 8.0.25
|
||||
x.connection_unixsocket : BUG#0
|
||||
x.connection_unixsocket_invalid : BUG#0
|
||||
x.connection_unixsocket_lock : BUG#0
|
||||
innodb.innodb_bug-13628249 : BUG#0
|
||||
|
||||
# Failing since MySQL 8.0.29
|
||||
main.mysqlpump_bugs : BUG#0
|
||||
|
||||
# Failing since MySQL 8.0.30
|
||||
auth_sec.fips : BUG#0
|
||||
rpl.rpl_fips : BUG#0
|
||||
|
||||
# Failing since MySQL 8.0.35
|
||||
binlog.binlog_mysqlbinlog_linux : BUG#0
|
||||
perfschema.idx_session_connect_attrs : BUG#0
|
||||
rpl_gtid.mysqldump_bug33630199 : BUG#0
|
||||
|
||||
# Failing since MySQL 8.0.36
|
||||
main.generated_invisible_primary_key : BUG#0
|
||||
main.slow_log : BUG#0
|
||||
main.archive_plugin : BUG#0
|
||||
main.blackhole_plugin : BUG#0
|
||||
main.events_read_only : BUG#0
|
||||
main.log_backtrace : BUG#0
|
|
@ -0,0 +1,5 @@
|
|||
# ppc64le
|
||||
sys_vars.innodb_buffer_pool_size_basic : BUG#0 fails only on ppc64le on f32+
|
||||
|
||||
# Unstable on 8.0.35
|
||||
rpl.rpl_replica_terminology : BUG#0
|
|
@ -0,0 +1,5 @@
|
|||
# Fails since 8.0.22
|
||||
main.subquery_bugs : BUG#0
|
||||
|
||||
# Failing on C9S & RHEL 9 for MySQL release 8.0.33
|
||||
main.subquery_sj_all_bka_nobnl : BUG#0
|
1121
SPECS/mysql.spec
1121
SPECS/mysql.spec
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue