1 |
commit: b2607c41a5019e39fc72e266de264088c1b96292 |
2 |
Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Jun 27 12:22:50 2017 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 27 13:27:43 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2607c41 |
7 |
|
8 |
app-misc/elasticsearch: version bump to 5.4.2, drop old and cleanup. |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/4997 |
12 |
|
13 |
app-misc/elasticsearch/Manifest | 3 +- |
14 |
app-misc/elasticsearch/elasticsearch-2.4.4.ebuild | 79 ---------------- |
15 |
app-misc/elasticsearch/elasticsearch-5.1.2.ebuild | 6 +- |
16 |
app-misc/elasticsearch/elasticsearch-5.2.2.ebuild | 6 +- |
17 |
app-misc/elasticsearch/elasticsearch-5.3.3.ebuild | 6 +- |
18 |
...rch-5.4.1.ebuild => elasticsearch-5.4.2.ebuild} | 6 +- |
19 |
.../{elasticsearch.conf3 => elasticsearch.conf} | 0 |
20 |
app-misc/elasticsearch/files/elasticsearch.conf2 | 67 -------------- |
21 |
.../{elasticsearch.init8 => elasticsearch.init} | 0 |
22 |
app-misc/elasticsearch/files/elasticsearch.init6 | 103 --------------------- |
23 |
app-misc/elasticsearch/files/elasticsearch.init7 | 95 ------------------- |
24 |
...lasticsearch.service6 => elasticsearch.service} | 0 |
25 |
.../elasticsearch/files/elasticsearch.service5 | 53 ----------- |
26 |
13 files changed, 13 insertions(+), 411 deletions(-) |
27 |
|
28 |
diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest |
29 |
index 8ba7fddf6fb..c9dd0a1c5c8 100644 |
30 |
--- a/app-misc/elasticsearch/Manifest |
31 |
+++ b/app-misc/elasticsearch/Manifest |
32 |
@@ -1,5 +1,4 @@ |
33 |
-DIST elasticsearch-2.4.4.tar.gz 27343272 SHA256 981092e6ca65ba5560b8b97a74e5ed0eb2236e9128efdb85bb652cec340158e2 SHA512 899a4d2fc64548bcd488ece223f5f189dfb191eceb36390c4b9d8d0d90ef9d2cb67ada475223b9b2e0bd0fb521a4ab978bc7f60781195927e36d027925338c14 WHIRLPOOL 1a90bb8c923a9eab6cc4390b3daaa44cd85d5c1a3a1a5ef7d274050eb25b061a11a91b0f57ebe9f3cb27aafee3267af8f63ca87837f79d622ff362fbc5b6ae1a |
34 |
DIST elasticsearch-5.1.2.tar.gz 33299777 SHA256 74d752f9a8b46898d306ad169b72f328e17215c0909149e156a576089ef11c42 SHA512 1867626e8a87f11ed109e1325fd1d16c9e0af06ebe6a30c78ea679ab533ab377f5da8ea55af6871be33af226f02187a2aadd77e5e23c097dd24055be21e9d691 WHIRLPOOL 2e9df71c915343e2cc8ad82c59b877f41f5e093cbeba21f471c32cb51a195eccc6223bc48da48bb4af2e6bea9f2539f2e93b866963148f4ca2940ba4466e614e |
35 |
DIST elasticsearch-5.2.2.tar.gz 33799732 SHA256 cf88930695794a8949342d386f028548bd10b26ecc8c4b422a94ea674faf8ac9 SHA512 670f8aa81a34191a13cc8c608a9dc7bec60c63bbed8fdb9bc0619585d644867576a7677eb0f14b4e4d064e59def186d4b431930bf79b54bcbf59a29b0b327e85 WHIRLPOOL 4ec1f3b5ed15b9f22d27512ea784ffe9e32e00808fec89418860955d2f4759d045775e18c0a61693da47f39de9f235de954eada231fbd6de5fbfd17f552e8452 |
36 |
DIST elasticsearch-5.3.3.tar.gz 33701608 SHA256 c7e23fddd74d66207b01dea777597c9d04c242973e1ac61aec0f13b716ebed1d SHA512 36fc00081af5555ceb0c0c6e8300c184d40e7176e084d899f2bfaafc3a36c6ba0f457c4bccde95a282d441fa26d84aba4ee1b8ef634831ffdef2f14feb725daa WHIRLPOOL ce641c9cb2071661a221f95fe38018ae2108ffdd855c70aafba4286da369cde461ff39afc674d650ca33925c350592d82e170b2e937e73e949279ca49850a325 |
37 |
-DIST elasticsearch-5.4.1.tar.gz 33321278 SHA256 09d6422bd33b82f065760cd49a31f2fec504f2a5255e497c81050fd3dceec485 SHA512 6b88c1f93516aea57af462ced95fd32f3b2639c919fbb00348f4ea12849ce88521e095d9a4c7d96a09b420ac4ed07c7ad6fc9c54c0f2fa1f9f8fa4ec36071cb3 WHIRLPOOL 4725922bb7bb3300f6ca13533beac07e4aeab3b3d44f7013bae53449c45da510bb123a8eebce8b6eed5e5ecdf5f0b4b93cdafd9d7f654fcf341fcd175936ef64 |
38 |
+DIST elasticsearch-5.4.2.tar.gz 33322090 SHA256 0206124d101a293b34b19cebee83fbf0e2a540f5214aabf133cde0719b896150 SHA512 cbeacdc9f6b391cea753a656f190f37db8130bcce3210356b63a0e27964aff6c079a3650f94242c6b98b0a87f58f6748fed02eb1f3a70495e9d6ccd09d138b7d WHIRLPOOL a7f1780934626230bcc48bcf8777bd29fc2dd548d234433414f6e4e33853c0362cc5be6273c8916b692d16636f1be39be0d8ccb8fad91d6e532905ad491af8ad |
39 |
|
40 |
diff --git a/app-misc/elasticsearch/elasticsearch-2.4.4.ebuild b/app-misc/elasticsearch/elasticsearch-2.4.4.ebuild |
41 |
deleted file mode 100644 |
42 |
index f3901ac933b..00000000000 |
43 |
--- a/app-misc/elasticsearch/elasticsearch-2.4.4.ebuild |
44 |
+++ /dev/null |
45 |
@@ -1,79 +0,0 @@ |
46 |
-# Copyright 1999-2017 Gentoo Foundation |
47 |
-# Distributed under the terms of the GNU General Public License v2 |
48 |
- |
49 |
-EAPI=6 |
50 |
- |
51 |
-inherit eutils systemd user |
52 |
- |
53 |
-DESCRIPTION="Open Source, Distributed, RESTful, Search Engine" |
54 |
-HOMEPAGE="https://www.elastic.co/products/elasticsearch" |
55 |
-SRC_URI="https://download.elasticsearch.org/${PN}/release/org/${PN}/distribution/tar/${PN}/${PV}/${P}.tar.gz" |
56 |
-LICENSE="Apache-2.0" |
57 |
-SLOT="0" |
58 |
-KEYWORDS="~amd64" |
59 |
- |
60 |
-RESTRICT="strip" |
61 |
- |
62 |
-RDEPEND="|| ( virtual/jre:1.8 virtual/jre:1.7 )" |
63 |
- |
64 |
-pkg_preinst() { |
65 |
- if has_version '<app-misc/elasticsearch-2.3.2'; then |
66 |
- export UPDATE_NOTES=1 |
67 |
- fi |
68 |
-} |
69 |
- |
70 |
-pkg_setup() { |
71 |
- enewgroup ${PN} |
72 |
- enewuser ${PN} -1 /bin/bash /usr/share/${PN} ${PN} |
73 |
-} |
74 |
- |
75 |
-src_prepare() { |
76 |
- rm -rf bin/*.{bat,exe} || die |
77 |
- rm LICENSE.txt || die |
78 |
- |
79 |
- default |
80 |
-} |
81 |
- |
82 |
-src_install() { |
83 |
- keepdir /etc/${PN} |
84 |
- |
85 |
- insinto /etc/${PN} |
86 |
- doins config/* |
87 |
- rm -rf config || die |
88 |
- |
89 |
- insinto /usr/share/${PN} |
90 |
- doins -r ./* |
91 |
- |
92 |
- exeinto /usr/share/${PN}/bin |
93 |
- doexe "${FILESDIR}/elasticsearch-systemd-pre-exec" |
94 |
- |
95 |
- chmod +x "${D}"/usr/share/${PN}/bin/* || die |
96 |
- |
97 |
- keepdir /var/{lib,log}/${PN} |
98 |
- keepdir /usr/share/${PN}/plugins |
99 |
- |
100 |
- systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d" "${PN}.conf" |
101 |
- |
102 |
- insinto /etc/sysctl.d |
103 |
- newins "${FILESDIR}/${PN}.sysctl.d" "${PN}.conf" |
104 |
- |
105 |
- newinitd "${FILESDIR}/${PN}.init6" "${PN}" |
106 |
- newconfd "${FILESDIR}/${PN}.conf2" "${PN}" |
107 |
- systemd_newunit "${FILESDIR}"/${PN}.service5 "${PN}.service" |
108 |
-} |
109 |
- |
110 |
-pkg_postinst() { |
111 |
- elog |
112 |
- elog "You may create multiple instances of ${PN} by" |
113 |
- elog "symlinking the init script:" |
114 |
- elog "ln -sf /etc/init.d/${PN} /etc/init.d/${PN}.instance" |
115 |
- elog |
116 |
- elog "Please make sure you put elasticsearch.yml and logging.yml" |
117 |
- elog "into the configuration directory of the instance:" |
118 |
- elog "/etc/${PN}/instance" |
119 |
- elog |
120 |
- if ! [ -z ${UPDATE_NOTES} ]; then |
121 |
- elog "This update changes some configuration variables. Please review" |
122 |
- elog "${EROOT%/}/etc/conf.d/elasticsearch before restarting your services." |
123 |
- fi |
124 |
-} |
125 |
|
126 |
diff --git a/app-misc/elasticsearch/elasticsearch-5.1.2.ebuild b/app-misc/elasticsearch/elasticsearch-5.1.2.ebuild |
127 |
index 279ff77b886..434ea6d44fa 100644 |
128 |
--- a/app-misc/elasticsearch/elasticsearch-5.1.2.ebuild |
129 |
+++ b/app-misc/elasticsearch/elasticsearch-5.1.2.ebuild |
130 |
@@ -58,9 +58,9 @@ src_install() { |
131 |
insinto /etc/sysctl.d |
132 |
newins "${FILESDIR}/${PN}.sysctl.d" "${PN}.conf" |
133 |
|
134 |
- newinitd "${FILESDIR}/${PN}.init7" "${PN}" |
135 |
- newconfd "${FILESDIR}/${PN}.conf3" "${PN}" |
136 |
- systemd_newunit "${FILESDIR}"/${PN}.service6 "${PN}.service" |
137 |
+ newinitd "${FILESDIR}/${PN}.init" "${PN}" |
138 |
+ newconfd "${FILESDIR}/${PN}.conf" "${PN}" |
139 |
+ systemd_newunit "${FILESDIR}"/${PN}.service "${PN}.service" |
140 |
} |
141 |
|
142 |
pkg_postinst() { |
143 |
|
144 |
diff --git a/app-misc/elasticsearch/elasticsearch-5.2.2.ebuild b/app-misc/elasticsearch/elasticsearch-5.2.2.ebuild |
145 |
index 2ff60df7ea5..707ea90fc6f 100644 |
146 |
--- a/app-misc/elasticsearch/elasticsearch-5.2.2.ebuild |
147 |
+++ b/app-misc/elasticsearch/elasticsearch-5.2.2.ebuild |
148 |
@@ -52,9 +52,9 @@ src_install() { |
149 |
insinto /etc/sysctl.d |
150 |
newins "${FILESDIR}/${PN}.sysctl.d" "${PN}.conf" |
151 |
|
152 |
- newinitd "${FILESDIR}/${PN}.init8" "${PN}" |
153 |
- newconfd "${FILESDIR}/${PN}.conf3" "${PN}" |
154 |
- systemd_newunit "${FILESDIR}"/${PN}.service6 "${PN}.service" |
155 |
+ newinitd "${FILESDIR}/${PN}.init" "${PN}" |
156 |
+ newconfd "${FILESDIR}/${PN}.conf" "${PN}" |
157 |
+ systemd_newunit "${FILESDIR}"/${PN}.service "${PN}.service" |
158 |
} |
159 |
|
160 |
pkg_postinst() { |
161 |
|
162 |
diff --git a/app-misc/elasticsearch/elasticsearch-5.3.3.ebuild b/app-misc/elasticsearch/elasticsearch-5.3.3.ebuild |
163 |
index d1e49f508e0..e19798d3a14 100644 |
164 |
--- a/app-misc/elasticsearch/elasticsearch-5.3.3.ebuild |
165 |
+++ b/app-misc/elasticsearch/elasticsearch-5.3.3.ebuild |
166 |
@@ -50,9 +50,9 @@ src_install() { |
167 |
insinto /etc/sysctl.d |
168 |
newins "${FILESDIR}/${PN}.sysctl.d" "${PN}.conf" |
169 |
|
170 |
- newinitd "${FILESDIR}/${PN}.init8" "${PN}" |
171 |
- newconfd "${FILESDIR}/${PN}.conf3" "${PN}" |
172 |
- systemd_newunit "${FILESDIR}"/${PN}.service6 "${PN}.service" |
173 |
+ newinitd "${FILESDIR}/${PN}.init" "${PN}" |
174 |
+ newconfd "${FILESDIR}/${PN}.conf" "${PN}" |
175 |
+ systemd_newunit "${FILESDIR}"/${PN}.service "${PN}.service" |
176 |
} |
177 |
|
178 |
pkg_postinst() { |
179 |
|
180 |
diff --git a/app-misc/elasticsearch/elasticsearch-5.4.1.ebuild b/app-misc/elasticsearch/elasticsearch-5.4.2.ebuild |
181 |
similarity index 90% |
182 |
rename from app-misc/elasticsearch/elasticsearch-5.4.1.ebuild |
183 |
rename to app-misc/elasticsearch/elasticsearch-5.4.2.ebuild |
184 |
index d1e49f508e0..e19798d3a14 100644 |
185 |
--- a/app-misc/elasticsearch/elasticsearch-5.4.1.ebuild |
186 |
+++ b/app-misc/elasticsearch/elasticsearch-5.4.2.ebuild |
187 |
@@ -50,9 +50,9 @@ src_install() { |
188 |
insinto /etc/sysctl.d |
189 |
newins "${FILESDIR}/${PN}.sysctl.d" "${PN}.conf" |
190 |
|
191 |
- newinitd "${FILESDIR}/${PN}.init8" "${PN}" |
192 |
- newconfd "${FILESDIR}/${PN}.conf3" "${PN}" |
193 |
- systemd_newunit "${FILESDIR}"/${PN}.service6 "${PN}.service" |
194 |
+ newinitd "${FILESDIR}/${PN}.init" "${PN}" |
195 |
+ newconfd "${FILESDIR}/${PN}.conf" "${PN}" |
196 |
+ systemd_newunit "${FILESDIR}"/${PN}.service "${PN}.service" |
197 |
} |
198 |
|
199 |
pkg_postinst() { |
200 |
|
201 |
diff --git a/app-misc/elasticsearch/files/elasticsearch.conf3 b/app-misc/elasticsearch/files/elasticsearch.conf |
202 |
similarity index 100% |
203 |
rename from app-misc/elasticsearch/files/elasticsearch.conf3 |
204 |
rename to app-misc/elasticsearch/files/elasticsearch.conf |
205 |
|
206 |
diff --git a/app-misc/elasticsearch/files/elasticsearch.conf2 b/app-misc/elasticsearch/files/elasticsearch.conf2 |
207 |
deleted file mode 100644 |
208 |
index 053cd18d147..00000000000 |
209 |
--- a/app-misc/elasticsearch/files/elasticsearch.conf2 |
210 |
+++ /dev/null |
211 |
@@ -1,67 +0,0 @@ |
212 |
-################################ |
213 |
-# Elasticsearch |
214 |
-################################ |
215 |
- |
216 |
-# Elasticsearch configuration directory |
217 |
-#CONF_DIR=/etc/elasticsearch |
218 |
- |
219 |
-# Elasticsearch data directory |
220 |
-#DATA_DIR=/var/lib/elasticsearch |
221 |
- |
222 |
-# Elasticsearch logs directory |
223 |
-#LOG_DIR=/var/log/elasticsearch |
224 |
- |
225 |
-# Elasticsearch PID directory |
226 |
-#PID_DIR=/run/elasticsearch |
227 |
- |
228 |
-# Heap size defaults to 256m min, 1g max |
229 |
-# Set ES_HEAP_SIZE to 50% of available RAM, but no more than 31g |
230 |
-#ES_HEAP_SIZE=2g |
231 |
- |
232 |
-# Heap new generation |
233 |
-#ES_HEAP_NEWSIZE= |
234 |
- |
235 |
-# Maximum direct memory |
236 |
-#ES_DIRECT_SIZE= |
237 |
- |
238 |
-# Additional Java OPTS |
239 |
-#ES_JAVA_OPTS= |
240 |
- |
241 |
-# Path to the GC log file |
242 |
-#ES_GC_LOG_FILE=/var/log/elasticsearch/gc.log |
243 |
- |
244 |
-################################ |
245 |
-# Elasticsearch service |
246 |
-################################ |
247 |
- |
248 |
-# When executing the init script, this user will be used to run the elasticsearch service. |
249 |
-# The default value is 'elasticsearch' and is declared in the init.d file. |
250 |
-# Note that this setting is only used by the init script. If changed, make sure that |
251 |
-# the configured user can read and write into the data, work, plugins and log directories. |
252 |
-# For systemd service, the user is usually configured in file /usr/lib/systemd/system/elasticsearch.service |
253 |
-#ES_USER=elasticsearch |
254 |
-#ES_GROUP=elasticsearch |
255 |
- |
256 |
-# The number of seconds to wait before checking if Elasticsearch started successfully as a daemon process |
257 |
-#ES_STARTUP_SLEEP_TIME=5 |
258 |
- |
259 |
-################################ |
260 |
-# System properties |
261 |
-################################ |
262 |
- |
263 |
-# Specifies the maximum file descriptor number that can be opened by this process |
264 |
-# When using Systemd, this setting is ignored and the LimitNOFILE defined in |
265 |
-# /usr/lib/systemd/system/elasticsearch.service takes precedence |
266 |
-#MAX_OPEN_FILES=65535 |
267 |
- |
268 |
-# The maximum number of bytes of memory that may be locked into RAM |
269 |
-# Set to "unlimited" if you use the 'bootstrap.mlockall: true' option |
270 |
-# in elasticsearch.yml (ES_HEAP_SIZE must also be set). |
271 |
-# When using Systemd, the LimitMEMLOCK property must be set |
272 |
-# in /usr/lib/systemd/system/elasticsearch.service |
273 |
-#MAX_LOCKED_MEMORY=unlimited |
274 |
- |
275 |
-# Maximum number of VMA (Virtual Memory Areas) a process can own |
276 |
-# When using Systemd, this setting is ignored and the 'vm.max_map_count' |
277 |
-# property is set at boot time in /usr/lib/sysctl.d/elasticsearch.conf |
278 |
-#MAX_MAP_COUNT=262144 |
279 |
|
280 |
diff --git a/app-misc/elasticsearch/files/elasticsearch.init8 b/app-misc/elasticsearch/files/elasticsearch.init |
281 |
similarity index 100% |
282 |
rename from app-misc/elasticsearch/files/elasticsearch.init8 |
283 |
rename to app-misc/elasticsearch/files/elasticsearch.init |
284 |
|
285 |
diff --git a/app-misc/elasticsearch/files/elasticsearch.init6 b/app-misc/elasticsearch/files/elasticsearch.init6 |
286 |
deleted file mode 100644 |
287 |
index e3252c55c67..00000000000 |
288 |
--- a/app-misc/elasticsearch/files/elasticsearch.init6 |
289 |
+++ /dev/null |
290 |
@@ -1,103 +0,0 @@ |
291 |
-#!/sbin/openrc-run |
292 |
- |
293 |
-name="Elasticsearch" |
294 |
-description="Elasticsearch Server" |
295 |
- |
296 |
-ES_INSTANCE=${SVCNAME#*.} |
297 |
-PID_DIR=${PID_DIR:="/run/elasticsearch"} |
298 |
- |
299 |
-if [ -n "${ES_INSTANCE}" ] && [ ${SVCNAME} != "elasticsearch" ]; then |
300 |
- PIDFILE="${PID_DIR}/elasticsearch.${ES_INSTANCE}.pid" |
301 |
- ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}" |
302 |
- CONF_DIR="/etc/elasticsearch/${ES_INSTANCE}" |
303 |
- LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}" |
304 |
-else |
305 |
- PIDFILE="${PID_DIR}/elasticsearch.pid" |
306 |
- ES_BASE_PATH="/var/lib/elasticsearch/_default" |
307 |
- CONF_DIR="/etc/elasticsearch" |
308 |
- LOG_DIR="/var/log/elasticsearch/_default" |
309 |
-fi |
310 |
- |
311 |
-ES_HOME=${ES_HOME:="/usr/share/elasticsearch"} |
312 |
-ES_USER=${ES_USER:="elasticsearch"} |
313 |
-ES_GROUP=${ES_GROUP:="elasticsearch"} |
314 |
-ES_GC_LOG_FILE=${ES_GC_LOG_FILE:="/dev/null"} |
315 |
-MAX_OPEN_FILES=${MAX_OPEN_FILES:=65535} |
316 |
-MAX_MAP_COUNT=${MAX_MAP_COUNT:=262144} |
317 |
- |
318 |
-DATA_DIR="${ES_BASE_PATH}/data" |
319 |
- |
320 |
-if [ -f "${CONF_DIR}/elasticsearch.in.sh" ]; then |
321 |
- ES_INCLUDE="${CONF_DIR}/elasticsearch.in.sh" |
322 |
-fi |
323 |
- |
324 |
-export ES_INCLUDE |
325 |
-export JAVA_OPTS |
326 |
-export ES_JAVA_OPTS |
327 |
-export ES_HEAP_SIZE |
328 |
-export ES_HEAP_NEWSIZE |
329 |
-export ES_DIRECT_SIZE |
330 |
-export ES_GC_LOG_FILE |
331 |
-export ES_STARTUP_SLEEP_TIME |
332 |
- |
333 |
-server_command="/usr/share/elasticsearch/bin/elasticsearch" |
334 |
-server_args="-d -p ${PIDFILE} --default.path.home=${ES_HOME} --default.path.logs=${LOG_DIR} --default.path.data=${DATA_DIR} --default.path.conf=${CONF_DIR}" |
335 |
- |
336 |
-depend() { |
337 |
- use net |
338 |
-} |
339 |
- |
340 |
-start() { |
341 |
- local conf |
342 |
- local conf_file |
343 |
- for conf in elasticsearch.yml logging.yml; do |
344 |
- conf_file="${CONF_DIR}/${conf}" |
345 |
- if [ ! -f "${conf_file}" ]; then |
346 |
- eerror "${conf_file} must be copied into place" |
347 |
- return 1 |
348 |
- fi |
349 |
- done |
350 |
- |
351 |
- if [ -n "${MAX_LOCKED_MEMORY}" -a -z "${ES_HEAP_SIZE}" ]; then |
352 |
- eerror "MAX_LOCKED_MEMORY is set - ES_HEAP_SIZE must also be set" |
353 |
- return 1 |
354 |
- fi |
355 |
- |
356 |
- if [ -n "${MAX_MAP_COUNT}" -a -f /proc/sys/vm/max_map_count ]; then |
357 |
- sysctl -q -w vm.max_map_count=${MAX_MAP_COUNT} |
358 |
- fi |
359 |
- |
360 |
- ebegin "Starting ${SVCNAME}" |
361 |
- |
362 |
- if [ -n "${MAX_LOCKED_MEMORY}" ]; then |
363 |
- rc_ulimit="${rc_ulimit} -l ${MAX_LOCKED_MEMORY}" |
364 |
- fi |
365 |
- |
366 |
- if [ -n "${MAX_OPEN_FILES}" ]; then |
367 |
- rc_ulimit="${rc_ulimit} -n ${MAX_OPEN_FILES}" |
368 |
- fi |
369 |
- |
370 |
- checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/lib/elasticsearch" |
371 |
- checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/log/elasticsearch" |
372 |
- checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${PID_DIR}" |
373 |
- checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${ES_BASE_PATH}" |
374 |
- checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${LOG_DIR}" |
375 |
- checkpath -d -o root:root -m755 "${CONF_DIR}/scripts" |
376 |
- |
377 |
- start-stop-daemon --start \ |
378 |
- --background \ |
379 |
- --chdir "${ES_HOME}" \ |
380 |
- --user="${ES_USER}" \ |
381 |
- --pidfile="${PIDFILE}" \ |
382 |
- --exec ${server_command} -- ${server_args} |
383 |
- eend $? |
384 |
-} |
385 |
- |
386 |
-stop() { |
387 |
- ebegin "Stopping ${SVCNAME}" |
388 |
- start-stop-daemon --stop \ |
389 |
- --pidfile=${PIDFILE} \ |
390 |
- --user="${ES_USER}" \ |
391 |
- --retry=TERM/20 |
392 |
- eend $? |
393 |
-} |
394 |
|
395 |
diff --git a/app-misc/elasticsearch/files/elasticsearch.init7 b/app-misc/elasticsearch/files/elasticsearch.init7 |
396 |
deleted file mode 100644 |
397 |
index 65072d5f21d..00000000000 |
398 |
--- a/app-misc/elasticsearch/files/elasticsearch.init7 |
399 |
+++ /dev/null |
400 |
@@ -1,95 +0,0 @@ |
401 |
-#!/sbin/openrc-run |
402 |
- |
403 |
-name="Elasticsearch" |
404 |
-description="Elasticsearch Server" |
405 |
- |
406 |
-ES_INSTANCE=${SVCNAME#*.} |
407 |
-PID_DIR=${PID_DIR:="/run/elasticsearch"} |
408 |
- |
409 |
-if [ -n "${ES_INSTANCE}" ] && [ ${SVCNAME} != "elasticsearch" ]; then |
410 |
- PIDFILE="${PID_DIR}/elasticsearch.${ES_INSTANCE}.pid" |
411 |
- ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}" |
412 |
- CONF_DIR="/etc/elasticsearch/${ES_INSTANCE}" |
413 |
- LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}" |
414 |
-else |
415 |
- PIDFILE="${PID_DIR}/elasticsearch.pid" |
416 |
- ES_BASE_PATH="/var/lib/elasticsearch/_default" |
417 |
- CONF_DIR="/etc/elasticsearch" |
418 |
- LOG_DIR="/var/log/elasticsearch/_default" |
419 |
-fi |
420 |
- |
421 |
-ES_HOME=${ES_HOME:="/usr/share/elasticsearch"} |
422 |
-ES_USER=${ES_USER:="elasticsearch"} |
423 |
-ES_GROUP=${ES_GROUP:="elasticsearch"} |
424 |
-ES_STARTUP_SLEEP_TIME=${ES_STARTUP_TIME:=5} |
425 |
-MAX_OPEN_FILES=${MAX_OPEN_FILES:=65536} |
426 |
-MAX_MAP_COUNT=${MAX_MAP_COUNT:=262144} |
427 |
- |
428 |
-DATA_DIR=${DATA_DIR:="${ES_BASE_PATH}/data"} |
429 |
- |
430 |
-if [ -f "${CONF_DIR}/elasticsearch.in.sh" ]; then |
431 |
- ES_INCLUDE="${CONF_DIR}/elasticsearch.in.sh" |
432 |
-fi |
433 |
- |
434 |
-export ES_INCLUDE |
435 |
-export JAVA_HOME |
436 |
-export JAVA_OPTS |
437 |
-export ES_JVM_OPTIONS |
438 |
-export ES_JAVA_OPTS |
439 |
-export ES_STARTUP_SLEEP_TIME |
440 |
- |
441 |
-server_command="/usr/share/elasticsearch/bin/elasticsearch" |
442 |
-server_args="-d -p ${PIDFILE} -Edefault.path.logs=${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR}" |
443 |
- |
444 |
-depend() { |
445 |
- use net |
446 |
-} |
447 |
- |
448 |
-start() { |
449 |
- local conf |
450 |
- local conf_file |
451 |
- for conf in elasticsearch.yml; do |
452 |
- conf_file="${CONF_DIR}/${conf}" |
453 |
- if [ ! -f "${conf_file}" ]; then |
454 |
- eerror "${conf_file} must be copied into place" |
455 |
- return 1 |
456 |
- fi |
457 |
- done |
458 |
- |
459 |
- if [ -n "${MAX_MAP_COUNT}" -a -f /proc/sys/vm/max_map_count ]; then |
460 |
- sysctl -q -w vm.max_map_count=${MAX_MAP_COUNT} |
461 |
- fi |
462 |
- |
463 |
- ebegin "Starting ${SVCNAME}" |
464 |
- |
465 |
- if [ -n "${MAX_LOCKED_MEMORY}" ]; then |
466 |
- rc_ulimit="${rc_ulimit} -l ${MAX_LOCKED_MEMORY}" |
467 |
- fi |
468 |
- |
469 |
- if [ -n "${MAX_OPEN_FILES}" ]; then |
470 |
- rc_ulimit="${rc_ulimit} -n ${MAX_OPEN_FILES}" |
471 |
- fi |
472 |
- |
473 |
- checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/lib/elasticsearch" |
474 |
- checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/log/elasticsearch" |
475 |
- checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${PID_DIR}" |
476 |
- checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${ES_BASE_PATH}" |
477 |
- checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${LOG_DIR}" |
478 |
- |
479 |
- start-stop-daemon --start \ |
480 |
- --background \ |
481 |
- --chdir "${ES_HOME}" \ |
482 |
- --user="${ES_USER}" \ |
483 |
- --pidfile="${PIDFILE}" \ |
484 |
- --exec ${server_command} -- ${server_args} |
485 |
- eend $? |
486 |
-} |
487 |
- |
488 |
-stop() { |
489 |
- ebegin "Stopping ${SVCNAME}" |
490 |
- start-stop-daemon --stop \ |
491 |
- --pidfile=${PIDFILE} \ |
492 |
- --user="${ES_USER}" \ |
493 |
- --retry=TERM/20 |
494 |
- eend $? |
495 |
-} |
496 |
|
497 |
diff --git a/app-misc/elasticsearch/files/elasticsearch.service6 b/app-misc/elasticsearch/files/elasticsearch.service |
498 |
similarity index 100% |
499 |
rename from app-misc/elasticsearch/files/elasticsearch.service6 |
500 |
rename to app-misc/elasticsearch/files/elasticsearch.service |
501 |
|
502 |
diff --git a/app-misc/elasticsearch/files/elasticsearch.service5 b/app-misc/elasticsearch/files/elasticsearch.service5 |
503 |
deleted file mode 100644 |
504 |
index 80ece6480f1..00000000000 |
505 |
--- a/app-misc/elasticsearch/files/elasticsearch.service5 |
506 |
+++ /dev/null |
507 |
@@ -1,53 +0,0 @@ |
508 |
-[Unit] |
509 |
-Description=Elasticsearch |
510 |
-Documentation=http://www.elastic.co |
511 |
-Wants=network.target |
512 |
-After=network.target |
513 |
- |
514 |
-[Service] |
515 |
-Environment=ES_HOME=/usr/share/elasticsearch |
516 |
-Environment=CONF_DIR=/etc/elasticsearch |
517 |
-Environment=DATA_DIR=/var/lib/elasticsearch |
518 |
-Environment=LOG_DIR=/var/log/elasticsearch |
519 |
-Environment=PID_DIR=/run/elasticsearch |
520 |
-EnvironmentFile=-/etc/conf.d/elasticsearch |
521 |
- |
522 |
-WorkingDirectory=/usr/share/elasticsearch |
523 |
- |
524 |
-User=elasticsearch |
525 |
-Group=elasticsearch |
526 |
- |
527 |
-ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec |
528 |
- |
529 |
-ExecStart=/usr/share/elasticsearch/bin/elasticsearch \ |
530 |
- -Des.pidfile=${PID_DIR}/elasticsearch.pid \ |
531 |
- -Des.default.path.home=${ES_HOME} \ |
532 |
- -Des.default.path.logs=${LOG_DIR} \ |
533 |
- -Des.default.path.data=${DATA_DIR} \ |
534 |
- -Des.default.path.conf=${CONF_DIR} |
535 |
- |
536 |
-StandardOutput=journal |
537 |
-StandardError=inherit |
538 |
- |
539 |
-# Specifies the maximum file descriptor number that can be opened by this process |
540 |
-LimitNOFILE=65535 |
541 |
- |
542 |
-# Specifies the maximum number of bytes of memory that may be locked into RAM |
543 |
-# Set to "infinity" if you use the 'bootstrap.mlockall: true' option |
544 |
-# in elasticsearch.yml and 'MAX_LOCKED_MEMORY=unlimited' in /etc/conf.d/elasticsearch |
545 |
-#LimitMEMLOCK=infinity |
546 |
- |
547 |
-# Disable timeout logic and wait until process is stopped |
548 |
-TimeoutStopSec=0 |
549 |
- |
550 |
-# SIGTERM signal is used to stop the Java process |
551 |
-KillSignal=SIGTERM |
552 |
- |
553 |
-# Java process is never killed |
554 |
-SendSIGKILL=no |
555 |
- |
556 |
-# When a JVM receives a SIGTERM signal it exits with code 143 |
557 |
-SuccessExitStatus=143 |
558 |
- |
559 |
-[Install] |
560 |
-WantedBy=multi-user.target |