diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
commit | 0f558761aa2dee1017b4751e4017205e015a9560 (patch) | |
tree | 037df795519468a25d9362b4e95cdaeb84eb1cf9 /app-misc/elasticsearch | |
parent | 752d6256e5204b958b0ef7905675a940b5e9172f (diff) |
gentoo resync : 29.12.2022
Diffstat (limited to 'app-misc/elasticsearch')
-rw-r--r-- | app-misc/elasticsearch/Manifest | 11 | ||||
-rw-r--r-- | app-misc/elasticsearch/elasticsearch-6.8.23.ebuild | 90 | ||||
-rw-r--r-- | app-misc/elasticsearch/elasticsearch-8.2.2.ebuild (renamed from app-misc/elasticsearch/elasticsearch-7.17.3.ebuild) | 50 | ||||
-rw-r--r-- | app-misc/elasticsearch/files/elasticsearch-env.patch | 24 | ||||
-rw-r--r-- | app-misc/elasticsearch/files/elasticsearch.service.4 | 67 | ||||
-rw-r--r-- | app-misc/elasticsearch/metadata.xml | 3 |
6 files changed, 127 insertions, 118 deletions
diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest index f87956a8c844..465b1a107ea3 100644 --- a/app-misc/elasticsearch/Manifest +++ b/app-misc/elasticsearch/Manifest @@ -1,15 +1,14 @@ +AUX elasticsearch-env.patch 976 BLAKE2B f639b40304e2f4ba8c1bd52b86ed0cd6dbda2198c6be73e38685639364951f5e719e16dbc6ecccccaf8495b17863c8b5f8a7cc8185bb6973dd559e93ecd22a7a SHA512 dd6defc471133fa21897976aab7010f060bbdd52fa2d54c1c7c3844998dfa3fedb28e584f0ab6be9abb502f12e9ed10cbb652be16ae77d5106f83c378aa573df AUX elasticsearch-systemd-pre-exec 369 BLAKE2B 18fae13aa27931cfc3952309ab76847790f4f785d14efa93bb24cfa66b3b0fc655c19a17d5a7a1b431b6c037cf3596a04eed8f650cf51beb1917560e8817bd2d SHA512 fae1d6e4e52df7d0d3111d6d6bbddf12182de931d461669d8784b524e5671ad40fb645dc6a6cf3de0de08f032c0327da8b25d7cbc4c4a49e3e3a7a791c6cfcdd AUX elasticsearch.conf.3 2196 BLAKE2B e711aa58eca0df5857fa48a4dc21f5dd144977f3cd0209a58c15868531a108175ecdd21ddc18e1daf1e83c0bbd26da7c00b260698b3ef87c938b6d18928df733 SHA512 36a98d788cff404ccfe0fdff7bbe358750df8db9e5a5f419991b90e257e97331ec93c5f9a84bed57099dd239abb572ef450a191582e7145d8d7517c242707e49 AUX elasticsearch.conf.4 2199 BLAKE2B 0cc66acdc8ce76c4eba04e5fdb745d740bca2a1941535be054e99c33a208e0229609c0106b7f91c9a9f28c22ae8ebb73951dfe36fe2ca0ae51732f5fa1707a34 SHA512 91af72bf5272ed6152835c5e34408fa9e7245b09864613cd59c08da977d9130dbfe664d6aa6f11eac2ce07ebfdb3599e9f27ff219595f6d515c2c06f11f637bd AUX elasticsearch.init.6 2102 BLAKE2B e49581ac65b20feb24711674a2f5f46bc67d65cd8e5128f1d0868a84db36b0067b13ae39ea3f57d0b4c8ebfd91fb3d769088c29dacf8436beb66fe98cea0b03e SHA512 52116a49c9bce9ebe57316f96f3b6eff3a6bd544b930845d5fb9b74fc5f40535a0e50d71f8c7e602fbe8935ec35692b763a5255ad43afac5f7ac8ac00ba2bd30 AUX elasticsearch.init.8 2150 BLAKE2B 6187331fba1933ddf5fc967d77e818305c6719a838fc6fdac5b821fb2dd659eef3993ca88105b2c30eabf5c2185f3cdae9a58000134c0599a8219ea8933ba532 SHA512 91e7fb2d2eb4a2c85246daa30a28a5eae48972eec5fbae52f16c58ef432c1fabc415e0690052869c70ccc4b6b2a75a228e5aef4b5ee934bc0fb4d00d48303fe3 AUX elasticsearch.service.3 1527 BLAKE2B 7f7bee9019de2814cdce1e4a66932a0a2a915cddce2d5d2bfde2263bf088001ba1dff9bbbc8eaafb4e1d9012176fbeb4964dcd6f25f6e49935bdda90cec52f6d SHA512 adcc3147ce8d52f64fa21e7cb377ba88d4ea32254eaea03c68d45296bac46d7ff084b93469ca9dbabe013bf8bd183a96a219117b68fb91648b595206b60cebbc +AUX elasticsearch.service.4 1815 BLAKE2B 59fece95b40d45222c1c49aaae0ab3091e2a2d7a390c7629cbb69862e71e6c3230d35d6ea7a2730ee699ab3c2218de0e85026396f60df46fc7611048c9600ecf SHA512 bdcd91185dc720042e1c2fee38707b545b03b9e6393c5681fee4937d3fbe0288e124b4fa5de5176dda3baeead31150e15bcc9631f58d8cb50e1c63f27220c120 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-6.8.23.tar.gz 149672445 BLAKE2B dd7b080f1496f3a20755c183befae74194eab05b04c6f77679e9dad6067eef5222a4c7ce43d6267f1233a7bf864c6f8b23d5caf52278e1fe5f48f465e6603113 SHA512 73258b400cd194768058105a74ca0e811962ccf81bed8c4d3a824d4e5b97a8178a31150e60602fa1e04c6764b139980eb45ae6f246864702120653b45120b597 -DIST elasticsearch-7.17.3-no-jdk-linux-x86_64.tar.gz 167378547 BLAKE2B 4bacb075e94587351bb4638da15644ed372ec1ad2b72e1c9b84c511e84666f6b79ccc8519ce5fede119e6c134ac500a1209578f18a26fd8566646e870a17f9ba SHA512 f2d5953710adfe31f1e30a0fdf4c091c0493f613a83927ddec4bbc74d2eccb839e1ffa6d44636ad0ad9c07613915847cc7a68fc87e465a8a851c96e023917bf1 -DIST elasticsearch-oss-6.8.23.tar.gz 68573265 BLAKE2B 80366fdc4eaaf45161a36da112397938a82d08d842d82dd5a9311abf63ca20afb93ecc06387c6852bbb1a861306382d6e7c2314e67635b6f2e75cdc183057ad8 SHA512 14dbb2809b06499373c3ec5035d829d62255c2c93103618fbfe3d7d03cecf8847f654e83c78f765f23224126ff18ed713b959857e8ecf435c475b11bcd143d3f -EBUILD elasticsearch-6.8.23.ebuild 2597 BLAKE2B 8ee44e77ee5a1e4fbf5a2b2811c1a0ef57e2b1ac9e6125ae8ee2faf9ee47f86061340af6df3497e36dd012310bf55a3bc2eab315a628c75292749bc6e4fe471d SHA512 f22f587ffb0b3eb01ceb3ee3cc072b433aaeaa6d5462bbee2d7f318bf59109357c2755bd7813ebf2729e5df97c74bc5f65848449bfe8afe75f304d41485cd4c3 -EBUILD elasticsearch-7.17.3.ebuild 2404 BLAKE2B 53442d4b047689457b04aa62696256a4748db73f07791a94a7324eb947e9a14d5d00122b0bacdfd02a38006b19b994a97f391d921b68a19817891d26c233adbe SHA512 f4a9631133a62e6528053a74b0ba5d8199a588e73b69bfc9a5c541c53e326cede24a1ffe44b3a9d8af0056e014c09965b7ecf983b944907de40f9244959ea9fb -MISC metadata.xml 490 BLAKE2B 48bca2017c5b522ba95203316efcb1fa711a0a1689fe75bc3b645f3f305d0671e69747d657e0b561237b472a721edf7cbe51a32919a71b57dc30e86bd4c05655 SHA512 37e637e54f452cd1fcc23a5e1537d53af6a17f3e7d805bb6d091d85e564f9132931ebf9c020580bf9fe81721293d972b03fa47985c04a722570630248ca416c4 +DIST elasticsearch-8.2.2-linux-x86_64.tar.gz 526116807 BLAKE2B bc30d3532bb62bee88fdfc8e3406d32884add3601363d5bf91f66c110e05241beb6b73cf7a2f8104a843628f4841a313ed5bdf3098030eb5e4567c98b69ac703 SHA512 78d1315a47ae9f082297e049320c5a9787aa9fe44cd2967f3ea37ae954ad34aaa29ca7b3210ac96955be2838d0233b7f86a3e0c66d82dda3724753a0c24c78e8 +EBUILD elasticsearch-8.2.2.ebuild 2766 BLAKE2B 181b5480e23a105d046070c04c5fb4866e67c1edae3bb323d6fcc81d9414d37200486b6aa0927a5b30ccc925a033cd2cd1d1ec65e47d67b140c62a0f9635631b SHA512 2c2d3d1ac4dd199931c0017a38e71414af165726d1dee554703193624c23e28f4aec1e58566a5ca437d88d634241ec451fabc741d036062adc3b40006f47444e +MISC metadata.xml 398 BLAKE2B c0e51fd139e20b21ce5c3eb70594d5a50189499af295f4caf4f1ba3d4d3af3e3ad33e9717330cfaed6db182ba45527416664c99c79411fcec369198cf2dabb20 SHA512 f189a42296460148d1c842bda2a91c97f7d9a9a51051361e364547173651b49377ce4c85c50c628f893fffda8c120680b078cce80e42523728eb5f32d3d9f927 diff --git a/app-misc/elasticsearch/elasticsearch-6.8.23.ebuild b/app-misc/elasticsearch/elasticsearch-6.8.23.ebuild deleted file mode 100644 index 5fd5b2ceff2e..000000000000 --- a/app-misc/elasticsearch/elasticsearch-6.8.23.ebuild +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit systemd tmpfiles - -DESCRIPTION="Open Source, Distributed, RESTful, Search Engine" -HOMEPAGE="https://www.elastic.co/products/elasticsearch" -SRC_URI="x-pack? ( https://artifacts.elastic.co/downloads/${PN}/${P}.tar.gz ) - !x-pack? ( https://artifacts.elastic.co/downloads/${PN}/${PN}-oss-${PV}.tar.gz )" -LICENSE="Apache-2.0 BSD-2 LGPL-3 MIT public-domain x-pack? ( Elastic )" -SLOT="0" -KEYWORDS="~amd64" -IUSE="x-pack" - -RDEPEND="acct-group/elasticsearch - acct-user/elasticsearch - virtual/jre:1.8" - -QA_PRESTRIPPED="usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/\(bin\|lib\)/.*" - -src_prepare() { - default - - rm bin/*.{bat,exe} LICENSE.txt NOTICE.txt || die - rmdir logs || die - - if use x-pack; then - rm bin/x-pack/*.bat || die - rm -r modules/x-pack-ml/platform/{darwin,windows}-x86_64 || die - fi -} - -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" - - chmod +x "${ED}"/usr/share/${PN}/bin/* || die - - if use x-pack; then - chmod +x "${ED}"/usr/share/${PN}/modules/x-pack-ml/platform/linux-x86_64/bin/* || die - fi - - keepdir /var/{lib,log}/${PN} - fowners ${PN}:${PN} /var/{lib,log}/${PN} - fperms 0750 /var/{lib,log}/${PN} - dodir /usr/share/${PN}/plugins - - insinto /etc/sysctl.d - newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf - - newconfd "${FILESDIR}/${PN}.conf.3" ${PN} - newinitd "${FILESDIR}/${PN}.init.6" ${PN} - - systemd_install_serviced "${FILESDIR}/${PN}.service.conf" - newtmpfiles "${FILESDIR}/${PN}.tmpfiles.d" ${PN}.conf - systemd_newunit "${FILESDIR}"/${PN}.service.3 ${PN}.service -} - -pkg_postinst() { - 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" - - tmpfiles_process /usr/lib/tmpfiles.d/elasticsearch.conf -} diff --git a/app-misc/elasticsearch/elasticsearch-7.17.3.ebuild b/app-misc/elasticsearch/elasticsearch-8.2.2.ebuild index be38b6a483a2..74c42298df8a 100644 --- a/app-misc/elasticsearch/elasticsearch-7.17.3.ebuild +++ b/app-misc/elasticsearch/elasticsearch-8.2.2.ebuild @@ -1,28 +1,37 @@ # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +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" +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" + 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 } @@ -35,14 +44,16 @@ src_install() { doins -r config/. rm -r config || die - fowners root:${PN} /etc/${PN} - fperms 2750 /etc/${PN} + 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" + 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 @@ -50,7 +61,6 @@ src_install() { keepdir /var/{lib,log}/${PN} fowners ${PN}:${PN} /var/{lib,log}/${PN} fperms 0750 /var/{lib,log}/${PN} - dodir /usr/share/${PN}/plugins insinto /etc/sysctl.d newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf @@ -59,25 +69,27 @@ src_install() { newinitd "${FILESDIR}/${PN}.init.8" ${PN} systemd_install_serviced "${FILESDIR}/${PN}.service.conf" - systemd_newunit "${FILESDIR}"/${PN}.service.3 ${PN}.service + 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 - - 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 + 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 fails." + 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" } diff --git a/app-misc/elasticsearch/files/elasticsearch-env.patch b/app-misc/elasticsearch/files/elasticsearch-env.patch new file mode 100644 index 000000000000..fb150bb51db3 --- /dev/null +++ b/app-misc/elasticsearch/files/elasticsearch-env.patch @@ -0,0 +1,24 @@ +Since ES 8.0.0 upstream stopped distributing a 'no-JDK' package. +This requires us to set `ES_JAVA_HOME` else it fails to find the +JDK that we unbundled and will not start. +--- a/bin/elasticsearch-env ++++ b/bin/elasticsearch-env +@@ -36,6 +36,18 @@ ES_HOME=`dirname "$ES_HOME"` + ES_CLASSPATH="$ES_HOME/lib/*" + LAUNCHERS_CLASSPATH="$ES_CLASSPATH:$ES_HOME/lib/launchers/*" + ++# Set our JVM in a Gentoo-specific manner ++if [ -z "$ES_JAVA_HOME" ]; then ++ GENTOO_VM=$(depend-java-query --get-vm virtual/jre:17) ++ if [ ! -z "$GENTOO_VM" ]; then ++ ES_JAVA_HOME=$(java-config-2 --select-vm=${GENTOO_VM} --jre-home) ++ else ++ echo "Unable to automatically detect a supported Java 17 VM. Elasticsearch is unlikely to launch." ++ echo "Please ensure that you have installed an appropriate Java VM using portage" ++ echo "OR pass the ES_JAVA_HOME environment variable." ++ fi ++fi ++ + # now set the path to java + if [ ! -z "$ES_JAVA_HOME" ]; then + JAVA="$ES_JAVA_HOME/bin/java" diff --git a/app-misc/elasticsearch/files/elasticsearch.service.4 b/app-misc/elasticsearch/files/elasticsearch.service.4 new file mode 100644 index 000000000000..6c5b256706c9 --- /dev/null +++ b/app-misc/elasticsearch/files/elasticsearch.service.4 @@ -0,0 +1,67 @@ +[Unit] +Description=Elasticsearch +Documentation=https://www.elastic.co +Wants=network-online.target +After=network-online.target + +[Service] +Type=simple +RuntimeDirectory=elasticsearch +PrivateTmp=true +Environment=ES_HOME=/usr/share/elasticsearch +Environment=ES_PATH_CONF=/etc/elasticsearch + +WorkingDirectory=/usr/share/elasticsearch + +ExecStartPre=+"/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec" + +User=elasticsearch +Group=elasticsearch + +ExecStart=/usr/share/elasticsearch/bin/elasticsearch \ + -p ${PID_DIR}/elasticsearch.pid \ + -Epath.logs=${LOG_DIR} \ + -Epath.data=${DATA_DIR} \ + --quiet + +# StandardOutput is configured to redirect to journalctl since +# some error messages may be logged in standard output before +# elasticsearch logging system is initialized. Elasticsearch +# stores its logs in /var/log/elasticsearch and does not use +# journalctl by default. If you also want to enable journalctl +# logging, you can simply remove the "quiet" option from ExecStart. +StandardOutput=journal +StandardError=inherit + +# Specifies the maximum file descriptor number that can be opened by this process +LimitNOFILE=65535 + +# Specifies the maximum number of processes +LimitNPROC=4096 + +# Specifies the maximum size of virtual memory +LimitAS=infinity + +# Specifies the maximum file size +LimitFSIZE=infinity + +# Disable timeout logic and wait until process is stopped +TimeoutStopSec=0 + +# SIGTERM signal is used to stop the Java process +KillSignal=SIGTERM + +# Send the signal only to the JVM rather than its control group +KillMode=process + +# Java process is never killed +SendSIGKILL=no + +# When a JVM receives a SIGTERM signal it exits with code 143 +SuccessExitStatus=143 + +# Allow a slow startup before the systemd notifier module kicks in to extend the timeout +TimeoutStartSec=75 + +[Install] +WantedBy=multi-user.target diff --git a/app-misc/elasticsearch/metadata.xml b/app-misc/elasticsearch/metadata.xml index 42c98c32da2f..f3ded0c75da8 100644 --- a/app-misc/elasticsearch/metadata.xml +++ b/app-misc/elasticsearch/metadata.xml @@ -9,7 +9,4 @@ <email>proxy-maint@gentoo.org</email> <name>Proxy Maintainers</name> </maintainer> - <use> - <flag name="x-pack">Enable additional features (may need a license)</flag> - </use> </pkgmetadata> |