1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00

Update to 1.5.1.

PR:		ports/201001
Submitted by:	maintainer (Enrico M. Crisostomo)
MFH:		2015Q2
Security:	CVE-2015-4152
This commit is contained in:
Xin LI 2015-06-24 21:09:03 +00:00
parent 72fb5fd16e
commit f836868723
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=390521
6 changed files with 7999 additions and 14555 deletions

View File

@ -2,20 +2,17 @@
# $FreeBSD$
PORTNAME= logstash
PORTVERSION= 1.4.2
PORTREVISION= 1
PORTVERSION= 1.5.1
CATEGORIES= sysutils java
MASTER_SITES= https://download.elasticsearch.org/logstash/logstash/:0 \
https://github.com/emcrisostomo/jnr-ffi/releases/download/2.0.0/:1
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:0 jnr-ffi-2.0.0.jar:1
MASTER_SITES= http://download.elastic.co/logstash/logstash/
MAINTAINER= enrico.m.crisostomo@gmail.com
COMMENT= Tool for managing events and logs
LICENSE= APACHE20
USES= cpe
CPE_VENDOR= elasticsearch
RUN_DEPENDS= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash
USE_JAVA= yes
JAVA_VERSION= 1.7+
JAVA_EXTRACT= yes
@ -33,25 +30,11 @@ LOGSTASH_DATA_DIR?= /var/db/${PORTNAME}
SUB_LIST= LOGSTASH_DATA_DIR=${LOGSTASH_DATA_DIR} JAVA_HOME=${JAVA_HOME} \
LOGSTASH_HOME=${LOGSTASH_HOME}
# Patch the logstash distribution using the patched jnr-ffi classes.
JRUBY_JAR= jruby-complete-1.7.11.jar
post-patch:
@-${RM} -r ${WRKSRC}/vendor/jar/temp
@-${RM} ${WRKSRC}/vendor/jar/${JRUBY_JAR}.bak
@(cd ${WRKSRC}/vendor/jar && \
${MKDIR} temp && \
${CP} ${JRUBY_JAR} temp && \
${MV} ${JRUBY_JAR} ${JRUBY_JAR}.bak && \
cd temp && \
${JAR} xf ${JRUBY_JAR} && \
${RM} ${JRUBY_JAR} && \
${RM} -r jnr/ffi)
@(cd ${WRKDIR}/jnr && ${CP} -r ffi ${WRKSRC}/vendor/jar/temp/jnr)
@(cd ${WRKSRC}/vendor/jar/temp && \
${JAR} cfm ../${JRUBY_JAR} META-INF/MANIFEST.MF .)
@(cd ${WRKSRC}/vendor/jar && ${RM} -r temp ${JRUBY_JAR}.bak)
LOGSTASH_BIN_FILES= logstash
LOGSTASH_JRUBY_SUBDIR= vendor/jruby/bin
LOGSTASH_JRUBY_BIN_FILES= ast irb jirb jruby jruby.sh rdoc testrb gem \
jgem jirb_swing jruby.bash jrubyc rake ri
LOGSTASH_BIN_FILES= logstash logstash-web
do-install:
@${FIND} ${WRKSRC} -name '*.bat' -delete
${MKDIR} ${STAGEDIR}${ETCDIR}
@ -63,5 +46,8 @@ do-install:
.for x in ${LOGSTASH_BIN_FILES}
@${CHMOD} ${BINMODE} ${STAGEDIR}${LOGSTASH_DIR}/bin/${x}
.endfor
.for x in ${LOGSTASH_JRUBY_BIN_FILES}
@${CHMOD} ${BINMODE} ${STAGEDIR}${LOGSTASH_DIR}/${LOGSTASH_JRUBY_SUBDIR}/${x}
.endfor
.include <bsd.port.mk>

View File

@ -1,4 +1,2 @@
SHA256 (logstash-1.4.2.tar.gz) = d5be171af8d4ca966a0c731fc34f5deeee9d7631319e3660d1df99e43c5f8069
SIZE (logstash-1.4.2.tar.gz) = 85619205
SHA256 (jnr-ffi-2.0.0.jar) = bfe10bf5492667146a23fec12abab7ec96164f84d819f8785a8f44540f84f4d8
SIZE (jnr-ffi-2.0.0.jar) = 648330
SHA256 (logstash-1.5.1.tar.gz) = a12f91bc87f6cd8f1b481c9e9d0370a650b2c36fdc6a656785ef883cb1002894
SIZE (logstash-1.5.1.tar.gz) = 90347364

