From owner-svn-ports-head@freebsd.org Thu Mar 1 23:37:21 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F621F3447B; Thu, 1 Mar 2018 23:37:21 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2ABA080306; Thu, 1 Mar 2018 23:37:21 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25BA97C08; Thu, 1 Mar 2018 23:37:21 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w21NbLXS073549; Thu, 1 Mar 2018 23:37:21 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w21NbK2u073545; Thu, 1 Mar 2018 23:37:20 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201803012337.w21NbK2u073545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Thu, 1 Mar 2018 23:37:20 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r463358 - in head/textproc/elasticsearch6: . files X-SVN-Group: ports-head X-SVN-Commit-Author: feld X-SVN-Commit-Paths: in head/textproc/elasticsearch6: . files X-SVN-Commit-Revision: 463358 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2018 23:37:21 -0000 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