passenger 5.0.13 → 5.0.14

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.

checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YWNmODU4ZmM3Zjk1YjliNGU3MWNlZmQyMzNkMmJmMzNkNWU3YzdjMg==
4
+ ZTUyMzc2Mjc1MzllNDY0ZDM0M2I2YjIyNjYxN2U3MTEwNjc4ODNlOQ==
5
5
  data.tar.gz: !binary |-
6
- YjlkZmM4YTUxZWNjMmE2YTY1OTJjZTllMjgwZWFiNmY2MGVlNDJjNw==
6
+ ODVlYTIxYzU5ODRiMDY2YTlmYTk5MGE1ODY0ZTIwNGQzMDkzMWE0NQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDc5YTA5MjRjOTdiZDlkNGIyN2EyZDcxOTFiNzcyYWU5ZjY4OWMyZWQ0YjBj
10
- NmY4ZjMxNzY0ZDIwMDQwOWQ4OWE3NTFlZTZiZGFjNTg3Yzk2ZTQ5MGNkZDI0
11
- MWM0MTBkYWM5NTRhNzYzM2NjMjc1YzMwYmFiYjM2MzI3ODVlNDg=
9
+ ZGYxMGIwZDI1MTZkYjI0MmY2NjgyOTM3ZjUzZjg5YmJmMjZlOWI4YjBlMzgz
10
+ ODEyOGU0NDY3ODA5MmFmZWE1N2U5ZWMzYzY1MTczMGY5ODQ2ZjEwNWMyNjAx
11
+ NGI0YjgxMGY2Yjk5ZjRiMjM2OTgwN2RmOTFkOWRhM2VlMjc1OGM=
12
12
  data.tar.gz: !binary |-
13
- YzJiNmM4Y2FjOTM4ZTk3NDZlYTA3Y2I5MmEzODMyYzQ0Y2QyZDlmNDkzODY3
14
- MTQ2NDRmZTA4YjM5M2I5ZGYyNzE4Mzk0NGNjMWNjZTQwZWVjM2U4Yzc3ZWY0
15
- NTliODY0ZDFmODNlMmMxNDg3MDliYTFjMGFiYTM4N2ZmNmMx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l49RcOk8soj+tgOcUQYOpbyoZ9nlUqCesOvsOr6YnMdcAWh48Ql8=
11
+ =hqMn
12
12
  -----END PGP SIGNATURE-----
data.tar.gz.asc CHANGED
@@ -2,11 +2,11 @@
2
2
  Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
3
3
  Comment: GPGTools - http://gpgtools.org
4
4
 
5
- iQEcBAABAgAGBQJVlbSXAAoJECrHRaUKISqMvv0H/3EdFquHBvaanNXhPdyGC3BJ
6
- N9IgjHe9PrHrrAATNAWOeGeiLzeiusWWm1t4SHfMsTfY7u7YICQBVkMvum/JQiZY
7
- E1ms/79bBHz7oeDq9J5PAlmqXCZZ8KGg3eNlVJm3ASZIydjL+8i0EciQcrDpYiMV
8
- 5daAummZTuS932whowpdIYd0zqdtqIKtlRq6IVYrhPGfSiIDCSjVMEkf4gl1uhKx
9
- hzyGkGPIg4XUKhjPpiddAVlahiWdshDiytxXV4qeholJycXjZYAUL0DxLgkOyU1F
10
- 9yCM2r5uXB/pQpwo+sOFgrjDSUr3zYkO3uMUUogO78rOIgcnJ2WMXZTz/0Oo2TM=
11
- =VV1v
5
+ iQEcBAABAgAGBQJVpfw1AAoJECrHRaUKISqM2AAH/0H0z/5TLWyFnWd3ZipZ5yX/
6
+ Ls373qV5k+PaHBHjHDti7d+/nRXFVXFTxbRRDbxuHvX7s/7o6yuligBKJTG9H5NQ
7
+ JZ4ezdeq03WVzmuLuR/yw3vN1yCm85ouQY94HwTrxK/v6NQJn/qXro/47oDwp2h4
8
+ b0FNsHfSDx2d8t91nyX+MRxdJzQ78d2Q36V/1usRHQcupxxMFd2AkW7KGc+OSaM4
9
+ hREU8tsMgCDBcxTmFEsgwpOa8vGQG835PZvDEXDvw7SflKQhx6GV2lOhHJh5fMWN
10
+ m0qyEdmM8nzfTU8oPI/51oMUAEh9kmWKrpkWrHU9cVdVunjPi9vpoxVOAOTY3WA=
11
+ =NoNs
12
12
  -----END PGP SIGNATURE-----
