Accepting request 687385 from home:jengelh:sct

- Combine %service_* calls to reduce generated boilerplate.
- Reduce scriptlets' hard dependency on systemd.

OBS-URL: https://build.opensuse.org/request/show/687385
OBS-URL: https://build.opensuse.org/package/show/network/openvswitch?expand=0&rev=176
This commit is contained in:
Dirk Mueller 2019-03-23 19:27:39 +00:00 committed by Git OBS Bridge
parent 24270361fb
commit f2eead3e38
2 changed files with 12 additions and 14 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Mar 21 15:12:55 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Combine %service_* calls to reduce generated boilerplate.
- Reduce scriptlets' hard dependency on systemd.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 28 11:16:58 UTC 2019 - jcaamano@suse.com Thu Feb 28 11:16:58 UTC 2019 - jcaamano@suse.com

View File

@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
# needssslcertforbuild # needssslcertforbuild
@ -87,7 +87,7 @@ BuildRequires: python-rpm-macros
Requires(post): %fillup_prereq Requires(post): %fillup_prereq
Requires(pre): shadow Requires(pre): shadow
Suggests: logrotate Suggests: logrotate
%{?systemd_requires} %{?systemd_ordering}
%else %else
BuildRequires: findutils BuildRequires: findutils
BuildRequires: openssl-devel BuildRequires: openssl-devel
@ -525,9 +525,7 @@ if [ $1 -eq 1 ]; then
chown -R openvswitch:openvswitch %{_localstatedir}/log/openvswitch chown -R openvswitch:openvswitch %{_localstatedir}/log/openvswitch
fi fi
%if 0%{?suse_version} %if 0%{?suse_version}
%service_add_post ovsdb-server.service %service_add_post ovsdb-server.service ovs-vswitchd.service openvswitch.service
%service_add_post ovs-vswitchd.service
%service_add_post openvswitch.service
%{fillup_only -n openvswitch} %{fillup_only -n openvswitch}
%else %else
%if 0%{?systemd_post:1} %if 0%{?systemd_post:1}
@ -559,9 +557,7 @@ fi
# admin decide when it's the best time for an OvS restart. # admin decide when it's the best time for an OvS restart.
# 5771f476573445710834234a6a9f7bd999a027e7 ("fedora: do not restart the service on a pkg upgrade") # 5771f476573445710834234a6a9f7bd999a027e7 ("fedora: do not restart the service on a pkg upgrade")
%if 0%{?suse_version} %if 0%{?suse_version}
%service_del_postun -n ovsdb-server.service %service_del_postun -n ovsdb-server.service -n ovs-vswitchd.service -n openvswitch.service
%service_del_postun -n ovs-vswitchd.service
%service_del_postun -n openvswitch.service
%else %else
%if 0%{?systemd_postun:1} %if 0%{?systemd_postun:1}
%systemd_postun %{name}.service %systemd_postun %{name}.service
@ -572,9 +568,7 @@ fi
%pre %pre
%if 0%{?suse_version} %if 0%{?suse_version}
%service_add_pre ovsdb-server.service %service_add_pre ovsdb-server.service ovs-vswitchd.service openvswitch.service
%service_add_pre ovs-vswitchd.service
%service_add_pre openvswitch.service
%endif %endif
# Save the "enabled" state across the transition of # Save the "enabled" state across the transition of
# ownership of openvswitch.service from openvswitch-switch to # ownership of openvswitch.service from openvswitch-switch to
@ -599,9 +593,7 @@ exit 0
%preun %preun
%if 0%{?suse_version} %if 0%{?suse_version}
%service_del_preun ovsdb-server.service %service_del_preun ovsdb-server.service ovs-vswitchd.service openvswitch.service
%service_del_preun ovs-vswitchd.service
%service_del_preun openvswitch.service
%else %else
%if 0%{?systemd_preun:1} %if 0%{?systemd_preun:1}
%systemd_preun %{name}.service %systemd_preun %{name}.service