1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-22 04:17:44 +00:00

Add a port of Kibana 7.x

PR:		237374
Submitted by:	Miroslav Lachman <000.fbsd@quip.cz>
This commit is contained in:
Greg Lewis 2020-03-12 23:59:13 +00:00
parent ff168f4e5d
commit 2e17fbe9bd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=528323
7 changed files with 145 additions and 0 deletions

View File

@ -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

47
textproc/kibana7/Makefile Normal file
View File

@ -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>

View File

@ -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

View File

@ -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"

View File

@ -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');

View File

@ -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

View File

@ -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