Skip to contentSkip to conversation

package/daq3: new package

PATCH New Fabrice Fontaine 2 participants 4 messages Apr 25, 2021 – Jun 14, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/2 package/daq3: new package

Add daq3 package to be able to add the snort3 package.

daq3 is not compatatible with snort as daq_load_modules has been removed

daq3 package has been created from the daq package, here is a summary of the changes:
- Drop patch (not needed anymore)
- Enable parallel build as there is no more tokdefs.h
- Drop libdnet dependency
- Drop host-bison and host-flex dependencies
- Drop libpcap workarounds
- ipq module dropped since version 3.0.0-alpha1 and
https://github.com/snort3/libdaq/commit/80c62799a936118c80894bf91f396c8aa8ba45a6
- Add LICENSE file (same content than COPYING)
- Update hash of COPYING (project name and GPLv2 text updated with
https://github.com/snort3/libdaq/commit/46e8722da230082a5728175270ea3c04432d1af0)
- Add a dependency on gcc 4.9 for {t,u}h_{d,s}port that are protected on glibc by _FAVOR_BSD (and so !defined _GNU_SOURCE) until version 2.19:
https://sourceware.org/git/?p=glibc.git;a=commit;h=7011c2622fe3e10a29dbe74f06aaebd07710127d

---
Changes v3 -> v4:
- Bump to latest version (and so drop patch)

Changes v2 -> v3 (after review of Heiko Thiery):
- Bump to latest upstream version (and so drop second patch)
- Update indentation of hash file to two spaces)
- Fix first patch

 DEVELOPERS             |  1 +
 package/Config.in      |  1 +
 package/daq3/Config.in | 14 ++++++++++++++
 package/daq3/daq3.hash |  6 ++++++
 package/daq3/daq3.mk   | 30 ++++++++++++++++++++++++++++++
 5 files changed, 52 insertions(+)
 create mode 100644 package/daq3/Config.in
 create mode 100644 package/daq3/daq3.hash
 create mode 100644 package/daq3/daq3.mk
DEVELOPERS +1 -0
index 561f59cedf..664337561f 100644
@@ -835,6 +835,7 @@ F:	package/belle-sip/
 F:	package/belr/
 F:	package/boinc/
 F:	package/cairo/
+F:	package/daq3/
 F:	package/duktape/
 F:	package/expat/
 F:	package/flatbuffers/
package/Config.in +1 -0
index 95fe132e2b..c30a1603e3 100644
@@ -1728,6 +1728,7 @@ menu "Networking"
 	source "package/curlpp/Config.in"
 	source "package/czmq/Config.in"
 	source "package/daq/Config.in"
+	source "package/daq3/Config.in"
 	source "package/davici/Config.in"
 	source "package/enet/Config.in"
 	source "package/filemq/Config.in"
package/daq3/Config.in new file +14 -0
new file mode 100644
index 0000000000..ad7d55db5b
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_DAQ3
+	bool "daq3"
+	depends on !BR2_PACKAGE_DAQ
+	depends on !BR2_STATIC_LIBS # dlfcn.h
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	help
+	  DAQ is a Data Acquisition library for packet I/O from the
+	  Snort project.
+
+	  https://www.snort.org
+
+comment "daq3 needs a toolchain w/ dynamic library, gcc >= 4.9"
+	depends on !BR2_PACKAGE_DAQ
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
package/daq3/daq3.hash new file +6 -0
new file mode 100644
index 0000000000..33ad2e388b
@@ -0,0 +1,6 @@
+# Locally computed:
+sha256  920344f5c98ac68b401d1bc92ebaed78b0d15779b0480c213db279d0a60acc32  daq3-3.0.3.tar.gz
+
+# Hash for license files:
+sha256  64601289158eddad72cb4de72652f9e64dc886942c910b38ddee93ba13b0db26  COPYING
+sha256  64601289158eddad72cb4de72652f9e64dc886942c910b38ddee93ba13b0db26  LICENSE
package/daq3/daq3.mk new file +30 -0
new file mode 100644
index 0000000000..a0493031d8
@@ -0,0 +1,30 @@
+################################################################################
+#
+# daq3
+#
+################################################################################
+
+DAQ3_VERSION = 3.0.3
+DAQ3_SITE = $(call github,snort3,libdaq,v$(DAQ3_VERSION))
+DAQ3_LICENSE = GPL-2.0
+DAQ3_LICENSE_FILES = COPYING LICENSE
+DAQ3_INSTALL_STAGING = YES
+DAQ3_DEPENDENCIES = host-pkgconf
+# From git
+DAQ3_AUTORECONF = YES
+
+ifeq ($(BR2_PACKAGE_LIBNETFILTER_QUEUE),y)
+DAQ3_DEPENDENCIES += libnetfilter_queue
+DAQ3_CONF_OPTS += --enable-nfq-module
+else
+DAQ3_CONF_OPTS += --disable-nfq-module
+endif
+
+ifeq ($(BR2_PACKAGE_LIBPCAP),y)
+DAQ3_DEPENDENCIES += libpcap
+DAQ3_CONF_OPTS += --enable-pcap-module
+else
+DAQ3_CONF_OPTS += --disable-pcap-module
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
2.30.2
#1 lore raw

