From patchwork Tue Aug 7 16:52:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy Redaelli X-Patchwork-Id: 954585 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41lLCx5x42z9rxx for ; Wed, 8 Aug 2018 02:52:28 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 0EE8FD3B; Tue, 7 Aug 2018 16:52:26 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 569BBCF8 for ; Tue, 7 Aug 2018 16:52:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 8E948796 for ; Tue, 7 Aug 2018 16:52:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9906681663CC; Tue, 7 Aug 2018 16:52:22 +0000 (UTC) Received: from localhost.localdomain (dhcp189-71.ntdv.lab.eng.bos.redhat.com [10.19.189.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id A6467112D198; Tue, 7 Aug 2018 16:52:21 +0000 (UTC) From: Timothy Redaelli To: dev@openvswitch.org Date: Tue, 7 Aug 2018 18:52:10 +0200 Message-Id: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 07 Aug 2018 16:52:22 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 07 Aug 2018 16:52:22 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'tredaelli@redhat.com' RCPT:'' X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Lubomir Rintel Subject: [ovs-dev] [PATCH] rhel: Install the network scripts in a new subpackage X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org 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 Reported-at: https://src.fedoraproject.org/rpms/openvswitch/pull-request/4 Signed-off-by: Timothy Redaelli Acked-by: Flavio Leitner Acked-by: Flavio Leitner --- rhel/openvswitch-fedora.spec.in | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 9f8664e95..eead10069 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 @@ -529,6 +541,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 @@ -546,8 +564,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