Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Mar 2018 16:52:02 +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: r465091 - in head/textproc/elasticsearch5-search-guard: . files
Message-ID:  <201803201652.w2KGq2Fd028289@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: feld
Date: Tue Mar 20 16:52:01 2018
New Revision: 465091
URL: https://svnweb.freebsd.org/changeset/ports/465091

Log:
  textproc/elasticsearch5-search-guard: Update to 5.6.8
  
  - Automate pkg-plist as well

Deleted:
  head/textproc/elasticsearch5-search-guard/pkg-plist
Modified:
  head/textproc/elasticsearch5-search-guard/Makefile
  head/textproc/elasticsearch5-search-guard/distinfo
  head/textproc/elasticsearch5-search-guard/files/patch-elasticsearch-tools-install_demo_configuration.sh

Modified: head/textproc/elasticsearch5-search-guard/Makefile
==============================================================================
--- head/textproc/elasticsearch5-search-guard/Makefile	Tue Mar 20 16:19:08 2018	(r465090)
+++ head/textproc/elasticsearch5-search-guard/Makefile	Tue Mar 20 16:52:01 2018	(r465091)
@@ -2,19 +2,21 @@
 # $FreeBSD$
 
 PORTNAME=	search-guard
-DISTVERSION=	5.3.0-12
+DISTVERSION=	5.6.8
+DISTVERSIONSUFFIX=-19
 CATEGORIES=	textproc java
-MASTER_SITES=	https://oss.sonatype.org/content/repositories/releases/com/floragunn/search-guard-5/${DISTVERSION}/
+MASTER_SITES=	https://oss.sonatype.org/content/repositories/releases/com/floragunn/search-guard-5/${DISTVERSIONFULL}/
 PKGNAMEPREFIX=	elasticsearch5-
-DISTNAME=	search-guard-5-${DISTVERSION}
+DISTNAME=	search-guard-5-${DISTVERSIONFULL}
 
 MAINTAINER=	elastic@FreeBSD.org
 COMMENT=	Elasticsearch Search Guard plugin
 
 LICENSE=	APACHE20
 
-RUN_DEPENDS:=	elasticsearch5>=5.3.0:textproc/elasticsearch5
+RUN_DEPENDS:=	elasticsearch5>=${DISTVERSION}:textproc/elasticsearch5
 
+NO_ARCH=	yes
 NO_BUILD=	yes
 
 USES+=		zip shebangfix
