summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Mozes <tmozes@sygic.com>2015-12-07 10:29:06 +0100
committerIan Delaney <idella4@gentoo.org>2015-12-07 19:37:18 +0800
commit5a175cda6007e1a5fef386b69df2b97021a83070 (patch)
treebabced3acaba0501a1041a7ef25aeb0db508c4dc /app-admin
parentgames-fps/duke3d-data: amd64 stable wrt bug #567518 (diff)
downloadgentoo-5a175cda6007e1a5fef386b69df2b97021a83070.tar.gz
gentoo-5a175cda6007e1a5fef386b69df2b97021a83070.tar.bz2
gentoo-5a175cda6007e1a5fef386b69df2b97021a83070.zip
app-admin/logstash-bin: version bump to 2.1.0
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/logstash-bin/files/agent.conf.sample-r220
-rw-r--r--app-admin/logstash-bin/files/logstash.confd-r29
-rw-r--r--app-admin/logstash-bin/files/logstash.initd-r249
-rw-r--r--app-admin/logstash-bin/logstash-bin-2.1.0.ebuild60
-rw-r--r--app-admin/logstash-bin/metadata.xml16
5 files changed, 148 insertions, 6 deletions
diff --git a/app-admin/logstash-bin/files/agent.conf.sample-r2 b/app-admin/logstash-bin/files/agent.conf.sample-r2
new file mode 100644
index 00000000000..96781bd3327
--- /dev/null
+++ b/app-admin/logstash-bin/files/agent.conf.sample-r2
@@ -0,0 +1,20 @@
+input {
+ stdin {
+ type => "stdin"
+ }
+
+ file {
+ type => "syslog"
+ path => [ "/var/log/*.log", "/var/log/debug", "/var/log/messages", "/var/log/syslog" ]
+ }
+}
+
+output {
+ stdout {
+ codec => rubydebug
+ }
+
+ elasticsearch {
+ hosts => localhost
+ }
+}
diff --git a/app-admin/logstash-bin/files/logstash.confd-r2 b/app-admin/logstash-bin/files/logstash.confd-r2
new file mode 100644
index 00000000000..cb683956953
--- /dev/null
+++ b/app-admin/logstash-bin/files/logstash.confd-r2
@@ -0,0 +1,9 @@
+#LS_USER="root"
+#LS_GROUP="root"
+#LS_CONFDIR="/etc/logstash/conf.d"
+#LS_LOGFILE="/var/log/logstash/logstash.log"
+#LS_PIDFILE="/run/logstash/logstash.pid"
+#LS_HEAP_SIZE="500m"
+#LS_NICE=19
+#LS_OPEN_FILES=16384
+#LS_OPTS=""
diff --git a/app-admin/logstash-bin/files/logstash.initd-r2 b/app-admin/logstash-bin/files/logstash.initd-r2
new file mode 100644
index 00000000000..e4abf59b0fa
--- /dev/null
+++ b/app-admin/logstash-bin/files/logstash.initd-r2
@@ -0,0 +1,49 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+LS_USER="${LS_USER:-root}"
+LS_GROUP="${LS_GROUP:-root}"
+LS_CONFDIR="${LS_CONFDIR:-/etc/logstash/conf.d}"
+LS_LOGFILE="${LS_LOGFILE:-/var/log/logstash/logstash.log}"
+LS_PIDFILE="${LS_PIDFILE:-/run/logstash/logstash.pid}"
+LS_NICE="${LS_NICE:-19}"
+LS_OPEN_FILES="${LS_OPEN_FILES:-16384}"
+LS_HEAP_SIZE="${LS_HEAP_SIZE:-500m}"
+
+command="/opt/logstash/bin/logstash"
+command_args="agent --config ${LS_CONFDIR}/*.conf --log ${LS_LOGFILE} ${LS_OPTS}"
+extra_commands="checkconfig"
+command_background="true"
+start_stop_daemon_args="--nicelevel ${LS_NICE} \
+ --user ${LS_USER}:${LS_GROUP} \
+ --env LS_HEAP_SIZE=${LS_HEAP_SIZE}"
+pidfile="${LS_PIDFILE}"
+
+depend() {
+ use net
+ after elasticsearch
+}
+
+checkconfig() {
+ ebegin "Checking your configuration"
+ ${command} ${command_args} --configtest
+ eend $? "Configuration error. Please fix your configuration files."
+}
+
+start_pre() {
+ checkconfig || return 1
+
+ checkpath -d -o "${LS_USER}":"${LS_GROUP}" -m750 "$(dirname "${LS_PIDFILE}")"
+ checkpath -d -o "${LS_USER}":"${LS_GROUP}" -m750 "$(dirname "${LS_LOGFILE}")"
+ checkpath -f -o "${LS_USER}":"${LS_GROUP}" -m640 "${LS_LOGFILE}"
+
+ rc_ulimit="-n ${LS_OPEN_FILES}"
+}
+
+stop() {
+ ebegin "Stopping logstash"
+ start-stop-daemon --stop \
+ --pidfile="${LS_PIDFILE}" \
+ --retry=TERM/5/KILL/5
+}
diff --git a/app-admin/logstash-bin/logstash-bin-2.1.0.ebuild b/app-admin/logstash-bin/logstash-bin-2.1.0.ebuild
new file mode 100644
index 00000000000..f165b2a1a9d
--- /dev/null
+++ b/app-admin/logstash-bin/logstash-bin-2.1.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+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="standard? ( https://download.elastic.co/${MY_PN}/${MY_PN}/${MY_P}.tar.gz )
+ all-plugins? ( https://download.elastic.co/${MY_PN}/${MY_PN}/${MY_PN}-all-plugins-${PV}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+standard all-plugins"
+
+RESTRICT="strip"
+QA_PREBUILT="opt/logstash/vendor/jruby/lib/jni/*/libjffi*.so"
+
+DEPEND=""
+RDEPEND="|| ( virtual/jre:1.8 virtual/jre:1.7 )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if use standard && use all-plugins; then
+ die "Both standard and all-plugins USE selected, please pick just one."
+ fi
+}
+
+src_install() {
+ keepdir /etc/"${MY_PN}"/{conf.d,patterns,plugins}
+ keepdir "/var/log/${MY_PN}"
+
+ insinto "/etc/${MY_PN}/conf.d"
+ newins "${FILESDIR}/agent.conf.sample-r2" agent.conf.sample
+
+ insinto "/opt/${MY_PN}"
+ doins -r .
+ fperms 0755 "/opt/${MY_PN}/bin/${MY_PN}" "/opt/${MY_PN}/vendor/jruby/bin/jruby"
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${MY_PN}.logrotate" ${MY_PN}
+
+ newconfd "${FILESDIR}/${MY_PN}.confd-r2" ${MY_PN}
+ newinitd "${FILESDIR}/${MY_PN}.initd-r2" ${MY_PN}
+}
+
+pkg_postinst() {
+ einfo "Getting started with logstash:"
+ einfo " https://www.elastic.co/guide/en/logstash/current/getting-started-with-logstash.html"
+ einfo ""
+ einfo "Packages that might be interesting:"
+ einfo " app-misc/elasticsearch"
+ einfo " dev-python/elasticsearch-curator"
+ einfo " www-apps/kibana-bin"
+}
diff --git a/app-admin/logstash-bin/metadata.xml b/app-admin/logstash-bin/metadata.xml
index df4f52042da..f82fc0180ff 100644
--- a/app-admin/logstash-bin/metadata.xml
+++ b/app-admin/logstash-bin/metadata.xml
@@ -5,10 +5,14 @@
<maintainer>
<email>idella4@gentoo.org</email>
<name>Ian Delaney</name>
- </maintainer>
- <maintainer>
- <email>hydrapolic@gmail.com</email>
- <name>Tomas Mozes</name>
- <description>Proxy maintainer</description>
- </maintainer>
+ </maintainer>
+ <maintainer>
+ <email>hydrapolic@gmail.com</email>
+ <name>Tomas Mozes</name>
+ <description>Proxy maintainer</description>
+ </maintainer>
+ <use>
+ <flag name="standard">standard distribution package</flag>
+ <flag name="all-plugins">contains the standard distribution package plus all plugins</flag>
+ </use>
</pkgmetadata>