Skip to contentSkip to conversation

daq: new package

PATCH New Sergio Prado 3 participants 7 messages Dec 24, 2017 – Jan 3, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 daq: new package

---
 DEVELOPERS                                         |  1 +
 package/Config.in                                  |  1 +
 ...0001-Fix-build-against-the-musl-C-library.patch | 29 ++++++++++++++++++++++
 package/daq/Config.in                              | 13 ++++++++++
 package/daq/daq.hash                               |  5 ++++
 package/daq/daq.mk                                 | 26 +++++++++++++++++++
 6 files changed, 75 insertions(+)
 create mode 100644 package/daq/0001-Fix-build-against-the-musl-C-library.patch
 create mode 100644 package/daq/Config.in
 create mode 100644 package/daq/daq.hash
 create mode 100644 package/daq/daq.mk
DEVELOPERS +1 -0
index 9f4f2822036e..8f847358f614 100644
@@ -1564,6 +1564,7 @@ F:	package/rtl8189fs/
 F:	package/xr819-xradio/
 
 N:	Sergio Prado <[email protected]>
+F:	package/daq/
 F:	package/libgdiplus/
 F:	package/mongodb/
 F:	package/pimd/
package/Config.in +1 -0
index bd39a374f06f..c1e52a3f0998 100644
@@ -1338,6 +1338,7 @@ menu "Networking"
 	source "package/cgic/Config.in"
 	source "package/cppzmq/Config.in"
 	source "package/czmq/Config.in"
+	source "package/daq/Config.in"
 	source "package/filemq/Config.in"
 	source "package/flickcurl/Config.in"
 	source "package/fmlib/Config.in"
