public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-admin/syslog-ng/files/patches/, app-admin/syslog-ng/
@ 2019-10-22  4:49 Joonas Niilola
  0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2019-10-22  4:49 UTC (permalink / raw
  To: gentoo-commits

commit:     72d9f90c29493798c7b7cd90a62e84f7e18643cf
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Thu Oct 17 12:26:50 2019 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Oct 22 04:43:12 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72d9f90c

app-admin/syslog-ng: drop old

Package-Manager: Portage-2.3.77, Repoman-2.3.17
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/13326
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-admin/syslog-ng/Manifest                       |   1 -
 .../patches/syslog-ng-3.23.1-fix-sigabrt.patch     |  72 ---------
 app-admin/syslog-ng/syslog-ng-3.23.1-r1.ebuild     | 174 ---------------------
 3 files changed, 247 deletions(-)

diff --git a/app-admin/syslog-ng/Manifest b/app-admin/syslog-ng/Manifest
index 940c725e707..82ae91362c8 100644
--- a/app-admin/syslog-ng/Manifest
+++ b/app-admin/syslog-ng/Manifest
@@ -1,3 +1,2 @@
 DIST syslog-ng-3.22.1.tar.gz 4981746 BLAKE2B e4f7e47f1939fb07d204c4721ff558a606cf6c6ee072278ff7c9bc1db7406e6abf058ac8a96bd4df0b867272bdbc5401528d47c94e60d90ff5ebb1aaec49e223 SHA512 4f68c0b58c6b3df9a870fa0b627525b9599149374e805a665c5143be54f814a564a80cbe76c7d5aab093b58825a96411b13cd2ce0f1439298723bd008096807f
-DIST syslog-ng-3.23.1.tar.gz 5008517 BLAKE2B a128707ed36ae3a236dbd3bffb080bd39187a77b3ed7fc0c8d6a2de65f6b761f3c7160a8fdc804c56e4ba673451779382a91c83c8d8cd15ec6fed2c799309adf SHA512 d1ded084a9141637da44cb9c7d8c66585e498b16ff6717548e31ad61bbfe1e04de3554183c8a4de540d9280de1e6370303845010164b3b2ac53ecce1e7434a48
 DIST syslog-ng-3.24.1.tar.gz 4909513 BLAKE2B 4b8d05899f9767784b6d24008d55808bee0af4a29883b2cb67031d23f4937632ba00f2ed7a9e969984ebec2785243a9e60811c4c2ccb3c6188c66a71af004f36 SHA512 b5326193e20db16763d3e187292bf683ebb77032b800a6e54a4ce2dd3864dda48b3d0ffc4d442eff0261117ac7a76d7927f4c8d0d96fc59ce29b46da6bd052d5

diff --git a/app-admin/syslog-ng/files/patches/syslog-ng-3.23.1-fix-sigabrt.patch b/app-admin/syslog-ng/files/patches/syslog-ng-3.23.1-fix-sigabrt.patch
deleted file mode 100644
index 6d27e88abf7..00000000000
--- a/app-admin/syslog-ng/files/patches/syslog-ng-3.23.1-fix-sigabrt.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-diff --git a/lib/logsource.c b/lib/logsource.c
-index 3f38b66e8b..83c61a8e93 100644
---- a/lib/logsource.c
-+++ b/lib/logsource.c
-@@ -633,7 +633,20 @@ log_source_queue(LogPipe *s, LogMessage *msg, const LogPathOptions *path_options
-                   evt_tag_printf("msg", "%p", msg));
- 
-   msg_set_context(NULL);
-+}
-+
-+static void
-+_initialize_window(LogSource *self, gint init_window_size)
-+{
-+  self->window_initialized = TRUE;
-+  window_size_counter_set(&self->window_size, init_window_size);
-+  self->full_window_size = init_window_size;
-+}
- 
-+static gboolean
-+_is_window_initialized(LogSource *self)
-+{
-+  return self->window_initialized;
- }
- 
- void
-@@ -645,11 +658,9 @@ log_source_set_options(LogSource *self, LogSourceOptions *options,
-    * configuration and we received a SIGHUP.  This means that opened
-    * connections will not have their window_size changed. */
- 
--  if ((gint)window_size_counter_get(&self->window_size, NULL) == -1)
--    {
--      window_size_counter_set(&self->window_size, options->init_window_size);
--      self->full_window_size = options->init_window_size;
--    }
-+  if (!_is_window_initialized(self))
-+    _initialize_window(self, options->init_window_size);
-+
-   self->options = options;
-   if (self->stats_id)
-     g_free(self->stats_id);
-@@ -679,7 +690,7 @@ log_source_init_instance(LogSource *self, GlobalConfig *cfg)
-   self->super.free_fn = log_source_free;
-   self->super.init = log_source_init;
-   self->super.deinit = log_source_deinit;
--  window_size_counter_set(&self->window_size, (gsize)-1);
-+  self->window_initialized = FALSE;
-   self->ack_tracker = NULL;
- }
- 
-@@ -696,7 +707,9 @@ log_source_free(LogPipe *s)
- 
-   ack_tracker_free(self->ack_tracker);
-   self->ack_tracker = NULL;
--  _release_dynamic_window(self);
-+
-+  if (G_UNLIKELY(dynamic_window_is_enabled(&self->dynamic_window)))
-+    _release_dynamic_window(self);
- }
- 
- void
-diff --git a/lib/logsource.h b/lib/logsource.h
-index 370842efc2..75d4926046 100644
---- a/lib/logsource.h
-+++ b/lib/logsource.h
-@@ -71,6 +71,7 @@ struct _LogSource
-   gchar *stats_instance;
-   WindowSizeCounter window_size;
-   DynamicWindow dynamic_window;
-+  gboolean window_initialized;
-   /* full_window_size = static + dynamic */
-   gsize full_window_size;
-   atomic_gssize window_size_to_be_reclaimed;

diff --git a/app-admin/syslog-ng/syslog-ng-3.23.1-r1.ebuild b/app-admin/syslog-ng/syslog-ng-3.23.1-r1.ebuild
deleted file mode 100644
index bc13ee0fdc7..00000000000
--- a/app-admin/syslog-ng/syslog-ng-3.23.1-r1.ebuild
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
-inherit autotools python-single-r1 systemd
-
-MY_PV_MM=$(ver_cut 1-2)
-DESCRIPTION="syslog replacement with advanced filtering features"
-HOMEPAGE="https://syslog-ng.com/open-source-log-management"
-SRC_URI="https://github.com/balabit/syslog-ng/releases/download/${P}/${P}.tar.gz"
-
-LICENSE="GPL-2+ LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
-IUSE="amqp caps dbi geoip geoip2 http ipv6 json kafka libressl mongodb pacct python redis smtp snmp spoof-source systemd tcpd"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-# unit tests require https://github.com/Snaipe/Criterion with additional deps
-RESTRICT="test"
-
-RDEPEND="
-	>=dev-libs/glib-2.10.1:2
-	>=dev-libs/ivykis-0.42.4
-	>=dev-libs/libpcre-6.1:=
-	!dev-libs/eventlog
-	amqp? ( >=net-libs/rabbitmq-c-0.8.0:=[ssl] )
-	caps? ( sys-libs/libcap )
-	dbi? ( >=dev-db/libdbi-0.9.0 )
-	geoip? ( >=dev-libs/geoip-1.5.0 )
-	geoip2? ( dev-libs/libmaxminddb:= )
-	http? ( net-misc/curl )
-	json? ( >=dev-libs/json-c-0.9:= )
-	kafka? ( >=dev-libs/librdkafka-1.0.0:= )
-	mongodb? ( >=dev-libs/mongo-c-driver-1.2.0 )
-	python? ( ${PYTHON_DEPS} )
-	redis? ( >=dev-libs/hiredis-0.11.0:= )
-	smtp? ( net-libs/libesmtp )
-	snmp? ( net-analyzer/net-snmp )
-	spoof-source? ( net-libs/libnet:1.1= )
-	systemd? ( sys-apps/systemd:= )
-	tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
-	!libressl? ( dev-libs/openssl:0= )
-	libressl? ( dev-libs/libressl:0= )"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	sys-devel/flex
-	virtual/pkgconfig"
-
-DOCS=( AUTHORS NEWS.md CONTRIBUTING.md contrib/syslog-ng.conf.{HP-UX,RedHat,SunOS,doc}
-	contrib/syslog2ng "${T}/syslog-ng.conf.gentoo.hardened"
-	"${T}/syslog-ng.logrotate.hardened" "${FILESDIR}/README.hardened" )
-
-# bug #695176
-PATCHES=( "${FILESDIR}/patches/${PN}-3.23.1-fix-sigabrt.patch" )
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	local f
-
-	use python && python_fix_shebang .
-
-	# remove bundled libs
-	rm -r lib/ivykis || die
-
-	# drop scl modules requiring json
-	if use !json; then
-		sed -i -r '/cim|elasticsearch|ewmm|graylog2|loggly|logmatic|netskope|nodejs|osquery|slack/d' scl/Makefile.am || die
-	fi
-
-	# drop scl modules requiring http
-	if use !http; then
-		sed -i -r '/slack|telegram/d' scl/Makefile.am || die
-	fi
-
-	# use gentoo default path
-	if use systemd; then
-		sed -e 's@/etc/syslog-ng.conf@/etc/syslog-ng/syslog-ng.conf@g;s@/var/run@/run@g' \
-			-i contrib/systemd/syslog-ng@default || die
-	fi
-
-	for f in syslog-ng.logrotate.hardened.in syslog-ng.logrotate.in; do
-		sed \
-			-e "s#@GENTOO_RESTART@#$(usex systemd "systemctl kill -s HUP syslog-ng@default" \
-				"/etc/init.d/syslog-ng reload")#g" \
-			"${FILESDIR}/${f}" > "${T}/${f/.in/}" || die
-	done
-
-	for f in syslog-ng.conf.gentoo.hardened.in \
-			syslog-ng.conf.gentoo.in; do
-		sed -e "s/@SYSLOGNG_VERSION@/${MY_PV_MM}/g" "${FILESDIR}/${f}" > "${T}/${f/.in/}" || die
-	done
-
-	default
-	eautoreconf
-}
-
-src_configure() {
-	local myconf=(
-		--disable-docs
-		--disable-java
-		--disable-java-modules
-		--disable-riemann
-		--enable-manpages
-		--localstatedir=/var/lib/syslog-ng
-		--sysconfdir=/etc/syslog-ng
-		--with-embedded-crypto
-		--with-ivykis=system
-		--with-module-dir=/usr/$(get_libdir)/syslog-ng
-		--with-pidfile-dir=/var/run
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-		$(use_enable amqp)
-		$(usex amqp --with-librabbitmq-client=system --without-librabbitmq-client)
-		$(use_enable caps linux-caps)
-		$(use_enable dbi sql)
-		$(use_enable geoip)
-		$(use_enable geoip2)
-		$(use_enable http)
-		$(use_enable ipv6)
-		$(use_enable json)
-		$(use_enable kafka)
-		$(use_enable mongodb)
-		$(usex mongodb --with-mongoc=system "--without-mongoc --disable-legacy-mongodb-options")
-		$(use_enable pacct)
-		$(use_enable python)
-		$(use_enable redis)
-		$(use_enable smtp)
-		$(use_enable snmp snmp-dest)
-		$(use_enable spoof-source)
-		$(use_enable systemd)
-		$(use_enable tcpd tcp-wrapper)
-	)
-
-	econf "${myconf[@]}"
-}
-
-src_install() {
-	default
-
-	# Install default configuration
-	insinto /etc/default
-	doins contrib/systemd/syslog-ng@default
-
-	insinto /etc/syslog-ng
-	newins "${T}/syslog-ng.conf.gentoo" syslog-ng.conf
-
-	insinto /etc/logrotate.d
-	newins "${T}/syslog-ng.logrotate" syslog-ng
-
-	newinitd "${FILESDIR}/syslog-ng.rc" syslog-ng
-	newconfd "${FILESDIR}/syslog-ng.confd" syslog-ng
-	keepdir /etc/syslog-ng/patterndb.d /var/lib/syslog-ng
-	find "${D}" -name '*.la' -delete || die
-
-	use python && python_optimize
-}
-
-pkg_postinst() {
-	# bug #355257
-	if ! has_version app-admin/logrotate ; then
-		elog "It is highly recommended that app-admin/logrotate be emerged to"
-		elog "manage the log files.  ${PN} installs a file in /etc/logrotate.d"
-		elog "for logrotate to use."
-	fi
-
-	if use systemd; then
-		ewarn "The service file for systemd has changed to support multiple instances."
-		ewarn "To start the default instance issue:"
-		ewarn "# systemctl start syslog-ng@default"
-	fi
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/syslog-ng/files/patches/, app-admin/syslog-ng/
@ 2020-02-20 13:27 Joonas Niilola
  0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2020-02-20 13:27 UTC (permalink / raw
  To: gentoo-commits

commit:     21d50f7a6514f069f6de2204f5ecdf302c27ce6b
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue Feb  4 11:14:31 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Feb 20 13:17:21 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21d50f7a

app-admin/syslog-ng: fix building with CFLAGS=-fno-common

Closes: https://bugs.gentoo.org/707124
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/14516
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../files/patches/syslog-ng-fno-common.patch       | 320 +++++++++++++++++++++
 app-admin/syslog-ng/syslog-ng-3.25.1.ebuild        |   4 +-
 2 files changed, 323 insertions(+), 1 deletion(-)

diff --git a/app-admin/syslog-ng/files/patches/syslog-ng-fno-common.patch b/app-admin/syslog-ng/files/patches/syslog-ng-fno-common.patch
new file mode 100644
index 00000000000..abec9213cd1
--- /dev/null
+++ b/app-admin/syslog-ng/files/patches/syslog-ng-fno-common.patch
@@ -0,0 +1,320 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e9b4183fc..1f8f16c13 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -331,8 +331,7 @@ endif()
+ add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -j $$(nproc) --output-on-failure)
+ 
+ set(IMPORTANT_WARNINGS
+-  -Wshadow
+-  -fcommon)
++  -Wshadow)
+ 
+ set(ACCEPTABLE_WARNINGS
+   -Wno-stack-protector
+diff --git a/Makefile.am b/Makefile.am
+index 8b24eeaed..86c090638 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -54,8 +54,7 @@ AM_CPPFLAGS		= -I$(top_srcdir)/lib -I$(top_srcdir)/modules -I$(top_builddir)/lib
+ 
+ # Important warnings
+ AM_CFLAGS = \
+-	-Wshadow \
+-	-fcommon
++	-Wshadow
+ 
+ # Acceptable warnings
+ AM_CFLAGS += \
+diff --git a/lib/logmsg/tests/test_log_message.c b/lib/logmsg/tests/test_log_message.c
+index 245568ce5..e51d78b94 100644
+--- a/lib/logmsg/tests/test_log_message.c
++++ b/lib/logmsg/tests/test_log_message.c
+@@ -32,6 +32,8 @@
+ #include <stdlib.h>
+ #include <glib/gprintf.h>
+ 
++MsgFormatOptions parse_options;
++
+ typedef struct _LogMessageTestParams
+ {
+   LogMessage *message;
+@@ -151,7 +153,7 @@ void
+ setup(void)
+ {
+   app_startup();
+-  init_and_load_syslogformat_module();
++  init_parse_options_and_load_syslogformat(&parse_options);
+ }
+ 
+ void
+diff --git a/libtest/cr_template.c b/libtest/cr_template.c
+index 35e47aa3f..4f0913368 100644
+--- a/libtest/cr_template.c
++++ b/libtest/cr_template.c
+@@ -34,10 +34,12 @@
+ 
+ #include "msg_parse_lib.h"
+ 
++static MsgFormatOptions parse_options;
++
+ void
+ init_template_tests(void)
+ {
+-  init_and_load_syslogformat_module();
++  init_parse_options_and_load_syslogformat(&parse_options);
+ }
+ 
+ void
+diff --git a/libtest/msg_parse_lib.c b/libtest/msg_parse_lib.c
+index ae0d1654b..b3c7cb652 100644
+--- a/libtest/msg_parse_lib.c
++++ b/libtest/msg_parse_lib.c
+@@ -27,15 +27,13 @@
+ 
+ #include <criterion/criterion.h>
+ 
+-MsgFormatOptions parse_options;
+-
+ void
+-init_and_load_syslogformat_module(void)
++init_parse_options_and_load_syslogformat(MsgFormatOptions *parse_options)
+ {
+   configuration = cfg_new_snippet();
+   cfg_load_module(configuration, "syslogformat");
+-  msg_format_options_defaults(&parse_options);
+-  msg_format_options_init(&parse_options, configuration);
++  msg_format_options_defaults(parse_options);
++  msg_format_options_init(parse_options, configuration);
+ }
+ 
+ void
+diff --git a/libtest/msg_parse_lib.h b/libtest/msg_parse_lib.h
+index d86f178c2..5a9b4277b 100644
+--- a/libtest/msg_parse_lib.h
++++ b/libtest/msg_parse_lib.h
+@@ -30,9 +30,7 @@
+ #include "cfg.h"
+ #include "logmsg/logmsg.h"
+ 
+-extern MsgFormatOptions parse_options;
+-
+-void init_and_load_syslogformat_module(void);
++void init_parse_options_and_load_syslogformat(MsgFormatOptions *parse_options);
+ void deinit_syslogformat_module(void);
+ 
+ void assert_log_messages_equal(LogMessage *log_message_a, LogMessage *log_message_b);
+diff --git a/libtest/proto_lib.c b/libtest/proto_lib.c
+index b69195865..105e390b9 100644
+--- a/libtest/proto_lib.c
++++ b/libtest/proto_lib.c
+@@ -23,7 +23,7 @@
+  */
+ 
+ #include "proto_lib.h"
+-#include "msg_parse_lib.h"
++#include "cfg.h"
+ 
+ #include <string.h>
+ #include <criterion/criterion.h>
+@@ -164,7 +164,8 @@ assert_proto_server_fetch_ignored_eof(LogProtoServer *proto)
+ void
+ init_proto_tests(void)
+ {
+-  init_and_load_syslogformat_module();
++  configuration = cfg_new_snippet();
++  cfg_load_module(configuration, "syslogformat");
+   log_proto_server_options_defaults(&proto_server_options);
+ }
+ 
+@@ -172,5 +173,7 @@ void
+ deinit_proto_tests(void)
+ {
+   log_proto_server_options_destroy(&proto_server_options);
+-  deinit_syslogformat_module();
++
++  if (configuration)
++    cfg_free(configuration);
+ }
+diff --git a/modules/linux-kmsg-format/tests/test_linux_format_kmsg.c b/modules/linux-kmsg-format/tests/test_linux_format_kmsg.c
+index 79a4b97ad..d4d0d45a9 100644
+--- a/modules/linux-kmsg-format/tests/test_linux_format_kmsg.c
++++ b/modules/linux-kmsg-format/tests/test_linux_format_kmsg.c
+@@ -31,6 +31,8 @@
+ 
+ #include <criterion/criterion.h>
+ 
++MsgFormatOptions parse_options;
++
+ static LogMessage *
+ kmsg_parse_message(const gchar *raw_message_str)
+ {
+diff --git a/modules/python/tests/test_python_logmsg.c b/modules/python/tests/test_python_logmsg.c
+index 9a0343b07..51651ee9d 100644
+--- a/modules/python/tests/test_python_logmsg.c
++++ b/modules/python/tests/test_python_logmsg.c
+@@ -30,6 +30,8 @@
+ static PyObject *_python_main;
+ static PyObject *_python_main_dict;
+ 
++MsgFormatOptions parse_options;
++
+ static void
+ _py_init_interpreter(void)
+ {
+@@ -95,7 +97,7 @@ void setup(void)
+ {
+   app_startup();
+ 
+-  init_and_load_syslogformat_module();
++  init_parse_options_and_load_syslogformat(&parse_options);
+ 
+   _py_init_interpreter();
+   _init_python_main();
+diff --git a/modules/stardate/tests/test_stardate.c b/modules/stardate/tests/test_stardate.c
+index e48cfb6cd..7d55fc1d0 100644
+--- a/modules/stardate/tests/test_stardate.c
++++ b/modules/stardate/tests/test_stardate.c
+@@ -33,6 +33,8 @@
+ 
+ #include "msg_parse_lib.h"
+ 
++MsgFormatOptions parse_options;
++
+ void
+ stardate_assert(const gchar *msg_str, const int precision, const gchar *expected)
+ {
+@@ -58,6 +60,7 @@ void
+ setup(void)
+ {
+   app_startup();
++  init_parse_options_and_load_syslogformat(&parse_options);
+   init_template_tests();
+   cfg_load_module(configuration, "stardate");
+ }
+@@ -66,6 +69,7 @@ void
+ teardown(void)
+ {
+   deinit_template_tests();
++  deinit_syslogformat_module();
+   app_shutdown();
+ }
+ 
+diff --git a/persist-tool/add.h b/persist-tool/add.h
+index 981e0cc61..2d3524cb0 100644
+--- a/persist-tool/add.h
++++ b/persist-tool/add.h
+@@ -32,8 +32,8 @@
+ #include "cfg.h"
+ #include "persist-tool.h"
+ 
+-gchar *persist_state_dir;
+-gchar *persist_state_name;
++extern gchar *persist_state_dir;
++extern gchar *persist_state_name;
+ 
+ gint add_main(int argc, char *argv[]);
+ 
+diff --git a/persist-tool/generate.h b/persist-tool/generate.h
+index 237a8ae24..34f7dfec9 100644
+--- a/persist-tool/generate.h
++++ b/persist-tool/generate.h
+@@ -32,8 +32,8 @@
+ #include "persist-state.h"
+ #include "cfg.h"
+ 
+-gboolean force_generate;
+-gchar *generate_output_dir;
++extern gboolean force_generate;
++extern gchar *generate_output_dir;
+ 
+ gint generate_main(int argc, char *argv[]);
+ 
+diff --git a/persist-tool/persist-tool.c b/persist-tool/persist-tool.c
+index fd96c856d..4e4adc88f 100644
+--- a/persist-tool/persist-tool.c
++++ b/persist-tool/persist-tool.c
+@@ -135,11 +135,17 @@ void persist_tool_free(PersistTool *self)
+   g_free(self);
+ }
+ 
++gchar *persist_state_dir;
++gchar *persist_state_name;
++gboolean force_generate;
++gchar *generate_output_dir;
++
+ static GOptionEntry dump_options[] =
+ {
+   { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL }
+ };
+ 
++
+ static GOptionEntry add_options[] =
+ {
+   { "output-dir", 'o', 0, G_OPTION_ARG_STRING, &persist_state_dir, "The directory where persist file is located.", "<directory>" },
+diff --git a/tests/unit/test_clone_logmsg.c b/tests/unit/test_clone_logmsg.c
+index 57c0b181f..7b738b1e5 100644
+--- a/tests/unit/test_clone_logmsg.c
++++ b/tests/unit/test_clone_logmsg.c
+@@ -38,6 +38,8 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ 
++MsgFormatOptions parse_options;
++
+ void
+ assert_new_log_message_attributes(LogMessage *log_message)
+ {
+@@ -69,7 +71,7 @@ void
+ setup(void)
+ {
+   app_startup();
+-  init_and_load_syslogformat_module();
++  init_parse_options_and_load_syslogformat(&parse_options);
+ }
+ 
+ void
+diff --git a/tests/unit/test_matcher.c b/tests/unit/test_matcher.c
+index a92c8e458..d43755bea 100644
+--- a/tests/unit/test_matcher.c
++++ b/tests/unit/test_matcher.c
+@@ -31,6 +31,8 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
++MsgFormatOptions parse_options;
++
+ static LogMessage *
+ _create_log_message(const gchar *log)
+ {
+@@ -128,7 +130,7 @@ void
+ setup(void)
+ {
+   app_startup();
+-  init_and_load_syslogformat_module();
++  init_parse_options_and_load_syslogformat(&parse_options);
+ }
+ 
+ void
+diff --git a/tests/unit/test_msgparse.c b/tests/unit/test_msgparse.c
+index 6b9e1045f..0ed91f638 100644
+--- a/tests/unit/test_msgparse.c
++++ b/tests/unit/test_msgparse.c
+@@ -49,6 +49,8 @@ struct sdata_pair
+ struct sdata_pair ignore_sdata_pairs[] = { { NULL, NULL } };
+ struct sdata_pair empty_sdata_pairs[] = { { NULL, NULL } };
+ 
++MsgFormatOptions parse_options;
++
+ static unsigned long
+ _absolute_value(signed long diff)
+ {
+@@ -130,7 +132,7 @@ setup(void)
+   app_startup();
+   setenv("TZ", "MET-1METDST", TRUE);
+   tzset();
+-  init_and_load_syslogformat_module();
++  init_parse_options_and_load_syslogformat(&parse_options);
+   /* Fri Feb  8 09:37:49 CET 2019 */
+   fake_time(1549615069);
+ }

diff --git a/app-admin/syslog-ng/syslog-ng-3.25.1.ebuild b/app-admin/syslog-ng/syslog-ng-3.25.1.ebuild
index 5566d7e43e4..6a918ed857d 100644
--- a/app-admin/syslog-ng/syslog-ng-3.25.1.ebuild
+++ b/app-admin/syslog-ng/syslog-ng-3.25.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -50,6 +50,8 @@ DOCS=( AUTHORS NEWS.md CONTRIBUTING.md contrib/syslog-ng.conf.{HP-UX,RedHat,SunO
 	contrib/syslog2ng "${T}/syslog-ng.conf.gentoo.hardened"
 	"${T}/syslog-ng.logrotate.hardened" "${FILESDIR}/README.hardened" )
 
+PATCHES=( "${FILESDIR}/patches/${PN}-fno-common.patch" )
+
 pkg_setup() {
 	use python && python-single-r1_pkg_setup
 }


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/syslog-ng/files/patches/, app-admin/syslog-ng/
@ 2020-06-10  1:22 Thomas Deutschmann
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Deutschmann @ 2020-06-10  1:22 UTC (permalink / raw
  To: gentoo-commits

commit:     754c5886ebc04dc73f689c5e0071c5fc95b5d41a
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue Jun  9 17:03:58 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Jun 10 01:21:22 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=754c5886

app-admin/syslog-ng: add support for glib 2.64

Closes: https://bugs.gentoo.org/716006
Bug: https://bugs.gentoo.org/702032
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 .../patches/syslog-ng-glib-2.64-support.patch      |  63 ++++++++
 app-admin/syslog-ng/syslog-ng-3.26.1-r1.ebuild     | 171 +++++++++++++++++++++
 2 files changed, 234 insertions(+)

diff --git a/app-admin/syslog-ng/files/patches/syslog-ng-glib-2.64-support.patch b/app-admin/syslog-ng/files/patches/syslog-ng-glib-2.64-support.patch
new file mode 100644
index 00000000000..fdd98624a6e
--- /dev/null
+++ b/app-admin/syslog-ng/files/patches/syslog-ng-glib-2.64-support.patch
@@ -0,0 +1,63 @@
+diff --git a/lib/compat/glib.c b/lib/compat/glib.c
+index 8b6e52447..5b8ed8891 100644
+--- a/lib/compat/glib.c
++++ b/lib/compat/glib.c
+@@ -315,3 +315,18 @@ slng_g_hash_table_insert(GHashTable *hash_table, gpointer key, gpointer value)
+   return exists;
+ }
+ #endif
++
++
++#if !GLIB_CHECK_VERSION(2, 64, 0)
++gunichar
++g_utf8_get_char_validated_fixed(const gchar *p, gssize max_len)
++{
++  // https://github.com/GNOME/glib/commit/1963821a57584b4674c20895e8a5adccd2d9effd
++
++#undef g_utf8_get_char_validated
++  if (*p == '\0' && max_len > 0)
++    return (gunichar)-2;
++
++  return g_utf8_get_char_validated(p, max_len);
++}
++#endif
+diff --git a/lib/compat/glib.h b/lib/compat/glib.h
+index a9782ed2d..0fbdbd12d 100644
+--- a/lib/compat/glib.h
++++ b/lib/compat/glib.h
+@@ -109,4 +109,9 @@ gchar *g_base64_encode_fixed(const guchar *data, gsize len);
+ gboolean slng_g_hash_table_insert (GHashTable *hash_table, gpointer key, gpointer value);
+ #endif
+ 
++#if !GLIB_CHECK_VERSION(2, 64, 0)
++#define g_utf8_get_char_validated g_utf8_get_char_validated_fixed
++gunichar g_utf8_get_char_validated_fixed (const gchar *p, gssize max_len);
++#endif
++
+ #endif
+diff --git a/modules/cef/tests/test-format-cef-extension.c b/modules/cef/tests/test-format-cef-extension.c
+index d7f6ee3c1..f4233f96f 100644
+--- a/modules/cef/tests/test-format-cef-extension.c
++++ b/modules/cef/tests/test-format-cef-extension.c
+@@ -104,7 +104,7 @@ Test(format_cef, test_null_in_value)
+ 
+   configuration->template_options.on_error = ON_ERROR_DROP_MESSAGE | ON_ERROR_SILENT;
+   log_msg_set_value_by_name(msg, ".cef.k", "a\0b", 3);
+-  assert_template_format_msg("$(format-cef-extension --subkeys .cef.)", "k=a\\u0000b", msg);
++  assert_template_format_msg("$(format-cef-extension --subkeys .cef.)", "k=a\\x00b", msg);
+   log_msg_unref(msg);
+ }
+ 
+diff --git a/modules/json/tests/test_format_json.c b/modules/json/tests/test_format_json.c
+index 92c61e9f1..1224ddb33 100644
+--- a/modules/json/tests/test_format_json.c
++++ b/modules/json/tests/test_format_json.c
+@@ -55,7 +55,7 @@ Test(format_json, test_format_json)
+   assert_template_format("$(format-json MSG=$escaping)",
+                          "{\"MSG\":\"binary stuff follows \\\"\\\\xad árvíztűrőtükörfúrógép\"}");
+   assert_template_format("$(format-json MSG=$escaping2)", "{\"MSG\":\"\\\\xc3\"}");
+-  assert_template_format("$(format-json MSG=$null)", "{\"MSG\":\"binary\\u0000stuff\"}");
++  assert_template_format("$(format-json MSG=$null)", "{\"MSG\":\"binary\\\\x00stuff\"}");
+   assert_template_format_with_context("$(format-json MSG=$MSG)",
+                                       "{\"MSG\":\"árvíztűrőtükörfúrógép\"}{\"MSG\":\"árvíztűrőtükörfúrógép\"}");
+   assert_template_format("$(format-json --scope rfc3164)",

diff --git a/app-admin/syslog-ng/syslog-ng-3.26.1-r1.ebuild b/app-admin/syslog-ng/syslog-ng-3.26.1-r1.ebuild
new file mode 100644
index 00000000000..834c32ffc4a
--- /dev/null
+++ b/app-admin/syslog-ng/syslog-ng-3.26.1-r1.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+inherit autotools python-single-r1 systemd
+
+MY_PV_MM=$(ver_cut 1-2)
+DESCRIPTION="syslog replacement with advanced filtering features"
+HOMEPAGE="https://syslog-ng.com/open-source-log-management"
+SRC_URI="https://github.com/balabit/syslog-ng/releases/download/${P}/${P}.tar.gz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="amqp caps dbi geoip2 http ipv6 json kafka libressl mongodb pacct python redis smtp snmp test spoof-source systemd tcpd"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	>=dev-libs/glib-2.10.1:2
+	>=dev-libs/ivykis-0.42.4
+	>=dev-libs/libpcre-6.1:=
+	!dev-libs/eventlog
+	amqp? ( >=net-libs/rabbitmq-c-0.8.0:=[ssl] )
+	caps? ( sys-libs/libcap )
+	dbi? ( >=dev-db/libdbi-0.9.0 )
+	geoip2? ( dev-libs/libmaxminddb:= )
+	http? ( net-misc/curl )
+	json? ( >=dev-libs/json-c-0.9:= )
+	kafka? ( >=dev-libs/librdkafka-1.0.0:= )
+	mongodb? ( >=dev-libs/mongo-c-driver-1.2.0 )
+	python? ( ${PYTHON_DEPS} )
+	redis? ( >=dev-libs/hiredis-0.11.0:= )
+	smtp? ( net-libs/libesmtp )
+	snmp? ( net-analyzer/net-snmp )
+	spoof-source? ( net-libs/libnet:1.1= )
+	systemd? ( sys-apps/systemd:= )
+	tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+	!libressl? ( dev-libs/openssl:0= )
+	libressl? ( dev-libs/libressl:0= )"
+DEPEND="${RDEPEND}
+	test? ( dev-libs/criterion )"
+BDEPEND="
+	sys-devel/flex
+	virtual/pkgconfig"
+
+DOCS=( AUTHORS NEWS.md CONTRIBUTING.md contrib/syslog-ng.conf.{HP-UX,RedHat,SunOS,doc}
+	contrib/syslog2ng "${T}/syslog-ng.conf.gentoo.hardened"
+	"${T}/syslog-ng.logrotate.hardened" "${FILESDIR}/README.hardened" )
+
+PATCHES=( "${FILESDIR}/patches/syslog-ng-glib-2.64-support.patch" )
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	local f
+
+	use python && python_fix_shebang .
+
+	# remove bundled libs
+	rm -r lib/ivykis || die
+
+	# drop scl modules requiring json
+	if use !json; then
+		sed -i -r '/cim|elasticsearch|ewmm|graylog2|loggly|logmatic|netskope|nodejs|osquery|slack/d' scl/Makefile.am || die
+	fi
+
+	# drop scl modules requiring http
+	if use !http; then
+		sed -i -r '/slack|telegram/d' scl/Makefile.am || die
+	fi
+
+	# use gentoo default path
+	if use systemd; then
+		sed -e 's@/etc/syslog-ng.conf@/etc/syslog-ng/syslog-ng.conf@g;s@/var/run@/run@g' \
+			-i contrib/systemd/syslog-ng@default || die
+	fi
+
+	for f in syslog-ng.logrotate.hardened.in syslog-ng.logrotate.in; do
+		sed \
+			-e "s#@GENTOO_RESTART@#$(usex systemd "systemctl kill -s HUP syslog-ng@default" \
+				"/etc/init.d/syslog-ng reload")#g" \
+			"${FILESDIR}/${f}" > "${T}/${f/.in/}" || die
+	done
+
+	for f in syslog-ng.conf.gentoo.hardened.in \
+			syslog-ng.conf.gentoo.in; do
+		sed -e "s/@SYSLOGNG_VERSION@/${MY_PV_MM}/g" "${FILESDIR}/${f}" > "${T}/${f/.in/}" || die
+	done
+
+	default
+	eautoreconf
+}
+
+src_configure() {
+	local myconf=(
+		--disable-docs
+		--disable-java
+		--disable-java-modules
+		--disable-riemann
+		--enable-manpages
+		--localstatedir=/var/lib/syslog-ng
+		--sysconfdir=/etc/syslog-ng
+		--with-embedded-crypto
+		--with-ivykis=system
+		--with-module-dir=/usr/$(get_libdir)/syslog-ng
+		--with-pidfile-dir=/var/run
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+		$(use_enable amqp)
+		$(usex amqp --with-librabbitmq-client=system --without-librabbitmq-client)
+		$(use_enable caps linux-caps)
+		$(use_enable dbi sql)
+		$(use_enable geoip2)
+		$(use_enable http)
+		$(use_enable ipv6)
+		$(use_enable json)
+		$(use_enable kafka)
+		$(use_enable mongodb)
+		$(usex mongodb --with-mongoc=system "--without-mongoc --disable-legacy-mongodb-options")
+		$(use_enable pacct)
+		$(use_enable python)
+		$(use_enable redis)
+		$(use_enable smtp)
+		$(use_enable snmp snmp-dest)
+		$(use_enable spoof-source)
+		$(use_enable systemd)
+		$(use_enable tcpd tcp-wrapper)
+	)
+
+	econf "${myconf[@]}"
+}
+
+src_install() {
+	default
+
+	# Install default configuration
+	insinto /etc/default
+	doins contrib/systemd/syslog-ng@default
+
+	insinto /etc/syslog-ng
+	newins "${T}/syslog-ng.conf.gentoo" syslog-ng.conf
+
+	insinto /etc/logrotate.d
+	newins "${T}/syslog-ng.logrotate" syslog-ng
+
+	newinitd "${FILESDIR}/syslog-ng.rc" syslog-ng
+	newconfd "${FILESDIR}/syslog-ng.confd" syslog-ng
+	keepdir /etc/syslog-ng/patterndb.d /var/lib/syslog-ng
+	find "${D}" -name '*.la' -delete || die
+
+	use python && python_optimize
+}
+
+pkg_postinst() {
+	# bug #355257
+	if ! has_version app-admin/logrotate ; then
+		elog "It is highly recommended that app-admin/logrotate be emerged to"
+		elog "manage the log files.  ${PN} installs a file in /etc/logrotate.d"
+		elog "for logrotate to use."
+	fi
+
+	if use systemd; then
+		ewarn "The service file for systemd has changed to support multiple instances."
+		ewarn "To start the default instance issue:"
+		ewarn "# systemctl start syslog-ng@default"
+	fi
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/syslog-ng/files/patches/, app-admin/syslog-ng/
@ 2021-05-11 15:47 Thomas Deutschmann
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Deutschmann @ 2021-05-11 15:47 UTC (permalink / raw
  To: gentoo-commits

commit:     c489e5e43a50495061ffa8552b21d0cbdbacb078
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri May  7 13:13:14 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue May 11 15:47:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c489e5e4

app-admin/syslog-ng: drop old

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/20718
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-admin/syslog-ng/Manifest                       |   3 -
 .../files/patches/syslog-ng-fno-common.patch       | 320 ---------------------
 .../patches/syslog-ng-glib-2.64-support.patch      |  63 ----
 app-admin/syslog-ng/syslog-ng-3.26.1-r1.ebuild     | 170 -----------
 app-admin/syslog-ng/syslog-ng-3.28.1-r2.ebuild     | 171 -----------
 app-admin/syslog-ng/syslog-ng-3.29.1.ebuild        | 171 -----------
 6 files changed, 898 deletions(-)

diff --git a/app-admin/syslog-ng/Manifest b/app-admin/syslog-ng/Manifest
index 7eadb4cb04b..0e30bc1283e 100644
--- a/app-admin/syslog-ng/Manifest
+++ b/app-admin/syslog-ng/Manifest
@@ -1,5 +1,2 @@
-DIST syslog-ng-3.26.1.tar.gz 5040993 BLAKE2B 235971547c8febe61191014d971b9e5d71560f51ebc3a74fbae1c95b86653f1de8d0b99788f5b00cc75926dc67e7a80f650e9d2d12f191a4400c5b8edbbd01b7 SHA512 2cf6a8bd70addec3bef0888539f4a4686c30655698835d0c211ea929a0cae91a6f3dc9903f29fe717fd9d48b5cdc9918796f196ca84af6f5733bedff09ffab5a
-DIST syslog-ng-3.28.1.tar.gz 5149671 BLAKE2B bfc33f2a595cb4fbcc5a69b60d283673922873434b21ca8ce9685a0f54b355f162b11242704419349a561f412573c84df30a49a4dc0cc95699e98720e3e65247 SHA512 d70b435a6c9d1d0d22ecebc051dc294b6e7f841159edabf229c772c40342a28014ea1599b2277f0514236f545bac63c9879988fd85d634e9ab4fe4f079c984cb
-DIST syslog-ng-3.29.1.tar.gz 5111614 BLAKE2B 1dba62290d6354d0cda7d43783327a19f69e05963c6d2e75f42c61c30984d49d28f1c6474e68ccdd806f38022bf6799e69e12f2444da391b2bccb736ca597c72 SHA512 c8ec6527cab9e46effe23aaa1306b5bde1e13c3e62a092a62af630a744cc41e81d861e6e2ebfbaad8a9199d3b75ba4ac5fb4b4215d03f80a41f57a2e7a074a49
 DIST syslog-ng-3.30.1.tar.gz 5707042 BLAKE2B 3e6ee58b3732ae4863de43c7d22799a74074e94dbbf735368c09c11382b641a5554a4a25ad836b4ac25c8a4f64781dbfb1d9ddd6961ba3aa70c4213cfec81bfd SHA512 ac7ed4978c6db9464add30aa7aeb71a646f841593b02884c8d4ad34c0508c8d3243bcbe6ee98e81c04698895305334eadd9e624ba71e510c14d79155723efb52
 DIST syslog-ng-3.31.2.tar.gz 5727835 BLAKE2B a71190fe1580702a4d904c8a4d31a123d2aa0d01bb5a6e21f32f8502ec99f6109b45537c1a5022b0baeae89456b4b919bb8c88077d00aa9724398b7588254d89 SHA512 22a647c37f87fb1a45c8c69c2b0a022d1886cde5b0d585c3384b606d967c3f320a18e34810655174e82c797c0dc23c481732ecefd5be16da8fba4983b2ed0385

diff --git a/app-admin/syslog-ng/files/patches/syslog-ng-fno-common.patch b/app-admin/syslog-ng/files/patches/syslog-ng-fno-common.patch
deleted file mode 100644
index abec9213cd1..00000000000
--- a/app-admin/syslog-ng/files/patches/syslog-ng-fno-common.patch
+++ /dev/null
@@ -1,320 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e9b4183fc..1f8f16c13 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -331,8 +331,7 @@ endif()
- add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -j $$(nproc) --output-on-failure)
- 
- set(IMPORTANT_WARNINGS
--  -Wshadow
--  -fcommon)
-+  -Wshadow)
- 
- set(ACCEPTABLE_WARNINGS
-   -Wno-stack-protector
-diff --git a/Makefile.am b/Makefile.am
-index 8b24eeaed..86c090638 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -54,8 +54,7 @@ AM_CPPFLAGS		= -I$(top_srcdir)/lib -I$(top_srcdir)/modules -I$(top_builddir)/lib
- 
- # Important warnings
- AM_CFLAGS = \
--	-Wshadow \
--	-fcommon
-+	-Wshadow
- 
- # Acceptable warnings
- AM_CFLAGS += \
-diff --git a/lib/logmsg/tests/test_log_message.c b/lib/logmsg/tests/test_log_message.c
-index 245568ce5..e51d78b94 100644
---- a/lib/logmsg/tests/test_log_message.c
-+++ b/lib/logmsg/tests/test_log_message.c
-@@ -32,6 +32,8 @@
- #include <stdlib.h>
- #include <glib/gprintf.h>
- 
-+MsgFormatOptions parse_options;
-+
- typedef struct _LogMessageTestParams
- {
-   LogMessage *message;
-@@ -151,7 +153,7 @@ void
- setup(void)
- {
-   app_startup();
--  init_and_load_syslogformat_module();
-+  init_parse_options_and_load_syslogformat(&parse_options);
- }
- 
- void
-diff --git a/libtest/cr_template.c b/libtest/cr_template.c
-index 35e47aa3f..4f0913368 100644
---- a/libtest/cr_template.c
-+++ b/libtest/cr_template.c
-@@ -34,10 +34,12 @@
- 
- #include "msg_parse_lib.h"
- 
-+static MsgFormatOptions parse_options;
-+
- void
- init_template_tests(void)
- {
--  init_and_load_syslogformat_module();
-+  init_parse_options_and_load_syslogformat(&parse_options);
- }
- 
- void
-diff --git a/libtest/msg_parse_lib.c b/libtest/msg_parse_lib.c
-index ae0d1654b..b3c7cb652 100644
---- a/libtest/msg_parse_lib.c
-+++ b/libtest/msg_parse_lib.c
-@@ -27,15 +27,13 @@
- 
- #include <criterion/criterion.h>
- 
--MsgFormatOptions parse_options;
--
- void
--init_and_load_syslogformat_module(void)
-+init_parse_options_and_load_syslogformat(MsgFormatOptions *parse_options)
- {
-   configuration = cfg_new_snippet();
-   cfg_load_module(configuration, "syslogformat");
--  msg_format_options_defaults(&parse_options);
--  msg_format_options_init(&parse_options, configuration);
-+  msg_format_options_defaults(parse_options);
-+  msg_format_options_init(parse_options, configuration);
- }
- 
- void
-diff --git a/libtest/msg_parse_lib.h b/libtest/msg_parse_lib.h
-index d86f178c2..5a9b4277b 100644
---- a/libtest/msg_parse_lib.h
-+++ b/libtest/msg_parse_lib.h
-@@ -30,9 +30,7 @@
- #include "cfg.h"
- #include "logmsg/logmsg.h"
- 
--extern MsgFormatOptions parse_options;
--
--void init_and_load_syslogformat_module(void);
-+void init_parse_options_and_load_syslogformat(MsgFormatOptions *parse_options);
- void deinit_syslogformat_module(void);
- 
- void assert_log_messages_equal(LogMessage *log_message_a, LogMessage *log_message_b);
-diff --git a/libtest/proto_lib.c b/libtest/proto_lib.c
-index b69195865..105e390b9 100644
---- a/libtest/proto_lib.c
-+++ b/libtest/proto_lib.c
-@@ -23,7 +23,7 @@
-  */
- 
- #include "proto_lib.h"
--#include "msg_parse_lib.h"
-+#include "cfg.h"
- 
- #include <string.h>
- #include <criterion/criterion.h>
-@@ -164,7 +164,8 @@ assert_proto_server_fetch_ignored_eof(LogProtoServer *proto)
- void
- init_proto_tests(void)
- {
--  init_and_load_syslogformat_module();
-+  configuration = cfg_new_snippet();
-+  cfg_load_module(configuration, "syslogformat");
-   log_proto_server_options_defaults(&proto_server_options);
- }
- 
-@@ -172,5 +173,7 @@ void
- deinit_proto_tests(void)
- {
-   log_proto_server_options_destroy(&proto_server_options);
--  deinit_syslogformat_module();
-+
-+  if (configuration)
-+    cfg_free(configuration);
- }
-diff --git a/modules/linux-kmsg-format/tests/test_linux_format_kmsg.c b/modules/linux-kmsg-format/tests/test_linux_format_kmsg.c
-index 79a4b97ad..d4d0d45a9 100644
---- a/modules/linux-kmsg-format/tests/test_linux_format_kmsg.c
-+++ b/modules/linux-kmsg-format/tests/test_linux_format_kmsg.c
-@@ -31,6 +31,8 @@
- 
- #include <criterion/criterion.h>
- 
-+MsgFormatOptions parse_options;
-+
- static LogMessage *
- kmsg_parse_message(const gchar *raw_message_str)
- {
-diff --git a/modules/python/tests/test_python_logmsg.c b/modules/python/tests/test_python_logmsg.c
-index 9a0343b07..51651ee9d 100644
---- a/modules/python/tests/test_python_logmsg.c
-+++ b/modules/python/tests/test_python_logmsg.c
-@@ -30,6 +30,8 @@
- static PyObject *_python_main;
- static PyObject *_python_main_dict;
- 
-+MsgFormatOptions parse_options;
-+
- static void
- _py_init_interpreter(void)
- {
-@@ -95,7 +97,7 @@ void setup(void)
- {
-   app_startup();
- 
--  init_and_load_syslogformat_module();
-+  init_parse_options_and_load_syslogformat(&parse_options);
- 
-   _py_init_interpreter();
-   _init_python_main();
-diff --git a/modules/stardate/tests/test_stardate.c b/modules/stardate/tests/test_stardate.c
-index e48cfb6cd..7d55fc1d0 100644
---- a/modules/stardate/tests/test_stardate.c
-+++ b/modules/stardate/tests/test_stardate.c
-@@ -33,6 +33,8 @@
- 
- #include "msg_parse_lib.h"
- 
-+MsgFormatOptions parse_options;
-+
- void
- stardate_assert(const gchar *msg_str, const int precision, const gchar *expected)
- {
-@@ -58,6 +60,7 @@ void
- setup(void)
- {
-   app_startup();
-+  init_parse_options_and_load_syslogformat(&parse_options);
-   init_template_tests();
-   cfg_load_module(configuration, "stardate");
- }
-@@ -66,6 +69,7 @@ void
- teardown(void)
- {
-   deinit_template_tests();
-+  deinit_syslogformat_module();
-   app_shutdown();
- }
- 
-diff --git a/persist-tool/add.h b/persist-tool/add.h
-index 981e0cc61..2d3524cb0 100644
---- a/persist-tool/add.h
-+++ b/persist-tool/add.h
-@@ -32,8 +32,8 @@
- #include "cfg.h"
- #include "persist-tool.h"
- 
--gchar *persist_state_dir;
--gchar *persist_state_name;
-+extern gchar *persist_state_dir;
-+extern gchar *persist_state_name;
- 
- gint add_main(int argc, char *argv[]);
- 
-diff --git a/persist-tool/generate.h b/persist-tool/generate.h
-index 237a8ae24..34f7dfec9 100644
---- a/persist-tool/generate.h
-+++ b/persist-tool/generate.h
-@@ -32,8 +32,8 @@
- #include "persist-state.h"
- #include "cfg.h"
- 
--gboolean force_generate;
--gchar *generate_output_dir;
-+extern gboolean force_generate;
-+extern gchar *generate_output_dir;
- 
- gint generate_main(int argc, char *argv[]);
- 
-diff --git a/persist-tool/persist-tool.c b/persist-tool/persist-tool.c
-index fd96c856d..4e4adc88f 100644
---- a/persist-tool/persist-tool.c
-+++ b/persist-tool/persist-tool.c
-@@ -135,11 +135,17 @@ void persist_tool_free(PersistTool *self)
-   g_free(self);
- }
- 
-+gchar *persist_state_dir;
-+gchar *persist_state_name;
-+gboolean force_generate;
-+gchar *generate_output_dir;
-+
- static GOptionEntry dump_options[] =
- {
-   { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL }
- };
- 
-+
- static GOptionEntry add_options[] =
- {
-   { "output-dir", 'o', 0, G_OPTION_ARG_STRING, &persist_state_dir, "The directory where persist file is located.", "<directory>" },
-diff --git a/tests/unit/test_clone_logmsg.c b/tests/unit/test_clone_logmsg.c
-index 57c0b181f..7b738b1e5 100644
---- a/tests/unit/test_clone_logmsg.c
-+++ b/tests/unit/test_clone_logmsg.c
-@@ -38,6 +38,8 @@
- #include <stdlib.h>
- #include <stdio.h>
- 
-+MsgFormatOptions parse_options;
-+
- void
- assert_new_log_message_attributes(LogMessage *log_message)
- {
-@@ -69,7 +71,7 @@ void
- setup(void)
- {
-   app_startup();
--  init_and_load_syslogformat_module();
-+  init_parse_options_and_load_syslogformat(&parse_options);
- }
- 
- void
-diff --git a/tests/unit/test_matcher.c b/tests/unit/test_matcher.c
-index a92c8e458..d43755bea 100644
---- a/tests/unit/test_matcher.c
-+++ b/tests/unit/test_matcher.c
-@@ -31,6 +31,8 @@
- #include <stdlib.h>
- #include <string.h>
- 
-+MsgFormatOptions parse_options;
-+
- static LogMessage *
- _create_log_message(const gchar *log)
- {
-@@ -128,7 +130,7 @@ void
- setup(void)
- {
-   app_startup();
--  init_and_load_syslogformat_module();
-+  init_parse_options_and_load_syslogformat(&parse_options);
- }
- 
- void
-diff --git a/tests/unit/test_msgparse.c b/tests/unit/test_msgparse.c
-index 6b9e1045f..0ed91f638 100644
---- a/tests/unit/test_msgparse.c
-+++ b/tests/unit/test_msgparse.c
-@@ -49,6 +49,8 @@ struct sdata_pair
- struct sdata_pair ignore_sdata_pairs[] = { { NULL, NULL } };
- struct sdata_pair empty_sdata_pairs[] = { { NULL, NULL } };
- 
-+MsgFormatOptions parse_options;
-+
- static unsigned long
- _absolute_value(signed long diff)
- {
-@@ -130,7 +132,7 @@ setup(void)
-   app_startup();
-   setenv("TZ", "MET-1METDST", TRUE);
-   tzset();
--  init_and_load_syslogformat_module();
-+  init_parse_options_and_load_syslogformat(&parse_options);
-   /* Fri Feb  8 09:37:49 CET 2019 */
-   fake_time(1549615069);
- }

diff --git a/app-admin/syslog-ng/files/patches/syslog-ng-glib-2.64-support.patch b/app-admin/syslog-ng/files/patches/syslog-ng-glib-2.64-support.patch
deleted file mode 100644
index fdd98624a6e..00000000000
--- a/app-admin/syslog-ng/files/patches/syslog-ng-glib-2.64-support.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-diff --git a/lib/compat/glib.c b/lib/compat/glib.c
-index 8b6e52447..5b8ed8891 100644
---- a/lib/compat/glib.c
-+++ b/lib/compat/glib.c
-@@ -315,3 +315,18 @@ slng_g_hash_table_insert(GHashTable *hash_table, gpointer key, gpointer value)
-   return exists;
- }
- #endif
-+
-+
-+#if !GLIB_CHECK_VERSION(2, 64, 0)
-+gunichar
-+g_utf8_get_char_validated_fixed(const gchar *p, gssize max_len)
-+{
-+  // https://github.com/GNOME/glib/commit/1963821a57584b4674c20895e8a5adccd2d9effd
-+
-+#undef g_utf8_get_char_validated
-+  if (*p == '\0' && max_len > 0)
-+    return (gunichar)-2;
-+
-+  return g_utf8_get_char_validated(p, max_len);
-+}
-+#endif
-diff --git a/lib/compat/glib.h b/lib/compat/glib.h
-index a9782ed2d..0fbdbd12d 100644
---- a/lib/compat/glib.h
-+++ b/lib/compat/glib.h
-@@ -109,4 +109,9 @@ gchar *g_base64_encode_fixed(const guchar *data, gsize len);
- gboolean slng_g_hash_table_insert (GHashTable *hash_table, gpointer key, gpointer value);
- #endif
- 
-+#if !GLIB_CHECK_VERSION(2, 64, 0)
-+#define g_utf8_get_char_validated g_utf8_get_char_validated_fixed
-+gunichar g_utf8_get_char_validated_fixed (const gchar *p, gssize max_len);
-+#endif
-+
- #endif
-diff --git a/modules/cef/tests/test-format-cef-extension.c b/modules/cef/tests/test-format-cef-extension.c
-index d7f6ee3c1..f4233f96f 100644
---- a/modules/cef/tests/test-format-cef-extension.c
-+++ b/modules/cef/tests/test-format-cef-extension.c
-@@ -104,7 +104,7 @@ Test(format_cef, test_null_in_value)
- 
-   configuration->template_options.on_error = ON_ERROR_DROP_MESSAGE | ON_ERROR_SILENT;
-   log_msg_set_value_by_name(msg, ".cef.k", "a\0b", 3);
--  assert_template_format_msg("$(format-cef-extension --subkeys .cef.)", "k=a\\u0000b", msg);
-+  assert_template_format_msg("$(format-cef-extension --subkeys .cef.)", "k=a\\x00b", msg);
-   log_msg_unref(msg);
- }
- 
-diff --git a/modules/json/tests/test_format_json.c b/modules/json/tests/test_format_json.c
-index 92c61e9f1..1224ddb33 100644
---- a/modules/json/tests/test_format_json.c
-+++ b/modules/json/tests/test_format_json.c
-@@ -55,7 +55,7 @@ Test(format_json, test_format_json)
-   assert_template_format("$(format-json MSG=$escaping)",
-                          "{\"MSG\":\"binary stuff follows \\\"\\\\xad árvíztűrőtükörfúrógép\"}");
-   assert_template_format("$(format-json MSG=$escaping2)", "{\"MSG\":\"\\\\xc3\"}");
--  assert_template_format("$(format-json MSG=$null)", "{\"MSG\":\"binary\\u0000stuff\"}");
-+  assert_template_format("$(format-json MSG=$null)", "{\"MSG\":\"binary\\\\x00stuff\"}");
-   assert_template_format_with_context("$(format-json MSG=$MSG)",
-                                       "{\"MSG\":\"árvíztűrőtükörfúrógép\"}{\"MSG\":\"árvíztűrőtükörfúrógép\"}");
-   assert_template_format("$(format-json --scope rfc3164)",

diff --git a/app-admin/syslog-ng/syslog-ng-3.26.1-r1.ebuild b/app-admin/syslog-ng/syslog-ng-3.26.1-r1.ebuild
deleted file mode 100644
index c720da24694..00000000000
--- a/app-admin/syslog-ng/syslog-ng-3.26.1-r1.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8} )
-inherit autotools python-single-r1 systemd
-
-MY_PV_MM=$(ver_cut 1-2)
-DESCRIPTION="syslog replacement with advanced filtering features"
-HOMEPAGE="https://syslog-ng.com/open-source-log-management"
-SRC_URI="https://github.com/balabit/syslog-ng/releases/download/${P}/${P}.tar.gz"
-
-LICENSE="GPL-2+ LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="amqp caps dbi geoip2 http ipv6 json kafka mongodb pacct python redis smtp snmp test spoof-source systemd tcpd"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>=dev-libs/glib-2.10.1:2
-	>=dev-libs/ivykis-0.42.4
-	>=dev-libs/libpcre-6.1:=
-	!dev-libs/eventlog
-	amqp? ( >=net-libs/rabbitmq-c-0.8.0:=[ssl] )
-	caps? ( sys-libs/libcap )
-	dbi? ( >=dev-db/libdbi-0.9.0 )
-	geoip2? ( dev-libs/libmaxminddb:= )
-	http? ( net-misc/curl )
-	json? ( >=dev-libs/json-c-0.9:= )
-	kafka? ( >=dev-libs/librdkafka-1.0.0:= )
-	mongodb? ( >=dev-libs/mongo-c-driver-1.2.0 )
-	python? ( ${PYTHON_DEPS} )
-	redis? ( >=dev-libs/hiredis-0.11.0:= )
-	smtp? ( net-libs/libesmtp )
-	snmp? ( net-analyzer/net-snmp )
-	spoof-source? ( net-libs/libnet:1.1= )
-	systemd? ( sys-apps/systemd:= )
-	tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
-	dev-libs/openssl:0="
-DEPEND="${RDEPEND}
-	test? ( dev-libs/criterion )"
-BDEPEND="
-	sys-devel/flex
-	virtual/pkgconfig"
-
-DOCS=( AUTHORS NEWS.md CONTRIBUTING.md contrib/syslog-ng.conf.{HP-UX,RedHat,SunOS,doc}
-	contrib/syslog2ng "${T}/syslog-ng.conf.gentoo.hardened"
-	"${T}/syslog-ng.logrotate.hardened" "${FILESDIR}/README.hardened" )
-
-PATCHES=( "${FILESDIR}/patches/syslog-ng-glib-2.64-support.patch" )
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	local f
-
-	use python && python_fix_shebang .
-
-	# remove bundled libs
-	rm -r lib/ivykis || die
-
-	# drop scl modules requiring json
-	if use !json; then
-		sed -i -r '/cim|elasticsearch|ewmm|graylog2|loggly|logmatic|netskope|nodejs|osquery|slack/d' scl/Makefile.am || die
-	fi
-
-	# drop scl modules requiring http
-	if use !http; then
-		sed -i -r '/slack|telegram/d' scl/Makefile.am || die
-	fi
-
-	# use gentoo default path
-	if use systemd; then
-		sed -e 's@/etc/syslog-ng.conf@/etc/syslog-ng/syslog-ng.conf@g;s@/var/run@/run@g' \
-			-i contrib/systemd/syslog-ng@default || die
-	fi
-
-	for f in syslog-ng.logrotate.hardened.in syslog-ng.logrotate.in; do
-		sed \
-			-e "s#@GENTOO_RESTART@#$(usex systemd "systemctl kill -s HUP syslog-ng@default" \
-				"/etc/init.d/syslog-ng reload")#g" \
-			"${FILESDIR}/${f}" > "${T}/${f/.in/}" || die
-	done
-
-	for f in syslog-ng.conf.gentoo.hardened.in \
-			syslog-ng.conf.gentoo.in; do
-		sed -e "s/@SYSLOGNG_VERSION@/${MY_PV_MM}/g" "${FILESDIR}/${f}" > "${T}/${f/.in/}" || die
-	done
-
-	default
-	eautoreconf
-}
-
-src_configure() {
-	local myconf=(
-		--disable-docs
-		--disable-java
-		--disable-java-modules
-		--disable-riemann
-		--enable-manpages
-		--localstatedir=/var/lib/syslog-ng
-		--sysconfdir=/etc/syslog-ng
-		--with-embedded-crypto
-		--with-ivykis=system
-		--with-module-dir=/usr/$(get_libdir)/syslog-ng
-		--with-pidfile-dir=/var/run
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-		$(use_enable amqp)
-		$(usex amqp --with-librabbitmq-client=system --without-librabbitmq-client)
-		$(use_enable caps linux-caps)
-		$(use_enable dbi sql)
-		$(use_enable geoip2)
-		$(use_enable http)
-		$(use_enable ipv6)
-		$(use_enable json)
-		$(use_enable kafka)
-		$(use_enable mongodb)
-		$(usex mongodb --with-mongoc=system "--without-mongoc --disable-legacy-mongodb-options")
-		$(use_enable pacct)
-		$(use_enable python)
-		$(use_enable redis)
-		$(use_enable smtp)
-		$(use_enable snmp snmp-dest)
-		$(use_enable spoof-source)
-		$(use_enable systemd)
-		$(use_enable tcpd tcp-wrapper)
-	)
-
-	econf "${myconf[@]}"
-}
-
-src_install() {
-	default
-
-	# Install default configuration
-	insinto /etc/default
-	doins contrib/systemd/syslog-ng@default
-
-	insinto /etc/syslog-ng
-	newins "${T}/syslog-ng.conf.gentoo" syslog-ng.conf
-
-	insinto /etc/logrotate.d
-	newins "${T}/syslog-ng.logrotate" syslog-ng
-
-	newinitd "${FILESDIR}/syslog-ng.rc" syslog-ng
-	newconfd "${FILESDIR}/syslog-ng.confd" syslog-ng
-	keepdir /etc/syslog-ng/patterndb.d /var/lib/syslog-ng
-	find "${D}" -name '*.la' -delete || die
-
-	use python && python_optimize
-}
-
-pkg_postinst() {
-	# bug #355257
-	if ! has_version app-admin/logrotate ; then
-		elog "It is highly recommended that app-admin/logrotate be emerged to"
-		elog "manage the log files.  ${PN} installs a file in /etc/logrotate.d"
-		elog "for logrotate to use."
-	fi
-
-	if use systemd; then
-		ewarn "The service file for systemd has changed to support multiple instances."
-		ewarn "To start the default instance issue:"
-		ewarn "# systemctl start syslog-ng@default"
-	fi
-}

diff --git a/app-admin/syslog-ng/syslog-ng-3.28.1-r2.ebuild b/app-admin/syslog-ng/syslog-ng-3.28.1-r2.ebuild
deleted file mode 100644
index 80e2a64e5b5..00000000000
--- a/app-admin/syslog-ng/syslog-ng-3.28.1-r2.ebuild
+++ /dev/null
@@ -1,171 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-inherit autotools python-single-r1 systemd
-
-MY_PV_MM=$(ver_cut 1-2)
-DESCRIPTION="syslog replacement with advanced filtering features"
-HOMEPAGE="https://syslog-ng.com/open-source-log-management"
-SRC_URI="https://github.com/balabit/syslog-ng/releases/download/${P}/${P}.tar.gz"
-
-LICENSE="GPL-2+ LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="amqp caps dbi geoip2 http ipv6 json kafka mongodb pacct python redis smtp snmp test spoof-source systemd tcpd"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>=dev-libs/glib-2.10.1:2
-	>=dev-libs/ivykis-0.42.4
-	>=dev-libs/libpcre-6.1:=
-	!dev-libs/eventlog
-	amqp? ( >=net-libs/rabbitmq-c-0.8.0:=[ssl] )
-	caps? ( sys-libs/libcap )
-	dbi? ( >=dev-db/libdbi-0.9.0 )
-	geoip2? ( dev-libs/libmaxminddb:= )
-	http? ( net-misc/curl )
-	json? ( >=dev-libs/json-c-0.9:= )
-	kafka? ( >=dev-libs/librdkafka-1.0.0:= )
-	mongodb? ( >=dev-libs/mongo-c-driver-1.2.0 )
-	python? ( ${PYTHON_DEPS} )
-	redis? ( >=dev-libs/hiredis-0.11.0:= )
-	smtp? ( net-libs/libesmtp )
-	snmp? ( net-analyzer/net-snmp:0= )
-	spoof-source? ( net-libs/libnet:1.1= )
-	systemd? ( sys-apps/systemd:= )
-	tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
-	dev-libs/openssl:0="
-DEPEND="${RDEPEND}
-	test? ( dev-libs/criterion )"
-BDEPEND="
-	sys-devel/flex
-	virtual/pkgconfig"
-
-DOCS=( AUTHORS NEWS.md CONTRIBUTING.md contrib/syslog-ng.conf.{HP-UX,RedHat,SunOS,doc}
-	contrib/syslog2ng "${T}/syslog-ng.conf.gentoo.hardened"
-	"${T}/syslog-ng.logrotate.hardened" "${FILESDIR}/README.hardened" )
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.28.1-net-snmp.patch
-)
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	local f
-
-	use python && python_fix_shebang .
-
-	# remove bundled libs
-	rm -r lib/ivykis || die
-
-	# drop scl modules requiring json
-	if use !json; then
-		sed -i -r '/cim|elasticsearch|ewmm|graylog2|loggly|logmatic|netskope|nodejs|osquery|slack/d' scl/Makefile.am || die
-	fi
-
-	# drop scl modules requiring http
-	if use !http; then
-		sed -i -r '/slack|telegram/d' scl/Makefile.am || die
-	fi
-
-	# use gentoo default path
-	if use systemd; then
-		sed -e 's@/etc/syslog-ng.conf@/etc/syslog-ng/syslog-ng.conf@g;s@/var/run@/run@g' \
-			-i contrib/systemd/syslog-ng@default || die
-	fi
-
-	for f in syslog-ng.logrotate.hardened.in syslog-ng.logrotate.in; do
-		sed \
-			-e "s#@GENTOO_RESTART@#$(usex systemd "systemctl kill -s HUP syslog-ng@default" \
-				"/etc/init.d/syslog-ng reload")#g" \
-			"${FILESDIR}/${f}" > "${T}/${f/.in/}" || die
-	done
-
-	for f in syslog-ng.conf.gentoo.hardened.in \
-			syslog-ng.conf.gentoo.in; do
-		sed -e "s/@SYSLOGNG_VERSION@/${MY_PV_MM}/g" "${FILESDIR}/${f}" > "${T}/${f/.in/}" || die
-	done
-
-	default
-	eautoreconf
-}
-
-src_configure() {
-	local myconf=(
-		--disable-docs
-		--disable-java
-		--disable-java-modules
-		--disable-riemann
-		--enable-manpages
-		--localstatedir=/var/lib/syslog-ng
-		--sysconfdir=/etc/syslog-ng
-		--with-embedded-crypto
-		--with-ivykis=system
-		--with-module-dir=/usr/$(get_libdir)/syslog-ng
-		--with-pidfile-dir=/var/run
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-		$(use_enable amqp)
-		$(usex amqp --with-librabbitmq-client=system --without-librabbitmq-client)
-		$(use_enable caps linux-caps)
-		$(use_enable dbi sql)
-		$(use_enable geoip2)
-		$(use_enable http)
-		$(use_enable ipv6)
-		$(use_enable json)
-		$(use_enable kafka)
-		$(use_enable mongodb)
-		$(usex mongodb --with-mongoc=system "--without-mongoc --disable-legacy-mongodb-options")
-		$(use_enable pacct)
-		$(use_enable python)
-		$(use_enable redis)
-		$(use_enable smtp)
-		$(use_enable snmp afsnmp)
-		$(use_enable spoof-source)
-		$(use_enable systemd)
-		$(use_enable tcpd tcp-wrapper)
-	)
-
-	econf "${myconf[@]}"
-}
-
-src_install() {
-	default
-
-	# Install default configuration
-	insinto /etc/default
-	doins contrib/systemd/syslog-ng@default
-
-	insinto /etc/syslog-ng
-	newins "${T}/syslog-ng.conf.gentoo" syslog-ng.conf
-
-	insinto /etc/logrotate.d
-	newins "${T}/syslog-ng.logrotate" syslog-ng
-
-	newinitd "${FILESDIR}/syslog-ng.rc" syslog-ng
-	newconfd "${FILESDIR}/syslog-ng.confd" syslog-ng
-	keepdir /etc/syslog-ng/patterndb.d /var/lib/syslog-ng
-	find "${D}" -name '*.la' -delete || die
-
-	use python && python_optimize
-}
-
-pkg_postinst() {
-	# bug #355257
-	if ! has_version app-admin/logrotate ; then
-		elog "It is highly recommended that app-admin/logrotate be emerged to"
-		elog "manage the log files.  ${PN} installs a file in /etc/logrotate.d"
-		elog "for logrotate to use."
-	fi
-
-	if use systemd; then
-		ewarn "The service file for systemd has changed to support multiple instances."
-		ewarn "To start the default instance issue:"
-		ewarn "# systemctl start syslog-ng@default"
-	fi
-}

diff --git a/app-admin/syslog-ng/syslog-ng-3.29.1.ebuild b/app-admin/syslog-ng/syslog-ng-3.29.1.ebuild
deleted file mode 100644
index 80e2a64e5b5..00000000000
--- a/app-admin/syslog-ng/syslog-ng-3.29.1.ebuild
+++ /dev/null
@@ -1,171 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-inherit autotools python-single-r1 systemd
-
-MY_PV_MM=$(ver_cut 1-2)
-DESCRIPTION="syslog replacement with advanced filtering features"
-HOMEPAGE="https://syslog-ng.com/open-source-log-management"
-SRC_URI="https://github.com/balabit/syslog-ng/releases/download/${P}/${P}.tar.gz"
-
-LICENSE="GPL-2+ LGPL-2.1+"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="amqp caps dbi geoip2 http ipv6 json kafka mongodb pacct python redis smtp snmp test spoof-source systemd tcpd"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>=dev-libs/glib-2.10.1:2
-	>=dev-libs/ivykis-0.42.4
-	>=dev-libs/libpcre-6.1:=
-	!dev-libs/eventlog
-	amqp? ( >=net-libs/rabbitmq-c-0.8.0:=[ssl] )
-	caps? ( sys-libs/libcap )
-	dbi? ( >=dev-db/libdbi-0.9.0 )
-	geoip2? ( dev-libs/libmaxminddb:= )
-	http? ( net-misc/curl )
-	json? ( >=dev-libs/json-c-0.9:= )
-	kafka? ( >=dev-libs/librdkafka-1.0.0:= )
-	mongodb? ( >=dev-libs/mongo-c-driver-1.2.0 )
-	python? ( ${PYTHON_DEPS} )
-	redis? ( >=dev-libs/hiredis-0.11.0:= )
-	smtp? ( net-libs/libesmtp )
-	snmp? ( net-analyzer/net-snmp:0= )
-	spoof-source? ( net-libs/libnet:1.1= )
-	systemd? ( sys-apps/systemd:= )
-	tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
-	dev-libs/openssl:0="
-DEPEND="${RDEPEND}
-	test? ( dev-libs/criterion )"
-BDEPEND="
-	sys-devel/flex
-	virtual/pkgconfig"
-
-DOCS=( AUTHORS NEWS.md CONTRIBUTING.md contrib/syslog-ng.conf.{HP-UX,RedHat,SunOS,doc}
-	contrib/syslog2ng "${T}/syslog-ng.conf.gentoo.hardened"
-	"${T}/syslog-ng.logrotate.hardened" "${FILESDIR}/README.hardened" )
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.28.1-net-snmp.patch
-)
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	local f
-
-	use python && python_fix_shebang .
-
-	# remove bundled libs
-	rm -r lib/ivykis || die
-
-	# drop scl modules requiring json
-	if use !json; then
-		sed -i -r '/cim|elasticsearch|ewmm|graylog2|loggly|logmatic|netskope|nodejs|osquery|slack/d' scl/Makefile.am || die
-	fi
-
-	# drop scl modules requiring http
-	if use !http; then
-		sed -i -r '/slack|telegram/d' scl/Makefile.am || die
-	fi
-
-	# use gentoo default path
-	if use systemd; then
-		sed -e 's@/etc/syslog-ng.conf@/etc/syslog-ng/syslog-ng.conf@g;s@/var/run@/run@g' \
-			-i contrib/systemd/syslog-ng@default || die
-	fi
-
-	for f in syslog-ng.logrotate.hardened.in syslog-ng.logrotate.in; do
-		sed \
-			-e "s#@GENTOO_RESTART@#$(usex systemd "systemctl kill -s HUP syslog-ng@default" \
-				"/etc/init.d/syslog-ng reload")#g" \
-			"${FILESDIR}/${f}" > "${T}/${f/.in/}" || die
-	done
-
-	for f in syslog-ng.conf.gentoo.hardened.in \
-			syslog-ng.conf.gentoo.in; do
-		sed -e "s/@SYSLOGNG_VERSION@/${MY_PV_MM}/g" "${FILESDIR}/${f}" > "${T}/${f/.in/}" || die
-	done
-
-	default
-	eautoreconf
-}
-
-src_configure() {
-	local myconf=(
-		--disable-docs
-		--disable-java
-		--disable-java-modules
-		--disable-riemann
-		--enable-manpages
-		--localstatedir=/var/lib/syslog-ng
-		--sysconfdir=/etc/syslog-ng
-		--with-embedded-crypto
-		--with-ivykis=system
-		--with-module-dir=/usr/$(get_libdir)/syslog-ng
-		--with-pidfile-dir=/var/run
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-		$(use_enable amqp)
-		$(usex amqp --with-librabbitmq-client=system --without-librabbitmq-client)
-		$(use_enable caps linux-caps)
-		$(use_enable dbi sql)
-		$(use_enable geoip2)
-		$(use_enable http)
-		$(use_enable ipv6)
-		$(use_enable json)
-		$(use_enable kafka)
-		$(use_enable mongodb)
-		$(usex mongodb --with-mongoc=system "--without-mongoc --disable-legacy-mongodb-options")
-		$(use_enable pacct)
-		$(use_enable python)
-		$(use_enable redis)
-		$(use_enable smtp)
-		$(use_enable snmp afsnmp)
-		$(use_enable spoof-source)
-		$(use_enable systemd)
-		$(use_enable tcpd tcp-wrapper)
-	)
-
-	econf "${myconf[@]}"
-}
-
-src_install() {
-	default
-
-	# Install default configuration
-	insinto /etc/default
-	doins contrib/systemd/syslog-ng@default
-
-	insinto /etc/syslog-ng
-	newins "${T}/syslog-ng.conf.gentoo" syslog-ng.conf
-
-	insinto /etc/logrotate.d
-	newins "${T}/syslog-ng.logrotate" syslog-ng
-
-	newinitd "${FILESDIR}/syslog-ng.rc" syslog-ng
-	newconfd "${FILESDIR}/syslog-ng.confd" syslog-ng
-	keepdir /etc/syslog-ng/patterndb.d /var/lib/syslog-ng
-	find "${D}" -name '*.la' -delete || die
-
-	use python && python_optimize
-}
-
-pkg_postinst() {
-	# bug #355257
-	if ! has_version app-admin/logrotate ; then
-		elog "It is highly recommended that app-admin/logrotate be emerged to"
-		elog "manage the log files.  ${PN} installs a file in /etc/logrotate.d"
-		elog "for logrotate to use."
-	fi
-
-	if use systemd; then
-		ewarn "The service file for systemd has changed to support multiple instances."
-		ewarn "To start the default instance issue:"
-		ewarn "# systemctl start syslog-ng@default"
-	fi
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-11 20:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-10  1:22 [gentoo-commits] repo/gentoo:master commit in: app-admin/syslog-ng/files/patches/, app-admin/syslog-ng/ Thomas Deutschmann
  -- strict thread matches above, loose matches on Subject: below --
2021-05-11 15:47 Thomas Deutschmann
2020-02-20 13:27 Joonas Niilola
2019-10-22  4:49 Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox