1 |
commit: ccbad95d8a5cc265e016d3cb27898bf0fd9db7e4 |
2 |
Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Jul 13 13:55:22 2018 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 15 16:16:50 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccbad95d |
7 |
|
8 |
app-admin/logstash-bin: bump to 6.3.1 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/656828 |
11 |
Package-Manager: Portage-2.3.42, Repoman-2.3.9 |
12 |
|
13 |
app-admin/logstash-bin/Manifest | 1 + |
14 |
app-admin/logstash-bin/files/logstash.confd-r2 | 37 ++++++++++++ |
15 |
app-admin/logstash-bin/files/logstash.initd-r2 | 69 ++++++++++++++++++++++ |
16 |
app-admin/logstash-bin/files/pipelines.yml | 6 ++ |
17 |
app-admin/logstash-bin/logstash-bin-6.3.1.ebuild | 75 ++++++++++++++++++++++++ |
18 |
5 files changed, 188 insertions(+) |
19 |
|
20 |
diff --git a/app-admin/logstash-bin/Manifest b/app-admin/logstash-bin/Manifest |
21 |
index e0c4d688613..b4e82c8bffd 100644 |
22 |
--- a/app-admin/logstash-bin/Manifest |
23 |
+++ b/app-admin/logstash-bin/Manifest |
24 |
@@ -1,3 +1,4 @@ |
25 |
DIST logstash-5.6.10.tar.gz 104373711 BLAKE2B 759bf003e1799aeaef0a1279b3c7cf5732126ae65e9ca0a3e315cb6f7a1b4e4417fad1fd86328a58be99e04e8053264d873b04cf43cac2b49490bbdc82c8e8b7 SHA512 9ba887da982755efd21b363e9c084660c9b7e6c042e00a8c599f60d6bba5621af7ede43957f6c3d976888f4c13e6ae17cc69afd184f2dcdd41a311972f59a745 |
26 |
DIST logstash-5.6.9.zip 108563466 BLAKE2B 9225b823ac1f746481b34894c181aedabb0e69eb4242527271240448504f46aa68ba72f63e3752a6a13c3d567bca89df272a09cacc62739a526e3cb24ca90072 SHA512 f5506b2f2bb2da4b2a8d7b199cc328de6625f623b9498f4f2e5505aa8b4082efa207a06d1df8af7b7c21c400268e51d7ae8b9200afdaa191b8e8644e033a9b6b |
27 |
DIST logstash-6.2.4.zip 153969993 BLAKE2B 989f631484be14014b8230e09fa049a0e470078fed938f2df55134a27d5f4f2d8670187126d32c4933b77b496a6ed96e12d180922c2c318c67fb3dbeec5a5a3b SHA512 65f6e5accc4441cb930e5c45723edeea54ba034a25680ca34114296af5a2c456d4152f9b38469475e600fce27a27b0d9c1d206039d12f2ec9cfeb02942a5c189 |
28 |
+DIST logstash-oss-6.3.1.tar.gz 143787612 BLAKE2B 2de3b991d27019b1c7df7cfa7152c009f2569e12562106babb56081be2a7ac7d94a967e7c52b58f721c2f70f1e8ec9c2730653ff094cf0dd3a9933486ac13be7 SHA512 959d9d5985e117d23ae12efe248a13ae33f8f3ede320fb3b6872e1c27738b601779f0e2402e7be4a2383cd0f220e50cdfd2d6b160d7f5805b2439cee4d8bd94c |
29 |
|
30 |
diff --git a/app-admin/logstash-bin/files/logstash.confd-r2 b/app-admin/logstash-bin/files/logstash.confd-r2 |
31 |
new file mode 100644 |
32 |
index 00000000000..d9ff0942bc6 |
33 |
--- /dev/null |
34 |
+++ b/app-admin/logstash-bin/files/logstash.confd-r2 |
35 |
@@ -0,0 +1,37 @@ |
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 |
+# Open file limit |
65 |
+#LS_OPEN_FILES=16384 |
66 |
+ |
67 |
+# Nice level |
68 |
+#LS_NICE=19 |
69 |
+ |
70 |
+# If this is set to 1, then when `stop` is called, if the process has |
71 |
+# not exited within a reasonable time, SIGKILL will be sent next. |
72 |
+KILL_ON_STOP_TIMEOUT=0 |
73 |
|
74 |
diff --git a/app-admin/logstash-bin/files/logstash.initd-r2 b/app-admin/logstash-bin/files/logstash.initd-r2 |
75 |
new file mode 100644 |
76 |
index 00000000000..e05c837ae70 |
77 |
--- /dev/null |
78 |
+++ b/app-admin/logstash-bin/files/logstash.initd-r2 |
79 |
@@ -0,0 +1,69 @@ |
80 |
+#!/sbin/openrc-run |
81 |
+# Copyright 1999-2018 Gentoo Foundation |
82 |
+# Distributed under the terms of the GNU General Public License v2 |
83 |
+ |
84 |
+LS_USER=${LS_USER:-logstash} |
85 |
+LS_GROUP=${LS_GROUP:-$LS_USER} |
86 |
+LS_LOG_DIR=${LS_LOG_DIR:-/var/log/logstash} |
87 |
+LS_SETTINGS_DIR=${LS_SETTINGS_DIR:-/etc/logstash} |
88 |
+LS_HOME=${LS_HOME:-/var/lib/logstash} |
89 |
+LS_DATA_DIR=${LS_DATA_DIR:-$LS_HOME/data} |
90 |
+LS_HEAP_SIZE=${LS_HEAP_SIZE:-500m} |
91 |
+LS_NICE=${LS_NICE:-19} |
92 |
+LS_JAVA_OPTS=${LS_JAVA_OPTS:-"-Djava.io.tmpdir=${LS_HOME}"} |
93 |
+LS_USE_GC_LOGGING=${LS_USE_GC_LOGGING:-false} |
94 |
+LS_OPEN_FILES=${LS_OPEN_FILES:-16384} |
95 |
+KILL_ON_STOP_TIMEOUT=${KILL_ON_STOP_TIMEOUT:-0} |
96 |
+ |
97 |
+LS_INSTALL_DIR="/opt/logstash" |
98 |
+ |
99 |
+command="${LS_INSTALL_DIR}/bin/logstash" |
100 |
+command_args="--path.data ${LS_DATA_DIR} --path.logs ${LS_LOG_DIR} --path.settings ${LS_SETTINGS_DIR} ${LS_OPTS}" |
101 |
+command_background="true" |
102 |
+pidfile="/run/${RC_SVCNAME}.pid" |
103 |
+ |
104 |
+start_stop_daemon_args="--user ${LS_USER}:${LS_GROUP} \ |
105 |
+ --chdir ${LS_HOME} |
106 |
+ --nicelevel ${LS_NICE} |
107 |
+ --env LS_HEAP_SIZE=${LS_HEAP_SIZE} |
108 |
+ --env LS_JAVA_OPTS=${LS_JAVA_OPTS} |
109 |
+ --env LS_USE_GC_LOGGING=${LS_USE_GC_LOGGING}" |
110 |
+ |
111 |
+extra_commands="checkconfig" |
112 |
+extra_started_commands="reload" |
113 |
+ |
114 |
+checkconfig() { |
115 |
+ ebegin "Checking your configuration" |
116 |
+ ${command} ${command_args} --path.logs "${LS_LOG_DIR}/configcheck" --config.test_and_exit |
117 |
+ eend $? "Configuration error. Please fix your configuration files." |
118 |
+} |
119 |
+ |
120 |
+reload() { |
121 |
+ checkconfig || return 1 |
122 |
+ ebegin "Reloading configuration" |
123 |
+ start-stop-daemon --signal HUP --pidfile "${pidfile}" |
124 |
+ eend $? |
125 |
+} |
126 |
+ |
127 |
+start_pre() { |
128 |
+ checkconfig || return 1 |
129 |
+ |
130 |
+ rc_ulimit="-n ${LS_OPEN_FILES}" |
131 |
+ |
132 |
+ local d |
133 |
+ for d in "${LS_HOME}" "${LS_DATA_DIR}" "${LS_DATA_DIR}/queue" "${LS_DATA_DIR}/dead_letter_queue" "${LS_LOG_DIR}"; do |
134 |
+ checkpath -d -o "${LS_USER}":"${LS_GROUP}" -m750 "$d" |
135 |
+ done |
136 |
+} |
137 |
+ |
138 |
+stop() { |
139 |
+ ebegin "Stopping logstash" |
140 |
+ if [ "${KILL_ON_STOP_TIMEOUT}" = "1" ]; then |
141 |
+ start-stop-daemon --stop \ |
142 |
+ --pidfile=${pidfile} \ |
143 |
+ --retry=TERM/5/KILL/5 |
144 |
+ else |
145 |
+ start-stop-daemon --stop \ |
146 |
+ --pidfile=${pidfile} |
147 |
+ fi |
148 |
+} |
149 |
|
150 |
diff --git a/app-admin/logstash-bin/files/pipelines.yml b/app-admin/logstash-bin/files/pipelines.yml |
151 |
new file mode 100644 |
152 |
index 00000000000..eae903aeb1c |
153 |
--- /dev/null |
154 |
+++ b/app-admin/logstash-bin/files/pipelines.yml |
155 |
@@ -0,0 +1,6 @@ |
156 |
+# This file is where you define your pipelines. You can define multiple. |
157 |
+# For more information on multiple pipelines, see the documentation: |
158 |
+# https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html |
159 |
+ |
160 |
+- pipeline.id: main |
161 |
+ path.config: "/etc/logstash/conf.d/*.conf" |
162 |
|
163 |
diff --git a/app-admin/logstash-bin/logstash-bin-6.3.1.ebuild b/app-admin/logstash-bin/logstash-bin-6.3.1.ebuild |
164 |
new file mode 100644 |
165 |
index 00000000000..a5c02ab91f8 |
166 |
--- /dev/null |
167 |
+++ b/app-admin/logstash-bin/logstash-bin-6.3.1.ebuild |
168 |
@@ -0,0 +1,75 @@ |
169 |
+# Copyright 1999-2018 Gentoo Foundation |
170 |
+# Distributed under the terms of the GNU General Public License v2 |
171 |
+ |
172 |
+EAPI=6 |
173 |
+ |
174 |
+inherit java-pkg-2 user |
175 |
+ |
176 |
+MY_PN="${PN%-bin}" |
177 |
+MY_P="${MY_PN}-${PV}" |
178 |
+ |
179 |
+DESCRIPTION="Tool for managing events and logs" |
180 |
+HOMEPAGE="https://www.elastic.co/products/logstash" |
181 |
+SRC_URI="https://artifacts.elastic.co/downloads/${MY_PN}/${MY_PN}-oss-${PV}.tar.gz" |
182 |
+ |
183 |
+# source: LICENSE.txt and NOTICE.txt |
184 |
+LICENSE="Apache-2.0 MIT" |
185 |
+SLOT="0" |
186 |
+KEYWORDS="~amd64" |
187 |
+ |
188 |
+RESTRICT="strip" |
189 |
+QA_PREBUILT="opt/logstash/vendor/jruby/lib/jni/*/libjffi*.so" |
190 |
+ |
191 |
+RDEPEND="virtual/jre:1.8" |
192 |
+ |
193 |
+S="${WORKDIR}/${MY_P}" |
194 |
+ |
195 |
+pkg_setup() { |
196 |
+ enewgroup ${MY_PN} |
197 |
+ enewuser ${MY_PN} -1 -1 /var/lib/${MY_PN} ${MY_PN} |
198 |
+} |
199 |
+ |
200 |
+src_install() { |
201 |
+ keepdir /etc/"${MY_PN}"/{conf.d,patterns,plugins} |
202 |
+ keepdir "/var/lib/${MY_PN}" |
203 |
+ keepdir "/var/log/${MY_PN}" |
204 |
+ |
205 |
+ insinto "/usr/share/${MY_PN}" |
206 |
+ newins "${FILESDIR}/agent.conf.sample" agent.conf |
207 |
+ |
208 |
+ rm -v config/{pipelines.yml,startup.options} || die |
209 |
+ insinto /etc/${MY_PN} |
210 |
+ doins -r config/. |
211 |
+ doins "${FILESDIR}/pipelines.yml" |
212 |
+ rm -rv config data || die |
213 |
+ |
214 |
+ insinto "/opt/${MY_PN}" |
215 |
+ doins -r . |
216 |
+ fperms 0755 "/opt/${MY_PN}/bin/${MY_PN}" "/opt/${MY_PN}/vendor/jruby/bin/jruby" "/opt/${MY_PN}/bin/logstash-plugin" |
217 |
+ |
218 |
+ newconfd "${FILESDIR}/${MY_PN}.confd-r2" "${MY_PN}" |
219 |
+ newinitd "${FILESDIR}/${MY_PN}.initd-r2" "${MY_PN}" |
220 |
+ |
221 |
+ insinto /usr/share/eselect/modules |
222 |
+ doins "${FILESDIR}"/logstash-plugin.eselect |
223 |
+} |
224 |
+ |
225 |
+pkg_postinst() { |
226 |
+ ewarn "Self installed plugins are removed during Logstash upgrades (Bug #622602)" |
227 |
+ ewarn "Install the plugins via eselect module that will automatically re-install" |
228 |
+ ewarn "all self installed plugins after Logstash upgrades." |
229 |
+ elog |
230 |
+ elog "Installing plugins:" |
231 |
+ elog "eselect logstash-plugin install logstash-output-gelf" |
232 |
+ elog |
233 |
+ |
234 |
+ elog "Reinstalling self installed plugins (installed via eselect module):" |
235 |
+ eselect logstash-plugin reinstall |
236 |
+ |
237 |
+ elog |
238 |
+ elog "Sample configuration:" |
239 |
+ elog "${EROOT%/}/usr/share/${MY_PN}" |
240 |
+ elog |
241 |
+ elog "The default pipeline configuration expects the configuration(s) to be found in:" |
242 |
+ elog "${EROOT%/}/etc/logstash/conf.d/*.conf" |
243 |
+} |