diff options
author | feld <feld@FreeBSD.org> | 2018-03-15 06:50:27 +0800 |
---|---|---|
committer | feld <feld@FreeBSD.org> | 2018-03-15 06:50:27 +0800 |
commit | b8df0db1721ffc80ec78e3e359b44b91a095e4f4 (patch) | |
tree | 357795278e4d7ca8886077bdf96765edc507c073 /sysutils/logstash6 | |
parent | 3da5a09aa4753304d82ff8ab62704a40ac7d2ce0 (diff) | |
download | freebsd-ports-gnome-b8df0db1721ffc80ec78e3e359b44b91a095e4f4.tar.gz freebsd-ports-gnome-b8df0db1721ffc80ec78e3e359b44b91a095e4f4.tar.zst freebsd-ports-gnome-b8df0db1721ffc80ec78e3e359b44b91a095e4f4.zip |
sysutils/logstash6: Fix ability to install plugins
- Backport fix for plugin *updates* that upstream hasn't released yet
- Fix an expr syntax error which was really from upstream jruby;
logstash doesn't ship with a new enough jruby that includes this fix yet
Diffstat (limited to 'sysutils/logstash6')
-rw-r--r-- | sysutils/logstash6/Makefile | 17 | ||||
-rw-r--r-- | sysutils/logstash6/files/patch-Gemfile | 10 | ||||
-rw-r--r-- | sysutils/logstash6/files/patch-Gemfile.lock | 10 | ||||
-rw-r--r-- | sysutils/logstash6/files/patch-vendor_jruby_bin_jruby | 11 | ||||
-rw-r--r-- | sysutils/logstash6/files/patch-vendor_jruby_bin_jruby.bash | 11 | ||||
-rw-r--r-- | sysutils/logstash6/files/patch-vendor_jruby_bin_jruby.sh | 24 |
6 files changed, 74 insertions, 9 deletions
diff --git a/sysutils/logstash6/Makefile b/sysutils/logstash6/Makefile index 1b232253affe..ae299edfa12f 100644 --- a/sysutils/logstash6/Makefile +++ b/sysutils/logstash6/Makefile @@ -3,7 +3,7 @@ PORTNAME= logstash PORTVERSION= 6.2.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= sysutils java MASTER_SITES= http://artifacts.elastic.co/downloads/logstash/ PKGNAMESUFFIX= 6 @@ -18,7 +18,7 @@ RUN_DEPENDS= ${LOCALBASE}/bin/bash:shells/bash CONFLICTS= logstash-[0-9]* logstash5-[0-9]* USES= cpe shebangfix -SHEBANG_FILES= bin/logstash +SHEBANG_FILES= bin/* CPE_VENDOR= elasticsearch USE_JAVA= yes JAVA_VERSION= 1.8+ @@ -34,7 +34,6 @@ LOGSTASH_HOME?= ${PREFIX}/${PORTNAME} SUB_LIST= JAVA_HOME=${JAVA_HOME} \ LOGSTASH_HOME=${LOGSTASH_HOME} -LOGSTASH_BIN_FILES= logstash LOGSTASH_CONF_FILES= jvm.options log4j2.properties logstash.yml pipelines.yml LOGSTASH_JRUBY_SUBDIR= vendor/jruby/bin LOGSTASH_JRUBY_BIN_FILES= ast irb jirb jruby jruby.sh rdoc testrb gem \ @@ -42,22 +41,22 @@ LOGSTASH_JRUBY_BIN_FILES= ast irb jirb jruby jruby.sh rdoc testrb gem \ post-patch: ${REINPLACE_CMD} 's|%%ETCDIR%%|${ETCDIR}|g' ${WRKSRC}/config/logstash.yml + ${FIND} ${WRKSRC} -name '*.orig' -delete do-install: - @${FIND} ${WRKSRC} -name '*.bat' -delete + ${FIND} ${WRKSRC} -name '*.bat' -delete ${MKDIR} ${STAGEDIR}${ETCDIR} ${INSTALL_DATA} ${FILESDIR}/logstash.conf.sample ${STAGEDIR}${ETCDIR} .for x in ${LOGSTASH_CONF_FILES} ${INSTALL_DATA} ${WRKSRC}/config/${x} ${STAGEDIR}${ETCDIR}/${x}.sample .endfor ${RM} -rf ${WRKSRC}/config - @(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${LOGSTASH_DIR}) -.for x in ${LOGSTASH_BIN_FILES} - @${CHMOD} ${BINMODE} ${STAGEDIR}${LOGSTASH_DIR}/bin/${x} -.endfor + (cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${LOGSTASH_DIR}) + ${CHMOD} ${BINMODE} ${STAGEDIR}${LOGSTASH_DIR}/bin/* .for x in ${LOGSTASH_JRUBY_BIN_FILES} - @${CHMOD} ${BINMODE} ${STAGEDIR}${LOGSTASH_DIR}/${LOGSTASH_JRUBY_SUBDIR}/${x} + ${CHMOD} ${BINMODE} ${STAGEDIR}${LOGSTASH_DIR}/${LOGSTASH_JRUBY_SUBDIR}/${x} .endfor + ${INSTALL} -lrs ${STAGEDIR}${ETCDIR} ${STAGEDIR}${LOGSTASH_DIR}/config post-install: ${ECHO} "@sample ${ETCDIR}/logstash.conf.sample" >> ${TMPPLIST} diff --git a/sysutils/logstash6/files/patch-Gemfile b/sysutils/logstash6/files/patch-Gemfile new file mode 100644 index 000000000000..92a9eeb4207c --- /dev/null +++ b/sysutils/logstash6/files/patch-Gemfile @@ -0,0 +1,10 @@ +--- Gemfile.orig 2018-03-14 22:38:33 UTC ++++ Gemfile +@@ -4,6 +4,7 @@ + source "https://rubygems.org" + gem "logstash-core", :path => "./logstash-core" + gem "logstash-core-plugin-api", :path => "./logstash-core-plugin-api" ++gem "atomic", "<= 1.1.99" + gem "paquet", "~> 0.2.0" + gem "ruby-progressbar", "~> 1.8.1" + gem "builder", "~> 3.2.2" diff --git a/sysutils/logstash6/files/patch-Gemfile.lock b/sysutils/logstash6/files/patch-Gemfile.lock new file mode 100644 index 000000000000..12e2f23ef8db --- /dev/null +++ b/sysutils/logstash6/files/patch-Gemfile.lock @@ -0,0 +1,10 @@ +--- Gemfile.lock.orig 2018-03-14 22:30:17 UTC ++++ Gemfile.lock +@@ -604,6 +604,7 @@ PLATFORMS + java + + DEPENDENCIES ++ atomic (<= 1.1.99) + benchmark-ips + builder (~> 3.2.2) + ci_reporter_rspec (= 1.0.0) diff --git a/sysutils/logstash6/files/patch-vendor_jruby_bin_jruby b/sysutils/logstash6/files/patch-vendor_jruby_bin_jruby new file mode 100644 index 000000000000..235a818e8c48 --- /dev/null +++ b/sysutils/logstash6/files/patch-vendor_jruby_bin_jruby @@ -0,0 +1,11 @@ +--- vendor/jruby/bin/jruby.orig 2018-02-16 20:50:22 UTC ++++ vendor/jruby/bin/jruby +@@ -244,7 +244,7 @@ do + # Match -Xa.b.c=d to translate to -Da.b.c=d as a java option + -X*) + val=${1:2} +- if expr "$val" : '.*[.]' > /dev/null; then ++ if expr -- "$val" : '.*[.]' > /dev/null; then + java_args=("${java_args[@]}" "-Djruby.${val}") + else + ruby_args=("${ruby_args[@]}" "-X${val}") diff --git a/sysutils/logstash6/files/patch-vendor_jruby_bin_jruby.bash b/sysutils/logstash6/files/patch-vendor_jruby_bin_jruby.bash new file mode 100644 index 000000000000..97a2007b9f07 --- /dev/null +++ b/sysutils/logstash6/files/patch-vendor_jruby_bin_jruby.bash @@ -0,0 +1,11 @@ +--- vendor/jruby/bin/jruby.bash.orig 2018-02-16 20:50:22 UTC ++++ vendor/jruby/bin/jruby.bash +@@ -244,7 +244,7 @@ do + # Match -Xa.b.c=d to translate to -Da.b.c=d as a java option + -X*) + val=${1:2} +- if expr "$val" : '.*[.]' > /dev/null; then ++ if expr -- "$val" : '.*[.]' > /dev/null; then + java_args=("${java_args[@]}" "-Djruby.${val}") + else + ruby_args=("${ruby_args[@]}" "-X${val}") diff --git a/sysutils/logstash6/files/patch-vendor_jruby_bin_jruby.sh b/sysutils/logstash6/files/patch-vendor_jruby_bin_jruby.sh new file mode 100644 index 000000000000..c599c3e445c7 --- /dev/null +++ b/sysutils/logstash6/files/patch-vendor_jruby_bin_jruby.sh @@ -0,0 +1,24 @@ +--- vendor/jruby/bin/jruby.sh.orig 2018-02-16 20:50:22 UTC ++++ vendor/jruby/bin/jruby.sh +@@ -26,9 +26,9 @@ progname=`basename "$0"` + + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` +- link=`expr "$ls" : '.*-> \(.*\)$'` +- if expr "$link" : '.*/.*' > /dev/null; then +- if expr "$link" : '/' > /dev/null; then ++ link=`expr -- "$ls" : '.*-> \(.*\)$'` ++ if expr -- "$link" : '.*/.*' > /dev/null; then ++ if expr -- "$link" : '/' > /dev/null; then + PRG="$link" + else + PRG="`dirname ${PRG}`/${link}" +@@ -202,7 +202,7 @@ do + # Match -Xa.b.c=d to translate to -Da.b.c=d as a java option + -X*) + val=${1:2} +- if expr "$val" : '.*[.]' > /dev/null; then ++ if expr -- "$val" : '.*[.]' > /dev/null; then + java_args="${java_args} -Djruby.${val}" + else + ruby_args="${ruby_args} -X${val}" |