diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..ba4f9346346896bba949a0198b74fc95942d2c9b --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +mysql-boost-8.0.22.tar.gz filter=lfs diff=lfs merge=lfs -text diff --git a/boost-1.57.0-mpl-print.patch b/boost-1.57.0-mpl-print.patch new file mode 100644 index 0000000000000000000000000000000000000000..561cef19eb23fc79b060b21f9664c99811d9913c --- /dev/null +++ b/boost-1.57.0-mpl-print.patch @@ -0,0 +1,31 @@ +diff -up boost_1_57_0/boost/mpl/print.hpp\~ boost_1_57_0/boost/mpl/print.hpp +--- boost_1_57_0/boost/mpl/print.hpp~ 2014-07-09 23:12:31.000000000 +0200 ++++ boost_1_57_0/boost/mpl/print.hpp 2015-01-20 12:44:59.621400948 +0100 +@@ -52,16 +52,15 @@ struct print + enum { n = sizeof(T) + -1 }; + #elif defined(__MWERKS__) + void f(int); +-#else +- enum { +- n = +-# if defined(__EDG_VERSION__) +- aux::dependent_unsigned::value > -1 +-# else +- sizeof(T) > -1 +-# endif +- }; +-#endif ++#elif defined(__EDG_VERSION__) ++ enum { n = aux::dependent_unsigned::value > -1 }; ++#elif defined(BOOST_GCC) ++ enum { n1 }; ++ enum { n2 }; ++ enum { n = n1 != n2 }; ++#else ++ enum { n = sizeof(T) > -1 }; ++#endif + }; + + #if defined(BOOST_MSVC) + +Diff finished. Tue Jan 20 12:45:03 2015 diff --git a/boost-1.58.0-pool.patch b/boost-1.58.0-pool.patch new file mode 100644 index 0000000000000000000000000000000000000000..ed8449ef0f8a847b9c6b756064a0f21602d04d8d --- /dev/null +++ b/boost-1.58.0-pool.patch @@ -0,0 +1,120 @@ +Index: boost/pool/pool.hpp +=================================================================== +--- boost/pool/pool.hpp (revision 78317) ++++ boost/pool/pool.hpp (revision 78326) +@@ -27,4 +27,6 @@ + #include + ++// std::numeric_limits ++#include + // boost::integer::static_lcm + #include +@@ -358,4 +360,11 @@ + } + ++ size_type max_chunks() const ++ { //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool. ++ size_type partition_size = alloc_size(); ++ size_type POD_size = integer::static_lcm::value + sizeof(size_type); ++ return (std::numeric_limits::max() - POD_size) / alloc_size(); ++ } ++ + static void * & nextof(void * const ptr) + { //! \returns Pointer dereferenced. +@@ -377,5 +388,7 @@ + //! the first time that object needs to allocate system memory. + //! The default is 32. This parameter may not be 0. +- //! \param nmax_size is the maximum number of chunks to allocate in one block. ++ //! \param nmax_size is the maximum number of chunks to allocate in one block. ++ set_next_size(nnext_size); ++ set_max_size(nmax_size); + } + +@@ -400,7 +413,7 @@ + } + void set_next_size(const size_type nnext_size) +- { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0. +- //! \returns nnext_size. +- next_size = start_size = nnext_size; ++ { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0. ++ BOOST_USING_STD_MIN(); ++ next_size = start_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nnext_size, max_chunks()); + } + size_type get_max_size() const +@@ -410,5 +423,6 @@ + void set_max_size(const size_type nmax_size) + { //! Set max_size. +- max_size = nmax_size; ++ BOOST_USING_STD_MIN(); ++ max_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nmax_size, max_chunks()); + } + size_type get_requested_size() const +@@ -713,7 +727,7 @@ + BOOST_USING_STD_MIN(); + if(!max_size) +- next_size <<= 1; ++ set_next_size(next_size << 1); + else if( next_size*partition_size/requested_size < max_size) +- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); ++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size)); + + // initialize it, +@@ -753,7 +767,7 @@ + BOOST_USING_STD_MIN(); + if(!max_size) +- next_size <<= 1; ++ set_next_size(next_size << 1); + else if( next_size*partition_size/requested_size < max_size) +- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); ++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size)); + + // initialize it, +@@ -797,4 +811,6 @@ + //! \returns Address of chunk n if allocated ok. + //! \returns 0 if not enough memory for n chunks. ++ if (n > max_chunks()) ++ return 0; + + const size_type partition_size = alloc_size(); +@@ -845,7 +861,7 @@ + BOOST_USING_STD_MIN(); + if(!max_size) +- next_size <<= 1; ++ set_next_size(next_size << 1); + else if( next_size*partition_size/requested_size < max_size) +- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); ++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size)); + + // insert it into the list, +Index: libs/pool/test/test_bug_6701.cpp +=================================================================== +--- libs/pool/test/test_bug_6701.cpp (revision 78326) ++++ libs/pool/test/test_bug_6701.cpp (revision 78326) +@@ -0,0 +1,27 @@ ++/* Copyright (C) 2012 Étienne Dupuis ++* ++* Use, modification and distribution is subject to the ++* Boost Software License, Version 1.0. (See accompanying ++* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) ++*/ ++ ++// Test of bug #6701 (https://svn.boost.org/trac/boost/ticket/6701) ++ ++#include ++#include ++ ++int main() ++{ ++ boost::pool<> p(1024, std::numeric_limits::max() / 768); ++ ++ void *x = p.malloc(); ++ BOOST_ASSERT(!x); ++ ++ BOOST_ASSERT(std::numeric_limits::max() / 1024 >= p.get_next_size()); ++ BOOST_ASSERT(std::numeric_limits::max() / 1024 >= p.get_max_size()); ++ ++ void *y = p.ordered_malloc(std::numeric_limits::max() / 768); ++ BOOST_ASSERT(!y); ++ ++ return 0; ++} diff --git a/mysql-arm32-timer.patch b/mysql-arm32-timer.patch new file mode 100644 index 0000000000000000000000000000000000000000..5bc7f67eb7a156a3e0432d9d893d6a33f7057af1 --- /dev/null +++ b/mysql-arm32-timer.patch @@ -0,0 +1,14 @@ +--- 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: "), + ++ /* ++ ARM32 don't support timers and get this warning in every test. ++ */ ++ ("The CYCLE timer is not available. WAIT events in the performance_schema will not be timed."), ++ + ("THE_LAST_SUPPRESSION"); + + diff --git a/mysql-boost-8.0.21.tar.gz b/mysql-boost-8.0.21.tar.gz deleted file mode 100644 index f4d8942d00c9818db82cff311f4eaaa8612a801e..0000000000000000000000000000000000000000 Binary files a/mysql-boost-8.0.21.tar.gz and /dev/null differ diff --git a/mysql-boost-8.0.22.tar.gz b/mysql-boost-8.0.22.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f6f98baad4cda1e893bbaee36bd06eb8d6a91ccc --- /dev/null +++ b/mysql-boost-8.0.22.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba765f74367c638d7cd1c546c05c14382fd997669bcd9680278e907f8d7eb484 +size 285934450 diff --git a/mysql-chain-certs.patch b/mysql-chain-certs.patch new file mode 100644 index 0000000000000000000000000000000000000000..0ce41c105b18df9b7bbd473a8051738453c61c90 --- /dev/null +++ b/mysql-chain-certs.patch @@ -0,0 +1,24 @@ +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 R-H/ +Fe 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)); diff --git a/mysql-file-contents.patch b/mysql-file-contents.patch new file mode 100644 index 0000000000000000000000000000000000000000..0f1cdbae82a676d70c8d5acb8cd98a6622ea8131 --- /dev/null +++ b/mysql-file-contents.patch @@ -0,0 +1,45 @@ +Upstream chooses to install INFO_SRC and INFO_BIN into the docs dir, which +breaks at least two packaging commandments, so we put them into $libdir +instead. That means we have to hack the file_contents regression test +to know about this. + +Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425 + +diff --git a/mysql-test/t/file_contents.test b/mysql-test/t/file_contents.test +index 75f8c93..973291c 100644 +--- a/mysql-test/t/file_contents.test ++++ b/mysql-test/t/file_contents.test +@@ -12,7 +12,7 @@ + --perl + print "\nChecking 'INFO_SRC' and 'INFO_BIN'\n"; + $dir_bin = $ENV{'MYSQL_BINDIR'}; +-if ($dir_bin =~ m|^/usr/|) { ++if ($dir_bin =~ m|.*/usr/$|) { + # RPM package + $dir_docs = $dir_bin; + $dir_docs =~ s|/lib|/share/doc|; +@@ -35,7 +35,7 @@ if ($dir_bin =~ m|^/usr/|) { + } + } + } +-} elsif ($dir_bin =~ m|/usr$|) { ++} elsif ($dir_bin =~ m|.*/usr$|) { + # RPM build during development + $dir_docs = "$dir_bin/share/doc"; + if(-d "$dir_docs/packages") { +@@ -55,6 +55,15 @@ if ($dir_bin =~ m|^/usr/|) { + $dir_docs = glob "$dir_bin/share/mysql-*/docs"; + } + } ++ ++ # All the above is entirely wacko, because these files are not docs; ++ # they should be kept in libdir instead. mtr does not provide a nice ++ # way to find libdir though, so we have to kluge it like this: ++ if (-d "$dir_bin/lib64/mysql") { ++ $dir_docs = "$dir_bin/lib64/mysql"; ++ } else { ++ $dir_docs = "$dir_bin/lib/mysql"; ++ } + } + } else { + # tar.gz package, Windows, or developer work (in git) diff --git a/mysql-gcc11.patch b/mysql-gcc11.patch new file mode 100644 index 0000000000000000000000000000000000000000..8a030a8066cf028248d5d7082b2287626ad1aa34 --- /dev/null +++ b/mysql-gcc11.patch @@ -0,0 +1,25 @@ +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 + #include ++#include + + #include + +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 ++#include + + #include "my_dbug.h" + #include "my_macros.h" diff --git a/mysql-install-test.patch b/mysql-install-test.patch new file mode 100644 index 0000000000000000000000000000000000000000..1f671324c69cf85560d2f269d79b251e9cf8b7c5 --- /dev/null +++ b/mysql-install-test.patch @@ -0,0 +1,52 @@ +Improve the documentation that will be installed in the mysql-test RPM. + + +diff -Naur mysql-5.5.20.orig/mysql-test/README mysql-5.5.20/mysql-test/README +--- mysql-5.5.20.orig/mysql-test/README 2011-12-16 14:52:05.000000000 -0500 ++++ mysql-5.5.20/mysql-test/README 2012-02-10 17:06:19.531082253 -0500 +@@ -1,14 +1,26 @@ + This directory contains a test suite for the MySQL daemon. To run +-the currently existing test cases, simply execute ./mysql-test-run in +-this directory. It will fire up the newly built mysqld and test it. ++the currently existing test cases, execute ./mysql-test-run in ++this directory. + +-Note that you do not have to have to do "make install", and you could +-actually have a co-existing MySQL installation. The tests will not +-conflict with it. +- +-All tests must pass. If one or more of them fail on your system, please +-read the following manual section for instructions on how to report the +-problem: ++For use in Red Hat distributions, you should run the script as user mysql, ++so the best bet is something like ++ cd /usr/share/mysql-test ++ sudo -u mysql ./mysql-test-run --skip-test-list=platform-specific-tests.list ++This will use the installed mysql executables, but will run a private copy ++of the server process (using data files within /usr/share/mysql-test), ++so you need not start the mysqld service beforehand. ++ ++The "--skip-test-list=platform-specific-tests.list" option excludes tests that are ++known to fail on one or more Red-Hat-supported platforms. You can omit it ++if you want to check whether such failures occur for you. Documentation ++about the reasons for omitting such tests can be found in the file ++platform-specific-tests.list. ++ ++To clean up afterwards, remove the created "var" subdirectory, eg ++ sudo -u mysql rm -rf /usr/share/mysql-test/var ++ ++If one or more tests fail on your system, please read the following manual ++section for instructions on how to report the problem: + + http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html + +@@ -25,7 +37,8 @@ + + With no test cases named on the command line, mysql-test-run falls back + to the normal "non-extern" behavior. The reason for this is that some +-tests cannot run with an external server. ++tests cannot run with an external server (because they need to control the ++options with which the server is started). + + + You can create your own test cases. To create a test case, create a new diff --git a/mysql-paths.patch b/mysql-paths.patch new file mode 100644 index 0000000000000000000000000000000000000000..d5978b6e9e2e04d103f33b3b983a5c0d821eac65 --- /dev/null +++ b/mysql-paths.patch @@ -0,0 +1,77 @@ +Some hard-coded paths make problems when package is built into chroot like +Software Collections. Removing these hard-coded paths should fix it. + +Upstream report: https://mariadb.atlassian.net/browse/MDEV-6485 + +diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake +index 9f7945d8..6734cdfd 100644 +--- a/cmake/install_layout.cmake ++++ b/cmake/install_layout.cmake +@@ -105,7 +105,7 @@ IF(UNIX) + " Choose between ${VALID_INSTALL_LAYOUTS}" ) + ENDIF() + +- SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc" ++ SET(SYSCONFDIR "/etc" + CACHE PATH "config directory (for my.cnf)") + MARK_AS_ADVANCED(SYSCONFDIR) + ENDIF() +@@ -189,6 +189,7 @@ SET(INSTALL_SECURE_FILE_PRIVDIR_TARGZ ${secure_file_priv_path}) + # + SET(INSTALL_BINDIR_RPM "bin") + SET(INSTALL_SBINDIR_RPM "sbin") ++SET(INSTALL_SYSCONFDIR_RPM "/etc") + # + IF(CMAKE_SYSTEM_PROCESSOR IN_LIST KNOWN_64BIT_ARCHITECTURES) + SET(INSTALL_LIBDIR_RPM "lib64/mysql") +diff --git a/mysys/my_default.cc b/mysys/my_default.cc +index 290f1666..8403425f 100644 +--- a/mysys/my_default.cc ++++ b/mysys/my_default.cc +@@ -1570,12 +1570,12 @@ static const char **init_default_directories(MEM_ROOT *alloc) { + + #else + +- errors += add_directory(alloc, "/etc/", dirs); +- errors += add_directory(alloc, "/etc/mysql/", dirs); +- + #if defined(DEFAULT_SYSCONFDIR) + if (DEFAULT_SYSCONFDIR[0]) ++ { + errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs); ++ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs); ++ } + #endif /* DEFAULT_SYSCONFDIR */ + + #endif +diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt +index 4149a764..b091d5e2 100644 +--- a/scripts/CMakeLists.txt ++++ b/scripts/CMakeLists.txt +@@ -288,9 +288,9 @@ IF(UNIX) + ENDIF(UNIX) + + SET(prefix "${CMAKE_INSTALL_PREFIX}") +-SET(sysconfdir ${prefix}) ++SET(sysconfdir ${SYSCONFDIR}) + SET(bindir ${prefix}/${INSTALL_BINDIR}) +-SET(libexecdir ${prefix}/${INSTALL_SBINDIR}) ++SET(libexecdir ${prefix}/${INSTALL_LIBEXECDIR}) + SET(datadir ${prefix}/${INSTALL_MYSQLSHAREDIR}) + SET(libsubdir ${INSTALL_LIBDIR}) + SET(pkgincludedir ${prefix}/${INSTALL_INCLUDEDIR}) +diff --git a/scripts/mysqld_multi.pl.in b/scripts/mysqld_multi.pl.in +index 84dd4d7c..50397ddd 100644 +--- a/scripts/mysqld_multi.pl.in ++++ b/scripts/mysqld_multi.pl.in +@@ -586,9 +586,7 @@ sub list_defaults_files + + my %seen; # Don't list the same file more than once + return grep { defined $_ and not $seen{$_}++ and -f $_ and -r $_ } +- ('/etc/my.cnf', +- '/etc/mysql/my.cnf', +- '@sysconfdir@/my.cnf', ++ ('@sysconfdir@/my.cnf', + ($ENV{MYSQL_HOME} ? "$ENV{MYSQL_HOME}/my.cnf" : undef), + $opt{'extra-file'}, + ($ENV{HOME} ? "$ENV{HOME}/.my.cnf" : undef)); diff --git a/mysql-rpath.patch b/mysql-rpath.patch new file mode 100644 index 0000000000000000000000000000000000000000..16d5bc42aab7943b3c85c9b265398c715fd5f388 --- /dev/null +++ b/mysql-rpath.patch @@ -0,0 +1,19 @@ +MySQL 8.0 includes a feature that requires we set linux NICE capabilities to +mysqld daemon. Because of that, LD_LIBRARY_PATH does not work (see +secure-execution mode in http://man7.org/linux/man-pages/man8/ld.so.8.html). + +Related: #1628814 + +diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt +index 3f179a7a..209b3eb2 100644 +--- a/sql/CMakeLists.txt ++++ b/sql/CMakeLists.txt +@@ -918,6 +918,8 @@ IF(UNIX_INSTALL_RPATH_ORIGIN_PRIV_LIBDIR) + ADD_INSTALL_RPATH_FOR_PROTOBUF(mysqld) + ENDIF() + ++SET_TARGET_PROPERTIES(mysqld PROPERTIES INSTALL_RPATH "${RPATH_LIBDIR}") ++ + OPTION(DEBUG_EXTNAME "Build server as mysqld-debug (debug builds only)" OFF) + MARK_AS_ADVANCED(DEBUG_EXTNAME) + diff --git a/mysql-sharedir.patch b/mysql-sharedir.patch new file mode 100644 index 0000000000000000000000000000000000000000..fa0dc72e746cb9b896c6c3f18486ff8531357ab3 --- /dev/null +++ b/mysql-sharedir.patch @@ -0,0 +1,27 @@ +diff --git a/mysql-test/CMakeLists.txt b/mysql-test/CMakeLists.txt +index f77bd022..a3a3bd9f 100644 +--- a/mysql-test/CMakeLists.txt ++++ b/mysql-test/CMakeLists.txt +@@ -57,6 +57,9 @@ IF(INSTALL_MYSQLTESTDIR) + ENDIF() + + ++# Expand some paths in the perl script correctly ++CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql-test-run.pl ${CMAKE_CURRENT_SOURCE_DIR}/mysql-test-run.pl @ONLY) ++ + IF(NOT ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + # Enable running mtr from build directory + FIND_PROGRAM(PERL_EXECUTABLE perl +diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl +index b82611fd..7fc5987e 100755 +--- a/mysql-test/mysql-test-run.pl ++++ b/mysql-test/mysql-test-run.pl +@@ -1656,7 +1656,7 @@ sub command_line_setup { + my $path_share = $path_language; + + @share_locations = +- ("share/mysql-" . $mysql_base_version, "share/mysql", "share"); ++ ("@INSTALL_MYSQLSHAREDIR@", "share/mysql-" . $mysql_base_version, "share/mysql", "share"); + + $path_charsetsdir = my_find_dir($basedir, \@share_locations, "charsets"); + diff --git a/mysql.rpmlintrc b/mysql.rpmlintrc new file mode 100644 index 0000000000000000000000000000000000000000..605529e380daa3bf3d51b2a776ac0cf8c3d38a39 --- /dev/null +++ b/mysql.rpmlintrc @@ -0,0 +1,37 @@ +# 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') diff --git a/mysql.spec b/mysql.spec index 0ad0945f1840814139503c36a7ee7d855fb92c2d..83e0993778e379eb52f51cdcb26e620d2f193e2e 100644 --- a/mysql.spec +++ b/mysql.spec @@ -3,16 +3,29 @@ %define __debug_install_post \ %{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\ %{nil} - +%global pkgnamepatch mysql +%global boost_bundled_version 1.73.0 Name: mysql -Version: 8.0.21 -Release: 2 -License: GPLv2 +Version: 8.0.22 +Release: 1 +License: GPLv2 with exceptions and LGPLv2 and BSD Summary: The world's most popular open source database URL: http://www.mysql.com/ Source0: https://cdn.mysql.com/archives/%{name}-8.0/%{name}-boost-%{version}.tar.gz -Patch0000: 0000-mysql-add-fstack-protector-strong.patch -BuildRequires: cmake openssl-devel ncurses-devel libtirpc-devel rpcgen +Patch0:0000-mysql-add-fstack-protector-strong.patch +Patch1:%{pkgnamepatch}-install-test.patch +Patch3:%{pkgnamepatch}-file-contents.patch +Patch5:%{pkgnamepatch}-paths.patch +Patch6:%{pkgnamepatch}-chain-certs.patch +Patch7:%{pkgnamepatch}-sharedir.patch +Patch8:%{pkgnamepatch}-rpath.patch +Patch9:%{pkgnamepatch}-arm32-timer.patch +Patch10:%{pkgnamepatch}-gcc11.patch +Patch11:boost-1.58.0-pool.patch +Patch12:boost-1.57.0-mpl-print.patch + +BuildRequires: cmake openssl-devel ncurses-devel libtirpc-devel rpcgen + Requires: libatomic >= 1.2.0 libstdc++ >= 7.3.0 ncurses libtirpc openssl %description @@ -30,22 +43,33 @@ the GPL. See the chapter "Licensing and Support" in the manual for further info. %prep -%autosetup -n %{name}-%{version} -p1 +%setup -q -n %{name}-%{version} +%patch0 -p1 +%patch1 -p1 +%patch3 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +pushd boost/boost_$(echo %{boost_bundled_version}| tr . _) +%patch11 -p0 +%patch12 -p1 +popd %build cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mysql/data -DSYSCONFDIR=/etc \ -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 \ -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 \ -DENABLED_LOCAL_INFILE=1 -DENABLE_DTRACE=0 -DDEFAULT_CHARSET=utf8mb4 -DDEFAULT_COLLATION=utf8mb4_general_ci \ - -DWITH_EMBEDDED_SERVER=1 -DCMAKE_C_COMPILER=/usr/bin/gcc -DDOWNLOAD_BOOST=1 -DWITH_BOOST=./boost -DFORCE_INSOURCE_BUILD=1 + -DWITH_EMBEDDED_SERVER=1 -DCMAKE_C_COMPILER=/usr/bin/gcc -DDOWNLOAD_BOOST=1 -DWITH_BOOST=./boost -DFORCE_INSOURCE_BUILD=1 + %make_build %install %make_install -#rm -rf %{buildroot}/usr/lib/debug -#rm -rf %{buildroot}/usr/src/debug - %clean rm -rf %{buildroot} @@ -79,6 +103,19 @@ userdel -r %{name} &>/dev/null %exclude /usr/lib/debug %changelog +* 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 + CVE-2020-14812 CVE-2020-14870 CVE-2020-14769 CVE-2020-14878 CVE-2020-14789 + CVE-2020-14821 CVE-2020-14844 CVE-2020-14836 CVE-2020-14830 CVE-2020-14827 + CVE-2020-14773 CVE-2020-14765 CVE-2020-14869 CVE-2020-14776 CVE-2020-14861 + CVE-2020-14866 CVE-2020-14672 CVE-2020-14837 CVE-2020-14771 CVE-2020-14785 + CVE-2020-14838 CVE-2020-14848 CVE-2020-14791 CVE-2020-14793 CVE-2020-14804 + CVE-2020-14777 CVE-2020-14800 CVE-2020-14786 CVE-2020-14845 CVE-2020-14839 + CVE-2020-14846 CVE-2020-14867 CVE-2020-14868 CVE-2020-14873 CVE-2020-14860 + CVE-2020-14814 CVE-2020-14790 CVE-2020-14809 + + * Wed Aug 12 10:56:06 CST 2020 Guoshuai Sun 8.0.21-2 - New version 8.0.21 fix CVES: CVE-2020-14575 CVE-2020-14567 CVE-2020-14619 CVE-2020-14651 CVE-2020-14641 CVE-2020-14568 CVE-2020-14623 CVE-2020-14591 @@ -90,7 +127,7 @@ userdel -r %{name} &>/dev/null * Sat Aug 8 2020 Guoshuai Sun 8.0.21-1 - Upgrade to 8.0.21 and fix the upgrade bug in old version -* Wed Mar 1 2020 zhangtao 8.0.17-3 +* Sun Mar 1 2020 zhangtao 8.0.17-3 - add fstack-protector-strong * Fri Feb 28 2020 catastrowings 8.0.17-2