unicorn 5.5.2 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.manifest +3 -2
  3. data/.olddoc.yml +15 -7
  4. data/CONTRIBUTORS +6 -2
  5. data/Documentation/unicorn.1 +4 -4
  6. data/Documentation/unicorn_rails.1 +4 -4
  7. data/FAQ +1 -1
  8. data/GIT-VERSION-FILE +1 -1
  9. data/GIT-VERSION-GEN +1 -1
  10. data/GNUmakefile +105 -60
  11. data/HACKING +2 -9
  12. data/ISSUES +24 -23
  13. data/KNOWN_ISSUES +2 -2
  14. data/LATEST +23 -22
  15. data/Links +5 -5
  16. data/NEWS +132 -0
  17. data/README +15 -9
  18. data/SIGNALS +1 -1
  19. data/Sandbox +3 -3
  20. data/archive/slrnpull.conf +1 -1
  21. data/examples/big_app_gc.rb +1 -1
  22. data/examples/logrotate.conf +2 -2
  23. data/examples/nginx.conf +1 -1
  24. data/examples/unicorn.conf.minimal.rb +2 -2
  25. data/examples/unicorn.conf.rb +2 -2
  26. data/ext/unicorn_http/c_util.h +5 -13
  27. data/ext/unicorn_http/common_field_optimization.h +0 -1
  28. data/ext/unicorn_http/epollexclusive.h +124 -0
  29. data/ext/unicorn_http/ext_help.h +0 -24
  30. data/ext/unicorn_http/extconf.rb +2 -6
  31. data/ext/unicorn_http/global_variables.h +1 -1
  32. data/ext/unicorn_http/httpdate.c +1 -0
  33. data/ext/unicorn_http/unicorn_http.c +258 -228
  34. data/ext/unicorn_http/unicorn_http.rl +48 -18
  35. data/lib/unicorn/configurator.rb +13 -3
  36. data/lib/unicorn/http_request.rb +11 -1
  37. data/lib/unicorn/http_server.rb +56 -29
  38. data/lib/unicorn/oob_gc.rb +5 -5
  39. data/lib/unicorn/select_waiter.rb +6 -0
  40. data/lib/unicorn/version.rb +1 -1
  41. data/lib/unicorn.rb +1 -3
  42. data/man/man1/unicorn.1 +4 -4
  43. data/man/man1/unicorn_rails.1 +4 -4
  44. data/t/GNUmakefile +3 -72
  45. data/t/README +1 -1
  46. data/t/test-lib.sh +2 -1
  47. data/test/exec/test_exec.rb +14 -12
  48. data/test/test_helper.rb +38 -30
  49. data/test/unit/test_ccc.rb +4 -3
  50. data/test/unit/test_http_parser_ng.rb +81 -0
  51. data/test/unit/test_server.rb +81 -7
  52. data/test/unit/test_signals.rb +6 -6
  53. data/test/unit/test_socket_helper.rb +1 -1
  54. data/test/unit/test_upload.rb +9 -14
  55. data/test/unit/test_util.rb +4 -3
  56. data/test/unit/test_waiter.rb +34 -0
  57. data/unicorn.gemspec +8 -7
  58. metadata +11 -8
  59. data/t/hijack.ru +0 -55
  60. data/t/t0200-rack-hijack.sh +0 -51
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de6d231854c78743f6e065253eaaea6209b09ad9a09a7153e1c4d9d8eeaedf3d
4
- data.tar.gz: ddf83ee5a57ba96bb18124de1331d7763e019e5c686ced6f4164dd07a9277e68
3
+ metadata.gz: cd2fc6250af1faf8048df529538386a6974dcbd1aac58db683a710b804bae1e8
4
+ data.tar.gz: 50aeca90aada5aeb9869cf3885681fe9029bee6183c99c8b85afb3d0803b479f
5
5
  SHA512:
6
- metadata.gz: 424332fd70af2e67f34c59cc78b374263126e8fd4516477b44ec0fe0ae27f25d3a537a26fb8748d0920d1354001e124906315ff1f8eb06db86ac79b341e4e770
7
- data.tar.gz: 36b3b0adbbfc9ebdf9450cfb928474a7ab6c56bf4f4957a1ad0cfb3ed665ee27b829b5349ec0de2423e8d0bd745c94676192cd48dfe18cfe64abce6ce6a2dbf2
6
+ metadata.gz: 83ebf917cc17380114648c22f9cb3ad59bda6125d23781e64cd89bb8936bf17bc6bb7292933f9433f1397901022683a63b241d512b31ea1b85e5bc791a10a74e
7
+ data.tar.gz: d36730df71b5b131de61037f2838b743d587b93b1eeb70eea1956de4aabc9051485626d38debaadd3d5c3ee3c2738ca72f9a9cbc9bafb6eff9e11f08ad272275
data/.manifest CHANGED
@@ -47,6 +47,7 @@ examples/unicorn@.service
47
47
  ext/unicorn_http/CFLAGS