package/daq/0001-Fix-build-against-the-musl-C-library.patch new file +29 -0
new file mode 100644
index 000000000000..a37fe9a7ec56
@@ -0,0 +1,29 @@
+From d3eec1a3b7c67a5e6f524c65608fd2eacac3782b Mon Sep 17 00:00:00 2001
+From: Sergio Prado <[email protected]>
+Date: Sun, 24 Dec 2017 12:58:49 -0200
+Subject: [PATCH] Fix build against the musl C library
+
+Signed-off-by: Sergio Prado <[email protected]>
+---
+ os-daq-modules/daq_ipfw.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/os-daq-modules/daq_ipfw.c b/os-daq-modules/daq_ipfw.c
+index 016beb06ad61..c2a41759bb04 100644
+--- a/os-daq-modules/daq_ipfw.c
++++ b/os-daq-modules/daq_ipfw.c
+@@ -23,10 +23,10 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
++#include <unistd.h>
+ 
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
+ 
+ #include <netinet/in.h>
+ #include <sys/socket.h>
+-- 
+1.9.1
+
package/daq/Config.in new file +13 -0
new file mode 100644
index 000000000000..0627274b52ad
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_DAQ
+	bool "daq"
+	select BR2_PACKAGE_LIBPCAP
+	select BR2_PACKAGE_LIBDNET
+	depends on !BR2_STATIC_LIBS # dlfcn.h
+	help
+	  DAQ is a Data Acquisition library for packet I/O from the
+	  Snort project.
+
+	  https://www.snort.org
+
+comment "daq needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
package/daq/daq.hash new file +5 -0
new file mode 100644
index 000000000000..6a0cb5ed0781
@@ -0,0 +1,5 @@
+# Locally computed:
+sha256 d41da5f7793e66044e6927dd868c0525e7ee4ec1a3515bf74ef9a30cd9273af0  daq-2.0.6.tar.gz
+
+# Hash for license files:
+sha256 07f28289c09fd9eb5a6ff7bc710ff40363601b1bbc6f3637d8ed412150e90819  COPYING
package/daq/daq.mk new file +26 -0
new file mode 100644
index 000000000000..f10c31d4a157
@@ -0,0 +1,26 @@
+################################################################################
+#
+# daq
+#
+################################################################################
+
+DAQ_VERSION = 2.0.6
+DAQ_SITE = https://www.snort.org/downloads/snort
+DAQ_SOURCE = daq-$(DAQ_VERSION).tar.gz
+
+DAQ_LICENSE = GPL-2.0
+DAQ_LICENSE_FILES = COPYING
+
+DAQ_DEPENDENCIES = libpcap libdnet
+
+# package does not build in parallel due to improper make rules
+# related to the generation of the tokdefs.h header file
+DAQ_MAKE = $(MAKE1)
+
+# assume these flags are available to prevent configure from
+# running test programs while cross compiling
+DAQ_CONF_ENV = \
+	ac_cv_lib_pcap_pcap_lib_version="yes" \
+	daq_cv_libpcap_version_1x="yes"
+
+$(eval $(autotools-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 daq: new package

Hello,

Quoted 1 line · Sergio Prado

Thanks, I've applied, after doing a few changes. See below.

package/daq/Config.in line 5

Quoted 11 lines
package/daq/Config.in new file +5 -0
new file mode 100644
index 000000000000..0627274b52ad
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_DAQ
+	bool "daq"
+	select BR2_PACKAGE_LIBPCAP
+	select BR2_PACKAGE_LIBDNET
+	depends on !BR2_STATIC_LIBS # dlfcn.h

By convention, "depends on" lines go before "select" lines. This is verified by check-package.

Quoted 8 lines
package/daq/daq.mk new file +2 -0
new file mode 100644
index 000000000000..f10c31d4a157
@@ -0,0 +1,26 @@
+################################################################################
+#

package/daq/daq.mk line 12

Quoted 10 lines
package/daq/daq.mk new file +10 -0
+# daq
+#
+################################################################################
+
+DAQ_VERSION = 2.0.6
+DAQ_SITE = https://www.snort.org/downloads/snort
+DAQ_SOURCE = daq-$(DAQ_VERSION).tar.gz
+
+DAQ_LICENSE = GPL-2.0
+DAQ_LICENSE_FILES = COPYING

Since it's a library, it felt weird to not have DAQ_INSTALL_STAGING = YES, so I've added that.

package/daq/daq.mk line 24

Quoted 5 lines
package/daq/daq.mk new file +5 -0
+# assume these flags are available to prevent configure from
+# running test programs while cross compiling
+DAQ_CONF_ENV = \
+	ac_cv_lib_pcap_pcap_lib_version="yes" \
+	daq_cv_libpcap_version_1x="yes"

The double quotes around the "yes" were not needed, and we don't do that elsewhere in Buildroot, so I've dropped them.

Applied with those changes. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 daq: new package

Hello Thomas,

Thanks. I'll make sure to run check-package next time.

Best regards,

Sergio Prado
Embedded Labworks
https://e-labworks.com/en

2017-12-30 18:18 GMT-02:00 Thomas Petazzoni <
[email protected]>:

Quoted 55 lines

Hello,

Quoted 1 line · Sergio Prado

Thanks, I've applied, after doing a few changes. See below.

package/daq/Config.in line 5

Quoted 11 lines
package/daq/Config.in new file +5 -0
new file mode 100644
index 000000000000..0627274b52ad
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_DAQ
+     bool "daq"
+     select BR2_PACKAGE_LIBPCAP
+     select BR2_PACKAGE_LIBDNET
+     depends on !BR2_STATIC_LIBS # dlfcn.h

By convention, "depends on" lines go before "select" lines. This is verified by check-package.

package/daq/daq.mk line 1

Quoted 7 lines
package/daq/daq.mk new file +1 -0
new file mode 100644
index 000000000000..f10c31d4a157
@@ -0,0 +1,26 @@
+###########################################################

#####################

package/daq/daq.mk

Quoted 4 lines
package/daq/daq.mk new file +4 -0
+#
+# daq
+#
+###########################################################

#####################

package/daq/daq.mk line 12

Quoted 7 lines
package/daq/daq.mk new file +7 -0
+
+DAQ_VERSION = 2.0.6
+DAQ_SITE = https://www.snort.org/downloads/snort
+DAQ_SOURCE = daq-$(DAQ_VERSION).tar.gz
+
+DAQ_LICENSE = GPL-2.0
+DAQ_LICENSE_FILES = COPYING

Since it's a library, it felt weird to not have DAQ_INSTALL_STAGING = YES, so I've added that.

package/daq/daq.mk line 24

Quoted 5 lines
package/daq/daq.mk new file +5 -0
+# assume these flags are available to prevent configure from
+# running test programs while cross compiling
+DAQ_CONF_ENV = \
+     ac_cv_lib_pcap_pcap_lib_version="yes" \
+     daq_cv_libpcap_version_1x="yes"

The double quotes around the "yes" were not needed, and we don't do that elsewhere in Buildroot, so I've dropped them.

Quoted 8 lines

Applied with those changes. Thanks!

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20171231/f1487d05/attachment.html>

#3 lore raw

PATCH 1/1 daq: new package

Sergio,

Quoted 12 lines · Sergio Prado
Quoted 12 lines
Quoted 12 lines
package/daq/daq.mk new file +4 -0
new file mode 100644
index 000000000000..f10c31d4a157
@@ -0,0 +1,26 @@
 
+################################################################################
+#
+# daq
+#
Quoted 9 lines
Quoted 9 lines

package/daq/daq.mk line 12

Quoted 8 lines
package/daq/daq.mk new file +8 -0
+################################################################################
+
+DAQ_VERSION = 2.0.6
+DAQ_SITE = https://www.snort.org/downloads/snort
+DAQ_SOURCE = daq-$(DAQ_VERSION).tar.gz
+
+DAQ_LICENSE = GPL-2.0
+DAQ_LICENSE_FILES = COPYING

Just realized I never upstreamed this package we had been carrying internally. There were a couple differences with CONF_OPTS and a netfilter queue dependency (may have been self imposed).
https://nopaste.xyz/?ba118cb90d65e34d#Gk9cY60V/sMzu+UT5nY/YTb8bDq2KV+P1swXhc4v28s=

Matt

#4 lore raw

PATCH 1/1 daq: new package

Sergio,

Quoted 26 lines · Matthew Weber

Sergio,

Quoted 12 lines · Sergio Prado
Quoted 12 lines
Quoted 12 lines
package/daq/daq.mk new file +4 -0
new file mode 100644
index 000000000000..f10c31d4a157
@@ -0,0 +1,26 @@
 
+################################################################################
+#
+# daq
+#
Quoted 9 lines
Quoted 9 lines

package/daq/daq.mk line 12

Quoted 8 lines
package/daq/daq.mk new file +8 -0
+################################################################################
+
+DAQ_VERSION = 2.0.6
+DAQ_SITE = https://www.snort.org/downloads/snort
+DAQ_SOURCE = daq-$(DAQ_VERSION).tar.gz
+
+DAQ_LICENSE = GPL-2.0
+DAQ_LICENSE_FILES = COPYING
Quoted 5 lines

Just realized I never upstreamed this package we had been carrying internally. There were a couple differences with CONF_OPTS and a netfilter queue dependency (may have been self imposed).
https://nopaste.xyz/?ba118cb90d65e34d#Gk9cY60V/sMzu+UT5nY/YTb8bDq2KV+P1swXhc4v28s=

DAQ was used internally for snort, here's what I've got for that one too. Never got to upstreaming it and it probably has some bugs :-)
https://nopaste.xyz/?326d9f18b3df4fc2#0B2Zs/N6eiD6OWiMHVvMA0OpAeD7w36hZkDKg/rRFKk=

Matt

#5 lore raw

PATCH 1/1 daq: new package

Hi Matthew,

Actually I was preparing the snort patch. :)

