summaryrefslogtreecommitdiff
path: root/rhel
diff options
context:
space:
mode:
authorTimothy Redaelli <tredaelli@redhat.com>2018-08-07 18:52:10 +0200
committerBen Pfaff <blp@ovn.org>2018-08-10 11:18:41 -0700
commitfa72c5366b9071a1c5d38c80a5ed4690b727a8e3 (patch)
tree71f97d10580c79172c1a9fd824e0d5c138b02e94 /rhel
parentd7526b836f8639864a4810a0185e4b30723decc9 (diff)
downloadopenvswitch-fa72c5366b9071a1c5d38c80a5ed4690b727a8e3.tar.gz
rhel: Install the network scripts in a new subpackage
Starting from Fedora 29, the legacy network scripts are installed in the "network-scripts" package and so the network scripts ("ifup-ovs", "ifdown-ovs") should be installed only when the "network-scripts" package is installed. This commit introduces (on Fedora 29+) a new subpackage (network-scripts-openvswitch). This subpackage is installed, by default, only if the "network-scripts" package is installed too (reverse weak dependency). Reported-by: Lubomir Rintel <lkundrak@v3.sk> Reported-at: https://src.fedoraproject.org/rpms/openvswitch/pull-request/4 Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'rhel')
-rw-r--r--rhel/openvswitch-fedora.spec.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index c2d3200e1..cb7eccae1 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -162,6 +162,18 @@ Provides: openvswitch-static = %{version}-%{release}
This provides static library, libopenswitch.a and the openvswitch header
files needed to build an external application.
+%if 0%{?rhel} > 7 || 0%{?fedora} > 28
+%package -n network-scripts-%{name}
+Summary: Open vSwitch legacy network service support
+License: ASL 2.0
+Requires: network-scripts
+Supplements: (%{name} and network-scripts)
+
+%description -n network-scripts-%{name}
+This provides the ifup and ifdown scripts for use with the legacy network
+service.
+%endif
+
%package ovn-central
Summary: Open vSwitch - Open Virtual Network support
License: ASL 2.0
@@ -531,6 +543,12 @@ fi
%{_includedir}/openflow/*
%{_includedir}/ovn/*
+%if 0%{?rhel} > 7 || 0%{?fedora} > 28
+%files -n network-scripts-%{name}
+%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs
+%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs
+%endif
+
%files
%defattr(-,openvswitch,openvswitch)
%dir %{_sysconfdir}/openvswitch
@@ -548,8 +566,10 @@ fi
%{_unitdir}/ovs-vswitchd.service
%{_unitdir}/ovs-delete-transient-ports.service
%{_datadir}/openvswitch/scripts/openvswitch.init
+%if ! (0%{?rhel} > 7 || 0%{?fedora} > 28)
%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs
%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs
+%endif
%{_datadir}/openvswitch/bugtool-plugins/
%{_datadir}/openvswitch/scripts/ovs-bugtool-*
%{_datadir}/openvswitch/scripts/ovs-check-dead-ifs