Hello community, here is the log from the commit of package rubygem-puma for openSUSE:Factory checked in at 2017-06-15 11:24:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-puma (Old) and /work/SRC/openSUSE:Factory/.rubygem-puma.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-puma" Thu Jun 15 11:24:56 2017 rev:25 rq:503593 version:3.9.1 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-puma/rubygem-puma.changes 2017-04-11 09:32:31.132251478 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-puma.new/rubygem-puma.changes 2017-06-15 11:25:36.948574891 +0200 @@ -1,0 +2,35 @@ +Tue Jun 6 05:40:02 UTC 2017 - [email protected] + +- updated to version 3.9.1 + see installed History.md + + ## 3.9.1 / 2017-06-03 + + * 2 bugfixes: + * Fixed compatibility with older Bundler versions (#1314) + * Some internal test/development cleanup (#1311, #1313) + + ## 3.9.0 / 2017-06-01 + + * 2 features: + * The ENV is now reset to its original values when Puma restarts via USR1/USR2 (#1260) (MRI only, no JRuby support) + * Puma will no longer accept more clients than the maximum number of threads. (#1278) + + * 9 bugfixes: + * Reduce information leakage by preventing HTTP parse errors from writing environment hashes to STDERR (#1306) + * Fix SSL/WebSocket compatibility (#1274) + * HTTP headers with empty values are no longer omitted from responses. (#1261) + * Fix a Rack env key which was set to nil. (#1259) + * peercert has been implemented for JRuby (#1248) + * Fix port settings when using rails s (#1277, #1290) + * Fix compat w/LibreSSL (#1285) + * Fix restarting Puma w/symlinks and a new Gemfile (#1282) + * Replace Dir.exists? with Dir.exist? (#1294) + + * 1 known issue: + * A bug in MRI 2.2+ can result in IOError: stream closed. See #1206. This issue has existed since at least Puma 3.6, and probably further back. + + * 1 refactor: + * Lots of test fixups from @grosser. + +------------------------------------------------------------------- Old: ---- puma-3.8.2.gem New: ---- puma-3.9.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-puma.spec ++++++ --- /var/tmp/diff_new_pack.IaI9AI/_old 2017-06-15 11:25:37.452503755 +0200 +++ /var/tmp/diff_new_pack.IaI9AI/_new 2017-06-15 11:25:37.456503191 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-puma -Version: 3.8.2 +Version: 3.9.1 Release: 0 %define mod_name puma %define mod_full_name %{mod_name}-%{version} ++++++ puma-3.8.2.gem -> puma-3.9.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile new/Gemfile --- old/Gemfile 2017-03-14 17:21:52.000000000 +0100 +++ new/Gemfile 2017-06-03 15:52:42.000000000 +0200 @@ -1,5 +1,7 @@ source "https://rubygems.org" +gemspec + gem "hoe" gem "hoe-git" gem "hoe-ignore" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/History.md new/History.md --- old/History.md 2017-03-14 17:21:52.000000000 +0100 +++ new/History.md 2017-06-03 15:52:42.000000000 +0200 @@ -1,3 +1,32 @@ +## 3.9.1 / 2017-06-03 + +* 2 bugfixes: + * Fixed compatibility with older Bundler versions (#1314) + * Some internal test/development cleanup (#1311, #1313) + +## 3.9.0 / 2017-06-01 + +* 2 features: + * The ENV is now reset to its original values when Puma restarts via USR1/USR2 (#1260) (MRI only, no JRuby support) + * Puma will no longer accept more clients than the maximum number of threads. (#1278) + +* 9 bugfixes: + * Reduce information leakage by preventing HTTP parse errors from writing environment hashes to STDERR (#1306) + * Fix SSL/WebSocket compatibility (#1274) + * HTTP headers with empty values are no longer omitted from responses. (#1261) + * Fix a Rack env key which was set to nil. (#1259) + * peercert has been implemented for JRuby (#1248) + * Fix port settings when using rails s (#1277, #1290) + * Fix compat w/LibreSSL (#1285) + * Fix restarting Puma w/symlinks and a new Gemfile (#1282) + * Replace Dir.exists? with Dir.exist? (#1294) + +* 1 known issue: + * A bug in MRI 2.2+ can result in IOError: stream closed. See #1206. This issue has existed since at least Puma 3.6, and probably further back. + +* 1 refactor: + * Lots of test fixups from @grosser. + ## 3.8.2 / 2017-03-14 * 1 bugfix: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile 2017-03-14 17:21:52.000000000 +0100 +++ new/Rakefile 2017-06-03 15:52:42.000000000 +0200 @@ -8,6 +8,7 @@ Hoe.plugin :git Hoe.plugin :ignore +# Keep in sync with puma.gemspec HOE = Hoe.spec "puma" do self.readme_file = "README.md" self.urls = %w!http://puma.io https://github.com/puma/puma! @@ -17,13 +18,9 @@ spec_extras[:extensions] = ["ext/puma_http11/extconf.rb"] spec_extras[:executables] = ['puma', 'pumactl'] - spec_extras[:homepage] = self.urls.first + spec_extras[:homepage] = urls.first require_ruby_version ">= 1.9.3" - - dependency "rack", [">= 1.1", "< 3.0"], :development - - extra_dev_deps << ["rake-compiler", "~> 0.8"] end task :prerelease => [:clobber, :check_manifest, :test] @@ -143,6 +140,16 @@ task :test => [:compile] end +task :test => [:ensure_no_puma_gem] +task :ensure_no_puma_gem do + Bundler.with_clean_env do + out = `gem list puma`.strip + if !$?.success? || out != "" + abort "No other puma version should be install to avoid false positives or lading it by accident but found #{out}" + end + end +end + namespace :test do desc "Run the integration tests" task :integration do Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/puma_http11/mini_ssl.c new/ext/puma_http11/mini_ssl.c --- old/ext/puma_http11/mini_ssl.c 2017-03-14 17:21:52.000000000 +0100 +++ new/ext/puma_http11/mini_ssl.c 2017-06-03 15:52:42.000000000 +0200 @@ -88,7 +88,7 @@ DH *dh; dh = DH_new(); -#if OPENSSL_VERSION_NUMBER < 0x10100005L +#if OPENSSL_VERSION_NUMBER < 0x10100005L || defined(LIBRESSL_VERSION_NUMBER) dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL); dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/puma_http11/org/jruby/puma/MiniSSL.java new/ext/puma_http11/org/jruby/puma/MiniSSL.java --- old/ext/puma_http11/org/jruby/puma/MiniSSL.java 2017-03-14 17:21:52.000000000 +0100 +++ new/ext/puma_http11/org/jruby/puma/MiniSSL.java 2017-06-03 15:52:42.000000000 +0200 @@ -6,6 +6,7 @@ import org.jruby.RubyObject; import org.jruby.RubyString; import org.jruby.anno.JRubyMethod; +import org.jruby.javasupport.JavaEmbedUtils; import org.jruby.runtime.Block; import org.jruby.runtime.ObjectAllocator; import org.jruby.runtime.ThreadContext; @@ -18,6 +19,7 @@ import javax.net.ssl.SSLEngine; import javax.net.ssl.SSLEngineResult; import javax.net.ssl.SSLException; +import javax.net.ssl.SSLPeerUnverifiedException; import javax.net.ssl.SSLSession; import java.io.FileInputStream; import java.io.IOException; @@ -27,6 +29,7 @@ import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.UnrecoverableKeyException; +import java.security.cert.CertificateEncodingException; import java.security.cert.CertificateException; import static javax.net.ssl.SSLEngineResult.Status; @@ -333,7 +336,11 @@ } @JRubyMethod - public IRubyObject peercert() { - return getRuntime().getNil(); + public IRubyObject peercert() throws CertificateEncodingException { + try { + return JavaEmbedUtils.javaToRuby(getRuntime(), engine.getSession().getPeerCertificates()[0].getEncoded()); + } catch (SSLPeerUnverifiedException ex) { + return getRuntime().getNil(); + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/puma/const.rb new/lib/puma/const.rb --- old/lib/puma/const.rb 2017-03-14 17:21:52.000000000 +0100 +++ new/lib/puma/const.rb 2017-06-03 15:52:42.000000000 +0200 @@ -95,8 +95,8 @@ # too taxing on performance. module Const - PUMA_VERSION = VERSION = "3.8.2".freeze - CODE_NAME = "Sassy Salamander".freeze + PUMA_VERSION = VERSION = "3.9.1".freeze + CODE_NAME = "Private Caller".freeze PUMA_SERVER_STRING = ['puma', PUMA_VERSION, CODE_NAME].join(' ').freeze FAST_TRACK_KA_TIMEOUT = 0.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/puma/events.rb new/lib/puma/events.rb --- old/lib/puma/events.rb 2017-03-14 17:21:52.000000000 +0100 +++ new/lib/puma/events.rb 2017-06-03 15:52:42.000000000 +0200 @@ -91,8 +91,7 @@ # parsing exception. # def parse_error(server, env, error) - @stderr.puts "#{Time.now}: HTTP parse error, malformed request (#{env[HTTP_X_FORWARDED_FOR] || env[REMOTE_ADDR]}): #{error.inspect}" - @stderr.puts "#{Time.now}: ENV: #{env.inspect}\n---\n" + @stderr.puts "#{Time.now}: HTTP parse error, malformed request (#{env[HTTP_X_FORWARDED_FOR] || env[REMOTE_ADDR]}): #{error.inspect}\n---\n" end # An SSL error has occurred. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/puma/launcher.rb new/lib/puma/launcher.rb --- old/lib/puma/launcher.rb 2017-03-14 17:21:52.000000000 +0100 +++ new/lib/puma/launcher.rb 2017-06-03 15:52:42.000000000 +0200 @@ -163,6 +163,8 @@ # Run the server. This blocks until the server is stopped def run + previous_env = (defined?(Bundler) ? Bundler::ORIGINAL_ENV : ENV.to_h) + @config.clamp @config.plugins.fire_starts self @@ -178,6 +180,7 @@ graceful_stop when :restart log "* Restarting..." + ENV.replace(previous_env) @runner.before_restart restart! when :exit @@ -337,8 +340,6 @@ @restart_dir ||= Dir.pwd - require 'rubygems' - # if $0 is a file in the current directory, then restart # it the same, otherwise add -S on there because it was # picked up in PATH. @@ -349,9 +350,10 @@ arg0 = [Gem.ruby, "-S", $0] end - # Detect and reinject -Ilib from the command line + # Detect and reinject -Ilib from the command line, used for testing without bundler + # cruby has an expanded path, jruby has just "lib" lib = File.expand_path "lib" - arg0[1,0] = ["-I", lib] if $:[0] == lib + arg0[1,0] = ["-I", lib] if [lib, "lib"].include?($LOAD_PATH[0]) if defined? Puma::WILD_ARGS @restart_argv = arg0 + Puma::WILD_ARGS + @original_argv diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/puma/minissl.rb new/lib/puma/minissl.rb --- old/lib/puma/minissl.rb 2017-03-14 17:21:52.000000000 +0100 +++ new/lib/puma/minissl.rb 2017-06-03 15:52:42.000000000 +0200 @@ -36,7 +36,9 @@ output end - def read_nonblock(size) + def read_nonblock(size, *_) + # *_ is to deal with keyword args that were added + # at some point (and being used in the wild) while true output = engine_read_all return output if output @@ -77,6 +79,19 @@ alias_method :syswrite, :write alias_method :<<, :write + # This is a temporary fix to deal with websockets code using + # write_nonblock. The problem with implementing it properly + # is that it means we'd have to have the ability to rewind + # an engine because after we write+extract, the socket + # write_nonblock call might raise an exception and later + # code would pass the same data in, but the engine would think + # it had already written the data in. So for the time being + # (and since write blocking is quite rare), go ahead and actually + # block in write_nonblock. + def write_nonblock(data, *_) + write data + end + def flush @socket.flush end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/puma/runner.rb new/lib/puma/runner.rb --- old/lib/puma/runner.rb 2017-03-14 17:21:52.000000000 +0100 +++ new/lib/puma/runner.rb 2017-06-03 15:52:42.000000000 +0200 @@ -107,7 +107,7 @@ append = @options[:redirect_append] if stdout - unless Dir.exists?(File.dirname(stdout)) + unless Dir.exist?(File.dirname(stdout)) raise "Cannot redirect STDOUT to #{stdout}" end @@ -117,7 +117,7 @@ end if stderr - unless Dir.exists?(File.dirname(stderr)) + unless Dir.exist?(File.dirname(stderr)) raise "Cannot redirect STDERR to #{stderr}" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/puma/server.rb new/lib/puma/server.rb --- old/lib/puma/server.rb 2017-03-14 17:21:52.000000000 +0100 +++ new/lib/puma/server.rb 2017-06-03 15:52:42.000000000 +0200 @@ -363,7 +363,7 @@ end pool << client - pool.wait_until_not_full unless queue_requests + pool.wait_until_not_full end rescue SystemCallError # nothing @@ -522,7 +522,9 @@ raise "No REQUEST PATH" unless env[REQUEST_PATH] - env[QUERY_STRING] = uri.query + # A nil env value will cause a LintError (and fatal errors elsewhere), + # so only set the env value if there actually is a value. + env[QUERY_STRING] = uri.query if uri.query end env[PATH_INFO] = env[REQUEST_PATH] @@ -687,7 +689,7 @@ next end - if vs.respond_to?(:to_s) + if vs.respond_to?(:to_s) && !vs.to_s.empty? vs.to_s.split(NEWLINE).each do |v| lines.append k, colon, v, line_ending end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/puma/thread_pool.rb new/lib/puma/thread_pool.rb --- old/lib/puma/thread_pool.rb 2017-03-14 17:21:52.000000000 +0100 +++ new/lib/puma/thread_pool.rb 2017-06-03 15:52:42.000000000 +0200 @@ -155,7 +155,15 @@ def wait_until_not_full @mutex.synchronize do - until @todo.size - @waiting < @max - @spawned or @shutdown + while true + return if @shutdown + return if @waiting > 0 + + # If we can still spin up new threads and there + # is work queued, then accept more work until we would + # spin up the max number of threads. + return if @todo.size < @max - @spawned + @not_full.wait @mutex end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rack/handler/puma.rb new/lib/rack/handler/puma.rb --- old/lib/rack/handler/puma.rb 2017-03-14 17:21:52.000000000 +0100 +++ new/lib/rack/handler/puma.rb 2017-06-03 15:52:42.000000000 +0200 @@ -42,7 +42,12 @@ user_config.threads min, max end - self.set_host_port_to_config(options[:Host], options[:Port], user_config) + if options[:Host] || options[:Port] + host = options[:Host] || default_options[:Host] + port = options[:Port] || default_options[:Port] + self.set_host_port_to_config(host, port, user_config) + end + self.set_host_port_to_config(default_options[:Host], default_options[:Port], default_config) user_config.app app diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2017-03-14 17:21:52.000000000 +0100 +++ new/metadata 2017-06-03 15:52:42.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: puma version: !ruby/object:Gem::Version - version: 3.8.2 + version: 3.9.1 platform: ruby authors: - Evan Phoenix autorequire: bindir: bin cert_chain: [] -date: 2017-03-14 00:00:00.000000000 Z +date: 2017-06-03 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rdoc @@ -25,53 +25,19 @@ - !ruby/object:Gem::Version version: '4.0' - !ruby/object:Gem::Dependency - name: rack - requirement: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: '1.1' - - - "<" - - !ruby/object:Gem::Version - version: '3.0' - type: :development - prerelease: false - version_requirements: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: '1.1' - - - "<" - - !ruby/object:Gem::Version - version: '3.0' -- !ruby/object:Gem::Dependency - name: rake-compiler - requirement: !ruby/object:Gem::Requirement - requirements: - - - "~>" - - !ruby/object:Gem::Version - version: '0.8' - type: :development - prerelease: false - version_requirements: !ruby/object:Gem::Requirement - requirements: - - - "~>" - - !ruby/object:Gem::Version - version: '0.8' -- !ruby/object:Gem::Dependency name: hoe requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: '3.14' + version: '3.15' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: '3.14' + version: '3.15' description: Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications. Puma is intended for use in both development and production environments. In order to get the best throughput, it is highly recommended that @@ -197,7 +163,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.5.1 +rubygems_version: 2.6.11 signing_key: specification_version: 4 summary: Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/puma.gemspec new/puma.gemspec --- old/puma.gemspec 2017-03-14 17:21:52.000000000 +0100 +++ new/puma.gemspec 2017-06-03 15:52:42.000000000 +0200 @@ -1,52 +1,20 @@ # -*- encoding: utf-8 -*- -# This is only used when puma is a git dep from Bundler, so it's a little -# weird. +# This is only used when puma is a git dep from Bundler, keep in sync with Rakefile -d = File.read(File.expand_path("../lib/puma/const.rb", __FILE__)) -if d =~ /VERSION = "(\d+\.\d+\.\d+)"/ - version = $1 -else - version = "0.0.1" -end +version = File.read(File.expand_path("../lib/puma/const.rb", __FILE__))[/VERSION = "(\d+\.\d+\.\d+)"/, 1] || raise Gem::Specification.new do |s| s.name = "puma" s.version = version - - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Evan Phoenix"] - s.date = `git log --pretty="%ai" -n 1`.split(" ").first s.description = "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications. Puma is intended for use in both development and production environments. It's great for highly concurrent Ruby implementations such as Rubinius and JRuby as well as as providing process worker support to support CRuby well." + s.summary = "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications" s.email = ["[email protected]"] s.executables = ["puma", "pumactl"] s.extensions = ["ext/puma_http11/extconf.rb"] s.files = `git ls-files`.split($/) s.homepage = "http://puma.io" s.license = "BSD-3-Clause" - s.rdoc_options = ["--main", "README.md"] - s.require_paths = ["lib"] s.required_ruby_version = Gem::Requirement.new(">= 1.9.3") - s.rubyforge_project = "puma" - s.rubygems_version = "1.8.25" - s.summary = "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications" - s.test_files = s.files.grep(/^test/) - - if s.respond_to? :specification_version then - s.specification_version = 3 - - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_development_dependency(%q<rdoc>, ["~> 4.0"]) - s.add_development_dependency(%q<rake-compiler>, ["~> 0.8.0"]) - s.add_development_dependency(%q<hoe>, ["~> 3.6"]) - else - s.add_dependency(%q<rdoc>, ["~> 4.0"]) - s.add_dependency(%q<rake-compiler>, ["~> 0.8.0"]) - s.add_dependency(%q<hoe>, ["~> 3.6"]) - end - else - s.add_dependency(%q<rdoc>, ["~> 4.0"]) - s.add_dependency(%q<rake-compiler>, ["~> 0.8.0"]) - s.add_dependency(%q<hoe>, ["~> 3.6"]) - end end
