diff options
Diffstat (limited to 'app-misc/elasticsearch')
-rw-r--r-- | app-misc/elasticsearch/Manifest | 3 | ||||
-rw-r--r-- | app-misc/elasticsearch/elasticsearch-1.7.6.ebuild | 71 | ||||
-rw-r--r-- | app-misc/elasticsearch/files/elasticsearch.init.1 | 64 |
3 files changed, 138 insertions, 0 deletions
diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest index c481c5a44815..8df24387fba3 100644 --- a/app-misc/elasticsearch/Manifest +++ b/app-misc/elasticsearch/Manifest @@ -3,15 +3,18 @@ AUX elasticsearch.conf 2077 BLAKE2B 1601e7850d88c90bd6ab1037f3b867b3e2bcfe6a8356 AUX elasticsearch.conf.2 2070 BLAKE2B b620bc7bddfb57c0d1c409c8af919c85fd28df79fe3329a770c7e5a46e7a6898b9b7f6b0340a19af6e5536856620aa5981e3df0c0c1fa50dd57a204d752ce248 SHA512 e10d7699046e7db71d822154be6e21785906977d991cae6709a4fd0439c262915ddbf5499b8dd501da86985644f402b96c92fa5d83feb9d0684d3eec766164f9 AUX elasticsearch.conf.3 2196 BLAKE2B e711aa58eca0df5857fa48a4dc21f5dd144977f3cd0209a58c15868531a108175ecdd21ddc18e1daf1e83c0bbd26da7c00b260698b3ef87c938b6d18928df733 SHA512 36a98d788cff404ccfe0fdff7bbe358750df8db9e5a5f419991b90e257e97331ec93c5f9a84bed57099dd239abb572ef450a191582e7145d8d7517c242707e49 AUX elasticsearch.init 2503 BLAKE2B 8208d09d6afba9e1f334ee958baa6a106eb7dc05abc69871146c7dfdcc15922454161b44f6ac754b1de6e5362c9e33a7137efa5de6bc0359685c4c8158889494 SHA512 55369ea6fc19979a722528afead2a4a19912fd212db450e4fb840c88d0a868faaa87ff8fe33a8a12370559f68b729771ee4b5fdbf066a263a97bb7944d68b9b6 +AUX elasticsearch.init.1 1996 BLAKE2B b61a8146f75c694234b8403286fccc4dd163cfb8ec9b1370e858b1457281038034c21dd57a6e43738fc3a3361425a9afdfcd9739966224178fd5283e29558869 SHA512 49270bdfa60d88f0004d38fe9fc23599cc692f07ab1542f3a2281b7bd3b7ec62d9571ecfc2cefbc9197c72733948d2a43db3d763d7202c8c957830409ead4563 AUX elasticsearch.init.2 1830 BLAKE2B 57dea653c636c7ccb40fa6ab777f0713b245bf9d344b39de23aaaad753c229196cb81acd01c4ac1c9ae29c166b1dbfa38e829d60172106dbc384aeb6e21a544e SHA512 babc54a225f1ea5c98a6c2e0a680635a5af30305a869e35db65f5f6ddeb00577b3011f83b3190567646b7d67a314710c83212a233dc31a0fb78691eb1358b96a AUX elasticsearch.init.3 1816 BLAKE2B ad4a62479797fed8bfe9b5003586ad2813d8dfa26f6686331bcf9f7a673ffd8171f9b8839d00bd8cffad2e9cf850a924e96b9a2d151b8ddc9928ca36168370d2 SHA512 2e08b1675e7888187ad2a6e1d73f29e0534c079670602fb2057d661b04deaedf6cc365caea83fa7e4b4f527737239dba45964cd380c1f7f463d9c875cf13e4d0 AUX elasticsearch.service 1718 BLAKE2B 1d3df50f9b521a897f6f57c411265ce3d5da849c23a6d5274959739531ec1f1373f59adb9d0ac94318eefbe90cf10218b67aa47530bdd162ed306354fb9cf2db SHA512 98530c01f41a2d98254033a1a292075abc6086e0608062dfbe28385e4f57da390a9c43521bfce72193c2b710e58e590f08f514257b8150140dbb9ade40ef5470 AUX elasticsearch.service.2 1617 BLAKE2B d2b62c9dfa0e2bb6159ce8a06f0d7bc45fc4906c2ba05a5979e09cff0ed6676926cc4ee91aa84ae491b538b833e78f1bc781d848f8ecd82dc2d73b62fe8b161e SHA512 1a8ab08c69a9054a9024484dff0c07d010668420e698be5553d3fda3df893e09badf86f32c3a98529668938186305fae5c33e6229b87778fe1530a5f2b3d078d AUX elasticsearch.sysctl.d 24 BLAKE2B 4012fbdbc98a8b28df11aed33cb82c113790c44721eae1d69e19c595bfbf329618b9cb67be9528f1994c546233cffd31b20eee39edc142bc86f7a7cf5e08903e SHA512 9f3d8238edff6704bea06b6535ee8915f4a3c9bdc8389d9d4943bcfa49161b61f9a1ca49dbcc415580438f4396fbc3d58eef301554f9426287606a755ada715c AUX elasticsearch.tmpfiles.d 56 BLAKE2B 0c28c612fadfdd86321df797527399fa5073a7350de95ec2b32dfbe51cbf52fe5dcf68ebd4e3fba6cccba1cf252a16dee3b701c4c6692121745c41665cf3c972 SHA512 5cc722abcaae68afffde96e38b2c9572faf898178d3c291c945fe49fbf977e319322b99fb6fb5bf49cfb04e86f071dde0db621849288f712a56571b13af9a11a +DIST elasticsearch-1.7.6.tar.gz 28488767 BLAKE2B 0dc4fb10355e2139ee3a7e7e65366e8aa533b9714bf0f00d2bd8f4ef0669ba9f8f10dc5255c8c7a62abc0362e08ab5fda3c8b6b6f2bacfe5cce7255973293162 SHA512 2746f09b66919912e785c8d25c50ae74dbb38a41d99d9c926550786f9c2d7953d1ae1a54a32dae59a7269e5fbfa74dfbc91c3d412e415efd01c391ef7d329ba7 DIST elasticsearch-5.5.3.tar.gz 33486646 BLAKE2B 4f28d843b2daa73af1160436f9eedd20b9d91ee8d4454a210ad59c736c0ac0bd91384d972583d4de7e7dbc228b3e37546343da68545312333379298042ad8214 SHA512 013e238a3ccdb795b9472a6111ae804b770435776dfb703b379c34498591d3804e45fb27a7c473348917b4d9e6fde367184474680f1f72bbca129bf9644fb527 DIST elasticsearch-5.6.5.tar.gz 33780822 BLAKE2B 0541e27d7d9d18ec308495ab1cfb65c8f8e79960ef5d110ef5194a4033301b858a676c8c4d61f246e01ebc5679280c3eafe628e22ccfd84de9129f7a4606a041 SHA512 c3f31f561631c3f8df53cb49ac9a86dff3bcaa9e3ea2ac67dd959900ec1ddf676d307c9d8319ac51062072e506994934c61395049f6a6eac67e377d53517103f DIST elasticsearch-6.0.1.tar.gz 28026460 BLAKE2B a70cd36affaccccf1ea552167e585a35cc748de1137cf4b23387798ae31b851104ccc19f8be83ecc645bcebfba344b5e55a397a9cbb0b380c4a118f1f0ffecf2 SHA512 b86a04acd194e7e96e3a32de6ab4983d6569ffb1714f2af9e2b49623004987e13e57c5db055153a188f5d2d7eea63d649fa87769f7625f3fc4923e0cd5b8f3ee +EBUILD elasticsearch-1.7.6.ebuild 1731 BLAKE2B f9f95530464bbb1fe79a3f4ffd0c9421caa4eab078ab3fa1743e7ecaeb7004bcba414fa4d4509ae12b37d8f83f4c96dc0c5d5c179acccaf8c20b15d5b534bbe8 SHA512 8012b00b8e90fb84ed7d75a9fb22ded1a7ca6a0ef820746fc2258fbdc576b73d0cb97d037c8ca5fa08408fc119d9801b73aff6b4785e257d8e4fb658cb5cc730 EBUILD elasticsearch-5.5.3.ebuild 1618 BLAKE2B ce21557cb37e492f54d68284cd4b95c68e8560f3e62ae1c8287bcb4b2c622df7cd14709ff020138be4013cbb5279c25d60de6ee0698d0c48b3c364e5e06193aa SHA512 0018a5cecab2293bfe43581fcc67bd395e669ed2913a1e40676de420763415ab090589a742b127730ca6b8a467f06f10f3f3d1c2bec87db479909cb1a668f62f EBUILD elasticsearch-5.6.5.ebuild 1688 BLAKE2B fb88862c69873ae7d27784d54306534bcef0d8e02f87024ac87f22e89bdf9310b655ecd5fdaf6ccac71bd1a52445f2d139963dad1ab426c6dff645050230d2e8 SHA512 9a577ae695f21d63fd537a26837987e7c4c6525e937bc4219635890e9daac31f332adf02968a3e94e4be768c51a830726196b97f0006b49ba3b385a65e5c854d EBUILD elasticsearch-6.0.1.ebuild 1690 BLAKE2B 218d513c3bd36d299c362a08541eafb54b3fa20ee41ff117698f221d97e49afe1658705cf091bbef9d92131c0eacf4ebc151e337a1d0d8b9746dcd7e4c25dda3 SHA512 6b4b2fef48924f189089aab2063d7b387135600138889f0d8ce18e236ab9c7aa2cb954ee78e64e7537e8e0ea7de4054903d48f27f4008f4cfb0f7ab1241dcc4b diff --git a/app-misc/elasticsearch/elasticsearch-1.7.6.ebuild b/app-misc/elasticsearch/elasticsearch-1.7.6.ebuild new file mode 100644 index 000000000000..eca489c9bd2d --- /dev/null +++ b/app-misc/elasticsearch/elasticsearch-1.7.6.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils systemd user + +MY_PN="${PN%-bin}" +DESCRIPTION="Open Source, Distributed, RESTful, Search Engine" +HOMEPAGE="https://www.elastic.co/products/elasticsearch" +SRC_URI="https://download.elastic.co/${MY_PN}/${MY_PN}/${MY_PN}-${PV}.tar.gz" +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="strip" +QA_PREBUILT="usr/share/elasticsearch/lib/sigar/libsigar-*.so" + +RDEPEND="|| ( virtual/jre:1.7 virtual/jre:1.8 )" + +pkg_setup() { + enewgroup ${MY_PN} + enewuser ${MY_PN} -1 /bin/bash /var/lib/${MY_PN} ${MY_PN} +} + +src_prepare() { + rm -rf lib/sigar/*{solaris,winnt,freebsd,macosx}* + rm -rf bin/*.{bat,exe} + rm lib/sigar/libsigar-ia64-linux.so + rm LICENSE.txt + + use amd64 && { + rm lib/sigar/libsigar-x86-linux.so + } + + use x86 && { + rm lib/sigar/libsigar-amd64-linux.so + } + default +} + +src_install() { + dodir /etc/${MY_PN} + + insinto /usr/share/doc/${P}/examples + doins config/* + rm -rf config + + insinto /usr/share/${MY_PN} + doins -r ./* + chmod +x "${D}"/usr/share/${MY_PN}/bin/* + + keepdir /var/{lib,log}/${MY_PN} + + newinitd "${FILESDIR}/elasticsearch.init.1" "${MY_PN}" + newconfd "${FILESDIR}/${MY_PN}.conf.3" "${MY_PN}" + systemd_newunit "${FILESDIR}"/${PN}.service.2 "${PN}.service" +} + +pkg_postinst() { + elog + elog "You may create multiple instances of ${MY_PN} by" + elog "symlinking the init script:" + elog "ln -sf /etc/init.d/${MY_PN} /etc/init.d/${MY_PN}.instance" + elog + elog "Each of the example files in /usr/share/doc/${P}/examples" + elog "should be extracted to the proper configuration directory:" + elog "/etc/${MY_PN} (for standard init)" + elog "/etc/${MY_PN}/instance (for symlinked init)" + elog +} diff --git a/app-misc/elasticsearch/files/elasticsearch.init.1 b/app-misc/elasticsearch/files/elasticsearch.init.1 new file mode 100644 index 000000000000..c44671c95d1b --- /dev/null +++ b/app-misc/elasticsearch/files/elasticsearch.init.1 @@ -0,0 +1,64 @@ +#!/sbin/openrc-run + +name="Elasticsearch" +description="Elasticsearch Server" + +ES_INSTANCE=${SVCNAME#*.} + +if [ -n "${ES_INSTANCE}" ] && [ ${SVCNAME} != "elasticsearch" ]; then + ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}" + CONF_DIR="/etc/elasticsearch/${ES_INSTANCE}" + LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}" +else + ES_BASE_PATH="/var/lib/elasticsearch/_default" + CONF_DIR="/etc/elasticsearch" + LOG_DIR="/var/log/elasticsearch/_default" +fi + +ES_DATA_PATH="${ES_BASE_PATH}/data" +ES_WORK_PATH="${ES_BASE_PATH}/work" + +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} +MAX_OPEN_FILES=${MAX_OPEN_FILES:=65536} +MAX_MAP_COUNT=${MAX_MAP_COUNT:=262144} + +DATA_DIR=${DATA_DIR:="${ES_BASE_PATH}/data"} + +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="-d --pidfile=${pidfile} -Des.default.path.conf=\"${CONF_DIR}\" -Des.default.path.data=\"${ES_DATA_PATH}\" -Des.default.path.work=\"${ES_WORK_PATH}\" -Des.default.path.logs=\"${LOG_DIR}\"" +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}" +} |