From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3ACD01581C1 for ; Sun, 14 Jul 2024 11:15:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E4734E2A4F; Sun, 14 Jul 2024 11:15:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C9935E2A4C for ; Sun, 14 Jul 2024 11:15:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DBA1F335DC3 for ; Sun, 14 Jul 2024 11:15:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id ED5611D13 for ; Sun, 14 Jul 2024 11:15:40 +0000 (UTC) From: "Matt Jolly" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Jolly" Message-ID: <1720955661.c9cdf7137c765b8a8fd3c1445094b6b5ef7dca2c.kangie@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/elasticsearch/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-misc/elasticsearch/Manifest app-misc/elasticsearch/elasticsearch-8.14.3.ebuild X-VCS-Directories: app-misc/elasticsearch/ X-VCS-Committer: kangie X-VCS-Committer-Name: Matt Jolly X-VCS-Revision: c9cdf7137c765b8a8fd3c1445094b6b5ef7dca2c X-VCS-Branch: master Date: Sun, 14 Jul 2024 11:15:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2525378d-bb5c-4b8c-a304-af78f171a61c X-Archives-Hash: 305a3e436ac3c95ffbaa994eaf1c7d6f commit: c9cdf7137c765b8a8fd3c1445094b6b5ef7dca2c Author: Matt Jolly gentoo org> AuthorDate: Sun Jul 14 10:46:07 2024 +0000 Commit: Matt Jolly gentoo org> CommitDate: Sun Jul 14 11:14:21 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9cdf713 app-misc/elasticsearch: add 8.14.3 Signed-off-by: Matt Jolly gentoo.org> app-misc/elasticsearch/Manifest | 1 + app-misc/elasticsearch/elasticsearch-8.14.3.ebuild | 109 +++++++++++++++++++++ 2 files changed, 110 insertions(+) diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest index c86f289b72e4..cf26d9828a15 100644 --- a/app-misc/elasticsearch/Manifest +++ b/app-misc/elasticsearch/Manifest @@ -1,2 +1,3 @@ DIST elasticsearch-7.17.16-no-jdk-linux-x86_64.tar.gz 168795535 BLAKE2B 642ae6f07db953e7fa783dcd63c6dcebab61e85ea600bede09e9596bf9dee2d71c43e5c28b80bd4c091d792ed3a95d10cc75ffb1074ad4b3cfceb081ed25027f SHA512 3755373f5068a08e4619b4e922bc2d3d97d41791dbf5aa84564574fc84abee9c567b16095cf0e11d48910627e3c183ff1193bf2d5ade59891bea2b3f994aa7df DIST elasticsearch-8.14.1-linux-x86_64.tar.gz 588486610 BLAKE2B 6005509b9cef7a07e455a394bb41fd0ae970b7249e4b328d55a923f8b529779ceb350580ccd6f8be82bdbc64de6ec1103f28e34b4836f4f2c8ef767c1276338f SHA512 31ed9fe9e28bb778c1042df8dc4183b3044e250d5ee5d760c4e5f1fe5c82e52e2882ed02824c454a64fefbaa10f9212bde9b6b4faa278e2cb5dc64b57960da00 +DIST elasticsearch-8.14.3-linux-x86_64.tar.gz 588481989 BLAKE2B 6c85d0ff9a7920a085adcf594d649bddbac1289a30607500e26c410c22c36ff61c389576c77079bcaf0af4ef035bfbf60b1742e694d499c99f7a93b82129a850 SHA512 5c9df84b225e4a80d6f86d84e4f9afaa23fd51c0f62827d085957447057361db3c3adc485eaec18f6c98615739babf2e5c7c4cc2a7a6351c79f384150c293391 diff --git a/app-misc/elasticsearch/elasticsearch-8.14.3.ebuild b/app-misc/elasticsearch/elasticsearch-8.14.3.ebuild new file mode 100644 index 000000000000..f024f4b1ce68 --- /dev/null +++ b/app-misc/elasticsearch/elasticsearch-8.14.3.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2024 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/8" +KEYWORDS="~amd64" + +DEPEND="acct-group/elasticsearch + acct-user/elasticsearch" +RDEPEND="acct-group/elasticsearch + acct-user/elasticsearch + sys-libs/zlib + virtual/jre:17" + +QA_FLAGS_IGNORED="usr/share/elasticsearch/lib/platform/linux-x64/*.so" +QA_PREBUILT=" + usr/share/elasticsearch/lib/platform/linux-x64/*.so + usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/\(bin\|lib\)/.* +" +QA_PRESTRIPPED=" + usr/share/elasticsearch/lib/platform/linux-x64/*.so + 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/:${EPREFIX}/var/log/${PN}/:g" config/jvm.options || die "Unable to set Elasticsearch log location" + # elasticsearch-env sets the envvar for the config location if not specified elsewhere; + # certain utilities try and source this. Although we patch ES_JAVA_HOME for Gentoo slightly earlier, + # it's easier to respect EPREFIX for the config location using sed. + sed -i "s:ES_PATH_CONF=\"\$ES_HOME\"/config:ES_PATH_CONF=\"${EPREFIX}/etc/${PN}\":" bin/elasticsearch-env \ + || die "Unable to set Elasticsearch config directory" + 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 + local KEEPFILE + KEEPFILE=$(find "${EROOT}/usr/share/${PN}/plugins/" -type f -name '.keep*') + rm "${KEEPFILE}" || 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" +}