From patchwork Wed Nov 25 14:04:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Panu Matilainen X-Patchwork-Id: 548579 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (unknown [IPv6:2600:3c00::f03c:91ff:fe6e:bdf7]) by ozlabs.org (Postfix) with ESMTP id 817621402A8 for ; Thu, 26 Nov 2015 01:04:58 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 1B22910B92; Wed, 25 Nov 2015 06:04:57 -0800 (PST) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 6BAD310B8A for ; Wed, 25 Nov 2015 06:04:55 -0800 (PST) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id D1E041E00D1 for ; Wed, 25 Nov 2015 07:04:54 -0700 (MST) X-ASG-Debug-ID: 1448460289-09eadd53cf3c38c0001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar5.cudamail.com with ESMTP id gYtPbJBJsUcU7Gfi (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 25 Nov 2015 07:04:49 -0700 (MST) X-Barracuda-Envelope-From: pmatilai@redhat.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO mx1.redhat.com) (209.132.183.28) by mx1-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 25 Nov 2015 14:04:49 -0000 Received-SPF: pass (mx1-pf2.cudamail.com: SPF record at _spf1.redhat.com designates 209.132.183.28 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.132.183.28 X-Barracuda-RBL-IP: 209.132.183.28 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 31E8525891 for ; Wed, 25 Nov 2015 14:04:48 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org.com (vpn1-4-169.ams2.redhat.com [10.36.4.169]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAPE4kSa018850 for ; Wed, 25 Nov 2015 09:04:47 -0500 X-CudaMail-Envelope-Sender: pmatilai@redhat.com From: Panu Matilainen To: dev@openvswitch.org X-CudaMail-MID: CM-E2-1124019178 X-CudaMail-DTE: 112515 X-CudaMail-Originating-IP: 209.132.183.28 Date: Wed, 25 Nov 2015 16:04:41 +0200 X-ASG-Orig-Subj: [##CM-E2-1124019178##][PATCH] rpms: %exclude has side-effects, remove the files from buildroot instead Message-Id: <162344ada1e22d053343fea37d7a25c01576a4bf.1448460281.git.pmatilai@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-GBUdb-Analysis: 0, 209.132.183.28, Ugly c=0.347001 p=-0.172414 Source Normal X-MessageSniffer-Rules: 0-0-0-8581-c X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1448460289 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC5_MJ1963, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.24710 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Subject: [ovs-dev] [PATCH] rpms: %exclude has side-effects, remove the files from buildroot instead X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Due to the way debuginfo package creation is done in existing rpm versions, its better to physically remove any non-packaged files from the buildroot, using %exclude for the purposes causes artifacts like broken symlinks in the -debuginfo packages. Bug-report: https://bugzilla.redhat.com/show_bug.cgi?id=1281913 Signed-off-by: Panu Matilainen Acked-by: Flavio Leitner --- rhel/openvswitch-fedora.spec.in | 25 ++++++++++++------------- rhel/openvswitch.spec.in | 12 +++++------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index cb76500..15f5c60 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -162,6 +162,18 @@ install -d -m 0755 $RPM_BUILD_ROOT/%{_sharedstatedir}/openvswitch touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/conf.db touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/system-id.conf +# remove unpackaged files +rm -f $RPM_BUILD_ROOT%{_bindir}/ovs-benchmark \ + $RPM_BUILD_ROOT%{_bindir}/ovs-parse-backtrace \ + $RPM_BUILD_ROOT%{_bindir}/ovs-pcap \ + $RPM_BUILD_ROOT%{_bindir}/ovs-tcpundump \ + $RPM_BUILD_ROOT%{_sbindir}/ovs-vlan-bug-workaround \ + $RPM_BUILD_ROOT%{_mandir}/man1/ovs-benchmark.1 \ + $RPM_BUILD_ROOT%{_mandir}/man1/ovs-pcap.1 \ + $RPM_BUILD_ROOT%{_mandir}/man1/ovs-tcpundump.1 \ + $RPM_BUILD_ROOT%{_mandir}/man8/ovs-vlan-bug-workaround.8 \ + $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/ovs-save + %check %if %{with check} if make check TESTSUITEFLAGS='%{_smp_mflags}' || @@ -307,9 +319,6 @@ rm -rf $RPM_BUILD_ROOT %{_sbindir}/ovs-bugtool %{_sbindir}/ovs-vswitchd %{_sbindir}/ovsdb-server -%{_mandir}/man1/ovs-benchmark.1* -%{_mandir}/man1/ovs-pcap.1* -%{_mandir}/man1/ovs-tcpundump.1* %{_mandir}/man1/ovsdb-client.1* %{_mandir}/man1/ovsdb-server.1* %{_mandir}/man1/ovsdb-tool.1* @@ -332,16 +341,6 @@ rm -rf $RPM_BUILD_ROOT /var/lib/openvswitch /var/log/openvswitch %ghost %attr(755,root,root) %{_rundir}/openvswitch -%exclude %{_bindir}/ovs-benchmark -%exclude %{_bindir}/ovs-parse-backtrace -%exclude %{_bindir}/ovs-pcap -%exclude %{_bindir}/ovs-tcpundump -%exclude %{_sbindir}/ovs-vlan-bug-workaround -%exclude %{_mandir}/man1/ovs-benchmark.1.gz -%exclude %{_mandir}/man1/ovs-pcap.1.gz -%exclude %{_mandir}/man1/ovs-tcpundump.1.gz -%exclude %{_mandir}/man8/ovs-vlan-bug-workaround.8.gz -%exclude %{_datadir}/openvswitch/scripts/ovs-save %files ovn %{_bindir}/ovn-controller diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in index 4a2076c..fdb1879 100644 --- a/rhel/openvswitch.spec.in +++ b/rhel/openvswitch.spec.in @@ -64,7 +64,11 @@ rm \ $RPM_BUILD_ROOT/usr/share/man/man8/ovs-test.8 \ $RPM_BUILD_ROOT/usr/share/man/man8/ovs-l3ping.8 \ $RPM_BUILD_ROOT/usr/sbin/ovs-vlan-bug-workaround \ - $RPM_BUILD_ROOT/usr/share/man/man8/ovs-vlan-bug-workaround.8 + $RPM_BUILD_ROOT/usr/share/man/man8/ovs-vlan-bug-workaround.8 \ + $RPM_BUILD_ROOT/usr/bin/ovn-* \ + $RPM_BUILD_ROOT/usr/share/man/man?/ovn-* \ + $RPM_BUILD_ROOT/usr/share/openvswitch/ovn-* \ + $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovn-* (cd "$RPM_BUILD_ROOT" && rm -rf usr/lib) (cd "$RPM_BUILD_ROOT" && rm -rf usr/include) @@ -180,9 +184,3 @@ exit 0 %doc INSTALL.DPDK.md rhel/README.RHEL README-native-tunneling.md /var/lib/openvswitch /var/log/openvswitch -%exclude /usr/bin/ovn-* -%exclude /usr/share/man/man5/ovn-* -%exclude /usr/share/man/man7/ovn-* -%exclude /usr/share/man/man8/ovn-* -%exclude /usr/share/openvswitch/ovn-* -%exclude /usr/share/openvswitch/scripts/ovn-*