%define debug_package %{nil} %define __os_install_post %{nil} %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.24 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 Source1: %{name}-boost-%{version}.tar.gz.aa Source2: %{name}-boost-%{version}.tar.gz.ab Source3: %{name}-boost-%{version}.tar.gz.ac 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:boost-1.58.0-pool.patch Patch11:boost-1.57.0-mpl-print.patch Patch12:%{pkgnamepatch}-fix-includes-robin-hood.patch Patch13:disable-moutline-atomics-for-aarch64.patch BuildRequires: cmake openssl-devel ncurses-devel libtirpc-devel rpcgen libcurl-devel make Requires: libatomic >= 1.2.0 libstdc++ >= 7.3.0 ncurses libtirpc openssl ldconfig %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 cd ../SOURCES cat %{SOURCE1} %{SOURCE2} %{SOURCE3} | tar xj cd .. %setup -q -n %{name}-%{version} %patch0 -p1 %patch1 -p1 %patch3 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch12 -p1 %patch13 -p1 pushd boost/boost_$(echo %{boost_bundled_version}| tr . _) %patch10 -p0 %patch11 -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 %make_build %install %make_install %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 if [ -e %{_prefix}/local/%{name}/lib/private ];then echo "%{_prefix}/local/%{name}/lib/private" > %{_sysconfdir}/ld.so.conf.d/%{name}.conf ldconfig 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 if [ "$1" = 0 ];then if [ -f %{_sysconfdir}/ld.so.conf.d/%{name}.conf ];then rm -f %{_sysconfdir}/ld.so.conf.d/%{name}.conf ldconfig fi fi %postun if [ "$1" = 0 ];then userdel -r %{name} &>/dev/null fi %files %dir %{_prefix}/local/%{name} %attr(755, %{name}, %{name}) %{_prefix}/local/%{name}/* %exclude /usr/src/debug %exclude /usr/lib/debug %changelog * Thu May 6 2021 wangxiao 8.0.24-1 - Upgrade mysql to 8.0.24, fix CVES: CVE-2021-2166 CVE-2021-2146 CVE-2021-2162 CVE-2021-2212 CVE-2021-2299 CVE-2021-2293 CVE-2021-2215 CVE-2021-2278 CVE-2021-2164 CVE-2021-2208 CVE-2021-2217 CVE-2021-2203 CVE-2021-2226 CVE-2021-2298 CVE-2021-2230 CVE-2021-2300 CVE-2021-2304 CVE-2021-2172 CVE-2021-2194 CVE-2021-2170 CVE-2021-2196 CVE-2021-2201 CVE-2021-2180 CVE-2021-2307 CVE-2021-2169 CVE-2021-2171 CVE-2021-2305 CVE-2021-2179 CVE-2021-2174 CVE-2021-2193 CVE-2021-2232 CVE-2021-2301 CVE-2021-2308 * Wed Mar 10 2021 wangxiao 8.0.23-1 - Upgrade mysql to 8.0.23, fix CVES: CVE-2021-1998 CVE-2021-2002 CVE-2021-2010 CVE-2021-2011 CVE-2021-2016 CVE-2021-2021 CVE-2021-2022 CVE-2021-2024 CVE-2021-2031 CVE-2021-2032 CVE-2021-2036 CVE-2021-2038 CVE-2021-2046 CVE-2021-2048 CVE-2021-2056 CVE-2021-2058 CVE-2021-2060 CVE-2021-2061 CVE-2021-2065 CVE-2021-2070 CVE-2021-2072 CVE-2021-2076 CVE-2021-2081 CVE-2021-2087 CVE-2021-2088 CVE-2021-2122 * Wed Dec 1 2020 wutao - 8.0.22-1 - upgrade to 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 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 * Sun Mar 1 2020 zhangtao 8.0.17-3 - add fstack-protector-strong * Fri Feb 28 2020 catastrowings 8.0.17-2 - openEuler package init.