View File

@ -3,7 +3,8 @@
# Configuration settings for logstash in /etc/rc.conf:
#
# PROVIDE: logstash
# REQUIRE: LOGIN
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# logstash_enable (bool):
@ -11,24 +12,13 @@
# Flag that determines whether Logstash is enabled.
#
# logstash_home (string):
# Default value: "/opt/logstash-1.4.2"
# Default value: "/usr/local/logstash"
# Logstash installation directory.
#
# logstash_config (string):
# Default value: /usr/local/etc/${name}/${name}.conf
# Logstash configuration file path.
#
# logstash_mode (string):
# Default value: "standalone"
# Valid options:
# "standalone": agent, web & elasticsearch
# "web": Starts logstash as a web ui
# "agent": Justs works as a log shipper
#
# logstash_port (int):
# Default value: 9292
# Port of the Kibana web interface.
#
# logstash_log (bool):
# Set to "NO" by default.
# Set it to "YES" to enable logstash logging to file
@ -68,13 +58,10 @@ logdir="/var/log"
: ${logstash_home="%%LOGSTASH_HOME%%"}
: ${logstash_config="%%ETCDIR%%/${name}.conf"}
: ${logstash_log="NO"}
: ${logstash_mode="standalone"}
: ${logstash_port="9292"}
: ${logstash_log_file="${logdir}/${name}.log"}
: ${logstash_elastic_datadir="%%LOGSTASH_DATA_DIR%%"}
: ${logstash_java_home="%%JAVA_HOME%%"}
: ${logstash_java_opts=""}
: ${logstash_ffi_java_opts="-Djnr.ffi.asm.enabled=false"}
: ${logstash_elastic_datadir="%%LOGSTASH_DATA_DIR%%"}
piddir=/var/run/${name}
pidfile=${piddir}/${name}.pid
@ -94,16 +81,10 @@ if checkyesno logstash_log; then
logstash_log_options=" --log ${logstash_log_file}"
fi
if [ ${logstash_mode} = "standalone" ]; then
logstash_args="agent -f ${logstash_config} ${logstash_log_options} -- web --port ${logstash_port}"
logstash_elastic_options="-Des.path.data=${logstash_elastic_datadir}"
elif [ ${logstash_mode} = "agent" ]; then
logstash_args="agent -f ${logstash_config} ${logstash_log_options}"
elif [ ${logstash_mode} = "web" ]; then
logstash_args="web --port ${logstash_port} ${logstash_log_options}"
fi
logstash_args="agent -f ${logstash_config} ${logstash_log_options}"
logstash_elastic_options="-Des.path.data=${logstash_elastic_datadir}"
JAVA_OPTS="${logstash_ffi_java_opts} ${logstash_java_opts} ${logstash_elastic_options}"
JAVA_OPTS="${logstash_java_opts} ${logstash_elastic_options}"
JAVA_HOME="${logstash_java_home}"
export JAVA_OPTS
export JAVA_HOME
@ -112,4 +93,8 @@ command="/usr/sbin/daemon"
command_args="-f -p ${pidfile} ${logstash_cmd} ${logstash_args}"
required_files="${logstash_home} ${logstash_java_home} ${logstash_cmd} ${logstash_config}"
# Include /usr/local/bin in path because Logstash startup scripts
# assume bash is in path.
PATH=/usr/local/bin:$PATH
run_rc_command "$1"

View File

@ -1,6 +1,6 @@
Logstash is a tool for managing events and logs. You can use it to
collect logs, parse them, and store them for later use (like, for
searching). Speaking of searching, logstash comes with a web interface
for searching and drilling into all of your logs.
Logstash is a tool for managing events and logs. You can use it to collect
logs, parse them, and store them for later use (like, for searching). Speaking
of searching, logstash comes with a web interface for searching and drilling
into all of your logs.
WWW: http://logstash.net/

View File

@ -0,0 +1,11 @@
To start logstash as an agent during startup, add
logstash_enable="YES"
to your /etc/rc.conf.
Extra options can be found in startup script.
NOTE: Since version 1.5.0, logstash is started in agent mode.
The Kibana web application is no longer embedded in this Logstash
distribution.

File diff suppressed because it is too large Load Diff