* Update to 5.0.2

* Fix using jvm.options file
* Add errors to rc script when using legacy rc.conf options

PR:		214572, 214983
Submitted by:	purpleritza@gmail.com
Reported by:	purpleritza@gmail.com, Mark.Martinec@ijs.si
This commit is contained in:
Tom Judge 2016-12-02 12:01:12 +00:00
parent 8b4093cba5
commit 3ce62583a3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=427553
7 changed files with 35 additions and 17 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= elasticsearch
PORTVERSION= 5.0.0
PORTVERSION= 5.0.2
CATEGORIES= textproc java devel
MASTER_SITES= https://artifacts.elastic.co/downloads/${PORTNAME}/ \
http://mirrors.rit.edu/zi/
@ -30,7 +30,7 @@ OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
LUCENEVER= 6.2.0
LUCENEVER= 6.2.1
CONFIG_FILES= elasticsearch.yml log4j2.properties jvm.options
BINS= elasticsearch.in.sh \
elasticsearch \
@ -62,6 +62,7 @@ PLIST_SUB= SEARCHUSER=${SEARCHUSER} \
post-patch:
${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/config/elasticsearch.yml
${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/bin/elasticsearch.in.sh
${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/bin/elasticsearch
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/elasticsearch

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1478218577
SHA256 (elasticsearch-5.0.0.tar.gz) = a866534f0fa7428e980c985d712024feef1dee04709add6e360fc7b73bb1e7ae
SIZE (elasticsearch-5.0.0.tar.gz) = 32968292
TIMESTAMP = 1480613915
SHA256 (elasticsearch-5.0.2.tar.gz) = bbe761788570d344801cb91a8ba700465deb10601751007da791743e9308cb83
SIZE (elasticsearch-5.0.2.tar.gz) = 32951077

View File

@ -17,9 +17,6 @@
# Set it to required group.
# elasticsearch_config (path): Set to /usr/local/etc/elasticsearch/elasticsearch.yml by default.
# Set it to the config file location.
# elasticsearch_min_mem (num): Minumum JVM heap size, 256m by default.
# elasticsearch_max_mem (num): Maximum JVM heap size, 1g by default.
# elasticsearch_props (args): Additional java properties or arguments.
# elasticsearch_tmp (path): Set to /var/tmp/elasticsearch by default.
# Set it to the path to be used for temp files.
#
@ -119,16 +116,13 @@ if [ -n "$2" ]; then
exit 1
fi
required_files="${elasticsearch_config}/elasticsearch.yml"
required_files="${elasticsearch_config}/jvm.options"
eval elasticsearch_enable="\${elasticsearch_${profile}_enable:-${elasticsearch_enable}}"
eval elasticsearch_props="\${elasticsearch_${profile}_props:-${elasticsearch_props}}"
eval elasticsearch_min_mem="\${elasticsearch_${profile}_min_mem:-${elasticsearch_min_mem}}"
eval elasticsearch_max_mem="\${elasticsearchlimits_${profile}_enable:-${elasticsearch_max_mem}}"
eval elasticsearch_tmp="\${elasticsearchlimits_${profile}_args:-${elasticsearch_tmp}}"
eval elasticsearch_tmp="\${elasticsearch_${profile}_args:-${elasticsearch_tmp}}"
else
echo "$0: extra argument ignored"
fi
else
eval elasticsearch_envvars=${envvars}
if [ "x${elasticsearch_profiles}" != "x" -a "x$1" != "x" ]; then
for profile in ${elasticsearch_profiles}; do
eval _enable="\${elasticsearch_${profile}_enable}"
@ -164,4 +158,17 @@ else
fi
fi
if [ "x${elasticsearch_mem_min}" != "x" ]; then
echo "The elasticsearch_mem_min variable is no longer supported please set this in %%PREFIX%%/etc/jvm.options"
exit 1;
fi
if [ "x${elasticsearch_mem_max}" != "x" ]; then
echo "The elasticsearch_mem_max variable is no longer supported please set this in %%PREFIX%%/etc/jvm.options"
exit 1;
fi
if [ "x${elasticsearch_props}" != "x" ]; then
echo "The elasticsearch_props variable is no longer supported please set this in %%PREFIX%%/etc/jvm.options"
exit 1;
fi
run_rc_command "$1"

View File

@ -0,0 +1,11 @@
--- bin/elasticsearch.orig 2016-12-02 11:42:56 UTC
+++ bin/elasticsearch
@@ -112,7 +112,7 @@ ES_HOME=`cd "$ES_HOME"; pwd`
if [ -z "$ES_JVM_OPTIONS" ]; then
for jvm_options in "$ES_HOME"/config/jvm.options \
- /etc/elasticsearch/jvm.options; do
+ %%PREFIX%%/etc/elasticsearch/jvm.options; do
if [ -r "$jvm_options" ]; then
ES_JVM_OPTIONS=$jvm_options
break

View File

@ -1,4 +1,4 @@
--- bin/elasticsearch.in.sh.orig 2016-10-26 04:35:54 UTC
--- bin/elasticsearch.in.sh.orig 2016-11-24 10:05:27 UTC
+++ bin/elasticsearch.in.sh
@@ -1,5 +1,19 @@
#!/bin/bash

View File

@ -1,4 +1,4 @@
--- config/elasticsearch.yml.orig 2016-10-26 04:35:54 UTC
--- config/elasticsearch.yml.orig 2016-11-24 10:05:27 UTC
+++ config/elasticsearch.yml
@@ -31,10 +31,15 @@
# Path to directory where to store the data (separate multiple locations by comma):

View File

@ -12,8 +12,7 @@ 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/joda-time-2.9.5.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