diff --git a/app-admin/fluentd/Manifest b/app-admin/fluentd/Manifest new file mode 100644 index 0000000..0f5910a --- /dev/null +++ b/app-admin/fluentd/Manifest @@ -0,0 +1 @@ +DIST fluentd-1.16.10.gem 885248 BLAKE2B 470e87898868f90afc8c20ed627b5b91d07b12184ca60afbf86e271c63325ebe50a28f0c3d0201ddac25af31b3121e04e848275632d1fc28e73852f36554093e SHA512 36924e3618dc7218e804cc71a6b24cf9ee953fe6ac2f8c4e1d3728fae1057de8f32dca987cd0d5ef3232960cedf33f121b07eb24354da4ef2c0f840f914c5f93 diff --git a/app-admin/fluentd/files/fluentd.confd b/app-admin/fluentd/files/fluentd.confd new file mode 100644 index 0000000..c693e62 --- /dev/null +++ b/app-admin/fluentd/files/fluentd.confd @@ -0,0 +1,2 @@ +# If you need to pass any extra options to fluentd, set them here. +#fluentd_opts="" diff --git a/app-admin/fluentd/files/fluentd.initd b/app-admin/fluentd/files/fluentd.initd new file mode 100644 index 0000000..76c7c63 --- /dev/null +++ b/app-admin/fluentd/files/fluentd.initd @@ -0,0 +1,15 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command=/usr/bin/fluentd +logfile=/var/log/fluentd/fluent.log +pidfile=/var/run/fluentd.pid +command_args="--no-supervisor -o ${logfile} ${fluentd_opts}" +command_background=yes +command_user=fluentd:fluentd +retry="${retry:-TERM/10/KILL/30}" + +start_pre() { + fluentd -q --dry-run +} diff --git a/app-admin/fluentd/files/fluentd.logrotate b/app-admin/fluentd/files/fluentd.logrotate new file mode 100644 index 0000000..52c1c7d --- /dev/null +++ b/app-admin/fluentd/files/fluentd.logrotate @@ -0,0 +1,11 @@ +# /etc/logrotate.d/fluentd +/var/log/fluentd/*log { + su fluentd fluentd + weekly + rotate 6 + compress + delaycompress + missingok + notifempty + create 664 fluentd fluentd +} diff --git a/app-admin/fluentd/fluentd-1.16.10.ebuild b/app-admin/fluentd/fluentd-1.16.10.ebuild new file mode 100644 index 0000000..15d6aad --- /dev/null +++ b/app-admin/fluentd/fluentd-1.16.10.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +USE_RUBY="ruby33 ruby34" + +inherit ruby-fakegem + +DESCRIPTION="data collector and unified logging layer (project under CNCF)" +HOMEPAGE="https://www.fluentd.org" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +COMMON_DEPEND="acct-group/fluentd + acct-user/fluentd" +DEPEND="${COMMON_DEPEND} + test? ( + dev-ruby/async + dev-ruby/test-unit-rr + dev-ruby/rr[test] + dev-ruby/timecop + ) +" +RDEPEND="${COMMON_DEPEND}" + +ruby_add_rdepend " + dev-ruby/bundler + >=dev-ruby/coolio-1.8.1 + >=dev-ruby/http_parser_rb-0.8.0 + >=dev-ruby/msgpack-1.7.5 + >=dev-ruby/serverengine-2.3.2 + >=dev-ruby/sigdump-0.2.5 + >=dev-ruby/strptime-0.2.4 + >=dev-ruby/tzinfo-2.0.6 + >=dev-ruby/webrick-1.8.2 + >=dev-ruby/yajl-ruby-1.4.3" + +ruby_add_depend "test? ( dev-ruby/flexmock )" + +all_ruby_prepare() { + sed -i \ + -e '/tzinfo-data/d' \ + -e '/dig_rb/d' \ + "${PN}".gemspec || die "'sed failed" + + # Avoid test dependency on unpackaged oj + rm -f test/test_event_time.rb || die +} + +all_ruby_install() { + all_fakegem_install + keepdir /var/log/fluentd + fowners fluentd:adm /var/log/fluentd + insinto /etc/fluent + doins fluent.conf + newconfd "${FILESDIR}"/${PN}.confd ${PN} + newinitd "${FILESDIR}"/${PN}.initd ${PN} + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate ${PN} +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "A default configuration file has been installed in" + elog "${EROOT}/etc/fluent/fluent.conf. You will need to edit" + elog "this file to match your configuration." + fi +} diff --git a/app-admin/fluentd/metadata.xml b/app-admin/fluentd/metadata.xml new file mode 100644 index 0000000..41a4fd4 --- /dev/null +++ b/app-admin/fluentd/metadata.xml @@ -0,0 +1,13 @@ + + + + + jkroon@gentoo.org + Jaco Kroon + + + Fluentd is an open source data collector which lets you unify + the data collection and consumption for a better use and + understanding of data. + +