diff --git a/fix-innodb.innodb-fail-on-aarch64.patch b/fix-innodb.innodb-fail-on-aarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..0ab3441c436180270c2a8215eb43e06f6577ae3e --- /dev/null +++ b/fix-innodb.innodb-fail-on-aarch64.patch @@ -0,0 +1,25 @@ +From 5729cb28f7e332adbcb8cfc4931af0944d3ff71d Mon Sep 17 00:00:00 2001 +From: lingsheng +Date: Fri, 19 Mar 2021 22:47:55 +0800 +Subject: [PATCH] fix innodb.innodb fail on aarch64 + +--- + mysql-test/suite/innodb/t/innodb.test | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test +index 679d251d..7e4c0ee5 100644 +--- a/mysql-test/suite/innodb/t/innodb.test ++++ b/mysql-test/suite/innodb/t/innodb.test +@@ -1333,7 +1333,7 @@ drop table t1; + # Test for testable InnoDB status variables. This test + # uses previous ones(pages_created, rows_deleted, ...). + --disable_warnings +---replace_result 1535 {checked_valid} 1536 {checked_valid} 3071 {checked_valid} 3072 {checked_valid} 6144 {checked_valid} ++--replace_result 1535 {checked_valid} 1536 {checked_valid} 3071 {checked_valid} 3072 {checked_valid} 6144 {checked_valid} 1539 {checked_valid} + SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; + --replace_result 4096 {checked_valid} 8192 {checked_valid} 16384 {checked_valid} + SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'; +-- +2.23.0 + diff --git a/fix_grant_user_lock_as_root.patch b/fix_grant_user_lock_as_root.patch new file mode 100644 index 0000000000000000000000000000000000000000..aecc6a5bc2ee8ee1ecead00fce9e701731ed25e6 --- /dev/null +++ b/fix_grant_user_lock_as_root.patch @@ -0,0 +1,85 @@ +Description: Fixes test failing when run as root + Certain tests will fail when run as root. This patch fixes one, + main.grant_user_lock, which tries to test an anonymous user in + a way that fails when running as root. The patch fixes only + this test because there have been issues in Debian with only + this test failing in this way. +Author: Lars Tangvald +Bug-Debian: https://bugs.debian.org/841592 +Bug: http://bugs.mysql.com/bug.php?id=83751 +Last-Update: 2016-11-09 + +--- mysql-5.7-5.7.16.orig/mysql-test/r/grant_user_lock.result ++++ mysql-5.7-5.7.16/mysql-test/r/grant_user_lock.result +@@ -98,13 +98,13 @@ CURRENT_USER() + DROP USER ''@localhost; + # Create anonymous user - LOCK + CREATE USER ''@localhost IDENTIFIED BY 'pass' ACCOUNT LOCK; +-connect(localhost,,pass,test,MASTER_PORT,MASTER_SOCKET); ++connect(localhost, ,pass,test,MASTER_PORT,MASTER_SOCKET); + ERROR HY000: Access denied for user '(null)'@'localhost'. Account is locked. + DROP USER ''@localhost; + # Disabling anonymous user + CREATE USER ''@localhost IDENTIFIED BY 'pass'; + ALTER USER ''@localhost ACCOUNT LOCK; +-connect(localhost,,pass,test,MASTER_PORT,MASTER_SOCKET); ++connect(localhost, ,pass,test,MASTER_PORT,MASTER_SOCKET); + ERROR HY000: Access denied for user '(null)'@'localhost'. Account is locked. + DROP USER ''@localhost; + # Enabling anonymous user +--- mysql-5.7-5.7.16.orig/mysql-test/t/grant_user_lock.test ++++ mysql-5.7-5.7.16/mysql-test/t/grant_user_lock.test +@@ -113,7 +113,7 @@ DROP USER unlocked_user2@localhost; + --echo # Create anonymous user + connection default; + CREATE USER ''@localhost IDENTIFIED BY 'pass'; +-connect(anonymous_user_con, localhost, '', pass); ++connect(anonymous_user_con, localhost, ' ', pass); + SELECT CURRENT_USER(); + disconnect anonymous_user_con; + connection default; +@@ -122,7 +122,7 @@ DROP USER ''@localhost; + --echo # Create anonymous user - explicit UNLOCK + connection default; + CREATE USER ''@localhost IDENTIFIED BY 'pass' ACCOUNT UNLOCK; +-connect(anonymous_user_con, localhost, '', pass); ++connect(anonymous_user_con, localhost, ' ', pass); + SELECT CURRENT_USER(); + disconnect anonymous_user_con; + connection default; +@@ -133,7 +133,7 @@ connection default; + CREATE USER ''@localhost IDENTIFIED BY 'pass' ACCOUNT LOCK; + --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT + --error ER_ACCOUNT_HAS_BEEN_LOCKED +-connect(anonymous_user_con, localhost, '', pass); ++connect(anonymous_user_con, localhost, ' ', pass); + connection default; + DROP USER ''@localhost; + +@@ -143,7 +143,7 @@ CREATE USER ''@localhost IDENTIFIED BY ' + ALTER USER ''@localhost ACCOUNT LOCK; + --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT + --error ER_ACCOUNT_HAS_BEEN_LOCKED +-connect(anonymous_user_con, localhost, '', pass); ++connect(anonymous_user_con, localhost, ' ', pass); + connection default; + DROP USER ''@localhost; + +@@ -151,7 +151,7 @@ DROP USER ''@localhost; + connection default; + CREATE USER ''@localhost IDENTIFIED BY 'pass' ACCOUNT LOCK; + ALTER USER ''@localhost ACCOUNT UNLOCK; +-connect(anonymous_user_con, localhost, '', pass); ++connect(anonymous_user_con, localhost, ' ', pass); + SELECT CURRENT_USER(); + disconnect anonymous_user_con; + connection default; +@@ -171,7 +171,7 @@ connection default; + CREATE user ''@localhost IDENTIFIED BY 'pass'; + CREATE USER 'unlocked_user'@localhost IDENTIFIED BY 'pass'; + +-connect(anonymous_user_con, localhost, '', pass); ++connect(anonymous_user_con, localhost, ' ', pass); + --error ER_TABLEACCESS_DENIED_ERROR + UPDATE mysql.user SET account_locked='Y' + WHERE user='unlocked_user' and host = 'localhost'; diff --git a/mysql-boost-5.7.21.tar.gz b/mysql-boost-5.7.37.tar.gz similarity index 76% rename from mysql-boost-5.7.21.tar.gz rename to mysql-boost-5.7.37.tar.gz index 6ad66bcc4787e1f153b5b07d3be63d9dbf63b07f..58e33862cbbf5b7bf31ebe13199ea4f3b68401a1 100644 Binary files a/mysql-boost-5.7.21.tar.gz and b/mysql-boost-5.7.37.tar.gz differ diff --git a/mysql5-libxcrypt.patch b/mysql5-libxcrypt.patch index 177f9bcae457635b33c01a2fcef4f5bb032c0ff0..97cab6733535793685a17973e7f146a2f0501e57 100644 --- a/mysql5-libxcrypt.patch +++ b/mysql5-libxcrypt.patch @@ -1,8 +1,32 @@ Do not assume, that "crypt" function is provided by glibc; #1536881 ---- mysql-5.7.21/include/my_global.h 2017-12-28 04:46:26.000000000 +0100 -+++ mysql-5.7.21/include/my_global.h_patched 2018-01-22 01:01:42.450315852 +0100 -@@ -49,6 +49,9 @@ + +diff -Naur mysql-5.7.34_orig/config.h.cmake mysql-5.7.34_patched/config.h.cmake +--- mysql-5.7.34_orig/config.h.cmake 2021-06-24 11:17:47.697396007 +0800 ++++ mysql-5.7.34_patched/config.h.cmake 2021-06-24 11:44:15.405418497 +0800 +@@ -69,6 +69,7 @@ + #cmakedefine HAVE_FNMATCH_H 1 + #cmakedefine HAVE_SYS_UN_H 1 + #cmakedefine HAVE_SASL_SASL_H 1 ++#cmakedefine HAVE_CRYPT_H 1 + + /* Libevent */ + #cmakedefine HAVE_DEVPOLL 1 +diff -Naur mysql-5.7.34_orig/configure.cmake mysql-5.7.34_patched/configure.cmake +--- mysql-5.7.34_orig/configure.cmake 2021-06-24 11:17:47.697396007 +0800 ++++ mysql-5.7.34_patched/configure.cmake 2021-06-24 11:43:24.612905857 +0800 +@@ -252,6 +252,7 @@ + CHECK_INCLUDE_FILES (sys/param.h HAVE_SYS_PARAM_H) # Used by NDB/libevent + CHECK_INCLUDE_FILES (fnmatch.h HAVE_FNMATCH_H) + CHECK_INCLUDE_FILES (sys/un.h HAVE_SYS_UN_H) ++CHECK_INCLUDE_FILES (crypt.h HAVE_CRYPT_H) + + # For libevent + CHECK_INCLUDE_FILES(sys/devpoll.h HAVE_DEVPOLL) +diff -Naur mysql-5.7.34_orig/include/my_global.h mysql-5.7.34_patched/include/my_global.h +--- mysql-5.7.34_orig/include/my_global.h 2021-06-24 11:17:47.721396249 +0800 ++++ mysql-5.7.34_patched/include/my_global.h 2021-06-24 11:41:58.240034110 +0800 +@@ -61,6 +61,9 @@ #include #include /* Recommended by debian */ #include @@ -12,27 +36,3 @@ Do not assume, that "crypt" function is provided by glibc; #1536881 #ifdef HAVE_SYS_SOCKET_H #include - - ---- mysql-5.7.21/configure.cmake 2017-12-28 04:46:26.000000000 +0100 -+++ mysql-5.7.21/configure.cmake_patched 2018-01-22 01:00:09.955057755 +0100 -@@ -493,6 +493,7 @@ CHECK_INCLUDE_FILES (fnmatch.h HAVE_FNMA - CHECK_INCLUDE_FILES (sys/un.h HAVE_SYS_UN_H) - CHECK_INCLUDE_FILES (vis.h HAVE_VIS_H) # Used by libedit - CHECK_INCLUDE_FILES (sasl/sasl.h HAVE_SASL_SASL_H) # Used by memcached -+CHECK_INCLUDE_FILES (crypt.h HAVE_CRYPT_H) - - # For libevent - CHECK_INCLUDE_FILES(sys/devpoll.h HAVE_DEVPOLL) - - ---- mysql-5.7.21/config.h.cmake 2017-12-28 04:46:26.000000000 +0100 -+++ mysql-5.7.21/config.h.cmake_patched 2018-01-22 01:51:02.522570765 +0100 -@@ -62,6 +62,7 @@ - #cmakedefine HAVE_SYS_UN_H 1 - #cmakedefine HAVE_VIS_H 1 - #cmakedefine HAVE_SASL_SASL_H 1 -+#cmakedefine HAVE_CRYPT_H 1 - - /* Libevent */ - #cmakedefine HAVE_DEVPOLL 1 diff --git a/mysql5-md5_fips.patch b/mysql5-md5_fips.patch index 4c2ad5486234dbfa8bcf91f16a72b8cf923d2475..5863b87d14066402bdf98a5cd01be5c67d423727 100644 --- a/mysql5-md5_fips.patch +++ b/mysql5-md5_fips.patch @@ -18,14 +18,10 @@ http://bugs.mysql.com/bug.php?id=83696 https://jira.mariadb.org/browse/MDEV-7788 -diff -Naurp mysql-5.7.18_original/mysys_ssl/my_md5.cc mysql-5.7.18_patched/mysys_ssl/my_md5.cc ---- mysql-5.7.18_original/mysys_ssl/my_md5.cc 2017-03-18 08:45:14.000000000 +0100 -+++ mysql-5.7.18_patched/mysys_ssl/my_md5.cc 2017-05-12 12:19:38.584814619 +0200 -@@ -38,13 +38,22 @@ static void my_md5_hash(char *digest, co - - #elif defined(HAVE_OPENSSL) - #include -+#include +diff -Naurp mysql-5.7.34_original/mysys_ssl/my_md5.cc mysql-5.7.34_patched/mysys_ssl/my_md5.cc +--- mysql-5.7.34_original/mysys_ssl/my_md5.cc 2017-03-18 08:45:14.000000000 +0100 ++++ mysql-5.7.34_patched/mysys_ssl/my_md5.cc 2017-05-12 12:19:38.584814619 +0200 +@@ -41,10 +41,18 @@ static void my_md5_hash(unsigned char* digest, unsigned const char *buf, int len) { @@ -47,4 +43,4 @@ diff -Naurp mysql-5.7.18_original/mysys_ssl/my_md5.cc mysql-5.7.18_patched/mysys + EVP_MD_CTX_destroy(ctx); } - #endif /* HAVE_YASSL */ + #endif /* HAVE_OPENSSL */ diff --git a/mysql5.spec b/mysql5.spec index 1f403884c832bbdc69d7a78a9824c3f3e92a9145..c83ce8357a4c21580eb130ea08368c313fdd20ba 100644 --- a/mysql5.spec +++ b/mysql5.spec @@ -1,5 +1,11 @@ %global pkg_name %{name} %global pkgnamepatch mysql5 + +# The reason of introduce this is: +# openEuler/gcc version bump so quick. So any new gcc version might default disable +# some options which are default to enable in previos gcc versions. +%global gcc_c_adaptive_options -fcommon + %{!?runselftest:%global runselftest 1} %global check_testsuite 0 %global with_shared_lib_major_hack 0 @@ -32,11 +38,11 @@ %bcond_without conflicts %global sameevr %{?epoch:%{epoch}:}%{version}-%{release} Name: mysql5 -Version: 5.7.21 -Release: 3 +Version: 5.7.37 +Release: 1 Summary: MySQL client programs and shared libraries URL: http://www.mysql.com -License: GPLv2 and LGPLv2 and BSD +License: GPLv2 with exceptions and LGPLv2 and BSD Source0: https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-%{version}.tar.gz Source2: mysql_config_multilib.sh Source3: my.cnf.in @@ -58,13 +64,11 @@ Patch3: %{pkgnamepatch}-logrotate.patch Patch4: %{pkgnamepatch}-file-contents.patch Patch5: %{pkgnamepatch}-scripts.patch Patch6: %{pkgnamepatch}-paths.patch -Patch7: %{pkgnamepatch}-md5_fips.patch -Patch51: %{pkgnamepatch}-chain-certs.patch Patch52: %{pkgnamepatch}-sharedir.patch Patch70: %{pkgnamepatch}-5.7.9-major.patch -Patch71: %{pkgnamepatch}-openssl11.patch -Patch72: %{pkgnamepatch}-tirpc.patch Patch73: %{pkgnamepatch}-libxcrypt.patch +Patch74: fix-innodb.innodb-fail-on-aarch64.patch +Patch75: fix_grant_user_lock_as_root.patch Patch115: boost-1.58.0-pool.patch Patch125: boost-1.57.0-mpl-print.patch Patch170: boost-1.59.0-log.patch @@ -79,7 +83,7 @@ BuildRequires: systemtap-sdt-devel zlib-devel multilib-rpm-config procps t BuildRequires: perl(Digest::file) perl(Digest::MD5) perl(Env) perl(Exporter) perl(Fcntl) BuildRequires: perl(File::Temp) perl(Data::Dumper) perl(Getopt::Long) perl(IPC::Open3) BuildRequires: perl(JSON) perl(Memoize) perl(Socket) perl(Sys::Hostname) perl(Test::More) -BuildRequires: perl(Time::HiRes) +BuildRequires: perl(Time::HiRes) vim git grep %{?with_init_systemd:BuildRequires: systemd} Requires: bash coreutils grep %{name}-common = %{sameevr} Provides: bundled(boost) = 1.59 @@ -236,15 +240,14 @@ the MySQL sources. %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 -%patch51 -p1 +#%patch7 -p1 %patch52 -p1 %if %{with_shared_lib_major_hack} %patch70 -p1 %endif -%patch71 -p1 -%patch72 -p1 %patch73 -p1 +%patch74 -p1 +%patch75 -p1 pushd boost/boost_1_59_0 %patch115 -p0 %patch125 -p1 @@ -288,6 +291,8 @@ add_test auth_sec.openssl_cert_generation : ssl test disable add_test main.ssl_compress : ssl test disable add_test main.plugin_auth_sha256_tls : ssl test disable add_test main.mysql_ssl_default : ssl test disable +add_test innodb.innodb-multiple-tablespaces : fail on glibc 2.33 +add_test innodb.alter_kill : fail on glibc 2.33 popd cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} \ %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19} %{SOURCE31} scripts @@ -344,7 +349,7 @@ cmake .. \ -DWITH_SSL=system \ -DWITH_ZLIB=system \ -DWITH_BOOST=../boost \ - -DCMAKE_C_FLAGS="%{optflags}%{?with_debug: -fno-strict-overflow -Wno-unused-result -Wno-unused-function -Wno-unused-but-set-variable}" \ + -DCMAKE_C_FLAGS="%{optflags}%{?with_debug: -fno-strict-overflow -Wno-unused-result -Wno-unused-function -Wno-unused-but-set-variable} %{gcc_c_adaptive_options}" \ -DCMAKE_CXX_FLAGS="%{optflags}%{?with_debug: -fno-strict-overflow -Wno-unused-result -Wno-unused-function -Wno-unused-but-set-variable}" \ %{?with_debug: -DWITH_DEBUG=1}\ -DTMPDIR=/var/tmp \ @@ -394,8 +399,6 @@ rm %{buildroot}%{_datadir}/%{pkg_name}/magic rm %{buildroot}%{_datadir}/%{pkg_name}/mysql.server rm %{buildroot}%{_datadir}/%{pkg_name}/mysqld_multi.server rm %{buildroot}%{_mandir}/man1/comp_err.1* -rm %{buildroot}%{_mandir}/man1/mysql-stress-test.pl.1* -rm %{buildroot}%{_mandir}/man1/mysql-test-run.pl.1* mkdir -p %{buildroot}%{logrotateddir} mv %{buildroot}%{_datadir}/%{pkg_name}/mysql-log-rotate %{buildroot}%{logrotateddir}/%{daemon_name} chmod 644 %{buildroot}%{logrotateddir}/%{daemon_name} @@ -407,9 +410,6 @@ mv %{buildroot}%{_libexecdir}/mysqld-debug %{buildroot}%{_libexecdir}/mysqld popd install -p -m 0644 %{SOURCE7} %{basename:%{SOURCE7}} install -p -m 0644 mysql-test/%{skiplist} %{buildroot}%{_datadir}/mysql-test -rm %{buildroot}%{_mandir}/man1/{mysqltest,mysql_client_test}_embedded.1 -cp -p %{buildroot}%{_mandir}/man1/mysqltest.1 %{buildroot}%{_mandir}/man1/mysqltest_embedded.1 -cp -p %{buildroot}%{_mandir}/man1/mysql_client_test.1 %{buildroot}%{_mandir}/man1/mysql_client_test_embedded.1 %if %{without clibrary} unlink %{buildroot}%{_libdir}/mysql/libmysqlclient.so rm -r %{buildroot}%{_libdir}/mysql/libmysqlclient*.so.* @@ -465,7 +465,6 @@ cp ../../mysql-test/%{skiplist} . export MTR_BUILD_THREAD=%{__isa_bits} ./mtr \ --mem --parallel=auto --force --retry=2 \ - --mysqld=--binlog-format=mixed \ --suite-timeout=720 --testcase-timeout=30 \ --report-unstable-tests --clean-vardir \ %if %{check_testsuite} @@ -570,7 +569,7 @@ fi %if %{with common} %files common -%doc README COPYING README.mysql-license +%doc README README.mysql-license LICENSE %doc storage/innobase/COPYING.Percona storage/innobase/COPYING.Google %dir %{_libdir}/mysql %dir %{_datadir}/%{pkg_name} @@ -724,13 +723,37 @@ fi %{_bindir}/mysqlxtest %{_bindir}/my_safe_process %attr(-,mysql,mysql) %{_datadir}/mysql-test -%{_mandir}/man1/mysqltest.1* -%{_mandir}/man1/mysqltest_embedded.1* -%{_mandir}/man1/mysql_client_test.1* -%{_mandir}/man1/mysql_client_test_embedded.1* %endif %changelog +* Thu Apr 21 2022 bzhaoop - 5.7.37-1 +- Fix CVE issues for bump to the 5.7.37 version +- CVE-2022-21245 +- CVE-2022-21270 +- CVE-2022-21303 +- CVE-2022-21304 +- CVE-2022-21344 +- CVE-2022-21367 +- CVE-2021-35624 +- CVE-2021-2356 +- CVE-2021-2011 +- CVE-2021-2010 +- CVE-2021-2007 + +* Fri Feb 25 2022 houyingchao - 5.7.34-2 +- Upgrade to 5.7.34 version +- Fix CVES + +* Thu Jul 1 2021 bzhaoop - 5.7.34-1 +- Bump from 5.7.21 to latest 5.7.34 +- Correct the test steps and options +- Refactor part of the file structure according to the new packages + +* Tue Nov 30 2021 wulei - 5.7.21-4 +- Fix innodb.innodb fail on aarch64 +- Fix grant_user_lock as root +- Update fail tests list on glibc 2.33 + * Tue Nov 24 2020 baizhonggui - 5.7.21-3 - Fix test error @@ -739,3 +762,4 @@ fi * Thu Oct 15 2020 zhanghua - 5.7.21-1 - package init +