From da608bb7673207e574610ab4ceae97a34615966c Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Tue, 18 Jul 2023 20:33:26 +0200 Subject: [PATCH] - updated to 5.7.42-46 --- build.patch | 26 ++++++++--------- mysql.spec | 12 ++++---- openssl-3.patch | 76 ------------------------------------------------- 3 files changed, 18 insertions(+), 96 deletions(-) delete mode 100644 openssl-3.patch diff --git a/build.patch b/build.patch index f3dbd71..cbd9439 100644 --- a/build.patch +++ b/build.patch @@ -1,8 +1,8 @@ -diff -ur percona-server-5.7.35-38.orig/cmake/maintainer.cmake percona-server-5.7.35-38/cmake/maintainer.cmake ---- percona-server-5.7.35-38.orig/cmake/maintainer.cmake 2021-11-25 00:03:41.234897661 +0100 -+++ percona-server-5.7.35-38/cmake/maintainer.cmake 2021-11-25 00:05:01.649091453 +0100 -@@ -37,12 +37,6 @@ - "${MY_CXX_WARNING_FLAGS} -Wno-null-conversion -Wno-unused-private-field") +diff -urNp -x '*.orig' percona-server-5.7.42-46.org/cmake/maintainer.cmake percona-server-5.7.42-46/cmake/maintainer.cmake +--- percona-server-5.7.42-46.org/cmake/maintainer.cmake 2023-05-29 10:24:29.000000000 +0200 ++++ percona-server-5.7.42-46/cmake/maintainer.cmake 2023-07-18 18:19:10.520022888 +0200 +@@ -45,12 +45,6 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" + STRING_APPEND(MY_CXX_WARNING_FLAGS " -Wno-unused-parameter -Wno-unused-but-set-variable") ENDIF() -# Turn on Werror (warning => error) when using maintainer mode. @@ -14,10 +14,10 @@ diff -ur percona-server-5.7.35-38.orig/cmake/maintainer.cmake percona-server-5.7 # Set warning flags for GCC/Clang IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") STRING_APPEND(CMAKE_C_FLAGS " ${MY_C_WARNING_FLAGS}") -diff -ur percona-server-5.7.35-38.orig/storage/rocksdb/CMakeLists.txt percona-server-5.7.35-38/storage/rocksdb/CMakeLists.txt ---- percona-server-5.7.35-38.orig/storage/rocksdb/CMakeLists.txt 2021-11-25 00:03:45.359907607 +0100 -+++ percona-server-5.7.35-38/storage/rocksdb/CMakeLists.txt 2021-11-25 00:04:04.352953376 +0100 -@@ -57,7 +57,7 @@ +diff -urNp -x '*.orig' percona-server-5.7.42-46.org/storage/rocksdb/CMakeLists.txt percona-server-5.7.42-46/storage/rocksdb/CMakeLists.txt +--- percona-server-5.7.42-46.org/storage/rocksdb/CMakeLists.txt 2023-07-18 18:18:54.474790338 +0200 ++++ percona-server-5.7.42-46/storage/rocksdb/CMakeLists.txt 2023-07-18 18:19:10.520022888 +0200 +@@ -57,7 +57,7 @@ ELSE() # get a list of rocksdb library source files # run with env -i to avoid passing variables EXECUTE_PROCESS( @@ -26,10 +26,10 @@ diff -ur percona-server-5.7.35-38.orig/storage/rocksdb/CMakeLists.txt percona-se OUTPUT_VARIABLE SCRIPT_OUTPUT WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) -diff -ur percona-server-5.7.35-38.orig/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake percona-server-5.7.35-38/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake ---- percona-server-5.7.35-38.orig/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake 2021-11-25 00:03:46.402910121 +0100 -+++ percona-server-5.7.35-38/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake 2021-11-25 00:04:04.352953376 +0100 -@@ -221,10 +221,6 @@ +diff -urNp -x '*.orig' percona-server-5.7.42-46.org/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake percona-server-5.7.42-46/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake +--- percona-server-5.7.42-46.org/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake 2023-05-29 14:06:14.000000000 +0200 ++++ percona-server-5.7.42-46/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake 2023-07-18 18:19:10.520022888 +0200 +@@ -221,10 +221,6 @@ if (NOT CMAKE_CXX_COMPILER_ID STREQUAL C prepend_cflags_if_supported_remove_unsupported(-Wcast-align) endif () diff --git a/mysql.spec b/mysql.spec index 547ee30..f1b667e 100644 --- a/mysql.spec +++ b/mysql.spec @@ -31,7 +31,7 @@ %bcond_without tcpd # libwrap (tcp_wrappers) support %bcond_with sphinx # Sphinx storage engine support %bcond_with tokudb # TokuDB -%bcond_without rocksdb # RocksDB +%bcond_with rocksdb # RocksDB # mysql needs boost 1.59.0 and doesn't support newer/older boost versions %bcond_with system_boost # Use system boost package %bcond_with tests # FIXME: don't run correctly @@ -45,7 +45,7 @@ %endif %define rel 1 -%define percona_rel 41 +%define percona_rel 46 Summary: MySQL: a very fast and reliable SQL database engine Summary(de.UTF-8): MySQL: ist eine SQL-Datenbank Summary(fr.UTF-8): MySQL: un serveur SQL rapide et fiable @@ -55,12 +55,12 @@ Summary(ru.UTF-8): MySQL - быстрый SQL-сервер Summary(uk.UTF-8): MySQL - швидкий SQL-сервер Summary(zh_CN.UTF-8): MySQL数据库服务器 Name: mysql -Version: 5.7.38 +Version: 5.7.42 Release: %{percona_rel}.%{rel} License: GPL + MySQL FLOSS Exception Group: Applications/Databases Source0: https://www.percona.com/downloads/Percona-Server-5.7/LATEST/source/tarball/percona-server-%{version}-%{percona_rel}.tar.gz -# Source0-md5: 4d499d3881a2496db2d537d6c9ff30ce +# Source0-md5: 6f937a7fe774edad0213a75e34df19d5 Source100: http://www.sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz # Source100-md5: 5cac34f3d78a9d612ca4301abfcbd666 %if %{without system_boost} @@ -89,7 +89,6 @@ Patch5: mysql-5.7-sphinx.patch Patch6: mysql-chain-certs.patch Patch7: mysql-dubious-exports.patch Patch8: mysql-cmake.patch -Patch9: openssl-3.patch URL: https://www.percona.com/software/mysql-database/percona-server BuildRequires: bison >= 1.875 BuildRequires: cmake >= 2.8.2 @@ -509,7 +508,6 @@ sed -i -e 's#perconaserverclient#mysqlclient#g' libmysql/libmysql.{ver.in,map} s %patch6 -p1 %patch7 -p1 %patch8 -p1 -#%patch9 -p1 # to get these files rebuild [ -f sql/sql_yacc.cc ] && %{__rm} sql/sql_yacc.cc @@ -703,7 +701,7 @@ rm -rf $RPM_BUILD_ROOT %pre %groupadd -g 89 mysql -%useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql +%useradd -u 89 -d %{_mysqlhome} -s /bin/false -g mysql -c "MySQL Server" mysql %post /sbin/ldconfig diff --git a/openssl-3.patch b/openssl-3.patch deleted file mode 100644 index 79f2f4d..0000000 --- a/openssl-3.patch +++ /dev/null @@ -1,76 +0,0 @@ ---- mysql-5.7.31/cmake/ssl.cmake.orig 2020-06-02 13:05:42.000000000 +0200 -+++ mysql-5.7.31/cmake/ssl.cmake 2021-09-26 10:27:27.431001078 +0200 -@@ -172,20 +172,28 @@ - # #define OPENSSL_VERSION_NUMBER 0x1000103fL - # Encoded as MNNFFPPS: major minor fix patch status - FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" -- OPENSSL_VERSION_NUMBER -- REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*" -+ OPENSSL_VERSION_MAJOR -+ REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_MAJOR[\t ]+([0-9]+).*" - ) - STRING(REGEX REPLACE -- "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1" -- OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}" -+ "^#[ ]*define[\t ]+OPENSSL_VERSION_MAJOR[\t ]+([0-9]+).*" "\\1" -+ OPENSSL_MAJOR_VERSION ${OPENSSL_VERSION_MAJOR} -+ ) -+ FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" -+ OPENSSL_VERSION_MINOR -+ REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_MINOR[\t ]+([0-9]+).*" - ) - STRING(REGEX REPLACE -- "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1" -- OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_NUMBER}" -+ "^#[ ]*define[\t ]+OPENSSL_VERSION_MINOR[\t ]+([0-9]+).*" "\\1" -+ OPENSSL_MINOR_VERSION ${OPENSSL_VERSION_MINOR} -+ ) -+ FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" -+ OPENSSL_VERSION_PATCH -+ REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_PATCH[\t ]+([0-9]+).*" - ) - STRING(REGEX REPLACE -- "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1" -- OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}" -+ "^#[ ]*define[\t ]+OPENSSL_VERSION_PATCH[\t ]+([0-9]+).*" "\\1" -+ OPENSSL_FIX_VERSION ${OPENSSL_VERSION_PATCH} - ) - ENDIF() - SET(OPENSSL_VERSION -@@ -203,7 +211,7 @@ - IF(OPENSSL_INCLUDE_DIR AND - OPENSSL_LIBRARY AND - CRYPTO_LIBRARY AND -- OPENSSL_MAJOR_VERSION STREQUAL "1" -+ (OPENSSL_MAJOR_VERSION STREQUAL "1" OR OPENSSL_MAJOR_VERSION STREQUAL "3") - ) - SET(OPENSSL_FOUND TRUE) - ELSE() ---- percona-server-5.7.31-34/sql/mysqld.cc~ 2020-08-15 11:23:18.000000000 +0200 -+++ percona-server-5.7.31-34/sql/mysqld.cc 2021-09-26 16:17:42.275241856 +0200 -@@ -161,6 +161,7 @@ - - #if defined(HAVE_OPENSSL) - #include -+#include - #endif - - #ifndef EMBEDDED_LIBRARY -@@ -3689,15 +3689,15 @@ - static int init_ssl() - { - #ifdef HAVE_OPENSSL -- int fips_mode= FIPS_mode(); -+ int fips_mode = EVP_default_properties_is_fips_enabled(NULL); - if (fips_mode != 0) - { - /* FIPS is enabled, Log warning and Disable it now */ - sql_print_warning( - "Percona Server cannot operate under OpenSSL FIPS mode." - " Disabling FIPS."); -- FIPS_mode_set(0); -+ EVP_set_default_properties(NULL, "fips=no"); - } - #if OPENSSL_VERSION_NUMBER < 0x10100000L - CRYPTO_malloc_init(); - #else /* OPENSSL_VERSION_NUMBER < 0x10100000L */ -- 2.44.0