forked from pool/openvswitch
Accepting request 613092 from home:markoschandras:network
drop sle_version macros. suse_version is enough OBS-URL: https://build.opensuse.org/request/show/613092 OBS-URL: https://build.opensuse.org/package/show/network/openvswitch?expand=0&rev=150
This commit is contained in:
parent
4413ab8eb8
commit
ddcd77336e
@ -24,7 +24,7 @@
|
||||
%endif
|
||||
%define lname libopenvswitch-2_9-0
|
||||
%ifarch aarch64 x86_64 %{ix86}
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
# DPDK enabled only SUSE/openSUSE
|
||||
%bcond_without dpdk
|
||||
%else
|
||||
@ -76,7 +76,7 @@ Provides: %{name}-switch = %{version}
|
||||
Obsoletes: %{name}-dpdk < 2.7.0
|
||||
Obsoletes: %{name}-dpdk-switch < 2.7.0
|
||||
Obsoletes: %{name}-switch < 2.7.0
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module six}
|
||||
BuildRequires: %{python_module xml}
|
||||
@ -381,7 +381,7 @@ pushd source
|
||||
< rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \
|
||||
> rhel/usr_lib_systemd_system_ovs-vswitchd.service
|
||||
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
export PYTHON='%{_bindir}/python3'
|
||||
%endif
|
||||
%configure \
|
||||
@ -438,7 +438,7 @@ done
|
||||
%{buildroot}%{_prefix}/lib/udev/rules.d/91-vfio.rules
|
||||
%endif
|
||||
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
install -D -m 644 rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \
|
||||
%{buildroot}%{_fillupdir}/sysconfig.openvswitch
|
||||
%else
|
||||
@ -479,7 +479,7 @@ popd
|
||||
|
||||
# Python subpackages
|
||||
# SLES
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
mkdir -p %{buildroot}%{python2_sitelib}
|
||||
cp -a %{buildroot}%{_datadir}/openvswitch/python/* %{buildroot}%{python2_sitelib}
|
||||
# Build the byte compiled files
|
||||
@ -519,7 +519,7 @@ if [ $1 -eq 1 ]; then
|
||||
# In the case of upgrade, this is not needed
|
||||
chown -R openvswitch:openvswitch %{_sysconfdir}/openvswitch
|
||||
fi
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_post ovsdb-server.service
|
||||
%service_add_post ovs-vswitchd.service
|
||||
%service_add_post openvswitch.service
|
||||
@ -553,7 +553,7 @@ fi
|
||||
# the OvS can break remote administration during the update so let the
|
||||
# admin decide when it's the best time for an OvS restart.
|
||||
# 5771f476573445710834234a6a9f7bd999a027e7 ("fedora: do not restart the service on a pkg upgrade")
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%service_del_postun ovsdb-server.service
|
||||
%service_del_postun ovs-vswitchd.service
|
||||
@ -567,7 +567,7 @@ fi
|
||||
%endif
|
||||
|
||||
%pre
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_pre ovsdb-server.service
|
||||
%service_add_pre ovs-vswitchd.service
|
||||
%service_add_pre openvswitch.service
|
||||
@ -596,7 +596,7 @@ exit 0
|
||||
%preun
|
||||
# This prevents networking breakages on package removals.
|
||||
export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_preun ovsdb-server.service
|
||||
%service_del_preun ovs-vswitchd.service
|
||||
%service_del_preun openvswitch.service
|
||||
@ -616,22 +616,22 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%postun -n %{lname} -p /sbin/ldconfig
|
||||
|
||||
%pre ovn-central
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_pre ovn-northd.service
|
||||
%endif
|
||||
|
||||
%pre ovn-host
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_pre ovn-controller.service
|
||||
%endif
|
||||
|
||||
%pre ovn-vtep
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_pre ovn-controller-vtep.service
|
||||
%endif
|
||||
|
||||
%post ovn-central
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_post ovn-northd.service
|
||||
%else
|
||||
%if 0%{?systemd_post:1}
|
||||
@ -645,7 +645,7 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%endif
|
||||
|
||||
%post ovn-host
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_post ovn-controller.service
|
||||
%else
|
||||
%if 0%{?systemd_post:1}
|
||||
@ -659,7 +659,7 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%endif
|
||||
|
||||
%post ovn-vtep
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_post ovn-controller-vtep.service
|
||||
%else
|
||||
%if 0%{?systemd_post:1}
|
||||
@ -675,7 +675,7 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%preun ovn-central
|
||||
# This prevents networking breakages on package removals.
|
||||
export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_preun ovn-northd.service
|
||||
%else
|
||||
%if 0%{?systemd_preun:1}
|
||||
@ -692,7 +692,7 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%preun ovn-host
|
||||
# This prevents networking breakages on package removals.
|
||||
export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_preun ovn-controller.service
|
||||
%else
|
||||
%if 0%{?systemd_preun:1}
|
||||
@ -709,7 +709,7 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%preun ovn-vtep
|
||||
# This prevents networking breakages on package removals.
|
||||
export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_preun ovn-controller-vtep.service
|
||||
%else
|
||||
%if 0%{?systemd_preun:1}
|
||||
@ -724,7 +724,7 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%endif
|
||||
|
||||
%postun ovn-central
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_postun ovn-northd.service
|
||||
%else
|
||||
%if 0%{?systemd_postun:1}
|
||||
@ -737,7 +737,7 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%post ovn-common -p /sbin/ldconfig
|
||||
%postun ovn-common -p /sbin/ldconfig
|
||||
%postun ovn-host
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%service_del_postun ovn-controller.service
|
||||
%else
|
||||
@ -749,7 +749,7 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%endif
|
||||
|
||||
%postun ovn-vtep
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%service_del_postun ovn-controller-vtep.service
|
||||
%else
|
||||
@ -763,7 +763,7 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%preun test
|
||||
# This prevents networking breakages on package removals.
|
||||
export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_preun openvswitch-testcontroller
|
||||
%else
|
||||
%if 0%{?systemd_post:1}
|
||||
@ -778,7 +778,7 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%endif
|
||||
|
||||
%postun test
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
export DISABLE_RESTART_ON_UPDATE=yes
|
||||
%service_del_postun openvswitch-testcontroller
|
||||
%else
|
||||
@ -847,7 +847,7 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%{_unitdir}/openvswitch.service
|
||||
%{_unitdir}/ovs-vswitchd.service
|
||||
%{_unitdir}/ovsdb-server.service
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%{_fillupdir}/sysconfig.openvswitch
|
||||
%else
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/openvswitch
|
||||
@ -896,7 +896,7 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
||||
%files -n python2-openvswitch-test
|
||||
%{python2_sitelib}/ovstest/
|
||||
|
||||
%if 0%{?sle_version} || 0%{?suse_version}
|
||||
%if 0%{?suse_version}
|
||||
%files -n python3-openvswitch
|
||||
%{python3_sitelib}/ovs/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user