SHA256
1
0
forked from pool/openvswitch
Dominique Leuenberger 2018-04-24 13:34:31 +00:00 committed by Git OBS Bridge
commit c084e7f6a9
2 changed files with 32 additions and 2 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Apr 23 09:33:02 UTC 2018 - mchandras@suse.de
- Preserve 'enable' status of openvswitch.service file when upgrading
from <SLE-12-SP3. The service file has been moved from the old
openvswitch-switch subpackage to the main openvswitch one so we
need to handle this migration step in %posttrans (bsc#1089476)
- Move DISABLE_STOP_ON_REMOVAL=yes to %preun. This variable is only
checked in %service_del_preun macro
-------------------------------------------------------------------
Thu Mar 22 10:39:10 UTC 2018 - mchandras@suse.de

View File

@ -467,6 +467,8 @@ rm -rf %{buildroot}%{_datadir}/openvswitch/python
find %{buildroot} -type f -name "*.la" -delete -print
%define eflag /run/openvswitch-was-enabled
%post
/sbin/ldconfig
%{fillup_only -n openvswitch}
@ -492,6 +494,15 @@ fi
%service_add_post ovs-vswitchd.service
%service_add_post openvswitch.service
%posttrans
# Save the "enabled" state across the transition of ownership
# of openvswitch.service from openvswitch-switch to
# openvswitch.
if test -f %eflag; then
rm -f %eflag
systemctl enable openvswitch.service
fi
%postun
/sbin/ldconfig
# Do not restart the openvswitch service on package updates.
@ -507,13 +518,21 @@ export DISABLE_RESTART_ON_UPDATE=yes
%service_del_postun openvswitch.service
%pre
# This prevents networking breakages on package removals
export DISABLE_STOP_ON_REMOVAL=yes
%service_add_pre ovsdb-server.service
%service_add_pre ovs-vswitchd.service
%service_add_pre openvswitch.service
# Save the "enabled" state across the transition of
# ownership of openvswitch.service from openvswitch-switch to
# openvswitch.
if [ "$FIRST_ARG" -ge 1 ]; then \
if [ x$(systemctl is-enabled openvswitch.service 2>/dev/null ||:) = "xenabled" ]; then
touch %eflag
fi
fi
%preun
# This prevents networking breakages on package removals
export DISABLE_STOP_ON_REMOVAL=yes
%service_del_preun ovsdb-server.service
%service_del_preun ovs-vswitchd.service
%service_del_preun openvswitch.service
@ -630,6 +649,7 @@ export DISABLE_RESTART_ON_UPDATE=yes
%{_unitdir}/ovsdb-server.service
%{_fillupdir}/sysconfig.openvswitch
%attr(755,-,-) %dir %{_localstatedir}/log/openvswitch
%ghost %attr(755,root,root) %{_rundir}/openvswitch
%if %{with dpdk}
%{_prefix}/lib/udev/rules.d/91-vfio.rules
%endif