summaryrefslogtreecommitdiff
path: root/app-admin/syslog-ng
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-21 12:02:15 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-21 12:02:15 +0100
commitd1f1f3bc630772e7197391e85311655e2b6e7fa2 (patch)
tree0566ad543bdf6d9d9e03d8ab618ccc744913985a /app-admin/syslog-ng
parent0cdd46ad5d0cd7ede78815175764fdf76649d46e (diff)
gentoo auto-resync : 21:04:2023 - 12:02:15
Diffstat (limited to 'app-admin/syslog-ng')
-rw-r--r--app-admin/syslog-ng/Manifest3
-rw-r--r--app-admin/syslog-ng/files/syslog-ng.conf.gentoo.hardened.in-r1115
-rw-r--r--app-admin/syslog-ng/files/syslog-ng.conf.gentoo.in-r136
-rw-r--r--app-admin/syslog-ng/syslog-ng-4.1.1-r2.ebuild183
4 files changed, 337 insertions, 0 deletions
diff --git a/app-admin/syslog-ng/Manifest b/app-admin/syslog-ng/Manifest
index b22f7342a5f1..1d7d95d3832d 100644
--- a/app-admin/syslog-ng/Manifest
+++ b/app-admin/syslog-ng/Manifest
@@ -1,7 +1,9 @@
AUX README.hardened 358 BLAKE2B a816cf461b4c3553e979c309ced21537841e24ad805b67f43d5bf06fb77b86959a75c7680df87e7ded7fd72073ad469a06bdec1e739784c82776d04a91bd3add SHA512 75b4af1543436506e28d9b0e2625985ab864d1452604b1514ec030df822c36d90ae062508381610cc1f750082a52545f8678102dc475abff15f0f3c9a838128e
AUX syslog-ng-3.28.1-net-snmp.patch 292 BLAKE2B 7833709af12ab6531596bdb3b2c327fd2df3a5da3e3b00a597926f5bc5a1053dd2f37dbf0e89784946e169b9d3408c26da84b5355a309b76e424fc48f07ae4b6 SHA512 3b4b62b6e10fcca501891ce878202f1171c8f6bbd69098215015d1a9a1c571e11aa2d8d83d35145f0b5da9c6231952758b60a7116160d64d995d5b2b870b1904
AUX syslog-ng.conf.gentoo.hardened.in 4509 BLAKE2B 39f130c008df8d5e31c121246997f8f31d2d8e2a78f1a881f4ca07ade0b3a5386c6e8c3fd8518e2ae471751564263886b8e3b78e8651efe0eeccd1d06c23c2a5 SHA512 0670952e6f5d0405e90bb5cb1ea168832bb2293095250c01a9baaf9e4fcdf8578ecf5b60809bd9e5089096a4d97fa966fcc47324fbe70cfd14266a10eb0001c6
+AUX syslog-ng.conf.gentoo.hardened.in-r1 4510 BLAKE2B 9ac299ecb7bbdf24b50251bbd3b73da88f1a5b3bf99a8e360fb1fbef253d88543c011c84bdb1c290b558d8fc0249af6b70835a0fb74c0f6182b2cfbc60bf8b3b SHA512 5bb635b21343f8f3219bcf6c6dc2fed5e1d7235379304546959b657bc889af311938da88bc0f907de62067f96345a7e919f855caa6dac873d6922ea442b92405
AUX syslog-ng.conf.gentoo.in 1198 BLAKE2B a95b1fb9f46655502a41b0381c7388c9b54cfe9b8c3fd68dc68bd473175688e8ae72145a0ef718ef65220ecced7ecab00b39755cf41d4e21a6d375059cf6f309 SHA512 2830d1c5071a50c4aea6288b35c2880988111f29a11a641ee89f001a4ca4319943f87fdb1fd7079988888efa55401e2ed62f7a507c452de137f2e97a445d60e1
+AUX syslog-ng.conf.gentoo.in-r1 1199 BLAKE2B e767c0b05621d3a8ace13822b58f96acde0d81ac88d5d4364dc9fd236b91a27a24e384e432b490c7d7fb57e4996d7b23004afeb10fe289928377e952af986146 SHA512 7e63795b35693fbea2e9bade51f311f69c81c43f5c031ff2e7538e6277b1e7a3260c2c0bef87ea1717177593f4ff755feacd69e67c4d76b1323d6f9d2c3b09b9
AUX syslog-ng.confd 1557 BLAKE2B 42b5b1593c877b7395a8470bdf19571705f0c586a1a3530903659828565018dff71d62e56bfba28afa6c5e9fcb55aee2a41bcfff53c9ad006ee319124adbd66a SHA512 c945d27560afa310ac7f15e0cde3a564d5296892c747827d68df1b49c728998b056b596f93ac2564a5cb349f88db6585de58ec64cdaa13b92f20f5aac213ef44
AUX syslog-ng.logrotate.hardened.in 1662 BLAKE2B 488ab7e26b081267bdeecd91013ce5118e79dca89567789be9b85f8712a0f8f11005c2459eb334ab5bdfab08c780063e7025a242330367f710717a79352e0d96 SHA512 1c19837570da6c77d49252303abe0ac91280c500bd82c1eab45c4c1534b83d758782dd576b12006bdd738508892d4b898ba29c0969aba536b333ab9b99e6bd83
AUX syslog-ng.logrotate.in 237 BLAKE2B dd2851749f3f56b2099442610fcd85cbfd50a52a8c1ae60726b312ea845f3f0b20e436a4e11a377b9faecb1fa3f0febc008ae262e56018775b82d923ba5f2340 SHA512 4e59f8537579caa249ebe12c53946266633972ac6805b7ccd684a5749deeb897783a4e74570ceec15311edb3531aa4278bba468058227ab4c664a697cc604376
@@ -12,4 +14,5 @@ DIST syslog-ng-4.1.1.tar.gz 5556174 BLAKE2B 3e1a9c394b8a88cc7b39a026950760cbc779
EBUILD syslog-ng-3.38.1.ebuild 4904 BLAKE2B 756015bb90e4d93608cd20d94406ae186bd9ac730a07c2dbd7e5034fc7b91edf5e4cb442fddfd0b6a0fc1f6e295f34bc85f28c2eee5d2c1417bdf0a8da3df76d SHA512 4ac6c11e784eb28abe38f7ddead8e02bfd5f3eca20d46d451fe9f968c3e1a4b17f5d0ff904e064b8d5be1fc8425e5ee8040a021b19ff9dd30908529fde7fe061
EBUILD syslog-ng-4.0.1.ebuild 5116 BLAKE2B 00723fb39423ced4cc1c70942948e7dd6b85b21af80e8796df65ec3879c2ef3d99b788ea7be16b8477ce5104632d55a00b2fd0b1a4cd69eccc40743dd0f96e01 SHA512 d81cb32892dc82bb0affaede3141ee0aa9bcc0d029986f7c897f05af596747f8b8faca2b7e2cad026b31a35fe01f54f1aff6c219184ce3dff7bf992f7a5dfd15
EBUILD syslog-ng-4.1.1-r1.ebuild 5196 BLAKE2B 40f06ee661e9b74b3dc6497e79c2e74f8daa16744bb68bd50dfc9dd1aeb9691920e3f1a944049489ee442e89fad0b89c56b052ad2234ec3c85b41a3dbc670c0b SHA512 408226a572889d7f3361cc7265123861e959ae1dcb8bb81ddc7240894a557c241d1ec90ac6694f809552365aa55e86585e6b621e95e36768700f5a66f80fa2d2
+EBUILD syslog-ng-4.1.1-r2.ebuild 5205 BLAKE2B d746d3f854cbfc13e03d5328a652e16513c9c5d29a7e2322e952f417be799e290f9f72748e418ee17398975355aee59f3f15805023d3a37471c5c6d5080cad11 SHA512 fc7f76046edabad88d1712f6ea9e734294afb18dafacb2ae61aeab465334ff939416b485a2449d5fe40d94031c19501e28d2718b3157f2ee1cd0d5df55e76a80
MISC metadata.xml 1285 BLAKE2B 91f0ecae07c9131f516a2b9dd6b71d021c84cde055ec58b21734b36f540f65b02452ac20dffaac4a3edc8942ad9a1a1afc3c9837ea4775d40d0d8b3d41083316 SHA512 80924020dccf9bd8d1a83d995af57644eaab761204e2b75a3ef997a2b7582506ba25f476b6203446d116af841629520adfa1cfe443c6e1547755e72956161eb2
diff --git a/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.hardened.in-r1 b/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.hardened.in-r1
new file mode 100644
index 000000000000..fe3b6ee99a99
--- /dev/null
+++ b/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.hardened.in-r1
@@ -0,0 +1,115 @@
+@version: @SYSLOGNG_VERSION@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# https://bugs.gentoo.org/426814
+@include "scl.conf"
+
+#
+# Syslog-ng configuration file, compatible with default hardened installations.
+#
+
+options {
+ threaded(yes);
+ chain_hostnames(no);
+ stats(freq(43200));
+};
+
+source src {
+ system();
+ internal();
+};
+
+source kernsrc {
+ file("/proc/kmsg");
+};
+
+#source net { udp(); };
+#log { source(net); destination(net_logs); };
+#destination net_logs { file("/var/log/HOSTS/$HOST/$YEAR$MONTH$DAY.log"); };
+
+destination authlog { file("/var/log/auth.log"); };
+destination _syslog { file("/var/log/syslog"); };
+destination cron { file("/var/log/cron.log"); };
+destination daemon { file("/var/log/daemon.log"); };
+destination kern { file("/var/log/kern.log"); };
+destination lpr { file("/var/log/lpr.log"); };
+destination user { file("/var/log/user.log"); };
+destination uucp { file("/var/log/uucp.log"); };
+#destination ppp { file("/var/log/ppp.log"); };
+destination mail { file("/var/log/mail.log"); };
+
+destination avc { file("/var/log/avc.log"); };
+destination audit { file("/var/log/audit.log"); };
+destination pax { file("/var/log/pax.log"); };
+destination grsec { file("/var/log/grsec.log"); };
+
+destination mailinfo { file("/var/log/mail.info"); };
+destination mailwarn { file("/var/log/mail.warn"); };
+destination mailerr { file("/var/log/mail.err"); };
+
+destination newscrit { file("/var/log/news/news.crit"); };
+destination newserr { file("/var/log/news/news.err"); };
+destination newsnotice { file("/var/log/news/news.notice"); };
+
+destination debug { file("/var/log/debug"); };
+destination messages { file("/var/log/messages"); };
+destination console { usertty("root"); };
+destination console_all { file("/dev/tty12"); };
+#destination loghost { udp("loghost" port(999)); };
+
+destination xconsole { pipe("/dev/xconsole"); };
+
+filter f_auth { facility(auth); };
+filter f_authpriv { facility(auth, authpriv); };
+filter f_syslog { not facility(authpriv, mail); };
+filter f_cron { facility(cron); };
+filter f_daemon { facility(daemon); };
+filter f_kern { facility(kern); };
+filter f_lpr { facility(lpr); };
+filter f_mail { facility(mail); };
+filter f_user { facility(user); };
+filter f_uucp { facility(uucp); };
+#filter f_ppp { facility(ppp); };
+filter f_news { facility(news); };
+filter f_debug { not facility(auth, authpriv, news, mail); };
+filter f_messages { level(info..warn)
+ and not facility(auth, authpriv, mail, news); };
+filter f_emergency { level(emerg); };
+
+filter f_info { level(info); };
+
+filter f_notice { level(notice); };
+filter f_warn { level(warn); };
+filter f_crit { level(crit); };
+filter f_err { level(err); };
+
+filter f_avc { message(".*avc: .*"); };
+filter f_audit { message("^(\\[.*\..*\] |)audit.*") and not message(".*avc: .*"); };
+filter f_pax { message("^(\\[.*\..*\] |)PAX:.*"); };
+filter f_grsec { message("^(\\[.*\..*\] |)grsec:.*"); };
+
+log { source(src); filter(f_authpriv); destination(authlog); };
+log { source(src); filter(f_syslog); destination(_syslog); };
+log { source(src); filter(f_cron); destination(cron); };
+log { source(src); filter(f_daemon); destination(daemon); };
+log { source(kernsrc); filter(f_kern); destination(kern); destination(console_all); };
+log { source(src); filter(f_lpr); destination(lpr); };
+log { source(src); filter(f_mail); destination(mail); };
+log { source(src); filter(f_user); destination(user); };
+log { source(src); filter(f_uucp); destination(uucp); };
+log { source(kernsrc); filter(f_pax); destination(pax); };
+log { source(kernsrc); filter(f_grsec); destination(grsec); };
+log { source(kernsrc); filter(f_audit); destination(audit); };
+log { source(kernsrc); filter(f_avc); destination(avc); };
+log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); };
+log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); };
+log { source(src); filter(f_mail); filter(f_err); destination(mailerr); };
+log { source(src); filter(f_news); filter(f_crit); destination(newscrit); };
+log { source(src); filter(f_news); filter(f_err); destination(newserr); };
+log { source(src); filter(f_news); filter(f_notice); destination(newsnotice); };
+log { source(src); filter(f_debug); destination(debug); };
+log { source(src); filter(f_messages); destination(messages); };
+log { source(src); filter(f_emergency); destination(console); };
+#log { source(src); filter(f_ppp); destination(ppp); };
+log { source(src); destination(console_all); };
diff --git a/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.in-r1 b/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.in-r1
new file mode 100644
index 000000000000..9940491ec78f
--- /dev/null
+++ b/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.in-r1
@@ -0,0 +1,36 @@
+@version: @SYSLOGNG_VERSION@
+#
+# Syslog-ng default configuration file for Gentoo Linux
+
+# https://bugs.gentoo.org/426814
+@include "scl.conf"
+
+options {
+ threaded(yes);
+ chain_hostnames(no);
+
+ # The default action of syslog-ng is to log a STATS line
+ # to the file every 10 minutes. That's pretty ugly after a while.
+ # Change it to every 12 hours so you get a nice daily update of
+ # how many messages syslog-ng missed (0).
+ stats(freq(43200));
+ # The default action of syslog-ng is to log a MARK line
+ # to the file every 20 minutes. That's seems high for most
+ # people so turn it down to once an hour. Set it to zero
+ # if you don't want the functionality at all.
+ mark_freq(3600);
+};
+
+source src { system(); internal(); };
+
+destination messages { file("/var/log/messages"); };
+
+# By default messages are logged to tty12...
+destination console_all { file("/dev/tty12"); };
+# ...if you intend to use /dev/console for programs like xconsole
+# you can comment out the destination line above that references /dev/tty12
+# and uncomment the line below.
+#destination console_all { file("/dev/console"); };
+
+log { source(src); destination(messages); };
+log { source(src); destination(console_all); };
diff --git a/app-admin/syslog-ng/syslog-ng-4.1.1-r2.ebuild b/app-admin/syslog-ng/syslog-ng-4.1.1-r2.ebuild
new file mode 100644
index 000000000000..b27f4ec1f395
--- /dev/null
+++ b/app-admin/syslog-ng/syslog-ng-4.1.1-r2.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit autotools python-single-r1 systemd
+
+MY_PV_MM=$(ver_cut 1-2)
+DESCRIPTION="syslog replacement with advanced filtering features"
+HOMEPAGE="https://www.syslog-ng.com/products/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 ~loong ~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} )
+ test? ( python )"
+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}
+ $(python_gen_cond_dep '
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ')
+ )
+ 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/bison-3.7.6
+ 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
+
+ # disable python-modules test as it requires additional python modules not
+ # packaged in Gentoo
+ sed -i '/MAKE/s/.*/exit 0/g' modules/python-modules/test_pymodules.sh || die
+
+ 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-r1 \
+ syslog-ng.conf.gentoo.in-r1; do
+ sed -e "s/@SYSLOGNG_VERSION@/${MY_PV_MM}/g" "${FILESDIR}/${f}" > "${T}/${f/.in-r1/}" || 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-python-packages=none
+ --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
+}