This updates JRuby to the latest release. Release announcement at http://jruby.org/2017/09/06/jruby-9-1-13-0.html
This release contains the rubygems security fixes that went in a few days ago, so most of the diff is removing those patches. Tested on amd64, the only supported arch. Will be committing in a couple days unless I hear objections. Thanks, Jeremy Index: Makefile =================================================================== RCS file: /cvs/ports/lang/jruby/Makefile,v retrieving revision 1.67 diff -u -p -r1.67 Makefile --- Makefile 2 Sep 2017 21:36:55 -0000 1.67 +++ Makefile 6 Sep 2017 21:03:58 -0000 @@ -5,14 +5,13 @@ ONLY_FOR_ARCHS = amd64 COMMENT = pure-Java implementation of the Ruby language -V = 9.1.12.0 +V = 9.1.13.0 DISTNAME = jruby-bin-${V} PKGNAME = jruby-${V} CATEGORIES = lang lang/ruby DISTFILES = ${DISTNAME}.tar.gz \ jnr-jffi-1.2.2-0-g4c196bb.tar.gz:0 \ ${JRUBY_LAUNCHER_GEM}:1 -REVISION = 1 HOMEPAGE = http://www.jruby.org/ Index: distinfo =================================================================== RCS file: /cvs/ports/lang/jruby/distinfo,v retrieving revision 1.42 diff -u -p -r1.42 distinfo --- distinfo 21 Jun 2017 15:38:00 -0000 1.42 +++ distinfo 6 Sep 2017 21:03:58 -0000 @@ -1,6 +1,6 @@ SHA256 (jnr-jffi-1.2.2-0-g4c196bb.tar.gz) = xK/m48Z/YA+fg4yFJqcRxceFnT0F98y255Ju9eSE7b0= -SHA256 (jruby-bin-9.1.12.0.tar.gz) = 3bI8lfSzzD/BzFe4HLTO7ndklu3kArmm6wYizxXhpZc= +SHA256 (jruby-bin-9.1.13.0.tar.gz) = nRVmRmI6wvJxdHIQNbUlcqSwVpDbfBKTKVqiwEqtOQg= SHA256 (jruby-launcher-1.1.1-java.gem) = 0iJ3vtg6aMTK/AIJdpLChL3TSVYqpbp89chB4ywVlOE= SIZE (jnr-jffi-1.2.2-0-g4c196bb.tar.gz) = 1759433 -SIZE (jruby-bin-9.1.12.0.tar.gz) = 20919880 +SIZE (jruby-bin-9.1.13.0.tar.gz) = 20993456 SIZE (jruby-launcher-1.1.1-java.gem) = 56832 Index: patches/patch-lib_ruby_stdlib_rubygems_commands_open_command_rb =================================================================== RCS file: patches/patch-lib_ruby_stdlib_rubygems_commands_open_command_rb diff -N patches/patch-lib_ruby_stdlib_rubygems_commands_open_command_rb --- patches/patch-lib_ruby_stdlib_rubygems_commands_open_command_rb 2 Sep 2017 21:36:55 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-lib_ruby_stdlib_rubygems_commands_open_command_rb,v 1.1 2017/09/02 21:36:55 jeremy Exp $ - -Index: lib/ruby/stdlib/rubygems/commands/open_command.rb ---- lib/ruby/stdlib/rubygems/commands/open_command.rb.orig -+++ lib/ruby/stdlib/rubygems/commands/open_command.rb -@@ -72,7 +72,7 @@ class Gem::Commands::OpenCommand < Gem::Command - end - - def spec_for name -- spec = Gem::Specification.find_all_by_name(name, @version).last -+ spec = Gem::Specification.find_all_by_name(name, @version).first - - return spec if spec - Index: patches/patch-lib_ruby_stdlib_rubygems_commands_query_command_rb =================================================================== RCS file: patches/patch-lib_ruby_stdlib_rubygems_commands_query_command_rb diff -N patches/patch-lib_ruby_stdlib_rubygems_commands_query_command_rb --- patches/patch-lib_ruby_stdlib_rubygems_commands_query_command_rb 2 Sep 2017 21:36:55 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,24 +0,0 @@ -$OpenBSD: patch-lib_ruby_stdlib_rubygems_commands_query_command_rb,v 1.1 2017/09/02 21:36:55 jeremy Exp $ - -Index: lib/ruby/stdlib/rubygems/commands/query_command.rb ---- lib/ruby/stdlib/rubygems/commands/query_command.rb.orig -+++ lib/ruby/stdlib/rubygems/commands/query_command.rb -@@ -226,7 +226,7 @@ is too hard to use. - end - end - -- output << make_entry(matching_tuples, platforms) -+ output << clean_text(make_entry(matching_tuples, platforms)) - end - end - -@@ -352,7 +352,8 @@ is too hard to use. - end - - def spec_summary entry, spec -- entry << "\n\n" << format_text(spec.summary, 68, 4) -+ summary = truncate_text(spec.summary, "the summary for #{spec.full_name}") -+ entry << "\n\n" << format_text(summary, 68, 4) - end - - end Index: patches/patch-lib_ruby_stdlib_rubygems_commands_sources_command_rb =================================================================== RCS file: patches/patch-lib_ruby_stdlib_rubygems_commands_sources_command_rb diff -N patches/patch-lib_ruby_stdlib_rubygems_commands_sources_command_rb --- patches/patch-lib_ruby_stdlib_rubygems_commands_sources_command_rb 2 Sep 2017 21:36:55 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-lib_ruby_stdlib_rubygems_commands_sources_command_rb,v 1.1 2017/09/02 21:36:55 jeremy Exp $ - -Index: lib/ruby/stdlib/rubygems/commands/sources_command.rb ---- lib/ruby/stdlib/rubygems/commands/sources_command.rb.orig -+++ lib/ruby/stdlib/rubygems/commands/sources_command.rb -@@ -44,7 +44,7 @@ class Gem::Commands::SourcesCommand < Gem::Command - source = Gem::Source.new source_uri - - begin -- if Gem.sources.include? source_uri then -+ if Gem.sources.include? source then - say "source #{source_uri} already present in the cache" - else - source.load_specs :released Index: patches/patch-lib_ruby_stdlib_rubygems_dependency_list_rb =================================================================== RCS file: patches/patch-lib_ruby_stdlib_rubygems_dependency_list_rb diff -N patches/patch-lib_ruby_stdlib_rubygems_dependency_list_rb --- patches/patch-lib_ruby_stdlib_rubygems_dependency_list_rb 2 Sep 2017 21:36:55 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-lib_ruby_stdlib_rubygems_dependency_list_rb,v 1.1 2017/09/02 21:36:55 jeremy Exp $ - -Index: lib/ruby/stdlib/rubygems/dependency_list.rb ---- lib/ruby/stdlib/rubygems/dependency_list.rb.orig -+++ lib/ruby/stdlib/rubygems/dependency_list.rb -@@ -104,7 +104,7 @@ class Gem::DependencyList - end - - def inspect # :nodoc: -- "#<%s:0x%x %p>" % [self.class, object_id, map { |s| s.full_name }] -+ "%s %p>" % [super[0..-2], map { |s| s.full_name }] - end - - ## Index: patches/patch-lib_ruby_stdlib_rubygems_installer_rb =================================================================== RCS file: patches/patch-lib_ruby_stdlib_rubygems_installer_rb diff -N patches/patch-lib_ruby_stdlib_rubygems_installer_rb --- patches/patch-lib_ruby_stdlib_rubygems_installer_rb 2 Sep 2017 21:36:55 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,26 +0,0 @@ -$OpenBSD: patch-lib_ruby_stdlib_rubygems_installer_rb,v 1.1 2017/09/02 21:36:55 jeremy Exp $ - -Index: lib/ruby/stdlib/rubygems/installer.rb ---- lib/ruby/stdlib/rubygems/installer.rb.orig -+++ lib/ruby/stdlib/rubygems/installer.rb -@@ -700,6 +700,11 @@ class Gem::Installer - unpack or File.writable?(gem_home) - end - -+ def verify_spec_name -+ return if spec.name =~ Gem::Specification::VALID_NAME_PATTERN -+ raise Gem::InstallError, "#{spec} has an invalid name" -+ end -+ - ## - # Return the text for an application file. - -@@ -823,6 +828,8 @@ TEXT - verify_gem_home options[:unpack] - - ensure_loadable_spec -+ -+ verify_spec_name - - if options[:install_as_default] - Gem.ensure_default_gem_subdirectories gem_home Index: patches/patch-lib_ruby_stdlib_rubygems_platform_rb =================================================================== RCS file: patches/patch-lib_ruby_stdlib_rubygems_platform_rb diff -N patches/patch-lib_ruby_stdlib_rubygems_platform_rb --- patches/patch-lib_ruby_stdlib_rubygems_platform_rb 2 Sep 2017 21:36:55 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-lib_ruby_stdlib_rubygems_platform_rb,v 1.1 2017/09/02 21:36:55 jeremy Exp $ - -Index: lib/ruby/stdlib/rubygems/platform.rb ---- lib/ruby/stdlib/rubygems/platform.rb.orig -+++ lib/ruby/stdlib/rubygems/platform.rb -@@ -112,7 +112,7 @@ class Gem::Platform - end - - def inspect -- "#<%s:0x%x @cpu=%p, @os=%p, @version=%p>" % [self.class, object_id, *to_a] -+ "%s @cpu=%p, @os=%p, @version=%p>" % [super[0..-2], *to_a] - end - - def to_a Index: patches/patch-lib_ruby_stdlib_rubygems_rb =================================================================== RCS file: patches/patch-lib_ruby_stdlib_rubygems_rb diff -N patches/patch-lib_ruby_stdlib_rubygems_rb --- patches/patch-lib_ruby_stdlib_rubygems_rb 2 Sep 2017 21:36:55 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ -$OpenBSD: patch-lib_ruby_stdlib_rubygems_rb,v 1.1 2017/09/02 21:36:55 jeremy Exp $ - -Index: lib/ruby/stdlib/rubygems.rb ---- lib/ruby/stdlib/rubygems.rb.orig -+++ lib/ruby/stdlib/rubygems.rb -@@ -234,6 +234,7 @@ module Gem - - def self.finish_resolve(request_set=Gem::RequestSet.new) - request_set.import Gem::Specification.unresolved_deps.values -+ request_set.import Gem.loaded_specs.values.map {|s| Gem::Dependency.new(s.name, s.version) } - - request_set.resolve_current.each do |s| - s.full_spec.activate Index: patches/patch-lib_ruby_stdlib_rubygems_remote_fetcher_rb =================================================================== RCS file: patches/patch-lib_ruby_stdlib_rubygems_remote_fetcher_rb diff -N patches/patch-lib_ruby_stdlib_rubygems_remote_fetcher_rb --- patches/patch-lib_ruby_stdlib_rubygems_remote_fetcher_rb 2 Sep 2017 21:36:55 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-lib_ruby_stdlib_rubygems_remote_fetcher_rb,v 1.1 2017/09/02 21:36:55 jeremy Exp $ - -Index: lib/ruby/stdlib/rubygems/remote_fetcher.rb ---- lib/ruby/stdlib/rubygems/remote_fetcher.rb.orig -+++ lib/ruby/stdlib/rubygems/remote_fetcher.rb -@@ -110,7 +110,7 @@ class Gem::RemoteFetcher - else - target = res.target.to_s.strip - -- if /\.#{Regexp.quote(host)}\z/ =~ target -+ if URI("http://" + target).host.end_with?(".#{host}") - return URI.parse "#{uri.scheme}://#{target}#{uri.path}" - end - Index: patches/patch-lib_ruby_stdlib_rubygems_specification_rb =================================================================== RCS file: patches/patch-lib_ruby_stdlib_rubygems_specification_rb diff -N patches/patch-lib_ruby_stdlib_rubygems_specification_rb --- patches/patch-lib_ruby_stdlib_rubygems_specification_rb 2 Sep 2017 21:36:55 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,32 +0,0 @@ -$OpenBSD: patch-lib_ruby_stdlib_rubygems_specification_rb,v 1.1 2017/09/02 21:36:55 jeremy Exp $ - -Index: lib/ruby/stdlib/rubygems/specification.rb ---- lib/ruby/stdlib/rubygems/specification.rb.orig -+++ lib/ruby/stdlib/rubygems/specification.rb -@@ -108,6 +108,8 @@ class Gem::Specification < Gem::BasicSpecification - - private_constant :LOAD_CACHE if defined? private_constant - -+ VALID_NAME_PATTERN = /\A[a-zA-Z0-9\.\-\_]+\z/ # :nodoc: -+ - # :startdoc: - - ## -@@ -2690,9 +2692,15 @@ class Gem::Specification < Gem::BasicSpecification - end - end - -- unless String === name then -+ if !name.is_a?(String) then - raise Gem::InvalidSpecificationException, -- "invalid value for attribute name: \"#{name.inspect}\"" -+ "invalid value for attribute name: \"#{name.inspect}\" must be a string" -+ elsif name !~ /[a-zA-Z]/ then -+ raise Gem::InvalidSpecificationException, -+ "invalid value for attribute name: #{name.dump} must include at least one letter" -+ elsif name !~ VALID_NAME_PATTERN then -+ raise Gem::InvalidSpecificationException, -+ "invalid value for attribute name: #{name.dump} can only include letters, numbers, dashes, and underscores" - end - - if raw_require_paths.empty? then Index: patches/patch-lib_ruby_stdlib_rubygems_test_case_rb =================================================================== RCS file: patches/patch-lib_ruby_stdlib_rubygems_test_case_rb diff -N patches/patch-lib_ruby_stdlib_rubygems_test_case_rb --- patches/patch-lib_ruby_stdlib_rubygems_test_case_rb 2 Sep 2017 21:36:55 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,28 +0,0 @@ -$OpenBSD: patch-lib_ruby_stdlib_rubygems_test_case_rb,v 1.1 2017/09/02 21:36:55 jeremy Exp $ - -Index: lib/ruby/stdlib/rubygems/test_case.rb ---- lib/ruby/stdlib/rubygems/test_case.rb.orig -+++ lib/ruby/stdlib/rubygems/test_case.rb -@@ -496,7 +496,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase - - system @git, 'add', gemspec - system @git, 'commit', '-a', '-m', 'a non-empty commit message', '--quiet' -- head = Gem::Util.popen('git', 'rev-parse', 'master').strip -+ head = Gem::Util.popen(@git, 'rev-parse', 'master').strip - end - - return name, git_spec.version, directory, head -@@ -1510,6 +1510,8 @@ end - begin - gem 'rdoc' - require 'rdoc' -+ -+ require 'rubygems/rdoc' - rescue LoadError, Gem::LoadError - end - -@@ -1526,3 +1528,4 @@ tmpdirs << (ENV['GEM_PATH'] = Dir.mktmpdir("path")) - pid = $$ - END {tmpdirs.each {|dir| Dir.rmdir(dir)} if $$ == pid} - Gem.clear_paths -+Gem.loaded_specs.clear Index: patches/patch-lib_ruby_stdlib_rubygems_text_rb =================================================================== RCS file: patches/patch-lib_ruby_stdlib_rubygems_text_rb diff -N patches/patch-lib_ruby_stdlib_rubygems_text_rb --- patches/patch-lib_ruby_stdlib_rubygems_text_rb 2 Sep 2017 21:36:55 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,32 +0,0 @@ -$OpenBSD: patch-lib_ruby_stdlib_rubygems_text_rb,v 1.1 2017/09/02 21:36:55 jeremy Exp $ - -Index: lib/ruby/stdlib/rubygems/text.rb ---- lib/ruby/stdlib/rubygems/text.rb.orig -+++ lib/ruby/stdlib/rubygems/text.rb -@@ -7,12 +7,25 @@ require 'rubygems' - module Gem::Text - - ## -+ # Remove any non-printable characters and make the text suitable for -+ # printing. -+ def clean_text(text) -+ text.gsub(/[\000-\b\v-\f\016-\037\177]/, ".".freeze) -+ end -+ -+ def truncate_text(text, description, max_length = 100_000) -+ raise ArgumentError, "max_length must be positive" unless max_length > 0 -+ return text if text.size <= max_length -+ "Truncating #{description} to #{max_length.to_s.reverse.gsub(/...(?=.)/,'\&,').reverse} characters:\n" + text[0, max_length] -+ end -+ -+ ## - # Wraps +text+ to +wrap+ characters and optionally indents by +indent+ - # characters - - def format_text(text, wrap, indent=0) - result = [] -- work = text.dup -+ work = clean_text(text) - - while work.length > wrap do - if work =~ /^(.{0,#{wrap}})[ \n]/ then Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/lang/jruby/pkg/PLIST,v retrieving revision 1.38 diff -u -p -r1.38 PLIST --- pkg/PLIST 21 Jun 2017 15:38:00 -0000 1.38 +++ pkg/PLIST 6 Sep 2017 21:03:58 -0000 @@ -38,7 +38,7 @@ jruby/lib/ruby/gems/1.8/specifications/ jruby/lib/ruby/gems/1.8/specifications/default/ jruby/lib/ruby/gems/1.8/specifications/default/did_you_mean-1.0.1.gemspec jruby/lib/ruby/gems/1.8/specifications/default/jar-dependencies-0.3.10.gemspec -jruby/lib/ruby/gems/1.8/specifications/default/jruby-openssl-0.9.20-java.gemspec +jruby/lib/ruby/gems/1.8/specifications/default/jruby-openssl-0.9.21-java.gemspec jruby/lib/ruby/gems/1.8/specifications/default/jruby-readline-1.1.1-java.gemspec jruby/lib/ruby/gems/1.8/specifications/default/json-1.8.3-java.gemspec jruby/lib/ruby/gems/1.8/specifications/default/minitest-5.4.1.gemspec @@ -924,6 +924,7 @@ jruby/lib/ruby/stdlib/rubygems/ jruby/lib/ruby/stdlib/rubygems.rb jruby/lib/ruby/stdlib/rubygems/available_set.rb jruby/lib/ruby/stdlib/rubygems/basic_specification.rb +jruby/lib/ruby/stdlib/rubygems/bundler_version_finder.rb jruby/lib/ruby/stdlib/rubygems/command.rb jruby/lib/ruby/stdlib/rubygems/command_manager.rb jruby/lib/ruby/stdlib/rubygems/commands/ @@ -951,6 +952,8 @@ jruby/lib/ruby/stdlib/rubygems/commands/ jruby/lib/ruby/stdlib/rubygems/commands/search_command.rb jruby/lib/ruby/stdlib/rubygems/commands/server_command.rb jruby/lib/ruby/stdlib/rubygems/commands/setup_command.rb +jruby/lib/ruby/stdlib/rubygems/commands/signin_command.rb +jruby/lib/ruby/stdlib/rubygems/commands/signout_command.rb jruby/lib/ruby/stdlib/rubygems/commands/sources_command.rb jruby/lib/ruby/stdlib/rubygems/commands/specification_command.rb jruby/lib/ruby/stdlib/rubygems/commands/stale_command.rb @@ -1102,19 +1105,11 @@ jruby/lib/ruby/stdlib/rubygems/source_sp jruby/lib/ruby/stdlib/rubygems/spec_fetcher.rb jruby/lib/ruby/stdlib/rubygems/specification.rb jruby/lib/ruby/stdlib/rubygems/ssl_certs/ -jruby/lib/ruby/stdlib/rubygems/ssl_certs/AddTrustExternalCARoot-2048.pem -jruby/lib/ruby/stdlib/rubygems/ssl_certs/AddTrustExternalCARoot.pem -jruby/lib/ruby/stdlib/rubygems/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem -jruby/lib/ruby/stdlib/rubygems/ssl_certs/DigiCertHighAssuranceEVRootCA.pem -jruby/lib/ruby/stdlib/rubygems/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem -jruby/lib/ruby/stdlib/rubygems/ssl_certs/GeoTrustGlobalCA.pem jruby/lib/ruby/stdlib/rubygems/ssl_certs/index.rubygems.org/ -jruby/lib/ruby/stdlib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRoot.pem jruby/lib/ruby/stdlib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem jruby/lib/ruby/stdlib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/ jruby/lib/ruby/stdlib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem jruby/lib/ruby/stdlib/rubygems/ssl_certs/rubygems.org/ -jruby/lib/ruby/stdlib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot-2048.pem jruby/lib/ruby/stdlib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem jruby/lib/ruby/stdlib/rubygems/stub_specification.rb jruby/lib/ruby/stdlib/rubygems/syck_hack.rb @@ -1147,7 +1142,9 @@ jruby/lib/ruby/stdlib/shellwords.rb jruby/lib/ruby/stdlib/singleton.rb jruby/lib/ruby/stdlib/socket.rb jruby/lib/ruby/stdlib/sync.rb +jruby/lib/ruby/stdlib/syslog/ jruby/lib/ruby/stdlib/syslog.rb +jruby/lib/ruby/stdlib/syslog/logger.rb jruby/lib/ruby/stdlib/tempfile.rb jruby/lib/ruby/stdlib/test/ jruby/lib/ruby/stdlib/test-unit.rb