aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2022-06-30 16:18:44 +0000
committerCy Schubert <cy@FreeBSD.org>2022-06-30 16:22:09 +0000
commit9f15b375dc27612c4f6ec121bf195e20e620e0a3 (patch)
treeba3d255cead9e32a941716b8c2fbf84a1495e85f
parent3cd39aa18889e7f9969bfb89a2f2674b7ff4b812 (diff)
downloadports-9f15b375dc27612c4f6ec121bf195e20e620e0a3.tar.gz
ports-9f15b375dc27612c4f6ec121bf195e20e620e0a3.zip
sysutils/syslog-ng: Update to 3.37.1
Update to 3.37.1 and apply a number of other fixes supplied by our upstream that didn't make it into the release. Patch was created and tested by our upstream representative Peter Czanik. Submitted by: Peter Czanik (CzP) <peter.czanik@oneidentity.com> Balabit (a OneIdentity company) / syslog-ng upstream
-rw-r--r--sysutils/syslog-ng/Makefile9
-rw-r--r--sysutils/syslog-ng/distinfo6
-rw-r--r--sysutils/syslog-ng/files/patch-lib_logmatcher.c28
-rw-r--r--sysutils/syslog-ng/files/patch-lib_logmsg_logmsg.h28
-rw-r--r--sysutils/syslog-ng/files/patch-libtest_msg__parse__lib.c23
-rw-r--r--sysutils/syslog-ng/files/patch-libtest_msg__parse__lib.h11
-rw-r--r--sysutils/syslog-ng/files/patch-modules_dbparser_pdbtool_pdbtool.c13
-rw-r--r--sysutils/syslog-ng/files/patch-modules_regexp-parser_tests_test__regexp__parser.c25
-rw-r--r--sysutils/syslog-ng/files/syslog-ng.conf.sample2
-rw-r--r--sysutils/syslog-ng/pkg-plist20
10 files changed, 150 insertions, 15 deletions
diff --git a/sysutils/syslog-ng/Makefile b/sysutils/syslog-ng/Makefile
index 4c4c322710ac..9def20978238 100644
--- a/sysutils/syslog-ng/Makefile
+++ b/sysutils/syslog-ng/Makefile
@@ -1,7 +1,7 @@
# Created by: Ivan Lago <ivan.lago@ifom-ieo-campus.it>
PORTNAME= syslog-ng
-DISTVERSION= 3.36.1
+DISTVERSION= 3.37.1
CATEGORIES= sysutils
MASTER_SITES= https://github.com/balabit/syslog-ng/releases/download/syslog-ng-${DISTVERSION}/
@@ -149,7 +149,10 @@ PYTHON_USES= python:3.5+
PYTHON_CONFIGURE_ON= --enable-python
PYTHON_CONFIGURE_OFF= --disable-python
PYTHON_PLIST_FILES= lib/syslog-ng/libmod-python.so \
- lib/syslog-ng/python/syslogng-1.0-py%%PYTHON_VER%%.egg-info \
+ lib/syslog-ng/python/syslogng-1.0-py%%PYTHON_VER%%.egg-info/PKG-INFO \
+ lib/syslog-ng/python/syslogng-1.0-py%%PYTHON_VER%%.egg-info/SOURCES.txt \
+ lib/syslog-ng/python/syslogng-1.0-py%%PYTHON_VER%%.egg-info/dependency_links.txt \
+ lib/syslog-ng/python/syslogng-1.0-py%%PYTHON_VER%%.egg-info/top_level.txt \
lib/syslog-ng/python/syslogng/__init__.py \
lib/syslog-ng/python/syslogng/__pycache__/__init__.cpython-${PYTHON_SUFFIX}.pyc \
lib/syslog-ng/python/syslogng/debuggercli/__init__.py \
@@ -199,7 +202,7 @@ CURL_PLIST_FILES= lib/syslog-ng/libhttp.so \
RIEMANN_CONFIGURE_ON= --enable-riemann
RIEMANN_CONFIGURE_OFF= --disable-riemann
-RIEMANN_LIB_DEPENDS= libriemann-client.so:net-mgmt/riemann-c-client
+RIEMANN_LIB_DEPENDS= libriemann-client-gnutls.so:net-mgmt/riemann-c-client
RIEMANN_PLIST_FILES= lib/syslog-ng/libriemann.so
KAFKA_CONFIGURE_ON= --enable-kafka
diff --git a/sysutils/syslog-ng/distinfo b/sysutils/syslog-ng/distinfo
index 351d26c12e56..0a85a15a99b8 100644
--- a/sysutils/syslog-ng/distinfo
+++ b/sysutils/syslog-ng/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1646416310
-SHA256 (syslog-ng-3.36.1.tar.gz) = 90a25c9767fe749db50f118ddfc92ec71399763d2ecd5ad4f11ff5eea049e60b
-SIZE (syslog-ng-3.36.1.tar.gz) = 5968598
+TIMESTAMP = 1654593377
+SHA256 (syslog-ng-3.37.1.tar.gz) = d67a320cb896cd5d62f24d9e1bec138847fa4618ae13a3946cae2b75c528ee14
+SIZE (syslog-ng-3.37.1.tar.gz) = 6033219
diff --git a/sysutils/syslog-ng/files/patch-lib_logmatcher.c b/sysutils/syslog-ng/files/patch-lib_logmatcher.c
new file mode 100644
index 000000000000..256fd56f7616
--- /dev/null
+++ b/sysutils/syslog-ng/files/patch-lib_logmatcher.c
@@ -0,0 +1,28 @@
+--- lib/logmatcher.c.orig 2022-06-03 13:40:38 UTC
++++ lib/logmatcher.c
+@@ -30,14 +30,6 @@
+ #include "compat/string.h"
+ #include "compat/pcre.h"
+
+-static gboolean
+-_shall_set_values_indirectly(NVHandle value_handle)
+-{
+- return value_handle != LM_V_NONE &&
+- !log_msg_is_handle_macro(value_handle) &&
+- !log_msg_is_handle_match(value_handle);
+-}
+-
+ static void
+ log_matcher_store_pattern(LogMatcher *self, const gchar *pattern)
+ {
+@@ -416,7 +408,9 @@ log_matcher_pcre_re_feed_value(LogMatcherPcreRe *self,
+ LogMatcherPcreMatchResult *result,
+ gint begin_index, gint end_index)
+ {
+- gboolean indirect = _shall_set_values_indirectly(result->source_handle);
++ gboolean indirect = result->source_handle != LM_V_NONE &&
++ log_msg_is_handle_settable_with_an_indirect_value(target_handle) &&
++ log_msg_is_handle_referencable_from_an_indirect_value(result->source_handle);
+
+ if (target_handle == result->source_handle)
+ {
diff --git a/sysutils/syslog-ng/files/patch-lib_logmsg_logmsg.h b/sysutils/syslog-ng/files/patch-lib_logmsg_logmsg.h
new file mode 100644
index 000000000000..de8126f674f4
--- /dev/null
+++ b/sysutils/syslog-ng/files/patch-lib_logmsg_logmsg.h
@@ -0,0 +1,28 @@
+--- lib/logmsg/logmsg.h.orig 2022-06-03 13:40:38 UTC
++++ lib/logmsg/logmsg.h
+@@ -315,6 +315,25 @@ gboolean log_msg_is_handle_match(NVHandle handle);
+ })
+
+ static inline gboolean
++log_msg_is_handle_referencable_from_an_indirect_value(NVHandle handle)
++{
++ if (handle == LM_V_NONE)
++ return FALSE;
++
++ /* macro values should not be referenced as they are dynamic, store the actual value instead */
++ if (log_msg_is_handle_macro(handle))
++ return FALSE;
++
++ /* matches are pretty temporary, so we should not reference them, as the
++ * next matching operation would overwrite them anyway */
++
++ if (log_msg_is_handle_match(handle))
++ return FALSE;
++
++ return TRUE;
++}
++
++static inline gboolean
+ log_msg_is_handle_settable_with_an_indirect_value(NVHandle handle)
+ {
+ return (handle >= LM_V_MAX);
diff --git a/sysutils/syslog-ng/files/patch-libtest_msg__parse__lib.c b/sysutils/syslog-ng/files/patch-libtest_msg__parse__lib.c
new file mode 100644
index 000000000000..3f4feca24422
--- /dev/null
+++ b/sysutils/syslog-ng/files/patch-libtest_msg__parse__lib.c
@@ -0,0 +1,23 @@
+--- libtest/msg_parse_lib.c.orig 2022-06-03 13:40:39 UTC
++++ libtest/msg_parse_lib.c
+@@ -73,6 +73,20 @@ assert_log_message_value_unset_by_name(LogMessage *sel
+ }
+
+ void
++assert_log_message_value_is_indirect(LogMessage *self, NVHandle handle)
++{
++ NVEntry *entry = nv_table_get_entry(self->payload, handle, NULL, NULL);
++ cr_assert(entry->indirect);
++}
++
++void
++assert_log_message_value_is_direct(LogMessage *self, NVHandle handle)
++{
++ NVEntry *entry = nv_table_get_entry(self->payload, handle, NULL, NULL);
++ cr_assert(!entry->indirect);
++}
++
++void
+ assert_log_message_value_and_type(LogMessage *self, NVHandle handle,
+ const gchar *expected_value, LogMessageValueType expected_type)
+ {
diff --git a/sysutils/syslog-ng/files/patch-libtest_msg__parse__lib.h b/sysutils/syslog-ng/files/patch-libtest_msg__parse__lib.h
new file mode 100644
index 000000000000..0341244a3871
--- /dev/null
+++ b/sysutils/syslog-ng/files/patch-libtest_msg__parse__lib.h
@@ -0,0 +1,11 @@
+--- libtest/msg_parse_lib.h.orig 2022-06-03 13:40:39 UTC
++++ libtest/msg_parse_lib.h
+@@ -34,6 +34,8 @@ void deinit_syslogformat_module(void);
+
+ void assert_log_messages_equal(LogMessage *log_message_a, LogMessage *log_message_b);
+
++void assert_log_message_value_is_direct(LogMessage *self, NVHandle handle);
++void assert_log_message_value_is_indirect(LogMessage *self, NVHandle handle);
+ void assert_log_message_value_unset(LogMessage *self, NVHandle handle);
+ void assert_log_message_value_unset_by_name(LogMessage *self, const gchar *name);
+ void assert_log_message_value(LogMessage *self, NVHandle handle, const gchar *expected_value);
diff --git a/sysutils/syslog-ng/files/patch-modules_dbparser_pdbtool_pdbtool.c b/sysutils/syslog-ng/files/patch-modules_dbparser_pdbtool_pdbtool.c
new file mode 100644
index 000000000000..221b5c6afcb3
--- /dev/null
+++ b/sysutils/syslog-ng/files/patch-modules_dbparser_pdbtool_pdbtool.c
@@ -0,0 +1,13 @@
+--- modules/dbparser/pdbtool/pdbtool.c.orig 2022-06-03 13:40:39 UTC
++++ modules/dbparser/pdbtool/pdbtool.c
+@@ -1282,9 +1282,9 @@ main(int argc, char *argv[])
+ ret = modes[mode].main(argc, argv);
+ scratch_buffers_allocator_deinit();
+ scratch_buffers_global_deinit();
+- stats_destroy();
+ log_tags_global_deinit();
+ log_msg_global_deinit();
++ stats_destroy();
+
+ cfg_free(configuration);
+ configuration = NULL;
diff --git a/sysutils/syslog-ng/files/patch-modules_regexp-parser_tests_test__regexp__parser.c b/sysutils/syslog-ng/files/patch-modules_regexp-parser_tests_test__regexp__parser.c
new file mode 100644
index 000000000000..1f9fd7e6ef63
--- /dev/null
+++ b/sysutils/syslog-ng/files/patch-modules_regexp-parser_tests_test__regexp__parser.c
@@ -0,0 +1,25 @@
+--- modules/regexp-parser/tests/test_regexp_parser.c.orig 2022-06-03 13:40:39 UTC
++++ modules/regexp-parser/tests/test_regexp_parser.c
+@@ -84,6 +84,9 @@ ParameterizedTestParameters(regexp_parser, test_regexp
+ {.msg = "foo", .pattern = "(?<key>foo)|(?<key>bar)", .prefix=".reg.", .expected_result = TRUE, .flags = LMF_DUPNAMES, .name = ".reg.key", .value = "foo"},
+ {.msg = "abc", .pattern = "Abc", .prefix="", .flags = 0, .expected_result = FALSE, .name = NULL, .value = NULL},
+ {.msg = "abc", .pattern = "(?<key>Abc)", .prefix="", .flags = LMF_ICASE, .expected_result = TRUE, .name = "key", .value = "abc"},
++
++ /* store into a builtin value */
++ {.msg = "abcdef", .pattern = "(?<PID>abc)", .prefix="", .flags = 0, .expected_result = TRUE, .name = "PID", .value = "abc"},
+ };
+ return cr_make_param_array(RegexpParserTestParam, parser_params, G_N_ELEMENTS(parser_params));
+ }
+@@ -92,9 +95,10 @@ ParameterizedTest(RegexpParserTestParam *parser_param,
+ {
+ LogParser *p = _construct_regexp_parser(parser_param->prefix, parser_param->pattern, parser_param->flags);
+ gboolean result;
++ GError *e = NULL;
+
+- result = regexp_parser_compile(p, NULL);
+- cr_assert(result, "unexpected compiling failure; pattern=%s\n", parser_param->pattern);
++ result = regexp_parser_compile(p, &e);
++ cr_assert(result, "unexpected compiling failure; pattern=%s, error=%s\n", parser_param->pattern, e->message);
+
+ LogMessage *msg = log_msg_new_empty();
+ log_msg_set_value(msg, LM_V_MESSAGE, parser_param->msg, -1);
diff --git a/sysutils/syslog-ng/files/syslog-ng.conf.sample b/sysutils/syslog-ng/files/syslog-ng.conf.sample
index ebfcbbf7749a..9069feea1c77 100644
--- a/sysutils/syslog-ng/files/syslog-ng.conf.sample
+++ b/sysutils/syslog-ng/files/syslog-ng.conf.sample
@@ -1,4 +1,4 @@
-@version:3.36
+@version:3.37
@include "scl.conf"
#
diff --git a/sysutils/syslog-ng/pkg-plist b/sysutils/syslog-ng/pkg-plist
index 7ea32bae76de..a6bc3fc8c907 100644
--- a/sysutils/syslog-ng/pkg-plist
+++ b/sysutils/syslog-ng/pkg-plist
@@ -197,6 +197,8 @@ include/syslog-ng/rewrite/rewrite-set-tag.h
include/syslog-ng/rewrite/rewrite-set.h
include/syslog-ng/rewrite/rewrite-subst.h
include/syslog-ng/rewrite/rewrite-unset.h
+include/syslog-ng/rewrite/rewrite-set-matches.h
+include/syslog-ng/rewrite/rewrite-unset-matches.h
include/syslog-ng/ringbuffer.h
include/syslog-ng/run-id.h
include/syslog-ng/scanner/csv-scanner/csv-scanner.h
@@ -281,20 +283,20 @@ include/syslog-ng/value-pairs/value-pairs.h
include/syslog-ng/versioning.h
include/syslog-ng/window-size-counter.h
include/syslog-ng/mainloop-threaded-worker.h
-lib/libevtlog-3.36.so.0
-lib/libevtlog-3.36.so.0.0.0
+lib/libevtlog-3.37.so.0
+lib/libevtlog-3.37.so.0.0.0
lib/libevtlog.so
-lib/libloggen_helper-3.36.so.0
-lib/libloggen_helper-3.36.so.0.0.0
+lib/libloggen_helper-3.37.so.0
+lib/libloggen_helper-3.37.so.0.0.0
lib/libloggen_helper.so
-lib/libloggen_plugin-3.36.so.0
-lib/libloggen_plugin-3.36.so.0.0.0
+lib/libloggen_plugin-3.37.so.0
+lib/libloggen_plugin-3.37.so.0.0.0
lib/libloggen_plugin.so
lib/libsecret-storage.so
lib/libsecret-storage.so.0
lib/libsecret-storage.so.0.0.0
-lib/libsyslog-ng-3.36.so.0
-lib/libsyslog-ng-3.36.so.0.0.0
+lib/libsyslog-ng-3.37.so.0
+lib/libsyslog-ng-3.37.so.0.0.0
lib/libsyslog-ng-native-connector.a
lib/libsyslog-ng.so
lib/syslog-ng/libadd-contextual-data.so
@@ -368,6 +370,7 @@ share/syslog-ng/include/scl/iptables/iptables.conf
share/syslog-ng/include/scl/junos/plugin.conf
share/syslog-ng/include/scl/kafka/kafka-java.conf
share/syslog-ng/include/scl/kafka/kafka.conf
+share/syslog-ng/include/scl/kubernetes/kubernetes.conf
share/syslog-ng/include/scl/linux-audit/linux-audit.conf
share/syslog-ng/include/scl/loadbalancer/gen-loadbalancer.sh
share/syslog-ng/include/scl/loadbalancer/plugin.conf
@@ -393,6 +396,7 @@ share/syslog-ng/include/scl/telegram/telegram.conf
share/syslog-ng/include/scl/websense/plugin.conf
share/syslog-ng/include/scl/windowseventlog/plugin.conf
share/syslog-ng/include/scl/windowseventlog/windowseventlog.xml
+share/syslog-ng/include/scl/mariadb/audit.conf
share/syslog-ng/tools/cfg-grammar.y
share/syslog-ng/tools/lex-rules.am
share/syslog-ng/tools/merge-grammar.py