summaryrefslogtreecommitdiff
path: root/app-misc/elasticsearch
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/elasticsearch')
-rw-r--r--app-misc/elasticsearch/Manifest3
-rw-r--r--app-misc/elasticsearch/elasticsearch-7.17.7.ebuild82
-rw-r--r--app-misc/elasticsearch/files/elasticsearch.init.971
3 files changed, 156 insertions, 0 deletions
diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest
index 963d1191421e..691a4da277e8 100644
--- a/app-misc/elasticsearch/Manifest
+++ b/app-misc/elasticsearch/Manifest
@@ -2,13 +2,16 @@ AUX elasticsearch-env.patch 976 BLAKE2B f639b40304e2f4ba8c1bd52b86ed0cd6dbda2198
AUX elasticsearch-systemd-pre-exec 369 BLAKE2B 18fae13aa27931cfc3952309ab76847790f4f785d14efa93bb24cfa66b3b0fc655c19a17d5a7a1b431b6c037cf3596a04eed8f650cf51beb1917560e8817bd2d SHA512 fae1d6e4e52df7d0d3111d6d6bbddf12182de931d461669d8784b524e5671ad40fb645dc6a6cf3de0de08f032c0327da8b25d7cbc4c4a49e3e3a7a791c6cfcdd
AUX elasticsearch.conf.4 2199 BLAKE2B 0cc66acdc8ce76c4eba04e5fdb745d740bca2a1941535be054e99c33a208e0229609c0106b7f91c9a9f28c22ae8ebb73951dfe36fe2ca0ae51732f5fa1707a34 SHA512 91af72bf5272ed6152835c5e34408fa9e7245b09864613cd59c08da977d9130dbfe664d6aa6f11eac2ce07ebfdb3599e9f27ff219595f6d515c2c06f11f637bd
AUX elasticsearch.init.8 2150 BLAKE2B 6187331fba1933ddf5fc967d77e818305c6719a838fc6fdac5b821fb2dd659eef3993ca88105b2c30eabf5c2185f3cdae9a58000134c0599a8219ea8933ba532 SHA512 91e7fb2d2eb4a2c85246daa30a28a5eae48972eec5fbae52f16c58ef432c1fabc415e0690052869c70ccc4b6b2a75a228e5aef4b5ee934bc0fb4d00d48303fe3
+AUX elasticsearch.init.9 2219 BLAKE2B 2137ca569b34fb14f152dc9b1542ea76a4eb8d328054d1ee80f95435a8697f0e0ac154984d3b184d21fa693c6f18b71c46ffb69f503d664fe0057bf18eda5c37 SHA512 17e6c905b9d85f50c397ad590cd12be2bbfdb65f92fe836199abcd163198827d682e0bb494d841f78ad041076b5fc3d7710ccd9a951ace62b96ab7a0d98287c5
AUX elasticsearch.service.3 1527 BLAKE2B 7f7bee9019de2814cdce1e4a66932a0a2a915cddce2d5d2bfde2263bf088001ba1dff9bbbc8eaafb4e1d9012176fbeb4964dcd6f25f6e49935bdda90cec52f6d SHA512 adcc3147ce8d52f64fa21e7cb377ba88d4ea32254eaea03c68d45296bac46d7ff084b93469ca9dbabe013bf8bd183a96a219117b68fb91648b595206b60cebbc
AUX elasticsearch.service.4 1815 BLAKE2B 59fece95b40d45222c1c49aaae0ab3091e2a2d7a390c7629cbb69862e71e6c3230d35d6ea7a2730ee699ab3c2218de0e85026396f60df46fc7611048c9600ecf SHA512 bdcd91185dc720042e1c2fee38707b545b03b9e6393c5681fee4937d3fbe0288e124b4fa5de5176dda3baeead31150e15bcc9631f58d8cb50e1c63f27220c120
AUX elasticsearch.service.conf 235 BLAKE2B 23ada111be21dff12323edbe981883cb1ed275b6c7a9f55e77fdcec1919d374818683403a2a7a7c2c2839db2b8afcd66f7667d5080ecb52cade853a400f972a6 SHA512 b300dbc1b3c341ebbcac68385c651133427f342dc0351501b47730b392cc176b7b8dc53877affc6ab384d2834d246a3d0c63b6015dddf2c90d4bcf41cee9968c
AUX elasticsearch.sysctl.d 24 BLAKE2B 4012fbdbc98a8b28df11aed33cb82c113790c44721eae1d69e19c595bfbf329618b9cb67be9528f1994c546233cffd31b20eee39edc142bc86f7a7cf5e08903e SHA512 9f3d8238edff6704bea06b6535ee8915f4a3c9bdc8389d9d4943bcfa49161b61f9a1ca49dbcc415580438f4396fbc3d58eef301554f9426287606a755ada715c
AUX elasticsearch.tmpfiles.d 56 BLAKE2B 0c28c612fadfdd86321df797527399fa5073a7350de95ec2b32dfbe51cbf52fe5dcf68ebd4e3fba6cccba1cf252a16dee3b701c4c6692121745c41665cf3c972 SHA512 5cc722abcaae68afffde96e38b2c9572faf898178d3c291c945fe49fbf977e319322b99fb6fb5bf49cfb04e86f071dde0db621849288f712a56571b13af9a11a
DIST elasticsearch-7.17.5-no-jdk-linux-x86_64.tar.gz 167410729 BLAKE2B c6e68176705a1ae2c72a945b2a2b7542f2cb6ebc2420fb52cf26cafdc3045c6f82a5f707062d48142875bf1fbc4be65e473ed9515d65ec25d5a460cc2af991e9 SHA512 d8bc819c9ac5a9035d08e45abf8464275cc2cad7c2f091a3e112100ffbd2605759543e111d9e44c3352f92a08230287c2cba6a91f07ab3d92513682e56b97184
+DIST elasticsearch-7.17.7-no-jdk-linux-x86_64.tar.gz 167491953 BLAKE2B dec416ed84d47f95e72d415f6200b0573ef4adfe833753b87f8a2e927561344ea949a1fe2f51d0c8bbd97463d68734542388051904bc631b5f690ce37540a83f SHA512 9a9c8ad4b31a3d9b8c560bbb97f03dc4809fb4c993dbcf99835847896e35caa46309a50e17e86bb56ed00312fba2f79ed064ab422b968488bd619e294f845c5b
DIST elasticsearch-8.4.1-linux-x86_64.tar.gz 566284763 BLAKE2B 5978c56dbeaaa2421afc8f73576362d9902de16100fb9a40eff8721be21e6c3b4d225c627848e3800ff9f31405671f93da51fa2914d3af36bed96b2bad417574 SHA512 030df228fb1fa6b5c80087674c84c2d8ebca3a321bc6f5b92e3c915468381c13a692d95865e2410bb2b02f9e02c1fd37b59182ca474b0d5064d36d16e7749f95
EBUILD elasticsearch-7.17.5.ebuild 2404 BLAKE2B b6ec81b233fb31f3fab38aa3aff9ebd05d6c4244e226fb6d7f27a526e3fec59a3ddb51587a358227d2450851512a8fa01c37534b109d1e568b049822d8ae7354 SHA512 697fa490f1092dac9a43006e4a9ac201ae3cbff8eee311cfb90783811ac422d9fdf52be5549695469cd4bdd65aeaa06d79ef21e06b4c4784ed1d9be78c1f7c52
+EBUILD elasticsearch-7.17.7.ebuild 2372 BLAKE2B 1cb10d9196ca3fb7bc8b9c31a1e472e8b301384c313ebefc1eb6e0333faf03066a1717b255acd5f33d2b5e99198ae4161516163f68b4a542ef63a4ab0628f053 SHA512 dfe0bab51ca62b4fd45b129522045c4c6e22c49683bc4146e1ae0065d85473d6416e1deb36b1ac5a9aa294df04c35bb2d9b1918cc8341b37527fabb4589b8e35
EBUILD elasticsearch-8.4.1.ebuild 2766 BLAKE2B 181b5480e23a105d046070c04c5fb4866e67c1edae3bb323d6fcc81d9414d37200486b6aa0927a5b30ccc925a033cd2cd1d1ec65e47d67b140c62a0f9635631b SHA512 2c2d3d1ac4dd199931c0017a38e71414af165726d1dee554703193624c23e28f4aec1e58566a5ca437d88d634241ec451fabc741d036062adc3b40006f47444e
MISC metadata.xml 398 BLAKE2B c0e51fd139e20b21ce5c3eb70594d5a50189499af295f4caf4f1ba3d4d3af3e3ad33e9717330cfaed6db182ba45527416664c99c79411fcec369198cf2dabb20 SHA512 f189a42296460148d1c842bda2a91c97f7d9a9a51051361e364547173651b49377ce4c85c50c628f893fffda8c120680b078cce80e42523728eb5f32d3d9f927
diff --git a/app-misc/elasticsearch/elasticsearch-7.17.7.ebuild b/app-misc/elasticsearch/elasticsearch-7.17.7.ebuild
new file mode 100644
index 000000000000..c9393946bb82
--- /dev/null
+++ b/app-misc/elasticsearch/elasticsearch-7.17.7.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd tmpfiles
+
+DESCRIPTION="Free and Open, Distributed, RESTful Search Engine"
+HOMEPAGE="https://www.elastic.co/elasticsearch/"
+SRC_URI="https://artifacts.elastic.co/downloads/${PN}/${P}-no-jdk-linux-x86_64.tar.gz"
+LICENSE="Apache-2.0 BSD-2 Elastic-2.0 LGPL-3 MIT public-domain"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="acct-group/elasticsearch
+ acct-user/elasticsearch
+ sys-libs/zlib
+ virtual/jre"
+
+QA_PREBUILT="usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/\(bin\|lib\)/.*"
+QA_PRESTRIPPED="usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/\(bin\|lib\)/.*"
+
+src_prepare() {
+ default
+
+ rm LICENSE.txt NOTICE.txt || die
+ rmdir logs || die
+}
+
+src_install() {
+ keepdir /etc/${PN}
+ keepdir /etc/${PN}/scripts
+
+ insinto /etc/${PN}
+ doins -r config/.
+ rm -r 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"
+
+ fperms -R +x /usr/share/${PN}/bin
+ fperms -R +x /usr/share/${PN}/modules/x-pack-ml/platform/linux-x86_64/bin
+
+ keepdir /var/{lib,log}/${PN}
+ fowners ${PN}:${PN} /var/{lib,log}/${PN}
+ fperms 0750 /var/{lib,log}/${PN}
+
+ insinto /etc/sysctl.d
+ newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf
+
+ newconfd "${FILESDIR}/${PN}.conf.4" ${PN}
+ newinitd "${FILESDIR}/${PN}.init.9" ${PN}
+
+ systemd_install_serviced "${FILESDIR}/${PN}.service.conf"
+ systemd_newunit "${FILESDIR}"/${PN}.service.3 ${PN}.service
+
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfiles.d ${PN}.conf
+}
+
+pkg_postinst() {
+ tmpfiles_process /usr/lib/tmpfiles.d/${PN}.conf
+
+ 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/${PN} into the configuration directory of the instance:"
+ elog "/etc/${PN}/instance"
+ elog
+ ewarn "Please make sure you have proper permissions on /etc/${PN}"
+ ewarn "prior to keystore generation or you may experience startup fails."
+ ewarn "chown root:${PN} /etc/${PN} && chmod 2750 /etc/${PN}"
+ ewarn "chown root:${PN} /etc/${PN}/${PN}.keystore && chmod 0660 /etc/${PN}/${PN}.keystore"
+}
diff --git a/app-misc/elasticsearch/files/elasticsearch.init.9 b/app-misc/elasticsearch/files/elasticsearch.init.9
new file mode 100644
index 000000000000..5e4f2a70f41d
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.init.9
@@ -0,0 +1,71 @@
+#!/sbin/openrc-run
+
+name="Elasticsearch"
+description="Elasticsearch Server"
+
+ES_INSTANCE=${RC_SVCNAME#*.}
+
+if [ -n "${ES_INSTANCE}" ] && [ ${RC_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}
+ES_JAVA_HOME=${ES_JAVA_HOME:=$(java-config -g JAVA_HOME)}
+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 ES_JAVA_HOME
+export ES_JAVA_OPTS
+export ES_JVM_OPTIONS
+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="-Epath.logs=${LOG_DIR} -Epath.data=${DATA_DIR}"
+command_args_background="--daemonize --pidfile=${pidfile}"
+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_HOME}/plugins"
+ 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
+ else
+ "${ES_HOME}/bin/elasticsearch-keystore" upgrade
+ fi
+}