data/CHANGELOG CHANGED
@@ -1,7 +1,19 @@
1
+ Release 5.0.14
2
+ --------------
3
+
4
+ * [Standalone] Relative path handling has been improved. In previous versions, relative paths were not handled in a consistent manner. Relative paths are now handled consistently according to the following rules:
5
+
6
+ - If a relative path is given via a command line option, then it is relative to the current working directory.
7
+ - If a relative path is given via Passengerfile.json, then it is relative to Passengerfile.json.
8
+
9
+ Closes GH-1557.
10
+ * [Standalone] The `--disable-turbocaching` now works with the Nginx engine.
11
+
12
+
1
13
  Release 5.0.13
2
14
  --------------
3
15
 
4
- * The `passenger-config restart-app` command now supports the option `--ignore-passenger-not-running`. If this option is given, the command will exit normally instead of exiting with an error, if Passenger is not running. This option is useful in deployments involving Passenger Standalone. In an initial deployment, Passenger Standalone may not yet be running. Passenger this option allows you to ignore that issue.
16
+ * The `passenger-config restart-app` command now supports the option `--ignore-passenger-not-running`. If this option is given, the command will exit normally instead of exiting with an error, if Passenger is not running. This option is useful in deployments involving Passenger Standalone. In an initial deployment, Passenger Standalone may not yet be running. Passing this option allows you to ignore that issue.
5
17
  * SELinux policy issues in the RPMs have been fixed.
6
18
  * [Apache] `passenger-config reopen-logs` didn't work on Apache unless you explicitly set `PassengerLogFile`. This has now been fixed.
7
19
  * [Standalone] Due to some internal refactorings, the Passenger Standalone Nginx configuration template has changed. If you used a custom Nginx configuration template, please merge our latest changes into it.
@@ -124,7 +124,7 @@
124
124
 
125
125
  #define PASSENGER_DEFAULT_USER "nobody"
126
126
 
127
- #define PASSENGER_VERSION "5.0.13"
127
+ #define PASSENGER_VERSION "5.0.14"
128
128
 
129
129
  #define POOL_HELPER_THREAD_STACK_SIZE 262144
130
130
 
@@ -30,7 +30,7 @@ module PhusionPassenger
30
30
 
31
31
  PACKAGE_NAME = 'passenger'
32
32
  # Run 'rake ext/common/Constants.h' after changing this number.
33
- VERSION_STRING = '5.0.13'
33
+ VERSION_STRING = '5.0.14'
34
34
 
35
35
  PREFERRED_NGINX_VERSION = '1.8.0'
36
36
  NGINX_SHA256_CHECKSUM = '23cca1239990c818d8f6da118320c4979aadf5386deda691b1b7c2c96b9df3d5'
@@ -52,6 +52,10 @@ module PhusionPassenger
52
52
  end
53
53
  end
54
54
 
55
+ def self.supports_multi?
56
+ false
57
+ end
58
+
55
59
  def initialize(dirs, options = {})
56
60
  @dirs = dirs
57
61
  @options = options.dup
@@ -168,9 +172,11 @@ module PhusionPassenger
168
172
  def determine_mode_and_execution_root(options)
169
173
  @mode = :single
170
174
  if @dirs.empty?
171
- @execution_root = File.absolute_path_no_resolve(".")
172
- else
175
+ @execution_root = Dir.pwd_no_resolve
176
+ elsif @dirs.size == 1
173
177
  @execution_root = File.absolute_path_no_resolve(@dirs[0])
178
+ else
179
+ @execution_root = Dir.pwd_no_resolve
174
180
  end
175
181
  end
176
182
 
@@ -1,5 +1,5 @@
1
1
  # Phusion Passenger - https://www.phusionpassenger.com/
2
- # Copyright (c) 2014 Phusion
2
+ # Copyright (c) 2014-2015 Phusion
3
3
  #
4
4
  # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
5
5
  #
@@ -21,6 +21,8 @@
21
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
22
  # THE SOFTWARE.
23
23
 
24
+ PhusionPassenger.require_passenger_lib 'ruby_core_enhancements'
25
+
24
26
  module PhusionPassenger
25
27
  module Standalone
26
28
 
@@ -79,7 +81,27 @@ module PhusionPassenger
79
81
  config.each_pair do |key, val|
80
82
  result[key.to_sym] = val
81
83
  end
82
- return result
84
+
85
+ resolve_config_file_paths(result, filename)
86
+
87
+ result
88
+ end
89
+
90
+ # Absolutize relative paths. Make them relative to the config file in which
91
+ # it's specified.
92
+ def resolve_config_file_paths(config_file_options, config_filename)
93
+ options = config_file_options
94
+ config_file_dir = File.dirname(File.absolute_path_no_resolve(config_filename))
95
+
96
+ keys = [:socket_file, :ssl_certificate, :ssl_certificate_key, :log_file,
97
+ :pid_file, :instance_registry_dir, :data_buffer_dir, :meteor_app_settings,
98
+ :rackup, :startup_file, :static_files_dir, :restart_dir,
99
+ :nginx_config_template]
100
+ keys.each do |key|
101
+ if filename = options[key]
102
+ options[key] = File.expand_path(filename, config_file_dir)
103
+ end
104
+ end
83
105
  end
