Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/logstash-bin/files/, app-admin/logstash-bin/
Date: Sat, 30 Sep 2017 08:59:45
Message-Id: 1506761958.40abb7425abfcc1d7fb7b65f94715210847fae1a.monsieurp@gentoo
1 commit: 40abb7425abfcc1d7fb7b65f94715210847fae1a
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Wed Sep 27 15:18:32 2017 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 30 08:59:18 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40abb742
7
8 app-admin/logstash-bin: version bump to 5.6.2.
9
10 Package-Manager: Portage-2.3.10, Repoman-2.3.3
11 Closes: https://bugs.gentoo.org/621112
12 Closes: https://bugs.gentoo.org/627528
13 Closes: https://github.com/gentoo/gentoo/pull/5798
14
15 app-admin/logstash-bin/Manifest | 1 +
16 app-admin/logstash-bin/files/logstash.confd-r1 | 40 ++++++++++++
17 app-admin/logstash-bin/files/logstash.initd-r1 | 75 +++++++++++++++++++++++
18 app-admin/logstash-bin/logstash-bin-5.6.2.ebuild | 77 ++++++++++++++++++++++++
19 4 files changed, 193 insertions(+)
20
21 diff --git a/app-admin/logstash-bin/Manifest b/app-admin/logstash-bin/Manifest
22 index a407019018c..06ee987a95a 100644
23 --- a/app-admin/logstash-bin/Manifest
24 +++ b/app-admin/logstash-bin/Manifest
25 @@ -1,2 +1,3 @@
26 DIST logstash-5.5.3.zip 99551442 SHA256 f81ff55feb21ff4edd4283938ac8362c2906d98f9427d8660dab8465e08f0da9 SHA512 a4328ad0b8192b7c5aaed155d608d9db6adeaefd640e461ef4467daa1a28a2ae25d6b2b1adcf47c5dd82b66fc1adbf8ba5f3eabcf7e69dd8719a5860795877aa WHIRLPOOL d3482df4a7729f6b34973816e39315c69254a641e9811131d7d5e12ede54003a326c5773e799ee471dda01a6113762919ea81ab56ede62d29221f63ed5a7f8c7
27 DIST logstash-5.6.1.zip 107893345 SHA256 a484176009af9f9a526360a529e2777e18a8928b50a223bb0823bfa45da958c6 SHA512 d2ddc62e14013ed69e2666cb3831bec2cd22f5bcdb147ec431fe1effa64bcb4f8feb2ea77a1c0b43deefeec9a502effe1975a2061c632c57b58b36b5010cb17d WHIRLPOOL f430a452b815e44147bf22b6ed7ab1df01cfe27ec44f2f38007127899cb7408d626f2090efba2ebddd22fd95731ed8df971d3e7793c35b174681ecbb02914ba3
28 +DIST logstash-5.6.2.zip 107836581 SHA256 ae339c18e0f68c3b98faceff6857369ef6488916e191f1598e4b01b1855b8533 SHA512 7c944c121091053be72fea4546142aa79ea2103aef0009752f9ddceaaafdad2ff91ef1d2495d1e7bccb8e3c18c70353f6359adba5bb737aff860f5d500ff198c WHIRLPOOL ff28ed652c108dac01156eed2adc693ad9c166636bf7be805584742d49da7a575562582af9c381fd73785a6ad2c53e4777d0ac1dca8a51dfc30867b569e973dd
29
30 diff --git a/app-admin/logstash-bin/files/logstash.confd-r1 b/app-admin/logstash-bin/files/logstash.confd-r1
31 new file mode 100644
32 index 00000000000..5f59b606fed
33 --- /dev/null
34 +++ b/app-admin/logstash-bin/files/logstash.confd-r1
35 @@ -0,0 +1,40 @@
36 +###############################
37 +# Default settings for logstash
38 +###############################
39 +
40 +# Set a home directory
41 +#LS_HOME=/var/lib/logstash
42 +
43 +# Set data directory
44 +#LS_DATA_DIR=${LS_HOME}/data
45 +
46 +# Arguments to pass to logstash agent
47 +#LS_OPTS=""
48 +
49 +# Arguments to pass to java
50 +#LS_HEAP_SIZE="500m"
51 +#LS_JAVA_OPTS="-Djava.io.tmpdir=$HOME"
52 +
53 +# user id to be invoked as
54 +#LS_USER=logstash
55 +#LS_GROUP=logstash
56 +
57 +# logstash logging
58 +#LS_LOG_DIR=/var/log/logstash
59 +#LS_USE_GC_LOGGING="true"
60 +
61 +# logstash settings directory
62 +#LS_SETTINGS_DIR=/etc/logstash
63 +
64 +# logstash configuration directory
65 +#LS_CONF_DIR=/etc/logstash/conf.d
66 +
67 +# Open file limit
68 +#LS_OPEN_FILES=16384
69 +
70 +# Nice level
71 +#LS_NICE=19
72 +
73 +# If this is set to 1, then when `stop` is called, if the process has
74 +# not exited within a reasonable time, SIGKILL will be sent next.
75 +KILL_ON_STOP_TIMEOUT=0
76
77 diff --git a/app-admin/logstash-bin/files/logstash.initd-r1 b/app-admin/logstash-bin/files/logstash.initd-r1
78 new file mode 100644
79 index 00000000000..2e7350d06f5
80 --- /dev/null
81 +++ b/app-admin/logstash-bin/files/logstash.initd-r1
82 @@ -0,0 +1,75 @@
83 +#!/sbin/openrc-run
84 +# Copyright 1999-2017 Gentoo Foundation
85 +# Distributed under the terms of the GNU General Public License v2
86 +
87 +LS_USER=${LS_USER:-logstash}
88 +LS_GROUP=${LS_GROUP:-$LS_USER}
89 +LS_LOG_DIR=${LS_LOG_DIR:-/var/log/logstash}
90 +LS_SETTINGS_DIR=${LS_SETTINGS_DIR:-/etc/logstash}
91 +LS_CONF_DIR=${LS_CONF_DIR:-/etc/logstash/conf.d}
92 +LS_HOME=${LS_HOME:-/var/lib/logstash}
93 +LS_DATA_DIR=${LS_DATA_DIR:-$LS_HOME/data}
94 +LS_HEAP_SIZE=${LS_HEAP_SIZE:-500m}
95 +LS_NICE=${LS_NICE:-19}
96 +LS_JAVA_OPTS=${LS_JAVA_OPTS:-"-Djava.io.tmpdir=${LS_HOME}"}
97 +LS_USE_GC_LOGGING=${LS_USE_GC_LOGGING:-false}
98 +LS_OPEN_FILES=${LS_OPEN_FILES:-16384}
99 +KILL_ON_STOP_TIMEOUT=${KILL_ON_STOP_TIMEOUT:-0}
100 +
101 +LS_INSTALL_DIR="/opt/logstash"
102 +
103 +command="${LS_INSTALL_DIR}/bin/logstash"
104 +command_args="--path.config ${LS_CONF_DIR} --path.data ${LS_DATA_DIR} --path.logs ${LS_LOG_DIR} --path.settings ${LS_SETTINGS_DIR} ${LS_OPTS}"
105 +command_background="true"
106 +pidfile="/run/${RC_SVCNAME}.pid"
107 +
108 +start_stop_daemon_args="--user ${LS_USER}:${LS_GROUP} \
109 + --chdir ${LS_HOME}
110 + --nicelevel ${LS_NICE}
111 + --env LS_HEAP_SIZE=${LS_HEAP_SIZE}
112 + --env LS_JAVA_OPTS=${LS_JAVA_OPTS}
113 + --env LS_USE_GC_LOGGING=${LS_USE_GC_LOGGING}"
114 +
115 +extra_commands="checkconfig"
116 +extra_started_commands="reload"
117 +
118 +checkconfig() {
119 + if [ ! -f ${LS_CONF_DIR}/* ]; then
120 + eerror "Please put your configuration in ${LS_CONF_DIR}"
121 + exit 1
122 + fi
123 +
124 + ebegin "Checking your configuration"
125 + ${command} ${command_args} --path.logs "${LS_LOG_DIR}/configcheck" --config.test_and_exit
126 + eend $? "Configuration error. Please fix your configuration files."
127 +}
128 +
129 +reload() {
130 + checkconfig || return 1
131 + ebegin "Reloading configuration"
132 + start-stop-daemon --signal HUP --pidfile "${pidfile}"
133 + eend $?
134 +}
135 +
136 +start_pre() {
137 + checkconfig || return 1
138 +
139 + rc_ulimit="-n ${LS_OPEN_FILES}"
140 +
141 + local d
142 + for d in "${LS_HOME}" "${LS_DATA_DIR}" "${LS_DATA_DIR}/queue" "${LS_DATA_DIR}/dead_letter_queue" "${LS_LOG_DIR}"; do
143 + checkpath -d -o "${LS_USER}":"${LS_GROUP}" -m750 "$d"
144 + done
145 +}
146 +
147 +stop() {
148 + ebegin "Stopping logstash"
149 + if [ "${KILL_ON_STOP_TIMEOUT}" = "1" ]; then
150 + start-stop-daemon --stop \
151 + --pidfile=${pidfile} \
152 + --retry=TERM/5/KILL/5
153 + else
154 + start-stop-daemon --stop \
155 + --pidfile=${pidfile}
156 + fi
157 +}
158
159 diff --git a/app-admin/logstash-bin/logstash-bin-5.6.2.ebuild b/app-admin/logstash-bin/logstash-bin-5.6.2.ebuild
160 new file mode 100644
161 index 00000000000..05628cebc54
162 --- /dev/null
163 +++ b/app-admin/logstash-bin/logstash-bin-5.6.2.ebuild
164 @@ -0,0 +1,77 @@
165 +# Copyright 1999-2017 Gentoo Foundation
166 +# Distributed under the terms of the GNU General Public License v2
167 +
168 +EAPI=6
169 +
170 +inherit user
171 +
172 +MY_PN="${PN%-bin}"
173 +MY_P="${MY_PN}-${PV}"
174 +
175 +DESCRIPTION="Tool for managing events and logs"
176 +HOMEPAGE="https://www.elastic.co/products/logstash"
177 +SRC_URI="https://artifacts.elastic.co/downloads/${MY_PN}/${MY_P}.zip"
178 +
179 +# source: LICENSE.txt and NOTICE.txt
180 +LICENSE="Apache-2.0 MIT"
181 +SLOT="0"
182 +KEYWORDS="~amd64"
183 +
184 +RESTRICT="strip"
185 +QA_PREBUILT="opt/logstash/vendor/jruby/lib/jni/*/libjffi*.so"
186 +
187 +RDEPEND="virtual/jre:1.8"
188 +
189 +S="${WORKDIR}/${MY_P}"
190 +
191 +pkg_setup() {
192 + enewgroup ${MY_PN}
193 + enewuser ${MY_PN} -1 -1 /var/lib/${MY_PN} ${MY_PN}
194 +}
195 +
196 +src_install() {
197 + keepdir /etc/"${MY_PN}"/{conf.d,patterns,plugins}
198 + keepdir "/var/lib/${MY_PN}"
199 + keepdir "/var/log/${MY_PN}"
200 +
201 + insinto "/usr/share/${MY_PN}"
202 + newins "${FILESDIR}/agent.conf.sample" agent.conf
203 +
204 + rm -v config/startup.options
205 + insinto /etc/${MY_PN}
206 + doins config/*
207 + rm -rv config data || die
208 +
209 + insinto "/opt/${MY_PN}"
210 + doins -r .
211 + fperms 0755 "/opt/${MY_PN}/bin/${MY_PN}" "/opt/${MY_PN}/vendor/jruby/bin/jruby" "/opt/${MY_PN}/bin/logstash-plugin"
212 +
213 + newconfd "${FILESDIR}/${MY_PN}.confd-r1" "${MY_PN}"
214 + newinitd "${FILESDIR}/${MY_PN}.initd-r1" "${MY_PN}"
215 +
216 + insinto /usr/share/eselect/modules
217 + doins "${FILESDIR}"/logstash-plugin.eselect
218 +}
219 +
220 +pkg_postinst() {
221 + ewarn "The default pidfile directory has been changed from /run/logstash to /run."
222 + ewarn "Please ensure any running logstash processes are shut down cleanly."
223 + ewarn
224 + ewarn "The default data directory has been moved from /opt/logstash/data to"
225 + ewarn "/var/lib/logstash/data. Please check and move its contents as necessary."
226 + ewarn
227 + ewarn "Self installed plugins are removed during Logstash upgrades (Bug #622602)"
228 + ewarn "Install the plugins via eselect module that will automatically re-install"
229 + ewarn "all self installed plugins after Logstash upgrades."
230 + einfo
231 + einfo "Installing plugins:"
232 + einfo "eselect logstash-plugin install logstash-output-gelf"
233 + einfo
234 +
235 + einfo "Reinstalling self installed plugins (installed via eselect module):"
236 + eselect logstash-plugin reinstall
237 +
238 + einfo
239 + einfo "Sample configuration:"
240 + einfo "${EROOT%/}/usr/share/${MY_PN}"
241 +}