I'll take a look at yours and see if I am missing something.

Thanks!

Sergio Prado
Embedded Labworks
Office: +55 11 2628-3461
Mobile: +55 11 97123-3420

2018-01-03 13:40 GMT-02:00 Matthew Weber <[email protected]> :

Quoted 39 lines

Sergio,

Quoted 4 lines · Matthew Weber

Sergio,

On Sun, Dec 31, 2017 at 6:22 AM, Sergio Prado
<[email protected]> wrote:

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

package/daq/daq.mk

Quoted 8 lines
package/daq/daq.mk new file +1 -0
new file mode 100644
index 000000000000..f10c31d4a157
@@ -0,0 +1,26 @@
 
+###########################################################

#####################

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

package/daq/daq.mk

Quoted 5 lines
package/daq/daq.mk new file +4 -0
+#
+# daq
+#
 
+###########################################################

#####################

Quoted 9 lines
Quoted 8 lines
Quoted 8 lines

package/daq/daq.mk line 12

Quoted 7 lines
package/daq/daq.mk new file +7 -0
+
+DAQ_VERSION = 2.0.6
+DAQ_SITE = https://www.snort.org/downloads/snort
+DAQ_SOURCE = daq-$(DAQ_VERSION).tar.gz
+
+DAQ_LICENSE = GPL-2.0
+DAQ_LICENSE_FILES = COPYING
Quoted 4 lines

