forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-admin/logstash-bin: bump to 6.3.1
Closes: https://bugs.gentoo.org/656828 Package-Manager: Portage-2.3.42, Repoman-2.3.9
- Loading branch information
1 parent
80b0cba
commit ccbad95
Showing
5 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
DIST logstash-5.6.10.tar.gz 104373711 BLAKE2B 759bf003e1799aeaef0a1279b3c7cf5732126ae65e9ca0a3e315cb6f7a1b4e4417fad1fd86328a58be99e04e8053264d873b04cf43cac2b49490bbdc82c8e8b7 SHA512 9ba887da982755efd21b363e9c084660c9b7e6c042e00a8c599f60d6bba5621af7ede43957f6c3d976888f4c13e6ae17cc69afd184f2dcdd41a311972f59a745 | ||
DIST logstash-5.6.9.zip 108563466 BLAKE2B 9225b823ac1f746481b34894c181aedabb0e69eb4242527271240448504f46aa68ba72f63e3752a6a13c3d567bca89df272a09cacc62739a526e3cb24ca90072 SHA512 f5506b2f2bb2da4b2a8d7b199cc328de6625f623b9498f4f2e5505aa8b4082efa207a06d1df8af7b7c21c400268e51d7ae8b9200afdaa191b8e8644e033a9b6b | ||
DIST logstash-6.2.4.zip 153969993 BLAKE2B 989f631484be14014b8230e09fa049a0e470078fed938f2df55134a27d5f4f2d8670187126d32c4933b77b496a6ed96e12d180922c2c318c67fb3dbeec5a5a3b SHA512 65f6e5accc4441cb930e5c45723edeea54ba034a25680ca34114296af5a2c456d4152f9b38469475e600fce27a27b0d9c1d206039d12f2ec9cfeb02942a5c189 | ||
DIST logstash-oss-6.3.1.tar.gz 143787612 BLAKE2B 2de3b991d27019b1c7df7cfa7152c009f2569e12562106babb56081be2a7ac7d94a967e7c52b58f721c2f70f1e8ec9c2730653ff094cf0dd3a9933486ac13be7 SHA512 959d9d5985e117d23ae12efe248a13ae33f8f3ede320fb3b6872e1c27738b601779f0e2402e7be4a2383cd0f220e50cdfd2d6b160d7f5805b2439cee4d8bd94c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 settings directory | ||
#LS_SETTINGS_DIR=/etc/logstash | ||
|
||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/sbin/openrc-run | ||
# Copyright 1999-2018 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_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.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() { | ||
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This file is where you define your pipelines. You can define multiple. | ||
# For more information on multiple pipelines, see the documentation: | ||
# https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html | ||
|
||
- pipeline.id: main | ||
path.config: "/etc/logstash/conf.d/*.conf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# 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_PN}-oss-${PV}.tar.gz" | ||
|
||
# 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" | ||
|
||
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/{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" | ||
} |