%bcond_without systemtap # systemtap/dtrace probes
%bcond_without tcpd # libwrap (tcp_wrappers) support
%bcond_without sphinx # Sphinx storage engine support
+%bcond_without tokudb # TokuDB
%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 system_hsclient # breaks builds with percona >= 5.6.33
+
+# tokudb is only supported on x86_64
+%ifnarch %{x8664}
+%undefine with_tokudb
+%endif
%define rel 1
-%define percona_rel 72.1
-%include /usr/lib/rpm/macros.perl
+%define percona_rel 91.0
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.6.23
+Version: 5.6.51
Release: %{percona_rel}.%{rel}
License: GPL + MySQL FLOSS Exception
Group: Applications/Databases
# Source0Download: http://dev.mysql.com/downloads/mysql/5.5.html#downloads
# Source0: http://vesta.informatik.rwth-aachen.de/mysql/Downloads/MySQL-5.5/%{name}-%{version}.tar.gz
Source0: http://www.percona.com/downloads/Percona-Server-5.6/LATEST/source/tarball/percona-server-%{version}-%{percona_rel}.tar.gz
-# Source0-md5: ac6a10ea8d000b86ff1dbe65ed3581e2
-Source100: http://www.sphinxsearch.com/files/sphinx-2.2.8-release.tar.gz
-# Source100-md5: 4eb54ad6bd9a03b8b39bc10f16e59a63
+# Source0-md5: 05f0f2fbba5dec1d78bb56998a6749c7
+Source100: http://www.sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz
+# Source100-md5: 5cac34f3d78a9d612ca4301abfcbd666
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}.logrotate
Source12: %{name}-ndb-cpc.sysconfig
Source13: %{name}-client.conf
Source14: my.cnf
+Patch0: %{name}-opt.patch
Patch1: %{name}-versioning.patch
Patch2: %{name}hotcopy-5.0-5.5.patch
Patch3: bug-67402.patch
Patch5: %{name}-system-libhsclient.patch
# from fedora
Patch6: %{name}-system-users.patch
+Patch7: mysql-nosystem-libhsclient.patch
Patch9: %{name}-build.patch
Patch11: %{name}-upgrade.patch
Patch12: %{name}-config.patch
-Patch14: %{name}-bug-43594.patch
+
Patch18: %{name}-sphinx.patch
Patch19: %{name}-chain-certs.patch
# from fedora
Patch22: bug-66589.patch
Patch23: bug-44278.patch
Patch24: %{name}-cmake.patch
-Patch25: %{name}-readline.patch
+
Patch26: mysqldumpslow-clusters.patch
Patch27: x32.patch
URL: http://www.mysql.com/products/community/
BuildRequires: libstdc++-devel >= 5:4.0
%endif
BuildRequires: automake
-BuildRequires: libhsclient-devel
+%{?with_system_hsclient:BuildRequires: libhsclient-devel}
%{?with_tcpd:BuildRequires: libwrap-devel}
BuildRequires: ncurses-devel >= 4.2
%{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
Requires(pre): /usr/bin/getgid
Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/sbin/useradd
-Requires(triggerpostun): sed >= 4.0
+Requires(postun): sed >= 4.0
Requires: %{name}-charsets = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: /usr/bin/setsid
Summary: MySQL - character sets definitions
Summary(pl.UTF-8): MySQL - definicje kodowań znaków
Group: Applications/Databases
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description charsets
This package contains character sets definitions needed by both client
Requires: zlib-devel
Obsoletes: MySQL-devel
Obsoletes: libmysql10-devel
+Obsoletes: webscalesql-devel
%description devel
This package contains the development header files and other files
find . -name CMakeLists.txt -exec sed -i -e 's#perconaserverclient#mysqlclient#g' "{}" ";"
sed -i -e 's#perconaserverclient#mysqlclient#g' libmysql/libmysql.{ver.in,map} scripts/mysql_config.*
+%patch0 -p1
+
%if %{with sphinx}
# http://www.sphinxsearch.com/docs/manual-0.9.9.html#sphinxse-mysql51
mv sphinx-*/mysqlse storage/sphinx
%patch2 -p1
%patch3 -p1
%patch4 -p1
-%patch5 -p1
+%{?with_system_hsclient:%patch5 -p1}
%patch6 -p1
+%patch7 -p1
%patch9 -p1
%patch11 -p1
%patch12 -p1
-%patch14 -p0
+
%patch19 -p1
%patch20 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
-%patch25 -p1
-%patch26 -p1
+
+# not compatible with percona server at this point, see content
+# of scripts/mysqldumpslow.sh
+#%patch26 -p1
%patch27 -p1
# to get these files rebuild
%{expand:%%define __cpp %(echo '%__cpp' | sed -e 's,-gcc,-gcc4,')}
%endif
+CPPFLAGS="%{rpmcppflags}" \
%cmake .. \
-DCMAKE_BUILD_TYPE=%{!?debug:RelWithDebInfo}%{?debug:Debug} \
- -DCMAKE_C_FLAGS_RELEASE="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
- -DCMAKE_CXX_FLAGS_RELEASE="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
+ -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" \
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing -Wimplicit-fallthrough=0" \
-DCOMPILATION_COMMENT="PLD/Linux Distribution MySQL RPM" \
-DCURSES_INCLUDE_PATH=/usr/include/ncurses \
%{?with_systemtap:-DENABLE_DTRACE=ON} \
-DINSTALL_SQLBENCHDIR=%{_datadir} \
-DINSTALL_SUPPORTFILESDIR=share/%{_orgname}-support \
-DINSTALL_MYSQLSHAREDIR=share/%{_orgname} \
+ -DINSTALL_SECURE_FILE_PRIVDIR="" \
-DMYSQL_UNIX_ADDR=/var/lib/%{name}/%{name}.sock \
%{?debug:-DWITH_DEBUG=ON} \
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
-DWITH_PAM=ON \
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
-DWITH_PIC=ON \
- -DWITH_EDITLINE=system \
+ -DWITH_SCALABILITY_METRICS=ON \
%if "%{pld_release}" == "ac"
-DWITH_SSL=%{?with_ssl:bundled}%{!?with_ssl:no} \
%else
-DWITH_SSL=%{?with_ssl:system}%{!?with_ssl:no} \
%endif
-DWITH_UNIT_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
- -DWITH_ZLIB=system
+ -DWITH_ZLIB=system \
+ -DWITH_READLINE=system
%{__make}
# we don't package those (we have no -test or -testsuite pkg) and some of them just segfault
%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_client_test
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test.1*
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test_embedded.1*
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql-stress-test.pl.1*
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql-test-run.pl.1*
%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/mysql-test
# libmysqld examples
%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql{_client_test_embedded,_embedded,test_embedded}
%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam_compat.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_socket.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_test_plugin.so
+%attr(755,root,root) %{_libdir}/%{name}/plugin/connection_control.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/dialog.so
#%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_archive.so
#%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_blackhole.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv_udf.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/libmurmur_udf.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/mypluglib.so
+%attr(755,root,root) %{_libdir}/%{name}/plugin/mysql_no_login.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_client.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_interface.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_server.so
%if %{with sphinx}
%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_sphinx.so
%endif
+%if %{with tokudb}
+%attr(755,root,root) %{_bindir}/tokuft_logprint
+%attr(755,root,root) %{_bindir}/tokuftdump
+%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_tokudb.so
+%attr(755,root,root) %{_libdir}/%{name}/plugin/tokudb_backup.so
+%attr(755,root,root) %{_libdir}/libHotBackup.so
+%endif
# for plugins
%attr(755,root,root) %{_libdir}/libmysqlservices.so
%{_mandir}/man1/innochecksum.1*
%{_datadir}/%{_orgname}/fill_help_tables.sql
%{_datadir}/%{_orgname}/innodb_memcached_config.sql
#%{_datadir}/%{_orgname}/mysql_fix_privilege_tables.sql
-%lang(bg) %{_datadir}/%{_orgname}/bulgarian
-%lang(cs) %{_datadir}/%{_orgname}/czech
-%lang(da) %{_datadir}/%{_orgname}/danish
-%lang(de) %{_datadir}/%{_orgname}/german
-%lang(el) %{_datadir}/%{_orgname}/greek
-%lang(es) %{_datadir}/%{_orgname}/spanish
-%lang(et) %{_datadir}/%{_orgname}/estonian
-%lang(fr) %{_datadir}/%{_orgname}/french
-%lang(hu) %{_datadir}/%{_orgname}/hungarian
-%lang(it) %{_datadir}/%{_orgname}/italian
-%lang(ja) %{_datadir}/%{_orgname}/japanese
-%lang(ko) %{_datadir}/%{_orgname}/korean
-%lang(nl) %{_datadir}/%{_orgname}/dutch
-%lang(nb) %{_datadir}/%{_orgname}/norwegian
-%lang(nn) %{_datadir}/%{_orgname}/norwegian-ny
-%lang(pl) %{_datadir}/%{_orgname}/polish
-%lang(pt) %{_datadir}/%{_orgname}/portuguese
-%lang(ro) %{_datadir}/%{_orgname}/romanian
-%lang(ru) %{_datadir}/%{_orgname}/russian
-%lang(sr) %{_datadir}/%{_orgname}/serbian
-%lang(sk) %{_datadir}/%{_orgname}/slovak
-%lang(sv) %{_datadir}/%{_orgname}/swedish
-%lang(uk) %{_datadir}/%{_orgname}/ukrainian
+# Don't mark these with %%lang. These are used depending
+# on database client settings.
+%{_datadir}/%{_orgname}/bulgarian
+%{_datadir}/%{_orgname}/czech
+%{_datadir}/%{_orgname}/danish
+%{_datadir}/%{_orgname}/german
+%{_datadir}/%{_orgname}/greek
+%{_datadir}/%{_orgname}/spanish
+%{_datadir}/%{_orgname}/estonian
+%{_datadir}/%{_orgname}/french
+%{_datadir}/%{_orgname}/hungarian
+%{_datadir}/%{_orgname}/italian
+%{_datadir}/%{_orgname}/japanese
+%{_datadir}/%{_orgname}/korean
+%{_datadir}/%{_orgname}/dutch
+%{_datadir}/%{_orgname}/norwegian
+%{_datadir}/%{_orgname}/norwegian-ny
+%{_datadir}/%{_orgname}/polish
+%{_datadir}/%{_orgname}/portuguese
+%{_datadir}/%{_orgname}/romanian
+%{_datadir}/%{_orgname}/russian
+%{_datadir}/%{_orgname}/serbian
+%{_datadir}/%{_orgname}/slovak
+%{_datadir}/%{_orgname}/swedish
+%{_datadir}/%{_orgname}/ukrainian
%files charsets
%defattr(644,root,root,755)
%{_datadir}/sql-bench/[CDRl]*
%attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
%{_mandir}/man1/mysqlslap.1*
-%{_mandir}/man1/mysqltest.1*
-%{_mandir}/man1/mysqltest_embedded.1*
#%files doc
#%defattr(644,root,root,755)