commit:     22e925a672f4e15e825df313bb2300274b80e7d1
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Thu Jul  7 14:13:21 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Jul 15 08:38:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22e925a6

app-misc/elasticsearch: bump to 7.17.5

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-misc/elasticsearch/Manifest                    |  1 +
 app-misc/elasticsearch/elasticsearch-7.17.5.ebuild | 83 ++++++++++++++++++++++
 .../elasticsearch/files/elasticsearch.service.3    | 51 +++++++++++++
 3 files changed, 135 insertions(+)

diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest
index a1aced619273..a055ca0c19d4 100644
--- a/app-misc/elasticsearch/Manifest
+++ b/app-misc/elasticsearch/Manifest
@@ -1 +1,2 @@
+DIST elasticsearch-7.17.5-no-jdk-linux-x86_64.tar.gz 167410729 BLAKE2B 
c6e68176705a1ae2c72a945b2a2b7542f2cb6ebc2420fb52cf26cafdc3045c6f82a5f707062d48142875bf1fbc4be65e473ed9515d65ec25d5a460cc2af991e9
 SHA512 
d8bc819c9ac5a9035d08e45abf8464275cc2cad7c2f091a3e112100ffbd2605759543e111d9e44c3352f92a08230287c2cba6a91f07ab3d92513682e56b97184
 DIST elasticsearch-8.2.2-linux-x86_64.tar.gz 526116807 BLAKE2B 
bc30d3532bb62bee88fdfc8e3406d32884add3601363d5bf91f66c110e05241beb6b73cf7a2f8104a843628f4841a313ed5bdf3098030eb5e4567c98b69ac703
 SHA512 
78d1315a47ae9f082297e049320c5a9787aa9fe44cd2967f3ea37ae954ad34aaa29ca7b3210ac96955be2838d0233b7f86a3e0c66d82dda3724753a0c24c78e8

diff --git a/app-misc/elasticsearch/elasticsearch-7.17.5.ebuild 
b/app-misc/elasticsearch/elasticsearch-7.17.5.ebuild
new file mode 100644
index 000000000000..be38b6a483a2
--- /dev/null
+++ b/app-misc/elasticsearch/elasticsearch-7.17.5.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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}
+       dodir /usr/share/${PN}/plugins
+
+       insinto /etc/sysctl.d
+       newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf
+
+       newconfd "${FILESDIR}/${PN}.conf.4" ${PN}
+       newinitd "${FILESDIR}/${PN}.init.8" ${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.service.3 
b/app-misc/elasticsearch/files/elasticsearch.service.3
new file mode 100644
index 000000000000..69d3550e7d98
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.service.3
@@ -0,0 +1,51 @@
+[Unit]
+Description=Elasticsearch
+Documentation=https://www.elastic.co
+Wants=network.target
+After=network.target
+
+[Service]
+Environment=ES_HOME=/usr/share/elasticsearch
+Environment=ES_PATH_CONF=/etc/elasticsearch
+Environment=DATA_DIR=/var/lib/elasticsearch
+Environment=LOG_DIR=/var/log/elasticsearch
+Environment=PID_DIR=/run/elasticsearch
+
+WorkingDirectory=/usr/share/elasticsearch
+
+User=elasticsearch
+Group=elasticsearch
+
+PermissionsStartOnly=true
+ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec
+
+ExecStart=/usr/share/elasticsearch/bin/elasticsearch \
+                                                -p 
${PID_DIR}/elasticsearch.pid \
+                                                -Epath.logs=${LOG_DIR} \
+                                                -Epath.data=${DATA_DIR}
+
+StandardOutput=journal
+StandardError=inherit
+
+# Specifies the maximum file descriptor number that can be opened by this 
process
+LimitNOFILE=65536
+
+# Specifies the maximum number of bytes of memory that may be locked into RAM
+# Set to "infinity" if you use the 'bootstrap.memory_lock: true' option
+# in elasticsearch.yml and 'MAX_LOCKED_MEMORY=unlimited' in 
/etc/conf.d/elasticsearch
+#LimitMEMLOCK=infinity
+
+# Disable timeout logic and wait until process is stopped
+TimeoutStopSec=0
+
+# SIGTERM signal is used to stop the Java process
+KillSignal=SIGTERM
+
+# Java process is never killed
+SendSIGKILL=no
+
+# When a JVM receives a SIGTERM signal it exits with code 143
+SuccessExitStatus=143
+
+[Install]
+WantedBy=multi-user.target

Reply via email to