48
48
  ext/unicorn_http/c_util.h
49
49
  ext/unicorn_http/common_field_optimization.h
50
+ ext/unicorn_http/epollexclusive.h
50
51
  ext/unicorn_http/ext_help.h
51
52
  ext/unicorn_http/extconf.rb
52
53
  ext/unicorn_http/global_variables.h
@@ -66,6 +67,7 @@ lib/unicorn/http_server.rb
66
67
  lib/unicorn/launcher.rb
67
68
  lib/unicorn/oob_gc.rb
68
69
  lib/unicorn/preread_input.rb
70
+ lib/unicorn/select_waiter.rb
69
71
  lib/unicorn/socket_helper.rb
70
72
  lib/unicorn/stream_input.rb
71
73
  lib/unicorn/tee_input.rb
@@ -87,7 +89,6 @@ t/detach.ru
87
89
  t/env.ru
88
90
  t/fails-rack-lint.ru
89
91
  t/heartbeat-timeout.ru
90
- t/hijack.ru
91
92
  t/listener_names.ru
92
93
  t/my-tap-lib.sh
93
94
  t/oob_gc.ru
@@ -125,7 +126,6 @@ t/t0022-listener_names-preload_app.sh
125
126
  t/t0100-rack-input-tests.sh
126
127
  t/t0116-client_body_buffer_size.sh
127
128
  t/t0116.ru
128
- t/t0200-rack-hijack.sh
129
129
  t/t0300-no-default-middleware.sh
130
130
  t/t0301-no-default-middleware-ignored-in-config.sh
131
131
  t/t0301.ru
@@ -158,4 +158,5 @@ test/unit/test_stream_input.rb
158
158
  test/unit/test_tee_input.rb
159
159
  test/unit/test_upload.rb
160
160
  test/unit/test_util.rb
161
+ test/unit/test_waiter.rb
161
162
  unicorn.gemspec
data/.olddoc.yml CHANGED
@@ -1,8 +1,9 @@
1
1
  ---
2
- cgit_url: https://bogomips.org/unicorn.git
3
- git_url: https://bogomips.org/unicorn.git
4
- rdoc_url: https://bogomips.org/unicorn/
5
- ml_url: https://bogomips.org/unicorn-public/
2
+ cgit_url: https://yhbt.net/unicorn.git
3
+ rdoc_url: https://yhbt.net/unicorn/
4
+ ml_url:
5
+ - https://yhbt.net/unicorn-public/
6
+ - http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/unicorn-public/
6
7
  merge_html:
7
8
  unicorn_1: Documentation/unicorn.1.html
8
9
  unicorn_rails_1: Documentation/unicorn_rails.1.html
@@ -11,7 +12,14 @@ noindex:
11
12
  - LATEST
12
13
  - TODO
13
14
  - unicorn_rails_1
14
- public_email: unicorn-public@bogomips.org
15
+ public_email: unicorn-public@yhbt.net
16
+ imap_url:
17
+ - imaps://yhbt.net/inbox.comp.lang.ruby.unicorn.0
18
+ - imap://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.unicorn.0
15
19
  nntp_url:
16
- - nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
17
- - nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
20
+ - nntps://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
21
+ - nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.unicorn
22
+ - nntp://news.gmane.io/gmane.comp.lang.ruby.unicorn.general
23
+ source_code:
24
+ - git clone https://yhbt.net/unicorn.git
25
+ - torsocks git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/unicorn.git
data/CONTRIBUTORS CHANGED
@@ -1,5 +1,9 @@
1
- Unicorn developers (let us know if we forgot you):
2
- * Eric Wong (BDFL, BOFH)
1
+ Unicorn developers (let us know if we forgot you, ...or if you no longer wish
2
+ to be associated with the doofus running this disaster :P):
3
+ * Eric Wong (Bozo Doofus For Life, Bastard Operator From Hell)
4
+
5
+ There's numerous contributors over email the years, all of our mail
6
+ is archived @ https://yhbt.net/unicorn-public/
3
7
  * Suraj N. Kurapati
4
8
  * Andrey Stikheev
5
9
  * Wayne Larsen
@@ -154,7 +154,7 @@ TTIN \- increment the number of worker processes by one
154
154
  .IP \[bu] 2
155
155
  TTOU \- decrement the number of worker processes by one
156
156
  .PP
