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 8B80E15838C for ; Sat, 20 Jan 2024 12:51:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 60E33E29DB; Sat, 20 Jan 2024 12:51:06 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 40F8EE29DB for ; Sat, 20 Jan 2024 12:51:06 +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 36F243431F3 for ; Sat, 20 Jan 2024 12:51:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7875814BD for ; Sat, 20 Jan 2024 12:51:03 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1705754749.6a2f7fbca4b22a63469a6b336c4992c3df33d1df.sam@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.11.3.ebuild X-VCS-Directories: app-misc/elasticsearch/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 6a2f7fbca4b22a63469a6b336c4992c3df33d1df X-VCS-Branch: master Date: Sat, 20 Jan 2024 12:51:03 +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: 4bbf53b7-bbc1-486a-ad22-177c83308740 X-Archives-Hash: 0e2cde5b5abf6ae68fca835eb60acf87 commit: 6a2f7fbca4b22a63469a6b336c4992c3df33d1df Author: Matt Jolly footclan ninja> AuthorDate: Mon Dec 18 23:08:54 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sat Jan 20 12:45:49 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a2f7fbc app-misc/elasticsearch: add 8.11.3 Signed-off-by: Matt Jolly footclan.ninja> Closes: https://github.com/gentoo/gentoo/pull/34355 Signed-off-by: Sam James gentoo.org> app-misc/elasticsearch/Manifest | 1 + app-misc/elasticsearch/elasticsearch-8.11.3.ebuild | 102 +++++++++++++++++++++ 2 files changed, 103 insertions(+) diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest index 1430238132a0..d625a17acdfd 100644 --- a/app-misc/elasticsearch/Manifest +++ b/app-misc/elasticsearch/Manifest @@ -2,3 +2,4 @@ DIST elasticsearch-7.17.10-no-jdk-linux-x86_64.tar.gz 167971427 BLAKE2B 867f89a3 DIST elasticsearch-7.17.12-no-jdk-linux-x86_64.tar.gz 168734453 BLAKE2B b99f4df4da2a3fd1e1ecbc126148e9e2f95111a1d34bc8b6a3cc8960c33937230058cdacfd0b3e56a50db1062b5aca87f1afd9055929ac39b660b5e3715f4fce SHA512 5b6c7614c2629fdfa6c9fe9866518cd38abad0244bf7c56d8fba3894bd0493403ded0f581783deded85287cf1e97b18f45f1ffb182d3dc5ca9c96471276d64d1 DIST elasticsearch-7.17.9-no-jdk-linux-x86_64.tar.gz 167832902 BLAKE2B 9d0134fe397a5153da4936b5ac083c677a676d1a208f65a85c2c8db82cf0588d1180aeb039ed28c13161ff8fcf5bc11b0fc099f9f21d6da08e50fe0bb7f83565 SHA512 e2c6094377ed2ada0650864b7c30386467b920770b93e6f19d1448635f7f2024fbaebd619ba683ed4c1b5dc8e67f2396183d81598a5e610ca2879ea3cd8dba32 DIST elasticsearch-8.11.1-linux-x86_64.tar.gz 630398135 BLAKE2B 5118f995f3b53242898770ea2a0a8b2c3c23fa3a117453d505685903b7e00e44f081d7454f4198baa2e36f265e9c565cf3c41ffc04d2ffd214ac30dc6398ff5b SHA512 3d11f96a158e12d0a376867355f2ee1bd76b00a8b5e1aff97cac026631892544ccabeb8f2422e0347f8222b85784a98d1a893615547981f47403116baf2070ef +DIST elasticsearch-8.11.3-linux-x86_64.tar.gz 630500349 BLAKE2B ab10c0db6a9df6352a33844c7dbee9f45bc93257904a5d0a0966352d4755f867fafad6858e7765ca88070806b553c46a7df5206078a66121a568921bdbe0d801 SHA512 63c724acbb756ebe8ad2c9d965a2828e1a5e08d215652ba8c876218a2beb1702c204e9199cf362514bcd3230bcb133e0449bb4da3473aac5008d35fa7a86c832 diff --git a/app-misc/elasticsearch/elasticsearch-8.11.3.ebuild b/app-misc/elasticsearch/elasticsearch-8.11.3.ebuild new file mode 100644 index 000000000000..bee839a3a00d --- /dev/null +++ b/app-misc/elasticsearch/elasticsearch-8.11.3.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2023 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_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/:${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" +}