From f709630fc7ee38948f67288fad113feae2ff75ba Mon Sep 17 00:00:00 2001 From: Tony Vroon Date: Mon, 8 Jan 2018 12:52:18 +0000 Subject: app-misc/elasticsearch: Most recent SugarCRM Enterprise supported release. Remove faulty release. Package-Manager: Portage-2.3.13, Repoman-2.3.3 --- app-misc/elasticsearch/Manifest | 2 +- app-misc/elasticsearch/elasticsearch-1.7.5.ebuild | 71 ----------------------- app-misc/elasticsearch/elasticsearch-1.7.6.ebuild | 71 +++++++++++++++++++++++ app-misc/elasticsearch/files/elasticsearch.init.1 | 64 ++++++++++++++++++++ 4 files changed, 136 insertions(+), 72 deletions(-) delete mode 100644 app-misc/elasticsearch/elasticsearch-1.7.5.ebuild create mode 100644 app-misc/elasticsearch/elasticsearch-1.7.6.ebuild create mode 100644 app-misc/elasticsearch/files/elasticsearch.init.1 (limited to 'app-misc/elasticsearch') diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest index 9ddccc402db1..15417d6ba11d 100644 --- a/app-misc/elasticsearch/Manifest +++ b/app-misc/elasticsearch/Manifest @@ -1,4 +1,4 @@ -DIST elasticsearch-1.7.5.tar.gz 28487351 BLAKE2B 96c18bf85378eecb330ed493794a448c0d3285d1c36d1add31d7840974d1a20516b0c008ce749249de105f6f6bd93b95bfd7f97ab02d4bb5d61ebf58060646ae SHA512 372e9edf5bd9f68c476e15276fc90cf2ecddbafde17fe803e6a50261c2d3a80616a9440d86494d8cfa411703f87cf053d31c62f4cdee260d64cdc0c07b5741ba +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 diff --git a/app-misc/elasticsearch/elasticsearch-1.7.5.ebuild b/app-misc/elasticsearch/elasticsearch-1.7.5.ebuild deleted file mode 100644 index 8813d90d9d78..000000000000 --- a/app-misc/elasticsearch/elasticsearch-1.7.5.ebuild +++ /dev/null @@ -1,71 +0,0 @@ -# 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.3" "${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/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}" +} -- cgit v1.2.3-65-gdbad