diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2020-03-12 23:59:13 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2020-03-12 23:59:13 +0000 |
commit | 2e17fbe9bd5ede022b627ccf9aa9f537758ba3f3 (patch) | |
tree | 677db2e41218e078f4689ee14fdb732be63be523 /textproc | |
parent | ff168f4e5d07ee1d34cc4efefbdebc292641b4e6 (diff) |
Notes
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/Makefile | 1 | ||||
-rw-r--r-- | textproc/kibana7/Makefile | 47 | ||||
-rw-r--r-- | textproc/kibana7/distinfo | 3 | ||||
-rw-r--r-- | textproc/kibana7/files/kibana.in | 55 | ||||
-rw-r--r-- | textproc/kibana7/files/patch-src_setup__node__env_index.js | 11 | ||||
-rw-r--r-- | textproc/kibana7/files/pkg-deinstall.in | 20 | ||||
-rw-r--r-- | textproc/kibana7/pkg-descr | 8 |
7 files changed, 145 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile index da814daf3b87..234991f1a75b 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -322,6 +322,7 @@ SUBDIR += kf5-sonnet SUBDIR += kf5-syntax-highlighting SUBDIR += kibana6 + SUBDIR += kibana7 SUBDIR += kiss-templates SUBDIR += kmfl-european-latin SUBDIR += kmfl-khmer diff --git a/textproc/kibana7/Makefile b/textproc/kibana7/Makefile new file mode 100644 index 000000000000..fe3bac4bf021 --- /dev/null +++ b/textproc/kibana7/Makefile @@ -0,0 +1,47 @@ +# Created by: Tom Judge <tj@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= kibana +PORTVERSION= 7.6.1 +DISTVERSIONSUFFIX= -darwin-x86_64 +CATEGORIES= textproc www +MASTER_SITES= https://artifacts.elastic.co/downloads/kibana/ \ + http://artifacts.elastic.co/downloads/kibana/ +PKGNAMESUFFIX?= 7 + +MAINTAINER= elastic@FreeBSD.org +COMMENT= Browser based analytics and search interface to ElasticSearch + +LICENSE= APACHE20 + +RUN_DEPENDS= node10>=10.19.0:www/node10 + +CONFLICTS= kibana[6]* + +NO_BUILD= yes +WWWDIR= ${PREFIX}/www/${PORTNAME}${PKGNAMESUFFIX} +USE_RC_SUBR= ${PORTNAME} + +SUB_FILES= pkg-deinstall +SUB_LIST+= PORTNAME=${PORTNAME} PKGNAMESUFFIX=${PKGNAMESUFFIX} + +post-patch: + ${FIND} -s ${WRKSRC}/node_modules -type d -empty -delete + +do-install: + ${MKDIR} ${STAGEDIR}${WWWDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${WRKSRC}/config/kibana.yml ${STAGEDIR}${ETCDIR}/kibana.yml.sample + (cd ${WRKSRC} && \ + ${RM} -r config node optimize && \ + ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR} && \ + ${COPYTREE_BIN} bin ${STAGEDIR}${WWWDIR}) + ${INSTALL} -lrs ${STAGEDIR}${ETCDIR} ${STAGEDIR}${WWWDIR}/config + +post-install: + ${ECHO} "@sample ${ETCDIR}/kibana.yml.sample" >> ${TMPPLIST} + ${FIND} -s ${STAGEDIR}${WWWDIR} -not -type d | ${SORT} | \ + ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} + ${ECHO} "@dir(www,www) ${WWWDIR}/data" >> ${TMPPLIST} + ${ECHO} "@dir ${WWWDIR}/plugins" >> ${TMPPLIST} + +.include <bsd.port.mk> diff --git a/textproc/kibana7/distinfo b/textproc/kibana7/distinfo new file mode 100644 index 000000000000..247b7fd93b15 --- /dev/null +++ b/textproc/kibana7/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1583840704 +SHA256 (kibana-7.6.1-darwin-x86_64.tar.gz) = 846efd53d7a7d4ccb41222f3b1f771016a3e904d9116804ed95df417c9e1e842 +SIZE (kibana-7.6.1-darwin-x86_64.tar.gz) = 259198456 diff --git a/textproc/kibana7/files/kibana.in b/textproc/kibana7/files/kibana.in new file mode 100644 index 000000000000..1fbc91725ac3 --- /dev/null +++ b/textproc/kibana7/files/kibana.in @@ -0,0 +1,55 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: kibana +# REQUIRE: DAEMON +# KEYWORD: shutdown + +. /etc/rc.subr + +name=kibana +rcvar=kibana_enable + +load_rc_config $name + +: ${kibana_enable:="NO"} +: ${kibana_config:="%%ETCDIR%%/kibana.yml"} +: ${kibana_user:="www"} +: ${kibana_group:="www"} +: ${kibana_log:="/var/log/kibana.log"} + +export BABEL_DISABLE_CACHE=1 +export NODE_ENV=production +# ml and reporting modules not supported on FreeBSD +export XPACK_ML_ENABLED=false +export XPACK_REPORTING_ENABLED=false + +required_files="${kibana_config}" +pidfile="/var/run/${name}/${name}.pid" +start_precmd="kibana_precmd" +procname="%%LOCALBASE%%/bin/node" +command="/usr/sbin/daemon" +command_args="-f -p ${pidfile} ${procname} --no-warnings %%WWWDIR%%/src/cli serve --config ${kibana_config} --log-file ${kibana_log}" + +kibana_precmd() +{ + if [ ! -d $(dirname ${pidfile}) ]; then + install -d -o ${kibana_user} -g ${kibana_group} $(dirname ${pidfile}) + fi + + if [ ! -f ${kibana_log} ]; then + install -o ${kibana_user} -g ${kibana_group} -m 640 /dev/null ${kibana_log} + fi + + if [ ! -d %%WWWDIR%%/optimize ]; then + install -d -o ${kibana_user} -g ${kibana_group} %%WWWDIR%%/optimize + else + # We may have installed a plugin as root which will cause files in here + # to be owned by root:wheel. Fix with a chown. + chown -R ${kibana_user}:${kibana_group} %%WWWDIR%%/optimize + fi +} + +run_rc_command "$1" diff --git a/textproc/kibana7/files/patch-src_setup__node__env_index.js b/textproc/kibana7/files/patch-src_setup__node__env_index.js new file mode 100644 index 000000000000..fb873c14ecff --- /dev/null +++ b/textproc/kibana7/files/patch-src_setup__node__env_index.js @@ -0,0 +1,11 @@ +--- src/setup_node_env/index.js.orig 2018-11-04 14:48:57 UTC ++++ src/setup_node_env/index.js +@@ -19,5 +19,5 @@ + * under the License. + */ + +-require('./node_version_validator'); +-require('./babel_register'); +\ No newline at end of file ++//require('./node_version_validator'); ++require('./babel_register'); diff --git a/textproc/kibana7/files/pkg-deinstall.in b/textproc/kibana7/files/pkg-deinstall.in new file mode 100644 index 000000000000..0699ab559805 --- /dev/null +++ b/textproc/kibana7/files/pkg-deinstall.in @@ -0,0 +1,20 @@ +#!/bin/sh + +case "$2" in +POST-DEINSTALL) + if [ -d %%WWWDIR%%/optimize ]; then + /usr/bin/find %%WWWDIR%%/optimize/ -delete + fi + + cat <<EOMSG + +If %%PORTNAME%%%%PKGNAMESUFFIX%% is being deleted permanently, and you do not wish to keep any +data that was in the cluster, then you may wish to delete the +%%WWWDIR%% directory. This can be done by with the command: + + # rm -rf %%WWWDIR%% + +Please ignore this if %%PORTNAME%%%%PKGNAMESUFFIX%% is being upgraded +EOMSG + ;; +esac diff --git a/textproc/kibana7/pkg-descr b/textproc/kibana7/pkg-descr new file mode 100644 index 000000000000..69f0d5d631d1 --- /dev/null +++ b/textproc/kibana7/pkg-descr @@ -0,0 +1,8 @@ +Kibana is an open source (Apache Licensed), browser based analytics and search +dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana +strives to be easy to get started with, while also being flexible and powerful, +just like Elasticsearch. + +Kibana 7.x is compatible with Elasticsearch 7.x + +WWW: https://www.elastic.co/products/kibana |