PATCH v4 2/2 package/snort3: new package

Snort 3 is the next generation Snort IPS (Intrusion Prevention System).

- Support multiple packet processing threads
- Shared configuration and attribute table
- Use a simple, scriptable configuration
- Make key components pluggable
- Autodetect services for portless configuration
- Support sticky buffers in rules
- Autogenerate reference documentation
- Provide better cross platform support

https://www.snort.org/snort3

---
Changes v3 -> v4:
- Bump to latest upstream version
- Add new flex dependency

Changes v2 -> v3 (after review of Heiko Thiery):
- Bump to latest upstream version (and so drop patches)
- Update indentation of hash file to two spaces)

Changes v1 -> v2:
- Fix duplicate "depends on" error in Config.in

 DEVELOPERS                 |  1 +
 package/Config.in          |  1 +
 package/snort3/Config.in   | 42 ++++++++++++++++++++++++++++
 package/snort3/snort3.hash |  6 ++++
 package/snort3/snort3.mk   | 57 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 107 insertions(+)
 create mode 100644 package/snort3/Config.in
 create mode 100644 package/snort3/snort3.hash
 create mode 100644 package/snort3/snort3.mk
DEVELOPERS +1 -0
index 664337561f..a72ddc9740 100644
@@ -905,6 +905,7 @@ F:	package/python-yatl/
 F:	package/rocksdb/
 F:	package/rygel/
 F:	package/safeclib/
+F:	package/snort3/
 F:	package/suricata/
 F:	package/tinycbor/
 F:	package/tinydtls/
package/Config.in +1 -0
index c30a1603e3..c3379b2376 100644
@@ -2279,6 +2279,7 @@ endif
 	source "package/sngrep/Config.in"
 	source "package/snmpclitools/Config.in"
 	source "package/snort/Config.in"
+	source "package/snort3/Config.in"
 	source "package/socat/Config.in"
 	source "package/socketcand/Config.in"
 	source "package/softether/Config.in"
package/snort3/Config.in new file +42 -0

42 lines not on this page · raw message

package/snort3/snort3.hash new file +6 -0
new file mode 100644
index 0000000000..48eddd74c9
@@ -0,0 +1,6 @@
+# Locally computed:
+sha256  a68af8ea46a038dfb0ad489e8d11dee62a3e63cb4a639f6bb4fac4ded955fe11  snort3-3.1.4.0.tar.gz
+
+# Hash for license files:
+sha256  3f1cbfb20bb2c608e1a474421880d08b8cba6abb00ab7736d22c481d71656a6d  COPYING
+sha256  f98260a6d3e5ef4ede8a2a6b698e5ac91d64c09243f7171e1c5b17b920a835c7  LICENSE
package/snort3/snort3.mk new file +57 -0

57 lines not on this page · raw message

Signature · 1 line
2.30.2
#2 lore raw

PATCH v4 2/2 package/snort3: new package

Quoted 12 lines · Fabrice Fontaine

Snort 3 is the next generation Snort IPS (Intrusion Prevention System).

- Support multiple packet processing threads
- Shared configuration and attribute table
- Use a simple, scriptable configuration
- Make key components pluggable
- Autodetect services for portless configuration
- Support sticky buffers in rules
- Autogenerate reference documentation
- Provide better cross platform support

Quoted 3 lines

https://www.snort.org/snort3

Applied both to master, thanks.

Was there a reason you didn't carry Heiko's Reviewed-by? I don't think you
changed that much, did you?

Regards,
Arnout

Quoted 170 lines

---
Changes v3 -> v4:
- Bump to latest upstream version
- Add new flex dependency

