summaryrefslogtreecommitdiff
path: root/app-admin/syslog-ng
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-02-15 08:00:22 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-02-15 08:00:22 +0000
commit8ba94db1fe69019bb2d3b4f50fe9d1ccf3d94b3a (patch)
tree7487d237046db5ece113639b353f68cee3cad04e /app-admin/syslog-ng
parent7b744169f910185aacfd39dbd71d58b58a2e1d2f (diff)
gentoo auto-resync : 15:02:2023 - 08:00:21
Diffstat (limited to 'app-admin/syslog-ng')
-rw-r--r--app-admin/syslog-ng/Manifest2
-rw-r--r--app-admin/syslog-ng/syslog-ng-4.0.1.ebuild178
2 files changed, 180 insertions, 0 deletions
diff --git a/app-admin/syslog-ng/Manifest b/app-admin/syslog-ng/Manifest
index 879c903054bf..c0fde096387e 100644
--- a/app-admin/syslog-ng/Manifest
+++ b/app-admin/syslog-ng/Manifest
@@ -7,5 +7,7 @@ AUX syslog-ng.logrotate.hardened.in 1662 BLAKE2B 488ab7e26b081267bdeecd91013ce51
AUX syslog-ng.logrotate.in 237 BLAKE2B dd2851749f3f56b2099442610fcd85cbfd50a52a8c1ae60726b312ea845f3f0b20e436a4e11a377b9faecb1fa3f0febc008ae262e56018775b82d923ba5f2340 SHA512 4e59f8537579caa249ebe12c53946266633972ac6805b7ccd684a5749deeb897783a4e74570ceec15311edb3531aa4278bba468058227ab4c664a697cc604376
AUX syslog-ng.rc 1891 BLAKE2B ff17e5b3a999813e869d3142ae6800b80a1569e7344f8b65a007d8f4978e1bbd4ce1f1e8f9daefb60c586aa58756d7d98ca59a869ae8e3f4addac732b6086ba5 SHA512 9e21637b684a48093d00ad9b5d4dbb79178ea8cc280cb03dbce235193e916bf3bd10b091a901cf13842f1c080b707a36efe8833bbde9d2721245598a3fe038df
DIST syslog-ng-3.38.1.tar.gz 5405048 BLAKE2B 7819cbe0caab7f580ca9f71181c84d64da838a238a6f8b8b79c8816e37e5691e72e1284de57d5066d3c681d8751950e5a32d65a1b1af4e064dd82f2c59899fe3 SHA512 3a3ef5c72d8c211ed2914791380061dcd48ea1ea95f636a1a8649dc5dee731a11e9ae000a37cbeeba624f4053b623b697e6c7f945a81153106c2365f4f09a847
+DIST syslog-ng-4.0.1.tar.gz 5452824 BLAKE2B a5c0328f3c88a38dbc07bb7af2a74c0037a6679525a29fca58620a8ef6b05ec13f3942d26767aded0049376ed30ce6a525686501914648a509997c5de2b48eb4 SHA512 5f83ee3cc4935218feb19f3f5065a68099e3ee291d806ad8810499ded9f9ef3b326b4b22841cd736354ed6a2ebc1ce8ae73f6abe981aa6f64c42da9ee3b1e22f
EBUILD syslog-ng-3.38.1.ebuild 4904 BLAKE2B 756015bb90e4d93608cd20d94406ae186bd9ac730a07c2dbd7e5034fc7b91edf5e4cb442fddfd0b6a0fc1f6e295f34bc85f28c2eee5d2c1417bdf0a8da3df76d SHA512 4ac6c11e784eb28abe38f7ddead8e02bfd5f3eca20d46d451fe9f968c3e1a4b17f5d0ff904e064b8d5be1fc8425e5ee8040a021b19ff9dd30908529fde7fe061
+EBUILD syslog-ng-4.0.1.ebuild 5119 BLAKE2B 8123082100e326f454250315de69b3aea3e412805e6eb492e37cdb063fbf4bcc9a27e70af774b5f746059dc58fb80a5a4bb33b682a7282ab7a3d51996425aa62 SHA512 8fafb355beaddd99ff637ee3415d499eeb82cb793fa4b522299e767b163d60595471d683092519b29e529d163518050618945e22c7e051740b636a73596f9971
MISC metadata.xml 1285 BLAKE2B 91f0ecae07c9131f516a2b9dd6b71d021c84cde055ec58b21734b36f540f65b02452ac20dffaac4a3edc8942ad9a1a1afc3c9837ea4775d40d0d8b3d41083316 SHA512 80924020dccf9bd8d1a83d995af57644eaab761204e2b75a3ef997a2b7582506ba25f476b6203446d116af841629520adfa1cfe443c6e1547755e72956161eb2
diff --git a/app-admin/syslog-ng/syslog-ng-4.0.1.ebuild b/app-admin/syslog-ng/syslog-ng-4.0.1.ebuild
new file mode 100644
index 000000000000..ca7e9ae7a1a9
--- /dev/null
+++ b/app-admin/syslog-ng/syslog-ng-4.0.1.ebuild
@@ -0,0 +1,178 @@
+# 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} )
+ 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 \
+ 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-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
+}