passenger 4.0.3 → 4.0.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (46) hide show
  1. data.tar.gz.asc +7 -7
  2. data/NEWS +30 -0
  3. data/build/agents.rb +3 -0
  4. data/build/apache2.rb +2 -3
  5. data/build/basics.rb +20 -0
  6. data/build/common_library.rb +15 -0
  7. data/build/cxx_tests.rb +4 -1
  8. data/build/packaging.rb +22 -32
  9. data/doc/Packaging.html +792 -0
  10. data/doc/Users guide Nginx.html +2 -2
  11. data/doc/Users guide Nginx.txt +2 -2
  12. data/ext/apache2/Configuration.cpp +34 -62
  13. data/ext/apache2/Configuration.hpp +1 -14
  14. data/ext/apache2/DirectoryMapper.h +134 -104
  15. data/ext/apache2/Hooks.cpp +33 -19
  16. data/ext/common/AgentsStarter.cpp +22 -22
  17. data/ext/common/AgentsStarter.h +25 -25
  18. data/ext/common/ApplicationPool2/AppTypes.cpp +6 -6
  19. data/ext/common/ApplicationPool2/AppTypes.h +61 -9
  20. data/ext/common/ApplicationPool2/Implementation.cpp +14 -2
  21. data/ext/common/Constants.h +54 -23
  22. data/ext/common/Constants.h.erb +42 -0
  23. data/ext/common/ServerInstanceDir.h +6 -11
  24. data/ext/common/Utils/CachedFileStat.cpp +10 -9
  25. data/ext/common/Utils/CachedFileStat.h +8 -8
  26. data/ext/common/Utils/LargeFiles.cpp +12 -4
  27. data/ext/common/agents/HelperAgent/RequestHandler.h +1 -0
  28. data/ext/common/agents/Watchdog/Main.cpp +2 -2
  29. data/ext/nginx/Configuration.c +1 -1
  30. data/ext/nginx/Configuration.h +0 -1
  31. data/ext/nginx/ContentHandler.c +15 -15
  32. data/ext/nginx/ngx_http_passenger_module.c +48 -48
  33. data/ext/nginx/ngx_http_passenger_module.h +7 -9
  34. data/helper-scripts/wsgi-loader.py +2 -2
  35. data/lib/phusion_passenger.rb +1 -3
  36. data/lib/phusion_passenger/admin_tools/server_instance.rb +5 -11
  37. data/lib/phusion_passenger/constants.rb +42 -0
  38. data/lib/phusion_passenger/packaging.rb +8 -6
  39. data/lib/phusion_passenger/platform_info.rb +11 -6
  40. data/lib/phusion_passenger/standalone/command.rb +4 -2
  41. data/lib/phusion_passenger/standalone/runtime_installer.rb +1 -1
  42. data/resources/templates/standalone/config.erb +14 -2
  43. data/test/ruby/admin_tools_spec.rb +14 -16
  44. metadata +4 -3
  45. metadata.gz.asc +7 -7
  46. data/lib/phusion_passenger/wsgi/request_handler.py +0 -199
@@ -48,20 +48,18 @@ extern ngx_module_t ngx_http_passenger_module;
48
48
  /**
49
49
  * A static schema string to be assigned to Nginx 'upstream' strctures.
50
50
  */
51
- extern ngx_str_t passenger_schema_string;
51
+ extern ngx_str_t pp_schema_string;
52
52
 
53
- extern ngx_str_t passenger_placeholder_upstream_address;
53
+ extern ngx_str_t pp_placeholder_upstream_address;
54
54
 
55
- /**
56
- * A CachedFileStat object used for caching stat() calls.
57
- */
58
- extern PassengerCachedFileStat *passenger_stat_cache;
55
+ /** A CachedFileStat object used for caching stat() calls. */
56
+ extern PP_CachedFileStat *pp_stat_cache;
59
57
 
60
- extern PassengerAppTypeDetector *passenger_app_type_detector;
58
+ extern PP_AppTypeDetector *pp_app_type_detector;
61
59
 
62
- extern PSG_AgentsStarter *passenger_agents_starter;
60
+ extern PP_AgentsStarter *pp_agents_starter;
63
61
 
64
- extern ngx_cycle_t *passenger_current_cycle;
62
+ extern ngx_cycle_t *pp_current_cycle;
65
63
 
66
64
  #endif /* _PASSENGER_NGINX_MODULE_H_ */
67
65
 
@@ -171,10 +171,10 @@ class RequestHandler:
171
171
 
