From owner-svn-ports-head@freebsd.org Tue Mar 20 16:52:02 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 AED55F5C050; Tue, 20 Mar 2018 16:52:02 +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 63B727BB32; Tue, 20 Mar 2018 16:52:02 +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 5E9541F6D9; Tue, 20 Mar 2018 16:52:02 +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 w2KGq2KW028293; Tue, 20 Mar 2018 16:52:02 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2KGq2Fd028289; Tue, 20 Mar 2018 16:52:02 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201803201652.w2KGq2Fd028289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Tue, 20 Mar 2018 16:52:02 +0000 (UTC) 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 X-SVN-Group: ports-head X-SVN-Commit-Author: feld X-SVN-Commit-Paths: in head/textproc/elasticsearch5-search-guard: . files X-SVN-Commit-Revision: 465091 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: Tue, 20 Mar 2018 16:52:02 -0000 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 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)"