Changes v2 -> v3 (after review of Heiko Thiery):
- Bump to latest upstream version (and so drop patches)
- Update indentation of hash file to two spaces)

Changes v1 -> v2:
- Fix duplicate "depends on" error in Config.in

 DEVELOPERS                 |  1 +
 package/Config.in          |  1 +
 package/snort3/Config.in   | 42 ++++++++++++++++++++++++++++
 package/snort3/snort3.hash |  6 ++++
 package/snort3/snort3.mk   | 57 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 107 insertions(+)
 create mode 100644 package/snort3/Config.in
 create mode 100644 package/snort3/snort3.hash
 create mode 100644 package/snort3/snort3.mk
DEVELOPERS +1 -0
index 664337561f..a72ddc9740 100644
@@ -905,6 +905,7 @@ F:	package/python-yatl/
 F:	package/rocksdb/
 F:	package/rygel/
 F:	package/safeclib/
+F:	package/snort3/
 F:	package/suricata/
 F:	package/tinycbor/
 F:	package/tinydtls/
package/Config.in +1 -0
index c30a1603e3..c3379b2376 100644
@@ -2279,6 +2279,7 @@ endif
 	source "package/sngrep/Config.in"
 	source "package/snmpclitools/Config.in"
 	source "package/snort/Config.in"
+	source "package/snort3/Config.in"
 	source "package/socat/Config.in"
 	source "package/socketcand/Config.in"
 	source "package/softether/Config.in"
package/snort3/Config.in new file +42 -0
new file mode 100644
index 0000000000..75923c3c20
@@ -0,0 +1,42 @@
+config BR2_PACKAGE_SNORT3
+	bool "snort3"
+	depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS # luajit
+	depends on !(BR2_PACKAGE_DAQ || BR2_PACKAGE_SNORT)
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_STATIC_LIBS # daq3
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11
+	depends on BR2_TOOLCHAIN_HAS_THREADS # hwloc
+	depends on BR2_USE_WCHAR
+	select BR2_PACKAGE_DAQ3
+	select BR2_PACKAGE_FLEX
+	select BR2_PACKAGE_HWLOC
+	select BR2_PACKAGE_LIBDNET
+	select BR2_PACKAGE_LIBPCAP
+	select BR2_PACKAGE_LUAJIT
+	select BR2_PACKAGE_PCRE
+	select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_ZLIB
+	help
+	  Snort 3 is the next generation Snort IPS (Intrusion
+	  Prevention System).
+
+	  - Support multiple packet processing threads
+	  - Shared configuration and attribute table
+	  - Use a simple, scriptable configuration
+	  - Make key components pluggable
+	  - Autodetect services for portless configuration
+	  - Support sticky buffers in rules
+	  - Autogenerate reference documentation
+	  - Provide better cross platform support
+
+	  https://www.snort.org/snort3
+
+comment "snort3 needs a toolchain w/ C++, wchar, threads, dynamic library, gcc >= 4.9"
+	depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
+	depends on !(BR2_PACKAGE_DAQ || BR2_PACKAGE_SNORT)
+	depends on BR2_USE_MMU
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
+		BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
package/snort3/snort3.hash new file +6 -0
new file mode 100644
index 0000000000..48eddd74c9
@@ -0,0 +1,6 @@
+# Locally computed:
+sha256  a68af8ea46a038dfb0ad489e8d11dee62a3e63cb4a639f6bb4fac4ded955fe11  snort3-3.1.4.0.tar.gz
+
+# Hash for license files:
+sha256  3f1cbfb20bb2c608e1a474421880d08b8cba6abb00ab7736d22c481d71656a6d  COPYING
+sha256  f98260a6d3e5ef4ede8a2a6b698e5ac91d64c09243f7171e1c5b17b920a835c7  LICENSE
package/snort3/snort3.mk new file +57 -0
new file mode 100644
index 0000000000..1c49da8ec0
@@ -0,0 +1,57 @@
+################################################################################
+#
+# snort3
+#
+################################################################################
+
+SNORT3_VERSION = 3.1.4.0
+SNORT3_SITE = $(call github,snort3,snort3,$(SNORT3_VERSION))
+SNORT3_LICENSE = GPL-2.0
+SNORT3_LICENSE_FILES = COPYING LICENSE
+
+SNORT3_DEPENDENCIES = \
+	host-pkgconf daq3 flex hwloc libdnet libpcap luajit openssl pcre zlib
+
+SNORT3_CONF_OPTS = \
+	-DENABLE_GDB=OFF \
+	-DENABLE_STATIC_DAQ=OFF \
+	-DMAKE_DOC=OFF
+
+ifeq ($(BR2_PACKAGE_FLATBUFFERS),y)
+SNORT3_DEPENDENCIES += flatbuffers
+SNORT3_CONF_OPTS += -DHAVE_FLATBUFFERS=ON
+else
+SNORT3_CONF_OPTS += -DHAVE_FLATBUFFERS=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_LIBICONV),y)
+SNORT3_DEPENDENCIES += libiconv
+SNORT3_CONF_OPTS += -DHAVE_ICONV=ON
+endif
+
+ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
+SNORT3_DEPENDENCIES += libtirpc
+endif
+
+ifeq ($(BR2_PACKAGE_SAFECLIB),y)
+SNORT3_DEPENDENCIES += safeclib
+SNORT3_CONF_OPTS += -DENABLE_SAFEC=ON
+else
+SNORT3_CONF_OPTS += -DENABLE_SAFEC=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
+SNORT3_DEPENDENCIES += util-linux
+SNORT3_CONF_OPTS += -DHAVE_UUID=ON
+else
+SNORT3_CONF_OPTS += -DHAVE_UUID=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_XZ),y)
+SNORT3_DEPENDENCIES += xz
+SNORT3_CONF_OPTS += -DHAVE_LZMA=ON
+else
+SNORT3_CONF_OPTS += -DHAVE_LZMA=OFF
+endif
+
+$(eval $(cmake-package))
#3 lore raw

