Date: Thu, 1 Mar 2018 23:37:20 +0000 (UTC) From: Mark Felder <feld@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r463358 - in head/textproc/elasticsearch6: . files Message-ID: <201803012337.w21NbK2u073545@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: feld Date: Thu Mar 1 23:37:20 2018 New Revision: 463358 URL: https://svnweb.freebsd.org/changeset/ports/463358 Log: textproc/elasticsearch6: Fix run issues - Elastic no longer accepts -Epath.conf argument. Change to ES_PATH_CONF env - Elastic was not honoring the elasticsearch_tmpdir rc.conf variable. Remove. The default behavior is to use mktemp for a unique tmpdir in /tmp. This seems sane, especially when running multiple profiles. - Patch jvm.options to set a writable location for gc.log, which will be the tmpdir. There is not an easy way to automatically point this to the log dir, so it needs a unique location when running muliple profiles. - devel/jca is also a BUILD dependency to fix build outside poudriere PR: 226265 Added: head/textproc/elasticsearch6/files/patch-config_jvm.options (contents, props changed) Modified: head/textproc/elasticsearch6/Makefile head/textproc/elasticsearch6/files/elasticsearch.in head/textproc/elasticsearch6/files/patch-config_elasticsearch.yml Modified: head/textproc/elasticsearch6/Makefile ============================================================================== --- head/textproc/elasticsearch6/Makefile Thu Mar 1 23:05:40 2018 (r463357) +++ head/textproc/elasticsearch6/Makefile Thu Mar 1 23:37:20 2018 (r463358) @@ -3,7 +3,7 @@ PORTNAME= elasticsearch PORTVERSION= 6.2.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= textproc java devel MASTER_SITES= https://artifacts.elastic.co/downloads/${PORTNAME}/ \ http://mirrors.rit.edu/zi/ @@ -14,6 +14,7 @@ COMMENT= Full-text search engine for Java LICENSE= APACHE20 +BUILD_DEPENDS= jna>0:devel/jna RUN_DEPENDS= bash>0:shells/bash \ jna>0:devel/jna @@ -25,8 +26,9 @@ USE_JAVA= yes NO_BUILD= yes JAVA_VERSION= 1.8+ USE_RC_SUBR= ${PORTNAME} -SHEBANG_FILES= bin/elasticsearch-plugin \ - bin/elasticsearch +SHEBANG_FILES= bin/elasticsearch \ + bin/elasticsearch-env \ + bin/elasticsearch-plugin OPTIONS_DEFINE= DOCS @@ -34,6 +36,7 @@ OPTIONS_DEFINE= DOCS CONFIG_FILES= elasticsearch.yml log4j2.properties jvm.options BINS= elasticsearch \ + elasticsearch-env \ elasticsearch-plugin PORTDOCS= LICENSE.txt \ Modified: head/textproc/elasticsearch6/files/elasticsearch.in ============================================================================== --- head/textproc/elasticsearch6/files/elasticsearch.in Thu Mar 1 23:05:40 2018 (r463357) +++ head/textproc/elasticsearch6/files/elasticsearch.in Thu Mar 1 23:37:20 2018 (r463358) @@ -17,8 +17,6 @@ # Set it to required group. # elasticsearch_config (path): Set to %%PREFIX%%/etc/elasticsearch/elasticsearch.yml by default. # Set it to the config file location. -# elasticsearch_tmp (path): Set to /var/tmp/elasticsearch by default. -# Set it to the path to be used for temp files. # . /etc/rc.subr @@ -31,7 +29,6 @@ load_rc_config ${name} : ${elasticsearch_user=elasticsearch} : ${elasticsearch_group=elasticsearch} : ${elasticsearch_config=%%PREFIX%%/etc/elasticsearch} -: ${elasticsearch_tmp=/var/tmp/elasticsearch} required_files="${elasticsearch_config}/elasticsearch.yml" _pidprefix=/var/run/elasticsearch @@ -42,12 +39,13 @@ extra_commands="console status" console_cmd=elasticsearch_console start_precmd=elasticsearch_precmd command=%%PREFIX%%/lib/elasticsearch/bin/elasticsearch -command_args="-d --pidfile=${pidfile} -Epath.conf=${elasticsearch_config}" +command_args="-d --pidfile=${pidfile}" +export ES_PATH_CONF=${elasticsearch_config} + elasticsearch_precmd() { /usr/bin/install -o ${elasticsearch_user} -g ${elasticsearch_group} /dev/null ${pidfile} - /usr/bin/install -d -o ${elasticsearch_user} -g ${elasticsearch_group} -m 755 ${elasticsearch_tmp} /usr/bin/install -d -o ${elasticsearch_user} -g ${elasticsearch_group} -m 755 /var/db/elasticsearch /usr/bin/install -d -o ${elasticsearch_user} -g ${elasticsearch_group} -m 755 /var/log/elasticsearch } @@ -66,15 +64,12 @@ if [ -n "$2" ]; then echo "You must define a configuration (elasticsearch_${profile}_config)" exit 1 fi + export ES_PATH_CONF=${elasticsearch_config} required_files="${elasticsearch_config}/elasticsearch.yml" required_files="${elasticsearch_config}/jvm.options" eval elasticsearch_enable="\${elasticsearch_${profile}_enable:-${elasticsearch_enable}}" - eval elasticsearch_tmp="\${elasticsearch_${profile}_args:-${elasticsearch_tmp}}" pidfile="${_pidprefix}.${profile}.pid" - if [ -e ${elasticsearch_config}/jvm.options ]; then - export ES_JVM_OPTIONS=${elasticsearch_config}/jvm.options - fi - command_args="-d --pidfile=${pidfile} -Epath.conf=${elasticsearch_config}" + command_args="-d --pidfile=${pidfile}" echo "===> elasticsearch profile: ${profile}" else echo "$0: extra argument ignored" Modified: head/textproc/elasticsearch6/files/patch-config_elasticsearch.yml ============================================================================== --- head/textproc/elasticsearch6/files/patch-config_elasticsearch.yml Thu Mar 1 23:05:40 2018 (r463357) +++ head/textproc/elasticsearch6/files/patch-config_elasticsearch.yml Thu Mar 1 23:37:20 2018 (r463358) @@ -1,13 +1,15 @@ ---- config/elasticsearch.yml.orig 2018-02-06 00:13:22 UTC +--- config/elasticsearch.yml.orig 2018-02-16 18:57:55 UTC +++ config/elasticsearch.yml -@@ -35,6 +35,10 @@ +@@ -31,10 +31,12 @@ + # Path to directory where to store the data (separate multiple locations by comma): + # + #path.data: /path/to/data ++path.data: /var/db/elasticsearch + # # Path to log files: # #path.logs: /path/to/logs +path.logs: /var/log/elasticsearch -+# -+# Path to scripts dir: -+path.scripts: /usr/local/libexec/elasticsearch # # ----------------------------------- Memory ----------------------------------- # Added: head/textproc/elasticsearch6/files/patch-config_jvm.options ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/elasticsearch6/files/patch-config_jvm.options Thu Mar 1 23:37:20 2018 (r463358) @@ -0,0 +1,11 @@ +--- config/jvm.options.orig 2018-03-01 23:04:45 UTC ++++ config/jvm.options +@@ -87,7 +87,7 @@ + 8:-XX:+PrintGCDateStamps + 8:-XX:+PrintTenuringDistribution + 8:-XX:+PrintGCApplicationStoppedTime +-8:-Xloggc:logs/gc.log ++8:-Xloggc:${ES_TMPDIR}/gc.log + 8:-XX:+UseGCLogFileRotation + 8:-XX:NumberOfGCLogFiles=32 + 8:-XX:GCLogFileSize=64m
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803012337.w21NbK2u073545>