@@ -23,20 +25,22 @@ SCRIPTS=	hash.sh install_demo_configuration.sh sgadmin
 SHEBANG_FILES=	./elasticsearch/tools/*.sh
 
 do-extract:
-	@${MKDIR} ${WRKSRC}
+	${MKDIR} ${WRKSRC}
 	( cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} -d ${DISTNAME} \
 	      ${_DISTDIR}${DISTFILES} )
 
-pre-configure:
-	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${SCRIPTS:S|^|${WRKSRC}/elasticsearch/tools/|}
+post-patch:
+	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' -e 's|%%BASH%%|${bash_CMD}|' \
+		${SCRIPTS:S|^|${WRKSRC}/elasticsearch/tools/|}
+	${FIND} ${WRKSRC} '(' -name '*.bat' -o -name '*.bak' -o -name '*.orig' ')' -delete
 
-post-configure:
-	@${RM} ${WRKSRC}/elasticsearch/tools/*.bat
-	@${RM} ${WRKSRC}/elasticsearch/tools/install_demo_configuration.sh.orig
-
 do-install:
-	@cd ${WRKSRC}/elasticsearch && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins/search-guard-5 "! -name *\.bak -o ! -name *\.bat"
-	@${CHMOD} 544 ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins/search-guard-5/tools/*.sh
-	@${CHMOD} 644 ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins/search-guard-5/sgconfig/*
+	cd ${WRKSRC}/elasticsearch && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins/search-guard-5
+	${CHMOD} 555 ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins/search-guard-5/tools/*.sh
+	${CHMOD} 644 ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins/search-guard-5/sgconfig/*
+
+post-install:
+	${FIND} -s ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins/ -not -type d | ${SORT} | \
+		${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
 
 .include <bsd.port.mk>

Modified: head/textproc/elasticsearch5-search-guard/distinfo
==============================================================================
--- head/textproc/elasticsearch5-search-guard/distinfo	Tue Mar 20 16:19:08 2018	(r465090)
+++ head/textproc/elasticsearch5-search-guard/distinfo	Tue Mar 20 16:52:01 2018	(r465091)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1496327095
-SHA256 (search-guard-5-5.3.0-12.zip) = 6c346b6910f3f9fd5017984889f37fbb95fe86c0a64729dd8198b14ed6e699ad
-SIZE (search-guard-5-5.3.0-12.zip) = 4751764
+TIMESTAMP = 1521562977
+SHA256 (search-guard-5-5.6.8-19.zip) = 35732db721d313512583b6fb9618b2954fa590abaafb18d2c6c0c28f01d6aa47
+SIZE (search-guard-5-5.6.8-19.zip) = 4697418

Modified: head/textproc/elasticsearch5-search-guard/files/patch-elasticsearch-tools-install_demo_configuration.sh
==============================================================================
--- head/textproc/elasticsearch5-search-guard/files/patch-elasticsearch-tools-install_demo_configuration.sh	Tue Mar 20 16:19:08 2018	(r465090)
+++ head/textproc/elasticsearch5-search-guard/files/patch-elasticsearch-tools-install_demo_configuration.sh	Tue Mar 20 16:52:01 2018	(r465091)
@@ -1,9 +1,9 @@
---- elasticsearch/tools/install_demo_configuration.sh.orig	2017-09-15 11:37:44 UTC
+--- elasticsearch/tools/install_demo_configuration.sh.orig	2018-03-20 16:29:13 UTC
 +++ elasticsearch/tools/install_demo_configuration.sh
-@@ -17,25 +17,14 @@ fi
- 
- set -e
- BASE_DIR="$DIR/../../../"
+@@ -26,34 +26,14 @@ if [ -d "$BASE_DIR" ]; then
+ else
+     echo "DEBUG: basedir does not exist"
+ fi
 -ES_CONF_FILE="$BASE_DIR/config/elasticsearch.yml"
 +ES_CONF_FILE="%%PREFIX%%/etc/elasticsearch/elasticsearch.yml"
  ES_BIN_DIR="$BASE_DIR/bin"
@@ -16,39 +16,38 @@
  
 -#Check if its a rpm/deb install
 -if [ -f /usr/share/elasticsearch/bin/elasticsearch ]; then
--    ES_CONF_FILE="/etc/elasticsearch/elasticsearch.yml"
+-    ES_CONF_FILE="/usr/share/elasticsearch/config/elasticsearch.yml"
+-
+-    if [ ! -f "$ES_CONF_FILE" ]; then
+-        ES_CONF_FILE="/etc/elasticsearch/elasticsearch.yml"
+-    fi
+-
 -    ES_BIN_DIR="/usr/share/elasticsearch/bin"
 -    ES_PLUGINS_DIR="/usr/share/elasticsearch/plugins"
 -    ES_LIB_PATH="/usr/share/elasticsearch/lib"
--    SUDO_CMD="sudo"
+-
+-    if [ -x "$(command -v sudo)" ]; then
+-        SUDO_CMD="sudo"
+-        echo "This script maybe require your root password for 'sudo' privileges"
+-    fi
+-
 -    ES_INSTALL_TYPE="rpm/deb"
--    echo "This script maybe require your root password for 'sudo' privileges"
 -fi
 -
- if $SUDO_CMD test -f "$ES_CONF_FILE"; then
-     :
- else
-@@ -58,12 +47,8 @@ if [ ! -d $ES_LIB_PATH ]; then
- 	exit -1
- fi
- 
--if [ "$ES_INSTALL_TYPE" != "rpm/deb" ];then
--    ES_CONF_DIR=$(dirname "${ES_CONF_FILE}")
--    ES_CONF_DIR=`cd "$ES_CONF_DIR" ; pwd`
--else
--    ES_CONF_DIR="/etc/elasticsearch"    
--fi
-+ES_CONF_DIR=$(dirname "${ES_CONF_FILE}")
-+ES_CONF_DIR=`cd "$ES_CONF_DIR" ; pwd`
- 
- ES_CONF_FILE="$ES_CONF_DIR/elasticsearch.yml"
- 
-@@ -123,7 +108,7 @@ ES_PLUGINS_DIR=`cd "$ES_PLUGINS_DIR" ; p
+ if [ $SUDO_CMD ]; then
+     if ! [ -x "$(command -v $SUDO_CMD)" ]; then
+         echo "Unable to locate 'sudo' command. Quit."
+@@ -168,10 +148,10 @@ ES_PLUGINS_DIR=`cd "$ES_PLUGINS_DIR" ; p
  echo "### Success"
  echo "### Execute this script now on all your nodes and then start all nodes"
  echo "### After the whole cluster is up execute: "
 -echo "#!/bin/bash" | $SUDO_CMD tee sgadmin_demo.sh > /dev/null 
-+echo "#!/usr/local/bin/bash" | $SUDO_CMD tee sgadmin_demo.sh > /dev/null 
- echo $SUDO_CMD "$ES_PLUGINS_DIR/search-guard-5/tools/sgadmin.sh" -cd "$ES_PLUGINS_DIR/search-guard-5/sgconfig" -cn searchguard_demo -ks "$ES_CONF_DIR/kirk.jks" -ts "$ES_CONF_DIR/truststore.jks" -nhnv | $SUDO_CMD tee -a sgadmin_demo.sh > /dev/null
++echo "%%BASH%%" | $SUDO_CMD tee sgadmin_demo.sh > /dev/null 
+ echo $SUDO_CMD "$ES_PLUGINS_DIR/search-guard-5/tools/sgadmin.sh" -cd "$ES_PLUGINS_DIR/search-guard-5/sgconfig" -icl -ks "$ES_CONF_DIR/kirk.jks" -ts "$ES_CONF_DIR/truststore.jks" -nhnv | $SUDO_CMD tee -a sgadmin_demo.sh > /dev/null
  $SUDO_CMD chmod +x sgadmin_demo.sh
  $SUDO_CMD cat sgadmin_demo.sh | tail -1
+ echo "### or run ./sgadmin_demo.sh"
+ echo "### Then open https://localhost:9200 an login with admin/admin"
+-echo "### (Just ignore the ssl certificate warning because we installed a self signed demo certificate)"
+\ No newline at end of file
++echo "### (Just ignore the ssl certificate warning because we installed a self signed demo certificate)"



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