summaryrefslogtreecommitdiff
path: root/app-admin/logstash-bin
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-admin/logstash-bin
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-admin/logstash-bin')
-rw-r--r--app-admin/logstash-bin/Manifest11
-rw-r--r--app-admin/logstash-bin/files/agent.conf.sample29
-rw-r--r--app-admin/logstash-bin/files/logstash-plugin.eselect85
-rw-r--r--app-admin/logstash-bin/files/logstash.confd37
-rw-r--r--app-admin/logstash-bin/files/logstash.confd-r140
-rw-r--r--app-admin/logstash-bin/files/logstash.initd74
-rw-r--r--app-admin/logstash-bin/files/logstash.initd-r175
-rw-r--r--app-admin/logstash-bin/logstash-bin-5.6.9.ebuild78
-rw-r--r--app-admin/logstash-bin/logstash-bin-6.2.4.ebuild78
-rw-r--r--app-admin/logstash-bin/metadata.xml19
10 files changed, 526 insertions, 0 deletions
diff --git a/app-admin/logstash-bin/Manifest b/app-admin/logstash-bin/Manifest
new file mode 100644
index 000000000000..1e7f28bb8dc3
--- /dev/null
+++ b/app-admin/logstash-bin/Manifest
@@ -0,0 +1,11 @@
+AUX agent.conf.sample 409 BLAKE2B c97d35ccecedf47c234e2cb1b3bc20b5aea9254bed08f06e744f44e3567eaa88d232f487a8c185375fc8ba4ad9cc9b15f750649286f1e1c4431d732dc5847550 SHA512 fd9a5fc56d7329113b589f71de030e02c0e1d5575b4ac9fe340fdde6d65d44bc0408f67cc36b6ddb248beb22cb7059727a99f5dc5d92ba2f59816a023a915fd0
+AUX logstash-plugin.eselect 1768 BLAKE2B 539246fb1c6e00fa0928af146d3c32ef69f61e3d419ebba97e688ba151fc34b1cb4a77180c36cd02348616a5069d4c013302270c0127fbe7e836e3f866569d1d SHA512 c80c0f2942643dbdb56c21d2ae0679ac92fb5c84b4f51cb426108c1030434fb32bcadc7131bdaabfe34a458e2bf35965c4acccfb42b99c790a26c2b9ae2a24eb
+AUX logstash.confd 775 BLAKE2B fdcf55e1155c746764aa765350367c421f9ba84b6a1a1cdba94f482bbb3afc904af0995929d75326947e5fc0cfd51bc7608c19a04dd52018cb696d602c39094b SHA512 f0d9270f9158e39ee6b3f0a0e626c252e425246fa76098055161e97c9b4cbe14a9f4db2ea9c64636ef5adba7dd72ac3451af63cfcf4598517c29f8c5efcba14a
+AUX logstash.confd-r1 837 BLAKE2B dd8362a386c865b44e05dd4a244146c5b593e4497d876c23c64e2f2811155355fac51e1af7ec079a8dad7141c2ad3e0eecf3b58971efe3352d4e61d210b46400 SHA512 7a7dcbfe2a8f80804083099a942ca51b235440cd356c1e2310ed060c9260ca0ee7d970b0f5293c67290b17bab4e9c8e0669bdef98f51ed1a97f83ae444c7861e
+AUX logstash.initd 2091 BLAKE2B 980722c1c3cd0cc60cf440d5a06185c66ac4348c0e8990036812ad8f5cbd4e2561affab3ef1de2482990635169afdd10c0841167494d2bf024b28101a0df45fc SHA512 5592918e82182f638a02f6446f9103f70274fdf615573aa4463fde1dfcfa7955c715b0fdcb1f98de9c19ab86268b439d253a696b27f32e55d830cc3839231e30
+AUX logstash.initd-r1 2176 BLAKE2B 37c05148d3789c69805ae5151bed5e297d71b9d60d71ff98ed411ac59b73c4a2a9462e6223a2c960301c6228c84879460ae0f793a24806768fb727b01d982709 SHA512 392c8297c6429e0384dd75073773e1f8f51dd62fd155b2a524efd9e862df114b13cc63cf37237526aebe838b5ff26a8f26a3ad08058a56a723e25025df9a16af
+DIST logstash-5.6.9.zip 108563466 BLAKE2B 9225b823ac1f746481b34894c181aedabb0e69eb4242527271240448504f46aa68ba72f63e3752a6a13c3d567bca89df272a09cacc62739a526e3cb24ca90072 SHA512 f5506b2f2bb2da4b2a8d7b199cc328de6625f623b9498f4f2e5505aa8b4082efa207a06d1df8af7b7c21c400268e51d7ae8b9200afdaa191b8e8644e033a9b6b
+DIST logstash-6.2.4.zip 153969993 BLAKE2B 989f631484be14014b8230e09fa049a0e470078fed938f2df55134a27d5f4f2d8670187126d32c4933b77b496a6ed96e12d180922c2c318c67fb3dbeec5a5a3b SHA512 65f6e5accc4441cb930e5c45723edeea54ba034a25680ca34114296af5a2c456d4152f9b38469475e600fce27a27b0d9c1d206039d12f2ec9cfeb02942a5c189
+EBUILD logstash-bin-5.6.9.ebuild 2219 BLAKE2B 7ddc549eabf27143b5951e0e92777609f5d14b76c80ee2b6f794679ef8af73d4a97e59ab106ee196b1df5ed1a1199427e9218db8efaf67d495c84594647e7aa2 SHA512 3fdf9156fe2d3baecf3a4599890a07e7aa572c08b72d173c79dc415ab7339d6e0c9050c73a4c74da0f6bcd412484f6534aea784bb9028ff661d1a700f0b4b18c
+EBUILD logstash-bin-6.2.4.ebuild 2219 BLAKE2B 7ddc549eabf27143b5951e0e92777609f5d14b76c80ee2b6f794679ef8af73d4a97e59ab106ee196b1df5ed1a1199427e9218db8efaf67d495c84594647e7aa2 SHA512 3fdf9156fe2d3baecf3a4599890a07e7aa572c08b72d173c79dc415ab7339d6e0c9050c73a4c74da0f6bcd412484f6534aea784bb9028ff661d1a700f0b4b18c
+MISC metadata.xml 578 BLAKE2B 739149a851fd22460a5cf86deaa74732e44ef44c9edfcba880e7734a8660c92d18df33728939addff8e95241c0475cafed5b0df77d0b9acde609b163f8e7eb0f SHA512 ce9ff07c8fa8edf104692b2736dd7e1a4b2d456dfd2f2cebc2a3dec28d7c11020abf21dad583663266ed5ab26670959bd4650a411524581019e0b27504fba049
diff --git a/app-admin/logstash-bin/files/agent.conf.sample b/app-admin/logstash-bin/files/agent.conf.sample
new file mode 100644
index 000000000000..85c9b5c93d2a
--- /dev/null
+++ b/app-admin/logstash-bin/files/agent.conf.sample
@@ -0,0 +1,29 @@
+input {
+ beats {
+ port => 5044
+ }
+
+ # may need root privileges
+ file {
+ type => "syslog"
+ path => [ "/var/log/*.log", "/var/log/debug", "/var/log/messages", "/var/log/syslog" ]
+ }
+
+ redis {
+ key => logstash
+ data_type => list
+ }
+
+ stdin {
+ type => "stdin"
+ }
+}
+
+output {
+ stdout {
+ codec => rubydebug
+ }
+
+ elasticsearch {
+ }
+}
diff --git a/app-admin/logstash-bin/files/logstash-plugin.eselect b/app-admin/logstash-bin/files/logstash-plugin.eselect
new file mode 100644
index 000000000000..29678309f411
--- /dev/null
+++ b/app-admin/logstash-bin/files/logstash-plugin.eselect
@@ -0,0 +1,85 @@
+# -*-eselect-*- vim: ft=eselect
+# Copyright 2005-2017 Gentoo Foundation
+# Distributed under the terms of the GNU GPL version 2 or later
+
+DESCRIPTION="Manage user installed plugins of logstash"
+MAINTAINER="hydrapolic@gmail.com"
+
+PLUGINS="/var/lib/logstash/plugins-list.txt"
+LS_INSTALL_DIR="/opt/logstash"
+
+ls_plugin_wrapper() {
+ JARS_SKIP=true "${LS_INSTALL_DIR}/bin/logstash-plugin" "${1}" "${2}" || die
+}
+
+### install action
+describe_install() {
+ echo "Install plugin"
+}
+
+describe_install_parameters() {
+ echo "<plugin>"
+}
+
+do_install() {
+ [[ ${#} -lt 1 ]] && die "Please specify at least one plugin"
+
+ local plugin
+ for plugin; do
+ ls_plugin_wrapper install "${plugin}"
+ echo "${plugin}" >> "${PLUGINS}" || die
+ done
+
+ sort -u "${PLUGINS}" > "${PLUGINS}.tmp" || die
+ mv "${PLUGINS}.tmp" "${PLUGINS}" || die
+}
+
+### list action
+describe_list() {
+ echo "List user installed plugins"
+}
+
+do_list() {
+ if [[ -f "${PLUGINS}" ]]; then
+ write_list_start "Installed plugins:"
+
+ local plugin
+ while read -r plugin; do
+ write_kv_list_entry "${plugin}"
+ done < "${PLUGINS}"
+ fi
+}
+
+### reinstall action
+describe_reinstall() {
+ echo "Reinstall plugins"
+}
+
+do_reinstall() {
+ if [[ -f "${PLUGINS}" ]]; then
+ local plugin
+ while read -r plugin; do
+ ls_plugin_wrapper install "${plugin}"
+ done < "${PLUGINS}"
+ fi
+}
+
+### uninstall action
+describe_uninstall() {
+ echo "Uninstall plugin"
+}
+
+describe_uninstall_parameters() {
+ echo "<plugin>"
+}
+
+do_uninstall() {
+ if [[ -f "${PLUGINS}" ]]; then
+ local plugin
+ for plugin; do
+ grep "^${plugin}\$" "${PLUGINS}" || write_warning_msg "Plugin ${plugin} not recorded"
+ sed -i "/^${plugin}\$/d" "${PLUGINS}" || die
+ ls_plugin_wrapper remove "${plugin}"
+ done
+ fi
+}
diff --git a/app-admin/logstash-bin/files/logstash.confd b/app-admin/logstash-bin/files/logstash.confd
new file mode 100644
index 000000000000..6dbbe627a5ad
--- /dev/null
+++ b/app-admin/logstash-bin/files/logstash.confd
@@ -0,0 +1,37 @@
+###############################
+# Default settings for logstash
+###############################
+
+# Set a home directory
+#LS_HOME=/var/lib/logstash
+
+# Set data directory
+#LS_DATA_DIR=${LS_HOME}/data
+
+# Arguments to pass to logstash agent
+#LS_OPTS=""
+
+# Arguments to pass to java
+#LS_HEAP_SIZE="500m"
+#LS_JAVA_OPTS="-Djava.io.tmpdir=$HOME"
+
+# user id to be invoked as
+#LS_USER=logstash
+#LS_GROUP=logstash
+
+# logstash logging
+#LS_LOG_DIR=/var/log/logstash
+#LS_USE_GC_LOGGING="true"
+
+# logstash configuration directory
+#LS_CONF_DIR=/etc/logstash/conf.d
+
+# Open file limit
+#LS_OPEN_FILES=16384
+
+# Nice level
+#LS_NICE=19
+
+# If this is set to 1, then when `stop` is called, if the process has
+# not exited within a reasonable time, SIGKILL will be sent next.
+KILL_ON_STOP_TIMEOUT=0
diff --git a/app-admin/logstash-bin/files/logstash.confd-r1 b/app-admin/logstash-bin/files/logstash.confd-r1
new file mode 100644
index 000000000000..5f59b606fed2
--- /dev/null
+++ b/app-admin/logstash-bin/files/logstash.confd-r1
@@ -0,0 +1,40 @@
+###############################
+# Default settings for logstash
+###############################
+
+# Set a home directory
+#LS_HOME=/var/lib/logstash
+
+# Set data directory
+#LS_DATA_DIR=${LS_HOME}/data
+
+# Arguments to pass to logstash agent
+#LS_OPTS=""
+
+# Arguments to pass to java
+#LS_HEAP_SIZE="500m"
+#LS_JAVA_OPTS="-Djava.io.tmpdir=$HOME"
+
+# user id to be invoked as
+#LS_USER=logstash
+#LS_GROUP=logstash
+
+# logstash logging
+#LS_LOG_DIR=/var/log/logstash
+#LS_USE_GC_LOGGING="true"
+
+# logstash settings directory
+#LS_SETTINGS_DIR=/etc/logstash
+
+# logstash configuration directory
+#LS_CONF_DIR=/etc/logstash/conf.d
+
+# Open file limit
+#LS_OPEN_FILES=16384
+
+# Nice level
+#LS_NICE=19
+
+# If this is set to 1, then when `stop` is called, if the process has
+# not exited within a reasonable time, SIGKILL will be sent next.
+KILL_ON_STOP_TIMEOUT=0
diff --git a/app-admin/logstash-bin/files/logstash.initd b/app-admin/logstash-bin/files/logstash.initd
new file mode 100644
index 000000000000..2133421377d6
--- /dev/null
+++ b/app-admin/logstash-bin/files/logstash.initd
@@ -0,0 +1,74 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+LS_USER=${LS_USER:-logstash}
+LS_GROUP=${LS_GROUP:-$LS_USER}
+LS_LOG_DIR=${LS_LOG_DIR:-/var/log/logstash}
+LS_CONF_DIR=${LS_CONF_DIR:-/etc/logstash/conf.d}
+LS_HOME=${LS_HOME:-/var/lib/logstash}
+LS_DATA_DIR=${LS_DATA_DIR:-$LS_HOME/data}
+LS_HEAP_SIZE=${LS_HEAP_SIZE:-500m}
+LS_NICE=${LS_NICE:-19}
+LS_JAVA_OPTS=${LS_JAVA_OPTS:-"-Djava.io.tmpdir=${LS_HOME}"}
+LS_USE_GC_LOGGING=${LS_USE_GC_LOGGING:-false}
+LS_OPEN_FILES=${LS_OPEN_FILES:-16384}
+KILL_ON_STOP_TIMEOUT=${KILL_ON_STOP_TIMEOUT:-0}
+
+LS_INSTALL_DIR="/opt/logstash"
+
+command="${LS_INSTALL_DIR}/bin/logstash"
+command_args="--path.config ${LS_CONF_DIR} --path.logs ${LS_LOG_DIR} --path.data ${LS_DATA_DIR} ${LS_OPTS}"
+command_background="true"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+start_stop_daemon_args="--user ${LS_USER}:${LS_GROUP} \
+ --chdir ${LS_HOME}
+ --nicelevel ${LS_NICE}
+ --env LS_HEAP_SIZE=${LS_HEAP_SIZE}
+ --env LS_JAVA_OPTS=${LS_JAVA_OPTS}
+ --env LS_USE_GC_LOGGING=${LS_USE_GC_LOGGING}"
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+checkconfig() {
+ if [ ! -f ${LS_CONF_DIR}/* ]; then
+ eerror "Please put your configuration in ${LS_CONF_DIR}"
+ exit 1
+ fi
+
+ ebegin "Checking your configuration"
+ ${command} ${command_args} --path.logs "${LS_LOG_DIR}/configcheck" --config.test_and_exit
+ eend $? "Configuration error. Please fix your configuration files."
+}
+
+reload() {
+ checkconfig || return 1
+ ebegin "Reloading configuration"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
+
+start_pre() {
+ checkconfig || return 1
+
+ rc_ulimit="-n ${LS_OPEN_FILES}"
+
+ local d
+ for d in "${LS_HOME}" "${LS_DATA_DIR}" "${LS_DATA_DIR}/queue" "${LS_DATA_DIR}/dead_letter_queue" "${LS_LOG_DIR}"; do
+ checkpath -d -o "${LS_USER}":"${LS_GROUP}" -m750 "$d"
+ done
+}
+
+stop() {
+ ebegin "Stopping logstash"
+ if [ "${KILL_ON_STOP_TIMEOUT}" = "1" ]; then
+ start-stop-daemon --stop \
+ --pidfile=${pidfile} \
+ --retry=TERM/5/KILL/5
+ else
+ start-stop-daemon --stop \
+ --pidfile=${pidfile}
+ fi
+}
diff --git a/app-admin/logstash-bin/files/logstash.initd-r1 b/app-admin/logstash-bin/files/logstash.initd-r1
new file mode 100644
index 000000000000..2e7350d06f5a
--- /dev/null
+++ b/app-admin/logstash-bin/files/logstash.initd-r1
@@ -0,0 +1,75 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+LS_USER=${LS_USER:-logstash}
+LS_GROUP=${LS_GROUP:-$LS_USER}
+LS_LOG_DIR=${LS_LOG_DIR:-/var/log/logstash}
+LS_SETTINGS_DIR=${LS_SETTINGS_DIR:-/etc/logstash}
+LS_CONF_DIR=${LS_CONF_DIR:-/etc/logstash/conf.d}
+LS_HOME=${LS_HOME:-/var/lib/logstash}
+LS_DATA_DIR=${LS_DATA_DIR:-$LS_HOME/data}
+LS_HEAP_SIZE=${LS_HEAP_SIZE:-500m}
+LS_NICE=${LS_NICE:-19}
+LS_JAVA_OPTS=${LS_JAVA_OPTS:-"-Djava.io.tmpdir=${LS_HOME}"}
+LS_USE_GC_LOGGING=${LS_USE_GC_LOGGING:-false}
+LS_OPEN_FILES=${LS_OPEN_FILES:-16384}
+KILL_ON_STOP_TIMEOUT=${KILL_ON_STOP_TIMEOUT:-0}
+
+LS_INSTALL_DIR="/opt/logstash"
+
+command="${LS_INSTALL_DIR}/bin/logstash"
+command_args="--path.config ${LS_CONF_DIR} --path.data ${LS_DATA_DIR} --path.logs ${LS_LOG_DIR} --path.settings ${LS_SETTINGS_DIR} ${LS_OPTS}"
+command_background="true"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+start_stop_daemon_args="--user ${LS_USER}:${LS_GROUP} \
+ --chdir ${LS_HOME}
+ --nicelevel ${LS_NICE}
+ --env LS_HEAP_SIZE=${LS_HEAP_SIZE}
+ --env LS_JAVA_OPTS=${LS_JAVA_OPTS}
+ --env LS_USE_GC_LOGGING=${LS_USE_GC_LOGGING}"
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+checkconfig() {
+ if [ ! -f ${LS_CONF_DIR}/* ]; then
+ eerror "Please put your configuration in ${LS_CONF_DIR}"
+ exit 1
+ fi
+
+ ebegin "Checking your configuration"
+ ${command} ${command_args} --path.logs "${LS_LOG_DIR}/configcheck" --config.test_and_exit
+ eend $? "Configuration error. Please fix your configuration files."
+}
+
+reload() {
+ checkconfig || return 1
+ ebegin "Reloading configuration"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
+
+start_pre() {
+ checkconfig || return 1
+
+ rc_ulimit="-n ${LS_OPEN_FILES}"
+
+ local d
+ for d in "${LS_HOME}" "${LS_DATA_DIR}" "${LS_DATA_DIR}/queue" "${LS_DATA_DIR}/dead_letter_queue" "${LS_LOG_DIR}"; do
+ checkpath -d -o "${LS_USER}":"${LS_GROUP}" -m750 "$d"
+ done
+}
+
+stop() {
+ ebegin "Stopping logstash"
+ if [ "${KILL_ON_STOP_TIMEOUT}" = "1" ]; then
+ start-stop-daemon --stop \
+ --pidfile=${pidfile} \
+ --retry=TERM/5/KILL/5
+ else
+ start-stop-daemon --stop \
+ --pidfile=${pidfile}
+ fi
+}
diff --git a/app-admin/logstash-bin/logstash-bin-5.6.9.ebuild b/app-admin/logstash-bin/logstash-bin-5.6.9.ebuild
new file mode 100644
index 000000000000..d1ce6cfb92d7
--- /dev/null
+++ b/app-admin/logstash-bin/logstash-bin-5.6.9.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit java-pkg-2 user
+
+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="https://artifacts.elastic.co/downloads/${MY_PN}/${MY_P}.zip"
+
+# source: LICENSE.txt and NOTICE.txt
+LICENSE="Apache-2.0 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RESTRICT="strip"
+QA_PREBUILT="opt/logstash/vendor/jruby/lib/jni/*/libjffi*.so"
+
+DEPEND="app-arch/unzip"
+RDEPEND="virtual/jre:1.8"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup ${MY_PN}
+ enewuser ${MY_PN} -1 -1 /var/lib/${MY_PN} ${MY_PN}
+}
+
+src_install() {
+ keepdir /etc/"${MY_PN}"/{conf.d,patterns,plugins}
+ keepdir "/var/lib/${MY_PN}"
+ keepdir "/var/log/${MY_PN}"
+
+ insinto "/usr/share/${MY_PN}"
+ newins "${FILESDIR}/agent.conf.sample" agent.conf
+
+ rm -v config/startup.options || die
+ insinto /etc/${MY_PN}
+ doins -r config/.
+ 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-r1" "${MY_PN}"
+ newinitd "${FILESDIR}/${MY_PN}.initd-r1" "${MY_PN}"
+
+ insinto /usr/share/eselect/modules
+ doins "${FILESDIR}"/logstash-plugin.eselect
+}
+
+pkg_postinst() {
+ ewarn "The default pidfile directory has been changed from /run/logstash to /run."
+ ewarn "Please ensure any running logstash processes are shut down cleanly."
+ ewarn
+ ewarn "The default data directory has been moved from /opt/logstash/data to"
+ ewarn "/var/lib/logstash/data. Please check and move its contents as necessary."
+ ewarn
+ 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}"
+}
diff --git a/app-admin/logstash-bin/logstash-bin-6.2.4.ebuild b/app-admin/logstash-bin/logstash-bin-6.2.4.ebuild
new file mode 100644
index 000000000000..d1ce6cfb92d7
--- /dev/null
+++ b/app-admin/logstash-bin/logstash-bin-6.2.4.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit java-pkg-2 user
+
+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="https://artifacts.elastic.co/downloads/${MY_PN}/${MY_P}.zip"
+
+# source: LICENSE.txt and NOTICE.txt
+LICENSE="Apache-2.0 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RESTRICT="strip"
+QA_PREBUILT="opt/logstash/vendor/jruby/lib/jni/*/libjffi*.so"
+
+DEPEND="app-arch/unzip"
+RDEPEND="virtual/jre:1.8"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup ${MY_PN}
+ enewuser ${MY_PN} -1 -1 /var/lib/${MY_PN} ${MY_PN}
+}
+
+src_install() {
+ keepdir /etc/"${MY_PN}"/{conf.d,patterns,plugins}
+ keepdir "/var/lib/${MY_PN}"
+ keepdir "/var/log/${MY_PN}"
+
+ insinto "/usr/share/${MY_PN}"
+ newins "${FILESDIR}/agent.conf.sample" agent.conf
+
+ rm -v config/startup.options || die
+ insinto /etc/${MY_PN}
+ doins -r config/.
+ 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-r1" "${MY_PN}"
+ newinitd "${FILESDIR}/${MY_PN}.initd-r1" "${MY_PN}"
+
+ insinto /usr/share/eselect/modules
+ doins "${FILESDIR}"/logstash-plugin.eselect
+}
+
+pkg_postinst() {
+ ewarn "The default pidfile directory has been changed from /run/logstash to /run."
+ ewarn "Please ensure any running logstash processes are shut down cleanly."
+ ewarn
+ ewarn "The default data directory has been moved from /opt/logstash/data to"
+ ewarn "/var/lib/logstash/data. Please check and move its contents as necessary."
+ ewarn
+ 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}"
+}
diff --git a/app-admin/logstash-bin/metadata.xml b/app-admin/logstash-bin/metadata.xml
new file mode 100644
index 000000000000..d4758fc50621
--- /dev/null
+++ b/app-admin/logstash-bin/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hydrapolic@gmail.com</email>
+ <name>Tomáš Mózes</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>erkiferenc@gmail.com</email>
+ <name>Ferenc Erki</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">elastic/logstash</remote-id>
+ </upstream>
+</pkgmetadata>