1 Star 0 Fork 58

panchenbo/mysql

forked from src-openEuler/mysql 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mysql.spec 3.03 KB
一键复制 编辑 原始数据 按行查看 历史
zhangtao2020 提交于 2020-03-18 13:41 +08:00 . add stack protect
%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.17
Release: 3
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
rm -rf %{_prefix}/local/%{name}
userdel -r %{name} &>/dev/null
%files
%attr(755, %{name}, %{name}) %{_prefix}/local/%{name}/*
%exclude /usr/src/debug
%exclude /usr/lib/debug
%changelog
* Wed 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.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/panchenbo/mysql.git
git@gitee.com:panchenbo/mysql.git
panchenbo
mysql
mysql
master

搜索帮助