diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-02-28 11:40:46 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-02-28 11:40:46 +0000 |
commit | 73c06e01ebc820f47f0140310b8a096e9d20877b (patch) | |
tree | e42588135c33dc1c950c2ac5de5dd32897af342b /app-admin/syslog-ng | |
parent | 88f366f99d8e731ae1a13d9eca9a5284484d2c6f (diff) |
gentoo auto-resync : 28:02:2024 - 11:40:46
Diffstat (limited to 'app-admin/syslog-ng')
-rw-r--r-- | app-admin/syslog-ng/Manifest | 1 | ||||
-rw-r--r-- | app-admin/syslog-ng/syslog-ng-4.6.0-r1.ebuild | 194 |
2 files changed, 195 insertions, 0 deletions
diff --git a/app-admin/syslog-ng/Manifest b/app-admin/syslog-ng/Manifest index f9c4d0066a0a..a066efd90906 100644 --- a/app-admin/syslog-ng/Manifest +++ b/app-admin/syslog-ng/Manifest @@ -22,5 +22,6 @@ EBUILD syslog-ng-4.3.1-r1.ebuild 5211 BLAKE2B 9ff2cf23a2f077ec5c8a2bd0f80774d48d EBUILD syslog-ng-4.4.0-r1.ebuild 5211 BLAKE2B f37dd0abe8704d1213fe26cce9ea46dd1f9923331072c7d1e36b2486e062f05f75dc09878e53ce31d34709d6c59a0a974bedd5c7935b42e8972820abbc263535 SHA512 a823aff62742f00317789c96ed9d5e5bfa0c5dbceadd8d2f7547653e93a67de2279a22740ab64005aaa3f7417bdb0af218f3baf7cf835997db11a4878d81f21a EBUILD syslog-ng-4.4.0-r2.ebuild 5313 BLAKE2B efdf8d5fdd7c4bb87b00515c7982ac21d7050a0b468e71032f0073580eca196ce84cd7c5a9aefac179ad4ca37cbb88b8bbe6e12ca11bd738a86c28b9add81d32 SHA512 81bc309312d5b9a5264cba2333af6e287f7d47b01f83fe637e1f76274f727214d38e99b1c1e4ef9b08c22bf7ead85ab883475c89003a58c6da568603c0f73835 EBUILD syslog-ng-4.4.0-r3.ebuild 5375 BLAKE2B 8fa5ec4d5b2352cb537c7feb99bc1213d4b2dfbca36f2cd7249787d0c88981f59cbd8332a76625cc8980f51ec01f96e275557b9ecaf3e770135671505f3ad5f4 SHA512 400d5233da4e038916cfd34f8545be1272bb4950a5f68624f611d39be6e024f73eb59994e72c73ce80734ed98296b6b064dd458316758577757b37d17cfd98f8 +EBUILD syslog-ng-4.6.0-r1.ebuild 5375 BLAKE2B 8fa5ec4d5b2352cb537c7feb99bc1213d4b2dfbca36f2cd7249787d0c88981f59cbd8332a76625cc8980f51ec01f96e275557b9ecaf3e770135671505f3ad5f4 SHA512 400d5233da4e038916cfd34f8545be1272bb4950a5f68624f611d39be6e024f73eb59994e72c73ce80734ed98296b6b064dd458316758577757b37d17cfd98f8 EBUILD syslog-ng-4.6.0.ebuild 5309 BLAKE2B 5b95f1c671385b3288d4be4881625c681414ee00c8a5021f325a07dc034fa68326bc6ae3afdf610440db38e8397decd23da597eaf17121db471f1456739c582e SHA512 16b6bac43fdcd3689b77d652ea15cd51959dee0eab9005d31a8070b3485a30498db18ced9db2fc491325a184dd3e9283ff1c51a9052ea3c7615359e5e952670d MISC metadata.xml 1473 BLAKE2B 89d2c90327ef56334e99d081debd682538e25db7f26ec1d369912b67e8bb7b878412f167a1e1020a49baa5165fa2887103b0a3d021fe9c4502d2bd7b56ee681f SHA512 392d0702ddea668bd927cb89b06deaa532b2605d2f1caec46c5c00430dfa8bf3056f8050f7442501aad89c58813a9d1cfa6b46f904323711fc1800d9275702a5 diff --git a/app-admin/syslog-ng/syslog-ng-4.6.0-r1.ebuild b/app-admin/syslog-ng/syslog-ng-4.6.0-r1.ebuild new file mode 100644 index 000000000000..eebbe85eca29 --- /dev/null +++ b/app-admin/syslog-ng/syslog-ng-4.6.0-r1.ebuild @@ -0,0 +1,194 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit autotools python-single-r1 systemd + +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 grpc http json kafka mongodb mqtt 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/libpcre2-10.0 + dev-libs/openssl:0= + !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:= ) + grpc? ( + dev-libs/protobuf:= + net-libs/grpc:= + ) + 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 ) + mqtt? ( net-libs/paho-mqtt-c:1.3 ) + 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 )" +DEPEND="${RDEPEND} + test? ( dev-libs/criterion )" +BDEPEND=" + >=sys-devel/bison-3.7.6 + sys-devel/flex + virtual/pkgconfig + grpc? ( dev-libs/protobuf:= )" + +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@/$(ver_cut 1-2)/g" "${FILESDIR}/${f}" > "${T}/${f/.in-r1/}" || die + done + + default + eautoreconf +} + +src_configure() { + # Needs bison/flex. + unset YACC LEX + + local myconf=( + --disable-docs + --disable-java + --disable-java-modules + --disable-riemann + --enable-ipv6 + --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) + $(use_with amqp librabbitmq-client system) + $(use_enable caps linux-caps) + $(use_enable dbi sql) + $(use_enable geoip2) + $(use_enable grpc) + $(use_enable grpc cpp) + $(use_enable http) + $(use_enable json) + $(use_enable kafka) + $(use_enable mongodb) + $(use_enable mqtt) + $(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 +} |