%define debug_package %{nil} %define __os_install_post %{nil} %define __debug_install_post \ %{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\ %{nil} Name: mysql Version: 8.0.21 Release: 2 License: GPLv2 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 Requires: libatomic >= 1.2.0 libstdc++ >= 7.3.0 ncurses libtirpc openssl %description The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. MySQL is a trademark of Oracle and/or its affiliates The MySQL software has Dual Licensing, which means you can use the MySQL software free of charge under the GNU General Public License (http://www.gnu.org/licenses/). You can also purchase commercial MySQL licenses from Oracle and/or its affiliates if you do not wish to be bound by the terms of the GPL. See the chapter "Licensing and Support" in the manual for further info. %prep %autosetup -n %{name}-%{version} -p1 %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 %make_build %install %make_install #rm -rf %{buildroot}/usr/lib/debug #rm -rf %{buildroot}/usr/src/debug %clean rm -rf %{buildroot} %pre if ! id %{name} > /dev/null 2>&1;then useradd -M -s /sbin/nologin %{name} fi %post if [ -f %{_prefix}/local/%{name}/support-files/mysql.server > /dev/null 2>&1 ] && [ ! -f %{_initddir}/mysql > /dev/null 2>&1 ];then cp %{_prefix}/local/%{name}/support-files/mysql.server %{_initddir}/mysql chmod +x %{_initddir}/mysql chkconfig --level 2345 mysql on fi %preun if [ -f %{_sysconfdir}/my.cnf ];then mv %{_sysconfdir}/my.cnf %{_sysconfdir}/my.cnf.rpmold fi if [ -f %{_initddir}/mysql ];then mv %{_initddir}/mysql %{_initddir}/mysql.rpmold fi %postun userdel -r %{name} &>/dev/null %files %dir %{_prefix}/local/%{name} %attr(755, %{name}, %{name}) %{_prefix}/local/%{name}/* %exclude /usr/src/debug %exclude /usr/lib/debug %changelog * 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 CVE-2020-14576 CVE-2020-14553 CVE-2020-14539 CVE-2020-14540 CVE-2020-14643 CVE-2020-14702 CVE-2020-14614 CVE-2020-14680 CVE-2020-14633 CVE-2020-14632 CVE-2020-14634 CVE-2020-14597 CVE-2020-14697 CVE-2020-14624 CVE-2020-14631 CVE-2020-14678 CVE-2020-14550 CVE-2020-14559 * 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 - add fstack-protector-strong * Fri Feb 28 2020 catastrowings 8.0.17-2 - openEuler package init.