172
172
  if hasattr(socket, '_fileobject'):
173
173
  def wrap_input_socket(self, sock):
174
- return socket._fileobject(sock, 'r', 512)
174
+ return socket._fileobject(sock, 'rb', 512)
175
175
  else:
176
176
  def wrap_input_socket(self, sock):
177
- return socket.socket.makefile(sock, 'r', 512)
177
+ return socket.socket.makefile(sock, 'rb', 512)
178
178
 
179
179
  def process_request(self, env, input_stream, output_stream):
180
180
  # The WSGI speculation says that the input parameter object passed needs to
@@ -29,9 +29,7 @@ module PhusionPassenger
29
29
  ###### Version numbers ######
30
30
 
31
31
  PACKAGE_NAME = 'passenger'
32
-
33
- # Phusion Passenger version number. Don't forget to edit ext/common/Constants.h too.
34
- VERSION_STRING = '4.0.3'
32
+ VERSION_STRING = '4.0.4'
35
33
 
36
34
  PREFERRED_NGINX_VERSION = '1.4.1'
37
35
  NGINX_SHA256_CHECKSUM = 'bca5d1e89751ba29406185e1736c390412603a7e6b604f5b4575281f6565d119'
@@ -26,6 +26,7 @@ require 'fileutils'
26
26
  require 'socket'
27
27
  require 'ostruct'
28
28
  require 'phusion_passenger/admin_tools'
29
+ require 'phusion_passenger/constants'
29
30
  require 'phusion_passenger/utils'
30
31
  require 'phusion_passenger/message_channel'
31
32
  require 'phusion_passenger/message_client'
@@ -34,14 +35,6 @@ module PhusionPassenger
34
35
  module AdminTools
35
36
 
36
37
  class ServerInstance
37
- # If you change the structure version then don't forget to change
38
- # ext/common/ServerInstanceDir.h too.
39
-
40
- DIR_STRUCTURE_MAJOR_VERSION = 1
41
- DIR_STRUCTURE_MINOR_VERSION = 0
42
- GENERATION_STRUCTURE_MAJOR_VERSION = 2
43
- GENERATION_STRUCTURE_MINOR_VERSION = 0
44
-
45
38
  STALE_TIME_THRESHOLD = 60
46
39
 
47
40
  class StaleDirectoryError < StandardError
@@ -118,9 +111,9 @@ class ServerInstance
118
111
  instances = []
119
112
 
120
113
  Dir["#{AdminTools.tmpdir}/passenger.*"].each do |dir|
121
- next if File.basename(dir) !~ /passenger\.#{DIR_STRUCTURE_MAJOR_VERSION}\.(\d+)\.(\d+)\Z/
114
+ next if File.basename(dir) !~ /passenger\.#{PhusionPassenger::SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION}\.(\d+)\.(\d+)\Z/
122
115
  minor = $1
123
- next if minor.to_i > DIR_STRUCTURE_MINOR_VERSION
116
+ next if minor.to_i > PhusionPassenger::SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION
124
117
 
125
118
  begin
126
119
  instances << ServerInstance.new(dir)
@@ -178,7 +171,8 @@ class ServerInstance
178
171
  end
179
172
  major = major.to_i
180
173
  minor = minor.to_i
181
- if major != GENERATION_STRUCTURE_MAJOR_VERSION || minor > GENERATION_STRUCTURE_MINOR_VERSION
174
+ if major != PhusionPassenger::SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION ||
175
+ minor > PhusionPassenger::SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION
182
176
  raise UnsupportedGenerationStructureVersionError, "Unsupported generation directory structure version."
183
177
  end
184
178
 
@@ -21,9 +21,51 @@
21
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
22
  # THE SOFTWARE.
23
23
 
24
+ require 'phusion_passenger'
25
+
24
26
  module PhusionPassenger
25
27
  PASSENGER_ANALYTICS_WEB_LOG = "PASSENGER_ANALYTICS_WEB_LOG".freeze
26
28
  PASSENGER_TXN_ID = "PASSENGER_TXN_ID".freeze
27
29
  PASSENGER_UNION_STATION_KEY = "PASSENGER_UNION_STATION_KEY".freeze
28
30
  RACK_HIJACK_IO = "rack.hijack_io".freeze
