diff options
author | Tomas Mozes <hydrapolic@gmail.com> | 2017-09-27 17:18:32 +0200 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2017-09-30 10:59:18 +0200 |
commit | 40abb7425abfcc1d7fb7b65f94715210847fae1a (patch) | |
tree | 0f8ab698e895b1a9d4150b1f48b68b8226e631f1 /app-admin/logstash-bin | |
parent | eutils.eclass: Document optfeature suggests packages not installed. (diff) | |
download | gentoo-40abb7425abfcc1d7fb7b65f94715210847fae1a.tar.gz gentoo-40abb7425abfcc1d7fb7b65f94715210847fae1a.tar.bz2 gentoo-40abb7425abfcc1d7fb7b65f94715210847fae1a.zip |
app-admin/logstash-bin: version bump to 5.6.2.
Package-Manager: Portage-2.3.10, Repoman-2.3.3
Closes: https://bugs.gentoo.org/621112
Closes: https://bugs.gentoo.org/627528
Closes: https://github.com/gentoo/gentoo/pull/5798
Diffstat (limited to 'app-admin/logstash-bin')
-rw-r--r-- | app-admin/logstash-bin/Manifest | 1 | ||||
-rw-r--r-- | app-admin/logstash-bin/files/logstash.confd-r1 | 40 | ||||
-rw-r--r-- | app-admin/logstash-bin/files/logstash.initd-r1 | 75 | ||||
-rw-r--r-- | app-admin/logstash-bin/logstash-bin-5.6.2.ebuild | 77 |
4 files changed, 193 insertions, 0 deletions
diff --git a/app-admin/logstash-bin/Manifest b/app-admin/logstash-bin/Manifest index a407019018c0..06ee987a95ae 100644 --- a/app-admin/logstash-bin/Manifest +++ b/app-admin/logstash-bin/Manifest @@ -1,2 +1,3 @@ DIST logstash-5.5.3.zip 99551442 SHA256 f81ff55feb21ff4edd4283938ac8362c2906d98f9427d8660dab8465e08f0da9 SHA512 a4328ad0b8192b7c5aaed155d608d9db6adeaefd640e461ef4467daa1a28a2ae25d6b2b1adcf47c5dd82b66fc1adbf8ba5f3eabcf7e69dd8719a5860795877aa WHIRLPOOL d3482df4a7729f6b34973816e39315c69254a641e9811131d7d5e12ede54003a326c5773e799ee471dda01a6113762919ea81ab56ede62d29221f63ed5a7f8c7 DIST logstash-5.6.1.zip 107893345 SHA256 a484176009af9f9a526360a529e2777e18a8928b50a223bb0823bfa45da958c6 SHA512 d2ddc62e14013ed69e2666cb3831bec2cd22f5bcdb147ec431fe1effa64bcb4f8feb2ea77a1c0b43deefeec9a502effe1975a2061c632c57b58b36b5010cb17d WHIRLPOOL f430a452b815e44147bf22b6ed7ab1df01cfe27ec44f2f38007127899cb7408d626f2090efba2ebddd22fd95731ed8df971d3e7793c35b174681ecbb02914ba3 +DIST logstash-5.6.2.zip 107836581 SHA256 ae339c18e0f68c3b98faceff6857369ef6488916e191f1598e4b01b1855b8533 SHA512 7c944c121091053be72fea4546142aa79ea2103aef0009752f9ddceaaafdad2ff91ef1d2495d1e7bccb8e3c18c70353f6359adba5bb737aff860f5d500ff198c WHIRLPOOL ff28ed652c108dac01156eed2adc693ad9c166636bf7be805584742d49da7a575562582af9c381fd73785a6ad2c53e4777d0ac1dca8a51dfc30867b569e973dd 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-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.2.ebuild b/app-admin/logstash-bin/logstash-bin-5.6.2.ebuild new file mode 100644 index 000000000000..05628cebc543 --- /dev/null +++ b/app-admin/logstash-bin/logstash-bin-5.6.2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit 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" + +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 + insinto /etc/${MY_PN} + doins 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." + einfo + einfo "Installing plugins:" + einfo "eselect logstash-plugin install logstash-output-gelf" + einfo + + einfo "Reinstalling self installed plugins (installed via eselect module):" + eselect logstash-plugin reinstall + + einfo + einfo "Sample configuration:" + einfo "${EROOT%/}/usr/share/${MY_PN}" +} |