From d3419aa304ff2564036398be5e8ed4bdeaeaa007 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 20 Jan 2024 20:08:51 +0000 Subject: gentoo auto-resync : 20:01:2024 - 20:08:51 --- app-misc/elasticsearch/Manifest | 10 +- .../elasticsearch/elasticsearch-7.17.10-r1.ebuild | 82 ----------------- .../elasticsearch/elasticsearch-7.17.12-r1.ebuild | 82 ----------------- .../elasticsearch/elasticsearch-7.17.16.ebuild | 82 +++++++++++++++++ .../elasticsearch/elasticsearch-7.17.9-r1.ebuild | 82 ----------------- app-misc/elasticsearch/elasticsearch-8.11.3.ebuild | 102 +++++++++++++++++++++ 6 files changed, 188 insertions(+), 252 deletions(-) delete mode 100644 app-misc/elasticsearch/elasticsearch-7.17.10-r1.ebuild delete mode 100644 app-misc/elasticsearch/elasticsearch-7.17.12-r1.ebuild create mode 100644 app-misc/elasticsearch/elasticsearch-7.17.16.ebuild delete mode 100644 app-misc/elasticsearch/elasticsearch-7.17.9-r1.ebuild create mode 100644 app-misc/elasticsearch/elasticsearch-8.11.3.ebuild (limited to 'app-misc/elasticsearch') diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest index 9fe4d7cb504a..f80d541bdb26 100644 --- a/app-misc/elasticsearch/Manifest +++ b/app-misc/elasticsearch/Manifest @@ -8,12 +8,10 @@ AUX elasticsearch.service.4 1815 BLAKE2B 59fece95b40d45222c1c49aaae0ab3091e2a2d7 AUX elasticsearch.service.conf 235 BLAKE2B 23ada111be21dff12323edbe981883cb1ed275b6c7a9f55e77fdcec1919d374818683403a2a7a7c2c2839db2b8afcd66f7667d5080ecb52cade853a400f972a6 SHA512 b300dbc1b3c341ebbcac68385c651133427f342dc0351501b47730b392cc176b7b8dc53877affc6ab384d2834d246a3d0c63b6015dddf2c90d4bcf41cee9968c AUX elasticsearch.sysctl.d 24 BLAKE2B 4012fbdbc98a8b28df11aed33cb82c113790c44721eae1d69e19c595bfbf329618b9cb67be9528f1994c546233cffd31b20eee39edc142bc86f7a7cf5e08903e SHA512 9f3d8238edff6704bea06b6535ee8915f4a3c9bdc8389d9d4943bcfa49161b61f9a1ca49dbcc415580438f4396fbc3d58eef301554f9426287606a755ada715c AUX elasticsearch.tmpfiles.d 56 BLAKE2B 0c28c612fadfdd86321df797527399fa5073a7350de95ec2b32dfbe51cbf52fe5dcf68ebd4e3fba6cccba1cf252a16dee3b701c4c6692121745c41665cf3c972 SHA512 5cc722abcaae68afffde96e38b2c9572faf898178d3c291c945fe49fbf977e319322b99fb6fb5bf49cfb04e86f071dde0db621849288f712a56571b13af9a11a -DIST elasticsearch-7.17.10-no-jdk-linux-x86_64.tar.gz 167971427 BLAKE2B 867f89a3a62d4dab813f9d1ae822dcbfb33b28fe945dd80693555c539b537ce70479c928820d5c4b65983ff9e58ff7d9e84c7320a462519d5bd4fae736ae0543 SHA512 9997a8ee7394db302ae4bc4b3cf644a29fb6a082c5a4e7700dce5f3783818363baf929a667a17e52a27c732d352c339bfeb4e8e7240385911ad096146a75f559 -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-7.17.16-no-jdk-linux-x86_64.tar.gz 168795535 BLAKE2B 642ae6f07db953e7fa783dcd63c6dcebab61e85ea600bede09e9596bf9dee2d71c43e5c28b80bd4c091d792ed3a95d10cc75ffb1074ad4b3cfceb081ed25027f SHA512 3755373f5068a08e4619b4e922bc2d3d97d41791dbf5aa84564574fc84abee9c567b16095cf0e11d48910627e3c183ff1193bf2d5ade59891bea2b3f994aa7df DIST elasticsearch-8.11.1-linux-x86_64.tar.gz 630398135 BLAKE2B 5118f995f3b53242898770ea2a0a8b2c3c23fa3a117453d505685903b7e00e44f081d7454f4198baa2e36f265e9c565cf3c41ffc04d2ffd214ac30dc6398ff5b SHA512 3d11f96a158e12d0a376867355f2ee1bd76b00a8b5e1aff97cac026631892544ccabeb8f2422e0347f8222b85784a98d1a893615547981f47403116baf2070ef -EBUILD elasticsearch-7.17.10-r1.ebuild 2374 BLAKE2B d7162b56bd8a16de19772eb0c6458e061f81ed6a0a1d28f271c645d6c4aa196bbfd86c1d322f8e50ac88ccb81df5f23c94c8d472294a25cf8a2b37dd637bfd3e SHA512 0c6bf900b2e2dc231522a4c54ec583e9c03f98f208b45e6fbfe192db41a859bf86accf807e2cf43a51b7cac73ae341b726d2e13ccab413c6e01563502a6075b6 -EBUILD elasticsearch-7.17.12-r1.ebuild 2374 BLAKE2B d7162b56bd8a16de19772eb0c6458e061f81ed6a0a1d28f271c645d6c4aa196bbfd86c1d322f8e50ac88ccb81df5f23c94c8d472294a25cf8a2b37dd637bfd3e SHA512 0c6bf900b2e2dc231522a4c54ec583e9c03f98f208b45e6fbfe192db41a859bf86accf807e2cf43a51b7cac73ae341b726d2e13ccab413c6e01563502a6075b6 -EBUILD elasticsearch-7.17.9-r1.ebuild 2374 BLAKE2B d7162b56bd8a16de19772eb0c6458e061f81ed6a0a1d28f271c645d6c4aa196bbfd86c1d322f8e50ac88ccb81df5f23c94c8d472294a25cf8a2b37dd637bfd3e SHA512 0c6bf900b2e2dc231522a4c54ec583e9c03f98f208b45e6fbfe192db41a859bf86accf807e2cf43a51b7cac73ae341b726d2e13ccab413c6e01563502a6075b6 +DIST elasticsearch-8.11.3-linux-x86_64.tar.gz 630500349 BLAKE2B ab10c0db6a9df6352a33844c7dbee9f45bc93257904a5d0a0966352d4755f867fafad6858e7765ca88070806b553c46a7df5206078a66121a568921bdbe0d801 SHA512 63c724acbb756ebe8ad2c9d965a2828e1a5e08d215652ba8c876218a2beb1702c204e9199cf362514bcd3230bcb133e0449bb4da3473aac5008d35fa7a86c832 +EBUILD elasticsearch-7.17.16.ebuild 2374 BLAKE2B b8e8a2cfc8eb77cfa591ed73795bd923f12addbb101e2df852ee10fbe2ef1b3e74280e76fd13e03117b5dcecfce91b22b897839d014a22044b1a456413e6e878 SHA512 4f5fc0ada22ffad450a778bbbf248721f2fb52b8b9eaaa1cf44da897e65ee110a7eb4ea3cde3b625c9921c96a85729f0bc9994231a0df023f0e29b1b9f48eb74 EBUILD elasticsearch-8.11.1.ebuild 3322 BLAKE2B 492164f422e2191ab812e604f0b2fd4631c75762438e58eceec379c4ac6a4211babe99c794fe93be009fe2abd5b8313ffce0337cf7eec48faa7a9ff4c8fb80aa SHA512 bb19bc22d523c3fb9e39f38a6239dd09fdfc4be3c3294867aa73a3ddd1edc71273df2dd2458a3919448fc108e1657820300ec9c8b1329d60fa4f60c9e4112795 +EBUILD elasticsearch-8.11.3.ebuild 3322 BLAKE2B 492164f422e2191ab812e604f0b2fd4631c75762438e58eceec379c4ac6a4211babe99c794fe93be009fe2abd5b8313ffce0337cf7eec48faa7a9ff4c8fb80aa SHA512 bb19bc22d523c3fb9e39f38a6239dd09fdfc4be3c3294867aa73a3ddd1edc71273df2dd2458a3919448fc108e1657820300ec9c8b1329d60fa4f60c9e4112795 MISC metadata.xml 524 BLAKE2B 01fd6cd3b19c1e78ebad3d66fdfd58a5172c8e840799de41973dfb07afbad5cd5f574e7b1edff25bb64a828d2fb51169b741a453c53c9cd3c29347b0f9ab4b80 SHA512 5ef257de69e2a3bb06bc9a852957d8767ac9147579947b6a4eaf68a6a314cb1eb49e611a729f01a3b89e3271de377d3ab25276831b9a5d755a8bca7390fd6223 diff --git a/app-misc/elasticsearch/elasticsearch-7.17.10-r1.ebuild b/app-misc/elasticsearch/elasticsearch-7.17.10-r1.ebuild deleted file mode 100644 index a11fb8cefcf8..000000000000 --- a/app-misc/elasticsearch/elasticsearch-7.17.10-r1.ebuild +++ /dev/null @@ -1,82 +0,0 @@ -# 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}-no-jdk-linux-x86_64.tar.gz" -LICENSE="Apache-2.0 BSD-2 Elastic-2.0 LGPL-3 MIT public-domain" -SLOT="0/7" -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} - - insinto /etc/sysctl.d - newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf - - newconfd "${FILESDIR}/${PN}.conf.4" ${PN} - newinitd "${FILESDIR}/${PN}.init.9" ${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/elasticsearch-7.17.12-r1.ebuild b/app-misc/elasticsearch/elasticsearch-7.17.12-r1.ebuild deleted file mode 100644 index a11fb8cefcf8..000000000000 --- a/app-misc/elasticsearch/elasticsearch-7.17.12-r1.ebuild +++ /dev/null @@ -1,82 +0,0 @@ -# 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}-no-jdk-linux-x86_64.tar.gz" -LICENSE="Apache-2.0 BSD-2 Elastic-2.0 LGPL-3 MIT public-domain" -SLOT="0/7" -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} - - insinto /etc/sysctl.d - newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf - - newconfd "${FILESDIR}/${PN}.conf.4" ${PN} - newinitd "${FILESDIR}/${PN}.init.9" ${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/elasticsearch-7.17.16.ebuild b/app-misc/elasticsearch/elasticsearch-7.17.16.ebuild new file mode 100644 index 000000000000..d8370e7f9001 --- /dev/null +++ b/app-misc/elasticsearch/elasticsearch-7.17.16.ebuild @@ -0,0 +1,82 @@ +# 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}-no-jdk-linux-x86_64.tar.gz" +LICENSE="Apache-2.0 BSD-2 Elastic-2.0 LGPL-3 MIT public-domain" +SLOT="0/7" +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} + + insinto /etc/sysctl.d + newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf + + newconfd "${FILESDIR}/${PN}.conf.4" ${PN} + newinitd "${FILESDIR}/${PN}.init.9" ${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/elasticsearch-7.17.9-r1.ebuild b/app-misc/elasticsearch/elasticsearch-7.17.9-r1.ebuild deleted file mode 100644 index a11fb8cefcf8..000000000000 --- a/app-misc/elasticsearch/elasticsearch-7.17.9-r1.ebuild +++ /dev/null @@ -1,82 +0,0 @@ -# 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}-no-jdk-linux-x86_64.tar.gz" -LICENSE="Apache-2.0 BSD-2 Elastic-2.0 LGPL-3 MIT public-domain" -SLOT="0/7" -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} - - insinto /etc/sysctl.d - newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf - - newconfd "${FILESDIR}/${PN}.conf.4" ${PN} - newinitd "${FILESDIR}/${PN}.init.9" ${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/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" +} -- cgit v1.2.3