diff options
Diffstat (limited to 'app-misc/elasticsearch')
-rw-r--r-- | app-misc/elasticsearch/Manifest | 4 | ||||
-rw-r--r-- | app-misc/elasticsearch/elasticsearch-7.2.1.ebuild | 86 | ||||
-rw-r--r-- | app-misc/elasticsearch/files/elasticsearch.init.7 | 71 |
3 files changed, 161 insertions, 0 deletions
diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest index 431a48a7598a..e3c7ca921255 100644 --- a/app-misc/elasticsearch/Manifest +++ b/app-misc/elasticsearch/Manifest @@ -4,6 +4,7 @@ AUX elasticsearch.conf.3 2196 BLAKE2B e711aa58eca0df5857fa48a4dc21f5dd144977f3cd AUX elasticsearch.init.2 1830 BLAKE2B 57dea653c636c7ccb40fa6ab777f0713b245bf9d344b39de23aaaad753c229196cb81acd01c4ac1c9ae29c166b1dbfa38e829d60172106dbc384aeb6e21a544e SHA512 babc54a225f1ea5c98a6c2e0a680635a5af30305a869e35db65f5f6ddeb00577b3011f83b3190567646b7d67a314710c83212a233dc31a0fb78691eb1358b96a AUX elasticsearch.init.5 2050 BLAKE2B 51908266d476c0fe21ceeb01e4fb9aede5ef70944025a26dbbaea582253e32442a938e39842371397b15c70ecfc9ae4abc8f549f75c3fdf55e1d09e16c25f871 SHA512 127f050a322ba2fd1ca92352ccfc9e3abf5e768b0c1b6e6fbb73633f4aa8fb3dbc8c9118428ed56070e91e2141edda2cd488185a272f0d0022e88ca32172cd7f AUX elasticsearch.init.6 2102 BLAKE2B e49581ac65b20feb24711674a2f5f46bc67d65cd8e5128f1d0868a84db36b0067b13ae39ea3f57d0b4c8ebfd91fb3d769088c29dacf8436beb66fe98cea0b03e SHA512 52116a49c9bce9ebe57316f96f3b6eff3a6bd544b930845d5fb9b74fc5f40535a0e50d71f8c7e602fbe8935ec35692b763a5255ad43afac5f7ac8ac00ba2bd30 +AUX elasticsearch.init.7 2158 BLAKE2B 934840e6013bca18282ceb6566bfe4fa9480a72a458bf1fc0566f4651e9e749ee9ff90f3bac2fd1cb75c5f7a3e91842a751af00b6245292600ad56060318a8ec SHA512 b847b089c18ec10892c395017a15f1f6e5af42055b11252219c832877f3f5d6c78988af85eeaf671fdfd9a7155ce19ea8e16f70bfe86c4453ea0174908eec520 AUX elasticsearch.service 1718 BLAKE2B 1d3df50f9b521a897f6f57c411265ce3d5da849c23a6d5274959739531ec1f1373f59adb9d0ac94318eefbe90cf10218b67aa47530bdd162ed306354fb9cf2db SHA512 98530c01f41a2d98254033a1a292075abc6086e0608062dfbe28385e4f57da390a9c43521bfce72193c2b710e58e590f08f514257b8150140dbb9ade40ef5470 AUX elasticsearch.service.3 1527 BLAKE2B 7f7bee9019de2814cdce1e4a66932a0a2a915cddce2d5d2bfde2263bf088001ba1dff9bbbc8eaafb4e1d9012176fbeb4964dcd6f25f6e49935bdda90cec52f6d SHA512 adcc3147ce8d52f64fa21e7cb377ba88d4ea32254eaea03c68d45296bac46d7ff084b93469ca9dbabe013bf8bd183a96a219117b68fb91648b595206b60cebbc AUX elasticsearch.service.conf 235 BLAKE2B 23ada111be21dff12323edbe981883cb1ed275b6c7a9f55e77fdcec1919d374818683403a2a7a7c2c2839db2b8afcd66f7667d5080ecb52cade853a400f972a6 SHA512 b300dbc1b3c341ebbcac68385c651133427f342dc0351501b47730b392cc176b7b8dc53877affc6ab384d2834d246a3d0c63b6015dddf2c90d4bcf41cee9968c @@ -15,15 +16,18 @@ DIST elasticsearch-6.7.1.tar.gz 148542786 BLAKE2B 4a9acd16788e6d84acfac09ee24341 DIST elasticsearch-6.8.1.tar.gz 148584086 BLAKE2B dacc3fdf142fc46ede2a5891f95f69a1200632c46b57eb03f948437a39ef92538da7d3e64afd52c4acae478e6758b355729f8cbf8ceb91aa3d34353ff434fed4 SHA512 1d484287e9b67b16c28f1a4d2267e7ceb5a4438a18b26b3a46d4a176bb3f2f6fcadcbda617a7a91418293880d38c027266cb81a4e8893a28adee9fa693b2318b DIST elasticsearch-7.0.0-no-jdk-linux-x86_64.tar.gz 149074223 BLAKE2B 3c210b81de8882f99be45adc811c3867acb276978d3c788db5cb00ec0eacd0f096933849dfa066160ca2ec05e3fa2962329b200614db9927e4424602da53508f SHA512 b499aeab6a3f883547974b36221fd808a9da70ae0622856582287dcf729c3a2acfb1faef2727b17be97f64d8bb56ac5cdbae6d63f2a146027153f170ae6d91fc DIST elasticsearch-7.2.0-no-jdk-linux-x86_64.tar.gz 138948007 BLAKE2B 0e03779669f6113eac1561a3a907d8a3286ac7c7229e0ff7ad46ede4f22a2829f8d2ffafb319427f789fb95cca6669c59f8d840ec83625889bcdd6ada91be1d5 SHA512 b49a6d6b7361c499b1d9a9118746229113eaf4b88c1ad755c1ae8fd713428db4bc296cd75f3df58a239b09d6a8281f670f69c320839ef000596c776141cb1ce6 +DIST elasticsearch-7.2.1-no-jdk-linux-x86_64.tar.gz 138949755 BLAKE2B 3c77cec89a93c6b5d213afc326ef84df7d77c052914b387dc4ba35276d8f9814689d5305a131e1c647ece31277533e882b1170ad03eb3869f8443471223db066 SHA512 d2827be0b06361ab08f558dc88f76c614fb6a243a6d845749b3d23dff4078ffa58cc1b3407b84197d0f027ea9af5475fad8e3a503fc573ba31756bdd16a589d9 DIST elasticsearch-oss-6.6.1.tar.gz 34492424 BLAKE2B 9a63aeb86ec3bebbe685804b262316726cb93b42693f9ba8937cac65c7ec186f0bb470893568234a0b7cc8b58f0c91d2af94eb16c3d016e7533231eba32fdbb0 SHA512 0e536ff760673dd740f790f1b0c01d984bf989a4a9ad3c4fe998de4f824330ce0d5ea18f04421a8648af719aabd25a4393f90182079186e48cef539b5621914c DIST elasticsearch-oss-6.7.1.tar.gz 68421385 BLAKE2B cf14f3babfc5dbe9de4c9e47c15b797ab7c73236936257043c435751a0d86348e34ee73d2a6785a9e1391edc1e00f9a56f922c368ef72a5d349175ee4735d43b SHA512 4865ebd3403593048b3f922769d6d09eb1d53a42cf206cdcba7c30e330b39d9bd57f9f0979a23fcf0ca7636d84ce85de210fdf655447fab7ecebb35bffdd3323 DIST elasticsearch-oss-6.8.1.tar.gz 68419519 BLAKE2B cf34c4cf095b4271d067802df8130d66167e5f01fd0231361ce3e7f5e1023b39e6fbc325cc575f2c353a30b011127934b7b7a04f9a48998f88d27ce8a5560bf4 SHA512 cbcc81b8dd3a7a63c6e6574405417821c5dcd1a0b5df813818d39353fa29ea28e443db64b1a1938a1ffb23aa17d706e3edb6a46fdb24992b92f918d8d4f0c08a DIST elasticsearch-oss-7.0.0-no-jdk-linux-x86_64.tar.gz 68788144 BLAKE2B 29206b277dc9997b155b54217f485c314a7efa35777bcb81908ce900e134e62d7ef14629cfeebcd3ebb724b76fe5380085ae6b50df46bdfddf5f657a0d2da3eb SHA512 ec9381d9310145b80fb2b8cdd7b7953ea7b2b45a66bf8435d8a982aed0eeb59f734f3936b4b40ec4530e106878d25c2f63d4ea7a734b12f1c8d86b39f7894963 DIST elasticsearch-oss-7.2.0-no-jdk-linux-x86_64.tar.gz 68964879 BLAKE2B 6bebff074d9a22abaf1a7b669d9a47254a658f4954b2e27d4251860a0b8cd29f4bbc3baf217d7fb90c492d5dabce802b1e4d359531202e677ffcfd573b51b343 SHA512 a538c82dc177a66004912ce20b1b50ee1270e45b56879b4f0b7e2d4bfa00d9fe5c113b5e4927cb6f5669f8a1f2f4953c4bb12dc4a10510af4658bbcbcaba3cbc +DIST elasticsearch-oss-7.2.1-no-jdk-linux-x86_64.tar.gz 68973563 BLAKE2B 5248a5e8443794134c55ef14d1b175ff931d599a45b4cbd0f187e864dd3d4b322f10df31672c0900417e84da0e83fd934234bba31dc116c5c3b6b9f14e9c62a6 SHA512 694aca59cc3e23bfcf41142d7bf3d3c75f6fcdb6d0a1b35157157cb2f4ac8152db1e424951e62ba1a2bd4a2d32a77bb9499085558b7e1580680c0de90fbc0902 EBUILD elasticsearch-5.6.16.ebuild 1686 BLAKE2B 45ba9183eacdc9e25a9c640ea98a6c4bcaaa6894ac1fcf87874fa70205677a4a4991fe81b52934ab9b0e6243d967b653ded4c27ab157491eb6671e08855c3b31 SHA512 9198ef6590d77ca6817e504ee846a80aa2b2a0a440f57786fa63f3b2332480dc630207474c0e5d859dbb2c6a035f9db3a2f3a8ff965defba2fcb4c76ab4ca95d EBUILD elasticsearch-6.6.1.ebuild 2579 BLAKE2B 35aa006966938554dcea8f77202a355adde841a5faec231fda4615fb79f5968c89ea2519cd7f737071c37fab74b848e297e56951af23cc034dfc7839f4b65796 SHA512 fe8a12e1efb2b096b4ed7854d9da952af85797f8020bf843a01732040b07fefcf616fe50574f9faab2b89fa103a542b2cc83f44f9ebc42715dc81fe9c8a9c668 EBUILD elasticsearch-6.7.1.ebuild 2579 BLAKE2B 35aa006966938554dcea8f77202a355adde841a5faec231fda4615fb79f5968c89ea2519cd7f737071c37fab74b848e297e56951af23cc034dfc7839f4b65796 SHA512 fe8a12e1efb2b096b4ed7854d9da952af85797f8020bf843a01732040b07fefcf616fe50574f9faab2b89fa103a542b2cc83f44f9ebc42715dc81fe9c8a9c668 EBUILD elasticsearch-6.8.1.ebuild 2579 BLAKE2B 8581c232ba6a291994a61ef4c9406bfaf0fb6590fee36c60cab0d319a8a0472e2899fc2e136ab4267c1b6d6d52d601d4d4cb7fd5090ae05e46b63856dd986974 SHA512 956ab4ca9d9d5643ea3045cb15d6e98c6de74fe4bed56b4e44cca9a5b9073ad3d04fb24c8b7c04bb0dcee7f0a5baa9a44aea8e00999857fe51437e42bd6015a1 EBUILD elasticsearch-7.0.0.ebuild 2570 BLAKE2B 34f783dfea91989cb241fa8f1e94c209509bc87d9d63c754507d23aeb3b10d1dc97819764505227982b4721eb73280f9dc01b59034bcdbbc31fea0b454a1ab2f SHA512 59a97e54612b663302de40f5a94c7ee03c046f9642ea2d3966a53723c11e0b224a125443983bbf31eb9ffbbb372f90fdfbbd1239f283b3268af590c029da42bc EBUILD elasticsearch-7.2.0.ebuild 2478 BLAKE2B 152933e675b5d159de07e31592f883d16206201b844056c3e27ba69b27769700ff0891938e017deb0600d3be08b1d172d2856b482b7a98887f648ef54f151e49 SHA512 de5df3dae8215eb3fa3cb2306a0da5b87e3dd4135b8cbf663fd297d6b8e074b643b4c611f34da5ac87fce7658b46efc7803ff92f97b44cd88ae6af5d98fd5e8c +EBUILD elasticsearch-7.2.1.ebuild 2478 BLAKE2B 5e3b853ed335f7a691a664a3dc1b6e8307d09be38b97c7a632a4d857c059fded6e1f20ceadc6fc6afe99d7bbad3dfb2f041ade09d62e39733e62d87fd4cefed0 SHA512 c634e16b86ddbd3b3cb689c467aa992bb9a78179e93ef190547a8d55e511a30c47c3459df2d3dd55c865cd9ce96bb48497c683c1bd4875967a3a0838f8a09341 MISC metadata.xml 567 BLAKE2B 3123e01d77b67569afb2bb4908b38c702ebe1d308ea236b8ebba11709bc421af27ec29d72398a3af0aaefb39a2a2f34e27bffbbd1b3306dbc299e49bfd48cd35 SHA512 74669ea5437ad23c604c82a734973d58a31d78f0f4a2b7e2db655d884bf017d32ea25e451517601b35d406789e661ed2e173752bc232a03c3564e971c5a83a0c diff --git a/app-misc/elasticsearch/elasticsearch-7.2.1.ebuild b/app-misc/elasticsearch/elasticsearch-7.2.1.ebuild new file mode 100644 index 000000000000..37f142d87742 --- /dev/null +++ b/app-misc/elasticsearch/elasticsearch-7.2.1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit systemd user + +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}-no-jdk-linux-x86_64.tar.gz ) + !x-pack? ( https://artifacts.elastic.co/downloads/${PN}/${PN}-oss-${PV}-no-jdk-linux-x86_64.tar.gz )" +LICENSE="Apache-2.0 BSD-2 LGPL-3 MIT public-domain x-pack? ( Elastic )" +SLOT="0" +KEYWORDS="~amd64" +IUSE="x-pack" + +RDEPEND="virtual/jre" + +QA_PRESTRIPPED="usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/\(bin\|lib\)/.*" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 /bin/bash /usr/share/${PN} ${PN} +} + +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" + + 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.7" ${PN} + + systemd_install_serviced "${FILESDIR}/${PN}.service.conf" + systemd_newtmpfilesd "${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" +} diff --git a/app-misc/elasticsearch/files/elasticsearch.init.7 b/app-misc/elasticsearch/files/elasticsearch.init.7 new file mode 100644 index 000000000000..cac781c968d1 --- /dev/null +++ b/app-misc/elasticsearch/files/elasticsearch.init.7 @@ -0,0 +1,71 @@ +#!/sbin/openrc-run + +name="Elasticsearch" +description="Elasticsearch Server" + +ES_INSTANCE=${RC_SVCNAME#*.} + +if [ -n "${ES_INSTANCE}" ] && [ ${RC_SVCNAME} != "elasticsearch" ]; then + ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}" + CONF_DIR="/etc/elasticsearch/${ES_INSTANCE}" + DEFAULT_LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}" +else + ES_BASE_PATH="/var/lib/elasticsearch/_default" + CONF_DIR="/etc/elasticsearch" + DEFAULT_LOG_DIR="/var/log/elasticsearch/_default" +fi + +ES_HOME=${ES_HOME:="/usr/share/elasticsearch"} +ES_USER=${ES_USER:="elasticsearch"} +ES_GROUP=${ES_GROUP:="elasticsearch"} +ES_STARTUP_SLEEP_TIME=${ES_STARTUP_TIME:=5} +JAVA_HOME=${JAVA_HOME:=$(java-config -g JAVA_HOME)} +MAX_OPEN_FILES=${MAX_OPEN_FILES:=65536} +MAX_MAP_COUNT=${MAX_MAP_COUNT:=262144} + +DATA_DIR=${DATA_DIR:="${ES_BASE_PATH}/data"} +LOG_DIR=${LOG_DIR:="${DEFAULT_LOG_DIR}"} + +if [ -f "${CONF_DIR}/elasticsearch.in.sh" ]; then + ES_INCLUDE="${CONF_DIR}/elasticsearch.in.sh" +fi + +export ES_INCLUDE +export JAVA_HOME +export JAVA_OPTS +export ES_JVM_OPTIONS +export ES_JAVA_OPTS +export ES_STARTUP_SLEEP_TIME +export ES_PATH_CONF="${CONF_DIR}" + +pidfile="/run/elasticsearch/${RC_SVCNAME}.pid" + +command="/usr/share/elasticsearch/bin/elasticsearch" +command_args="-Epath.logs=${LOG_DIR} -Epath.data=${DATA_DIR}" +command_args_background="--daemonize --pidfile=${pidfile}" +command_user="${ES_USER}:${ES_GROUP}" +required_files="${CONF_DIR}/elasticsearch.yml" +retry="TERM/30/KILL/30" + +depend() { + use net +} + +start_pre() { + if [ -n "${MAX_MAP_COUNT}" -a -f /proc/sys/vm/max_map_count ]; then + sysctl -q -w vm.max_map_count=${MAX_MAP_COUNT} + fi + + checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/lib/elasticsearch" + checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/log/elasticsearch" + checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/run/elasticsearch" + checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${ES_BASE_PATH}" + checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${LOG_DIR}" + + # fails to start without keystore + if [ ! -f "${CONF_DIR}/elasticsearch.keystore" ]; then + "${ES_HOME}/bin/elasticsearch-keystore" create + else + "${ES_HOME}/bin/elasticsearch-keystore" upgrade + fi +} |