diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2013-11-27 13:44:33 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2013-11-27 13:44:33 +0000 |
commit | f2895548bd7d03165cf46147ce7a903de828718a (patch) | |
tree | 2e2a18271e2ceff8070e094e6ddb528d515b3c3b /app-misc | |
parent | Stable for HPPA (bug #486618). (diff) | |
download | historical-f2895548bd7d03165cf46147ce7a903de828718a.tar.gz historical-f2895548bd7d03165cf46147ce7a903de828718a.tar.bz2 historical-f2895548bd7d03165cf46147ce7a903de828718a.zip |
Have the init script work properly, fixes by Simon Alman. Closes bug #491324.
Package-Manager: portage-2.2.7/cvs/Linux x86_64
Manifest-Sign-Key: 0xB5058F9A
Diffstat (limited to 'app-misc')
-rw-r--r-- | app-misc/elasticsearch/ChangeLog | 8 | ||||
-rw-r--r-- | app-misc/elasticsearch/Manifest | 10 | ||||
-rw-r--r-- | app-misc/elasticsearch/elasticsearch-0.90.6-r1.ebuild | 86 | ||||
-rw-r--r-- | app-misc/elasticsearch/files/elasticsearch.init2 | 87 |
4 files changed, 186 insertions, 5 deletions
diff --git a/app-misc/elasticsearch/ChangeLog b/app-misc/elasticsearch/ChangeLog index 6dc67f1b61fa..7caf4e0d0bbb 100644 --- a/app-misc/elasticsearch/ChangeLog +++ b/app-misc/elasticsearch/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-misc/elasticsearch # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/elasticsearch/ChangeLog,v 1.1 2013/11/07 09:19:22 chainsaw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/elasticsearch/ChangeLog,v 1.2 2013/11/27 13:44:30 chainsaw Exp $ + +*elasticsearch-0.90.6-r1 (27 Nov 2013) + + 27 Nov 2013; Tony Vroon <chainsaw@gentoo.org> + +elasticsearch-0.90.6-r1.ebuild, +files/elasticsearch.init2: + Have the init script work properly, fixes by Simon Alman. Closes bug #491324. *elasticsearch-0.90.6 (07 Nov 2013) diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest index 04adfe79b672..a453b29e23fd 100644 --- a/app-misc/elasticsearch/Manifest +++ b/app-misc/elasticsearch/Manifest @@ -3,15 +3,17 @@ Hash: SHA256 AUX elasticsearch.conf 428 SHA256 cabfe972ef28b30d152c022e4a0510f6ce940687a452b8dfb21c060a14af7860 SHA512 f61a75394776a9c2cac5b4dcfcaee03531808546a360a04e28d83f9bde5804bb9ffa305d3b49679a3fafdaa8c060ecbf88486ed1cdd4072af10e287e599d834d WHIRLPOOL 5fb0590f1264b3a3c1bba759c426edc72f2e2d1c2198c9d67c81a4c73b90ba123b052e8b8aea21be920a1c795b6222a592d37949ac705e81d3493dad9ce6d5b4 AUX elasticsearch.init 2276 SHA256 bc3941c26bd98f148b757200fad3bdd68776ebf0bdb4844b47a02ef82c2384fa SHA512 5d8cb832420fc2484dcb18f98adbb1359b7129b26485bd557c7ef3260ff38ca6a7064a07f91d4824cc045046b6eedd49f19001bcaf9ff6b409b810d0e723f97c WHIRLPOOL 994c63d4026e0288e42993bb8e7eca62c383c6854e96ca4f2e5f7fa41c8b83f7822f696c9cb2f37c696862fec77cca3ca511c5669a2de9267b168c14401c18bd +AUX elasticsearch.init2 2296 SHA256 a2abd2f6423ebc382a130b6264114d2e4b28d1ec705939f6ccc818bb7a86b491 SHA512 2439482409908774e02726f81bcf8c9d80d0c3e00c468e4ae95dbb7ae9035fd27ae47aa08b1a705ba808a5222b95b37189b1e9ab7ec89797b9f90db572b5f89f WHIRLPOOL 37a1866079dbc0ec6624b2da2da2914752d76d02ebb4764d209a716ac90f1b29014be9930ba6b5999f513b6357c9088d24db3c2b14c763e792dc1c63d2f9fe34 AUX elasticsearch.service 274 SHA256 d8581135cb5f6b73245e571f0cd3cfa85c90d96474304214324958b9ee952f7e SHA512 14c0696ab1244e4afde34c0f6aaececbb5a80a75dc9ad23841adefde815c8c9a604858902bd87609d8191dfca7c4eb24f1ad2d041d50d22a789296bf43366a76 WHIRLPOOL 8df4eb48efac8353c21685bc17bd30ce8835f9f5f91f19acd3f69a42a780c69fc118f74d003429e1da9558ffad1a1e649c57521ba8219fcb262a2ffdb2e24e9c DIST elasticsearch-0.90.6.tar.gz 17854568 SHA256 2ff87847e993d52723b4e789db3cbba887f414b85bf04fd897032bc52fe0ad3a SHA512 8c1d3003ac1e75389d8fec78bd281f21738f18e4f2dd5518c7568173eb527c1d0cbb21344012bd4806c51027717ed8de0b2275703e876c7bd0028369507c9838 WHIRLPOOL 652b563edb80c3126cd230cd3b78f38b65af9ddfe966ab940f8d0850672156e17378ba8a75c6a0e2d9a7b154165bb47cfac1f619fd3092b40372e89125ccabd9 +EBUILD elasticsearch-0.90.6-r1.ebuild 2230 SHA256 884028832362063d6e599687c2f44f695446f5a9aa6d6887271c3a16c657c216 SHA512 d708693e25e864d828fd1ad9ccb83d3a538899f880fdbdaab8be76f68832d871261d775427d6d7ce395f868a32ad20e2ebee2d3673b45b31ad371a9f752df2bb WHIRLPOOL 894186728a3d5465a53e07641070dde185934582b8aedd7eb905d1b72d304dc3c411dee355feb51377088d979fcb53d46443e17f2a31f09b1f7db9175666f2f1 EBUILD elasticsearch-0.90.6.ebuild 2226 SHA256 330162de81849d877699349204b0746c5aa9487c216d196534d9d271e3729bfa SHA512 4b9bcc27281a90ed739a301386ca7f2627d5ec0241ab8e9a8ec808d5d65052e13eb3c44c402d0094cc47662a24dc7078c4eccc60efc3a20658cc5bfc0c22534f WHIRLPOOL d80f47cf9d625fc7fddc314441f8cb94e3d26d78c482fca4a88000a9d6da7eb979a7a7a3a2e1136d5dcd59958ed8560abe1bc1f164f5c8a328081529f78c7892 -MISC ChangeLog 636 SHA256 493fd8ba2dd8928784b362c1c69672cea8cfd34473c1ba19a02361e9bb7aa3d9 SHA512 6933442fd57533d9904f31006111e7c6fb6fb160daeeb024e404a9b510edefce76b660ba9022980c9dd80e0d12b064ca166bd9a181c0b4be5001127852501013 WHIRLPOOL 762779794a5d3190aaf5cb0f6df4cac792b4bc9d10ebe8aac9f5cfbeec837e701bc4a1d622633adcb42ca3e09d40cf1ca36db3dc08198191dfe998d1b36b959f +MISC ChangeLog 868 SHA256 d9163dc946e05bb94f9f328c54514a5eae2579c1bded3b674da066a0fb83589d SHA512 5fa24f567088642a057cb23d512345046f2b2fc2b1f7bd887012c64651a2c060f2241a5b052e5dd5b7b7cdcf1496c226189311fd515e364366d2c9e0d257e97b WHIRLPOOL 8f7c6314a5b61787c72f9996fb45b4fd027a3330b107da21b69fe78715974fd25b9fa887e84008a3def8ec5e5a54ebdcb301bf6136f8213004320372a5e8d3ad MISC metadata.xml 237 SHA256 88d9092fd208599a8b524cca9633d9330223e45c34a44e54b2de05edb4738ac7 SHA512 11773ab2b5adaa81f3c8f73413d2f257ea1d1624df689154ee2697412ff14ea8f9851b805c4a474b486abb0a066cfc929f91eb852a208b9536885d467df36af1 WHIRLPOOL 324b778d3103d615af41fd6d1d978beeeeb08f4823a3c81fd453464b4df2ed59b56a481ddd65b4eb740dc75b4dc69133e761199abe6d27333b1fce97d5b5a1be -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iEYEAREIAAYFAlJ7WxcACgkQp5vW4rUFj5pk+ACglwZfAa+wAPQrQ1vi8o9sUCTA -Ut0Anjs92HhhldrGGw8pk5rJ5f3vQTzF -=6A/m +iEYEAREIAAYFAlKV9zcACgkQp5vW4rUFj5qwwQCfV6IQ/ZysXPLvZGtmBP4o3EoW +tFgAoIWnwebTcqV55God04bU7DDryVkW +=jIYU -----END PGP SIGNATURE----- diff --git a/app-misc/elasticsearch/elasticsearch-0.90.6-r1.ebuild b/app-misc/elasticsearch/elasticsearch-0.90.6-r1.ebuild new file mode 100644 index 000000000000..db1fac018602 --- /dev/null +++ b/app-misc/elasticsearch/elasticsearch-0.90.6-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-misc/elasticsearch/elasticsearch-0.90.6-r1.ebuild,v 1.1 2013/11/27 13:44:30 chainsaw Exp $ + +EAPI=5 + +inherit eutils systemd + +MY_PN="${PN%-bin}" +DESCRIPTION="Open Source, Distributed, RESTful, Search Engine" +HOMEPAGE="http://www.elasticsearch.org/" +SRC_URI="http://download.${MY_PN}.org/${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" + +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 lib/sigar/libsigar-ia64-linux.so + rm LICENSE.txt + + mv bin/${MY_PN}.in.sh bin/${MY_PN}.in.sh.sample + for file in config/* ; do + mv ${file} ${file}.sample + done + + use amd64 && { + rm lib/sigar/libsigar-x86-linux.so + } + + use x86 && { + rm lib/sigar/libsigar-amd64-linux.so + } +} + +src_install() { + dodir /etc/${MY_PN} + insinto /etc/${MY_PN} + doins bin/${MY_PN}.in.sh.sample + doins config/* + rm bin/${MY_PN}.in.sh.sample + rm -rf config + + insinto /usr/share/${MY_PN} + doins -r ./* + chmod +x "${D}"/usr/share/${MY_PN}/bin/* + + keepdir /var/{lib,log}/${MY_PN} + + local rcscript=elasticsearch.init2 + local eshome="/usr/share/${MY_PN}" + local jarfile="${MY_PN}-${PV}.jar" + local esclasspath="${eshome}/lib/${jarfile}:${eshome}/lib/*:${eshome}/lib/sigar/*" + + cp "${FILESDIR}/${rcscript}" "${T}" || die + sed -i \ + -e "s|@ES_CLASS_PATH@|${esclasspath}|" \ + "${T}/${rcscript}" \ + || die "failed to filter ${rcscript}" + + newinitd "${T}/${rcscript}" "${MY_PN}" + newconfd "${FILESDIR}/${MY_PN}.conf" "${MY_PN}" + systemd_dounit "${FILESDIR}"/${PN}.service +} + +pkg_postinst() { + elog + elog "You may create multiple instances of ${MY_PN} by" + elog "symlinking the init script ln -sf /etc/init.d/${MY_PN} /etc/init.d/${MY_PN}.instance" + elog + elog "Each of the *.sample files in /etc/${MY_PN} should be copied" + elog "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.init2 b/app-misc/elasticsearch/files/elasticsearch.init2 new file mode 100644 index 000000000000..5fbb2e97285d --- /dev/null +++ b/app-misc/elasticsearch/files/elasticsearch.init2 @@ -0,0 +1,87 @@ +#!/sbin/runscript + +name="ElasticSearch" +description="" + +ES_USER=${ES_USER:="elasticsearch"} +ES_INSTANCE=${SVCNAME#*.} +export ES_CLASSPATH="@ES_CLASS_PATH@" + +if [ -n "${ES_INSTANCE}" ] && [ ${SVCNAME} != "elasticsearch" ]; then + PIDFILE="/run/elasticsearch/elasticsearch.${ES_INSTANCE}.pid" + ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}" + ES_CONF_PATH="/etc/elasticsearch/${ES_INSTANCE}" + ES_LOG_PATH="/var/log/elasticsearch/${ES_INSTANCE}" +else + PIDFILE="/run/elasticsearch/elasticsearch.pid" + ES_BASE_PATH="/var/lib/elasticsearch/_default" + ES_CONF_PATH="/etc/elasticsearch" + ES_LOG_PATH="/var/log/elasticsearch/_default" +fi + +ES_DATA_PATH="${ES_BASE_PATH}/data" +ES_WORK_PATH="${ES_BASE_PATH}/work" + +export ES_INCLUDE="${ES_CONF_PATH}/elasticsearch.in.sh" +export JAVA_OPTS +export ES_JAVA_OPTS +export ES_HEAP_SIZE +export ES_HEAP_NEWSIZE +export ES_DIRECT_SIZE +export ES_USE_IPV4 + +server_command="/usr/share/elasticsearch/bin/elasticsearch" +server_args=" -p ${PIDFILE} -f -Des.path.conf=\"${ES_CONF_PATH}\" -Des.path.data=\"${ES_DATA_PATH}\" -Des.path.work=\"${ES_WORK_PATH}\" -Des.path.logs=\"${ES_LOG_PATH}\"" + +depend() { + use net +} + +start() { + # elasticsearch -f -Des.config=/path/to/config/file + # elasticsearch -f -Des.network.host=10.0.0.4 + + [ ! -f "${ES_INCLUDE}" ] && { + eerror "${ES_INCLUDE} must be copied into place" + return 1 + } + + local conf + local conf_file + for conf in elasticsearch.yml logging.yml; do + conf_file="${ES_CONF_PATH}/${conf}" + if [ ! -f "${conf_file}" ]; then + eerror "${conf_file} must be copied into place" + return 1 + fi + done + + ebegin "Starting ${SVCNAME}" + + if [ -n "${ES_MAX_FD}" ]; then + ulimit -n ${ES_MAX_FD} + einfo "Max open filedescriptors : ${ES_MAX_FD}" + fi + + + checkpath -d -o "${ES_USER}" -m750 "/var/lib/elasticsearch" + checkpath -d -o "${ES_USER}" -m750 "/var/log/elasticsearch" + checkpath -d -o "${ES_USER}" -m750 "$(dirname "${PIDFILE}")" + checkpath -d -o "${ES_USER}" -m750 "${ES_BASE_PATH}" + checkpath -d -o "${ES_USER}" -m750 "${ES_LOG_PATH}" + + start-stop-daemon --start \ + --background \ + --chdir "${ES_BASE_PATH}" \ + --user="${ES_USER}" \ + --pidfile="${PIDFILE}" \ + --exec ${server_command} -- ${server_args} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop \ + --pidfile=${PIDFILE} + eend $? +} |