commit:     0624951416af65a62e9ee2f831b4b1d9297e6e01
Author:     Matt Jolly <Matt.Jolly <AT> footclan <DOT> ninja>
AuthorDate: Tue Sep 13 10:11:22 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Sep 21 00:04:02 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06249514

app-misc/elasticsearch: add 8.4.1

Signed-off-by: Matt Jolly <Matt.Jolly <AT> footclan.ninja>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-misc/elasticsearch/Manifest                   |  1 +
 app-misc/elasticsearch/elasticsearch-8.4.1.ebuild | 95 +++++++++++++++++++++++
 2 files changed, 96 insertions(+)

diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest
index b2d581edf8d1..13bad67bd576 100644
--- a/app-misc/elasticsearch/Manifest
+++ b/app-misc/elasticsearch/Manifest
@@ -1,2 +1,3 @@
 DIST elasticsearch-7.17.5-no-jdk-linux-x86_64.tar.gz 167410729 BLAKE2B 
c6e68176705a1ae2c72a945b2a2b7542f2cb6ebc2420fb52cf26cafdc3045c6f82a5f707062d48142875bf1fbc4be65e473ed9515d65ec25d5a460cc2af991e9
 SHA512 
d8bc819c9ac5a9035d08e45abf8464275cc2cad7c2f091a3e112100ffbd2605759543e111d9e44c3352f92a08230287c2cba6a91f07ab3d92513682e56b97184
 DIST elasticsearch-8.3.3-linux-x86_64.tar.gz 539315339 BLAKE2B 
be786e3a05eb8399cdd168d71edb901ffb08bc6f8a564aebbb8b578fbd628a142c36b2ced540801a60b4d962c48f6be426ae27a0fd4dfb5a99bb022d4fa271b5
 SHA512 
dca98fc78d55e58cfb48a9abe9276f10d7f104b3a60cc8c6850b093fb12342a7f3f379530476324bf97dc69d68511bb1de97e0aa7bb9aa3e27808dc656305b5f
+DIST elasticsearch-8.4.1-linux-x86_64.tar.gz 566284763 BLAKE2B 
5978c56dbeaaa2421afc8f73576362d9902de16100fb9a40eff8721be21e6c3b4d225c627848e3800ff9f31405671f93da51fa2914d3af36bed96b2bad417574
 SHA512 
030df228fb1fa6b5c80087674c84c2d8ebca3a321bc6f5b92e3c915468381c13a692d95865e2410bb2b02f9e02c1fd37b59182ca474b0d5064d36d16e7749f95

diff --git a/app-misc/elasticsearch/elasticsearch-8.4.1.ebuild 
b/app-misc/elasticsearch/elasticsearch-8.4.1.ebuild
new file mode 100644
index 000000000000..74c42298df8a
--- /dev/null
+++ b/app-misc/elasticsearch/elasticsearch-8.4.1.ebuild
@@ -0,0 +1,95 @@
+# 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}-linux-x86_64.tar.gz";
+
+LICENSE="Apache-2.0 BSD-2 Elastic-2.0 LGPL-3 MIT public-domain"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="acct-group/elasticsearch
+       acct-user/elasticsearch"
+RDEPEND="acct-group/elasticsearch
+       acct-user/elasticsearch
+       sys-libs/zlib
+       virtual/jre:17"
+
+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\)/.*"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-env.patch"
+)
+
+src_prepare() {
+       default
+
+       rm -rf jdk || die
+       sed -i -e "s:logs/:/var/log/${PN}/:g" config/jvm.options || die
+       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 -R root:${PN} /etc/${PN}
+       fperms -R 2750 /etc/${PN}
+
+       insinto /usr/share/${PN}
+       doins -r .
+
+       keepdir /usr/share/${PN}/plugins
+
+       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.8" ${PN}
+
+       systemd_install_serviced "${FILESDIR}/${PN}.service.conf"
+       systemd_newunit "${FILESDIR}"/${PN}.service.4 ${PN}.service
+
+       newtmpfiles "${FILESDIR}"/${PN}.tmpfiles.d ${PN}.conf
+}
+
+pkg_postinst() {
+       # Elasticsearch will choke on our keep file and dodir will not preserve 
the empty dir
+       rm /usr/share/${PN}/plugins/.keep* || die
+       tmpfiles_process /usr/lib/tmpfiles.d/${PN}.conf
+       if ! systemd_is_booted ; then
+               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
+       fi
+       ewarn "Please make sure you have proper permissions on /etc/${PN}"
+       ewarn "prior to keystore generation or you may experience startup 
failures."
+       ewarn "chown root:${PN} /etc/${PN} && chmod 2750 /etc/${PN}"
+       ewarn "chown root:${PN} /etc/${PN}/${PN}.keystore && chmod 0660 
/etc/${PN}/${PN}.keystore"
+}

Reply via email to