84
106
  end
85
107
 
@@ -31,9 +31,21 @@ PhusionPassenger.require_passenger_lib 'utils'
31
31
  PhusionPassenger.require_passenger_lib 'utils/tmpio'
32
32
  PhusionPassenger.require_passenger_lib 'platform_info/ruby'
33
33
 
34
+ # ## Coding notes
35
+ #
36
+ # ### Lazy library loading
37
+ #
34
38
  # We lazy load as many libraries as possible not only to improve startup performance,
35
39
  # but also to ensure that we don't require libraries before we've passed the dependency
36
40
  # checking stage of the runtime installer.
41
+ #
42
+ # ### Path handling
43
+ #
44
+ # Handle paths as follows so that the behavior complies with the documentation:
45
+ # - Immediately absolutize all paths in the option parser, so that relative paths passed
46
+ # through the command line are relative to the current working directory.
47
+ # - Add the path's option key to ConfigUtils#resolve_config_file_paths so that relative
48
+ # paths in Passengerfile.json are absolutized relative to Passengerfile.json.
37
49
 
38
50
  module PhusionPassenger
39
51
  module Standalone
@@ -122,7 +134,7 @@ module PhusionPassenger
122
134
  opts.on("-S", "--socket FILE", String,
123
135
  "Bind to Unix domain socket instead of TCP#{nl}" +
124
136
  "socket") do |value|
125
- options[:socket_file] = value
137
+ options[:socket_file] = File.absolute_path_no_resolve(value)
126
138
  end
127
139
  opts.on("--ssl", "Enable SSL support (Nginx#{nl}" +
128
140
  "engine only)") do
@@ -160,13 +172,11 @@ module PhusionPassenger
160
172
  end
161
173
  opts.on("--instance-registry-dir PATH", String,
162
174
  "Use the given instance registry directory") do |value|
163
- # relative values OK
164
- options[:instance_registry_dir] = value
175
+ options[:instance_registry_dir] = File.absolute_path_no_resolve(value)
165
176
  end
166
177
  opts.on("--data-buffer-dir PATH", String,
167
178
  "Use the given data buffer directory") do |value|
168
- # relative values OK (absolutizePath in Passenger core main)
169
- options[:data_buffer_dir] = value
179
+ options[:data_buffer_dir] = File.absolute_path_no_resolve(value)
170
180
  end
171
181
 
172
182
  opts.separator ""
@@ -186,15 +196,15 @@ module PhusionPassenger
186
196
  opts.on("--python FILENAME", String, "Executable to use for Python apps") do |value|
187
197
  options[:python] = value
188
198
  end
189
- opts.on("--meteor-app-settings FILENAME", String, "Settings file to use for (development mode) Meteor apps") do |value|
190
- options[:meteor_app_settings] = value
199
+ opts.on("--meteor-app-settings FILENAME", String,
200
+ "Settings file to use for (development mode) Meteor apps") do |value|
201
+ options[:meteor_app_settings] = File.absolute_path_no_resolve(value)
191
202
  end
192
203
  opts.on("-R", "--rackup FILE", String,
193
204
  "Consider application a Ruby app, and use#{nl}" +
194
205
  "the given rackup file") do |value|
195
206
  options[:app_type] = "rack"
196
- # relative w.r.t. app dir
197
- options[:startup_file] = value
207
+ options[:startup_file] = File.absolute_path_no_resolve(value)
198
208
  end
199
209
  opts.on("--app-type NAME", String,
200
210
  "Force app to be detected as the given type") do |value|
@@ -202,8 +212,7 @@ module PhusionPassenger
202
212
  end
203
213
  opts.on("--startup-file FILENAME", String,
204
214
  "Force given startup file to be used") do |value|
205
- # relative w.r.t. app dir
206
- options[:startup_file] = value
215
+ options[:startup_file] = File.absolute_path_no_resolve(value)
207
216
  end
208
217
  opts.on("--spawn-method NAME", String,
209
218
  "The spawn method to use. Default: #{DEFAULT_OPTIONS[:spawn_method]}") do |value|
@@ -318,8 +327,7 @@ module PhusionPassenger
318
327
  opts.separator ""
319
328
  opts.separator "Nginx engine options:"
320
329
  opts.on("--nginx-bin FILENAME", String, "Nginx binary to use as core") do |value|
321
- # relative values OK
322
- options[:nginx_bin] = value
330
+ options[:nginx_bin] = File.absolute_path_no_resolve(value)
323
331
  end
