Hello community,
here is the log from the commit of package rubygem-unicorn for openSUSE:Factory
checked in at 2019-03-27 16:17:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-unicorn (Old)
and /work/SRC/openSUSE:Factory/.rubygem-unicorn.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-unicorn"
Wed Mar 27 16:17:29 2019 rev:7 rq:685119 version:5.5.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-unicorn/rubygem-unicorn.changes
2018-09-20 11:41:51.624842419 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-unicorn.new.25356/rubygem-unicorn.changes
2019-03-27 16:17:31.131578334 +0100
@@ -1,0 +2,48 @@
+Thu Mar 14 11:08:18 UTC 2019 - Stephan Kulow <[email protected]>
+
+- updated to version 5.5.0
+ see installed NEWS
+
+ === unicorn 5.5.0.pre1 / 2018-12-20 20:11 UTC
+
+ Jeremy Evans contributed the "default_middleware" configuration option:
+
+
https://bogomips.org/unicorn-public/[email protected]/
+
+ Jeremy also contributed the ability to use separate groups for the process
+ and log files:
+
+
https://bogomips.org/unicorn-public/[email protected]/
+
+ There's also a couple of uninteresting minor optimizations and
+ documentation additions.
+
+ Eric Wong (10):
+ remove random seed reset atfork
+ use IO#wait instead of kgio_wait_readable
+ Merge branch '5.4-stable'
+ shrink pipes under Linux
+ socket_helper: add hint for FreeBSD users for accf_http(9)
+ tests: ensure -N/--no-default-middleware not supported in config.ru
+ doc: update more URLs to use HTTPS and avoid redirects
+ deduplicate strings VM-wide in Ruby 2.5+
+ doc/ISSUES: add links to git clone-able mail archives of our
dependencies
+ README: minor updates and additional disclaimer
+
+ Jeremy Evans (2):
+ Make Worker#user support different process primary group and log
file group
+ Support default_middleware configuration option
+
+ === unicorn 5.4.1 / 2018-07-23 17:13 UTC
+
+ This release quiets some warnings for Ruby 2.6 preview releases
+ and enables tests to pass under Ruby 1.9.3. Otherwise, nothing
+ interesting for Ruby 2.0..2.5 users. *YAWN*
+
+ Eric Wong (1):
+ quiet some mismatched indentation warnings
+
+ Fumiaki MATSUSHIMA (1):
+ Use IO#wait instead to fix test for Ruby 1.9
+
+-------------------------------------------------------------------
Old:
----
unicorn-5.4.1.gem
New:
----
unicorn-5.5.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-unicorn.spec ++++++
--- /var/tmp/diff_new_pack.kock1Z/_old 2019-03-27 16:17:31.855578184 +0100
+++ /var/tmp/diff_new_pack.kock1Z/_new 2019-03-27 16:17:31.859578183 +0100
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-unicorn
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -24,7 +24,7 @@
#
Name: rubygem-unicorn
-Version: 5.4.1
+Version: 5.5.0
Release: 0
%define mod_name unicorn
%define mod_full_name %{mod_name}-%{version}
++++++ unicorn-5.4.1.gem -> unicorn-5.5.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.manifest new/.manifest
--- old/.manifest 2018-07-23 19:15:18.000000000 +0200
+++ new/.manifest 2019-03-04 02:11:20.000000000 +0100
@@ -128,6 +128,8 @@
t/t0116.ru
t/t0200-rack-hijack.sh
t/t0300-no-default-middleware.sh
+t/t0301-no-default-middleware-ignored-in-config.sh
+t/t0301.ru
t/t9000-preread-input.sh
t/t9001-oob_gc.sh
t/t9002-oob_gc-path.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.olddoc.yml new/.olddoc.yml
--- old/.olddoc.yml 2018-07-23 19:15:18.000000000 +0200
+++ new/.olddoc.yml 2019-03-04 02:11:20.000000000 +0100
@@ -1,6 +1,6 @@
---
cgit_url: https://bogomips.org/unicorn.git
-git_url: git://bogomips.org/unicorn.git
+git_url: https://bogomips.org/unicorn.git
rdoc_url: https://bogomips.org/unicorn/
ml_url: https://bogomips.org/unicorn-public/
merge_html:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Application_Timeouts new/Application_Timeouts
--- old/Application_Timeouts 2018-07-23 19:15:18.000000000 +0200
+++ new/Application_Timeouts 2019-03-04 02:11:20.000000000 +0100
@@ -23,10 +23,10 @@
Net::HTTP and Net::SMTP in the Ruby standard library allow
configurable timeouts.
-Even for things as fast as {memcached}[http://memcached.org/],
-{dalli}[http://rubygems.org/gems/dalli],
-{memcached}[http://rubygems.org/gems/memcached] and
-{memcache-client}[http://rubygems.org/gems/memcache-client] RubyGems all
+Even for things as fast as {memcached}[https://memcached.org/],
+{dalli}[https://rubygems.org/gems/dalli],
+{memcached}[https://rubygems.org/gems/memcached] and
+{memcache-client}[https://rubygems.org/gems/memcache-client] RubyGems all
offer configurable timeouts.
Consult the relevant documentation for the libraries you use on
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Documentation/unicorn.1.txt
new/Documentation/unicorn.1.txt
--- old/Documentation/unicorn.1.txt 2018-07-23 19:15:18.000000000 +0200
+++ new/Documentation/unicorn.1.txt 2019-03-04 02:11:20.000000000 +0100
@@ -182,6 +182,6 @@
* [Rackup HowTo][3]
[1]: https://bogomips.org/unicorn/
-[2]: http://www.rubydoc.info/github/rack/rack/
+[2]: https://www.rubydoc.info/github/rack/rack/
[3]: https://github.com/rack/rack/wiki/tutorial-rackup-howto
[4]: https://bogomips.org/unicorn/SIGNALS.html
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Documentation/unicorn_rails.1.txt
new/Documentation/unicorn_rails.1.txt
--- old/Documentation/unicorn_rails.1.txt 2018-07-23 19:15:18.000000000
+0200
+++ new/Documentation/unicorn_rails.1.txt 2019-03-04 02:11:20.000000000
+0100
@@ -170,6 +170,6 @@
* [Rackup HowTo][3]
[1]: https://bogomips.org/unicorn/
-[2]: http://www.rubydoc.info/github/rack/rack/
+[2]: https://www.rubydoc.info/github/rack/rack/
[3]: https://github.com/rack/rack/wiki/tutorial-rackup-howto
[4]: https://bogomips.org/unicorn/SIGNALS.html
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/GIT-VERSION-FILE new/GIT-VERSION-FILE
--- old/GIT-VERSION-FILE 2018-07-23 19:15:18.000000000 +0200
+++ new/GIT-VERSION-FILE 2019-03-04 02:11:20.000000000 +0100
@@ -1 +1 @@
-GIT_VERSION = 5.4.1
+GIT_VERSION = 5.5.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/GIT-VERSION-GEN new/GIT-VERSION-GEN
--- old/GIT-VERSION-GEN 2018-07-23 19:15:18.000000000 +0200
+++ new/GIT-VERSION-GEN 2019-03-04 02:11:20.000000000 +0100
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
-DEF_VER = "v5.4.1"
+DEF_VER = "v5.5.0"
CONSTANT = "Unicorn::Const::UNICORN_VERSION"
RVF = "lib/unicorn/version.rb"
GVF = "GIT-VERSION-FILE"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ISSUES new/ISSUES
--- old/ISSUES 2018-07-23 19:15:18.000000000 +0200
+++ new/ISSUES 2019-03-04 02:11:20.000000000 +0100
@@ -39,6 +39,7 @@
list at mailto:[email protected]
Subscription to post is required to ruby-core, unfortunately:
mailto:[email protected]?subject=subscribe
+Unofficial archives are available at: https://public-inbox.org/ruby-core/
For uncommon bugs in Rack, we may forward bugs to
mailto:[email protected] and discuss there.
@@ -46,6 +47,7 @@
mailto:[email protected]
Note: not everyone can use the proprietary bug tracker used by Rack,
but their mailing list remains operational.
+Unofficial archives are available at: https://public-inbox.org/rack-devel/
Uncommon bugs we encounter in the Linux kernel should be Cc:-ed to the
Linux kernel mailing list (LKML) at mailto:[email protected]
@@ -54,11 +56,12 @@
involved with any problematic commits (including those in the
Signed-off-by: and other trailer lines). No subscription is necessary,
and the our mailing list follows the same conventions as LKML for
-interopability. There is a kernel.org Bugzilla instance, but it is
-ignored by most developers.
+interopability. Archives are available at https://lore.kernel.org/lkml/
+There is a kernel.org Bugzilla instance, but it is ignored by most.
Likewise for any rare glibc bugs we might encounter, we should Cc:
mailto:[email protected]
+Unofficial archives are available at: https://public-inbox.org/libc-alpha/
Keep in mind glibc upstream does use Bugzilla for tracking bugs:
https://sourceware.org/bugzilla/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/LATEST new/LATEST
--- old/LATEST 2018-07-23 19:15:18.000000000 +0200
+++ new/LATEST 2019-03-04 02:11:20.000000000 +0100
@@ -1,29 +1,30 @@
-=== unicorn 5.4.0 / 2017-12-23 23:33 UTC
+=== unicorn 5.5.0.pre1 / 2018-12-20 20:11 UTC
- Rack hijack support improves as the app code can capture and use
- the Rack `env' privately without copying it (to avoid clobbering
- by another client). Thanks to Sam Saffron for reporting and
- testing this new feature:
-
https://bogomips.org/unicorn-public/caatdrypg3nluyo0jxfyw1yhu1q+zpklkd4kdwc8va46b5ha...@mail.gmail.com/T/
-
- We also now support $DEBUG being set by the Rack app (instead of
- relying on the "-d" CLI switch). Thanks to James P Robinson Jr
- for reporting this bug:
-
https://bogomips.org/unicorn-public/d6324cb4.7bc3e%[email protected]/T/
- (Coincidentally, this fix will be irrelevant for Ruby 2.5
- which requires 'pp' by default)
-
- There's a few minor test cleanups and documentation updates, too.
-
- All commits since v5.3.1 (2017-10-03):
-
- reduce method calls with String#start_with?
- require 'pp' if $DEBUG is set by Rack app
- avoid reusing env on hijack
- tests: cleanup some unused variable warnings
- ISSUES: add a note about Debian BTS interopability
+ Jeremy Evans contributed the "default_middleware" configuration option:
- Roughly all mailing discussions since the last release:
+
https://bogomips.org/unicorn-public/[email protected]/
- https://bogomips.org/unicorn-public/?q=d:20171004..20171223
+ Jeremy also contributed the ability to use separate groups for the process
+ and log files:
+
+
https://bogomips.org/unicorn-public/[email protected]/
+
+ There's also a couple of uninteresting minor optimizations and
+ documentation additions.
+
+ Eric Wong (10):
+ remove random seed reset atfork
+ use IO#wait instead of kgio_wait_readable
+ Merge branch '5.4-stable'
+ shrink pipes under Linux
+ socket_helper: add hint for FreeBSD users for accf_http(9)
+ tests: ensure -N/--no-default-middleware not supported in config.ru
+ doc: update more URLs to use HTTPS and avoid redirects
+ deduplicate strings VM-wide in Ruby 2.5+
+ doc/ISSUES: add links to git clone-able mail archives of our
dependencies
+ README: minor updates and additional disclaimer
+
+ Jeremy Evans (2):
+ Make Worker#user support different process primary group and log file
group
+ Support default_middleware configuration option
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/LICENSE new/LICENSE
--- old/LICENSE 2018-07-23 19:15:18.000000000 +0200
+++ new/LICENSE 2019-03-04 02:11:20.000000000 +0100
@@ -8,8 +8,8 @@
derivative works, but the GPLv2 is fine.
The complete texts of the GPLv2 and GPLv3 are below:
-GPLv2 - http://www.gnu.org/licenses/gpl-2.0.txt
-GPLv3 - http://www.gnu.org/licenses/gpl-3.0.txt
+GPLv2 - https://www.gnu.org/licenses/gpl-2.0.txt
+GPLv3 - https://www.gnu.org/licenses/gpl-3.0.txt
You may (against our _preference_) also use the Ruby 1.8 license terms
which we inherited from the original Mongrel project when we forked it:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Links new/Links
--- old/Links 2018-07-23 19:15:18.000000000 +0200
+++ new/Links 2019-03-04 02:11:20.000000000 +0100
@@ -10,7 +10,7 @@
Furthermore, the unicorn project has never, does not and will never endorse:
* any for-profit entities or services
-* any non-{Free Software}[http://www.gnu.org/philosophy/free-sw.html]
+* any non-{Free Software}[https://www.gnu.org/philosophy/free-sw.html]
The existence of these links does not imply endorsement of any entities
or services behind them.
@@ -31,26 +31,28 @@
=== unicorn is written to work with
-* {Rack}[http://rack.github.io/] - a minimal interface between webservers
+* {Rack}[https://rack.github.io/] - a minimal interface between webservers
supporting Ruby and Ruby frameworks
* {Ruby}[https://www.ruby-lang.org/en/] - the programming language of
Rack and unicorn
-* {nginx}[http://nginx.org/] (Free versions) -
+* {nginx}[https://nginx.org/] (Free versions) -
the reverse proxy for use with unicorn
=== Derivatives
-* {Green Unicorn}[http://gunicorn.org/] - a Python version of unicorn
+* {Green Unicorn}[https://gunicorn.org/] - a Python version of unicorn
-* {Starman}[http://search.cpan.org/dist/Starman/] - Plack/PSGI version
+* {Starman}[https://metacpan.org/release/Starman/] - Plack/PSGI version
of unicorn
=== Prior Work
-* {Mongrel}[http://rubygems.org/gems/mongrel] - the awesome webserver
- unicorn is based on
+* {Mongrel}[https://rubygems.org/gems/mongrel] - the awesome webserver
+ unicorn is based on. A historical archive of the mongrel dev list
+ featuring early discussions of unicorn is available at:
+ https://bogomips.org/mongrel-devel/
* {david}[https://bogomips.org/david.git] - a tool to explain why you need
nginx in front of unicorn
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/NEWS new/NEWS
--- old/NEWS 2018-07-23 19:15:18.000000000 +0200
+++ new/NEWS 2019-03-04 02:11:20.000000000 +0100
@@ -1,3 +1,45 @@
+=== unicorn 5.5.0.pre1 / 2018-12-20 20:11 UTC
+
+ Jeremy Evans contributed the "default_middleware" configuration option:
+
+
https://bogomips.org/unicorn-public/[email protected]/
+
+ Jeremy also contributed the ability to use separate groups for the process
+ and log files:
+
+
https://bogomips.org/unicorn-public/[email protected]/
+
+ There's also a couple of uninteresting minor optimizations and
+ documentation additions.
+
+ Eric Wong (10):
+ remove random seed reset atfork
+ use IO#wait instead of kgio_wait_readable
+ Merge branch '5.4-stable'
+ shrink pipes under Linux
+ socket_helper: add hint for FreeBSD users for accf_http(9)
+ tests: ensure -N/--no-default-middleware not supported in config.ru
+ doc: update more URLs to use HTTPS and avoid redirects
+ deduplicate strings VM-wide in Ruby 2.5+
+ doc/ISSUES: add links to git clone-able mail archives of our
dependencies
+ README: minor updates and additional disclaimer
+
+ Jeremy Evans (2):
+ Make Worker#user support different process primary group and log file
group
+ Support default_middleware configuration option
+
+=== unicorn 5.4.1 / 2018-07-23 17:13 UTC
+
+ This release quiets some warnings for Ruby 2.6 preview releases
+ and enables tests to pass under Ruby 1.9.3. Otherwise, nothing
+ interesting for Ruby 2.0..2.5 users. *YAWN*
+
+ Eric Wong (1):
+ quiet some mismatched indentation warnings
+
+ Fumiaki MATSUSHIMA (1):
+ Use IO#wait instead to fix test for Ruby 1.9
+
=== unicorn 5.4.0 / 2017-12-23 23:33 UTC
Rack hijack support improves as the app code can capture and use
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README new/README
--- old/README 2018-07-23 19:15:18.000000000 +0200
+++ new/README 2019-03-04 02:11:20.000000000 +0100
@@ -10,7 +10,7 @@
* Designed for Rack, Unix, fast clients, and ease-of-debugging. We
cut out everything that is better supported by the operating system,
- {nginx}[http://nginx.org/] or {Rack}[http://rack.github.io/].
+ {nginx}[https://nginx.org/] or {Rack}[https://rack.github.io/].
* Compatible with Ruby 1.9.3 and later.
unicorn 4.x remains supported for Ruby 1.8 users.
@@ -37,12 +37,15 @@
You can upgrade unicorn, your entire application, libraries
and even your Ruby interpreter without dropping clients.
+* transparent upgrades using systemd socket activation is
+ supported since unicorn 5.0
+
* before_fork and after_fork hooks in case your application
has special needs when dealing with forked processes. These
should not be needed when the "preload_app" directive is
false (the default).
-* Can be used with copy-on-write-friendly memory management
+* Can be used with copy-on-write-friendly GC in Ruby 2.0+
to save memory (by setting "preload_app" to true).
* Able to listen on multiple interfaces including UNIX sockets,
@@ -55,7 +58,7 @@
== License
-unicorn is copyright 2009-2016 by all contributors (see logs in git).
+unicorn is copyright 2009-2018 by all contributors (see logs in git).
It is based on Mongrel 1.1.5.
Mongrel is copyright 2007 Zed A. Shaw and contributors.
@@ -77,13 +80,13 @@
You can get the latest source via git from the following locations
(these versions may not be stable):
- git://bogomips.org/unicorn.git
- git://repo.or.cz/unicorn.git (mirror)
+ https://bogomips.org/unicorn.git
+ https://repo.or.cz/unicorn.git (mirror)
You may browse the code from the web:
* https://bogomips.org/unicorn.git
-* http://repo.or.cz/w/unicorn.git (gitweb)
+* https://repo.or.cz/w/unicorn.git (gitweb)
See the HACKING guide on how to contribute and build prerelease gems
from git.
@@ -122,6 +125,10 @@
or a fast LAN. See the PHILOSOPHY and DESIGN documents for more details
regarding this.
+Due to its ability to tolerate crashes and isolate clients, unicorn
+is unfortunately known to prolong the existence of bugs in applications
+and libraries which run on top of it.
+
== Contact
All feedback (bug reports, user/development dicussion, patches, pull
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Sandbox new/Sandbox
--- old/Sandbox 2018-07-23 19:15:18.000000000 +0200
+++ new/Sandbox 2019-03-04 02:11:20.000000000 +0100
@@ -3,7 +3,7 @@
Since unicorn includes executables and is usually used to start a Ruby
process, there are certain caveats to using it with tools that sandbox
RubyGems installations such as
-{Bundler}[http://bundler.io/] or
+{Bundler}[https://bundler.io/] or
{Isolate}[https://github.com/jbarnette/isolate].
== General deployment
@@ -66,7 +66,7 @@
Ruby 2.0.0 enforces FD_CLOEXEC on file descriptors by default. unicorn
has been prepared for this behavior since unicorn 4.1.0, and bundler
needs the "--keep-file-descriptors" option for "bundle exec":
-http://bundler.io/man/bundle-exec.1.html
+https://bundler.io/man/bundle-exec.1.html
== Isolate
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bin/unicorn new/bin/unicorn
--- old/bin/unicorn 2018-07-23 19:15:18.000000000 +0200
+++ new/bin/unicorn 2019-03-04 02:11:20.000000000 +0100
@@ -6,6 +6,7 @@
ENV["RACK_ENV"] ||= "development"
rackup_opts = Unicorn::Configurator::RACKUP
options = rackup_opts[:options]
+set_no_default_middleware = true
op = OptionParser.new("", 24, ' ') do |opts|
cmd = File.basename($0)
@@ -60,7 +61,7 @@
opts.on("-N", "--no-default-middleware",
"do not load middleware implied by RACK_ENV") do |e|
- rackup_opts[:no_default_middleware] = true
+ rackup_opts[:no_default_middleware] = true if set_no_default_middleware
end
opts.on("-D", "--daemonize", "run daemonized in the background") do |d|
@@ -110,6 +111,7 @@
opts.parse! ARGV
end
+set_no_default_middleware = false
app = Unicorn.builder(ARGV[0] || 'config.ru', op)
op = nil
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/examples/logrotate.conf new/examples/logrotate.conf
--- old/examples/logrotate.conf 2018-07-23 19:15:18.000000000 +0200
+++ new/examples/logrotate.conf 2019-03-04 02:11:20.000000000 +0100
@@ -2,7 +2,7 @@
# /etc/logrotate.d/unicorn_app on my Debian systems
#
# See the logrotate(8) manpage for more information:
-# http://linux.die.net/man/8/logrotate
+# https://linux.die.net/man/8/logrotate
#
# public logrotate-related discussion in our archives:
# https://bogomips.org/unicorn-public/?q=logrotate
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/examples/nginx.conf new/examples/nginx.conf
--- old/examples/nginx.conf 2018-07-23 19:15:18.000000000 +0200
+++ new/examples/nginx.conf 2019-03-04 02:11:20.000000000 +0100
@@ -56,7 +56,8 @@
# to configure it all in one place here for static files and also
# to disable gzip for clients who don't get gzip/deflate right.
# There are other gzip settings that may be needed used to deal with
- # bad clients out there, see http://wiki.nginx.org/NginxHttpGzipModule
+ # bad clients out there, see
+ # https://nginx.org/en/docs/http/ngx_http_gzip_module.html
gzip on;
gzip_http_version 1.0;
gzip_proxied any;
@@ -117,7 +118,7 @@
location @app {
# an HTTP header important enough to have its own Wikipedia entry:
- # http://en.wikipedia.org/wiki/X-Forwarded-For
+ # https://en.wikipedia.org/wiki/X-Forwarded-For
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# enable this if you forward HTTPS traffic to unicorn,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/unicorn_http/common_field_optimization.h
new/ext/unicorn_http/common_field_optimization.h
--- old/ext/unicorn_http/common_field_optimization.h 2018-07-23
19:15:18.000000000 +0200
+++ new/ext/unicorn_http/common_field_optimization.h 2019-03-04
02:11:20.000000000 +0100
@@ -58,26 +58,44 @@
#define HTTP_PREFIX "HTTP_"
#define HTTP_PREFIX_LEN (sizeof(HTTP_PREFIX) - 1)
+static ID id_uminus;
+
+/* this dedupes under Ruby 2.5+ (December 2017) */
+static VALUE str_dd_freeze(VALUE str)
+{
+ if (STR_UMINUS_DEDUPE)
+ return rb_funcall(str, id_uminus, 0);
+
+ /* freeze,since it speeds up older MRI slightly */
+ OBJ_FREEZE(str);
+ return str;
+}
+
+static VALUE str_new_dd_freeze(const char *ptr, long len)
+{
+ return str_dd_freeze(rb_str_new(ptr, len));
+}
/* this function is not performance-critical, called only at load time */
-static void init_common_fields(VALUE mark_ary)
+static void init_common_fields(void)
{
int i;
struct common_field *cf = common_http_fields;
char tmp[64];
+
+ id_uminus = rb_intern("-@");
memcpy(tmp, HTTP_PREFIX, HTTP_PREFIX_LEN);
for(i = ARRAY_SIZE(common_http_fields); --i >= 0; cf++) {
/* Rack doesn't like certain headers prefixed with "HTTP_" */
if (!strcmp("CONTENT_LENGTH", cf->name) ||
!strcmp("CONTENT_TYPE", cf->name)) {
- cf->value = rb_str_new(cf->name, cf->len);
+ cf->value = str_new_dd_freeze(cf->name, cf->len);
} else {
memcpy(tmp + HTTP_PREFIX_LEN, cf->name, cf->len + 1);
- cf->value = rb_str_new(tmp, HTTP_PREFIX_LEN + cf->len);
+ cf->value = str_new_dd_freeze(tmp, HTTP_PREFIX_LEN + cf->len);
}
- cf->value = rb_obj_freeze(cf->value);
- rb_ary_push(mark_ary, cf->value);
+ rb_gc_register_mark_object(cf->value);
}
}
@@ -105,7 +123,7 @@
memcpy(RSTRING_PTR(f) + HTTP_PREFIX_LEN, field, flen);
assert(*(RSTRING_PTR(f) + RSTRING_LEN(f)) == '\0' &&
"string didn't end with \\0"); /* paranoia */
- return rb_obj_freeze(f);
+ return HASH_ASET_DEDUPE ? f : str_dd_freeze(f);
}
#endif /* common_field_optimization_h */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/unicorn_http/extconf.rb
new/ext/unicorn_http/extconf.rb
--- old/ext/unicorn_http/extconf.rb 2018-07-23 19:15:18.000000000 +0200
+++ new/ext/unicorn_http/extconf.rb 2019-03-04 02:11:21.000000000 +0100
@@ -8,4 +8,34 @@
have_func("rb_hash_clear", "ruby.h") # Ruby 2.0+
have_func("gmtime_r", "time.h")
+message('checking if String#-@ (str_uminus) dedupes... ')
+begin
+ a = -(%w(t e s t).join)
+ b = -(%w(t e s t).join)
+ if a.equal?(b)
+ $CPPFLAGS += ' -DSTR_UMINUS_DEDUPE=1 '
+ message("yes\n")
+ else
+ $CPPFLAGS += ' -DSTR_UMINUS_DEDUPE=0 '
+ message("no, needs Ruby 2.5+\n")
+ end
+rescue NoMethodError
+ $CPPFLAGS += ' -DSTR_UMINUS_DEDUPE=0 '
+ message("no, String#-@ not available\n")
+end
+
+message('checking if Hash#[]= (rb_hash_aset) dedupes... ')
+h = {}
+x = {}
+r = rand.to_s
+h[%W(#{r}).join('')] = :foo
+x[%W(#{r}).join('')] = :foo
+if x.keys[0].equal?(h.keys[0])
+ $CPPFLAGS += ' -DHASH_ASET_DEDUPE=1 '
+ message("yes\n")
+else
+ $CPPFLAGS += ' -DHASH_ASET_DEDUPE=0 '
+ message("no, needs Ruby 2.6+\n")
+end
+
create_makefile("unicorn_http")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/unicorn_http/global_variables.h
new/ext/unicorn_http/global_variables.h
--- old/ext/unicorn_http/global_variables.h 2018-07-23 19:15:18.000000000
+0200
+++ new/ext/unicorn_http/global_variables.h 2019-03-04 02:11:21.000000000
+0100
@@ -56,7 +56,7 @@
/** Defines global strings in the init method. */
#define DEF_GLOBAL(N, val) do { \
g_##N = rb_obj_freeze(rb_str_new(val, sizeof(val) - 1)); \
- rb_ary_push(mark_ary, g_##N); \
+ rb_gc_register_mark_object(g_##N); \
} while (0)
/* Defines the maximum allowed lengths for various input elements.*/
@@ -67,7 +67,7 @@
DEF_MAX_LENGTH(REQUEST_PATH, 4096); /* common PATH_MAX on modern systems */
DEF_MAX_LENGTH(QUERY_STRING, (1024 * 10));
-static void init_globals(VALUE mark_ary)
+static void init_globals(void)
{
DEF_GLOBAL(rack_url_scheme, "rack.url_scheme");
DEF_GLOBAL(request_method, "REQUEST_METHOD");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/unicorn_http/httpdate.c
new/ext/unicorn_http/httpdate.c
--- old/ext/unicorn_http/httpdate.c 2018-07-23 19:15:18.000000000 +0200
+++ new/ext/unicorn_http/httpdate.c 2019-03-04 02:11:21.000000000 +0100
@@ -64,13 +64,13 @@
return buf;
}
-void init_unicorn_httpdate(VALUE mark_ary)
+void init_unicorn_httpdate(void)
{
VALUE mod = rb_define_module("Unicorn");
mod = rb_define_module_under(mod, "HttpResponse");
buf = rb_str_new(0, buf_capa - 1);
- rb_ary_push(mark_ary, buf);
+ rb_gc_register_mark_object(buf);
buf_ptr = RSTRING_PTR(buf);
httpdate(Qnil);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/unicorn_http/unicorn_http.c
new/ext/unicorn_http/unicorn_http.c
--- old/ext/unicorn_http/unicorn_http.c 2018-07-23 19:15:18.000000000 +0200
+++ new/ext/unicorn_http/unicorn_http.c 2019-03-04 02:11:21.000000000 +0100
@@ -15,7 +15,7 @@
#include "global_variables.h"
#include "c_util.h"
-void init_unicorn_httpdate(VALUE mark_ary);
+void init_unicorn_httpdate(void);
#define UH_FL_CHUNKED 0x1
#define UH_FL_HASBODY 0x2
@@ -4225,11 +4225,8 @@
void Init_unicorn_http(void)
{
- static VALUE mark_ary;
VALUE mUnicorn, cHttpParser;
- mark_ary = rb_ary_new();
- rb_global_variable(&mark_ary);
mUnicorn = rb_define_module("Unicorn");
cHttpParser = rb_define_class_under(mUnicorn, "HttpParser", rb_cObject);
eHttpParserError =
@@ -4239,7 +4236,7 @@
e414 = rb_define_class_under(mUnicorn, "RequestURITooLongError",
eHttpParserError);
- init_globals(mark_ary);
+ init_globals();
rb_define_alloc_func(cHttpParser, HttpParser_alloc);
rb_define_method(cHttpParser, "initialize", HttpParser_init, 0);
rb_define_method(cHttpParser, "clear", HttpParser_clear, 0);
@@ -4276,16 +4273,14 @@
rb_define_singleton_method(cHttpParser, "max_header_len=", set_maxhdrlen, 1);
- init_common_fields(mark_ary);
+ init_common_fields();
SET_GLOBAL(g_http_host, "HOST");
SET_GLOBAL(g_http_trailer, "TRAILER");
SET_GLOBAL(g_http_transfer_encoding, "TRANSFER_ENCODING");
SET_GLOBAL(g_content_length, "CONTENT_LENGTH");
SET_GLOBAL(g_http_connection, "CONNECTION");
id_set_backtrace = rb_intern("set_backtrace");
- init_unicorn_httpdate(mark_ary);
-
- OBJ_FREEZE(mark_ary);
+ init_unicorn_httpdate();
#ifndef HAVE_RB_HASH_CLEAR
id_clear = rb_intern("clear");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/unicorn_http/unicorn_http.rl
new/ext/unicorn_http/unicorn_http.rl
--- old/ext/unicorn_http/unicorn_http.rl 2018-07-23 19:15:18.000000000
+0200
+++ new/ext/unicorn_http/unicorn_http.rl 2019-03-04 02:11:21.000000000
+0100
@@ -13,7 +13,7 @@
#include "global_variables.h"
#include "c_util.h"
-void init_unicorn_httpdate(VALUE mark_ary);
+void init_unicorn_httpdate(void);
#define UH_FL_CHUNKED 0x1
#define UH_FL_HASBODY 0x2
@@ -931,11 +931,8 @@
void Init_unicorn_http(void)
{
- static VALUE mark_ary;
VALUE mUnicorn, cHttpParser;
- mark_ary = rb_ary_new();
- rb_global_variable(&mark_ary);
mUnicorn = rb_define_module("Unicorn");
cHttpParser = rb_define_class_under(mUnicorn, "HttpParser", rb_cObject);
eHttpParserError =
@@ -945,7 +942,7 @@
e414 = rb_define_class_under(mUnicorn, "RequestURITooLongError",
eHttpParserError);
- init_globals(mark_ary);
+ init_globals();
rb_define_alloc_func(cHttpParser, HttpParser_alloc);
rb_define_method(cHttpParser, "initialize", HttpParser_init, 0);
rb_define_method(cHttpParser, "clear", HttpParser_clear, 0);
@@ -982,16 +979,14 @@
rb_define_singleton_method(cHttpParser, "max_header_len=", set_maxhdrlen, 1);
- init_common_fields(mark_ary);
+ init_common_fields();
SET_GLOBAL(g_http_host, "HOST");
SET_GLOBAL(g_http_trailer, "TRAILER");
SET_GLOBAL(g_http_transfer_encoding, "TRANSFER_ENCODING");
SET_GLOBAL(g_content_length, "CONTENT_LENGTH");
SET_GLOBAL(g_http_connection, "CONNECTION");
id_set_backtrace = rb_intern("set_backtrace");
- init_unicorn_httpdate(mark_ary);
-
- OBJ_FREEZE(mark_ary);
+ init_unicorn_httpdate();
#ifndef HAVE_RB_HASH_CLEAR
id_clear = rb_intern("clear");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/unicorn/configurator.rb
new/lib/unicorn/configurator.rb
--- old/lib/unicorn/configurator.rb 2018-07-23 19:15:18.000000000 +0200
+++ new/lib/unicorn/configurator.rb 2019-03-04 02:11:21.000000000 +0100
@@ -88,6 +88,9 @@
RACKUP[:set_listener] and
set[:listeners] << "#{RACKUP[:host]}:#{RACKUP[:port]}"
+ RACKUP[:no_default_middleware] and
+ set[:default_middleware] = false
+
# unicorn_rails creates dirs here after working_directory is bound
after_reload.call if after_reload
@@ -235,7 +238,7 @@
# server 192.168.0.9:8080 fail_timeout=0;
# }
#
- # See http://nginx.org/en/docs/http/ngx_http_upstream_module.html
+ # See https://nginx.org/en/docs/http/ngx_http_upstream_module.html
# for more details on nginx upstream configuration.
def timeout(seconds)
set_int(:timeout, seconds, 3)
@@ -265,6 +268,14 @@
set_int(:worker_processes, nr, 1)
end
+ # sets whether to add default middleware in the development and
+ # deployment RACK_ENVs.
+ #
+ # default_middleware is only available in unicorn 5.5.0+
+ def default_middleware(bool)
+ set_bool(:default_middleware, bool)
+ end
+
# sets listeners to the given +addresses+, replacing or augmenting the
# current set. This is for the global listener pool shared by all
# worker processes. For per-worker listeners, see the after_fork example
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/unicorn/http_request.rb
new/lib/unicorn/http_request.rb
--- old/lib/unicorn/http_request.rb 2018-07-23 19:15:18.000000000 +0200
+++ new/lib/unicorn/http_request.rb 2019-03-04 02:11:21.000000000 +0100
@@ -2,7 +2,6 @@
# :enddoc:
# no stable API here
require 'unicorn_http'
-require 'raindrops'
# TODO: remove redundant names
Unicorn.const_set(:HttpRequest, Unicorn::HttpParser)
@@ -66,7 +65,7 @@
clear
e = env
- # From http://www.ietf.org/rfc/rfc3875:
+ # From https://www.ietf.org/rfc/rfc3875:
# "Script authors should be aware that the REMOTE_ADDR and
# REMOTE_HOST meta-variables (see sections 4.1.8 and 4.1.9)
# may not identify the ultimate source of the request. They
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/unicorn/http_server.rb
new/lib/unicorn/http_server.rb
--- old/lib/unicorn/http_server.rb 2018-07-23 19:15:18.000000000 +0200
+++ new/lib/unicorn/http_server.rb 2019-03-04 02:11:21.000000000 +0100
@@ -14,7 +14,8 @@
attr_accessor :app, :timeout, :worker_processes,
:before_fork, :after_fork, :before_exec,
:listener_opts, :preload_app,
- :orig_app, :config, :ready_pipe, :user
+ :orig_app, :config, :ready_pipe, :user,
+ :default_middleware
attr_writer :after_worker_exit, :after_worker_ready, :worker_exec
attr_reader :pid, :logger
@@ -70,6 +71,7 @@
@app = app
@request = Unicorn::HttpRequest.new
@reexec_pid = 0
+ @default_middleware = true
options = options.dup
@ready_pipe = options.delete(:ready_pipe)
@init_listeners = options[:listeners] ? options[:listeners].dup : []
@@ -82,7 +84,7 @@
# * The master process never closes or reinitializes this once
# initialized. Signal handlers in the master process will write to
# it to wake up the master from IO.select in exactly the same manner
- # djb describes in http://cr.yp.to/docs/selfpipe.html
+ # djb describes in https://cr.yp.to/docs/selfpipe.html
#
# * The workers immediately close the pipe they inherit. See the
# Unicorn::Worker class for the pipe workers use.
@@ -380,7 +382,7 @@
# wait for a signal hander to wake us up and then consume the pipe
def master_sleep(sec)
- @self_pipe[0].kgio_wait_readable(sec) or return
+ @self_pipe[0].wait(sec) or return
# 11 bytes is the maximum string length which can be embedded within
# the Ruby itself and not require a separate malloc (on 32-bit MRI 1.9+).
# Most reads are only one byte here and uncommon, so it's not worth a
@@ -520,9 +522,6 @@
Unicorn::Configurator::RACKUP.clear
@ready_pipe = @init_listeners = @before_exec = @before_fork = nil
- # http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/36450
- srand # remove in unicorn 6
-
# The OpenSSL PRNG is seeded with only the pid, and apps with frequently
# dying workers can recycle pids
OpenSSL::Random.seed(rand.to_s) if defined?(OpenSSL::Random)
@@ -787,12 +786,12 @@
end
def build_app!
- if app.respond_to?(:arity) && app.arity == 0
+ if app.respond_to?(:arity) && (app.arity == 0 || app.arity == 2)
if defined?(Gem) && Gem.respond_to?(:refresh)
logger.info "Refreshing Gem list"
Gem.refresh
end
- self.app = app.call
+ self.app = app.arity == 0 ? app.call : app.call(nil, self)
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/unicorn/launcher.rb new/lib/unicorn/launcher.rb
--- old/lib/unicorn/launcher.rb 2018-07-23 19:15:18.000000000 +0200
+++ new/lib/unicorn/launcher.rb 2019-03-04 02:11:21.000000000 +0100
@@ -31,7 +31,7 @@
# \_ parent - exits immediately ASAP
# \_ unicorn master - writes to pipe when ready
- rd, wr = IO.pipe
+ rd, wr = Unicorn.pipe
grandparent = $$
if fork
wr.close # grandparent does not write
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/unicorn/socket_helper.rb
new/lib/unicorn/socket_helper.rb
--- old/lib/unicorn/socket_helper.rb 2018-07-23 19:15:18.000000000 +0200
+++ new/lib/unicorn/socket_helper.rb 2019-03-04 02:11:21.000000000 +0100
@@ -83,6 +83,7 @@
rescue => e
logger.error("#{sock_name(sock)} " \
"failed to set accept_filter=#{name} (#{e.inspect})")
+ logger.error("perhaps accf_http(9) needs to be loaded".freeze)
end if arg != got
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/unicorn/util.rb new/lib/unicorn/util.rb
--- old/lib/unicorn/util.rb 2018-07-23 19:15:18.000000000 +0200
+++ new/lib/unicorn/util.rb 2019-03-04 02:11:21.000000000 +0100
@@ -64,7 +64,7 @@
fp.reopen(fp.path, "a")
else
# We should not need this workaround, Ruby can be fixed:
- # http://bugs.ruby-lang.org/issues/9036
+ # https://bugs.ruby-lang.org/issues/9036
# MRI will not call call fclose(3) or freopen(3) here
# since there's no associated std{in,out,err} FILE * pointer
# This should atomically use dup3(2) (or dup2(2)) syscall
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/unicorn/version.rb new/lib/unicorn/version.rb
--- old/lib/unicorn/version.rb 2018-07-23 19:15:18.000000000 +0200
+++ new/lib/unicorn/version.rb 2019-03-04 02:11:21.000000000 +0100
@@ -1 +1 @@
-Unicorn::Const::UNICORN_VERSION = '5.4.1'
+Unicorn::Const::UNICORN_VERSION = '5.5.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/unicorn/worker.rb new/lib/unicorn/worker.rb
--- old/lib/unicorn/worker.rb 2018-07-23 19:15:18.000000000 +0200
+++ new/lib/unicorn/worker.rb 2019-03-04 02:11:21.000000000 +0100
@@ -122,6 +122,11 @@
# the +after_fork+ hook after any privileged functions need to be
# run (e.g. to set per-worker CPU affinity, niceness, etc)
#
+ # +group+ can be specified as a string, or as an array of two
+ # strings. If an array of two strings is given, the first string
+ # is used as the primary group of the process, and the second is
+ # used as the group of the log files.
+ #
# Any and all errors raised within this method will be propagated
# directly back to the caller (usually the +after_fork+ hook.
# These errors commonly include ArgumentError for specifying an
@@ -134,8 +139,17 @@
# insufficient because modern systems have fine-grained
# capabilities. Let the caller handle any and all errors.
uid = Etc.getpwnam(user).uid
- gid = Etc.getgrnam(group).gid if group
- Unicorn::Util.chown_logs(uid, gid)
+
+ if group
+ if group.is_a?(Array)
+ group, log_group = group
+ log_gid = Etc.getgrnam(log_group).gid
+ end
+ gid = Etc.getgrnam(group).gid
+ log_gid ||= gid
+ end
+
+ Unicorn::Util.chown_logs(uid, log_gid)
if gid && Process.egid != gid
Process.initgroups(user, gid)
Process::GID.change_privilege(gid)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/unicorn.rb new/lib/unicorn.rb
--- old/lib/unicorn.rb 2018-07-23 19:15:18.000000000 +0200
+++ new/lib/unicorn.rb 2019-03-04 02:11:21.000000000 +0100
@@ -2,6 +2,8 @@
require 'etc'
require 'stringio'
require 'kgio'
+require 'raindrops'
+require 'io/wait'
begin
require 'rack'
@@ -43,12 +45,8 @@
abort "rack and Rack::Builder must be available for processing #{ru}"
end
- # Op is going to get cleared before the returned lambda is called, so
- # save this value so that it's still there when we need it:
- no_default_middleware = op[:no_default_middleware]
-
# always called after config file parsing, may be called after forking
- lambda do ||
+ lambda do |_, server|
inner_app = case ru
when /\.ru$/
raw = File.read(ru)
@@ -64,7 +62,7 @@
pp({ :inner_app => inner_app })
end
- return inner_app if no_default_middleware
+ return inner_app unless server.default_middleware
middleware = { # order matters
ContentLength: nil,
@@ -112,9 +110,22 @@
exc.backtrace.each { |line| logger.error(line) }
end
- # remove this when we only support Ruby >= 2.0
+ F_SETPIPE_SZ = 1031 if RUBY_PLATFORM =~ /linux/
+
def self.pipe # :nodoc:
- Kgio::Pipe.new.each { |io| io.close_on_exec = true }
+ Kgio::Pipe.new.each do |io|
+ io.close_on_exec = true # remove this when we only support Ruby >= 2.0
+
+ # shrink pipes to minimize impact on /proc/sys/fs/pipe-user-pages-soft
+ # limits.
+ if defined?(F_SETPIPE_SZ)
+ begin
+ io.fcntl(F_SETPIPE_SZ, Raindrops::PAGE_SIZE)
+ rescue Errno::EINVAL
+ # old kernel
+ end
+ end
+ end
end
# :startdoc:
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/man/man1/unicorn.1 new/man/man1/unicorn.1
--- old/man/man1/unicorn.1 2018-07-23 19:15:18.000000000 +0200
+++ new/man/man1/unicorn.1 2019-03-04 02:11:21.000000000 +0100
@@ -214,7 +214,7 @@
.IP \[bu] 2
Unicorn RDoc (https://bogomips.org/unicorn/)
.IP \[bu] 2
-Rack RDoc (http://www.rubydoc.info/github/rack/rack/)
+Rack RDoc (https://www.rubydoc.info/github/rack/rack/)
.IP \[bu] 2
Rackup HowTo (https://github.com/rack/rack/wiki/tutorial-rackup-howto)
.SH AUTHORS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/man/man1/unicorn_rails.1 new/man/man1/unicorn_rails.1
--- old/man/man1/unicorn_rails.1 2018-07-23 19:15:18.000000000 +0200
+++ new/man/man1/unicorn_rails.1 2019-03-04 02:11:21.000000000 +0100
@@ -205,7 +205,7 @@
.IP \[bu] 2
Unicorn RDoc (https://bogomips.org/unicorn/)
.IP \[bu] 2
-Rack RDoc (http://www.rubydoc.info/github/rack/rack/)
+Rack RDoc (https://www.rubydoc.info/github/rack/rack/)
.IP \[bu] 2
Rackup HowTo (https://github.com/rack/rack/wiki/tutorial-rackup-howto)
.SH AUTHORS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2018-07-23 19:15:18.000000000 +0200
+++ new/metadata 2019-03-04 02:11:20.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: unicorn
version: !ruby/object:Gem::Version
- version: 5.4.1
+ version: 5.5.0
platform: ruby
authors:
- unicorn hackers
autorequire:
bindir: bin
cert_chain: []
-date: 2018-07-23 00:00:00.000000000 Z
+date: 2019-03-04 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: rack
@@ -238,6 +238,8 @@
- t/t0116.ru
- t/t0200-rack-hijack.sh
- t/t0300-no-default-middleware.sh
+- t/t0301-no-default-middleware-ignored-in-config.sh
+- t/t0301.ru
- t/t9000-preread-input.sh
- t/t9001-oob_gc.sh
- t/t9002-oob_gc-path.sh
@@ -287,8 +289,7 @@
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubyforge_project:
-rubygems_version: 2.7.7
+rubygems_version: 3.0.2
signing_key:
specification_version: 4
summary: Rack HTTP server for fast clients and Unix
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/t/README new/t/README
--- old/t/README 2018-07-23 19:15:18.000000000 +0200
+++ new/t/README 2019-03-04 02:11:21.000000000 +0100
@@ -10,17 +10,17 @@
== Requirements
-* {Ruby 1.9.3+}[https://www.ruby-lang.org/] (duh!)
-* {GNU make}[http://www.gnu.org/software/make/]
+* {Ruby 1.9.3+}[https://www.ruby-lang.org/en/] (duh!)
+* {GNU make}[https://www.gnu.org/software/make/]
* {socat}[http://www.dest-unreach.org/socat/]
-* {curl}[http://curl.haxx.se/]
+* {curl}[https://curl.haxx.se/]
* standard UNIX shell utilities (Bourne sh, awk, sed, grep, ...)
We do not use bashisms or any non-portable, non-POSIX constructs
in our shell code. We use the "pipefail" option if available and
mainly test with {ksh}[http://kornshell.com/], but occasionally
with {dash}[http://gondor.apana.org.au/~herbert/dash/] and
-{bash}[http://www.gnu.org/software/bash/], too.
+{bash}[https://www.gnu.org/software/bash/], too.
== Running Tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/t/t0301-no-default-middleware-ignored-in-config.sh
new/t/t0301-no-default-middleware-ignored-in-config.sh
--- old/t/t0301-no-default-middleware-ignored-in-config.sh 1970-01-01
01:00:00.000000000 +0100
+++ new/t/t0301-no-default-middleware-ignored-in-config.sh 2019-03-04
02:11:21.000000000 +0100
@@ -0,0 +1,25 @@
+#!/bin/sh
+. ./test-lib.sh
+t_plan 3 "-N / --no-default-middleware option not supported in config.ru"
+
+t_begin "setup and start" && {
+ unicorn_setup
+ RACK_ENV=development unicorn -D -c $unicorn_config t0301.ru
+ unicorn_wait_start
+}
+
+t_begin "check switches parsed as expected and -N ignored for Rack::Lint" && {
+ debug=false
+ lint=
+ eval "$(curl -sf http://$listen/vars)"
+ test x"$debug" = xtrue
+ test x"$lint" != x
+ test -f "$lint"
+}
+
+t_begin "killing succeeds" && {
+ kill $unicorn_pid
+ check_stderr
+}
+
+t_done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/t/t0301.ru new/t/t0301.ru
--- old/t/t0301.ru 1970-01-01 01:00:00.000000000 +0100
+++ new/t/t0301.ru 2019-03-04 02:11:21.000000000 +0100
@@ -0,0 +1,13 @@
+#\-N --debug
+run(lambda do |env|
+ case env['PATH_INFO']
+ when '/vars'
+ b = "debug=#{$DEBUG.inspect}\n" \
+ "lint=#{caller.grep(%r{rack/lint\.rb})[0].split(':')[0]}\n"
+ end
+ h = {
+ 'Content-Length' => b.size.to_s,
+ 'Content-Type' => 'text/plain',
+ }
+ [ 200, h, [ b ] ]
+end)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/unit/test_http_parser.rb
new/test/unit/test_http_parser.rb
--- old/test/unit/test_http_parser.rb 2018-07-23 19:15:18.000000000 +0200
+++ new/test/unit/test_http_parser.rb 2019-03-04 02:11:21.000000000 +0100
@@ -865,4 +865,20 @@
rescue LoadError
# not all Ruby implementations have objspace
end
+
+ def test_dedupe
+ parser = HttpParser.new
+ # n.b. String#freeze optimization doesn't work under modern test-unit
+ exp = -'HTTP_HOST'
+ get = "GET / HTTP/1.1\r\nHost: example.com\r\nHavpbea-fhpxf: true\r\n\r\n"
+ assert parser.add_parse(get)
+ key = parser.env.keys.detect { |k| k == exp }
+ assert_same exp, key
+
+ if RUBY_VERSION.to_r >= 2.6 # 2.6.0-rc1+
+ exp = -'HTTP_HAVPBEA_FHPXF'
+ key = parser.env.keys.detect { |k| k == exp }
+ assert_same exp, key
+ end
+ end if RUBY_VERSION.to_r >= 2.5 && RUBY_ENGINE == 'ruby'
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/unit/test_util.rb new/test/unit/test_util.rb
--- old/test/unit/test_util.rb 2018-07-23 19:15:18.000000000 +0200
+++ new/test/unit/test_util.rb 2019-03-04 02:11:21.000000000 +0100
@@ -102,4 +102,29 @@
}
tmp.close!
end
+
+ def test_pipe
+ r, w = Unicorn.pipe
+ assert r
+ assert w
+
+ return if RUBY_PLATFORM !~ /linux/
+
+ begin
+ f_getpipe_sz = 1032
+ IO.pipe do |a, b|
+ a_sz = a.fcntl(f_getpipe_sz)
+ b_sz = b.fcntl(f_getpipe_sz)
+ assert_kind_of Integer, a_sz
+ r_sz = r.fcntl(f_getpipe_sz)
+ assert_equal Raindrops::PAGE_SIZE, r_sz
+ assert_operator a_sz, :>=, r_sz
+ end
+ rescue Errno::EINVAL
+ # Linux <= 2.6.34
+ end
+ ensure
+ w.close
+ r.close
+ end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/unicorn.gemspec new/unicorn.gemspec
--- old/unicorn.gemspec 2018-07-23 19:15:18.000000000 +0200
+++ new/unicorn.gemspec 2019-03-04 02:11:21.000000000 +0100
@@ -11,7 +11,7 @@
Gem::Specification.new do |s|
s.name = %q{unicorn}
- s.version = (ENV['VERSION'] || '5.4.1').dup
+ s.version = (ENV['VERSION'] || '5.5.0').dup
s.authors = ['unicorn hackers']
s.summary = 'Rack HTTP server for fast clients and Unix'
s.description = File.read('README').split("\n\n")[1]