diff --git a/disable-moutline-atomics-for-aarch64.patch b/disable-moutline-atomics-for-aarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..c7a8eba5b42d7bf9b10a6dfe5845f75b3c150863 --- /dev/null +++ b/disable-moutline-atomics-for-aarch64.patch @@ -0,0 +1,37 @@ +From 3603a7c5191c98e86e3b769c5877d17fd18bf39b Mon Sep 17 00:00:00 2001 +From: maminjie +Date: Fri, 26 Feb 2021 14:58:05 +0800 +Subject: [PATCH] disable moutline-atomics for aarch64 + +--- + CMakeLists.txt | 13 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index df69eb90..94557fc9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -938,13 +938,13 @@ ENDIF() + # The -moutline-atomics switch enables run-time detection of LSE support. + # There are compilers (gcc 9.3.1 for example) which support this switch, but + # do not enable it by default, even though it seems to help. So, we force it. +-IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") +- MY_CHECK_CXX_COMPILER_FLAG( "-moutline-atomics" HAVE_OUTLINE_ATOMICS) +- IF(HAVE_OUTLINE_ATOMICS) +- STRING_APPEND(CMAKE_C_FLAGS " -moutline-atomics") +- STRING_APPEND(CMAKE_CXX_FLAGS " -moutline-atomics") +- ENDIF() +-ENDIF() ++#IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") ++# MY_CHECK_CXX_COMPILER_FLAG( "-moutline-atomics" HAVE_OUTLINE_ATOMICS) ++# IF(HAVE_OUTLINE_ATOMICS) ++# STRING_APPEND(CMAKE_C_FLAGS " -moutline-atomics") ++# STRING_APPEND(CMAKE_CXX_FLAGS " -moutline-atomics") ++# ENDIF() ++#ENDIF() + + IF(LINUX) + OPTION(LINK_RANDOMIZE "Randomize the order of all symbols in the binary" OFF) +-- +2.23.0 + diff --git a/mysql-boost-8.0.22.tar.gz b/mysql-boost-8.0.23.tar.gz similarity index 90% rename from mysql-boost-8.0.22.tar.gz rename to mysql-boost-8.0.23.tar.gz index 6c3ca81d65cc5ac4e5c85102adfc20e02432dba9..3e9a61bf9cad844b0f19b027851220cc2162241c 100644 Binary files a/mysql-boost-8.0.22.tar.gz and b/mysql-boost-8.0.23.tar.gz differ diff --git a/mysql-fix-includes-robin-hood.patch b/mysql-fix-includes-robin-hood.patch new file mode 100644 index 0000000000000000000000000000000000000000..0aca3ef5e8743d074abc9c3d944c70ee128e05a8 --- /dev/null +++ b/mysql-fix-includes-robin-hood.patch @@ -0,0 +1,13 @@ +# Prevents fails when compiling with gcc11 (Fedora 34) +# Upstream PR: https://github.com/mysql/mysql-server/pull/323 + +--- mysql-8.0.23/extra/robin-hood-hashing/robin_hood.h.old 2021-02-04 17:15:31.034997221 +0100 ++++ mysql-8.0.23/extra/robin-hood-hashing/robin_hood.h 2021-02-04 17:15:50.781372066 +0100 +@@ -48,6 +48,7 @@ + #include + #include + #include ++#include + #if __cplusplus >= 201703L + # include + #endif diff --git a/mysql-main-cast.patch b/mysql-main-cast.patch new file mode 100644 index 0000000000000000000000000000000000000000..c078fae0603542419b9f4b1e50930484538c78bc --- /dev/null +++ b/mysql-main-cast.patch @@ -0,0 +1,48 @@ +commit 68730acd9ae7ae8b2fcd25b5ccd18d47038d00b9 +Author: Catalin Besleaga +Date: Mon Jan 4 14:32:05 2021 +0100 + + WL#14015: Follow-up: fixed unstable test + + Change-Id: I11f352168902c6689981131cfda3a87ba924941c + +diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result +index af82329a9c5..4d81ef111cb 100644 +--- a/mysql-test/r/cast.result ++++ b/mysql-test/r/cast.result +@@ -1747,6 +1747,7 @@ CAST("2020extra" AS YEAR) + 2020 + Warnings: + Warning 1292 Truncated incorrect YEAR value: '2020extra' ++SET timestamp = UNIX_TIMESTAMP('2020-12-22 03:30:00'); + SELECT CAST(TIMESTAMP'2010-01-01 00:00' AS YEAR); + CAST(TIMESTAMP'2010-01-01 00:00' AS YEAR) + 2010 +@@ -1764,6 +1765,7 @@ CAST(TIME'08:09:10' AS YEAR) + SELECT CAST(TIME'00:00:00' AS YEAR); + CAST(TIME'00:00:00' AS YEAR) + 2020 ++SET timestamp = DEFAULT; + SELECT CAST(ST_PointFromText('POINT(10 10)') AS YEAR); + ERROR HY000: Incorrect arguments to cast_as_year + CREATE TABLE t AS SELECT CAST("2010" AS YEAR); +diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test +index 1a1f512fca7..a74d79ad91f 100644 +--- a/mysql-test/t/cast.test ++++ b/mysql-test/t/cast.test +@@ -799,6 +799,7 @@ SELECT CAST("extra" AS YEAR); + SELECT CAST("22extra" AS YEAR); + SELECT CAST("2020extra" AS YEAR); + ++SET timestamp = UNIX_TIMESTAMP('2020-12-22 03:30:00'); + #date[time] values + SELECT CAST(TIMESTAMP'2010-01-01 00:00' AS YEAR); + SET SQL_MODE = ""; +@@ -807,6 +808,7 @@ SET SQL_MODE = default; + SELECT CAST(TIMESTAMP'2010-01-01 08:09:10' AS YEAR); + SELECT CAST(TIME'08:09:10' AS YEAR); + SELECT CAST(TIME'00:00:00' AS YEAR); ++SET timestamp = DEFAULT; + + #geometry values + --error ER_WRONG_ARGUMENTS diff --git a/mysql.spec b/mysql.spec index 83e0993778e379eb52f51cdcb26e620d2f193e2e..c8df2724bb9dd3ee182abe1879c3312d398c4201 100644 --- a/mysql.spec +++ b/mysql.spec @@ -6,7 +6,7 @@ %global pkgnamepatch mysql %global boost_bundled_version 1.73.0 Name: mysql -Version: 8.0.22 +Version: 8.0.23 Release: 1 License: GPLv2 with exceptions and LGPLv2 and BSD Summary: The world's most popular open source database @@ -23,10 +23,13 @@ Patch9:%{pkgnamepatch}-arm32-timer.patch Patch10:%{pkgnamepatch}-gcc11.patch Patch11:boost-1.58.0-pool.patch Patch12:boost-1.57.0-mpl-print.patch +Patch13:%{pkgnamepatch}-main-cast.patch +Patch14:%{pkgnamepatch}-fix-includes-robin-hood.patch +Patch15:disable-moutline-atomics-for-aarch64.patch -BuildRequires: cmake openssl-devel ncurses-devel libtirpc-devel rpcgen +BuildRequires: cmake openssl-devel ncurses-devel libtirpc-devel rpcgen libcurl-devel make -Requires: libatomic >= 1.2.0 libstdc++ >= 7.3.0 ncurses libtirpc openssl +Requires: libatomic >= 1.2.0 libstdc++ >= 7.3.0 ncurses libtirpc openssl ldconfig %description The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, @@ -53,6 +56,9 @@ further info. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 pushd boost/boost_$(echo %{boost_bundled_version}| tr . _) %patch11 -p0 %patch12 -p1 @@ -85,6 +91,11 @@ if [ -f %{_prefix}/local/%{name}/support-files/mysql.server > /dev/null 2>&1 ] chkconfig --level 2345 mysql on fi +if [ -e %{_prefix}/local/%{name}/lib/private ];then + echo "%{_prefix}/local/%{name}/lib/private" > %{_sysconfdir}/ld.so.conf.d/%{name}.conf + ldconfig +fi + %preun if [ -f %{_sysconfdir}/my.cnf ];then mv %{_sysconfdir}/my.cnf %{_sysconfdir}/my.cnf.rpmold @@ -92,9 +103,17 @@ fi if [ -f %{_initddir}/mysql ];then mv %{_initddir}/mysql %{_initddir}/mysql.rpmold fi +if [ "$1" = 0 ];then + if [ -f %{_sysconfdir}/ld.so.conf.d/%{name}.conf ];then + rm -f %{_sysconfdir}/ld.so.conf.d/%{name}.conf + ldconfig + fi +fi %postun -userdel -r %{name} &>/dev/null +if [ "$1" = 0 ];then + userdel -r %{name} &>/dev/null +fi %files %dir %{_prefix}/local/%{name} @@ -103,6 +122,20 @@ userdel -r %{name} &>/dev/null %exclude /usr/lib/debug %changelog +* Wed Mar 10 2021 wangxiao 8.0.23-1 +- Upgrade mysql to 8.0.23, fix CVES: CVE-2021-1998 CVE-2021-2002 + CVE-2021-2010 CVE-2021-2011 CVE-2021-2016 CVE-2021-2021 CVE-2021-2022 + CVE-2021-2024 CVE-2021-2031 CVE-2021-2032 CVE-2021-2036 CVE-2021-2038 + CVE-2021-2046 CVE-2021-2048 CVE-2021-2056 CVE-2021-2058 CVE-2021-2060 + CVE-2021-2061 CVE-2021-2065 CVE-2021-2070 CVE-2021-2072 CVE-2021-2076 + CVE-2021-2081 CVE-2021-2087 CVE-2021-2088 CVE-2021-2122 + +* Tue Dec 1 2020 weishengjing 8.0.22-3 +- modify symbol issues of spec + +* Mon Nov 30 2020 weishengjing 8.0.22-2 +- add libprotobuf-lite.so to /usr/lib64 + * Wed Nov 18 2020 weishengjing 8.0.22-1 - New version 8.0.22 fix CVES: CVE-2020-14852 CVE-2020-14794 CVE-2020-14775 CVE-2020-14893 CVE-2020-14829 CVE-2020-14828 CVE-2020-14888 CVE-2020-14891