PATCH v4 2/2 package/snort3: new package

Le lun. 14 juin 2021 ? 22:39, Arnout Vandecappelle <[email protected]> a ?crit :

Quoted 16 lines · Fabrice Fontaine
Quoted 12 lines

Snort 3 is the next generation Snort IPS (Intrusion Prevention System).

- Support multiple packet processing threads
- Shared configuration and attribute table
- Use a simple, scriptable configuration
- Make key components pluggable
- Autodetect services for portless configuration
- Support sticky buffers in rules
- Autogenerate reference documentation
- Provide better cross platform support

Quoted 8 lines
Quoted 3 lines

https://www.snort.org/snort3

Applied both to master, thanks.

Was there a reason you didn't carry Heiko's Reviewed-by? I don't think you
changed that much, did you?

Indeed, I should have carried it.

Quoted 166 lines

Regards,
Arnout

Quoted 162 lines

---
Changes v3 -> v4:
- Bump to latest upstream version
- Add new flex dependency

Changes v2 -> v3 (after review of Heiko Thiery):
- Bump to latest upstream version (and so drop patches)
- Update indentation of hash file to two spaces)

Changes v1 -> v2:
- Fix duplicate "depends on" error in Config.in

 DEVELOPERS                 |  1 +
 package/Config.in          |  1 +
 package/snort3/Config.in   | 42 ++++++++++++++++++++++++++++
 package/snort3/snort3.hash |  6 ++++
 package/snort3/snort3.mk   | 57 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 107 insertions(+)
 create mode 100644 package/snort3/Config.in
 create mode 100644 package/snort3/snort3.hash
 create mode 100644 package/snort3/snort3.mk
DEVELOPERS +1 -0
index 664337561f..a72ddc9740 100644
@@ -905,6 +905,7 @@ F:        package/python-yatl/
 F:   package/rocksdb/
 F:   package/rygel/
 F:   package/safeclib/
+F:   package/snort3/
 F:   package/suricata/
 F:   package/tinycbor/
 F:   package/tinydtls/
package/Config.in +1 -0
index c30a1603e3..c3379b2376 100644
@@ -2279,6 +2279,7 @@ endif
      source "package/sngrep/Config.in"
      source "package/snmpclitools/Config.in"
      source "package/snort/Config.in"
+     source "package/snort3/Config.in"
      source "package/socat/Config.in"
      source "package/socketcand/Config.in"
      source "package/softether/Config.in"
