snort3: update to 3.1.18.0
authorW. Michael Petullo <mike@flyn.org>
Tue, 14 Dec 2021 15:03:14 +0000 (09:03 -0600)
committerRosen Penev <rosenp@gmail.com>
Thu, 16 Dec 2021 23:30:41 +0000 (15:30 -0800)
Signed-off-by: W. Michael Petullo <mike@flyn.org>
net/snort3/Makefile
net/snort3/patches/010-update-openssl.patch
net/snort3/patches/020-libatomic.patch [new file with mode: 0644]

index 2c675bc2f16026e0726b608a93f5c74d40a1cd3b..eb3d614f18da1ae6e785cedad2678e68e081cc90 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=snort3
-PKG_VERSION:=3.1.4.0
+PKG_VERSION:=3.1.18.0
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/snort3/snort3/archive/refs/tags/
-PKG_HASH:=a68af8ea46a038dfb0ad489e8d11dee62a3e63cb4a639f6bb4fac4ded955fe11
+PKG_HASH:=6e45c16b1815d832b5d6edcd2b705e7838e25c76bfd54b3e86c55ecba6de420a
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 PKG_LICENSE:=GPL-2.0-only
@@ -25,7 +25,7 @@ define Package/snort3
   SUBMENU:=Firewall
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libstdcpp +libdaq3 +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +libhwloc +libtirpc +luajit
+  DEPENDS:=+libstdcpp +libdaq3 +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +libhwloc +libtirpc +luajit +libatomic
   TITLE:=Lightweight Network Intrusion Detection System
   URL:=http://www.snort.org/
   MENU:=1
@@ -78,11 +78,11 @@ define Package/snort3/install
 
        $(INSTALL_DIR) $(1)/usr/lib/snort
        $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_hext.so \
+               $(PKG_INSTALL_DIR)/usr/lib/snort/daq/daq_hext.so \
                $(1)/usr/lib/snort/
 
        $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_file.so \
+               $(PKG_INSTALL_DIR)/usr/lib/snort/daq/daq_file.so \
                $(1)/usr/lib/snort/
 
        $(INSTALL_DIR) $(1)/usr/share/lua
index 9c18d349bc4a2387052b8f1ac38971eb133fff0f..6ba01c7937eb68bdc478cd162ac7a89722b04d36 100644 (file)
@@ -1,13 +1,13 @@
 --- a/src/network_inspectors/appid/appid_inspector.cc
 +++ b/src/network_inspectors/appid/appid_inspector.cc
-@@ -64,7 +64,6 @@ static THREAD_LOCAL PacketTracer::Tracer
+@@ -66,7 +66,6 @@ static THREAD_LOCAL PacketTracer::Tracer
  //           should probably be done outside of appid
  static void openssl_cleanup()
  {
 -    CRYPTO_cleanup_all_ex_data();
  }
  
- static void populate_trace_data(Flow& flow, const OdpContext& odp_context)
+ static void add_appid_to_packet_trace(Flow& flow, const OdpContext& odp_context)
 --- a/src/utils/util.cc
 +++ b/src/utils/util.cc
 @@ -111,7 +111,7 @@ int DisplayBanner()
diff --git a/net/snort3/patches/020-libatomic.patch b/net/snort3/patches/020-libatomic.patch
new file mode 100644 (file)
index 0000000..cdddd6e
--- /dev/null
@@ -0,0 +1,75 @@
+--- /dev/null
++++ b/cmake/FindAtomic.cmake
+@@ -0,0 +1,11 @@
++find_library(ATOMIC_LIBRARIES NAMES atomic
++    HINTS ${ATOMIC_LIBRARIES_DIR_HINT})
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(Atomic DEFAULT_MSG ATOMIC_LIBRARIES)
++
++mark_as_advanced(ATOMIC_LIBRARIES)
++
++if (ATOMIC_LIBRARIES)
++    set(HAVE_ATOMIC "1")
++endif()
+--- a/cmake/include_libraries.cmake
++++ b/cmake/include_libraries.cmake
+@@ -15,6 +15,7 @@ if (ENABLE_UNIT_TESTS)
+ endif (ENABLE_UNIT_TESTS)
+ # optional libraries
++find_package(Atomic QUIET)
+ find_package(LibLZMA QUIET)
+ find_package(Asciidoc QUIET)
+ find_package(DBLATEX QUIET)
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -116,6 +116,14 @@ else ()
+     DAQ Modules:    Dynamic")
+ endif ()
++if (HAVE_ATOMIC)
++    message("\
++    libatomic:      ON")
++else ()
++    message("\
++    libatomic:      OFF")
++endif ()
++
+ if (HAVE_FLATBUFFERS)
+     message("\
+     Flatbuffers:    ON")
+--- a/configure_cmake.sh
++++ b/configure_cmake.sh
+@@ -108,6 +108,8 @@ Optional Packages:
+                             libhs include directory
+     --with-hyperscan-libraries=DIR
+                             libhs library directory
++    --with-atomic-libraries=DIR
++                            atomic library directory
+     --with-flatbuffers-includes=DIR
+                             flatbuffers include directory
+     --with-flatbuffers-libraries=DIR
+@@ -447,6 +449,9 @@ while [ $# -ne 0 ]; do
+         --with-hyperscan-libraries=*)
+             append_cache_entry HS_LIBRARIES_DIR PATH $optarg
+             ;;
++        --with-atomic-libraries=*)
++            append_cache_entry ATOMIC_LIBRARIES_DIR_HINT PATH $optarg
++            ;;
+         --with-flatbuffers-includes=*)
+             append_cache_entry FLATBUFFERS_INCLUDE_DIR_HINT PATH $optarg
+             ;;
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -25,6 +25,10 @@ set(EXTERNAL_INCLUDES
+     ${ZLIB_INCLUDE_DIRS}
+ )
++if ( HAVE_ATOMIC )
++    LIST(APPEND EXTERNAL_LIBRARIES ${ATOMIC_LIBRARIES})
++endif()
++
+ if ( ENABLE_STATIC_DAQ )
+     LIST(APPEND EXTERNAL_LIBRARIES ${DAQ_STATIC_MODULE_LIBS})
+ endif ()