From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id DBFE1E00561 for ; Tue, 19 Nov 2013 20:29:01 -0800 (PST) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.14.5/8.14.5) with ESMTP id rAK4T1ik004613 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 19 Nov 2013 20:29:01 -0800 (PST) Received: from server.local (128.224.21.169) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.2.347.0; Tue, 19 Nov 2013 20:28:59 -0800 Message-ID: <528C3A90.9090009@windriver.com> Date: Tue, 19 Nov 2013 23:29:04 -0500 From: Bruce Ashfield User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Mark Asselstine , References: <1384881645-30221-1-git-send-email-mark.asselstine@windriver.com> In-Reply-To: <1384881645-30221-1-git-send-email-mark.asselstine@windriver.com> Subject: Re: [PATCH] openvswitch: deal with missing RDEPENDS of libpcap X-BeenThere: meta-virtualization@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Discussion of layer enabling hypervisor, virtualization tool stack, and cloud support" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Nov 2013 04:29:02 -0000 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit On 11/19/2013, 12:20 PM, Mark Asselstine wrote: > Bitbake was properly detecting a dependency on libpcap but since it > was not an explicit RDEPENDS the libpcap package was not being built > in all cases which had the potential to break rootfs image building. > > The obvious solution was to add libpcap to the RDEPENDS but looking > upstream it was found that they have removed the use of this library > for all but FreeBSD since for other systems it is unused. So using the > upstream patch here eliminates the dependency and in turn the issue > described above. > > Signed-off-by: Mark Asselstine > --- > ...gure-Only-link-against-libpcap-on-FreeBSD.patch | 70 ++++++++++++++++++++++ > .../openvswitch/openvswitch_1.10.0.bb | 3 +- Looks good to me. I confirmed that OVS 2.0 already has the fix, so just patching 1.10 is good enough. merged. Cheers, Bruce > 2 files changed, 72 insertions(+), 1 deletion(-) > create mode 100644 recipes-networking/openvswitch/files/configure-Only-link-against-libpcap-on-FreeBSD.patch > > diff --git a/recipes-networking/openvswitch/files/configure-Only-link-against-libpcap-on-FreeBSD.patch b/recipes-networking/openvswitch/files/configure-Only-link-against-libpcap-on-FreeBSD.patch > new file mode 100644 > index 0000000..0a44b85 > --- /dev/null > +++ b/recipes-networking/openvswitch/files/configure-Only-link-against-libpcap-on-FreeBSD.patch > @@ -0,0 +1,70 @@ > +From d30e714ccb9d13caf39d14d5b2fc9523b678ed51 Mon Sep 17 00:00:00 2001 > +From: Ben Pfaff > +Date: Thu, 14 Mar 2013 15:20:55 -0700 > +Subject: [PATCH] configure: Only link against libpcap on FreeBSD. > + > +commit d30e714ccb9d13caf39d14d5b2fc9523b678ed51 upstream > +http://git.openvswitch.org/git/openvswitch > + > +On other platforms there is no benefit to linking against libpcap, because > +it is not used. > + > +Signed-off-by: Ben Pfaff > +CC: Ed Maste > +--- > + acinclude.m4 | 7 ++++++- > + configure.ac | 3 +-- > + 2 files changed, 7 insertions(+), 3 deletions(-) > + > +diff --git a/acinclude.m4 b/acinclude.m4 > +index f0610c9..19a47dd 100644 > +--- a/acinclude.m4 > ++++ b/acinclude.m4 > +@@ -1,6 +1,6 @@ > + # -*- autoconf -*- > + > +-# Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc. > ++# Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc. > + # > + # Licensed under the Apache License, Version 2.0 (the "License"); > + # you may not use this file except in compliance with the License. > +@@ -295,6 +295,8 @@ AC_DEFUN([OVS_CHECK_IF_PACKET], > + fi]) > + > + dnl Checks for net/if_dl.h. > ++dnl > ++dnl (We use this as a proxy for checking whether we're building on FreeBSD.) > + AC_DEFUN([OVS_CHECK_IF_DL], > + [AC_CHECK_HEADER([net/if_dl.h], > + [HAVE_IF_DL=yes], > +@@ -303,6 +305,9 @@ AC_DEFUN([OVS_CHECK_IF_DL], > + if test "$HAVE_IF_DL" = yes; then > + AC_DEFINE([HAVE_IF_DL], [1], > + [Define to 1 if net/if_dl.h is available.]) > ++ > ++ # On FreeBSD we use libpcap to access network devices. > ++ AC_SEARCH_LIBS([pcap_open_live], [pcap]) > + fi]) > + > + dnl Checks for buggy strtok_r. > +diff --git a/configure.ac b/configure.ac > +index 1cacd29..bd49179 100644 > +--- a/configure.ac > ++++ b/configure.ac > +@@ -1,4 +1,4 @@ > +-# Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc. > ++# Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc. > + # > + # Licensed under the Apache License, Version 2.0 (the "License"); > + # you may not use this file except in compliance with the License. > +@@ -44,7 +44,6 @@ AC_SYS_LARGEFILE > + AC_SEARCH_LIBS([pow], [m]) > + AC_SEARCH_LIBS([clock_gettime], [rt]) > + AC_SEARCH_LIBS([timer_create], [rt]) > +-AC_SEARCH_LIBS([pcap_open_live], [pcap]) > + > + OVS_CHECK_ESX > + OVS_CHECK_COVERAGE > +-- > +1.8.3.2 > + > diff --git a/recipes-networking/openvswitch/openvswitch_1.10.0.bb b/recipes-networking/openvswitch/openvswitch_1.10.0.bb > index 02c8ab3..c0ea829 100644 > --- a/recipes-networking/openvswitch/openvswitch_1.10.0.bb > +++ b/recipes-networking/openvswitch/openvswitch_1.10.0.bb > @@ -18,7 +18,7 @@ RRECOMMENDS_${PN} += "kernel-module-openvswitch" > # rdeps. E.g. ovs-pki calls sed in the postinstall. sed may be > # queued for install later. > RDEPENDS_${PN} += "sed gawk grep" > -PR = "r3" > +PR = "r4" > > SRC_URI = "http://openvswitch.org/releases/openvswitch-${PV}.tar.gz \ > file://openvswitch-switch \ > @@ -27,6 +27,7 @@ SRC_URI = "http://openvswitch.org/releases/openvswitch-${PV}.tar.gz \ > file://openvswitch-controller-setup \ > file://openvswitch-add-target-python-handling.patch \ > file://openvswitch-add-target-perl-handling.patch \ > + file://configure-Only-link-against-libpcap-on-FreeBSD.patch \ > " > > SRC_URI[md5sum] = "fe8b49efe9f86b57abab00166b971106" >