summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Mozes <hydrapolic@gmail.com>2018-07-11 15:57:02 +0200
committerManuel RĂ¼ger <mrueg@gentoo.org>2018-07-11 16:31:50 +0200
commitcdfe3b8da43ea8398bb39613ad31b7e5ed62eb37 (patch)
tree5f605049ad76c95dc84f5953b32fc838f8f02aaf /app-misc
parentapp-misc/elasticsearch: bump to 5.6.10 (diff)
downloadgentoo-cdfe3b8da43ea8398bb39613ad31b7e5ed62eb37.tar.gz
gentoo-cdfe3b8da43ea8398bb39613ad31b7e5ed62eb37.tar.bz2
gentoo-cdfe3b8da43ea8398bb39613ad31b7e5ed62eb37.zip
app-misc/elasticsearch: bump to 6.3.1
Closes: https://bugs.gentoo.org/659594 Package-Manager: Portage-2.3.41, Repoman-2.3.9
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/elasticsearch/Manifest1
-rw-r--r--app-misc/elasticsearch/elasticsearch-6.3.1.ebuild72
-rw-r--r--app-misc/elasticsearch/files/elasticsearch.init.467
3 files changed, 140 insertions, 0 deletions
diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest
index 64efcfebf9fd..cfcfe586df53 100644
--- a/app-misc/elasticsearch/Manifest
+++ b/app-misc/elasticsearch/Manifest
@@ -1,3 +1,4 @@
DIST elasticsearch-5.6.10.tar.gz 33796721 BLAKE2B 4e9d1d910a70acf32ca63cec811b711f692f3cf32dcec084a07f92d281eed07c067740bb5c5447055a6d0b6126e55a635edcd08c105dc59985db72bcd031a8a5 SHA512 17bd5710cfc3efa455428a79c74e63aacc9b9481d59a0b0df07ad4e4c25ef32dd41b3dbbde464a2801363b6d428a23eb52cc935640ce86bbc4d8a01dca8a1585
DIST elasticsearch-5.6.9.tar.gz 33794793 BLAKE2B a056443b1f71b3af773b5195147927017456e1c9a6517c549cfe7e4ec70f0ff4ec9363c9ef6376b7b942e82f811cd5927d44eb9f9eb8022a56e54a85b4ba7c46 SHA512 4e61a4c5f79d0439a414f1e9361f855cdb2f79322cf592bad43132605922fb8ded6368b01e05ef6bcbee49911943c2a3b6be5fd6d0900abddfe03c736cca96d6
DIST elasticsearch-6.2.4.tar.gz 29056810 BLAKE2B 121be27ac1db4fa6bbe285161b3f2b2dd889859b50f46b57b68ed43514568c4aa9629b5ca32edcc2328a6e7245256d64901c8acc8b2dd91337f8ca97b87c46e1 SHA512 9e6c0de8ed0d9e27fdd18ef7bada376af5a8680bb7a4f4d805926da456b349cee731ba90328b5eda5f0e62fa3f00f34646bf1c2b6c662d055f4be338d0690941
+DIST elasticsearch-oss-6.3.1.tar.gz 29417012 BLAKE2B 356665cde2f12ae5813d95302398f5fced07c53d25e6e1dc7ad41c8dc8ad42cd3d5bd4ffa6cab24af8088c29800f6ec59a483710272b756af2f76b5967d4b932 SHA512 3df0f7f35e150198f7ff660cf4d90fbd1c2ca587287c6340d427f968711b6390123bfafd09a744c9bdf328d57423bcb75f6e4701ce14a7257388611abea62545
diff --git a/app-misc/elasticsearch/elasticsearch-6.3.1.ebuild b/app-misc/elasticsearch/elasticsearch-6.3.1.ebuild
new file mode 100644
index 000000000000..f3e63754b4a0
--- /dev/null
+++ b/app-misc/elasticsearch/elasticsearch-6.3.1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd user
+
+DESCRIPTION="Open Source, Distributed, RESTful, Search Engine"
+HOMEPAGE="https://www.elastic.co/products/elasticsearch"
+SRC_URI="https://artifacts.elastic.co/downloads/${PN}/${PN}-oss-${PV}.tar.gz"
+LICENSE="Apache-2.0 BSD-2 LGPL-3 MIT public-domain"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="virtual/jre:1.8"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 /bin/bash /usr/share/${PN} ${PN}
+}
+
+src_prepare() {
+ default
+
+ rm -v bin/*.{bat,exe} LICENSE.txt || die
+}
+
+src_install() {
+ keepdir /etc/${PN}
+ keepdir /etc/${PN}/scripts
+
+ insinto /etc/${PN}
+ doins -r config/.
+ rm -rv config || die
+
+ fowners root:${PN} /etc/${PN}
+ fperms 2750 /etc/${PN}
+
+ insinto /usr/share/${PN}
+ doins -r .
+
+ exeinto /usr/share/${PN}/bin
+ doexe "${FILESDIR}/elasticsearch-systemd-pre-exec"
+
+ chmod +x "${ED}"/usr/share/${PN}/bin/* || die
+
+ keepdir /var/{lib,log}/${PN}
+ fowners ${PN}:${PN} /var/{lib,log}/${PN}
+ fperms 0750 /var/{lib,log}/${PN}
+ dodir /usr/share/${PN}/plugins
+
+ insinto /etc/sysctl.d
+ newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf
+
+ newconfd "${FILESDIR}/${PN}.conf.3" ${PN}
+ newinitd "${FILESDIR}/${PN}.init.4" ${PN}
+
+ systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d" ${PN}.conf
+ systemd_newunit "${FILESDIR}"/${PN}.service.2 ${PN}.service
+}
+
+pkg_postinst() {
+ elog
+ elog "You may create multiple instances of ${PN} by"
+ elog "symlinking the init script:"
+ elog "ln -sf /etc/init.d/${PN} /etc/init.d/${PN}.instance"
+ elog
+ elog "Please make sure you put elasticsearch.yml, log4j2.properties and scripts"
+ elog "from /etc/elasticsearch into the configuration directory of the instance:"
+ elog "/etc/${PN}/instance"
+ elog
+}
diff --git a/app-misc/elasticsearch/files/elasticsearch.init.4 b/app-misc/elasticsearch/files/elasticsearch.init.4
new file mode 100644
index 000000000000..ac3027766103
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.init.4
@@ -0,0 +1,67 @@
+#!/sbin/openrc-run
+
+name="Elasticsearch"
+description="Elasticsearch Server"
+
+ES_INSTANCE=${SVCNAME#*.}
+
+if [ -n "${ES_INSTANCE}" ] && [ ${SVCNAME} != "elasticsearch" ]; then
+ ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}"
+ CONF_DIR="/etc/elasticsearch/${ES_INSTANCE}"
+ DEFAULT_LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}"
+else
+ ES_BASE_PATH="/var/lib/elasticsearch/_default"
+ CONF_DIR="/etc/elasticsearch"
+ DEFAULT_LOG_DIR="/var/log/elasticsearch/_default"
+fi
+
+ES_HOME=${ES_HOME:="/usr/share/elasticsearch"}
+ES_USER=${ES_USER:="elasticsearch"}
+ES_GROUP=${ES_GROUP:="elasticsearch"}
+ES_STARTUP_SLEEP_TIME=${ES_STARTUP_TIME:=5}
+MAX_OPEN_FILES=${MAX_OPEN_FILES:=65536}
+MAX_MAP_COUNT=${MAX_MAP_COUNT:=262144}
+
+DATA_DIR=${DATA_DIR:="${ES_BASE_PATH}/data"}
+LOG_DIR=${LOG_DIR:="${DEFAULT_LOG_DIR}"}
+
+if [ -f "${CONF_DIR}/elasticsearch.in.sh" ]; then
+ ES_INCLUDE="${CONF_DIR}/elasticsearch.in.sh"
+fi
+
+export ES_INCLUDE
+export JAVA_HOME
+export JAVA_OPTS
+export ES_JVM_OPTIONS
+export ES_JAVA_OPTS
+export ES_STARTUP_SLEEP_TIME
+export ES_PATH_CONF="${CONF_DIR}"
+
+pidfile="/run/elasticsearch/${RC_SVCNAME}.pid"
+
+command="/usr/share/elasticsearch/bin/elasticsearch"
+command_args="--daemonize --pidfile=${pidfile} -Epath.logs=${LOG_DIR} -Epath.data=${DATA_DIR}"
+command_user="${ES_USER}:${ES_GROUP}"
+required_files="${CONF_DIR}/elasticsearch.yml"
+retry="TERM/30/KILL/30"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ if [ -n "${MAX_MAP_COUNT}" -a -f /proc/sys/vm/max_map_count ]; then
+ sysctl -q -w vm.max_map_count=${MAX_MAP_COUNT}
+ fi
+
+ checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/lib/elasticsearch"
+ checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/log/elasticsearch"
+ checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/run/elasticsearch"
+ checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${ES_BASE_PATH}"
+ checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${LOG_DIR}"
+
+ # fails to start without keystore
+ if [ ! -f "${CONF_DIR}/elasticsearch.keystore" ]; then
+ "${ES_HOME}/bin/elasticsearch-keystore" create
+ fi
+}