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 0617E158010 for ; Mon, 20 Feb 2023 23:52:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2B1A3E0B23; Mon, 20 Feb 2023 23:52:26 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 006D7E0B23 for ; Mon, 20 Feb 2023 23:52:25 +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 D1E6A340EBE for ; Mon, 20 Feb 2023 23:52:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 21E87888 for ; Mon, 20 Feb 2023 23:52:23 +0000 (UTC) From: "John Helmert III" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "John Helmert III" Message-ID: <1676937134.a7916854c100fca4b8142677c0f514882404ff12.ajak@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.6.2.ebuild X-VCS-Directories: app-misc/elasticsearch/ X-VCS-Committer: ajak X-VCS-Committer-Name: John Helmert III X-VCS-Revision: a7916854c100fca4b8142677c0f514882404ff12 X-VCS-Branch: master Date: Mon, 20 Feb 2023 23:52:23 +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: acabd451-df48-4dbb-a87a-56a63e1b5248 X-Archives-Hash: 5d00ae0d736059d2f238260b48407568 commit: a7916854c100fca4b8142677c0f514882404ff12 Author: Matt Jolly footclan ninja> AuthorDate: Fri Feb 10 23:11:48 2023 +0000 Commit: John Helmert III gentoo org> CommitDate: Mon Feb 20 23:52:14 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7916854 app-misc/elasticsearch: add 8.6.2 - add ES_PATH_CONF default in src_prepare - respect EPREFIX for log location Signed-off-by: Matt Jolly footclan.ninja> Signed-off-by: John Helmert III gentoo.org> app-misc/elasticsearch/Manifest | 1 + app-misc/elasticsearch/elasticsearch-8.6.2.ebuild | 102 ++++++++++++++++++++++ 2 files changed, 103 insertions(+) diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest index b2e201628269..94ba2d768a68 100644 --- a/app-misc/elasticsearch/Manifest +++ b/app-misc/elasticsearch/Manifest @@ -1,3 +1,4 @@ DIST elasticsearch-7.17.7-no-jdk-linux-x86_64.tar.gz 167491953 BLAKE2B dec416ed84d47f95e72d415f6200b0573ef4adfe833753b87f8a2e927561344ea949a1fe2f51d0c8bbd97463d68734542388051904bc631b5f690ce37540a83f SHA512 9a9c8ad4b31a3d9b8c560bbb97f03dc4809fb4c993dbcf99835847896e35caa46309a50e17e86bb56ed00312fba2f79ed064ab422b968488bd619e294f845c5b DIST elasticsearch-7.17.8-no-jdk-linux-x86_64.tar.gz 167420965 BLAKE2B f0a03372bb42a327c720e4b3d875f867cbc64a6df2874a7c6acf67dc8ace6d660dce4a64117f33a47e3e856b6f7aae31c50f42fca5da4f193beb1ae25401f8d4 SHA512 904e049ba42335fe979f055b586d616f04e269caa16ffe285e8e30df31971aa9739b334d7471e19afd477103b541e8400a91aeecc4df7825d246c361ccdad29b DIST elasticsearch-8.5.2-linux-x86_64.tar.gz 580694330 BLAKE2B 9d8fab39fc413cea59500bf5d4aec080c4fb49e58852af4a7f552d03b7e1f31402286900c680ecdc62553b4662f652f9e6a961a7102f80a2fb8af3e809317ab5 SHA512 c5069264de265b5405d56cc811d7b32278196ca4c1a9326306f449b19af072a9f75f2ceb0b63c2a8dd4803cdf63b484cac5885ef8d9cb1b8d83332128f34a075 +DIST elasticsearch-8.6.2-linux-x86_64.tar.gz 581745209 BLAKE2B c5d76e8fd2b7b28d50a0b81950c5d824f5000d3239efef9c3312e153829f09d98ba1394dceff2f147c29e2cd24be2ea4aaf0e0dc830e51989b87c8c7b48e3b3c SHA512 4c5ea98af53861d6c7f06f855f3bd4f4f52136d8149347e43f633a23ba56d3237f6ff7346bf849090f4e52b28fc21c98df8d9b0f0f845a330834367705cd366a diff --git a/app-misc/elasticsearch/elasticsearch-8.6.2.ebuild b/app-misc/elasticsearch/elasticsearch-8.6.2.ebuild new file mode 100644 index 000000000000..30abfdf800ac --- /dev/null +++ b/app-misc/elasticsearch/elasticsearch-8.6.2.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" +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" +}