1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-27 10:03:20 +00:00

textproc/elasticsearch7: Update to 7.13.2

- Update to 7.13.2
- Fix support tools to find java correctly [1]
- Needs enforce_statfs = 1 in jails [2]
- Fix rc order [3]

PR:		256921 [1]
PR:		254777 [2]
PR:		254776 [3]
This commit is contained in:
Juraj Lutter 2021-07-03 23:41:57 +02:00
parent 6b6f75fbcf
commit f950a15f38
7 changed files with 46 additions and 13 deletions

View File

@ -1,11 +1,11 @@
# Created by: Tom Judge <tj@FreeBSD.org>
PORTNAME= elasticsearch
PORTVERSION= 7.10.1
PORTVERSION= 7.13.2
CATEGORIES= textproc java devel
MASTER_SITES= https://artifacts.elastic.co/downloads/${PORTNAME}/
PKGNAMESUFFIX= 7
DISTNAME= ${PORTNAME}-${PORTVERSION}-no-jdk-darwin-x86_64
DISTNAME= ${PORTNAME}-${PORTVERSION}-darwin-x86_64
MAINTAINER= elastic@FreeBSD.org
COMMENT= Full-text search engine for Java
@ -70,6 +70,7 @@ post-patch:
${RM} ${WRKSRC}/lib/jna-*.jar
# ML plugin not supported on FreeBSD
${RM} -rf ${WRKSRC}/modules/x-pack/x-pack-ml
${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/bin/elasticsearch-env
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/etc/elasticsearch
@ -88,7 +89,7 @@ do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/elasticsearch
${INSTALL} -lrs ${STAGEDIR}${ETCDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/config
${LN} -s ${JAVASHAREDIR}/classes/jna.jar ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib/jna.jar
${LN} -s ${JAVASHAREDIR}/classes/jna.jar ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib/jna-0.0.0.jar
do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1609277185
SHA256 (elasticsearch-7.10.1-no-jdk-darwin-x86_64.tar.gz) = 269189ce606b071a30724fa678cca42dcbdea88134770070d043927b2a748dac
SIZE (elasticsearch-7.10.1-no-jdk-darwin-x86_64.tar.gz) = 162046388
TIMESTAMP = 1625521166
SHA256 (elasticsearch-7.13.2-darwin-x86_64.tar.gz) = e53aa58cc96759cf4c294ea1cc9dbf29008ad7e8ffd32e2030b315dea28758a0
SIZE (elasticsearch-7.13.2-darwin-x86_64.tar.gz) = 319111204

View File

@ -1,8 +1,8 @@
#!/bin/sh
# PROVIDE: elasticsearch
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable elasticsearch:
@ -44,7 +44,7 @@ command=%%PREFIX%%/lib/elasticsearch/bin/elasticsearch
command_args="-d --pidfile=${pidfile}"
export ES_PATH_CONF=${elasticsearch_config}
export JAVA_HOME=${elasticsearch_java_home}
export ES_JAVA_HOME=${elasticsearch_java_home}
elasticsearch_precmd()
{

View File

@ -0,0 +1,26 @@
--- bin/elasticsearch-env.orig 2021-07-05 19:40:21 UTC
+++ bin/elasticsearch-env
@@ -46,12 +46,17 @@ elif [ ! -z "$JAVA_HOME" ]; then
JAVA_TYPE="JAVA_HOME"
else
# use the bundled JDK (default)
- if [ "$(uname -s)" = "Darwin" ]; then
- # macOS has a different structure
- JAVA="$ES_HOME/jdk.app/Contents/Home/bin/java"
- else
- JAVA="$ES_HOME/jdk/bin/java"
- fi
+ case "$(uname -s)" in
+ "Darwin")
+ JAVA="$ES_HOME/jdk.app/Contents/Home/bin/java"
+ ;;
+ "FreeBSD")
+ JAVA=%%LOCALBASE%%/bin/java
+ ;;
+ *)
+ JAVA="$ES_HOME/jdk/bin/java"
+ ;;
+ esac
JAVA_TYPE="bundled JDK"
fi

View File

@ -1,4 +1,4 @@
--- config/elasticsearch.yml.orig 2018-09-26 13:30:23 UTC
--- config/elasticsearch.yml.orig 2021-06-10 20:59:11 UTC
+++ config/elasticsearch.yml
@@ -31,10 +31,12 @@
# Path to directory where to store the data (separate multiple locations by comma):
@ -13,7 +13,7 @@
#
# ----------------------------------- Memory -----------------------------------
#
@@ -86,3 +88,6 @@
@@ -80,3 +82,6 @@
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true

View File

@ -1,6 +1,6 @@
--- config/jvm.options.orig 2020-01-15 04:09:47 UTC
--- config/jvm.options.orig 2021-06-10 20:59:11 UTC
+++ config/jvm.options
@@ -67,10 +67,10 @@
@@ -83,10 +83,10 @@
8:-XX:+PrintGCDateStamps
8:-XX:+PrintTenuringDistribution
8:-XX:+PrintGCApplicationStoppedTime

View File

@ -9,6 +9,12 @@ You may need to set:
sysctl security.bsd.unprivileged_mlock=1
When running within a jail, it's highly advisable to set:
enforce_statfs = 1
for the jail running elasticsearch instance.
!!! PLUGINS NOTICE !!!
ElasticSearch plugins should only be installed via the elasticsearch-plugin