From 19cfbfafe72b60e175b6ec71850f81dbdda73835 Mon Sep 17 00:00:00 2001 From: Muhammad Moinur Rahman Date: Sat, 11 Jul 2020 02:03:42 +0000 Subject: [PATCH] security/snort3: Update version 3.0.1-5=>3.0.2-1 Relnotes: https://github.com/snort3/snort3/releases/tag/3.0.2-1 --- security/snort3/Makefile | 2 +- security/snort3/distinfo | 6 ++-- security/snort3/files/patch-config.cmake.h.in | 11 +++++++ .../files/patch-src_file__api_file__cache.cc | 29 ------------------- .../snort3/files/patch-src_helpers_process.cc | 14 +++++++++ .../snort3/files/patch-src_main_analyzer.cc | 20 ------------- ..._network__inspectors_appid_appid__config.h | 13 --------- security/snort3/pkg-plist | 2 ++ 8 files changed, 31 insertions(+), 66 deletions(-) create mode 100644 security/snort3/files/patch-config.cmake.h.in delete mode 100644 security/snort3/files/patch-src_file__api_file__cache.cc create mode 100644 security/snort3/files/patch-src_helpers_process.cc delete mode 100644 security/snort3/files/patch-src_main_analyzer.cc delete mode 100644 security/snort3/files/patch-src_network__inspectors_appid_appid__config.h diff --git a/security/snort3/Makefile b/security/snort3/Makefile index 28705794794f..f82885f3333f 100644 --- a/security/snort3/Makefile +++ b/security/snort3/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= snort -DISTVERSION= 3.0.1-5 +DISTVERSION= 3.0.2-1 PORTEPOCH= 1 CATEGORIES= security PKGNAMESUFFIX= 3 diff --git a/security/snort3/distinfo b/security/snort3/distinfo index e8999d933128..3753cf199ccd 100644 --- a/security/snort3/distinfo +++ b/security/snort3/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1592607367 -SHA256 (snort3-snort3-3.0.1-5_GH0.tar.gz) = 08c3eab30015d0a93bb6405993ad383d4b7b4fc24e802b452005cf241d898deb -SIZE (snort3-snort3-3.0.1-5_GH0.tar.gz) = 6597239 +TIMESTAMP = 1594422035 +SHA256 (snort3-snort3-3.0.2-1_GH0.tar.gz) = 9afce6f1ea597007a01757db95bc5929ff167d0abae6496a7f8f22aea0acd7f5 +SIZE (snort3-snort3-3.0.2-1_GH0.tar.gz) = 6605146 diff --git a/security/snort3/files/patch-config.cmake.h.in b/security/snort3/files/patch-config.cmake.h.in new file mode 100644 index 000000000000..79348296e3e8 --- /dev/null +++ b/security/snort3/files/patch-config.cmake.h.in @@ -0,0 +1,11 @@ +--- config.cmake.h.in.orig 2020-07-10 23:41:43 UTC ++++ config.cmake.h.in +@@ -164,5 +164,8 @@ + /* Define if `thread_local` keyword should be used */ + #cmakedefine USE_THREAD_LOCAL 1 + ++/* Define to 1 if you have the GNU form of the `sighandler_t' function. */ ++#cmakedefine HAVE_SIGHANDLER_T 1 ++ + #endif + diff --git a/security/snort3/files/patch-src_file__api_file__cache.cc b/security/snort3/files/patch-src_file__api_file__cache.cc deleted file mode 100644 index 12ed7f630ed8..000000000000 --- a/security/snort3/files/patch-src_file__api_file__cache.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- src/file_api/file_cache.cc.orig 2020-03-25 14:13:20 UTC -+++ src/file_api/file_cache.cc -@@ -133,7 +133,7 @@ FileContext* FileCache::add(const FileHashKey& hashKey - struct timeval now; - packet_gettimeofday(&now); - -- struct timeval time_to_add = { timeout, 0 }; -+ struct timeval time_to_add = { static_cast(timeout), 0 }; - timeradd(&now, &time_to_add, &new_node.cache_expire_time); - - new_node.file = new FileContext; -@@ -183,7 +183,7 @@ FileContext* FileCache::find(const FileHashKey& hashKe - } - - struct timeval next_expire_time; -- struct timeval time_to_add = { timeout, 0 }; -+ struct timeval time_to_add = { static_cast(timeout), 0 }; - timeradd(&now, &time_to_add, &next_expire_time); - - // Refresh the timer on the cache. -@@ -311,7 +311,7 @@ bool FileCache::apply_verdict(Packet* p, FileContext* - - if (!timerisset(&file_ctx->pending_expire_time)) - { -- add_time = { lookup_timeout, 0 }; -+ add_time = { static_cast(lookup_timeout), 0 }; - timeradd(&now, &add_time, &file_ctx->pending_expire_time); - - if (PacketTracer::is_active()) diff --git a/security/snort3/files/patch-src_helpers_process.cc b/security/snort3/files/patch-src_helpers_process.cc new file mode 100644 index 000000000000..271ebbe4d8ad --- /dev/null +++ b/security/snort3/files/patch-src_helpers_process.cc @@ -0,0 +1,14 @@ +--- src/helpers/process.cc.orig 2020-07-10 23:44:17 UTC ++++ src/helpers/process.cc +@@ -34,6 +34,11 @@ + #include + #endif + ++/* sighandler_t is GNU extension */ ++#ifndef HAVE_SIGHANDLER_T ++typedef void (*sighandler_t) (int); ++#endif ++ + #include + #include + diff --git a/security/snort3/files/patch-src_main_analyzer.cc b/security/snort3/files/patch-src_main_analyzer.cc deleted file mode 100644 index 3f6793577093..000000000000 --- a/security/snort3/files/patch-src_main_analyzer.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- src/main/analyzer.cc.orig 2020-04-23 16:12:51 UTC -+++ src/main/analyzer.cc -@@ -96,7 +96,7 @@ class RetryQueue (public) - RetryQueue(unsigned interval_ms) - { - assert(interval_ms > 0); -- interval = { interval_ms / 1000, static_cast((interval_ms % 1000) * 1000) }; -+ interval = { static_cast(interval_ms / 1000), static_cast( (interval_ms % 1000) * 1000 )}; - } - - ~RetryQueue() -@@ -552,7 +552,7 @@ void Analyzer::idle() - struct timeval now, increment; - unsigned int timeout = SnortConfig::get_conf()->daq_config->timeout; - packet_gettimeofday(&now); -- increment = { timeout / 1000, static_cast((timeout % 1000) * 1000) }; -+ increment = { static_cast(timeout / 1000), static_cast((timeout % 1000) * 1000) }; - timeradd(&now, &increment, &now); - packet_time_update(&now); - diff --git a/security/snort3/files/patch-src_network__inspectors_appid_appid__config.h b/security/snort3/files/patch-src_network__inspectors_appid_appid__config.h deleted file mode 100644 index 61ef3e25f178..000000000000 --- a/security/snort3/files/patch-src_network__inspectors_appid_appid__config.h +++ /dev/null @@ -1,13 +0,0 @@ ---- src/network_inspectors/appid/appid_config.h.orig 2020-04-28 22:50:18 UTC -+++ src/network_inspectors/appid/appid_config.h -@@ -65,8 +65,8 @@ class AppIdConfig (public) - uint32_t first_decrypted_packet_debug = 0; - #endif - bool log_stats = false; -- unsigned long app_stats_period = 300; -- unsigned long app_stats_rollover_size = 0; -+ uint32_t app_stats_period = 300; -+ uint32_t app_stats_rollover_size = 0; - const char* app_detector_dir = nullptr; - std::string tp_appid_path = ""; - std::string tp_appid_config = ""; diff --git a/security/snort3/pkg-plist b/security/snort3/pkg-plist index 7eef942b540c..02bfce14ad5f 100644 --- a/security/snort3/pkg-plist +++ b/security/snort3/pkg-plist @@ -103,6 +103,7 @@ include/snort/main/snort_config.h include/snort/main/snort_debug.h include/snort/main/snort_types.h include/snort/main/thread.h +include/snort/main/thread_config.h include/snort/managers/codec_manager.h include/snort/managers/inspector_manager.h include/snort/memory/memory_cap.h @@ -130,6 +131,7 @@ include/snort/network_inspectors/rna/rna_logger.h include/snort/packet_io/active.h include/snort/packet_io/sfdaq.h include/snort/packet_io/sfdaq_instance.h +include/snort/payload_injector/payload_injector_module.h include/snort/profiler/memory_context.h include/snort/profiler/memory_defs.h include/snort/profiler/memory_profiler_defs.h