summaryrefslogtreecommitdiff
path: root/app-admin/syslog-ng
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /app-admin/syslog-ng
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'app-admin/syslog-ng')
-rw-r--r--app-admin/syslog-ng/Manifest2
-rw-r--r--app-admin/syslog-ng/files/syslog-ng-3.30.1-esmtp-pkgconfig.patch26
-rw-r--r--app-admin/syslog-ng/syslog-ng-3.30.1-r1.ebuild173
3 files changed, 201 insertions, 0 deletions
diff --git a/app-admin/syslog-ng/Manifest b/app-admin/syslog-ng/Manifest
index aa1958080d57..040fbbec91dd 100644
--- a/app-admin/syslog-ng/Manifest
+++ b/app-admin/syslog-ng/Manifest
@@ -2,6 +2,7 @@ AUX README.hardened 358 BLAKE2B a816cf461b4c3553e979c309ced21537841e24ad805b67f4
AUX patches/syslog-ng-fno-common.patch 8521 BLAKE2B 6dc0654aefed1c480507269766f18eb9c1c88e8d9a5fe3c5394c108ea750aafe33858bc3c99957e3989b121a39345b6feffc80c588551145720573d5991fcae9 SHA512 c011f0973c8e3c3220bf9e7dc68176b6b4ec36d7e3030680a42862d31d951c499c81b5bd438622c9f7d41af61c2e24750d38b1c869e3e240e7c22ff8cd5d1f2f
AUX patches/syslog-ng-glib-2.64-support.patch 2751 BLAKE2B bf80fb569292f4a467b3fcc39776943e847d1900bda7e80d7f279259a8f82b9b4c9f85d06bca5629c69a0ca0aedfe955017718d96094e48603a387f73af82476 SHA512 1eead04652764352f9ef0064ecec4b408b4fe8f9cf94c2e9f1a985b6383de0e1098df9bf2dcd352aeb17dd6dae2cda8313a1bfc0a70b2cf56bf8f323bbe1f169
AUX syslog-ng-3.28.1-net-snmp.patch 292 BLAKE2B 7833709af12ab6531596bdb3b2c327fd2df3a5da3e3b00a597926f5bc5a1053dd2f37dbf0e89784946e169b9d3408c26da84b5355a309b76e424fc48f07ae4b6 SHA512 3b4b62b6e10fcca501891ce878202f1171c8f6bbd69098215015d1a9a1c571e11aa2d8d83d35145f0b5da9c6231952758b60a7116160d64d995d5b2b870b1904
+AUX syslog-ng-3.30.1-esmtp-pkgconfig.patch 777 BLAKE2B b9994f5381e2bc53174b5758aeb00def4cc2c26e6e6148223f6cf98337ab707b1025e410c9bde90907b55fc1dc4db343bbf6f6e6df7d151b7108fef801995be5 SHA512 dbc0333c26be61b4d57db79d37529b896f90cf03af46f5df93bf96bfe5966a9781317dac4509906469a5b5d90273623379afbc5480168a99b6b5cd6dc27fdbc9
AUX syslog-ng.conf.gentoo.hardened.in 4509 BLAKE2B 39f130c008df8d5e31c121246997f8f31d2d8e2a78f1a881f4ca07ade0b3a5386c6e8c3fd8518e2ae471751564263886b8e3b78e8651efe0eeccd1d06c23c2a5 SHA512 0670952e6f5d0405e90bb5cb1ea168832bb2293095250c01a9baaf9e4fcdf8578ecf5b60809bd9e5089096a4d97fa966fcc47324fbe70cfd14266a10eb0001c6
AUX syslog-ng.conf.gentoo.in 1198 BLAKE2B a95b1fb9f46655502a41b0381c7388c9b54cfe9b8c3fd68dc68bd473175688e8ae72145a0ef718ef65220ecced7ecab00b39755cf41d4e21a6d375059cf6f309 SHA512 2830d1c5071a50c4aea6288b35c2880988111f29a11a641ee89f001a4ca4319943f87fdb1fd7079988888efa55401e2ed62f7a507c452de137f2e97a445d60e1
AUX syslog-ng.confd 1557 BLAKE2B 42b5b1593c877b7395a8470bdf19571705f0c586a1a3530903659828565018dff71d62e56bfba28afa6c5e9fcb55aee2a41bcfff53c9ad006ee319124adbd66a SHA512 c945d27560afa310ac7f15e0cde3a564d5296892c747827d68df1b49c728998b056b596f93ac2564a5cb349f88db6585de58ec64cdaa13b92f20f5aac213ef44
@@ -15,5 +16,6 @@ DIST syslog-ng-3.30.1.tar.gz 5707042 BLAKE2B 3e6ee58b3732ae4863de43c7d22799a7407
EBUILD syslog-ng-3.26.1-r1.ebuild 4910 BLAKE2B 8b6ca27ed3d4f98d0ee40ad88b7143a50452103dab763067f996e76ef4631fce0e07153fa2251d5874231950cecfd46034f6875731c2fc39c5adf95a01a08787 SHA512 8c3187c2a7b1ed8d6fdf226b887d92674c3712ff19f60f6e0ed3466ec78043656de1df224d5ff2421fe34834cc33c5589b2188d7d817a2f153f41ab333f9993a
EBUILD syslog-ng-3.28.1-r2.ebuild 4905 BLAKE2B a51992106f832abbfdcf876ba3472693e7d13594194b0fa165df8f593f32f6422d3fd8271808d41980350ffc5a50765eaaeaf1109aff4543e4fc9a426c6055f9 SHA512 3407603658ae6dd0869377921b383dfbff9a5e2b1d01cb5cd571254eb095c69f04acb01112ac3d40c137523fb0a2e4a45ae69e0aa4e29d828a2a107574a6bae3
EBUILD syslog-ng-3.29.1.ebuild 4905 BLAKE2B a51992106f832abbfdcf876ba3472693e7d13594194b0fa165df8f593f32f6422d3fd8271808d41980350ffc5a50765eaaeaf1109aff4543e4fc9a426c6055f9 SHA512 3407603658ae6dd0869377921b383dfbff9a5e2b1d01cb5cd571254eb095c69f04acb01112ac3d40c137523fb0a2e4a45ae69e0aa4e29d828a2a107574a6bae3
+EBUILD syslog-ng-3.30.1-r1.ebuild 4975 BLAKE2B 8632cc3df06ca4de9adf177dc7361a1eb12e5ec2474d47e6b9e9fb2db73c80a45035a96821a161a00a5f8cbf1bae16607e6ce6f8fe602656b23c3386b7df1504 SHA512 8f56b1b0c79320a0c2eb935393bddb69e6ca47966ccbd86dee1a7785a450e42333e836f5bea65bbf444f8ecb405adf14e8c6f9e347cd24d96a0832924a6bc115
EBUILD syslog-ng-3.30.1.ebuild 4897 BLAKE2B 21378d34ab6a7eb355c0ee8c132bf0af75fcb9a36035d55abd9d969c2fd8f270fe3956b8d3ce624f72f9852867260814af9b672c01c30b12150bdc37ef7c9b98 SHA512 7a2de2ef440ffe1c95fee72ad291e1968fa4c8ccf458b0c8394571bd0e98bf2f492c7cbe534c9243c424f6df7de5bd59b604811224ac12c6b2beb9969efad9fa
MISC metadata.xml 1282 BLAKE2B ddf01d9efaf2b8ad6aacbbb5a27299f14a5bd2656139960b61fb8855286c23a1a736ad4d543d16bfe50d277d20cce51249f572d3bbb428060a07c23ab78d90fd SHA512 7eeeb124214ae491905e42d726d2d167168425a66eb59802c9bb364f3a14337d0732afbb6cde7254a49e259573ca6eb5ced4dd737718d6a0bab450f7f3498964
diff --git a/app-admin/syslog-ng/files/syslog-ng-3.30.1-esmtp-pkgconfig.patch b/app-admin/syslog-ng/files/syslog-ng-3.30.1-esmtp-pkgconfig.patch
new file mode 100644
index 000000000000..ef4f72faa319
--- /dev/null
+++ b/app-admin/syslog-ng/files/syslog-ng-3.30.1-esmtp-pkgconfig.patch
@@ -0,0 +1,26 @@
+https://bugs.gentoo.org/782643
+--- a/configure.ac
++++ b/configure.ac
+@@ -1270,20 +1270,9 @@ if test "x$enable_smtp" != "xno" && test "x$with_libesmtp" != "xno"; then
+ CPPFLAGS="$CPPFLAGS_SAVE"
+ LDFLAGS="$LDFLAGS_SAVE"
+ else
+- AC_MSG_CHECKING(for libESMTP)
+- if libesmtp-config --version >/dev/null 2>&1; then
+- AC_MSG_RESULT(yes)
+- LIBESMTP_CFLAGS="`libesmtp-config --cflags`"
+- LIBESMTP_LIBS="`libesmtp-config --libs`"
+- else
+- AC_MSG_RESULT(no)
+- libesmtp=no
+- fi
+- fi
+- if test "x$enable_smtp" = "xyes" && test "x$libesmtp" = "xno"; then
+- AC_MSG_ERROR(libESMTP not found)
++ PKG_CHECK_MODULES(libesmtp, libesmtp-1.0)
+ fi
+- enable_smtp=$libesmtp
++ enable_smtp="yes"
+ fi
+
+ dnl ***************************************************************************
diff --git a/app-admin/syslog-ng/syslog-ng-3.30.1-r1.ebuild b/app-admin/syslog-ng/syslog-ng-3.30.1-r1.ebuild
new file mode 100644
index 000000000000..361c5df0c238
--- /dev/null
+++ b/app-admin/syslog-ng/syslog-ng-3.30.1-r1.ebuild
@@ -0,0 +1,173 @@
+# 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 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-1.0.6_p20200824:= )
+ snmp? ( net-analyzer/net-snmp:0= )
+ 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}"/${PN}-3.28.1-net-snmp.patch
+ "${FILESDIR}"/${PN}-3.30.1-esmtp-pkgconfig.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
+}