diff options
author | feld <feld@FreeBSD.org> | 2018-03-21 00:52:01 +0800 |
---|---|---|
committer | feld <feld@FreeBSD.org> | 2018-03-21 00:52:01 +0800 |
commit | 25e0502addf72e4da8492f76efc0c5fc1cd87e24 (patch) | |
tree | e6999ded5a616b4b72b7b26d09a256cb8023aea1 /textproc | |
parent | 859f7aa124225d73f3d27a599dd825c28f33d822 (diff) | |
download | freebsd-ports-gnome-25e0502addf72e4da8492f76efc0c5fc1cd87e24.tar.gz freebsd-ports-gnome-25e0502addf72e4da8492f76efc0c5fc1cd87e24.tar.zst freebsd-ports-gnome-25e0502addf72e4da8492f76efc0c5fc1cd87e24.zip |
textproc/elasticsearch5-search-guard: Update to 5.6.8
- Automate pkg-plist as well
Diffstat (limited to 'textproc')
4 files changed, 49 insertions, 69 deletions
diff --git a/textproc/elasticsearch5-search-guard/Makefile b/textproc/elasticsearch5-search-guard/Makefile index 49ac86d2e26a..9004b6803669 100644 --- a/textproc/elasticsearch5-search-guard/Makefile +++ b/textproc/elasticsearch5-search-guard/Makefile @@ -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.sh 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-configure: - @${RM} ${WRKSRC}/elasticsearch/tools/*.bat - @${RM} ${WRKSRC}/elasticsearch/tools/install_demo_configuration.sh.orig +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 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> diff --git a/textproc/elasticsearch5-search-guard/distinfo b/textproc/elasticsearch5-search-guard/distinfo index 19f26a0b0d01..9f0583bf1685 100644 --- a/textproc/elasticsearch5-search-guard/distinfo +++ b/textproc/elasticsearch5-search-guard/distinfo @@ -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 diff --git a/textproc/elasticsearch5-search-guard/files/patch-elasticsearch-tools-install_demo_configuration.sh b/textproc/elasticsearch5-search-guard/files/patch-elasticsearch-tools-install_demo_configuration.sh index 3823cb581f94..401693aa857c 100644 --- a/textproc/elasticsearch5-search-guard/files/patch-elasticsearch-tools-install_demo_configuration.sh +++ b/textproc/elasticsearch5-search-guard/files/patch-elasticsearch-tools-install_demo_configuration.sh @@ -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)" diff --git a/textproc/elasticsearch5-search-guard/pkg-plist b/textproc/elasticsearch5-search-guard/pkg-plist deleted file mode 100644 index e00612c4f197..000000000000 --- a/textproc/elasticsearch5-search-guard/pkg-plist +++ /dev/null @@ -1,23 +0,0 @@ -lib/elasticsearch/plugins/search-guard-5/commons-cli-1.3.1.jar -lib/elasticsearch/plugins/search-guard-5/guava-19.0.jar -lib/elasticsearch/plugins/search-guard-5/netty-buffer-4.1.7.Final.jar -lib/elasticsearch/plugins/search-guard-5/netty-codec-4.1.7.Final.jar -lib/elasticsearch/plugins/search-guard-5/netty-codec-http-4.1.7.Final.jar -lib/elasticsearch/plugins/search-guard-5/netty-common-4.1.7.Final.jar -lib/elasticsearch/plugins/search-guard-5/netty-handler-4.1.7.Final.jar -lib/elasticsearch/plugins/search-guard-5/netty-resolver-4.1.7.Final.jar -lib/elasticsearch/plugins/search-guard-5/netty-transport-4.1.7.Final.jar -lib/elasticsearch/plugins/search-guard-5/plugin-descriptor.properties -lib/elasticsearch/plugins/search-guard-5/plugin-security.policy -lib/elasticsearch/plugins/search-guard-5/search-guard-5-5.3.0-12.jar -lib/elasticsearch/plugins/search-guard-5/search-guard-ssl-5.3.0-21.jar -lib/elasticsearch/plugins/search-guard-5/sgconfig/elasticsearch.yml.example -lib/elasticsearch/plugins/search-guard-5/sgconfig/sg_action_groups.yml -lib/elasticsearch/plugins/search-guard-5/sgconfig/sg_config.yml -lib/elasticsearch/plugins/search-guard-5/sgconfig/sg_internal_users.yml -lib/elasticsearch/plugins/search-guard-5/sgconfig/sg_roles.yml -lib/elasticsearch/plugins/search-guard-5/sgconfig/sg_roles_mapping.yml -lib/elasticsearch/plugins/search-guard-5/tools/hash.sh -lib/elasticsearch/plugins/search-guard-5/tools/install_demo_configuration.sh -lib/elasticsearch/plugins/search-guard-5/tools/sgadmin.sh -lib/elasticsearch/plugins/search-guard-5/transport-netty4-client-5.3.0.jar |