diff options
author | Tomáš Mózes <hydrapolic@gmail.com> | 2022-07-07 14:20:06 +0000 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2022-07-15 11:38:10 +0300 |
commit | de4cf6b03d8f40a3e3c70d768a5aa730fe915170 (patch) | |
tree | 6423219d95a126f8d5a67aefda93b21ee30e7111 /app-admin/logstash-bin/logstash-bin-7.17.5.ebuild | |
parent | app-misc/elasticsearch: bump to 7.17.5 (diff) | |
download | gentoo-de4cf6b03d8f40a3e3c70d768a5aa730fe915170.tar.gz gentoo-de4cf6b03d8f40a3e3c70d768a5aa730fe915170.tar.bz2 gentoo-de4cf6b03d8f40a3e3c70d768a5aa730fe915170.zip |
app-admin/logstash-bin: bump to 7.17.5
Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-admin/logstash-bin/logstash-bin-7.17.5.ebuild')
-rw-r--r-- | app-admin/logstash-bin/logstash-bin-7.17.5.ebuild | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/app-admin/logstash-bin/logstash-bin-7.17.5.ebuild b/app-admin/logstash-bin/logstash-bin-7.17.5.ebuild new file mode 100644 index 000000000000..ddceca40f83c --- /dev/null +++ b/app-admin/logstash-bin/logstash-bin-7.17.5.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit java-pkg-2 + +MY_PN="${PN%-bin}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Tool for managing events and logs" +HOMEPAGE="https://www.elastic.co/products/logstash" +SRC_URI="x-pack? ( https://artifacts.elastic.co/downloads/${MY_PN}/${MY_P}-linux-x86_64.tar.gz ) + !x-pack? ( https://artifacts.elastic.co/downloads/${MY_PN}/${MY_PN}-oss-${PV}-linux-x86_64.tar.gz )" + +# source: LICENSE.txt and NOTICE.txt +LICENSE="Apache-2.0 MIT x-pack? ( Elastic )" +SLOT="0" +KEYWORDS="~amd64" +IUSE="x-pack" + +RESTRICT="strip" +QA_PREBUILT="opt/logstash/vendor/jruby/lib/jni/*/libjffi*.so" + +RDEPEND="acct-group/logstash + acct-user/logstash + virtual/jre" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + default + + local d + for d in aarch64-FreeBSD aarch64-Linux arm-Linux Darwin i386-Linux i386-SunOS \ + i386-Windows mips64el-Linux ppc64-AIX ppc64le-Linux ppc64-Linux \ + ppc-AIX s390x-Linux sparcv9-Linux sparcv9-SunOS x86_64-DragonFlyBSD \ + x86_64-FreeBSD x86_64-OpenBSD x86_64-SunOS x86_64-Windows; do + rm -r vendor/jruby/lib/jni/$d || die + done + + # remove bundled java + rm -r jdk || die +} + +src_install() { + keepdir /etc/"${MY_PN}"/{conf.d,patterns,plugins} + keepdir "/var/log/${MY_PN}" + + insinto "/usr/share/${MY_PN}" + newins "${FILESDIR}/agent.conf.sample" agent.conf + + rm -v config/{pipelines.yml,startup.options} || die + insinto /etc/${MY_PN} + doins -r config/. + doins "${FILESDIR}/pipelines.yml" + rm -rv config data || die + + insinto "/opt/${MY_PN}" + doins -r . + fperms 0755 "/opt/${MY_PN}/bin/${MY_PN}" "/opt/${MY_PN}/vendor/jruby/bin/jruby" "/opt/${MY_PN}/bin/logstash-plugin" + + newconfd "${FILESDIR}/${MY_PN}.confd-r2" "${MY_PN}" + newinitd "${FILESDIR}/${MY_PN}.initd-r2" "${MY_PN}" + + insinto /usr/share/eselect/modules + doins "${FILESDIR}"/logstash-plugin.eselect +} + +pkg_postinst() { + ewarn "Self installed plugins are removed during Logstash upgrades (Bug #622602)" + ewarn "Install the plugins via eselect module that will automatically re-install" + ewarn "all self installed plugins after Logstash upgrades." + elog + elog "Installing plugins:" + elog "eselect logstash-plugin install logstash-output-gelf" + elog + + elog "Reinstalling self installed plugins (installed via eselect module):" + eselect logstash-plugin reinstall + + elog + elog "Sample configuration:" + elog "${EROOT}/usr/share/${MY_PN}" + elog + elog "The default pipeline configuration expects the configuration(s) to be found in:" + elog "${EROOT}/etc/logstash/conf.d/*.conf" +} |