From patchwork Wed Jul 19 12:56:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy Redaelli X-Patchwork-Id: 791003 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=) 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 3xCH9414Rkz9s3T for ; Wed, 19 Jul 2017 22:56:39 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id EE7F5918; Wed, 19 Jul 2017 12:56:35 +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 E4B01A84 for ; Wed, 19 Jul 2017 12:56:33 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 055BD175 for ; Wed, 19 Jul 2017 12:56:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4712577350 for ; Wed, 19 Jul 2017 12:56:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4712577350 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=tredaelli@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4712577350 Received: from graphite.mxp.redhat.com (dhcp-176-62.mxp.redhat.com [10.32.176.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id B932E7F47E for ; Wed, 19 Jul 2017 12:56:31 +0000 (UTC) From: Timothy Redaelli To: dev@openvswitch.org Date: Wed, 19 Jul 2017 14:56:28 +0200 Message-Id: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 19 Jul 2017 12:56:32 +0000 (UTC) X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] rhel: Fix creation of symlink for ocf script 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 The policy is to use %files to track installed files. If %files is not used the resulting file is not owned by any package. Before this commit: # rpm -qf /usr/lib/ocf/resource.d/ovn/ovndb-servers file /usr/lib/ocf/resource.d/ovn/ovndb-servers is not owned by any package After this commit: # rpm -qf /usr/lib/ocf/resource.d/ovn/ovndb-servers openvswitch-ovn-common-2.7.90-1.fc26.x86_64 Fixes: a4245b7869c8 ("ovn: Add ovn db servers ocf script in fedora packager") Signed-off-by: Timothy Redaelli Reviewed-by: Aaron Conole Acked-by: Numan Siddique --- rhel/openvswitch-fedora.spec.in | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 3a045d304..2b8b72230 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -285,6 +285,10 @@ install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-central-firewall-service. install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-host-firewall-service.xml \ $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml +install -d -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn +ln -s %{_datadir}/openvswitch/scripts/ovndb-servers.ocf \ + $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers + # remove unpackaged files rm -f $RPM_BUILD_ROOT%{_bindir}/ovs-parse-backtrace \ $RPM_BUILD_ROOT%{_sbindir}/ovs-vlan-bug-workaround \ @@ -363,10 +367,6 @@ rm -rf $RPM_BUILD_ROOT fi %endif -%post ovn-common -mkdir -p /usr/lib/ocf/resource.d/ovn -ln -sf %{_datadir}/openvswitch/scripts/ovndb-servers.ocf /usr/lib/ocf/resource.d/ovn/ovndb-servers - %post ovn-central %if 0%{?systemd_post:1} %systemd_post ovn-northd.service @@ -407,12 +407,6 @@ ln -sf %{_datadir}/openvswitch/scripts/ovndb-servers.ocf /usr/lib/ocf/resource.d /bin/systemctl daemon-reload >/dev/null 2>&1 || : %endif -%postun ovn-common -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - rm -rf /usr/lib/ocf/resource.d/ovn -fi - %postun ovn-central %if 0%{?systemd_postun:1} %systemd_postun ovn-northd.service @@ -560,6 +554,7 @@ fi %{_mandir}/man8/ovn-sbctl.8* %{_mandir}/man5/ovn-nb.5* %{_mandir}/man5/ovn-sb.5* +%{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers %files ovn-central %{_bindir}/ovn-northd