31
+
32
+ # Constants shared between the C++ and Ruby codebase. The C++ Constants.h
33
+ # is automatically generated by the build system from the following
34
+ # definitions.
35
+ module SharedConstants
36
+ # Default config values
37
+ DEFAULT_LOG_LEVEL = 0
38
+ DEFAULT_RUBY = "ruby"
39
+ DEFAULT_PYTHON = "python"
40
+ DEFAULT_MAX_POOL_SIZE = 6
41
+ DEFAULT_POOL_IDLE_TIME = 300
42
+ DEFAULT_MAX_INSTANCES_PER_APP = 0
43
+ DEFAULT_WEB_APP_USER = "nobody"
44
+ DEFAULT_ANALYTICS_LOG_USER = DEFAULT_WEB_APP_USER
45
+ DEFAULT_ANALYTICS_LOG_GROUP = ""
46
+ DEFAULT_ANALYTICS_LOG_PERMISSIONS = "u=rwx,g=rx,o=rx"
47
+ DEFAULT_UNION_STATION_GATEWAY_ADDRESS = "gateway.unionstationapp.com"
48
+ DEFAULT_UNION_STATION_GATEWAY_PORT = 443
49
+
50
+ # Size limits
51
+ MESSAGE_SERVER_MAX_USERNAME_SIZE = 100
52
+ MESSAGE_SERVER_MAX_PASSWORD_SIZE = 100
53
+ POOL_HELPER_THREAD_STACK_SIZE = 1024 * 256
54
+
55
+ # Time limits
56
+ PROCESS_SHUTDOWN_TIMEOUT = 60 # In seconds
57
+ PROCESS_SHUTDOWN_TIMEOUT_DISPLAY = "1 minute"
58
+
59
+ # Versions
60
+ PASSENGER_VERSION = PhusionPassenger::VERSION_STRING
61
+ SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION = 1
62
+ SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION = 0
63
+ SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION = 2
64
+ SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION = 0
65
+
66
+ # Misc
67
+ FEEDBACK_FD = 3
68
+ end
69
+
70
+ include SharedConstants
29
71
  end
@@ -32,6 +32,12 @@ module Packaging
32
32
  'doc/Security of user switching support.html',
33
33
  'doc/Architectural overview.html'
34
34
  ]
35
+
36
+ # Files that must be generated before packaging.
37
+ PREGENERATED_FILES = [
38
+ 'ext/common/Constants.h',
39
+ 'doc/Packaging.html'
40
+ ] + ASCII_DOCS
35
41
 
36
42
  USER_EXECUTABLES = [
37
43
  'passenger',
@@ -66,7 +72,7 @@ module Packaging
66
72
  'man/*',
67
73
  'debian/*',
68
74
  'helper-scripts/*',
69
- 'ext/common/**/*.{cpp,c,h,hpp,md}',
75
+ 'ext/common/**/*.{cpp,c,h,hpp,md,erb}',
70
76
  'ext/apache2/*.{cpp,h,hpp,c}',
71
77
  'ext/nginx/*.{c,cpp,h}',
72
78
  'ext/nginx/config',
@@ -95,11 +101,7 @@ module Packaging
95
101
  'test/ruby/**/*',
96
102
  'test/integration_tests/**/*',
97
103
  'test/stub/**/*'
98
-
99
- # If you're running 'rake package' for the first time, then ASCII_DOCS
100
- # files don't exist yet, and so won't be matched by the glob.
101
- # So we add these filenames manually.
102
- ] + ASCII_DOCS
104
+ ]
103
105
 