package/snort3/Config.in new file +42 -0
new file mode 100644
index 0000000000..75923c3c20
@@ -0,0 +1,42 @@
+config BR2_PACKAGE_SNORT3
+     bool "snort3"
+     depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS # luajit
+     depends on !(BR2_PACKAGE_DAQ || BR2_PACKAGE_SNORT)
+     depends on BR2_USE_MMU # fork()
+     depends on BR2_INSTALL_LIBSTDCPP
+     depends on !BR2_STATIC_LIBS # daq3
+     depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11
+     depends on BR2_TOOLCHAIN_HAS_THREADS # hwloc
+     depends on BR2_USE_WCHAR
+     select BR2_PACKAGE_DAQ3
+     select BR2_PACKAGE_FLEX
+     select BR2_PACKAGE_HWLOC
+     select BR2_PACKAGE_LIBDNET
+     select BR2_PACKAGE_LIBPCAP
+     select BR2_PACKAGE_LUAJIT
+     select BR2_PACKAGE_PCRE
+     select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC
+     select BR2_PACKAGE_OPENSSL
+     select BR2_PACKAGE_ZLIB
+     help
+       Snort 3 is the next generation Snort IPS (Intrusion
+       Prevention System).
+
+       - Support multiple packet processing threads
+       - Shared configuration and attribute table
+       - Use a simple, scriptable configuration
+       - Make key components pluggable
+       - Autodetect services for portless configuration
+       - Support sticky buffers in rules
+       - Autogenerate reference documentation
+       - Provide better cross platform support
+
+       https://www.snort.org/snort3
+
+comment "snort3 needs a toolchain w/ C++, wchar, threads, dynamic library, gcc >= 4.9"
+     depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
+     depends on !(BR2_PACKAGE_DAQ || BR2_PACKAGE_SNORT)
+     depends on BR2_USE_MMU
+     depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
+             BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || \
+             !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
package/snort3/snort3.hash new file +6 -0
new file mode 100644
index 0000000000..48eddd74c9
@@ -0,0 +1,6 @@
+# Locally computed:
+sha256  a68af8ea46a038dfb0ad489e8d11dee62a3e63cb4a639f6bb4fac4ded955fe11  snort3-3.1.4.0.tar.gz
+
+# Hash for license files:
+sha256  3f1cbfb20bb2c608e1a474421880d08b8cba6abb00ab7736d22c481d71656a6d  COPYING
+sha256  f98260a6d3e5ef4ede8a2a6b698e5ac91d64c09243f7171e1c5b17b920a835c7  LICENSE
package/snort3/snort3.mk new file +50 -0
new file mode 100644
index 0000000000..1c49da8ec0
@@ -0,0 +1,57 @@
+################################################################################
+#
+# snort3
+#
+################################################################################
+
+SNORT3_VERSION = 3.1.4.0
+SNORT3_SITE = $(call github,snort3,snort3,$(SNORT3_VERSION))
+SNORT3_LICENSE = GPL-2.0
+SNORT3_LICENSE_FILES = COPYING LICENSE
+
+SNORT3_DEPENDENCIES = \
+     host-pkgconf daq3 flex hwloc libdnet libpcap luajit openssl pcre zlib
+
+SNORT3_CONF_OPTS = \
+     -DENABLE_GDB=OFF \
+     -DENABLE_STATIC_DAQ=OFF \
+     -DMAKE_DOC=OFF
+
+ifeq ($(BR2_PACKAGE_FLATBUFFERS),y)
+SNORT3_DEPENDENCIES += flatbuffers
+SNORT3_CONF_OPTS += -DHAVE_FLATBUFFERS=ON
+else
+SNORT3_CONF_OPTS += -DHAVE_FLATBUFFERS=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_LIBICONV),y)
+SNORT3_DEPENDENCIES += libiconv
+SNORT3_CONF_OPTS += -DHAVE_ICONV=ON
+endif
+
+ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
+SNORT3_DEPENDENCIES += libtirpc
+endif
+
+ifeq ($(BR2_PACKAGE_SAFECLIB),y)
+SNORT3_DEPENDENCIES += safeclib
+SNORT3_CONF_OPTS += -DENABLE_SAFEC=ON
+else
+SNORT3_CONF_OPTS += -DENABLE_SAFEC=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
+SNORT3_DEPENDENCIES += util-linux
+SNORT3_CONF_OPTS += -DHAVE_UUID=ON
+else
+SNORT3_CONF_OPTS += -DHAVE_UUID=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_XZ),y)
Quoted 8 lines

package/snort3/snort3.mk line 57

Quoted 8 lines
package/snort3/snort3.mk new file +7 -0
+SNORT3_DEPENDENCIES += xz
+SNORT3_CONF_OPTS += -DHAVE_LZMA=ON
+else
+SNORT3_CONF_OPTS += -DHAVE_LZMA=OFF
+endif
+
+$(eval $(cmake-package))

Best Regards,

Fabrice