Accepting request 746240 from home:yuanren10

Fix some noisy output during installation and sysconfig file issues

OBS-URL: https://build.opensuse.org/request/show/746240
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=161
This commit is contained in:
Yuan Ren 2019-11-07 11:52:11 +00:00 committed by Git OBS Bridge
parent 08f972974d
commit da8f6162fc
2 changed files with 29 additions and 14 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Nov 7 06:26:20 UTC 2019 - Yuan Ren <yren@suse.com>
- Packaging bug updating Corosync(bsc#1155792)
Some noisy output from Tumbleweed caused by RPM macro not fairly used
Make sure corosync sysconfig keep original configured firstly(bsc1153502)
-------------------------------------------------------------------
Wed Oct 9 07:55:48 UTC 2019 - Yuan Ren <yren@suse.com>

View File

@ -257,7 +257,10 @@ APIs and libraries, default configuration files, and an init script.
%post
/usr/lib/corosync/upgrade.sh
%tmpfiles_create /usr/lib/tmpfiles.d/corosync-notifyd
%{fillup_and_insserv -n corosync}
%{fillup_only -n corosync}
# restore configured /etc/sysconfig/corosync(bsc#1155792)
mv /etc/sysconfig/corosync /etc/sysconfig/corosynctmp
%service_add_post corosync.service corosync-notifyd.service
rm -rf %{_sysconfdir}/corosync/corosync.conf.example %{_sysconfdir}/corosync/corosync.conf.example.unicast
@ -267,9 +270,9 @@ ln -s /usr/share/doc/packages/corosync/corosync.conf.example.udpu %{_sysconfdir}
%preun
%service_del_preun corosync.service corosync-notifyd.service
%postun
if [ -f /etc/sysconfig/corosync ]; then
rm /etc/sysconfig/corosync
%posttrans -n corosync
if [ ! -f /etc/sysconfig/corosync ] ; then
mv /etc/sysconfig/corosynctmp /etc/sysconfig/corosync
fi
%files
@ -571,7 +574,9 @@ NSS certificates and an init script.
%service_add_pre corosync-qdevice.service
%post -n corosync-qdevice
%{fillup_and_insserv -n corosync-qdevice}
%{fillup_only -n corosync-qdevice}
mv /etc/sysconfig/corosync-qdevice /etc/sysconfig/corosync-qdevicetmp
%if %{sles_version} > 0
ln -s /run/corosync-qdevice /var/run/
%endif
@ -584,12 +589,13 @@ ln -s /run/corosync-qdevice /var/run/
unlink /var/run/corosync-qdevice
%endif
%postun -n corosync-qdevice
if [ -f /etc/sysconfig/corosync-qdevice ]; then
rm /etc/sysconfig/corosync-qdevice
fi
%service_del_postun corosync-qdevice.service
%posttrans -n corosync-qdevice
if [ ! -f /etc/sysconfig/corosync-qdevice ] ; then
mv /etc/sysconfig/corosync-qdevicetmp /etc/sysconfig/corosync-qdevice
fi
%files -n corosync-qdevice
%defattr(-,root,root,-)
%dir %{_sysconfdir}/corosync/qdevice
@ -641,7 +647,8 @@ exit 0
%if %{sles_version} > 0
ln -s /run/corosync-qnetd /var/run/
%endif
%{fillup_and_insserv -n corosync-qnetd}
%{fillup_only -n corosync-qnetd}
mv /etc/sysconfig/corosync-qnetd /etc/sysconfig/corosync-qnetdtmp
%service_add_post corosync-qnetd.service
@ -652,12 +659,13 @@ ln -s /run/corosync-qnetd /var/run/
unlink /var/run/corosync-qnetd
%endif
%postun -n corosync-qnetd
if [ -f /etc/sysconfig/corosync-qnetd ];then
rm /etc/sysconfig/corosync-qnetd
fi
%service_del_postun corosync-qnetd.service
%posttrans -n corosync-qnetd
if [ ! -f /etc/sysconfig/corosync-qnetd ] ; then
mv /etc/sysconfig/corosync-qnetdtmp /etc/sysconfig/corosync-qnetd
fi
%files -n corosync-qnetd
%defattr(-,root,root,-)
%dir %config(noreplace) %attr(750, coroqnetd, coroqnetd) %{_sysconfdir}/corosync/qnetd