Skip to content

Commit

Permalink
fix building of deb and rpm
Browse files Browse the repository at this point in the history
fpm requires json 1.x but the artifact rake tasks
will activate the default gem json 2

This PR ensures json 1 is activated early and is present right after
jruby is bootstrapped.

Also downgrades fpm to 1.3 as 1.11.0 wasn't building correctly

Downgrades .ruby-version to a version we have available in CI

Fixes elastic#10396
  • Loading branch information
jsvd committed Feb 6, 2019
1 parent 328b838 commit 2910faa
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
jruby-9.2.4.1
jruby-9.1.12.0
2 changes: 1 addition & 1 deletion Gemfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ gem "benchmark-ips", :group => :development
gem "octokit", "~> 4", :group => :build
gem "stud", "~> 0.0.22", :group => :build
gem "rack-test", :require => "rack/test", :group => :development
gem "fpm", "~> 1.11", :group => :build
gem "fpm", "~> 1.3.3", :group => :build
gem "rubyzip", "~> 1", :group => :build
gem "gems", "~> 1", :group => :build
gem "flores", "~> 0.0.6", :group => :development
Expand Down
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ task downloadAndInstallJRuby(dependsOn: [verifyFile, installCustomJRuby], type:
into "${projectDir}/vendor/jruby"
doLast {
rubyGradleUtils.gem("rake", "12.3.1", "${projectDir}/vendor/bundle/jruby/2.5.0")
rubyGradleUtils.gem("json", "1.8.6", "${projectDir}/vendor/bundle/jruby/2.5.0")
}
}

Expand All @@ -232,6 +233,7 @@ task installDefaultGems(dependsOn: downloadAndInstallJRuby) {
outputs.dir("${projectDir}/vendor/bundle/jruby/2.5.0")
doLast {
rubyGradleUtils.gem("rake", "12.3.1", "${projectDir}/vendor/bundle/jruby/2.5.0")
rubyGradleUtils.gem("json", "1.8.6", "${projectDir}/vendor/bundle/jruby/2.5.0")
rubyGradleUtils.rake('plugin:install-default')
}
}
Expand All @@ -250,6 +252,7 @@ task installTestGems(dependsOn: assemblyDeps) {
outputs.dir("${projectDir}/vendor/bundle/jruby/2.5.0")
doLast {
rubyGradleUtils.gem("rake", "12.3.1", "${projectDir}/vendor/bundle/jruby/2.5.0")
rubyGradleUtils.gem("json", "1.8.6", "${projectDir}/vendor/bundle/jruby/2.5.0")
rubyGradleUtils.rake('test:install-core')
}
}
Expand Down
2 changes: 1 addition & 1 deletion logstash-core/logstash-core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Gem::Specification.new do |gem|

gem.add_runtime_dependency "pry", "~> 0.12" #(Ruby license)
gem.add_runtime_dependency "stud", "~> 0.0.19" #(Apache 2.0 license)
gem.add_runtime_dependency "clamp", "~> 1" #(MIT license) for command line args/flags
gem.add_runtime_dependency "clamp", "~> 0.6" #(MIT license) for command line args/flags
gem.add_runtime_dependency "filesize", "~> 0.2" #(MIT license) for :bytes config validator
gem.add_runtime_dependency "gems", "~> 1" #(MIT license)
gem.add_runtime_dependency "concurrent-ruby", "~> 1"
Expand Down
1 change: 1 addition & 0 deletions rakelib/artifacts.rake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
namespace "artifact" do
gem 'json', '~> 1'

SNAPSHOT_BUILD = ENV["RELEASE"] != "1"
VERSION_QUALIFIER = ENV["VERSION_QUALIFIER"]
Expand Down
4 changes: 2 additions & 2 deletions rakelib/dependency.rake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace "dependency" do
end

task "clamp" do
Rake::Task["gem:require"].invoke("clamp", "~> 0.6.5")
Rake::Task["gem:require"].invoke("clamp", "~> 0.6")
end

task "rbx-stdlib" do
Expand All @@ -21,7 +21,7 @@ namespace "dependency" do
end # task stud

task "fpm" do
Rake::Task["gem:require"].invoke("fpm", ">= 0")
Rake::Task["gem:require"].invoke("fpm", "~> 1.3.3")
end # task stud

task "rubyzip" do
Expand Down

0 comments on commit 2910faa

Please sign in to comment.