!107 Remove rpath and generate debuginfo to fix not stipped
From: @lyn1001 Reviewed-by: @wang--ge Signed-off-by: @wang--ge
This commit is contained in:
commit
a61411f6e6
29
mysql.spec
29
mysql.spec
@ -1,13 +1,8 @@
|
||||
%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.28
|
||||
Release: 2
|
||||
Release: 3
|
||||
License: GPLv2 with exceptions and LGPLv2 and BSD
|
||||
Summary: The world's most popular open source database
|
||||
URL: http://www.mysql.com/
|
||||
@ -26,7 +21,7 @@ Patch13:disable-moutline-atomics-for-aarch64.patch
|
||||
Patch14: CVE-2022-37434-1.patch
|
||||
Patch15: CVE-2022-37434-2.patch
|
||||
|
||||
BuildRequires: cmake openssl-devel ncurses-devel libtirpc-devel rpcgen libcurl-devel make
|
||||
BuildRequires: cmake openssl-devel ncurses-devel libtirpc-devel rpcgen libcurl-devel make chrpath
|
||||
|
||||
Requires: libatomic >= 1.2.0 libstdc++ >= 7.3.0 ncurses libtirpc openssl ldconfig
|
||||
|
||||
@ -74,6 +69,19 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mysql/data
|
||||
%install
|
||||
%make_install
|
||||
|
||||
cd $RPM_BUILD_ROOT/usr/local/mysql/
|
||||
file `find -type f`| grep -w ELF | awk -F":" '{print $1}' | for i in `xargs`
|
||||
do
|
||||
chrpath -d $i
|
||||
done
|
||||
cd -
|
||||
|
||||
mkdir -p %{buildroot}/etc/ld.so.conf.d
|
||||
echo "/usr/local/mysql/lib/mysqlrouter/private" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
echo "/usr/local/mysql/lib/mysqlrouter" >>%{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
echo "/usr/local/mysql/lib/private" >>%{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
echo "/usr/local/mysql/bin" >>%{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
@ -94,6 +102,8 @@ if [ -e %{_prefix}/local/%{name}/lib/private ];then
|
||||
ldconfig
|
||||
fi
|
||||
|
||||
/sbin/ldconfig
|
||||
|
||||
%preun
|
||||
if [ -f %{_sysconfdir}/my.cnf ];then
|
||||
mv %{_sysconfdir}/my.cnf %{_sysconfdir}/my.cnf.rpmold
|
||||
@ -109,14 +119,19 @@ if [ "$1" = 0 ];then
|
||||
fi
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
%files
|
||||
%dir %{_prefix}/local/%{name}
|
||||
%attr(755, %{name}, %{name}) %{_prefix}/local/%{name}/*
|
||||
%exclude /usr/src/debug
|
||||
%exclude /usr/lib/debug
|
||||
%config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
|
||||
%changelog
|
||||
* Wed Nov 8 2023 liyanan <liyanan61@h-partners.com> - 8.0.28-3
|
||||
- Remove rpath and generate debuginfo to fix not stipped
|
||||
|
||||
* Tue May 16 2023 yaoxin <yao_xin001@hoperun.com> - 8.0.28-2
|
||||
- Fix CVE-2022-37434
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user