Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
security:logging
logstash
0002-Use-installed-jruby.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-Use-installed-jruby.patch of Package logstash
From 7aad6dacd2565dc9a35561a8816b67ca48e8ce85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de> Date: Mon, 30 Jan 2017 21:15:09 +0100 Subject: [PATCH 2/8] Use installed jruby --- bin/cpdump | 2 +- bin/logstash.lib.sh | 4 +++- gradle.properties | 1 + logstash-core/build.gradle | 3 ++- rakelib/z_rubycheck.rake | 8 ++++---- rubyUtils.gradle | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/bin/cpdump b/bin/cpdump index dd5f09b5c9ba..28435c5fa777 100755 --- a/bin/cpdump +++ b/bin/cpdump @@ -1,4 +1,4 @@ -#!/usr/bin/env bin/ruby +#!/usr/bin/env /usr/bin/jruby require_relative "../lib/bootstrap/environment" LogStash::Bundler.setup!({:without => [:build, :development]}) diff --git a/bin/logstash.lib.sh b/bin/logstash.lib.sh index 33c05fbc4809..1a0b1ab01cce 100755 --- a/bin/logstash.lib.sh +++ b/bin/logstash.lib.sh @@ -129,7 +129,7 @@ setup_java() { } setup_vendored_jruby() { - JRUBY_BIN="${LOGSTASH_HOME}/vendor/jruby/bin/jruby" + JRUBY_BIN="/usr/bin/jruby" if [ ! -f "${JRUBY_BIN}" ] ; then echo "Unable to find JRuby." @@ -138,6 +138,8 @@ setup_vendored_jruby() { exit 1 fi + export JRUBY_HOME=/usr/share/jruby + if [ -z "$LS_GEM_HOME" ] ; then export GEM_HOME="${LOGSTASH_HOME}/vendor/bundle/jruby/2.5.0" else diff --git a/gradle.properties b/gradle.properties index 5e0fa84944ed..102fac5a5338 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,3 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 org.gradle.daemon=false +custom.jruby.path=/usr/share/jruby diff --git a/logstash-core/build.gradle b/logstash-core/build.gradle index d8cb0178b499..e829f59be3e8 100644 --- a/logstash-core/build.gradle +++ b/logstash-core/build.gradle @@ -165,7 +165,7 @@ dependencies { if (customJRubyDir == "") { api "org.jruby:jruby-complete:${jrubyVersion}" } else { - api files(customJRubyDir + "/maven/jruby-complete/target/jruby-complete-${customJRubyVersion}.jar") + api files(customJRubyDir + "/lib/jruby-complete-${customJRubyVersion}.jar") } implementation group: 'com.google.guava', name: 'guava', version: '24.1.1-jre' // WARNING: DO NOT UPGRADE "google-java-format" @@ -180,4 +180,5 @@ dependencies { testImplementation 'net.javacrumbs.json-unit:json-unit:2.3.0' testImplementation 'org.elasticsearch:securemock:1.2' testImplementation 'org.assertj:assertj-core:3.11.1' + provided files('/usr/share/jruby/lib/jruby.jar') } diff --git a/rakelib/z_rubycheck.rake b/rakelib/z_rubycheck.rake index ab64deacd7d2..d22b93beda3b 100644 --- a/rakelib/z_rubycheck.rake +++ b/rakelib/z_rubycheck.rake @@ -16,13 +16,13 @@ # under the License. if ENV['USE_RUBY'] != '1' - if RUBY_ENGINE != "jruby" or Gem.ruby !~ /vendor\/jruby\/bin\/jruby/ - puts "Restarting myself under Vendored JRuby (currently #{RUBY_ENGINE} #{RUBY_VERSION})" if ENV['DEBUG'] + if RUBY_ENGINE != "jruby" or Gem.ruby !~ /usr\/share\/jruby\/bin\/jruby/ + puts "Restarting myself under Vendored JRuby (currently #{Gem.ruby} - #{RUBY_ENGINE} #{RUBY_VERSION} )" if ENV['DEBUG'] # Make sure we have JRuby, then rerun ourselves under jruby. Rake::Task["vendor:jruby"].invoke - jruby = File.join("bin", "ruby") - rake = File.join("vendor", "jruby", "bin", "rake") + jruby = File.join("/usr", "bin", "jruby") + rake = File.join("/usr", "bin", "jrake") # if required at this point system gems can be installed using the system_gem task, for example: # Rake::Task["vendor:system_gem"].invoke(jruby, "ffi", "1.9.6") diff --git a/rubyUtils.gradle b/rubyUtils.gradle index 2076ca8721b2..7b79e5f08498 100644 --- a/rubyUtils.gradle +++ b/rubyUtils.gradle @@ -25,7 +25,7 @@ buildscript { dependencies { classpath 'org.yaml:snakeyaml:1.23' classpath "de.undercouch:gradle-download-task:4.0.4" - classpath "org.jruby:jruby-complete:9.2.11.1" + classpath "org.jruby:jruby-complete:9.2.12.0" } } -- 2.26.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor