Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jul 2021 20:45:08 GMT
From:      Juraj Lutter <otis@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f950a15f3858 - main - textproc/elasticsearch7: Update to 7.13.2
Message-ID:  <202107062045.166Kj8hf082233@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by otis:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f950a15f3858d0b8abdb4357219058c3eed56fca

commit f950a15f3858d0b8abdb4357219058c3eed56fca
Author:     Juraj Lutter <otis@FreeBSD.org>
AuthorDate: 2021-07-03 21:41:57 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2021-07-06 20:44:37 +0000

    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]
---
 textproc/elasticsearch7/Makefile                   |  7 +++---
 textproc/elasticsearch7/distinfo                   |  6 ++---
 textproc/elasticsearch7/files/elasticsearch.in     |  6 ++---
 .../files/patch-bin_elasticsearch-env              | 26 ++++++++++++++++++++++
 .../files/patch-config_elasticsearch.yml           |  4 ++--
 .../elasticsearch7/files/patch-config_jvm.options  |  4 ++--
 textproc/elasticsearch7/files/pkg-message.in       |  6 +++++
 7 files changed, 46 insertions(+), 13 deletions(-)

diff --git a/textproc/elasticsearch7/Makefile b/textproc/elasticsearch7/Makefile
index c2ba301f73bf..f78aa6c3d096 100644
--- a/textproc/elasticsearch7/Makefile
+++ b/textproc/elasticsearch7/Makefile
@@ -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}
diff --git a/textproc/elasticsearch7/distinfo b/textproc/elasticsearch7/distinfo
index cc3c7c31c7b4..aeefd92f7292 100644
--- a/textproc/elasticsearch7/distinfo
+++ b/textproc/elasticsearch7/distinfo
@@ -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
diff --git a/textproc/elasticsearch7/files/elasticsearch.in b/textproc/elasticsearch7/files/elasticsearch.in
index 4a037b2a9918..002a2335bf0b 100644
--- a/textproc/elasticsearch7/files/elasticsearch.in
+++ b/textproc/elasticsearch7/files/elasticsearch.in
@@ -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()
 {
diff --git a/textproc/elasticsearch7/files/patch-bin_elasticsearch-env b/textproc/elasticsearch7/files/patch-bin_elasticsearch-env
new file mode 100644
index 000000000000..4dee506b5784
--- /dev/null
+++ b/textproc/elasticsearch7/files/patch-bin_elasticsearch-env
@@ -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
+ 
diff --git a/textproc/elasticsearch7/files/patch-config_elasticsearch.yml b/textproc/elasticsearch7/files/patch-config_elasticsearch.yml
index a39468ea84c9..ede1e3ded1bb 100644
--- a/textproc/elasticsearch7/files/patch-config_elasticsearch.yml
+++ b/textproc/elasticsearch7/files/patch-config_elasticsearch.yml
@@ -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
diff --git a/textproc/elasticsearch7/files/patch-config_jvm.options b/textproc/elasticsearch7/files/patch-config_jvm.options
index 6289563798a9..7c8c3ce353c0 100644
--- a/textproc/elasticsearch7/files/patch-config_jvm.options
+++ b/textproc/elasticsearch7/files/patch-config_jvm.options
@@ -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
diff --git a/textproc/elasticsearch7/files/pkg-message.in b/textproc/elasticsearch7/files/pkg-message.in
index f664cda07807..2182e1a8789b 100644
--- a/textproc/elasticsearch7/files/pkg-message.in
+++ b/textproc/elasticsearch7/files/pkg-message.in
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107062045.166Kj8hf082233>