diff options
-rw-r--r-- | databases/elasticsearch/Makefile | 41 | ||||
-rw-r--r-- | databases/elasticsearch/PLIST | 134 | ||||
-rw-r--r-- | databases/elasticsearch/distinfo | 16 | ||||
-rw-r--r-- | databases/elasticsearch/files/elasticsearch.sh | 8 | ||||
-rw-r--r-- | databases/elasticsearch/files/smf/manifest.xml | 6 | ||||
-rw-r--r-- | databases/elasticsearch/patches/patch-bin_elasticsearch | 21 | ||||
-rw-r--r-- | databases/elasticsearch/patches/patch-bin_elasticsearch-plugin | 30 | ||||
-rw-r--r-- | databases/elasticsearch/patches/patch-bin_elasticsearch.in.sh | 15 | ||||
-rw-r--r-- | databases/elasticsearch/patches/patch-bin_plugin | 36 | ||||
-rw-r--r-- | databases/elasticsearch/patches/patch-config_elasticsearch.yml | 15 |
10 files changed, 185 insertions, 137 deletions
diff --git a/databases/elasticsearch/Makefile b/databases/elasticsearch/Makefile index 1a284fb58a1..63beacfd6df 100644 --- a/databases/elasticsearch/Makefile +++ b/databases/elasticsearch/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.19 2016/10/26 13:56:30 fhajny Exp $ +# $NetBSD: Makefile,v 1.20 2016/11/08 09:18:00 fhajny Exp $ -DISTNAME= elasticsearch-2.4.1 +DISTNAME= elasticsearch-5.0.0 CATEGORIES= textproc -MASTER_SITES= https://download.elasticsearch.org/elasticsearch/elasticsearch/ +MASTER_SITES= https://artifacts.elastic.co/downloads/elasticsearch/ MAINTAINER= imil@NetBSD.org HOMEPAGE= http://www.elasticsearch.org/ @@ -11,30 +11,29 @@ LICENSE= apache-2.0 USE_LANGUAGES= # none USE_JAVA= run -USE_JAVA2= yes +USE_JAVA2= 8 +USE_TOOLS+= bash:run pax NO_BUILD= yes PKG_SYSCONFSUBDIR= elasticsearch EGDIR= ${PREFIX}/share/examples/elasticsearch -CONFS= elasticsearch.yml logging.yml +CONFS= elasticsearch.yml jvm.options log4j2.properties .for f in ${CONFS} CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f} .endfor DOCS= LICENSE.txt NOTICE.txt README.textile -BINS= elasticsearch elasticsearch.in.sh plugin .include "../../mk/bsd.prefs.mk" -BUILD_DEFS+= ES_USER ES_GROUP ES_DBDIR ES_LOGDIR ES_PIDDIR ES_TMPDIR +BUILD_DEFS+= ES_USER ES_GROUP ES_DBDIR ES_LOGDIR ES_PIDDIR ES_USER?= elasticsearch ES_GROUP?= ${ES_USER} -ES_LIBDIR?= ${PREFIX}/lib/elasticsearch +ES_BASEDIR?= ${PREFIX}/lib/elasticsearch ES_DBDIR?= ${VARBASE}/db/elasticsearch ES_LOGDIR?= ${VARBASE}/log/elasticsearch ES_PIDDIR?= ${VARBASE}/run -ES_TMPDIR?= ${VARBASE}/tmp/elasticsearch PKG_USERS_VARS+= ES_USER PKG_GROUPS_VARS+= ES_GROUP @@ -42,25 +41,26 @@ PKG_GROUPS= ${ES_GROUP} PKG_USERS= ${ES_USER}:${ES_GROUP} FILES_SUBST+= JAVA_HOME=${PKG_JAVA_HOME} ES_USER=${ES_USER} \ - ES_GROUP=${ES_GROUP} ES_LIBDIR=${ES_LIBDIR} \ + ES_GROUP=${ES_GROUP} ES_BASEDIR=${ES_BASEDIR} \ ES_LOGDIR=${ES_LOGDIR} ES_PIDDIR=${ES_PIDDIR} \ - ES_DBDIR=${ES_DBDIR} ES_TMPDIR=${ES_TMPDIR} \ + ES_DBDIR=${ES_DBDIR} \ DISTNAME=${DISTNAME} RCD_SCRIPTS= elasticsearch -OWN_DIRS+= ${ES_LIBDIR}/plugins +OWN_DIRS+= ${ES_BASEDIR}/plugins OWN_DIRS_PERMS+= ${ES_LOGDIR} ${ES_USER} ${ES_GROUP} 0700 OWN_DIRS_PERMS+= ${ES_DBDIR} ${ES_USER} ${ES_GROUP} 0700 -OWN_DIRS_PERMS+= ${ES_TMPDIR} ${ES_USER} ${ES_GROUP} 0700 MAKE_DIRS+= ${PKG_SYSCONFDIR}/scripts -INSTALLATION_DIRS+= ${ES_LIBDIR} ${PREFIX}/libexec/elasticsearch + +REPLACE_BASH+= bin/elasticsearch bin/elasticsearch.in.sh bin/elasticsearch-plugin +INSTALLATION_DIRS+= bin ${ES_BASEDIR}/bin INSTALLATION_DIRS+= ${EGDIR} ${PREFIX}/share/doc/elasticsearch SUBST_CLASSES+= paths SUBST_STAGE.paths= pre-configure -SUBST_FILES.paths= bin/plugin config/elasticsearch.yml -SUBST_VARS.paths= PKG_JAVA_HOME PKG_SYSCONFDIR PREFIX ES_DBDIR ES_LIBDIR ES_LOGDIR ES_TMPDIR +SUBST_FILES.paths= bin/elasticsearch bin/elasticsearch-plugin config/elasticsearch.yml +SUBST_VARS.paths= PKG_JAVA_HOME PKG_SYSCONFDIR ES_DBDIR ES_BASEDIR ES_LOGDIR do-install: .for f in ${CONFS} @@ -70,11 +70,10 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/${f} \ ${DESTDIR}${PREFIX}/share/doc/elasticsearch .endfor -.for f in ${BINS} - ${INSTALL_SCRIPT} ${WRKSRC}/bin/${f} \ - ${DESTDIR}${PREFIX}/libexec/elasticsearch -.endfor - ${INSTALL_DATA} ${WRKSRC}/lib/*.jar ${DESTDIR}${ES_LIBDIR} + ${INSTALL_SCRIPT} ${WRKSRC}/bin/elasticsearch ${DESTDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/bin/elasticsearch-plugin ${DESTDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/bin/elasticsearch.in.sh ${DESTDIR}${ES_BASEDIR}/bin + cd ${WRKSRC} && ${PAX} -rw -pp lib modules ${DESTDIR}${ES_BASEDIR} .include "../../mk/java-vm.mk" .include "../../mk/bsd.pkg.mk" diff --git a/databases/elasticsearch/PLIST b/databases/elasticsearch/PLIST index e52ea5e3eda..3eb4f5f6779 100644 --- a/databases/elasticsearch/PLIST +++ b/databases/elasticsearch/PLIST @@ -1,46 +1,96 @@ -@comment $NetBSD: PLIST,v 1.12 2016/09/19 12:28:31 fhajny Exp $ -lib/elasticsearch/HdrHistogram-2.1.6.jar -lib/elasticsearch/apache-log4j-extras-1.2.17.jar -lib/elasticsearch/commons-cli-1.3.1.jar -lib/elasticsearch/compiler-0.8.13.jar -lib/elasticsearch/compress-lzf-1.0.2.jar -lib/elasticsearch/${PKGNAME}.jar -lib/elasticsearch/guava-18.0.jar -lib/elasticsearch/hppc-0.7.1.jar -lib/elasticsearch/jackson-core-2.8.1.jar -lib/elasticsearch/jackson-dataformat-cbor-2.8.1.jar -lib/elasticsearch/jackson-dataformat-smile-2.8.1.jar -lib/elasticsearch/jackson-dataformat-yaml-2.8.1.jar -lib/elasticsearch/jna-4.1.0.jar -lib/elasticsearch/joda-convert-1.2.jar -lib/elasticsearch/joda-time-2.9.4.jar -lib/elasticsearch/jsr166e-1.1.0.jar -lib/elasticsearch/jts-1.13.jar -lib/elasticsearch/log4j-1.2.17.jar -lib/elasticsearch/lucene-analyzers-common-5.5.2.jar -lib/elasticsearch/lucene-backward-codecs-5.5.2.jar -lib/elasticsearch/lucene-core-5.5.2.jar -lib/elasticsearch/lucene-grouping-5.5.2.jar -lib/elasticsearch/lucene-highlighter-5.5.2.jar -lib/elasticsearch/lucene-join-5.5.2.jar -lib/elasticsearch/lucene-memory-5.5.2.jar -lib/elasticsearch/lucene-misc-5.5.2.jar -lib/elasticsearch/lucene-queries-5.5.2.jar -lib/elasticsearch/lucene-queryparser-5.5.2.jar -lib/elasticsearch/lucene-sandbox-5.5.2.jar -lib/elasticsearch/lucene-spatial-5.5.2.jar -lib/elasticsearch/lucene-spatial3d-5.5.2.jar -lib/elasticsearch/lucene-suggest-5.5.2.jar -lib/elasticsearch/netty-3.10.6.Final.jar -lib/elasticsearch/securesm-1.0.jar -lib/elasticsearch/snakeyaml-1.15.jar -lib/elasticsearch/spatial4j-0.5.jar -lib/elasticsearch/t-digest-3.0.jar -libexec/elasticsearch/elasticsearch -libexec/elasticsearch/elasticsearch.in.sh -libexec/elasticsearch/plugin +@comment $NetBSD: PLIST,v 1.13 2016/11/08 09:18:00 fhajny Exp $ +bin/elasticsearch +bin/elasticsearch-plugin +lib/elasticsearch/bin/elasticsearch.in.sh +lib/elasticsearch/lib/HdrHistogram-2.1.6.jar +lib/elasticsearch/lib/${PKGNAME}.jar +lib/elasticsearch/lib/hppc-0.7.1.jar +lib/elasticsearch/lib/jackson-core-2.8.1.jar +lib/elasticsearch/lib/jackson-dataformat-cbor-2.8.1.jar +lib/elasticsearch/lib/jackson-dataformat-smile-2.8.1.jar +lib/elasticsearch/lib/jackson-dataformat-yaml-2.8.1.jar +lib/elasticsearch/lib/jna-4.2.2.jar +lib/elasticsearch/lib/joda-convert-1.2.jar +lib/elasticsearch/lib/joda-time-2.9.4.jar +lib/elasticsearch/lib/jopt-simple-5.0.2.jar +lib/elasticsearch/lib/jts-1.13.jar +lib/elasticsearch/lib/log4j-1.2-api-2.6.2.jar +lib/elasticsearch/lib/log4j-api-2.6.2.jar +lib/elasticsearch/lib/log4j-core-2.6.2.jar +lib/elasticsearch/lib/lucene-analyzers-common-6.2.0.jar +lib/elasticsearch/lib/lucene-backward-codecs-6.2.0.jar +lib/elasticsearch/lib/lucene-core-6.2.0.jar +lib/elasticsearch/lib/lucene-grouping-6.2.0.jar +lib/elasticsearch/lib/lucene-highlighter-6.2.0.jar +lib/elasticsearch/lib/lucene-join-6.2.0.jar +lib/elasticsearch/lib/lucene-memory-6.2.0.jar +lib/elasticsearch/lib/lucene-misc-6.2.0.jar +lib/elasticsearch/lib/lucene-queries-6.2.0.jar +lib/elasticsearch/lib/lucene-queryparser-6.2.0.jar +lib/elasticsearch/lib/lucene-sandbox-6.2.0.jar +lib/elasticsearch/lib/lucene-spatial-6.2.0.jar +lib/elasticsearch/lib/lucene-spatial-extras-6.2.0.jar +lib/elasticsearch/lib/lucene-spatial3d-6.2.0.jar +lib/elasticsearch/lib/lucene-suggest-6.2.0.jar +lib/elasticsearch/lib/securesm-1.1.jar +lib/elasticsearch/lib/snakeyaml-1.15.jar +lib/elasticsearch/lib/spatial4j-0.6.jar +lib/elasticsearch/lib/t-digest-3.0.jar +lib/elasticsearch/modules/aggs-matrix-stats/aggs-matrix-stats-${PKGVERSION}.jar +lib/elasticsearch/modules/aggs-matrix-stats/plugin-descriptor.properties +lib/elasticsearch/modules/ingest-common/ingest-common-${PKGVERSION}.jar +lib/elasticsearch/modules/ingest-common/jcodings-1.0.12.jar +lib/elasticsearch/modules/ingest-common/joni-2.1.6.jar +lib/elasticsearch/modules/ingest-common/plugin-descriptor.properties +lib/elasticsearch/modules/lang-expression/antlr4-runtime-4.5.1-1.jar +lib/elasticsearch/modules/lang-expression/asm-5.0.4.jar +lib/elasticsearch/modules/lang-expression/asm-commons-5.0.4.jar +lib/elasticsearch/modules/lang-expression/asm-tree-5.0.4.jar +lib/elasticsearch/modules/lang-expression/lang-expression-${PKGVERSION}.jar +lib/elasticsearch/modules/lang-expression/lucene-expressions-6.2.0.jar +lib/elasticsearch/modules/lang-expression/plugin-descriptor.properties +lib/elasticsearch/modules/lang-expression/plugin-security.policy +lib/elasticsearch/modules/lang-groovy/groovy-2.4.6-indy.jar +lib/elasticsearch/modules/lang-groovy/lang-groovy-${PKGVERSION}.jar +lib/elasticsearch/modules/lang-groovy/plugin-descriptor.properties +lib/elasticsearch/modules/lang-groovy/plugin-security.policy +lib/elasticsearch/modules/lang-mustache/compiler-0.9.3.jar +lib/elasticsearch/modules/lang-mustache/lang-mustache-${PKGVERSION}.jar +lib/elasticsearch/modules/lang-mustache/plugin-descriptor.properties +lib/elasticsearch/modules/lang-mustache/plugin-security.policy +lib/elasticsearch/modules/lang-painless/antlr4-runtime-4.5.1-1.jar +lib/elasticsearch/modules/lang-painless/asm-debug-all-5.1.jar +lib/elasticsearch/modules/lang-painless/lang-painless-${PKGVERSION}.jar +lib/elasticsearch/modules/lang-painless/plugin-descriptor.properties +lib/elasticsearch/modules/lang-painless/plugin-security.policy +lib/elasticsearch/modules/percolator/percolator-${PKGVERSION}.jar +lib/elasticsearch/modules/percolator/plugin-descriptor.properties +lib/elasticsearch/modules/reindex/commons-codec-1.10.jar +lib/elasticsearch/modules/reindex/commons-logging-1.1.3.jar +lib/elasticsearch/modules/reindex/httpasyncclient-4.1.2.jar +lib/elasticsearch/modules/reindex/httpclient-4.5.2.jar +lib/elasticsearch/modules/reindex/httpcore-4.4.5.jar +lib/elasticsearch/modules/reindex/httpcore-nio-4.4.5.jar +lib/elasticsearch/modules/reindex/plugin-descriptor.properties +lib/elasticsearch/modules/reindex/reindex-${PKGVERSION}.jar +lib/elasticsearch/modules/reindex/rest-${PKGVERSION}.jar +lib/elasticsearch/modules/transport-netty3/netty-3.10.6.Final.jar +lib/elasticsearch/modules/transport-netty3/plugin-descriptor.properties +lib/elasticsearch/modules/transport-netty3/plugin-security.policy +lib/elasticsearch/modules/transport-netty3/transport-netty3-${PKGVERSION}.jar +lib/elasticsearch/modules/transport-netty4/netty-buffer-4.1.5.Final.jar +lib/elasticsearch/modules/transport-netty4/netty-codec-4.1.5.Final.jar +lib/elasticsearch/modules/transport-netty4/netty-codec-http-4.1.5.Final.jar +lib/elasticsearch/modules/transport-netty4/netty-common-4.1.5.Final.jar +lib/elasticsearch/modules/transport-netty4/netty-handler-4.1.5.Final.jar +lib/elasticsearch/modules/transport-netty4/netty-resolver-4.1.5.Final.jar +lib/elasticsearch/modules/transport-netty4/netty-transport-4.1.5.Final.jar +lib/elasticsearch/modules/transport-netty4/plugin-descriptor.properties +lib/elasticsearch/modules/transport-netty4/plugin-security.policy +lib/elasticsearch/modules/transport-netty4/transport-netty4-${PKGVERSION}.jar share/doc/elasticsearch/LICENSE.txt share/doc/elasticsearch/NOTICE.txt share/doc/elasticsearch/README.textile share/examples/elasticsearch/elasticsearch.yml -share/examples/elasticsearch/logging.yml +share/examples/elasticsearch/jvm.options +share/examples/elasticsearch/log4j2.properties diff --git a/databases/elasticsearch/distinfo b/databases/elasticsearch/distinfo index a421a40b913..86a2f1b4ee2 100644 --- a/databases/elasticsearch/distinfo +++ b/databases/elasticsearch/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.20 2016/10/26 13:56:30 fhajny Exp $ +$NetBSD: distinfo,v 1.21 2016/11/08 09:18:00 fhajny Exp $ -SHA1 (elasticsearch-2.4.1.tar.gz) = 6a6acfc7bf7b4354dc6136daea54db1c844d632f -RMD160 (elasticsearch-2.4.1.tar.gz) = b8accded2531c9d472ce7ce992b901fa5a9f50fd -SHA512 (elasticsearch-2.4.1.tar.gz) = 69b22d5c2fc93e9bc83c5da415e110105d4d977aa98633041f51f8c55ba9e6045803584965367f6e1f962122ad81a8e07fefcc5a01c5381057ec921d65bc1751 -Size (elasticsearch-2.4.1.tar.gz) = 27364109 bytes -SHA1 (patch-bin_elasticsearch.in.sh) = b97658a7aa8867f2428dcaae6e7c4a191d13e612 -SHA1 (patch-bin_plugin) = 5ddd9b55797305c2c1e77b174ae410c00ecb7b89 -SHA1 (patch-config_elasticsearch.yml) = 7729dfb1ed106f0a34e6daaf7a46d0352d42f1f1 +SHA1 (elasticsearch-5.0.0.tar.gz) = d25f6547bccec9f0b5ea7583815f96a6f50849e0 +RMD160 (elasticsearch-5.0.0.tar.gz) = 1faf172c058d3ca11487938520adee88464889ac +SHA512 (elasticsearch-5.0.0.tar.gz) = a4fa650d643c242a1f90059cfe6eb27e3d240b3deafc426abeae72c13aeae84b01ffb8b872b748619dfc58225ca29bde054fe10e1529522f9a06a1051991e4cd +Size (elasticsearch-5.0.0.tar.gz) = 32968292 bytes +SHA1 (patch-bin_elasticsearch) = 5360818fb870c0005e23f0fb247efa247a909f47 +SHA1 (patch-bin_elasticsearch-plugin) = 56db071765b91a4846e1529b5fe8be2c549b449d +SHA1 (patch-config_elasticsearch.yml) = 8a59f9123b8bc1c40d17131dc51c361fa210c17c diff --git a/databases/elasticsearch/files/elasticsearch.sh b/databases/elasticsearch/files/elasticsearch.sh index eba90e6d385..e2f683772bf 100644 --- a/databases/elasticsearch/files/elasticsearch.sh +++ b/databases/elasticsearch/files/elasticsearch.sh @@ -1,6 +1,6 @@ #! @RCD_SCRIPTS_SHELL@ # -# $NetBSD: elasticsearch.sh,v 1.3 2015/11/12 15:37:07 fhajny Exp $ +# $NetBSD: elasticsearch.sh,v 1.4 2016/11/08 09:18:01 fhajny Exp $ # # PROVIDE: elasticsearch # REQUIRE: DAEMON @@ -22,12 +22,12 @@ start_precmd="elasticsearch_precmd" : ${elasticsearch_props:=""} : ${elasticsearch_fdlimit:="768"} -ES_CLASSPATH="@ES_LIBDIR@/@DISTNAME@.jar:@ES_LIBDIR@/*" +ES_CLASSPATH="@ES_BASEDIR@/lib/@DISTNAME@.jar:@ES_BASEDIR@/lib/*" command="@PKG_JAVA_HOME@/bin/java" # flags taken from bin/elasticsearch and bin/elasticsearch.in.sh command_args=" -Delasticsearch \ - -Des.path.home=@PREFIX@ \ + -Des.path.home=@ES_BASEDIR@ \ -Des.path.conf=@PKG_SYSCONFDIR@ \ -Des.pidfile=${pidfile} \ -Dfile.encoding=UTF-8 \ @@ -45,7 +45,7 @@ command_args=" -Delasticsearch \ -cp ${ES_CLASSPATH} \ ${elasticsearch_props} \ org.elasticsearch.bootstrap.Elasticsearch \ - start >/dev/null &" + >/dev/null &" # ElasticSearch is fd hungry, default limit leads to write locks SOFT_FDLIMIT=`ulimit -S -n` diff --git a/databases/elasticsearch/files/smf/manifest.xml b/databases/elasticsearch/files/smf/manifest.xml index 8f83760664e..695f3de34e2 100644 --- a/databases/elasticsearch/files/smf/manifest.xml +++ b/databases/elasticsearch/files/smf/manifest.xml @@ -13,21 +13,21 @@ <dependent name='elasticsearch' restart_on='none' grouping='optional_all'> <service_fmri value='svc:/milestone/multi-user' /> </dependent> - <method_context working_directory='@ES_TMPDIR@'> + <method_context working_directory='@ES_DBDIR@'> <method_credential user='@ES_USER@' group='@ES_GROUP@' /> <method_environment> <envvar name='PATH' value='@PREFIX@/bin:@PREFIX@/sbin:/usr/bin:/usr/sbin' /> <envvar name='JAVA_HOME' value='@PKG_JAVA_HOME@' /> </method_environment> </method_context> - <exec_method name='start' type='method' exec='@PKG_JAVA_HOME@/bin/java -Delasticsearch -Des.path.home=@PREFIX@ -Des.path.conf=@PKG_SYSCONFDIR@ -Des.pidfile=@ES_PIDDIR@/elasticsearch.pid -Des.index.store.type=%{store_type} %{java_opts} -Xms%{min_heap} -Xmx%{max_heap} -cp %{class_path} org.elasticsearch.bootstrap.Elasticsearch start' timeout_seconds='3600' /> + <exec_method name='start' type='method' exec='@PKG_JAVA_HOME@/bin/java -Delasticsearch -Des.path.home=@ES_BASEDIR@ -Des.path.conf=@PKG_SYSCONFDIR@ -Des.pidfile=@ES_PIDDIR@/elasticsearch.pid -Des.index.store.type=%{store_type} %{java_opts} -Xms%{min_heap} -Xmx%{max_heap} -cp %{class_path} org.elasticsearch.bootstrap.Elasticsearch' timeout_seconds='3600' /> <exec_method type='method' name='stop' exec=':kill' timeout_seconds='60' /> <exec_method type='method' name='refresh' exec=':kill -HUP' timeout_seconds='60' /> <property_group name='application' type='application'> <propval name='min_heap' type='astring' value='256m' /> <propval name='max_heap' type='astring' value='1g' /> <propval name='store_type' type='astring' value='niofs' /> - <propval name='class_path' type='astring' value='@ES_LIBDIR@/@DISTNAME@.jar:@ES_LIBDIR@/*' /> + <propval name='class_path' type='astring' value='@ES_BASEDIR@/lib/@DISTNAME@.jar:@ES_BASEDIR@/lib/*' /> <property name='java_opts' type='astring'> <astring_list> <value_node value='-Dfile.encoding=UTF-8'/> diff --git a/databases/elasticsearch/patches/patch-bin_elasticsearch b/databases/elasticsearch/patches/patch-bin_elasticsearch new file mode 100644 index 00000000000..b694be39d75 --- /dev/null +++ b/databases/elasticsearch/patches/patch-bin_elasticsearch @@ -0,0 +1,21 @@ +$NetBSD: patch-bin_elasticsearch,v 1.1 2016/11/08 09:18:01 fhajny Exp $ + +Default paths. + +--- bin/elasticsearch.orig 2016-10-26 04:35:54.000000000 +0000 ++++ bin/elasticsearch +@@ -104,8 +104,13 @@ while [ -h "$SCRIPT" ] ; do + fi + done + ++#set default JAVA_HOME ++if [ -z "$JAVA_HOME" ]; then ++ JAVA_HOME="@PKG_JAVA_HOME@" ++fi ++ + # determine elasticsearch home +-ES_HOME=`dirname "$SCRIPT"`/.. ++ES_HOME="@ES_BASEDIR@" + + # make ELASTICSEARCH_HOME absolute + ES_HOME=`cd "$ES_HOME"; pwd` diff --git a/databases/elasticsearch/patches/patch-bin_elasticsearch-plugin b/databases/elasticsearch/patches/patch-bin_elasticsearch-plugin new file mode 100644 index 00000000000..7c764b6de5d --- /dev/null +++ b/databases/elasticsearch/patches/patch-bin_elasticsearch-plugin @@ -0,0 +1,30 @@ +$NetBSD: patch-bin_elasticsearch-plugin,v 1.1 2016/11/08 09:18:01 fhajny Exp $ + +Default paths. + +--- bin/elasticsearch-plugin.orig 2016-10-26 04:35:54.000000000 +0000 ++++ bin/elasticsearch-plugin +@@ -15,8 +15,13 @@ while [ -h "$SCRIPT" ] ; do + fi + done + ++#set default JAVA_HOME ++if [ -z "$JAVA_HOME" ]; then ++ JAVA_HOME="@PKG_JAVA_HOME@" ++fi ++ + # determine elasticsearch home +-ES_HOME=`dirname "$SCRIPT"`/.. ++ES_HOME="@ES_BASEDIR@" + + # make ELASTICSEARCH_HOME absolute + ES_HOME=`cd "$ES_HOME"; pwd` +@@ -23,7 +29,7 @@ ES_HOME=`cd "$ES_HOME"; pwd` + + # Sets the default values for elasticsearch variables used in this script + if [ -z "$CONF_DIR" ]; then +- CONF_DIR="$ES_HOME/config" ++ CONF_DIR="@PKG_SYSCONFDIR@" + fi + + # The default env file is defined at building/packaging time. diff --git a/databases/elasticsearch/patches/patch-bin_elasticsearch.in.sh b/databases/elasticsearch/patches/patch-bin_elasticsearch.in.sh deleted file mode 100644 index a31efbff99e..00000000000 --- a/databases/elasticsearch/patches/patch-bin_elasticsearch.in.sh +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-bin_elasticsearch.in.sh,v 1.7 2016/10/26 13:56:30 fhajny Exp $ - -Fix paths. - ---- bin/elasticsearch.in.sh.orig 2015-10-21 08:41:12.000000000 +0000 -+++ bin/elasticsearch.in.sh -@@ -10,7 +10,7 @@ EOF - exit 1 - fi - --ES_CLASSPATH="$ES_HOME/lib/elasticsearch-2.4.1.jar:$ES_HOME/lib/*" -+ES_CLASSPATH="@ES_LIBDIR@/elasticsearch-2.4.1.jar:@ES_LIBDIR@/*" - - if [ "x$ES_MIN_MEM" = "x" ]; then - ES_MIN_MEM=256m diff --git a/databases/elasticsearch/patches/patch-bin_plugin b/databases/elasticsearch/patches/patch-bin_plugin deleted file mode 100644 index 8e3bcd74560..00000000000 --- a/databases/elasticsearch/patches/patch-bin_plugin +++ /dev/null @@ -1,36 +0,0 @@ -$NetBSD: patch-bin_plugin,v 1.2 2015/11/12 15:37:08 fhajny Exp $ - -Fix paths and improve portability. - ---- bin/plugin.orig 2015-10-21 13:32:03.000000000 +0000 -+++ bin/plugin -@@ -16,8 +16,13 @@ while [ -h "$SCRIPT" ] ; do - fi - done - -+#set default JAVA_HOME -+if [ -z "$JAVA_HOME" ]; then -+ JAVA_HOME="@PKG_JAVA_HOME@" -+fi -+ - # determine elasticsearch home --ES_HOME=`dirname "$SCRIPT"`/.. -+ES_HOME="@PREFIX@" - - # make ELASTICSEARCH_HOME absolute - ES_HOME=`cd "$ES_HOME"; pwd` -@@ -25,7 +30,7 @@ ES_HOME=`cd "$ES_HOME"; pwd` - - # Sets the default values for elasticsearch variables used in this script - if [ -z "$CONF_DIR" ]; then -- CONF_DIR="$ES_HOME/config" -+ CONF_DIR="@PKG_SYSCONFDIR@" - fi - - # The default env file is defined at building/packaging time. -@@ -105,4 +110,4 @@ fi - HOSTNAME=`hostname | cut -d. -f1` - export HOSTNAME - --eval "$JAVA" -client -Delasticsearch -Des.path.home="\"$ES_HOME\"" $properties -cp "\"$ES_HOME/lib/*\"" org.elasticsearch.plugins.PluginManagerCliParser $args -+eval "$JAVA" -client -Delasticsearch -Des.path.home="\"$ES_HOME\"" $properties -cp "\"@ES_LIBDIR@/*\"" org.elasticsearch.plugins.PluginManagerCliParser $args diff --git a/databases/elasticsearch/patches/patch-config_elasticsearch.yml b/databases/elasticsearch/patches/patch-config_elasticsearch.yml index c77b86783f2..f9340a9a1bd 100644 --- a/databases/elasticsearch/patches/patch-config_elasticsearch.yml +++ b/databases/elasticsearch/patches/patch-config_elasticsearch.yml @@ -1,23 +1,22 @@ -$NetBSD: patch-config_elasticsearch.yml,v 1.4 2015/11/12 15:37:08 fhajny Exp $ +$NetBSD: patch-config_elasticsearch.yml,v 1.5 2016/11/08 09:18:01 fhajny Exp $ Define various paths ---- config/elasticsearch.yml.orig 2015-10-21 08:41:12.000000000 +0000 +--- config/elasticsearch.yml.orig 2016-10-26 04:35:54.000000000 +0000 +++ config/elasticsearch.yml -@@ -31,10 +31,16 @@ +@@ -31,10 +31,15 @@ # Path to directory where to store the data (separate multiple locations by comma): # - # path.data: /path/to/data + #path.data: /path/to/data +path.data: @ES_DBDIR@ # # Path to log files: # - # path.logs: /path/to/logs + #path.logs: /path/to/logs +path.logs: @ES_LOGDIR@ -+ ++# ++# Path to config files +path.conf: @PKG_SYSCONFDIR@ -+path.plugins: @ES_LIBDIR@/plugins -+path.work: @ES_TMPDIR@ # # ----------------------------------- Memory ----------------------------------- # |