Just realized I never upstreamed this package we had been carrying internally. There were a couple differences with CONF_OPTS and a netfilter queue dependency (may have been self imposed).
https://nopaste.xyz/?ba118cb90d65e34d#Gk9cY60V/sMzu+UT5nY/YTb8bDq2KV+

P1swXhc4v28s=

Quoted 1 line
Quoted 7 lines

DAQ was used internally for snort, here's what I've got for that one too. Never got to upstreaming it and it probably has some bugs :-)
https://nopaste.xyz/?326d9f18b3df4fc2#0B2Zs/N6eiD6OWiMHVvMA0OpAeD7w36hZkDK
g/rRFKk=

Matt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180103/2fa8f83c/attachment.html>

#6 lore raw

PATCH 1/1 daq: new package

In reply to Matthew Weber

Hi Matthew,

I think the CONF_OPTS changes are not needed, but my patch is missing the optional dependency on libnetfilter queue. I'll prepare a patch with this change.

Thanks for pointing that out!

Best regards,

Sergio Prado
Embedded Labworks
Office: +55 11 2628-3461
Mobile: +55 11 97123-3420

2018-01-03 12:15 GMT-02:00 Matthew Weber <[email protected]> :

Quoted 28 lines

Sergio,

Quoted 8 lines · Sergio Prado
Quoted 8 lines

package/daq/daq.mk

Quoted 8 lines
package/daq/daq.mk new file +1 -0
new file mode 100644
index 000000000000..f10c31d4a157
@@ -0,0 +1,26 @@
 
+###########################################################

#####################

Quoted 5 lines
Quoted 5 lines

package/daq/daq.mk

Quoted 5 lines
package/daq/daq.mk new file +4 -0
+#
+# daq
+#
 
+###########################################################

#####################

Quoted 8 lines
Quoted 8 lines

package/daq/daq.mk line 12

Quoted 7 lines
package/daq/daq.mk new file +7 -0
+
+DAQ_VERSION = 2.0.6
+DAQ_SITE = https://www.snort.org/downloads/snort
+DAQ_SOURCE = daq-$(DAQ_VERSION).tar.gz
+
+DAQ_LICENSE = GPL-2.0
+DAQ_LICENSE_FILES = COPYING
Quoted 9 lines

Just realized I never upstreamed this package we had been carrying internally. There were a couple differences with CONF_OPTS and a netfilter queue dependency (may have been self imposed).
https://nopaste.xyz/?ba118cb90d65e34d#Gk9cY60V/sMzu+UT5nY/YTb8bDq2KV+
P1swXhc4v28s=

Matt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180103/4c2f4b6a/attachment.html>