104
106
  EXCLUDE_GLOB = [
105
107
  'test/stub/rails_apps/3.0/empty/help/**/*',
@@ -245,9 +245,11 @@ public
245
245
  dir = tmpdir
246
246
  filename = "#{dir}/#{basename}"
247
247
  begin
248
- File.open(filename, 'w').close
248
+ File.open(filename, 'w') do |f|
249
+ f.puts("#!/bin/sh")
250
+ end
249
251
  File.chmod(0700, filename)
250
- if File.executable?(filename)
252
+ if system(filename)
251
253
  return dir
252
254
  else
253
255
  attempts << { :dir => dir,
@@ -266,9 +268,11 @@ public
266
268
  dir = Dir.pwd
267
269
  filename = "#{dir}/#{basename}"
268
270
  begin
269
- File.open(filename, 'w').close
271
+ File.open(filename, 'w') do |f|
272
+ f.puts("#!/bin/sh")
273
+ end
270
274
  File.chmod(0700, filename)
271
- if File.executable?(filename)
275
+ if system(filename)
272
276
  return dir
273
277
  else
274
278
  attempts << { :dir => dir,
@@ -284,7 +288,8 @@ public
284
288
  File.unlink(filename) rescue nil
285
289
  end
286
290
 
287
- message = "In order to run certain tests, this program " +
291
+ message = "ERROR: Cannot find suitable temporary directory\n" +
292
+ "In order to run certain tests, this program " +
288
293
  "must be able to write temporary\n" +
289
294
  "executable files to some directory. However no such " +
290
295
  "directory can be found. \n" +
@@ -294,7 +299,7 @@ public
294
299
  message << " #{attempt[:error]}\n"
295
300
  end
296
301
  message << "\nYou can solve this problem by telling this program what directory to write\n" <<
297
- "temporary executable files to.\n" <<
302
+ "temporary executable files to, as follows:\n" <<
298
303
  "\n" <<
299
304
  " Set the $TMPDIR environment variable to the desired directory's filename and\n" <<
300
305
  " re-run this program.\n" <<
@@ -1,5 +1,5 @@
1
1
  # Phusion Passenger - https://www.phusionpassenger.com/
2
- # Copyright (c) 2010-2012 Phusion
2
+ # Copyright (c) 2010-2013 Phusion
3
3
  #
4
4
  # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
5
5
  #
@@ -22,6 +22,7 @@
22
22
  # THE SOFTWARE.
23
23
  require 'optparse'
24
24
  require 'phusion_passenger'
25
+ require 'phusion_passenger/constants'
25
26
  require 'phusion_passenger/standalone/utils'
26
27
 
27
28
  module PhusionPassenger
@@ -207,6 +208,7 @@ private
207
208
  "templates", "standalone", "config.erb")
208
209
  require_erb
209
210
  erb = ERB.new(File.read(template_filename))
211
+ current_user = Etc.getpwuid(Process.uid).name
210
212
 
211
213
  # The template requires some helper methods which are defined in start_command.rb.
212
214
  output = erb.result(binding)
@@ -236,7 +238,7 @@ private
236
238
  def create_nginx_controller(extra_options = {})
237
239
  require_daemon_controller
238
240
  require 'socket' unless defined?(UNIXSocket)
239
- @temp_dir = "/tmp/passenger-standalone.#{$$}"
241
+ @temp_dir = "/tmp/passenger.#{SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION}.#{SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION}.#{$$}"
240
242
  @config_filename = "#{@temp_dir}/config"
241
243
  @location_config_filename = "#{@temp_dir}/locations.ini"
242
244
  if @options[:socket_file]
@@ -199,7 +199,7 @@ protected
199
199
  def before_install
200
200
  super
201
201
  @plugin.call_hook(:runtime_installer_start, self) if @plugin
202
- @working_dir = "/tmp/#{myself}-passenger-standalone-#{Process.pid}"
202
+ @working_dir = "#{PlatformInfo.tmpexedir}/#{myself}-passenger-standalone-#{Process.pid}"
203
203
  FileUtils.rm_rf(@working_dir)
204
204
  FileUtils.mkdir_p(@working_dir)
205
205
  @download_binaries = true if !defined?(@download_binaries)
@@ -10,7 +10,11 @@ worker_processes 1;
10
10
  daemon on;
11
11
  error_log '<%= @options[:log_file] %>' <% if debugging? %>info<% end %>;
12
12
  pid '<%= @options[:pid_file] %>';
13
- <% if @options[:user] %>user <%= @options[:user] %> <%= default_group_for(@options[:user]) %>;<% end %>
13
+ <% if @options[:user] %>
14
+ user <%= @options[:user] %> <%= default_group_for(@options[:user]) %>;
15
+ <% else %>
16
+ user <%= current_user %> <%= default_group_for(current_user) %>;
17
+ <% end %>
14
18
 
15
19
  events {
16
20
  worker_connections 1024;
@@ -21,11 +25,18 @@ http {
21
25
  include '<%= PhusionPassenger.resources_dir %>/mime.types';
22
26
  passenger_ruby <%= PlatformInfo.ruby_command %>;
23
27
  passenger_root '<%= @location_config_filename %>';
28
+ passenger_ctl server_instance_dir '<%= @temp_dir %>';
24
29
  passenger_abort_on_startup_error on;
25
30
  passenger_user_switching off;
26
31
  passenger_max_pool_size <%= @options[:max_pool_size] %>;
27
32
  passenger_min_instances <%= @options[:min_instances] %>;
28
- <% if @options[:user] %>passenger_default_user <%= @options[:user] %>;<% end %>
33
+ <% if @options[:user] %>
34
+ passenger_user <%= @options[:user] %>;
35
+ passenger_default_user <%= @options[:user] %>;
36
+ <% else %>
37
+ passenger_user <%= current_user %>;
38
+ passenger_default_user <%= current_user %>;
39
+ <% end %>
29
40
  <% if debugging? %>passenger_log_level 2;<% end %>
30
41
  <% if @options[:rolling_restarts] %>passenger_rolling_restarts on;<% end %>
31
42
  <% if @options[:resist_deployment_errors] %>passenger_resist_deployment_errors on;<% end %>
@@ -37,6 +48,7 @@ http {
37
48
  <% end %>
38
49
 
39
50
  default_type application/octet-stream;
51
+ types_hash_max_size 2048;
40
52
  client_max_body_size 1024m;
41
53
  access_log off;
42
54
  keepalive_timeout 60;
@@ -1,5 +1,6 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
  require 'fileutils'
3
+ require 'phusion_passenger/constants'
3
4
  require 'phusion_passenger/utils'
4
5
  require 'phusion_passenger/admin_tools'
5
6
  require 'phusion_passenger/admin_tools/server_instance'
@@ -17,11 +18,6 @@ end
17
18
  describe AdminTools::ServerInstance do
18
19
  include Utils
19
20
 
20
- DIR_STRUCTURE_MAJOR_VERSION = AdminTools::ServerInstance::DIR_STRUCTURE_MAJOR_VERSION
21
- DIR_STRUCTURE_MINOR_VERSION = AdminTools::ServerInstance::DIR_STRUCTURE_MINOR_VERSION
22
- GENERATION_STRUCTURE_MAJOR_VERSION = AdminTools::ServerInstance::GENERATION_STRUCTURE_MAJOR_VERSION
23
- GENERATION_STRUCTURE_MINOR_VERSION = AdminTools::ServerInstance::GENERATION_STRUCTURE_MINOR_VERSION
24
-
25
21
  before :each do
26
22
  File.chmod(0700, passenger_tmpdir)
27
23
  end
@@ -45,13 +41,13 @@ describe AdminTools::ServerInstance do
45
41
  IO.popen("sleep 999")
46
42
  end
47
43
 
48
- def create_instance_dir(pid, major = DIR_STRUCTURE_MAJOR_VERSION, minor = DIR_STRUCTURE_MINOR_VERSION)
44
+ def create_instance_dir(pid, major = PhusionPassenger::SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION, minor = PhusionPassenger::SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION)
49
45
  dir = "#{passenger_tmpdir}/passenger.#{major}.#{minor}.#{pid}"
50
46
  Dir.mkdir(dir)
51
47
  return dir
52
48
  end
53
49
 
54
- def create_generation(dir, number = 0, major = GENERATION_STRUCTURE_MAJOR_VERSION, minor = GENERATION_STRUCTURE_MINOR_VERSION)
50
+ def create_generation(dir, number = 0, major = PhusionPassenger::SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION, minor = PhusionPassenger::SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION)
55
51
  dir = "#{dir}/generation-#{number}"
56
52
  Dir.mkdir(dir)
57
53
  File.write("#{dir}/structure_version.txt", "#{major}.#{minor}")
@@ -113,7 +109,8 @@ describe AdminTools::ServerInstance do
113
109
  @process1 = spawn_process
114
110
  @process2 = spawn_process
115
111
 
116
- dir1 = create_instance_dir(@process1.pid, DIR_STRUCTURE_MAJOR_VERSION, DIR_STRUCTURE_MINOR_VERSION + 1)
112
+ dir1 = create_instance_dir(@process1.pid, SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION,
113
+ SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION + 1)
117
114
  create_generation(dir1)
118
115
  dir2 = create_instance_dir(@process2.pid)
119
116
  create_generation(dir2)
@@ -133,8 +130,8 @@ describe AdminTools::ServerInstance do
133
130
  @process1 = spawn_process
134
131
  @process2 = spawn_process
135
132
  dir1 = create_instance_dir(@process1.pid)
136
- create_generation(dir1, 0, GENERATION_STRUCTURE_MAJOR_VERSION)
137
- create_generation(dir1, 1, GENERATION_STRUCTURE_MAJOR_VERSION + 1)
133
+ create_generation(dir1, 0, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION)
134
+ create_generation(dir1, 1, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION + 1)
138
135
  dir2 = create_instance_dir(@process2.pid)
139
136
  create_generation(dir2)
140
137
 
@@ -147,8 +144,9 @@ describe AdminTools::ServerInstance do
147
144
  @process1 = spawn_process
148
145
  @process2 = spawn_process
149
146
  dir1 = create_instance_dir(@process1.pid)
150
- create_generation(dir1, 0, GENERATION_STRUCTURE_MAJOR_VERSION)
151
- create_generation(dir1, 1, GENERATION_STRUCTURE_MAJOR_VERSION + 1, GENERATION_STRUCTURE_MINOR_VERSION + 1)
147
+ create_generation(dir1, 0, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION)
148
+ create_generation(dir1, 1, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION + 1,
149
+ SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION + 1)
152
150
  dir2 = create_instance_dir(@process2.pid)
153
151
  create_generation(dir2)
154
152
 
@@ -187,7 +185,7 @@ describe AdminTools::ServerInstance do
187
185
 
188
186
  it "doesn't clean up server instance directories for which the major structure version is different" do
189
187
  process1 = spawn_process
190
- dir1 = create_instance_dir(process1.pid, DIR_STRUCTURE_MAJOR_VERSION + 1)
188
+ dir1 = create_instance_dir(process1.pid, SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION + 1)
191
189
  create_generation(dir1)
192
190
  Process.kill('KILL', process1.pid) rescue nil
193
191
  process1.close
@@ -200,7 +198,7 @@ describe AdminTools::ServerInstance do
200
198
 
201
199
  it "doesn't clean up server instance directories for which the major structure version is the same but the minor structure version is larger" do
202
200
  process1 = spawn_process
203
- dir1 = create_instance_dir(process1.pid, DIR_STRUCTURE_MAJOR_VERSION, DIR_STRUCTURE_MINOR_VERSION + 1)
201
+ dir1 = create_instance_dir(process1.pid, SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION, SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION + 1)
204
202
  create_generation(dir1)
205
203
  Process.kill('KILL', process1.pid) rescue nil
206
204
  process1.close
@@ -214,7 +212,7 @@ describe AdminTools::ServerInstance do
214
212
  it "doesn't clean up server instance directories for which the latest generation has a different major version" do
215
213
  process1 = spawn_process
216
214
  dir1 = create_instance_dir(process1.pid)
217
- create_generation(dir1, 0, GENERATION_STRUCTURE_MAJOR_VERSION + 1)
215
+ create_generation(dir1, 0, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION + 1)
218
216
  Process.kill('KILL', process1.pid) rescue nil
219
217
  process1.close
220
218
 
@@ -227,7 +225,7 @@ describe AdminTools::ServerInstance do
227
225
  it "doesn't clean up server instance directories for which the latest generation has the same major version but a larger minor version" do
228
226
  process1 = spawn_process
229
227
  dir1 = create_instance_dir(process1.pid)
230
- create_generation(dir1, 0, GENERATION_STRUCTURE_MAJOR_VERSION, GENERATION_STRUCTURE_MINOR_VERSION + 1)
228
+ create_generation(dir1, 0, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION + 1)
231
229
  Process.kill('KILL', process1.pid) rescue nil
232
230
  process1.close
233
231
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3
4
+ version: 4.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-24 00:00:00.000000000 Z
12
+ date: 2013-05-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -161,7 +161,6 @@ files:
161
161
  - lib/phusion_passenger/utils/tmpio.rb
162
162
  - lib/phusion_passenger/utils/unseekable_socket.rb
163
163
  - lib/phusion_passenger/utils.rb
164
- - lib/phusion_passenger/wsgi/request_handler.py
165
164
  - bin/passenger
166
165
  - bin/passenger-config
167
166
  - bin/passenger-install-apache2-module
@@ -216,6 +215,7 @@ files:
216
215
  - doc/images/spawn_server_architecture.svg
217
216
  - doc/images/typical_isolated_web_application.png
218
217
  - doc/images/typical_isolated_web_application.svg
218
+ - doc/Packaging.html
219
219
  - doc/Packaging.txt.md
220
220
  - doc/Security of user switching support.html
221
221
  - doc/Security of user switching support.idmap.txt
@@ -396,6 +396,7 @@ files:
396
396
  - ext/common/Utils.h
397
397
  - ext/common/Utils/CachedFileStat.hpp
398
398
  - ext/common/ApplicationPool2/README.md
399
+ - ext/common/Constants.h.erb
399
400
  - ext/apache2/Bucket.cpp
400
401
  - ext/apache2/Configuration.cpp
401
402
  - ext/apache2/Hooks.cpp