[01/11] libpcap: Add missing libusb dependency

Submitted by Khem Raj on Jan. 24, 2013, 9:07 p.m.

Details

Message ID 2ba0f6007c1a72e2ee249a47610003031f6c1079.1359061155.git.raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj Jan. 24, 2013, 9:07 p.m.
libpcap notices libusb in its configure if its sysrooted
and ignores it if its not. But this causes problems since
there is no explicit dependency on libusb. Rebuild from shared
state sometimes fails when libusb has not been yet populated
in sysroot and libpcap has. And do_configure of consumers of libpcap e.g. tcpdump
are probing for features on libpcap. All the tests fail since
none of link steps succeed and it sees as if libpcap does
not have required features and configure of tcpdump bails out.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-connectivity/libpcap/libpcap.inc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-connectivity/libpcap/libpcap.inc b/meta/recipes-connectivity/libpcap/libpcap.inc
index 882c62c..0f71227 100644
--- a/meta/recipes-connectivity/libpcap/libpcap.inc
+++ b/meta/recipes-connectivity/libpcap/libpcap.inc
@@ -8,7 +8,7 @@  SECTION = "libs/network"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867 \
                     file://pcap.h;beginline=1;endline=34;md5=8d6cf7e17d5745010d633e30bc529ea9"
-DEPENDS = "flex-native bison-native libnl"
+DEPENDS = "flex-native bison-native libnl libusb"
 
 PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'bluetooth', 'bluetooth', '', d)}"
 PACKAGECONFIG[bluetooth] = "--enable-bluetooth,--disable-bluetooth,bluez4"

Comments

Richard Purdie Jan. 24, 2013, 9:50 p.m.
On Thu, 2013-01-24 at 13:07 -0800, Khem Raj wrote:
> libpcap notices libusb in its configure if its sysrooted
> and ignores it if its not. But this causes problems since
> there is no explicit dependency on libusb. Rebuild from shared
> state sometimes fails when libusb has not been yet populated
> in sysroot and libpcap has. And do_configure of consumers of libpcap e.g. tcpdump
> are probing for features on libpcap. All the tests fail since
> none of link steps succeed and it sees as if libpcap does
> not have required features and configure of tcpdump bails out.
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-connectivity/libpcap/libpcap.inc |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Do we need libusb support in libpcap? What does this dependency buy us
and couldn't we force it off instead?

Cheers,

Richard
Khem Raj Jan. 24, 2013, 10:14 p.m.
On Thu, Jan 24, 2013 at 1:50 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> Do we need libusb support in libpcap? What does this dependency buy us
> and couldn't we force it off instead?

its needed to support canusb in libpcap, I would say yes we should
support it but disabling it would be ok too although all my builds
were silently using libusb so I think unknowingly may be but we are
already shipping with canusb support.
Chris Larson Jan. 24, 2013, 10:42 p.m.
On Thu, Jan 24, 2013 at 3:14 PM, Khem Raj <raj.khem@gmail.com> wrote:

> On Thu, Jan 24, 2013 at 1:50 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > Do we need libusb support in libpcap? What does this dependency buy us
> > and couldn't we force it off instead?
>
> its needed to support canusb in libpcap, I would say yes we should
> support it but disabling it would be ok too although all my builds
> were silently using libusb so I think unknowingly may be but we are
> already shipping with canusb support.


I'd personally prefer it disabled, but I'd think at the very least it
should be a PACKAGECONFIG entry, whether its included in the default value
of PACKAGECONFIG itself or not.
Richard Purdie Jan. 24, 2013, 10:49 p.m.
On Thu, 2013-01-24 at 15:42 -0700, Chris Larson wrote:
> 
> On Thu, Jan 24, 2013 at 3:14 PM, Khem Raj <raj.khem@gmail.com> wrote:
>         On Thu, Jan 24, 2013 at 1:50 PM, Richard Purdie
>         <richard.purdie@linuxfoundation.org> wrote:
>         > Do we need libusb support in libpcap? What does this
>         dependency buy us
>         > and couldn't we force it off instead?
>         
>         
>         its needed to support canusb in libpcap, I would say yes we
>         should
>         support it but disabling it would be ok too although all my
>         builds
>         were silently using libusb so I think unknowingly may be but
>         we are
>         already shipping with canusb support.
> 
> I'd personally prefer it disabled, but I'd think at the very least it
> should be a PACKAGECONFIG entry, whether its included in the default
> value of PACKAGECONFIG itself or not.
> 
Agreed, PACKAGECONFIG, default off is the way to go with this IMO too.

Cheers,

Richard
Khem Raj Jan. 25, 2013, 1 a.m.
On Thu, Jan 24, 2013 at 2:49 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Thu, 2013-01-24 at 15:42 -0700, Chris Larson wrote:
>>
>> On Thu, Jan 24, 2013 at 3:14 PM, Khem Raj <raj.khem@gmail.com> wrote:
>>         On Thu, Jan 24, 2013 at 1:50 PM, Richard Purdie
>>         <richard.purdie@linuxfoundation.org> wrote:
>>         > Do we need libusb support in libpcap? What does this
>>         dependency buy us
>>         > and couldn't we force it off instead?
>>
>>
>>         its needed to support canusb in libpcap, I would say yes we
>>         should
>>         support it but disabling it would be ok too although all my
>>         builds
>>         were silently using libusb so I think unknowingly may be but
>>         we are
>>         already shipping with canusb support.
>>
>> I'd personally prefer it disabled, but I'd think at the very least it
>> should be a PACKAGECONFIG entry, whether its included in the default
>> value of PACKAGECONFIG itself or not.
>>
> Agreed, PACKAGECONFIG, default off is the way to go with this IMO too.

yes seems good. idea, I will try to go that route. very least I will disable it
Khem Raj Jan. 25, 2013, 4:30 a.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/24/2013 02:49 PM, Richard Purdie wrote:
> On Thu, 2013-01-24 at 15:42 -0700, Chris Larson wrote:
>> 
>> On Thu, Jan 24, 2013 at 3:14 PM, Khem Raj <raj.khem@gmail.com>
>> wrote: On Thu, Jan 24, 2013 at 1:50 PM, Richard Purdie 
>> <richard.purdie@linuxfoundation.org> wrote:
>>> Do we need libusb support in libpcap? What does this
>> dependency buy us
>>> and couldn't we force it off instead?
>> 
>> 
>> its needed to support canusb in libpcap, I would say yes we 
>> should support it but disabling it would be ok too although all
>> my builds were silently using libusb so I think unknowingly may
>> be but we are already shipping with canusb support.
>> 
>> I'd personally prefer it disabled, but I'd think at the very
>> least it should be a PACKAGECONFIG entry, whether its included in
>> the default value of PACKAGECONFIG itself or not.
>> 
> Agreed, PACKAGECONFIG, default off is the way to go with this IMO
> too.
> 

OK I have turned it into a PACKAGECONFIG which is off by default.
Disabling canusb support in 1.3 was buggy and it really did not
disable it so I had to backport relevant patches from libpcap upstream
but now
all looks good.

I have pushed V2 into pull tree please take a look.

> Cheers,
> 
> Richard
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlECClQACgkQuwUzVZGdMxTkKACaApmk49aFcWyV8Vcn/I7TToPo
y0MAn2uGa7LTEt+PPy2aMOgsVX4oKdHF
=qLRK
-----END PGP SIGNATURE-----