# (profiling disabled temporaily to workaround this)
#
# Conditional build:
-%bcond_with autodeps # BR packages needed only for resolving deps
%bcond_without innodb # InnoDB storage engine support
%bcond_without big_tables # Support tables with more than 4G rows even on 32 bit platforms
%bcond_without federated # Federated storage engine support
%bcond_without systemtap # systemtap/dtrace probes
%bcond_without tcpd # libwrap (tcp_wrappers) support
%bcond_without sphinx # Sphinx storage engine support
-# drop system_boost functionality after we start using boost 1.59 in PLD
+# mysql needs boost 1.59.0 and doesn't support newer/older boost versions
%bcond_with system_boost
-%bcond_with tests # FIXME: don't run correctly
+%bcond_without tests # run test suite
%bcond_with ndb # NDB is now a separate product, this here is broken, so disable it
-%define rel 0.1
%include /usr/lib/rpm/macros.perl
Summary: MySQL: a very fast and reliable SQL database engine
Summary(de.UTF-8): MySQL: ist eine SQL-Datenbank
Summary(uk.UTF-8): MySQL - швидкий SQL-сервер
Summary(zh_CN.UTF-8): MySQL数据库服务器
Name: mysql
-Version: 5.7.9
-Release: %{rel}
+Version: 5.7.21
+Release: 2
License: GPL + MySQL FLOSS Exception
Group: Applications/Databases
Source0: http://cdn.mysql.com/Downloads/MySQL-5.7/%{name}-%{version}.tar.gz
-# Source0-md5: 6d782dda9046acb81e694934fd513993
-Source100: http://www.sphinxsearch.com/files/sphinx-2.2.10-release.tar.gz
-# Source100-md5: dda52b24d8348fc09e26d8a649a231d2
+# Source0-md5: e26523b174bdc3fd0fde6f36791ce17e
+Source100: http://www.sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz
+# Source100-md5: 5cac34f3d78a9d612ca4301abfcbd666
%if %{without system_boost}
-Source101: http://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.bz2
+Source101: http://downloads.sourceforge.net/boost/boost_1_59_0.tar.bz2
# Source101-md5: 6aa9a5c6a4ca1016edd0ed1178e3cb87
%endif
Source1: %{name}.init
Source13: %{name}-client.conf
Source14: my.cnf
Patch0: %{name}-opt.patch
-Patch1: %{name}-versioning.patch
-Patch4: %{name}-no-default-secure-auth.patch
-Patch5: %{name}-system-libhsclient.patch
-# from fedora
-Patch6: %{name}-system-users.patch
-
-Patch9: %{name}-build.patch
-Patch11: %{name}-upgrade.patch
-Patch12: %{name}-config.patch
+Patch1: lz4.patch
+Patch17: %{name}-5.7-sphinx.patch
Patch18: %{name}-sphinx.patch
Patch19: %{name}-chain-certs.patch
-# from fedora
-Patch20: %{name}-dubious-exports.patch
Patch24: %{name}-cmake.patch
-Patch26: mysqldumpslow-clusters.patch
-Patch27: x32.patch
+Patch26: %{name}dumpslow-clusters.patch
URL: http://www.mysql.com/products/community/
BuildRequires: bison >= 1.875
%{?with_system_boost:BuildRequires: boost-devel >= 1.59.0}
-BuildRequires: cmake >= 2.6
+BuildRequires: cmake >= 2.8.2
BuildRequires: libaio-devel
-BuildRequires: readline-devel >= 6.2
-%if "%{pld_release}" == "ac"
-BuildRequires: libstdc++4-devel >= 5:4.0
-%else
-BuildRequires: libstdc++-devel >= 5:4.0
-%endif
-BuildRequires: automake
+BuildRequires: libevent-devel
BuildRequires: libhsclient-devel
+BuildRequires: libstdc++-devel >= 5:4.0
%{?with_tcpd:BuildRequires: libwrap-devel}
+BuildRequires: lz4-devel
+BuildRequires: mecab-devel
BuildRequires: ncurses-devel >= 4.2
%{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
BuildRequires: pam-devel
-%{?with_autodeps:BuildRequires: perl-DBI}
BuildRequires: perl-devel >= 1:5.6.1
+BuildRequires: protobuf-devel >= 2.5
BuildRequires: python-modules
+BuildRequires: readline-devel >= 6.2
BuildRequires: rpm-perlprov >= 4.1-13
BuildRequires: rpmbuild(macros) >= 1.597
BuildRequires: sed >= 4.0
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
Summary(pl.UTF-8): Dodatkowe narzędzia do MySQL napisane w Perlu
Group: Applications/Databases
Requires: %{name}-extras = %{version}-%{release}
-# this is just for the sake of smooth upgrade, not to break systems
-Requires: mysqlhotcopy = %{version}-%{release}
Requires: perl-DBD-mysql
%description extras-perl
%setup -q %{?with_sphinx:-a100} %{!?with_system_boost:-a101}
%patch0 -p1
+%patch1 -p1
%if %{with sphinx}
# http://www.sphinxsearch.com/docs/manual-0.9.9.html#sphinxse-mysql51
mv sphinx-*/mysqlse storage/sphinx
+%patch17 -p1
%patch18 -p1
%endif
-#%patch1 -p1
-#%patch4 -p1 FIXME?
-#%patch5 -p1
-#%patch6 -p1 PROBABLY OBSOLETE
-
-%patch9 -p1
-#%patch11 -p1
-#%patch12 -p1
# really not fixed? verify
%patch19 -p1
-#%patch20 -p1
-
%patch24 -p1
%patch26 -p1
-#%patch27 -p1
# to get these files rebuild
[ -f sql/sql_yacc.cc ] && %{__rm} sql/sql_yacc.cc
[ -f sql/sql_yacc.h ] && %{__rm} sql/sql_yacc.h
-# FIXME/CHECK
-# map has more sane versioning that default "global everything" in ver.in
-#cp -p libmysql/libmysql.map libmysql/libmysql.ver.in
+# ensure sytstem lib
+# need to keep xxhash.[ch]
+%{__rm} -rv extra/lz4/lz4**
%build
install -d build
# (it defaults to first cluster but user may change it to whatever
# cluster it wants)
-%if "%{pld_release}" == "ac"
-# add suffix, but allow ccache, etc in ~/.rpmmacros
-%{expand:%%define __cc %(echo '%__cc' | sed -e 's,-gcc,-gcc4,')}
-%{expand:%%define __cxx %(echo '%__cxx' | sed -e 's,-g++,-g++4,')}
-%{expand:%%define __cpp %(echo '%__cpp' | sed -e 's,-gcc,-gcc4,')}
-%endif
-
CPPFLAGS="%{rpmcppflags}" \
%cmake .. \
-DCMAKE_BUILD_TYPE=%{!?debug:RelWithDebInfo}%{?debug:Debug} \
-DWITH_PAM=ON \
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
-DWITH_PIC=ON \
-%if "%{pld_release}" == "ac"
- -DWITH_SSL=%{?with_ssl:bundled}%{!?with_ssl:no} \
-%else
+ -DWITH_LZ4=system \
+ -DWITH_LIBEVENT=system \
+ -DWITH_PROTOBUF=system \
-DWITH_SSL=%{?with_ssl:system}%{!?with_ssl:no} \
-%endif
-DWITH_UNIT_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
%{!?with_system_boost:-DWITH_BOOST="$(pwd)/$(ls -1d ../boost_*)"} \
-DWITH_ZLIB=system \
- -DWITH_READLINE=system
+ -DWITH_READLINE=system \
+ -DWITH_MECAB=system \
+ -DTMPDIR=/var/tmp
%{__make}
mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamlog
mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisampack
#mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_fix_privilege_tables
+mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/lz4_decompress
+mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/zlib_decompress
mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/my_print_defaults
sed -i -e 's#/usr/bin/my_print_defaults#%{_sbindir}/my_print_defaults#g' $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysqlcheck
%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/comp_err.1*
# 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%{_bindir}/{mysql_client_test,mysqlxtest}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/mysql/plugin/test_udf_services.so
%{__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*
%files
%defattr(644,root,root,755)
-%doc build/support-files/*.cnf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
%attr(754,root,root) /etc/rc.d/init.d/%{name}
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
%attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/clusters.conf
%attr(755,root,root) %{_sbindir}/innochecksum
+%attr(755,root,root) %{_sbindir}/lz4_decompress
%attr(755,root,root) %{_sbindir}/my_print_defaults
%attr(755,root,root) %{_sbindir}/myisamchk
%attr(755,root,root) %{_sbindir}/myisamlog
%attr(755,root,root) %{_sbindir}/mysql_upgrade
%attr(755,root,root) %{_sbindir}/mysqlcheck
%attr(755,root,root) %{_sbindir}/mysqld
+%attr(755,root,root) %{_sbindir}/zlib_decompress
+
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/plugin
%attr(755,root,root) %{_libdir}/%{name}/plugin/adt_null.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/auth.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/authentication_ldap_sasl_client.so
+%attr(755,root,root) %{_libdir}/%{name}/plugin/connection_control.so
+%attr(755,root,root) %{_libdir}/%{name}/plugin/group_replication.so
+%attr(755,root,root) %{_libdir}/%{name}/plugin/keyring_file.so
+%attr(755,root,root) %{_libdir}/%{name}/plugin/keyring_udf.so
+%attr(755,root,root) %{_libdir}/%{name}/plugin/libpluginmecab.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/locking_service.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/mysqlx.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
-# for plugins
-%attr(755,root,root) %{_libdir}/libmysqlservices.so
%{_mandir}/man1/innochecksum.1*
+%{_mandir}/man1/lz4_decompress.1*
%{_mandir}/man1/my_print_defaults.1*
%{_mandir}/man1/myisamchk.1*
%{_mandir}/man1/myisamlog.1*
%{_mandir}/man1/mysql_plugin.1*
%{_mandir}/man1/mysql_upgrade.1*
%{_mandir}/man1/mysqlcheck.1*
+%{_mandir}/man1/zlib_decompress.1*
%{_mandir}/man8/mysqld.8*
%if %{?debug:1}0
# root:root is proper here for mysql.rpm while mysql:mysql is potential security hole
%attr(751,root,root) /var/lib/mysql
# https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_secure-file-priv
-%attr(770,mysql,mysql) /var/lib/mysql-files
+%attr(770,mysql,mysql) %dir /var/lib/mysql-files
%attr(750,mysql,mysql) %dir /var/log/mysql
%attr(750,mysql,mysql) %dir /var/log/archive/mysql
%attr(640,mysql,mysql) %ghost /var/log/mysql/*
%{_pkgconfigdir}/mysqlclient.pc
# static-only so far
%{_libdir}/libmysqld.a
+%{_libdir}/libmysqlservices.a
%{_includedir}/mysql
%{_aclocaldir}/mysql.m4
%{_mandir}/man1/mysql_config.1*