package/wireshark: Fix libpcap detection
PATCH 1/2 package/wireshark: Fix libpcap detection
To reproduce the build error I had to install libpcap0.8-dev on my host system, then wireshark configure picks up
checking for pcap-config... /usr/bin/pcap-config
and fails.
Fixes
http://autobuild.buildroot.net/results/7e3/7e363d18866057df0db3d0d95fa8d9116728f6ce//
and many others
--- package/wireshark/wireshark.mk | 1 + 1 file changed, 1 insertion(+)
package/wireshark/wireshark.mk +1 -0
@@ -24,6 +24,7 @@ WIRESHARK_CONF_OPTS = \ --enable-static=no \ --with-libsmi=no \ --with-lua=no \ + --with-pcap=$(STAGING_DIR)/usr \ --includedir=$(STAGING_DIR)/usr/include # wireshark GUI options
Signature · 1 line
2.6.2
PATCH 2/2 package/wireshark: libpcap is an optional dependency
--- package/wireshark/Config.in | 1 - package/wireshark/wireshark.mk | 14 ++++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-)
package/wireshark/Config.in +0 -1
@@ -1,6 +1,5 @@ config BR2_PACKAGE_WIRESHARK bool "wireshark" - select BR2_PACKAGE_LIBPCAP select BR2_PACKAGE_LIBGLIB2 depends on BR2_USE_MMU # fork(), glib2 depends on BR2_USE_WCHAR # glib2
package/wireshark/wireshark.mk +10 -4
@@ -9,9 +9,7 @@ WIRESHARK_SOURCE = wireshark-$(WIRESHARK_VERSION).tar.bz2 WIRESHARK_SITE = http://www.wireshark.org/download/src/all-versions WIRESHARK_LICENSE = wireshark license WIRESHARK_LICENSE_FILES = COPYING -WIRESHARK_DEPENDENCIES = host-pkgconf libpcap libglib2 -WIRESHARK_CONF_ENV = \ - ac_cv_path_PCAP_CONFIG=$(STAGING_DIR)/usr/bin/pcap-config +WIRESHARK_DEPENDENCIES = host-pkgconf libglib2 # patch touching configure.ac WIRESHARK_AUTORECONF = YES
@@ -24,7 +22,6 @@ WIRESHARK_CONF_OPTS = \ --enable-static=no \ --with-libsmi=no \ --with-lua=no \ - --with-pcap=$(STAGING_DIR)/usr \ --includedir=$(STAGING_DIR)/usr/include # wireshark GUI options
@@ -92,4 +89,13 @@ else WIRESHARK_CONF_OPTS += --without-libnl endif +ifeq ($(BR2_PACKAGE_LIBPCAP),y) +WIRESHARK_CONF_OPTS += --with-pcap=$(STAGING_DIR)/usr +WIRESHARK_CONF_ENV += \ + ac_cv_path_PCAP_CONFIG=$(STAGING_DIR)/usr/bin/pcap-config +WIRESHARK_DEPENDENCIES += libpcap +else +WIRESHARK_CONF_OPTS += --without-pcap +endif + $(eval $(autotools-package))
Signature · 1 line
2.6.2
PATCH 2/2 package/wireshark: libpcap is an optional dependency
Quoted 5 lines · Bernd Kuhls
Signed-off-by Bernd Kuhls <[email protected]>--- package/wireshark/Config.in | 1 - package/wireshark/wireshark.mk | 14 ++++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-)
Hi.
I'm not so sure this is a good idea, capturing packets in wireshark is kind of an expected functionality, and wireshark itself is already big compared to libpcap (lots of dissectors and so on) so it's not like we're saving anything great here.
Regards.
PATCH 2/2 package/wireshark: libpcap is an optional dependency
In reply to Bernd KuhlsDear Bernd Kuhls,
Quoted 5 lines · Bernd Kuhls
Signed-off-by Bernd Kuhls <[email protected]>--- package/wireshark/Config.in | 1 - package/wireshark/wireshark.mk | 14 ++++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-)
I agree with Gustavo on this one, wireshark with libpcap is not very useful, so I don't think it's a good idea to make this an optional dependency.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Thomas Petazzoni
AppliedPATCH 1/2 package/wireshark: Fix libpcap detection
In reply to Bernd KuhlsDear Bernd Kuhls,
Quoted 7 lines · Bernd Kuhls
To reproduce the build error I had to install libpcap0.8-dev on my host system, then wireshark configure picks up
checking for pcap-config...
/usr/bin/pcap-configand fails.
Quoted 8 lines
Fixes
http://autobuild.buildroot.net/results/7e3/7e363d18866057df0db3d0d95fa8d9116728f6ce//
and many othersSigned-off-by Bernd Kuhls <[email protected]>--- package/wireshark/wireshark.mk | 1 + 1 file changed, 1 insertion(+)
Applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 package/wireshark: Fix libpcap detection
In reply to Bernd KuhlsQuoted 4 lines · Bernd Kuhls
To reproduce the build error I had to install libpcap0.8-dev on my host system, then wireshark configure picks up
checking for pcap-config...
/usr/bin/pcap-config
To fundamentally avoid this type of issue (we have a bunch of fixes like this),
I think we should add an additional directory that is put in the _beginning_ of the path in TARGET_MAKE_ENV. This directory could then be populated through the _CONFIG_SCRIPTS mechanism.
What do the others think?
It will be a bit of work to revert all these fixes again :-)
Regards,
Arnout
Quoted 25 lines
and fails.
Fixes
http://autobuild.buildroot.net/results/7e3/7e363d18866057df0db3d0d95fa8d9116728f6ce//
and many othersSigned-off-by Bernd Kuhls <[email protected]>--- package/wireshark/wireshark.mk | 1 + 1 file changed, 1 insertion(+)package/wireshark/wireshark.mk +1
-0@@ -24,6 +24,7 @@ WIRESHARK_CONF_OPTS = \ --enable-static=no \ --with-libsmi=no \ --with-lua=no \ + --with-pcap=$(STAGING_DIR)/usr \ --includedir=$(STAGING_DIR)/usr/include # wireshark GUI options
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH 1/2 package/wireshark: Fix libpcap detection
Arnout, All,
On 2015-12-13 21:59 +0100, Arnout Vandecappelle spake thusly:
Quoted 12 lines · Bernd Kuhls
Quoted 4 lines
To reproduce the build error I had to install libpcap0.8-dev on my host system, then wireshark configure picks up
checking for pcap-config...
/usr/bin/pcap-configTo fundamentally avoid this type of issue (we have a bunch of fixes like this),
I think we should add an additional directory that is put in the _beginning_ of the path inTARGET_MAKE_ENV. This directory could then be populated through the_CONFIG_SCRIPTSmechanism.What do the others think?
I'v estarted having a look at your suggestion. The basic idea is relatively trivial to do, and I now have a FOO_CONFIG_DIR location where I put those scripts.
However, I'm not facing a wall: we use the same PATH for both the target and the host packages, set in BR_PATH. But of course, we do not want the host variants to find those foo-config scripts, since they are for the target; we really want host packages to find the host variants, whether the ones we install as part of our host packages, or the ones from the system.
So, we'd need to split the PATH for host and target variants.
I wonder if that would be acceptable.
Quoted 1 line
It will be a bit of work to revert all these fixes again :-)
Indeed. I've already tried to hunt down all our "fixes" for this, and I have identified two cases:
- packages already accept a FOO_CONFIG environement variable; for
those we just need to unset it;
- we patch the package to replace a hard-coded cal to foo-config with a construct like ${FOO_CONFIG:-foo-config}, for those, we need to alse unpatch the package.
My grep-fuu must still be asleep today, since I could only identify wine in the second category, although I'm pretty sure we have at least a few other packages that we do patch for that.
The packages in the first category are reltively rare: only about 50 of them I could identify, so it should be pretty easy to fix.
I'll work on this a bit mor elater today...
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/2 package/wireshark: Fix libpcap detection
Quoted 14 lines · Yann E. MORIN
Arnout, All,
On 2015-12-13 21:59 +0100, Arnout Vandecappelle spake thusly:
Quoted 11 lines · Bernd Kuhls
Quoted 4 lines
To reproduce the build error I had to install libpcap0.8-dev on my host system, then wireshark configure picks up
checking for pcap-config...
/usr/bin/pcap-configTo fundamentally avoid this type of issue (we have a bunch of fixes like this),
I think we should add an additional directory that is put in the _beginning_ of the path inTARGET_MAKE_ENV. This directory could then be populated through the_CONFIG_SCRIPTSmechanism.
Quoted 7 lines
Quoted 1 line
What do the others think?
I'v estarted having a look at your suggestion. The basic idea is relatively trivial to do, and I now have a
FOO_CONFIG_DIRlocation where I put those scripts.However, I'm not facing a wall:
I guess you _are_ facing a wall :-)
Quoted 10 lines
we use the same PATH for both the target
and the host packages, set inBR_PATH. But of course, we do not want the host variants to find those foo-config scripts, since they are for the target; we really want host packages to find the host variants, whether the ones we install as part of our host packages, or the ones from the system.So, we'd need to split the PATH for host and target variants.
I wonder if that would be acceptable.
They used to be, but since they were identical, Samuel factored them away in
b989976.
Quoted 9 lines
Quoted 2 lines
It will be a bit of work to revert all these fixes again :-)
Indeed. I've already tried to hunt down all our "fixes" for this, and I have identified two cases:
- packages already accept a
FOO_CONFIGenvironement variable; forthose we just need to unset it;
Quoted 7 lines
- we patch the package to replace a hard-coded cal to foo-config with a construct like ${FOO_CONFIG:-foo-config}, for those, we need to alse unpatch the package.
My grep-fuu must still be asleep today, since I could only identify wine in the second category, although I'm pretty sure we have at least a few other packages that we do patch for that.
git grep \\-config -- \*.patch
Lot's of false positives though.
Quoted 2 lines
The packages in the first category are reltively rare: only about 50 of them I could identify, so it should be pretty easy to fix.
I was more concerned with the fixes like the one that was added by this patch:
package/wireshark/wireshark.mk +1 -0
@@ -24,6 +24,7 @@ WIRESHARK_CONF_OPTS = \ --enable-static=no \ --with-libsmi=no \ --with-lua=no \ + --with-pcap=$(STAGING_DIR)/usr \ --includedir=$(STAGING_DIR)/usr/include Another grep which turns up lots of false positives:
git grep '\--with-.*=\$(STAGING_DIR)'
Regards,
Arnout
Quoted 6 lines
I'll work on this a bit mor elater today...
Regards,
Yann E. MORIN.
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH 1/2 package/wireshark: Fix libpcap detection
Arnout, All,
On 2015-12-20 16:49 +0100, Arnout Vandecappelle spake thusly:
Quoted 2 lines · Yann E. MORIN
Quoted 1 line
On 2015-12-13 21:59 +0100, Arnout Vandecappelle spake thusly:
[--SNIP--]
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
To fundamentally avoid this type of issue (we have a bunch of fixes like this),
I think we should add an additional directory that is put in the _beginning_ of the path inTARGET_MAKE_ENV. This directory could then be populated through the_CONFIG_SCRIPTSmechanism.
Quoted 7 lines
Quoted 6 lines
Quoted 1 line
What do the others think?
I'v estarted having a look at your suggestion. The basic idea is relatively trivial to do, and I now have a
FOO_CONFIG_DIRlocation where I put those scripts.
However, I'm not facing a wall:I guess you _are_ facing a wall :-)
s/not/now/ :-)
Quoted 4 lines
Quoted 2 lines
So, we'd need to split the PATH for host and target variants. I wonder if that would be acceptable.
They used to be, but since they were identical, Samuel factored them away in
b989976.
Ah, thianks for the sha1, I was looking for it earlier.
[--SNIP--]
Quoted 5 lines
Quoted 3 lines
My grep-fuu must still be asleep today, since I could only identify wine in the second category, although I'm pretty sure we have at least a few other packages that we do patch for that.
git grep \\-config -- \*.patch
Lot's of false positives though.
I can start with that.
Quoted 16 lines
Quoted 2 lines
The packages in the first category are reltively rare: only about 50 of them I could identify, so it should be pretty easy to fix.
I was more concerned with the fixes like the one that was added by this patch:
package/wireshark/wireshark.mk +1
-0@@ -24,6 +24,7 @@ WIRESHARK_CONF_OPTS = \ --enable-static=no \ --with-libsmi=no \ --with-lua=no \ + --with-pcap=$(STAGING_DIR)/usr \ --includedir=$(STAGING_DIR)/usr/include Another grep which turns up lots of false positives:
Quoted 1 line
git grep '\--with-.*=\$(STAGING_DIR)'
Yep, we can hunt them one by one as time passes...
Thanks!
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/2 package/wireshark: Fix libpcap detection
In reply to Arnout VandecappelleQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Quoted 3 lines · Bernd Kuhls
To reproduce the build error I had to install libpcap0.8-dev on my host system, then wireshark configure picks up
Quoted 8 lines
Quoted 1 line
checking for pcap-config...
/usr/bin/pcap-configTo fundamentally avoid this type of issue (we have a bunch of fixes like this),
I think we should add an additional directory that is put in the _beginning_ of the path inTARGET_MAKE_ENV. This directory could then be populated through the_CONFIG_SCRIPTSmechanism.What do the others think?
Sounds good to me!
Quoted 1 line
It will be a bit of work to revert all these fixes again :-)
But that can be done iteratively. The point is that buildroot will do the right thing for these scripts out of the box (as long as they are listed in the packages providing them) and users of those scripts will automatically get the right ones.
Signature · 1 line
Bye, Peter Korsgaard