mysql/mysql.spec
writings-of-prince-huainan db92eee267 update change log
2020-11-25 07:08:14 +00:00

135 lines
5.0 KiB
RPMSpec

%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.22
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
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:%{pkgnamepatch}-gcc11.patch
Patch11:boost-1.58.0-pool.patch
Patch12:boost-1.57.0-mpl-print.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
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch3 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
pushd boost/boost_$(echo %{boost_bundled_version}| tr . _)
%patch11 -p0
%patch12 -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
%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 Nov 18 2020 weishengjing <weishengjing1@huawei.com> 8.0.22-1
- New version 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 <sunguoshuai@huawei.com> 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 <sunguoshuai@huawei.com> 8.0.21-1
- Upgrade to 8.0.21 and fix the upgrade bug in old version
* Sun Mar 1 2020 zhangtao<zhangtao221@huawei.com> 8.0.17-3
- add fstack-protector-strong
* Fri Feb 28 2020 catastrowings <jianghuhao1994@163.com> 8.0.17-2
- openEuler package init.