%bcond_with systemtap # systemtap/dtrace probes
%bcond_without tcpd # libwrap (tcp_wrappers) support
%bcond_with sphinx # Sphinx storage engine support
-%bcond_without tokudb # TokuDB
+%bcond_with tokudb # TokuDB
%bcond_without 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
%bcond_with ndb # NDB is now a separate product, this here is broken, so disable it
+%bcond_with coredumper # coredumper support
# tokudb is only supported on x86_64
%ifnarch %{x8664}
%undefine with_tokudb
%endif
-%define rel 2
-%define percona_rel 23
-%include /usr/lib/rpm/macros.perl
+%define rel 1
+%define percona_rel 40
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
Summary(uk.UTF-8): MySQL - швидкий SQL-сервер
Summary(zh_CN.UTF-8): MySQL数据库服务器
Name: mysql
-Version: 5.7.23
+Version: 5.7.37
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: 8bf4dca1bd9593803a48c522728ade50
+# Source0-md5: ab5a63fbe6872b719c49f1bbf091c09b
Source100: http://www.sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz
# Source100-md5: 5cac34f3d78a9d612ca4301abfcbd666
%if %{without system_boost}
Source14: my.cnf
Patch0: mysql-opt.patch
Patch1: mysql-versioning.patch
-Patch2: mysql-sphinx.patch
-Patch3: mysql-chain-certs.patch
-# from fedora
-Patch4: mysql-dubious-exports.patch
-Patch5: mysql-cmake.patch
-Patch6: mysql-bug-91914.patch
+Patch2: mysql-protobuf.patch
+Patch3: build.patch
+Patch17: mysql-sphinx.patch
+Patch18: mysql-5.7-sphinx.patch
+Patch19: mysql-chain-certs.patch
+Patch20: mysql-dubious-exports.patch
+Patch24: mysql-cmake.patch
URL: https://www.percona.com/software/mysql-database/percona-server
BuildRequires: bison >= 1.875
BuildRequires: cmake >= 2.8.2
%{?with_system_boost:BuildRequires: boost-devel = 1.59.0}
BuildRequires: libhsclient-devel
%{?with_tcpd:BuildRequires: libwrap-devel}
+BuildRequires: lz4-devel >= 1:1.9.3
BuildRequires: mecab-devel
BuildRequires: ncurses-devel >= 4.2
%{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
BuildRequires: perl-devel >= 1:5.6.1
BuildRequires: protobuf-devel
BuildRequires: python-modules
+BuildRequires: rpcsvc-proto
BuildRequires: rpm-perlprov >= 4.1-13
BuildRequires: rpmbuild(macros) >= 1.597
BuildRequires: sed >= 4.0
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
%if %{with sphinx}
# http://www.sphinxsearch.com/docs/manual-0.9.9.html#sphinxse-mysql51
-mv sphinx-*/mysqlse storage/sphinx
-%patch2 -p1
+%{__mv} sphinx-*/mysqlse storage/sphinx
+%patch17 -p1
+%patch18 -p1
%endif
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
+%patch19 -p1
+%patch20 -p1
+%patch24 -p1
# to get these files rebuild
[ -f sql/sql_yacc.cc ] && %{__rm} sql/sql_yacc.cc
# (it defaults to first cluster but user may change it to whatever
# cluster it wants)
+%if "%{cc_version}" >= "7.0"
+FALLTHROUGH_OPT="-Wimplicit-fallthrough=0"
+%else
+FALLTHROUGH_OPT=
+%endif
+
CPPFLAGS="%{rpmcppflags}" \
%cmake .. \
-DCMAKE_BUILD_TYPE=%{!?debug:RelWithDebInfo}%{?debug:Debug} \
- -DCMAKE_C_FLAGS_DEBUG="-fno-omit-frame-pointer -fno-strict-aliasing -Wimplicit-fallthrough=0" \
- -DCMAKE_CXX_FLAGS_DEBUG="-fno-omit-frame-pointer -fno-strict-aliasing -Wimplicit-fallthrough=0" \
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing -Wimplicit-fallthrough=0 -Wno-shadow" \
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing -Wimplicit-fallthrough=0 -Wno-shadow" \
+ -DCMAKE_C_FLAGS_DEBUG="-fno-omit-frame-pointer -fno-strict-aliasing $FALLTHROUGH_OPT" \
+ -DCMAKE_CXX_FLAGS_DEBUG="-fno-omit-frame-pointer -fno-strict-aliasing $FALLTHROUGH_OPT" \
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing $FALLTHROUGH_OPT -Wno-shadow" \
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing $FALLTHROUGH_OPT -Wno-shadow" \
-DCOMPILATION_COMMENT="TLD Linux MySQL RPM" \
-DCURSES_INCLUDE_PATH=/usr/include/ncurses \
%{?with_systemtap:-DENABLE_DTRACE=ON} \
-DWITH_SCALABILITY_METRICS=ON \
-DWITH_SSL=%{?with_ssl:system}%{!?with_ssl:no} \
-DWITH_UNIT_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
+ -DWITH_COREDUMPER=%{?with_coredumper:ON}%{!?with_coredumper:OFF} \
%{!?with_tokudb:-DWITHOUT_TOKUDB=ON} \
%{!?with_rocksdb:-DWITHOUT_ROCKSDB=ON} \
%if %{without system_boost}
%{!?with_system_boost:-DWITH_BOOST="$(pwd)/$(ls -1d ../boost_*)"} \
%endif
- -DWITH_ZLIB=system \
- -DWITH_READLINE=system \
- -DWITH_LZ4=system \
-DWITH_LIBEVENT=system \
- -DWITH_PROTOBUF=system \
+ -DWITH_LZ4=system \
-DWITH_MECAB=system \
+ -DWITH_PROTOBUF=system \
+ -DWITH_READLINE=system \
+ -DWITH_ZLIB=system \
-DTMPDIR=/var/tmp
%{__make}
-%{?with_tests:%{__make} test}
+%if %{with tests}
+%{__make} test
+
+cd mysql-test
+
+MTR_BINDIR=$(pwd)/../build/ \
+%{__perl} ./mysql-test-run.pl \
+ --force \
+ --retry=0 \
+ --ssl \
+ --suite-timeout=720 \
+ --testcase-timeout=30 \
+ --mysqld=--binlog-format=mixed \
+ --force-restart \
+ --shutdown-timeout=60 \
+ --max-test-fail=0 \
+ --big-test \
+ --skip-test-list=unstable-tests
+%endif
%install
rm -rf $RPM_BUILD_ROOT
# not needed
%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/libdaemon_example.*
%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/daemon_example.ini
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/udf_example.so
# not an .info file
%{__rm} $RPM_BUILD_ROOT%{_infodir}/mysql.info
%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_test_plugin.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/authentication_ldap_sasl_client.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/connection_control.so
+%attr(755,root,root) %{_libdir}/%{name}/plugin/data_masking.ini
+%attr(755,root,root) %{_libdir}/%{name}/plugin/data_masking.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/dialog.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/group_replication.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/keyring_file.so