157
- See the SIGNALS (https://bogomips.org/unicorn/SIGNALS.html) document for
157
+ See the SIGNALS (https://yhbt.net/unicorn/SIGNALS.html) document for
158
158
  full description of all signals used by Unicorn.
159
159
  .SH RACK ENVIRONMENT
160
160
  .PP
@@ -204,11 +204,11 @@ the unicorn config file.
204
204
  \f[I]Rack::Builder\f[] ri/RDoc
205
205
  .IP \[bu] 2
206
206
  \f[I]Unicorn::Configurator\f[] ri/RDoc
207
- .UR https://bogomips.org/unicorn/Unicorn/Configurator.html
207
+ .UR https://yhbt.net/unicorn/Unicorn/Configurator.html
208
208
  .UE
209
209
  .IP \[bu] 2
210
210
  unicorn RDoc
211
- .UR https://bogomips.org/unicorn/
211
+ .UR https://yhbt.net/unicorn/
212
212
  .UE
213
213
  .IP \[bu] 2
214
214
  Rack RDoc
@@ -219,4 +219,4 @@ Rackup HowTo
219
219
  .UR https://github.com/rack/rack/wiki/(tutorial)-rackup-howto
220
220
  .UE
221
221
  .SH AUTHORS
222
- The Unicorn Community <unicorn-public@bogomips.org>.
222
+ The Unicorn Community <unicorn-public@yhbt.net>.
@@ -180,7 +180,7 @@ TTIN \- increment the number of worker processes by one
180
180
  .IP \[bu] 2
181
181
  TTOU \- decrement the number of worker processes by one
182
182
  .PP
183
- See the SIGNALS (https://bogomips.org/unicorn/SIGNALS.html) document for
183
+ See the SIGNALS (https://yhbt.net/unicorn/SIGNALS.html) document for
184
184
  full description of all signals used by Unicorn.
185
185
  .SH SEE ALSO
186
186
  .IP \[bu] 2
@@ -189,11 +189,11 @@ unicorn(1)
189
189
  \f[I]Rack::Builder\f[] ri/RDoc
190
190
  .IP \[bu] 2
191
191
  \f[I]Unicorn::Configurator\f[] ri/RDoc
192
- .UR https://bogomips.org/unicorn/Unicorn/Configurator.html
192
+ .UR https://yhbt.net/unicorn/Unicorn/Configurator.html
193
193
  .UE
194
194
  .IP \[bu] 2
195
195
  unicorn RDoc
196
- .UR https://bogomips.org/unicorn/
196
+ .UR https://yhbt.net/unicorn/
197
197
  .UE
198
198
  .IP \[bu] 2
199
199
  Rack RDoc
@@ -204,4 +204,4 @@ Rackup HowTo
204
204
  .UR https://github.com/rack/rack/wiki/(tutorial)-rackup-howto
205
205
  .UE
206
206
  .SH AUTHORS
207
- The Unicorn Community <unicorn-public@bogomips.org>.
207
+ The Unicorn Community <unicorn-public@yhbt.net>.
data/FAQ CHANGED
@@ -7,7 +7,7 @@ drained entirely by the application. This may happen when request
7
7
  bodies are gzipped, as unicorn reads request body data lazily to avoid
8
8
  overhead from bad requests.
9
9
 
10
- Ref: https://bogomips.org/unicorn-public/FC91211E-FD32-432C-92FC-0318714C2170@zendesk.com/
10
+ Ref: https://yhbt.net/unicorn-public/FC91211E-FD32-432C-92FC-0318714C2170@zendesk.com/
11
11
 
12
12
  === Why aren't my Rails log files rotated when I use SIGUSR1?
13
13
 
data/GIT-VERSION-FILE CHANGED
@@ -1 +1 @@
1
- GIT_VERSION = 5.5.2
1
+ GIT_VERSION = 6.1.0
data/GIT-VERSION-GEN CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- DEF_VER = "v5.5.2"
2
+ DEF_VER = "v6.1.0"
3
3
  CONSTANT = "Unicorn::Const::UNICORN_VERSION"
4
4
  RVF = "lib/unicorn/version.rb"
5
5
  GVF = "GIT-VERSION-FILE"
data/GNUmakefile CHANGED
@@ -10,6 +10,7 @@ RAGEL = ragel
10
10
  RSYNC = rsync
11
11
  OLDDOC = olddoc
12
12
  RDOC = rdoc
13
+ INSTALL = install
13
14
 
14
15
  GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
15
16
  @./GIT-VERSION-GEN
@@ -25,7 +26,38 @@ endif
25
26
 
26
27
  RUBY_ENGINE := $(shell $(RUBY) -e 'puts((RUBY_ENGINE rescue "ruby"))')
27
28
 
28
- MYLIBS = $(RUBYLIB)
29
+ # we should never package more than one ext to avoid DSO proliferation:
30
+ # https://udrepper.livejournal.com/8790.html
31
+ ext := $(firstword $(wildcard ext/*))
32
+
33
+ ragel: $(ext)/unicorn_http.c
34
+
35
+ rl_files := $(wildcard $(ext)/*.rl)
36
+ ragel: $(ext)/unicorn_http.c
37
+ $(ext)/unicorn_http.c: $(rl_files)
38
+ cd $(@D) && $(RAGEL) unicorn_http.rl -C $(RLFLAGS) -o $(@F)
39
+ ext_pfx := test/$(RUBY_ENGINE)-$(RUBY_VERSION)
40
+ tmp_bin := $(ext_pfx)/bin
41
+ ext_h := $(wildcard $(ext)/*/*.h $(ext)/*.h)
42
+ ext_src := $(sort $(wildcard $(ext)/*.c) $(ext_h) $(ext)/unicorn_http.c)
43
+ ext_pfx_src := $(addprefix $(ext_pfx)/,$(ext_src))
44
+ ext_dir := $(ext_pfx)/$(ext)
45
+ $(ext)/extconf.rb:
46
+ @>>$@
47
+ $(ext_dir) $(tmp_bin) man/man1 doc/man1 pkg t/trash:
48
+ @mkdir -p $@
49
+ $(ext_pfx)/$(ext)/%: $(ext)/% | $(ext_dir)
50
+ $(INSTALL) -m 644 $< $@
51
+ $(ext_pfx)/$(ext)/Makefile: $(ext)/extconf.rb | $(ext_dir)
52
+ $(RM) -f $(@D)/*.o
53
+ cd $(@D) && $(RUBY) $(CURDIR)/$(ext)/extconf.rb $(EXTCONF_ARGS)
54
+ ext_sfx := _ext.$(DLEXT)
55
+ ext_dl := $(ext_pfx)/$(ext)/$(notdir $(ext)_ext.$(DLEXT))
56
+ $(ext_dl): $(ext_src) $(ext_pfx_src) $(ext_pfx)/$(ext)/Makefile
57
+ $(MAKE) -C $(@D)
58
+ lib := $(CURDIR)/lib:$(CURDIR)/$(ext_pfx)/$(ext)
59
+ http build: $(ext_dl)
60
+ $(ext_pfx)/$(ext)/unicorn_http.c: ext/unicorn_http/unicorn_http.c
29
61
 
30
62
  # dunno how to implement this as concisely in Ruby, and hell, I love awk
31
63
  awk_slow := awk '/def test_/{print FILENAME"--"$$2".n"}' 2>/dev/null
@@ -37,44 +69,21 @@ T := $(filter-out $(slow_tests), $(wildcard test/*/test*.rb))
37
69
  T_n := $(shell $(awk_slow) $(slow_tests))
38
70
  T_log := $(subst .rb,$(log_suffix),$(T))
39
71
  T_n_log := $(subst .n,$(log_suffix),$(T_n))
40
- test_prefix = $(CURDIR)/test/$(RUBY_ENGINE)-$(RUBY_VERSION)
41
72
 
42
- ext := ext/unicorn_http
43
- c_files := $(ext)/unicorn_http.c $(ext)/httpdate.c $(wildcard $(ext)/*.h)
44
- rl_files := $(wildcard $(ext)/*.rl)
45
73
  base_bins := unicorn unicorn_rails
46
74
  bins := $(addprefix bin/, $(base_bins))
47
75
  man1_rdoc := $(addsuffix _1, $(base_bins))
48
76
  man1_bins := $(addsuffix .1, $(base_bins))
49
77
  man1_paths := $(addprefix man/man1/, $(man1_bins))
50
- rb_files := $(bins) $(shell find lib ext -type f -name '*.rb')
51
- inst_deps := $(c_files) $(rb_files) GNUmakefile test/test_helper.rb
52
-
53
- ragel: $(ext)/unicorn_http.c
54
- $(ext)/unicorn_http.c: $(rl_files)
55
- cd $(@D) && $(RAGEL) unicorn_http.rl -C $(RLFLAGS) -o $(@F)
56
- $(ext)/Makefile: $(ext)/extconf.rb $(c_files)
57
- cd $(@D) && $(RUBY) extconf.rb
58
- $(ext)/unicorn_http.$(DLEXT): $(ext)/Makefile
59
- $(MAKE) -C $(@D)
60
- http: $(ext)/unicorn_http.$(DLEXT)
78
+ tmp_bins = $(addprefix $(tmp_bin)/, unicorn unicorn_rails)
79
+ pid := $(shell echo $$PPID)
61
80
 
62
- # only used for tests
63
- http-install: $(ext)/unicorn_http.$(DLEXT)
64
- install -m644 $< lib/
81
+ $(tmp_bin)/%: bin/% | $(tmp_bin)
82
+ $(INSTALL) -m 755 $< $@.$(pid)
83
+ $(MRI) -i -p -e '$$_.gsub!(%r{^#!.*$$},"#!$(ruby_bin)")' $@.$(pid)
84
+ mv $@.$(pid) $@
65
85
 
66
- test-install: $(test_prefix)/.stamp
67
- $(test_prefix)/.stamp: $(inst_deps)
68
- mkdir -p $(test_prefix)/.ccache
69
- tar cf - $(inst_deps) GIT-VERSION-GEN | \
70
- (cd $(test_prefix) && tar xf -)
71
- $(MAKE) -C $(test_prefix) clean
72
- $(MAKE) -C $(test_prefix) http-install shebang RUBY="$(RUBY)"
73
- > $@
74
-
75
- # this is only intended to be run within $(test_prefix)
76
- shebang: $(bins)
77
- $(MRI) -i -p -e '$$_.gsub!(%r{^#!.*$$},"#!$(ruby_bin)")' $^
86
+ bins: $(tmp_bins)
78
87
 
79
88
  t_log := $(T_log) $(T_n_log)
80
89
  test: $(T) $(T_n)
@@ -83,15 +92,54 @@ test: $(T) $(T_n)
83
92
 
84
93
  test-exec: $(wildcard test/exec/test_*.rb)
85
94
  test-unit: $(wildcard test/unit/test_*.rb)
86
- $(slow_tests): $(test_prefix)/.stamp
95
+ $(slow_tests): $(ext_dl)
87
96
  @$(MAKE) $(shell $(awk_slow) $@)
88
97
 
89
98
  # ensure we can require just the HTTP parser without the rest of unicorn
90
- test-require: $(ext)/unicorn_http.$(DLEXT)
91
- $(RUBY) --disable-gems -I$(ext) -runicorn_http -e Unicorn
99
+ test-require: $(ext_dl)
100
+ $(RUBY) --disable-gems -I$(ext_pfx)/$(ext) -runicorn_http -e Unicorn
101
+
102
+ test_prereq := $(tmp_bins) $(ext_dl)
103
+
104
+ SH_TEST_OPTS =
105
+ ifdef V
106
+ ifeq ($(V),2)
107
+ SH_TEST_OPTS += --trace
108
+ else
109
+ SH_TEST_OPTS += --verbose
110
+ endif
111
+ endif
92
112
 
93
- test-integration: $(test_prefix)/.stamp
94
- $(MAKE) -C t
113
+ # do we trust Ruby behavior to be stable? some tests are
114
+ # (mostly) POSIX sh (not bash or ksh93, so no "set -o pipefail"
115
+ # TRACER = strace -f -o $(t_pfx).strace -s 100000
116
+ # TRACER = /usr/bin/time -o $(t_pfx).time
117
+ t_pfx = trash/$@-$(RUBY_ENGINE)-$(RUBY_VERSION)
118
+ T_sh = $(wildcard t/t[0-9][0-9][0-9][0-9]-*.sh)
119
+ $(T_sh): export RUBY := $(RUBY)
120
+ $(T_sh): export PATH := $(CURDIR)/$(tmp_bin):$(PATH)
121
+ $(T_sh): export RUBYLIB := $(lib):$(RUBYLIB)
122
+ $(T_sh): dep $(test_prereq) t/random_blob t/trash/.gitignore
123
+ cd t && $(TRACER) $(SHELL) $(SH_TEST_OPTS) $(@F) $(TEST_OPTS)
124
+
125
+ t/trash/.gitignore : | t/trash
126
+ echo '*' >$@
127
+
128
+ dependencies := socat curl
129
+ deps := $(addprefix t/.dep+,$(dependencies))
130
+ $(deps): dep_bin = $(lastword $(subst +, ,$@))
131
+ $(deps):
132
+ @which $(dep_bin) > $@.$(pid) 2>/dev/null || :
133
+ @test -s $@.$(pid) || \
134
+ { echo >&2 "E '$(dep_bin)' not found in PATH=$(PATH)"; exit 1; }
135
+ @mv $@.$(pid) $@
136
+ dep: $(deps)
137
+
138
+ t/random_blob:
139
+ dd if=/dev/urandom bs=1M count=30 of=$@.$(pid)
140
+ mv $@.$(pid) $@
141
+
142
+ test-integration: $(T_sh)
95
143
 
96
144
  check: test-require test test-integration
97
145
  test-all: check
@@ -122,16 +170,16 @@ run_test = $(quiet_pre) \
122
170
 
123
171
  %.n: arg = $(subst .n,,$(subst --, -n ,$@))
124
172
  %.n: t = $(subst .n,$(log_suffix),$@)
125
- %.n: export PATH := $(test_prefix)/bin:$(PATH)
126
- %.n: export RUBYLIB := $(test_prefix)/lib:$(MYLIBS)
127
- %.n: $(test_prefix)/.stamp
173
+ %.n: export PATH := $(CURDIR)/$(tmp_bin):$(PATH)
174
+ %.n: export RUBYLIB := $(lib):$(RUBYLIB)
175
+ %.n: $(test_prereq)
128
176
  $(run_test)
129
177
 
130
178
  $(T): arg = $@
131
179
  $(T): t = $(subst .rb,$(log_suffix),$@)
132
- $(T): export PATH := $(test_prefix)/bin:$(PATH)
133
- $(T): export RUBYLIB := $(test_prefix)/lib:$(MYLIBS)
134
- $(T): $(test_prefix)/.stamp
180
+ $(T): export PATH := $(CURDIR)/$(tmp_bin):$(PATH)
181
+ $(T): export RUBYLIB := $(lib):$(RUBYLIB)
182
+ $(T): $(test_prereq)
135
183
  $(run_test)
136
184
 
137
185
  install: $(bins) $(ext)/unicorn_http.c
@@ -152,18 +200,16 @@ clean:
152
200
  -$(MAKE) -C $(ext) clean
153
201
  $(RM) $(ext)/Makefile
154
202
  $(RM) $(setup_rb_files) $(t_log)
155
- $(RM) -r $(test_prefix) man
156
- $(RM) $(man1) $(html1)
203
+ $(RM) -r $(ext_pfx) man t/trash
204
+ $(RM) $(html1)
157
205
 
158
206
  man1 := $(addprefix Documentation/, unicorn.1 unicorn_rails.1)
159
207
  html1 := $(addsuffix .html, $(man1))
160
- man :
161
- mkdir -p man/man1
162
- install -m 644 $(man1) man/man1
208
+ man : $(man1) | man/man1
209
+ $(INSTALL) -m 644 $(man1) man/man1
163
210
 
164
- html : $(html1)
165
- mkdir -p doc/man1
166
- install -m 644 $(html1) doc/man1
211
+ html : $(html1) | doc/man1
212
+ $(INSTALL) -m 644 $(html1) doc/man1
167
213
 
168
214
  %.1.html: %.1
169
215
  $(OLDDOC) man2html -o $@ ./$<
@@ -187,19 +233,20 @@ doc: .document $(ext)/unicorn_http.c man html .olddoc.yml $(PLACEHOLDERS)
187
233
  $(OLDDOC) prepare
188
234
  $(RDOC) -f dark216
189
235
  $(OLDDOC) merge
190
- install -m644 COPYING doc/COPYING
191
- install -m644 NEWS.atom.xml doc/NEWS.atom.xml
192
- install -m644 $(shell LC_ALL=C grep '^[A-Z]' .document) doc/
193
- install -m644 $(man1_paths) doc/
236
+ $(INSTALL) -m 644 COPYING doc/COPYING
237
+ $(INSTALL) -m 644 NEWS.atom.xml doc/NEWS.atom.xml
238
+ $(INSTALL) -m 644 $(shell LC_ALL=C grep '^[A-Z]' .document) doc/
239
+ $(INSTALL) -m 644 $(man1_paths) doc/
194
240
  tar cf - $$(git ls-files examples/) | (cd doc && tar xf -)
195
241
 
196
- # publishes docs to https://bogomips.org/unicorn/
242
+ # publishes docs to https://yhbt.net/unicorn/
197
243
  publish_doc:
198
244
  -git set-file-times
199
245
  $(MAKE) doc
200
246
  $(MAKE) doc_gz
201
247
  chmod 644 $$(find doc -type f)
202
- $(RSYNC) -av doc/ bogomips.org:/srv/bogomips/unicorn/
248
+ $(RSYNC) -av doc/ yhbt.net:/srv/yhbt/unicorn/ \
249
+ --exclude index.html* --exclude created.rid*
203
250
  git ls-files | xargs touch
204
251
 
205
252
  # Create gzip variants of the same timestamp as the original so nginx
@@ -231,9 +278,8 @@ gem: $(pkggem)
231
278
  install-gem: $(pkggem)
232
279
  gem install --local $(CURDIR)/$<
233
280
 
234
- $(pkggem): .manifest fix-perms
281
+ $(pkggem): .manifest fix-perms | pkg
235
282
  gem build $(rfpackage).gemspec
236
- mkdir -p pkg
237
283
  mv $(@F) $@
238
284
 
239
285
  $(pkgtgz): distdir = $(basename $@)
@@ -264,5 +310,4 @@ check-warnings:
264
310
  do $(RUBY) --disable-gems -d -W2 -c \
265
311
  $$i; done) | grep -v '^Syntax OK$$' || :
266
312
 
267
- .PHONY: .FORCE-GIT-VERSION-FILE doc $(T) $(slow_tests) man
268
- .PHONY: test-install
313
+ .PHONY: .FORCE-GIT-VERSION-FILE doc $(T) $(slow_tests) man $(T_sh) clean
data/HACKING CHANGED
@@ -50,20 +50,17 @@ programming experience will come in handy (or be learned) here.
50
50
 
51
51
  === Documentation
52
52
 
53
- Due to the lack of RDoc-to-manpage converters we know about, we're
54
- writing manpages in Markdown and converting to troff/HTML with Pandoc.
55
-
56
53
  Please wrap documentation at 72 characters-per-line or less (long URLs
57
54
  are exempt) so it is comfortably readable from terminals.
58
55
 
59
56
  When referencing mailing list posts, use
60
- <tt>https://bogomips.org/unicorn-public/$MESSAGE_ID/</tt> if possible
57
+ <tt>https://yhbt.net/unicorn-public/$MESSAGE_ID/</tt> if possible
61
58
  since the Message-ID remains searchable even if a particular site
62
59
  becomes unavailable.
63
60
 
64
61
  === Ruby/C Compatibility
65
62
 
66
- We target mainline Ruby 1.9.3 and later. We need the Ruby
63
+ We target C Ruby 2.0 and later. We need the Ruby
67
64
  implementation to support fork, exec, pipe, UNIX signals, access to
68
65
  integer file descriptors and ability to use unlinked files.
69
66
 
@@ -102,10 +99,6 @@ don't email the git mailing list or maintainer with Unicorn patches :)
102
99
 
103
100
  == Building a Gem
104
101
 
105
- In order to build the gem, you must install the following components:
106
-
107
- * pandoc
108
-
109
102
  You can build the Unicorn gem with the following command:
110
103
 
111
104
  gmake gem
data/ISSUES CHANGED
@@ -1,9 +1,9 @@
1
1
  = Issues
2
2
 
3
- mailto:unicorn-public@bogomips.org is the best place to report bugs,
3
+ mailto:unicorn-public@yhbt.net is the best place to report bugs,
4
4
  submit patches and/or obtain support after you have searched the
5
- {email archives}[https://bogomips.org/unicorn-public/] and
6
- {documentation}[https://bogomips.org/unicorn/].
5
+ {email archives}[https://yhbt.net/unicorn-public/] and
6
+ {documentation}[https://yhbt.net/unicorn/].
7
7
 
8
8
  * No subscription will ever be required to email us
9
9
  * Cc: all participants in a thread or commit, as subscription is optional
@@ -12,14 +12,18 @@ submit patches and/or obtain support after you have searched the
12
12
  * Do not send HTML mail or images,
13
13
  they hurt reader privacy and will be flagged as spam
14
14
  * Anonymous and pseudonymous messages will ALWAYS be welcome
15
- * The email submission port (587) is enabled on the bogomips.org MX:
16
- https://bogomips.org/unicorn-public/20141004232241.GA23908@dcvr.yhbt.net/t/
15
+ * The email submission port (587) is enabled on the yhbt.net MX:
16
+ https://yhbt.net/unicorn-public/20141004232241.GA23908@dcvr.yhbt.net/t/
17
17
 
18
18
  We will never have a centralized or formal bug tracker. Instead we
19
19
  can interoperate with any bug tracker which can Cc: us plain-text to
20
- mailto:unicorn-public@bogomips.org This includes the Debian BTS
20
+ mailto:unicorn-public@yhbt.net This includes the Debian BTS
21
21
  at https://bugs.debian.org/unicorn and possibly others.
22
22
 
23
+ unicorn is a server; it does not depend on graphics/audio. Nobody
24
+ communicating with us will ever be expected to go through the trouble
25
+ of setting up graphics nor audio support.
26
+
23
27
  If your issue is of a sensitive nature or you're just shy in public,
24
28
  use anonymity tools such as Tor or Mixmaster; and rely on the public
25
29
  mail archives for responses. Be sure to scrub sensitive log messages
@@ -73,24 +77,21 @@ document distributed with git) on guidelines for patch submission.
73
77
 
74
78
  == Contact Info
75
79
 
76
- * public: mailto:unicorn-public@bogomips.org
77
- * nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
78
- * nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
79
- * https://bogomips.org/unicorn-public/
80
- * http://ou63pmih66umazou.onion/unicorn-public/
81
-
82
- Mailing list subscription is optional, so Cc: all participants.
83
-
84
- You can follow along via NNTP (read-only):
80
+ Mail is publicly-archived, SMTP subscription is discouraged to avoid
81
+ servers being a single-point-of-failure, so Cc: all participants.
85
82
 
86
- nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
87
- nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general
83
+ The HTTP(S) archives have links to per-thread Atom feeds and downloadable
84
+ mboxes. Read-only IMAP(S) folders and NNTP(S) newsgroups are also available.
88
85
 
89
- Or Atom feeds:
86
+ * https://yhbt.net/unicorn-public/
87
+ * http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/unicorn-public/
88
+ * imaps://yhbt.net/inbox.comp.lang.ruby.unicorn.0
89
+ * imap://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.unicorn.0
90
+ * nntps://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
91
+ * nntp://news.gmane.io/gmane.comp.lang.ruby.unicorn.general
90
92
 
91
- https://bogomips.org/unicorn-public/new.atom
92
- http://ou63pmih66umazou.onion/unicorn-public/new.atom
93
+ Full Atom feeds:
94
+ * https://yhbt.net/unicorn-public/new.atom
95
+ * http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/unicorn-public/new.atom
93
96
 
94
- The HTML archives at https://bogomips.org/unicorn-public/
95
- also has links to per-thread Atom feeds and downloadable
96
- mboxes.
97
+ We only accept plain-text mail: mailto:unicorn-public@yhbt.net
data/KNOWN_ISSUES CHANGED
@@ -9,7 +9,7 @@ acceptable solution. Those issues are documented here.
9
9
  handlers.
10
10
 
11
11
  * Issues with FreeBSD jails can be worked around as documented by Tatsuya Ono:
12
- https://bogomips.org/unicorn-public/CAHBuKRj09FdxAgzsefJWotexw-7JYZGJMtgUp_dhjPz9VbKD6Q@mail.gmail.com/
12
+ https://yhbt.net/unicorn-public/CAHBuKRj09FdxAgzsefJWotexw-7JYZGJMtgUp_dhjPz9VbKD6Q@mail.gmail.com/
13
13
 
14
14
  * PRNGs (pseudo-random number generators) loaded before forking
15
15
  (e.g. "preload_app true") may need to have their internal state
@@ -60,7 +60,7 @@ acceptable solution. Those issues are documented here.
60
60
  application to use Rails 2.3.2 and you have no other choice, then
61
61
  you may edit your unicorn gemspec and remove the Rack dependency.
62
62
 
63
- ref: https://bogomips.org/unicorn-public/20091014221552.GA30624@dcvr.yhbt.net/
63
+ ref: https://yhbt.net/unicorn-public/20091014221552.GA30624@dcvr.yhbt.net/
64
64
  Note: the workaround described in the article above only made
65
65
  the issue more subtle and we didn't notice them immediately.
66
66
 
data/LATEST CHANGED
@@ -1,23 +1,24 @@
1
- === unicorn 5.5.0 / 2019-03-04 00:41 UTC
2
-
3
- Mostly identical to 5.5.0.pre1, which I didn't hear any feedback
4
- from:
5
-
6
- https://bogomips.org/unicorn-public/20181220222842.GA27382@dcvr/
7
-
8
- > Jeremy Evans contributed the "default_middleware" configuration option:
9
- >
10
- > https://bogomips.org/unicorn-public/20180913192055.GD48926@jeremyevans.local/
11
- >
12
- > Jeremy also contributed the ability to use separate groups for the process
13
- > and log files:
14
- >
15
- > https://bogomips.org/unicorn-public/20180913192449.GE48926@jeremyevans.local/
16
- >
17
- > There's also a couple of uninteresting minor optimizations and
18
- > documentation additions.
19
-
20
- Otherwise, there's one extra change to use
21
- rb_gc_register_mark_object which is finally a documented part of
22
- the Ruby C-API, but has existed since the 1.9 days.
1
+ === unicorn 6.0.0 - no more recycling Rack env / 2021-03-17 06:38 UTC
2
+
3
+ This release allocates a new Rack `env' hash for every request.
4
+ This is done for safety with internally-(thread|event)-using Rack
5
+ apps which expect to use `env' after the normal Rack response is
6
+ complete, but without relying on rack.hijack[1]. Thanks to
7
+ Dirkjan Bussink <d.bussink@gmail.com> for the patch:
8
+
9
+ https://yhbt.net/unicorn-public/66A68DD8-83EF-4C7A-80E8-3F1F7AB31670@github.com/
10
+
11
+ The major version is bumped since:
12
+
13
+ 1) there are performance regressions for some simple Rack apps
14
+
15
+ 2) unsupported 3rd-party monkey patches which previously
16
+ relied on this behavior may be broken (our version of
17
+ OobGC was).
18
+
19
+ The test suite is also more reliable on multi-core systems
20
+ and Ruby 3.x.
21
+
22
+ [1] thread from 2017 around rack.hijack safety:
23
+ https://yhbt.net/unicorn-public/CAAtdryPG3nLuyo0jxfYW1YHu1Q+ZpkLkd4KdWC8vA46B5haZxw@mail.gmail.com/
23
24
 
data/Links CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  If you're interested in unicorn, you may be interested in some of the projects
4
4
  listed below. If you have any links to add/change/remove, please tell us at
5
- mailto:unicorn-public@bogomips.org!
5
+ mailto:unicorn-public@yhbt.net!
6
6
 
7
7
  == Disclaimer
8
8
 
@@ -23,10 +23,10 @@ or services behind them.
23
23
  * {golden_brindle}[https://github.com/simonoff/golden_brindle] - tool to
24
24
  manage multiple unicorn instances/applications on a single server
25
25
 
26
- * {raindrops}[https://bogomips.org/raindrops/] - real-time stats for
26
+ * {raindrops}[https://yhbt.net/raindrops/] - real-time stats for
27
27
  preforking Rack servers
28
28
 
29
- * {UnXF}[https://bogomips.org/unxf/] Un-X-Forward* the Rack environment,
29
+ * {UnXF}[https://yhbt.net/unxf/] Un-X-Forward* the Rack environment,
30
30
  useful since unicorn is designed to be deployed behind a reverse proxy.
31
31
 
32
32
  === unicorn is written to work with
@@ -52,7 +52,7 @@ or services behind them.
52
52
  * {Mongrel}[https://rubygems.org/gems/mongrel] - the awesome webserver
53
53
  unicorn is based on. A historical archive of the mongrel dev list
54
54
  featuring early discussions of unicorn is available at:
55
- https://bogomips.org/mongrel-devel/
55
+ https://yhbt.net/mongrel-devel/
56
56
 
57
- * {david}[https://bogomips.org/david.git] - a tool to explain why you need
57
+ * {david}[https://yhbt.net/david.git] - a tool to explain why you need
58
58
  nginx in front of unicorn