mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
packaging: fix centos8/el8 upgrade (#7267)
This commit is contained in:
parent
1a4bf07548
commit
eef63d99a4
@ -387,12 +387,12 @@ install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-inte
|
||||
%clean
|
||||
[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%pre common
|
||||
%posttrans common
|
||||
|
||||
python_dir=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
||||
mkdir -p %{_datadir}/%{name}-common
|
||||
rm -f %{_datadir}/%{name}-common/python-site || true
|
||||
ln -s $python_dir %{_datadir}/%{name}-common/python-site
|
||||
if [ ! -z $python_dir ];then
|
||||
cp -f -r /usr/share/cloudstack-common/python-site/* $python_dir/
|
||||
fi
|
||||
|
||||
%preun management
|
||||
/usr/bin/systemctl stop cloudstack-management || true
|
||||
@ -474,7 +474,8 @@ if [ -d "%{_sysconfdir}/cloud" ] ; then
|
||||
mv %{_sysconfdir}/cloud %{_sysconfdir}/cloud.rpmsave
|
||||
fi
|
||||
|
||||
%post agent
|
||||
%posttrans agent
|
||||
|
||||
if [ "$1" == "2" ] ; then
|
||||
echo "Running %{_bindir}/%{name}-agent-upgrade to update bridge name for upgrade from CloudStack 4.0.x (and before) to CloudStack 4.1 (and later)"
|
||||
%{_bindir}/%{name}-agent-upgrade
|
||||
@ -499,7 +500,6 @@ fi
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
%posttrans agent
|
||||
# Print help message
|
||||
if [ -f "/usr/share/cloudstack-common/scripts/installer/cloudstack-help-text" ];then
|
||||
sed -i "s,^ACS_VERSION=.*,ACS_VERSION=%{_maventag},g" /usr/share/cloudstack-common/scripts/installer/cloudstack-help-text
|
||||
@ -592,7 +592,6 @@ pip install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
|
||||
%dir %attr(0770,root,root) %{_localstatedir}/log/%{name}/ipallocator
|
||||
%{_defaultdocdir}/%{name}-management-%{version}/LICENSE
|
||||
%{_defaultdocdir}/%{name}-management-%{version}/NOTICE
|
||||
#%attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name}-catalina
|
||||
%{_datadir}/%{name}-management/setup/wheel/*.whl
|
||||
|
||||
%files agent
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user