package/netsniff-ng: Allow to build with uclibc but w/o mausezahn
PATCH 1/1 package/netsniff-ng: Allow to build with uclibc but w/o mausezahn
mausezahn can't be build with uclibc because uclibc does not provide ceill() function, so it does not allow to build all netsniff-ng's tools with uclibc.
Fix it by moving mausezahn under separate config option, which has own dependencies and packages selection (libnet & libcli).
--- package/netsniff-ng/Config.in | 27 +++++++++++++++++++-------- package/netsniff-ng/netsniff-ng.mk | 16 +++++++++++----- 2 files changed, 30 insertions(+), 13 deletions(-)
package/netsniff-ng/Config.in +19 -8
@@ -1,16 +1,12 @@ -config BR2_PACKAGE_NETSNIFF_NG +menuconfig BR2_PACKAGE_NETSNIFF_NG bool "netsniff-ng" - # Build with uClibc fails due to missing ceill() - depends on !BR2_TOOLCHAIN_USES_UCLIBC depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS select BR2_PACKAGE_LIBNL select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBCLI select BR2_PACKAGE_LIBNETFILTER_CONNTRACK select BR2_PACKAGE_LIBURCU - select BR2_PACKAGE_LIBNET help netsniff-ng is a free, performant Linux network analyzer and networking toolkit. If you will, the Swiss army knife for
@@ -18,7 +14,22 @@ config BR2_PACKAGE_NETSNIFF_NG http://netsniff-ng.org -comment "netsniff-ng needs a glibc or musl toolchain w/ threads, headers >= 3.0" +if BR2_PACKAGE_NETSNIFF_NG + +config BR2_PACKAGE_NETSNIFF_NG_MAUSEZAHN + bool "mausezahn" + default y + # Build with uClibc fails due to missing ceill() + depends on !BR2_TOOLCHAIN_USES_UCLIBC + select BR2_PACKAGE_LIBCLI + select BR2_PACKAGE_LIBNET + +comment "mausezahn needs glibc or musl toolchain" + depends on BR2_TOOLCHAIN_USES_UCLIBC + +endif + +comment "netsniff-ng needs a toolchain w/ threads, headers >= 3.0" depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS - depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_UCLIBC \ - || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
package/netsniff-ng/netsniff-ng.mk +11 -5
@@ -13,9 +13,14 @@ NETSNIFF_NG_LICENSE_FILES = README COPYING NETSNIFF_NG_CONF_ENV = \ NACL_INC_DIR=/dev/null \ NACL_LIB_DIR=/dev/null -NETSNIFF_NG_DEPENDENCIES = \ - libnl libpcap libcli libnetfilter_conntrack \ - liburcu libnet +NETSNIFF_NG_DEPENDENCIES = libnl libpcap libnetfilter_conntrack liburcu + +NETSNIFF_NG_TOOLS = netsniff-ng trafgen astraceroute flowtop ifpps bpfc curvetun + +ifeq ($(BR2_PACKAGE_NETSNIFF_NG_MAUSEZAHN),y) +NETSNIFF_NG_DEPENDENCIES += libcli libnet +NETSNIFF_NG_TOOLS += mausezahn +endif ifeq ($(BR2_PACKAGE_GEOIP),y) NETSNIFF_NG_DEPENDENCIES += geoip
@@ -41,12 +46,13 @@ define NETSNIFF_NG_CONFIGURE_CMDS endef define NETSNIFF_NG_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(NETSNIFF_NG_TOOLS) endef define NETSNIFF_NG_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ - PREFIX=$(TARGET_DIR)/usr ETCDIR=$(TARGET_DIR)/etc install -C $(@D) + PREFIX=$(TARGET_DIR)/usr ETCDIR=$(TARGET_DIR)/etc install \ + -C $(@D) $(NETSNIFF_NG_TOOLS) endef $(eval $(generic-package))
Signature · 1 line
2.14.1
PATCH 1/1 package/netsniff-ng: Allow to build with uclibc but w/o mausezahn
Hi Vadim,
Quoted 36 lines · Vadim Kochan
mausezahn can't be build with uclibc because uclibc does not provide
ceill()function, so it does not allow to build all netsniff-ng's tools with uclibc.Fix it by moving mausezahn under separate config option, which has own dependencies and packages selection (libnet & libcli).
Signed-off-by Vadim Kochan <[email protected]>--- package/netsniff-ng/Config.in | 27 +++++++++++++++++++-------- package/netsniff-ng/netsniff-ng.mk | 16 +++++++++++----- 2 files changed, 30 insertions(+), 13 deletions(-)package/netsniff-ng/Config.in +1
-5@@ -1,16 +1,12 @@ -config BR2_PACKAGE_NETSNIFF_NG +menuconfig BR2_PACKAGE_NETSNIFF_NG bool "netsniff-ng" - # Build with uClibc fails due to missing ceill() - depends on !BR2_TOOLCHAIN_USES_UCLIBC depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS select BR2_PACKAGE_LIBNL select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBCLI select BR2_PACKAGE_LIBNETFILTER_CONNTRACK select BR2_PACKAGE_LIBURCU - select BR2_PACKAGE_LIBNET help netsniff-ng is a free, performant Linux network analyzer and networking toolkit. If you will, the Swiss army knife for
package/netsniff-ng/Config.in config BR2_PACKAGE_NETSNIFF_NG · line 20
Quoted 8 lines
package/netsniff-ng/Config.in +4
-1@@ -18,7 +14,22 @@ config BR2_PACKAGE_NETSNIFF_NG http://netsniff-ng.org -comment "netsniff-ng needs a glibc or musl toolchain w/ threads, headers >= 3.0" +if BR2_PACKAGE_NETSNIFF_NG + +config BR2_PACKAGE_NETSNIFF_NG_MAUSEZAHN + bool "mausezahn"
Is it worth to add a separate config for this? I.e., does it give significant
saving in either binary size (including libcli and libnet dependencies) or runtime performance?
If not, we prefer to handle it "automatically" in the .mk file only. In other
words, keep the libcli and libnet selects above but make them conditional on !uclibc, and change the .mk file as indicated below...
Quoted 23 lines
package/netsniff-ng/Config.in +14
-2+ default y + # Build with uClibc fails due to missing ceill() + depends on !BR2_TOOLCHAIN_USES_UCLIBC + select BR2_PACKAGE_LIBCLI + select BR2_PACKAGE_LIBNET + +comment "mausezahn needs glibc or musl toolchain" + depends on BR2_TOOLCHAIN_USES_UCLIBC + +endif + +comment "netsniff-ng needs a toolchain w/ threads, headers >= 3.0" depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS - depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_UCLIBC \ - || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0package/netsniff-ng/netsniff-ng.mk +0
-0@@ -13,9 +13,14 @@ NETSNIFF_NG_LICENSE_FILES = README COPYING NETSNIFF_NG_CONF_ENV = \
package/netsniff-ng/netsniff-ng.mk NETSNIFF_NG_LICENSE_FILES = README COPYING · line 20
Quoted 10 lines
package/netsniff-ng/netsniff-ng.mk +5
-3NACL_INC_DIR=/dev/null \ NACL_LIB_DIR=/dev/null -NETSNIFF_NG_DEPENDENCIES = \ - libnl libpcap libcli libnetfilter_conntrack \ - liburcu libnet +NETSNIFF_NG_DEPENDENCIES = libnl libpcap libnetfilter_conntrack liburcu + +NETSNIFF_NG_TOOLS = netsniff-ng trafgen astraceroute flowtop ifpps bpfc curvetun + +ifeq ($(BR2_PACKAGE_NETSNIFF_NG_MAUSEZAHN),y)
... make this condition
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),)
(and move the comment from Config.in to here).
Quoted 9 lines
package/netsniff-ng/netsniff-ng.mk +3
-0+NETSNIFF_NG_DEPENDENCIES += libcli libnet +NETSNIFF_NG_TOOLS += mausezahn +endif ifeq ($(BR2_PACKAGE_GEOIP),y) NETSNIFF_NG_DEPENDENCIES += geoip@@ -41,12 +46,13 @@ define NETSNIFF_NG_CONFIGURE_CMDS endef
package/netsniff-ng/netsniff-ng.mk define NETSNIFF_NG_CONFIGURE_CMDS · line 55
Quoted 10 lines
package/netsniff-ng/netsniff-ng.mk +3
-2define NETSNIFF_NG_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(NETSNIFF_NG_TOOLS) endef define NETSNIFF_NG_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ - PREFIX=$(TARGET_DIR)/usr ETCDIR=$(TARGET_DIR)/etc install -C $(@D) + PREFIX=$(TARGET_DIR)/usr ETCDIR=$(TARGET_DIR)/etc install \ + -C $(@D) $(NETSNIFF_NG_TOOLS)
I don't like very much that we have to enumerate the tools in the .mk file, but
I don't see any other possibility.
Regards,
Arnout
Quoted 4 lines
package/netsniff-ng/netsniff-ng.mk +0
-0endef $(eval $(generic-package))
PATCH 1/1 package/netsniff-ng: Allow to build with uclibc but w/o mausezahn
Hi Arnout,
Quoted 52 lines · Arnout Vandecappelle
Hi Vadim,
Quoted 36 lines · Vadim Kochan
mausezahn can't be build with uclibc because uclibc does not provide
ceill()function, so it does not allow to build all netsniff-ng's tools with uclibc.Fix it by moving mausezahn under separate config option, which has own dependencies and packages selection (libnet & libcli).
Signed-off-by Vadim Kochan <[email protected]>--- package/netsniff-ng/Config.in | 27 +++++++++++++++++++-------- package/netsniff-ng/netsniff-ng.mk | 16 +++++++++++----- 2 files changed, 30 insertions(+), 13 deletions(-)package/netsniff-ng/Config.in +1
-5@@ -1,16 +1,12 @@ -config BR2_PACKAGE_NETSNIFF_NG +menuconfig BR2_PACKAGE_NETSNIFF_NG bool "netsniff-ng" - # Build with uClibc fails due to missing ceill() - depends on !BR2_TOOLCHAIN_USES_UCLIBC depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS select BR2_PACKAGE_LIBNL select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_LIBCLI select BR2_PACKAGE_LIBNETFILTER_CONNTRACK select BR2_PACKAGE_LIBURCU - select BR2_PACKAGE_LIBNET help netsniff-ng is a free, performant Linux network analyzer and networking toolkit. If you will, the Swiss army knife forpackage/netsniff-ng/Config.in config BR2_PACKAGE_NETSNIFF_NG · line 20
Quoted 8 lines
package/netsniff-ng/Config.in +4
-1@@ -18,7 +14,22 @@ config BR2_PACKAGE_NETSNIFF_NG http://netsniff-ng.org -comment "netsniff-ng needs a glibc or musl toolchain w/ threads, headers >= 3.0" +if BR2_PACKAGE_NETSNIFF_NG + +config BR2_PACKAGE_NETSNIFF_NG_MAUSEZAHN + bool "mausezahn"Is it worth to add a separate config for this? I.e., does it give significant
saving in either binary size (including libcli and libnet dependencies) or runtime performance?
Quoted 3 lines
If not, we prefer to handle it "automatically" in the .mk file only. In other
words, keep the libcli and libnet selects above but make them conditional on !uclibc, and change the .mk file as indicated below...
Well libnet + libcli uses ~180K, but actually I thought that it is OK to get rid not needed dependencies), if you think this is not good then I will prepare a patch for netsniff-ng's configure script which will check ceill() support and will skip the mausezahn compilation.
Quoted 64 lines
Quoted 24 lines
package/netsniff-ng/Config.in +14
-2+ default y + # Build with uClibc fails due to missing ceill() + depends on !BR2_TOOLCHAIN_USES_UCLIBC + select BR2_PACKAGE_LIBCLI + select BR2_PACKAGE_LIBNET + +comment "mausezahn needs glibc or musl toolchain" + depends on BR2_TOOLCHAIN_USES_UCLIBC + +endif + +comment "netsniff-ng needs a toolchain w/ threads, headers >= 3.0" depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS - depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_UCLIBC \ - || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0package/netsniff-ng/netsniff-ng.mk +0
-0@@ -13,9 +13,14 @@ NETSNIFF_NG_LICENSE_FILES = README COPYING NETSNIFF_NG_CONF_ENV = \package/netsniff-ng/netsniff-ng.mk NETSNIFF_NG_LICENSE_FILES = README COPYING · line 20
Quoted 10 lines
package/netsniff-ng/netsniff-ng.mk +5
-3NACL_INC_DIR=/dev/null \ NACL_LIB_DIR=/dev/null -NETSNIFF_NG_DEPENDENCIES = \ - libnl libpcap libcli libnetfilter_conntrack \ - liburcu libnet +NETSNIFF_NG_DEPENDENCIES = libnl libpcap libnetfilter_conntrack liburcu + +NETSNIFF_NG_TOOLS = netsniff-ng trafgen astraceroute flowtop ifpps bpfc curvetun + +ifeq ($(BR2_PACKAGE_NETSNIFF_NG_MAUSEZAHN),y)... make this condition
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),)
(and move the comment from Config.in to here).
Quoted 9 lines
package/netsniff-ng/netsniff-ng.mk +3
-0+NETSNIFF_NG_DEPENDENCIES += libcli libnet +NETSNIFF_NG_TOOLS += mausezahn +endif ifeq ($(BR2_PACKAGE_GEOIP),y) NETSNIFF_NG_DEPENDENCIES += geoip@@ -41,12 +46,13 @@ define NETSNIFF_NG_CONFIGURE_CMDS endefpackage/netsniff-ng/netsniff-ng.mk define NETSNIFF_NG_CONFIGURE_CMDS · line 55
Quoted 10 lines
package/netsniff-ng/netsniff-ng.mk +3
-2define NETSNIFF_NG_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(NETSNIFF_NG_TOOLS) endef define NETSNIFF_NG_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ - PREFIX=$(TARGET_DIR)/usr ETCDIR=$(TARGET_DIR)/etc install -C $(@D) + PREFIX=$(TARGET_DIR)/usr ETCDIR=$(TARGET_DIR)/etc install \ + -C $(@D) $(NETSNIFF_NG_TOOLS)I don't like very much that we have to enumerate the tools in the .mk file, but
I don't see any other possibility.
Quoted 7 lines
Regards,
ArnoutQuoted 4 lines
package/netsniff-ng/netsniff-ng.mk +0
-0endef $(eval $(generic-package))
Regards,
Vadim Kochan
PATCH 1/1 package/netsniff-ng: Allow to build with uclibc but w/o mausezahn
Quoted 6 lines · Vadim Kochan
Hi Arnout,
Quoted 3 lines · Arnout Vandecappelle
Hi Vadim,
On 04/03/2019 09:57, Vadim Kochan wrote:
[snip]
Quoted 9 lines
Quoted 9 lines
package/netsniff-ng/Config.in config BR2_PACKAGE_NETSNIFF_NG · line 20
Quoted 4 lines
package/netsniff-ng/Config.in +4
-0+if BR2_PACKAGE_NETSNIFF_NG + +config BR2_PACKAGE_NETSNIFF_NG_MAUSEZAHN + bool "mausezahn"Is it worth to add a separate config for this? I.e., does it give significant
saving in either binary size (including libcli and libnet dependencies) or runtime performance?
Quoted 5 lines
Quoted 3 lines
If not, we prefer to handle it "automatically" in the .mk file only. In other
words, keep the libcli and libnet selects above but make them conditional on !uclibc, and change the .mk file as indicated below...Well libnet + libcli uses ~180K,
That indeed sounds significant. To really compare you should do a minimal build
of netsniff-ng and its dependencies using a musl toolchain; if that ends up at something like 2MB rootfs size, the 180K is worth it.
We'd still typically have it in the .mk file only, like:
ifeq ($(BR2_PACKAGE_LIBCLI)$(BR2_PACKAGE_LIBNET):$(BR2_TOOLCHAIN_USES_UCLIBC),yy:)
However, in this case the libcli and libnet dependencies are very non-obvious,
so having an explicit Config.in option indeed makes sense.
Quoted 4 lines
but actually I thought that it is OK to
get rid not needed dependencies), if you think this is not good then I will prepare a patch for netsniff-ng's configure script which will checkceill()support and will skip the mausezahn compilation.
That would be even better of course, because then we don't need that explicit
list of tools.
Now you mention it, it looks like the libpcap dependency is also only used for
mausezahn...
Regards,
Arnout
Quoted 76 lines
Quoted 65 lines
Quoted 25 lines
package/netsniff-ng/Config.in +14
-2+ default y + # Build with uClibc fails due to missing ceill() + depends on !BR2_TOOLCHAIN_USES_UCLIBC + select BR2_PACKAGE_LIBCLI + select BR2_PACKAGE_LIBNET + +comment "mausezahn needs glibc or musl toolchain" + depends on BR2_TOOLCHAIN_USES_UCLIBC + +endif + +comment "netsniff-ng needs a toolchain w/ threads, headers >= 3.0" depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS - depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_UCLIBC \ - || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0package/netsniff-ng/netsniff-ng.mk +0
-0@@ -13,9 +13,14 @@ NETSNIFF_NG_LICENSE_FILES = README COPYING NETSNIFF_NG_CONF_ENV = \package/netsniff-ng/netsniff-ng.mk NETSNIFF_NG_LICENSE_FILES = README COPYING · line 20
Quoted 10 lines
package/netsniff-ng/netsniff-ng.mk +5
-3NACL_INC_DIR=/dev/null \ NACL_LIB_DIR=/dev/null -NETSNIFF_NG_DEPENDENCIES = \ - libnl libpcap libcli libnetfilter_conntrack \ - liburcu libnet +NETSNIFF_NG_DEPENDENCIES = libnl libpcap libnetfilter_conntrack liburcu + +NETSNIFF_NG_TOOLS = netsniff-ng trafgen astraceroute flowtop ifpps bpfc curvetun + +ifeq ($(BR2_PACKAGE_NETSNIFF_NG_MAUSEZAHN),y)... make this condition
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),)
(and move the comment from Config.in to here).
Quoted 9 lines
package/netsniff-ng/netsniff-ng.mk +3
-0+NETSNIFF_NG_DEPENDENCIES += libcli libnet +NETSNIFF_NG_TOOLS += mausezahn +endif ifeq ($(BR2_PACKAGE_GEOIP),y) NETSNIFF_NG_DEPENDENCIES += geoip@@ -41,12 +46,13 @@ define NETSNIFF_NG_CONFIGURE_CMDS endefpackage/netsniff-ng/netsniff-ng.mk define NETSNIFF_NG_CONFIGURE_CMDS · line 55
Quoted 10 lines
package/netsniff-ng/netsniff-ng.mk +3
-2define NETSNIFF_NG_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(NETSNIFF_NG_TOOLS) endef define NETSNIFF_NG_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ - PREFIX=$(TARGET_DIR)/usr ETCDIR=$(TARGET_DIR)/etc install -C $(@D) + PREFIX=$(TARGET_DIR)/usr ETCDIR=$(TARGET_DIR)/etc install \ + -C $(@D) $(NETSNIFF_NG_TOOLS)I don't like very much that we have to enumerate the tools in the .mk file, but
I don't see any other possibility.Quoted 7 lines
Regards,
ArnoutQuoted 4 lines
package/netsniff-ng/netsniff-ng.mk +0
-0endef $(eval $(generic-package))Regards,
Vadim Kochan
PATCH 1/1 package/netsniff-ng: Allow to build with uclibc but w/o mausezahn
Hello,
Quoted 2 lines · On Wed, 6 Mar 2019 10:28:26 +0100 Arnout Vandecappelle <[email protected]> wrote:
Now you mention it, it looks like the libpcap dependency is also only used for
mausezahn...
Not so sure:
$ grep pcap.h bpf_comp.c #include <pcap.h> $ grep bpf_comp netsniff-ng/Makefile netsniff-ng-objs += bpf_comp.o
$ grep -r "lpcap" * configure: $CC -o $TMPDIR/pcaptest $TMPDIR/pcaptest.c -lpcap >> config.log 2>&1 mausezahn/Makefile: -lpcap \ netsniff-ng/Makefile:netsniff-ng-libs += -lpcap
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/netsniff-ng: Allow to build with uclibc but w/o mausezahn
In reply to Arnout VandecappelleQuoted 8 lines · On Mon, 4 Mar 2019 20:06:00 +0100 Arnout Vandecappelle <[email protected]> wrote:
package/netsniff-ng/netsniff-ng.mk define NETSNIFF_NG_CONFIGURE_CMDS · line 55
Quoted 5 lines
define
NETSNIFF_NG_INSTALL_TARGET_CMDSpackage/netsniff-ng/netsniff-ng.mk +2
-1$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ - PREFIX=$(TARGET_DIR)/usr ETCDIR=$(TARGET_DIR)/etc install -C $(@D) + PREFIX=$(TARGET_DIR)/usr ETCDIR=$(TARGET_DIR)/etc install \ + -C $(@D) $(NETSNIFF_NG_TOOLS)I don't like very much that we have to enumerate the tools in the .mk file, but
I don't see any other possibility.
The Makefile has the following targets:
allbutmausezahn: $(filter-out mausezahn,$(TOOLS)) install_allbutmausezahn: $(foreach tool,$(filter-out mausezahn,$(TOOLS)),$(tool)_install)
So I think we can build/install everything except mausezahen fairly easily without duplicating the list of tools in netsniff-ng.mk.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/netsniff-ng: Allow to build with uclibc but w/o mausezahn
Quoted 12 lines · Thomas Petazzoni
Quoted 8 lines · On Mon, 4 Mar 2019 20:06:00 +0100 Arnout Vandecappelle <[email protected]> wrote:
package/netsniff-ng/netsniff-ng.mk define NETSNIFF_NG_CONFIGURE_CMDS · line 55
Quoted 5 lines
define
NETSNIFF_NG_INSTALL_TARGET_CMDSpackage/netsniff-ng/netsniff-ng.mk +2
-1$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ - PREFIX=$(TARGET_DIR)/usr ETCDIR=$(TARGET_DIR)/etc install -C $(@D) + PREFIX=$(TARGET_DIR)/usr ETCDIR=$(TARGET_DIR)/etc install \ + -C $(@D) $(NETSNIFF_NG_TOOLS)I don't like very much that we have to enumerate the tools in the .mk file, but
I don't see any other possibility.
Quoted 9 lines
The
Makefilehas the following targets:allbutmausezahn: $(filter-out mausezahn,$(TOOLS)) install_allbutmausezahn: $(foreach tool,$(filter-out mausezahn,$(TOOLS)),$(tool)_install)So I think we can build/install everything except mausezahen fairly easily without duplicating the list of tools in netsniff-ng.mk.
Good catch, I really missed this event that I contributed some quite a lot of patches to netsniff-ng :))
But still separate config option for mz is OK ? If not, then I will prepare patch for netsniff-ng configure to check for existence of missed function for mz, but in that case libnet and libcli will be selected by buildroot even if mz is not built.
Regards,
Vadim Kochan
Thomas Petazzoni
AppliedPATCH 1/1 package/netsniff-ng: Allow to build with uclibc but w/o mausezahn
In reply to Vadim KochanHello Vadim,
Quoted 8 lines · On Mon, 4 Mar 2019 10:57:41 +0200 Vadim Kochan <[email protected]> wrote:
mausezahn can't be build with uclibc because uclibc does not provide
ceill()function, so it does not allow to build all netsniff-ng's tools with uclibc.Fix it by moving mausezahn under separate config option, which has own dependencies and packages selection (libnet & libcli).
Signed-off-by Vadim Kochan <[email protected]>
Applied to master with a few changes.
package/netsniff-ng/Config.in line 1
Quoted 2 lines
package/netsniff-ng/Config.in +1
-1-config BR2_PACKAGE_NETSNIFF_NG +menuconfig BR2_PACKAGE_NETSNIFF_NG
Kept "config" here. We don't typically have a "menuconfig" for just one sub-option.
Quoted 1 line
+NETSNIFF_NG_TOOLS = netsniff-ng trafgen astraceroute flowtop ifpps bpfc curvetun
I changed this to use the allbutmausezahn and install_allbutmausezahn targets.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com