324
332
  opts.on("--nginx-version VERSION", String,
325
333
  "Nginx version to use as core.#{nl}" +
@@ -414,9 +422,17 @@ module PhusionPassenger
414
422
  merge(@global_options).
415
423
  merge(@local_options).
416
424
  merge(@parsed_options)
425
+ @options.delete(:config_filename)
417
426
  end
418
427
 
419
428
  def sanity_check_options_and_set_defaults
429
+ if @argv.size > 1
430
+ PhusionPassenger.require_passenger_lib 'standalone/app_finder'
431
+ if !AppFinder.supports_multi?
432
+ abort "You can only specify a single application directory as argument."
433
+ end
434
+ end
435
+
420
436
  if (@options[:address] || @options[:port]) && @options[:socket_file]
421
437
  abort "You cannot specify both --address/--port and --socket. Please choose either one."
422
438
  end
@@ -561,9 +577,6 @@ module PhusionPassenger
561
577
  else
562
578
  options[:log_file] ||= "#{exec_root}/#{log_basename}"
563
579
  end
564
-
565
- options[:log_file] = File.expand_path(options[:log_file], exec_root)
566
- options[:pid_file] = File.expand_path(options[:pid_file], exec_root)
567
580
  end
568
581
 
569
582
  def create_working_dir
@@ -161,8 +161,16 @@ module PhusionPassenger
161
161
  end
162
162
 
163
163
  def nginx_option(nginx_config_name, option_name)
164
- if @options[option_name]
165
- return "#{nginx_config_name} #{@options[option_name]};"
164
+ if @options.has_key?(option_name)
165
+ value = @options[option_name]
166
+ if value.is_a?(String)
167
+ value = "'#{value}'"
168
+ elsif value == true
169
+ value = "on"
170
+ elsif value == false
171
+ value = "off"
172
+ end
173
+ "#{nginx_config_name} #{value};"
166
174
  end
167
175
  end
168
176
 
@@ -65,6 +65,7 @@ http {
65
65
  <%= nginx_option :passenger_min_instances, :min_instances %>
66
66
  <%= nginx_option :passenger_pool_idle_time, :pool_idle_time %>
67
67
  <%= nginx_option :passenger_max_preloader_idle_time, :max_preloader_idle_time %>
68
+ <%= nginx_option :passenger_turbocaching, :turbocaching %>
68
69
  <% if @options[:user] %>
69
70
  passenger_user <%= @options[:user] %>;
70
71
  passenger_default_user <%= @options[:user] %>;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.13
4
+ version: 5.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phusion - http://www.phusion.nl/
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-02 00:00:00.000000000 Z
11
+ date: 2015-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
metadata.gz.asc CHANGED
@@ -2,11 +2,11 @@
2
2
  Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
3
3
  Comment: GPGTools - http://gpgtools.org
4
4
 
5
- iQEcBAABAgAGBQJVlbSXAAoJECrHRaUKISqMi64H/iywK6Kt+04DltbH1fGq/7w1
6
- L3RonHItoOovzPQ7hE31/7STmbOQ2NcV2pMBIRG6Ble4Oywtk2bAPEIGkHCiUg+e
7
- Tq2hAOJwnRZQmO2AqV7Hm1R/Ec75gDwuRsqz7sCSkCm9kMR7LK+G4T4/SFfvlpNf
8
- pxh8aL5B06bvIM2LOE9lxYA6JgpS7aTRDe2WiAoU3vvVOc0QyWCm8aj0AKGn8kKc
9
- KRsZtYkQ64+kReRuFbu/WymDTYXDDVZ1xQiRjaU/2ZD2Xw8giA+/p2WXoSEuy9kk
10
- 2WBtDeMoeVSKMx7mgm/4ZWubOH2KON/OPoDQ20oDD/N8nXQkVKUcrWSPxi5B76I=
11
- =ZTHP
5
+ iQEcBAABAgAGBQJVpfw1AAoJECrHRaUKISqMdgUIAKy+YhJ/5jPmrfbgQikv7w6i
6
+ 0oIP8NPv7Wo213leBFScsYtbt5KLGCFAKRryfCevlzVLRLG/id+cmP/gjoV0T/v/
7
+ cibFLMmbcR+lDzgda9xxsKiG38JmV2wU0QMOKuqfYFNNo5XY3VK8sCOXtlZYX9uw
8
+ p+9ZGJciq7xxd8QhN0zYWdf7vyFHPONYv3cPsaRUGwJAP4ntxz7pa+/0opxbkYxs
9
+ K+IrBNqyGnu8C8RBx0HtzPKfBvA/V9eSrrat3LS+UsB/y+93ZMQKIF1RUx65Hub0
10
+ +s6r+cR5Zs/CtIAproOGHofw+/r7w778kO5n7/IU0Bso5NykUY+712XzGmz2cqA=
11
+ =DFtv
12
12
  -----END PGP SIGNATURE-----