passenger 6.1.4 → 6.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +6 -1
- data/Rakefile +1 -1
- data/build/agent.rb +15 -15
- data/build/apache2.rb +18 -18
- data/build/basics.rb +1 -1
- data/build/common_library.rb +21 -20
- data/build/cxx_tests.rb +19 -19
- data/build/integration_tests.rb +3 -3
- data/build/misc.rb +10 -9
- data/build/nginx.rb +12 -12
- data/build/oxt_tests.rb +7 -7
- data/build/packaging.rb +11 -11
- data/build/ruby_extension.rb +3 -3
- data/build/ruby_tests.rb +1 -1
- data/build/schema_printer.rb +13 -13
- data/build/support/cplusplus.rb +8 -8
- data/build/support/cxx_dependency_map.rb +622 -622
- data/build/support/general.rb +0 -1
- data/build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser/parser.rb +4 -4
- data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/builder.rb +1 -1
- data/build/test_basics.rb +4 -4
- data/dev/colorize-logs +6 -6
- data/dev/copy_boost_headers +8 -8
- data/dev/index_cxx_dependencies.rb +6 -6
- data/dev/install_scripts_bootstrap_code.rb +4 -4
- data/dev/list_tests +2 -2
- data/dev/nginx_version_sha256 +2 -2
- data/dev/parse_file_descriptor_log +1 -1
- data/passenger.gemspec +4 -4
- data/src/agent/Core/Config.h +1 -1
- data/src/agent/Core/Controller/Config.h +1 -1
- data/src/agent/Watchdog/Config.h +1 -1
- data/src/cxx_supportlib/Constants.h +1 -1
- data/src/helper-scripts/backtrace-sanitizer.rb +2 -2
- data/src/helper-scripts/download_binaries/extconf.rb +8 -8
- data/src/helper-scripts/meteor-loader.rb +39 -39
- data/src/helper-scripts/rack-loader.rb +1 -0
- data/src/helper-scripts/rack-preloader.rb +2 -1
- data/src/ruby_native_extension/extconf.rb +27 -28
- data/src/ruby_supportlib/phusion_passenger/abstract_installer.rb +27 -27
- data/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb +5 -4
- data/src/ruby_supportlib/phusion_passenger/admin_tools/instance_registry.rb +9 -8
- data/src/ruby_supportlib/phusion_passenger/admin_tools/memory_stats.rb +24 -24
- data/src/ruby_supportlib/phusion_passenger/admin_tools.rb +5 -5
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +526 -526
- data/src/ruby_supportlib/phusion_passenger/apache2/config_utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/common_library.rb +105 -105
- data/src/ruby_supportlib/phusion_passenger/config/about_command.rb +5 -5
- data/src/ruby_supportlib/phusion_passenger/config/agent_compiler.rb +7 -6
- data/src/ruby_supportlib/phusion_passenger/config/api_call_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/compile_agent_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/compile_nginx_engine_command.rb +5 -5
- data/src/ruby_supportlib/phusion_passenger/config/detach_process_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/download_agent_command.rb +17 -17
- data/src/ruby_supportlib/phusion_passenger/config/download_nginx_engine_command.rb +18 -18
- data/src/ruby_supportlib/phusion_passenger/config/install_agent_command.rb +10 -10
- data/src/ruby_supportlib/phusion_passenger/config/install_standalone_runtime_command.rb +12 -12
- data/src/ruby_supportlib/phusion_passenger/config/installation_utils.rb +24 -23
- data/src/ruby_supportlib/phusion_passenger/config/main.rb +26 -26
- data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +5 -4
- data/src/ruby_supportlib/phusion_passenger/config/reopen_logs_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/restart_app_command.rb +4 -4
- data/src/ruby_supportlib/phusion_passenger/config/system_properties_command.rb +14 -13
- data/src/ruby_supportlib/phusion_passenger/config/utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/validate_install_command.rb +34 -33
- data/src/ruby_supportlib/phusion_passenger/console_text_template.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/debug_logging.rb +2 -2
- data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +35 -36
- data/src/ruby_supportlib/phusion_passenger/message_channel.rb +17 -16
- data/src/ruby_supportlib/phusion_passenger/message_client.rb +5 -4
- data/src/ruby_supportlib/phusion_passenger/native_support.rb +42 -42
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +548 -548
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +6 -6
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +85 -84
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache_detector.rb +13 -13
- data/src/ruby_supportlib/phusion_passenger/platform_info/binary_compatibility.rb +5 -5
- data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +65 -65
- data/src/ruby_supportlib/phusion_passenger/platform_info/crypto.rb +6 -6
- data/src/ruby_supportlib/phusion_passenger/platform_info/curl.rb +5 -5
- data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +10 -10
- data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck.rb +6 -5
- data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/apache2.rb +7 -7
- data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/libs.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/ruby.rb +7 -7
- data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/utilities.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/linux.rb +14 -13
- data/src/ruby_supportlib/phusion_passenger/platform_info/networking.rb +27 -26
- data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +16 -16
- data/src/ruby_supportlib/phusion_passenger/platform_info/pcre.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb +29 -28
- data/src/ruby_supportlib/phusion_passenger/platform_info/zlib.rb +2 -2
- data/src/ruby_supportlib/phusion_passenger/platform_info.rb +37 -36
- data/src/ruby_supportlib/phusion_passenger/plugin.rb +3 -3
- data/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb +16 -15
- data/src/ruby_supportlib/phusion_passenger/public_api.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/rack/handler.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/rack/out_of_band_gc.rb +5 -4
- data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +8 -7
- data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +9 -11
- data/src/ruby_supportlib/phusion_passenger/request_handler.rb +27 -26
- data/src/ruby_supportlib/phusion_passenger/ruby_core_enhancements.rb +6 -5
- data/src/ruby_supportlib/phusion_passenger/ruby_core_io_enhancements.rb +7 -6
- data/src/ruby_supportlib/phusion_passenger/standalone/app_finder.rb +13 -13
- data/src/ruby_supportlib/phusion_passenger/standalone/command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +351 -351
- data/src/ruby_supportlib/phusion_passenger/standalone/main.rb +11 -11
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +13 -14
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +21 -23
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +4 -4
- data/src/ruby_supportlib/phusion_passenger/standalone/status_command.rb +5 -5
- data/src/ruby_supportlib/phusion_passenger/standalone/stop_command.rb +6 -6
- data/src/ruby_supportlib/phusion_passenger/standalone/version_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/download.rb +12 -11
- data/src/ruby_supportlib/phusion_passenger/utils/file_system_watcher.rb +9 -9
- data/src/ruby_supportlib/phusion_passenger/utils/hosts_file_parser.rb +8 -7
- data/src/ruby_supportlib/phusion_passenger/utils/json.rb +7 -6
- data/src/ruby_supportlib/phusion_passenger/utils/native_support_utils.rb +4 -4
- data/src/ruby_supportlib/phusion_passenger/utils/progress_bar.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/shellwords.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/strscan.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/utils/tee_input.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/utils/terminal_choice_menu.rb +13 -12
- data/src/ruby_supportlib/phusion_passenger/utils/tmpio.rb +2 -3
- data/src/ruby_supportlib/phusion_passenger/utils/unseekable_socket.rb +7 -7
- data/src/ruby_supportlib/phusion_passenger/utils.rb +17 -16
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/app.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/gdb_controller.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/lldb_controller.rb +2 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/utils.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +13 -13
- data/src/ruby_supportlib/phusion_passenger.rb +23 -22
- metadata +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
+
|
|
2
3
|
# Phusion Passenger - https://www.phusionpassenger.com/
|
|
3
4
|
# Copyright (c) 2014-2025 Asynchronous B.V.
|
|
4
5
|
#
|
|
@@ -75,11 +76,11 @@ module PhusionPassenger
|
|
|
75
76
|
|
|
76
77
|
private
|
|
77
78
|
def self.create_default_options
|
|
78
|
-
|
|
79
|
-
:
|
|
80
|
-
:
|
|
81
|
-
:
|
|
82
|
-
:
|
|
79
|
+
{
|
|
80
|
+
auto: !STDIN.tty?,
|
|
81
|
+
validate_passenger: true,
|
|
82
|
+
colors: STDOUT.tty?,
|
|
83
|
+
summary: true,
|
|
83
84
|
}
|
|
84
85
|
end
|
|
85
86
|
|
|
@@ -180,7 +181,7 @@ module PhusionPassenger
|
|
|
180
181
|
|
|
181
182
|
menu = Utils::TerminalChoiceMenu.new([
|
|
182
183
|
"#{SHORT_PROGRAM_NAME} itself",
|
|
183
|
-
"Apache"
|
|
184
|
+
"Apache",
|
|
184
185
|
])
|
|
185
186
|
menu["#{SHORT_PROGRAM_NAME} itself"].checked = @options[:validate_passenger]
|
|
186
187
|
menu["Apache"].checked = @options[:validate_apache2]
|
|
@@ -213,7 +214,7 @@ module PhusionPassenger
|
|
|
213
214
|
check_ok
|
|
214
215
|
else
|
|
215
216
|
check_warning
|
|
216
|
-
suggest %Q
|
|
217
|
+
suggest %Q(
|
|
217
218
|
Please add #{PhusionPassenger.bin_dir} to PATH.
|
|
218
219
|
Otherwise you will get "command not found" errors upon running
|
|
219
220
|
any Passenger commands.
|
|
@@ -221,7 +222,7 @@ module PhusionPassenger
|
|
|
221
222
|
Learn more at about PATH at:
|
|
222
223
|
|
|
223
224
|
https://www.phusionpassenger.com/library/indepth/environment_variables.html#the-path-environment-variable
|
|
224
|
-
|
|
225
|
+
)
|
|
225
226
|
end
|
|
226
227
|
end
|
|
227
228
|
|
|
@@ -267,7 +268,7 @@ module PhusionPassenger
|
|
|
267
268
|
check_ok
|
|
268
269
|
else
|
|
269
270
|
check_warning
|
|
270
|
-
suggest %Q
|
|
271
|
+
suggest %Q(
|
|
271
272
|
You are currently validating against #{PROGRAM_NAME} #{VERSION_STRING}, located in:
|
|
272
273
|
|
|
273
274
|
#{PhusionPassenger.bin_dir}/passenger
|
|
@@ -279,7 +280,7 @@ module PhusionPassenger
|
|
|
279
280
|
|
|
280
281
|
Please uninstall these other #{SHORT_PROGRAM_NAME} installations to avoid
|
|
281
282
|
confusion or conflicts.
|
|
282
|
-
|
|
283
|
+
)
|
|
283
284
|
end
|
|
284
285
|
end
|
|
285
286
|
|
|
@@ -324,7 +325,7 @@ module PhusionPassenger
|
|
|
324
325
|
exit(INTERNAL_ERROR_CODE)
|
|
325
326
|
end
|
|
326
327
|
elsif detector.results.size > 1
|
|
327
|
-
other_installs = detector.results - [apache2]
|
|
328
|
+
other_installs = detector.results - [ apache2 ]
|
|
328
329
|
|
|
329
330
|
log "<yellow>Multiple Apache installations detected!</yellow>"
|
|
330
331
|
log ""
|
|
@@ -398,7 +399,7 @@ module PhusionPassenger
|
|
|
398
399
|
next_step = "When done, please re-run this program."
|
|
399
400
|
end
|
|
400
401
|
|
|
401
|
-
suggest %Q
|
|
402
|
+
suggest %Q(
|
|
402
403
|
Unable to validate your Apache installation: more software required
|
|
403
404
|
|
|
404
405
|
This program requires the <b>apxs2</b> tool in order to be able to validate your
|
|
@@ -408,7 +409,7 @@ module PhusionPassenger
|
|
|
408
409
|
#{install_instructions}
|
|
409
410
|
|
|
410
411
|
#{next_step}
|
|
411
|
-
|
|
412
|
+
)
|
|
412
413
|
|
|
413
414
|
false
|
|
414
415
|
end
|
|
@@ -419,11 +420,11 @@ module PhusionPassenger
|
|
|
419
420
|
dep = PlatformInfo::Depcheck.find("apache2")
|
|
420
421
|
install_instructions = dep.install_instructions.split("\n").join("\n ")
|
|
421
422
|
|
|
422
|
-
suggest %Q
|
|
423
|
+
suggest %Q(
|
|
423
424
|
Apache is not installed. You can solve this as follows:
|
|
424
425
|
|
|
425
426
|
#{install_instructions}
|
|
426
|
-
|
|
427
|
+
)
|
|
427
428
|
|
|
428
429
|
false
|
|
429
430
|
end
|
|
@@ -435,7 +436,7 @@ module PhusionPassenger
|
|
|
435
436
|
if PlatformInfo.httpd_default_config_file.nil?
|
|
436
437
|
check_error
|
|
437
438
|
passenger_config = "#{PhusionPassenger.bin_dir}/passenger-config"
|
|
438
|
-
suggest %Q
|
|
439
|
+
suggest %Q(
|
|
439
440
|
Your Apache installation might be broken
|
|
440
441
|
|
|
441
442
|
You are about to validate #{PROGRAM_NAME} against the following
|
|
@@ -453,7 +454,7 @@ module PhusionPassenger
|
|
|
453
454
|
#{sudo_s_e}
|
|
454
455
|
export PATH="$ORIG_PATH"
|
|
455
456
|
#{ruby_command} #{passenger_config} --detect-apache2
|
|
456
|
-
|
|
457
|
+
)
|
|
457
458
|
return
|
|
458
459
|
end
|
|
459
460
|
|
|
@@ -463,7 +464,7 @@ module PhusionPassenger
|
|
|
463
464
|
check_error
|
|
464
465
|
|
|
465
466
|
if Process.uid == 0
|
|
466
|
-
suggest %Q
|
|
467
|
+
suggest %Q(
|
|
467
468
|
Permission problems
|
|
468
469
|
|
|
469
470
|
This program must be able to analyze your Apache installation. But it can't
|
|
@@ -479,13 +480,13 @@ module PhusionPassenger
|
|
|
479
480
|
systems, SELinux and AppArmor might be responsible.
|
|
480
481
|
|
|
481
482
|
When you've solved the problem, please re-run this program.
|
|
482
|
-
|
|
483
|
+
)
|
|
483
484
|
else
|
|
484
485
|
whoami = `whoami`.strip
|
|
485
486
|
sudo = PhusionPassenger::PlatformInfo.ruby_sudo_command
|
|
486
487
|
selfcommand = "#{PhusionPassenger.bin_dir}/passenger-config validate-install #{@orig_argv.join(' ')}"
|
|
487
488
|
|
|
488
|
-
suggest %Q
|
|
489
|
+
suggest %Q(
|
|
489
490
|
Permission problems
|
|
490
491
|
|
|
491
492
|
This program must be able to analyze your Apache installation. But it can't
|
|
@@ -500,7 +501,7 @@ module PhusionPassenger
|
|
|
500
501
|
#{sudo_s_e}
|
|
501
502
|
export PATH=\"$ORIG_PATH\"
|
|
502
503
|
#{ruby_command} #{selfcommand}
|
|
503
|
-
|
|
504
|
+
)
|
|
504
505
|
end
|
|
505
506
|
return
|
|
506
507
|
end
|
|
@@ -538,7 +539,7 @@ module PhusionPassenger
|
|
|
538
539
|
check_ok
|
|
539
540
|
else
|
|
540
541
|
check_error
|
|
541
|
-
suggest %Q
|
|
542
|
+
suggest %Q(
|
|
542
543
|
Incorrect #{SHORT_PROGRAM_NAME} module path detected
|
|
543
544
|
|
|
544
545
|
#{PROGRAM_NAME} for Apache requires a 'LoadModule passenger_module'
|
|
@@ -554,28 +555,28 @@ module PhusionPassenger
|
|
|
554
555
|
Please edit the config file and change the directive to this instead:
|
|
555
556
|
|
|
556
557
|
LoadModule passenger_module #{PhusionPassenger.apache2_module_path}
|
|
557
|
-
|
|
558
|
+
)
|
|
558
559
|
end
|
|
559
560
|
elsif occurrences == 0
|
|
560
561
|
if @options[:invoked_from_installer]
|
|
561
562
|
check_warning
|
|
562
|
-
suggest %Q
|
|
563
|
+
suggest %Q(
|
|
563
564
|
You did not specify 'LoadModule passenger_module' in any of your Apache
|
|
564
565
|
configuration files. Please paste the configuration snippet that this
|
|
565
566
|
installer printed earlier, into one of your Apache configuration files, such
|
|
566
567
|
as #{PlatformInfo.httpd_default_config_file}.
|
|
567
|
-
|
|
568
|
+
)
|
|
568
569
|
else
|
|
569
570
|
check_error
|
|
570
571
|
installer_command = "#{PhusionPassenger.bin_dir}/passenger-install-apache2-module"
|
|
571
|
-
suggest %Q
|
|
572
|
+
suggest %Q(
|
|
572
573
|
You did not specify 'LoadModule passenger_module' in any of your
|
|
573
574
|
Apache configuration files. This means that #{PROGRAM_NAME}
|
|
574
575
|
for Apache is not installed or not active. Please run the
|
|
575
576
|
#{PROGRAM_NAME} Apache module installer:
|
|
576
577
|
|
|
577
578
|
#{ruby_command} #{installer_command} --apxs2=#{PlatformInfo.apxs2 || 'none'}
|
|
578
|
-
|
|
579
|
+
)
|
|
579
580
|
end
|
|
580
581
|
else
|
|
581
582
|
check_error
|
|
@@ -614,18 +615,18 @@ module PhusionPassenger
|
|
|
614
615
|
PhusionPassenger.originally_packaged? &&
|
|
615
616
|
PhusionPassenger.build_system_dir =~ /^#{Regexp.escape Gem.dir}\// &&
|
|
616
617
|
File.exist?("#{Gem.bindir}/passenger-config")
|
|
617
|
-
|
|
618
|
+
Gem.bindir
|
|
618
619
|
else
|
|
619
|
-
|
|
620
|
+
nil
|
|
620
621
|
end
|
|
621
622
|
end
|
|
622
623
|
|
|
623
624
|
# Returns the Homebrew bin dir, if Phusion Passenger is installed through Homebrew.
|
|
624
625
|
def homebrew_bindir
|
|
625
626
|
if PhusionPassenger.packaging_method == "homebrew"
|
|
626
|
-
|
|
627
|
+
"/usr/local/bin"
|
|
627
628
|
else
|
|
628
|
-
|
|
629
|
+
nil
|
|
629
630
|
end
|
|
630
631
|
end
|
|
631
632
|
|
|
@@ -721,11 +722,11 @@ module PhusionPassenger
|
|
|
721
722
|
end
|
|
722
723
|
|
|
723
724
|
def unindent(text)
|
|
724
|
-
|
|
725
|
+
PlatformInfo.send(:unindent, text)
|
|
725
726
|
end
|
|
726
727
|
|
|
727
728
|
def reindent(text, level)
|
|
728
|
-
|
|
729
|
+
PlatformInfo.send(:reindent, text, level)
|
|
729
730
|
end
|
|
730
731
|
|
|
731
732
|
def sudo_s_e
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
+
|
|
2
3
|
# Phusion Passenger - https://www.phusionpassenger.com/
|
|
3
4
|
# Copyright (c) 2010-2025 Asynchronous B.V.
|
|
4
5
|
#
|
|
@@ -55,11 +56,11 @@ module PhusionPassenger
|
|
|
55
56
|
|
|
56
57
|
def []=(name, value)
|
|
57
58
|
instance_variable_set("@#{name}".to_sym, value)
|
|
58
|
-
|
|
59
|
+
self
|
|
59
60
|
end
|
|
60
61
|
|
|
61
62
|
def result
|
|
62
|
-
|
|
63
|
+
@template.result(binding)
|
|
63
64
|
end
|
|
64
65
|
end
|
|
65
66
|
|
|
@@ -42,7 +42,7 @@ module PhusionPassenger
|
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def self.log_level
|
|
45
|
-
|
|
45
|
+
@@log_level
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def self.log_level=(level)
|
|
@@ -60,7 +60,7 @@ module PhusionPassenger
|
|
|
60
60
|
end
|
|
61
61
|
|
|
62
62
|
def self._log_device
|
|
63
|
-
|
|
63
|
+
@@log_device
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
def self.stderr_evaluator=(block)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# encoding: binary
|
|
2
|
+
|
|
2
3
|
# Phusion Passenger - https://www.phusionpassenger.com/
|
|
3
4
|
# Copyright (c) 2011-2025 Asynchronous B.V.
|
|
4
5
|
#
|
|
@@ -77,7 +78,7 @@ module PhusionPassenger
|
|
|
77
78
|
|
|
78
79
|
def check_rvm_using_wrapper_script(options)
|
|
79
80
|
ruby = options["ruby"]
|
|
80
|
-
if ruby =~ %r
|
|
81
|
+
if ruby =~ %r{/\.?rvm/} && ruby =~ %r{/bin/ruby$}
|
|
81
82
|
case options["integration_mode"] || DEFAULT_INTEGRATION_MODE
|
|
82
83
|
when "nginx"
|
|
83
84
|
passenger_ruby = "passenger_ruby"
|
|
@@ -91,16 +92,14 @@ module PhusionPassenger
|
|
|
91
92
|
end
|
|
92
93
|
|
|
93
94
|
log_error_to_response_dir(
|
|
94
|
-
:
|
|
95
|
+
summary: "#{passenger_ruby} must be set to an RVM wrapper script instead of a raw Ruby binary",
|
|
95
96
|
|
|
96
|
-
:
|
|
97
|
-
"You've set the <code>#{h passenger_ruby}</code> option to <code>#{h ruby}</code>. " \
|
|
97
|
+
problem_description_html: "You've set the <code>#{h passenger_ruby}</code> option to <code>#{h ruby}</code>. " \
|
|
98
98
|
'However, because you are using RVM, this is not allowed: the option must point to ' \
|
|
99
99
|
'an RVM wrapper script, not a raw Ruby binary. This is because RVM is implemented ' \
|
|
100
100
|
"through various environment variables, which are set through the wrapper script.\n",
|
|
101
101
|
|
|
102
|
-
:
|
|
103
|
-
"To find out the correct value for <code>#{h passenger_ruby}</code>, please read " \
|
|
102
|
+
solution_description_html: "To find out the correct value for <code>#{h passenger_ruby}</code>, please read " \
|
|
104
103
|
"<a href=\"#{h passenger_ruby_doc}\">its documentation entry</a>."
|
|
105
104
|
)
|
|
106
105
|
abort
|
|
@@ -267,15 +266,15 @@ module PhusionPassenger
|
|
|
267
266
|
end
|
|
268
267
|
|
|
269
268
|
def advertise_sockets(_options, request_handler)
|
|
270
|
-
json = { :
|
|
269
|
+
json = { sockets: [] }
|
|
271
270
|
request_handler.server_sockets.each_pair do |name, options|
|
|
272
271
|
concurrency = PhusionPassenger.advertised_concurrency_level || options[:concurrency]
|
|
273
272
|
json[:sockets] << {
|
|
274
|
-
:
|
|
275
|
-
:
|
|
276
|
-
:
|
|
277
|
-
:
|
|
278
|
-
:
|
|
273
|
+
name: name,
|
|
274
|
+
address: options[:address],
|
|
275
|
+
protocol: options[:protocol],
|
|
276
|
+
concurrency: concurrency,
|
|
277
|
+
accept_http_requests: !!options[:accept_http_requests],
|
|
279
278
|
}
|
|
280
279
|
end
|
|
281
280
|
|
|
@@ -581,7 +580,7 @@ module PhusionPassenger
|
|
|
581
580
|
|
|
582
581
|
problem_description = String.new
|
|
583
582
|
|
|
584
|
-
problem_description << %Q
|
|
583
|
+
problem_description << %Q(
|
|
585
584
|
<h2>Bundler was unable to find one of the gems defined in the Gemfile</h2>
|
|
586
585
|
<table class="table table-bordered table-hover problem-causes">
|
|
587
586
|
<thead>
|
|
@@ -591,7 +590,7 @@ module PhusionPassenger
|
|
|
591
590
|
</tr>
|
|
592
591
|
</thead>
|
|
593
592
|
<tbody>
|
|
594
|
-
|
|
593
|
+
)
|
|
595
594
|
|
|
596
595
|
problem_description << %Q{
|
|
597
596
|
<tr class="cause">
|
|
@@ -617,17 +616,17 @@ module PhusionPassenger
|
|
|
617
616
|
</tr>
|
|
618
617
|
}
|
|
619
618
|
|
|
620
|
-
problem_description << %Q
|
|
619
|
+
problem_description << %Q(
|
|
621
620
|
<tr class="cause">
|
|
622
621
|
<td>
|
|
623
622
|
If the necessary gems are installed, but Bundler may not have
|
|
624
623
|
permissions to access them.
|
|
625
|
-
|
|
624
|
+
)
|
|
626
625
|
if bundle_path
|
|
627
|
-
problem_description << %Q
|
|
626
|
+
problem_description << %Q(
|
|
628
627
|
<br>
|
|
629
628
|
<small>Bundler tried to load the gems from <code>#{h bundle_path}</code>.</small>
|
|
630
|
-
|
|
629
|
+
)
|
|
631
630
|
end
|
|
632
631
|
problem_description << %Q{
|
|
633
632
|
</td>
|
|
@@ -737,7 +736,7 @@ module PhusionPassenger
|
|
|
737
736
|
}
|
|
738
737
|
end
|
|
739
738
|
|
|
740
|
-
if ruby =~ %r
|
|
739
|
+
if ruby =~ %r{^/usr/local/rvm/}
|
|
741
740
|
problem_description << %Q{
|
|
742
741
|
<tr class="cause">
|
|
743
742
|
<td>
|
|
@@ -769,14 +768,14 @@ module PhusionPassenger
|
|
|
769
768
|
<li>Login as #{h whoami}.</li>
|
|
770
769
|
}
|
|
771
770
|
if PlatformInfo.rvm_installation_mode == :multi
|
|
772
|
-
problem_description << %Q
|
|
771
|
+
problem_description << %Q(
|
|
773
772
|
<li>
|
|
774
773
|
Enable RVM mixed mode by running:
|
|
775
774
|
<pre>rvm user gemsets</pre>
|
|
776
775
|
</li>
|
|
777
|
-
|
|
776
|
+
)
|
|
778
777
|
end
|
|
779
|
-
problem_description << %Q
|
|
778
|
+
problem_description << %Q(
|
|
780
779
|
<li>
|
|
781
780
|
Run this to find out what to set
|
|
782
781
|
<a href="#{h passenger_ruby_doc}">#{h passenger_ruby}</a> to:
|
|
@@ -786,11 +785,11 @@ module PhusionPassenger
|
|
|
786
785
|
</div>
|
|
787
786
|
</td>
|
|
788
787
|
</tr>
|
|
789
|
-
|
|
788
|
+
)
|
|
790
789
|
end
|
|
791
790
|
|
|
792
791
|
if PlatformInfo.in_rvm?
|
|
793
|
-
problem_description << %Q
|
|
792
|
+
problem_description << %Q(
|
|
794
793
|
<tr class="cause">
|
|
795
794
|
<td>
|
|
796
795
|
The RVM gemset may be broken.
|
|
@@ -801,7 +800,7 @@ module PhusionPassenger
|
|
|
801
800
|
</a>
|
|
802
801
|
</td>
|
|
803
802
|
</tr>
|
|
804
|
-
|
|
803
|
+
)
|
|
805
804
|
end
|
|
806
805
|
|
|
807
806
|
problem_description << %Q{
|
|
@@ -868,7 +867,7 @@ module PhusionPassenger
|
|
|
868
867
|
" setting. The documentation for that setting will teach you how to refer" \
|
|
869
868
|
" to the proper gemset.</p>"
|
|
870
869
|
end
|
|
871
|
-
if ruby =~ %r
|
|
870
|
+
if ruby =~ %r{^/usr/local/rvm/}
|
|
872
871
|
solution_description <<
|
|
873
872
|
"<h3>Is your gem bundle installed to the home directory, while at the same" \
|
|
874
873
|
" time you are using a Ruby that is installed by RVM in a system-wide manner?</h3>" \
|
|
@@ -906,7 +905,7 @@ module PhusionPassenger
|
|
|
906
905
|
|
|
907
906
|
def check_execution_environment_solution_description(passenger_user, passenger_user_doc, bundle_path)
|
|
908
907
|
result = String.new
|
|
909
|
-
result << %Q
|
|
908
|
+
result << %Q(
|
|
910
909
|
<h3>Check the application process's execution environment</h3>
|
|
911
910
|
<p>
|
|
912
911
|
Is the application running under the expected execution environment?
|
|
@@ -916,27 +915,27 @@ module PhusionPassenger
|
|
|
916
915
|
» 'Subprocess' tab and double check all information there — is
|
|
917
916
|
everything as expected?
|
|
918
917
|
</p>
|
|
919
|
-
|
|
918
|
+
)
|
|
920
919
|
if passenger_user
|
|
921
|
-
result << %Q
|
|
920
|
+
result << %Q(
|
|
922
921
|
<p>
|
|
923
922
|
If the application is not supposed to run as <code>#{h whoami}</code>,
|
|
924
923
|
then you can configure this via the
|
|
925
924
|
<a href="#{h passenger_user_doc}">#{h passenger_user}</a>
|
|
926
925
|
setting.
|
|
927
926
|
</p>
|
|
928
|
-
|
|
927
|
+
)
|
|
929
928
|
end
|
|
930
|
-
result << %Q
|
|
929
|
+
result << %Q(
|
|
931
930
|
<h3>Check that the application has permissions to access the directory from which Bundler loads gems</h3>
|
|
932
931
|
<p>
|
|
933
932
|
Please check whether the application, which is running as the
|
|
934
933
|
<code>#{h whoami}</code> user, has permissions to access
|
|
935
|
-
|
|
934
|
+
)
|
|
936
935
|
if bundle_path
|
|
937
|
-
result << %Q
|
|
936
|
+
result << %Q(
|
|
938
937
|
<code>#{h bundle_path}</code>.
|
|
939
|
-
|
|
938
|
+
)
|
|
940
939
|
else
|
|
941
940
|
result << %Q{
|
|
942
941
|
the directory that Bundler tries to load gems from. Unfortunately
|
|
@@ -946,9 +945,9 @@ module PhusionPassenger
|
|
|
946
945
|
can figure out the path for you).
|
|
947
946
|
}
|
|
948
947
|
end
|
|
949
|
-
result << %Q
|
|
948
|
+
result << %Q(
|
|
950
949
|
</p>
|
|
951
|
-
|
|
950
|
+
)
|
|
952
951
|
result
|
|
953
952
|
end
|
|
954
953
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# encoding: binary
|
|
2
|
+
|
|
2
3
|
# Phusion Passenger - https://www.phusionpassenger.com/
|
|
3
4
|
# Copyright (c) 2010-2025 Asynchronous B.V.
|
|
4
5
|
#
|
|
@@ -93,9 +94,9 @@ module PhusionPassenger
|
|
|
93
94
|
offset = delimiter_pos + 1
|
|
94
95
|
delimiter_pos = buffer.index(DELIMITER, offset)
|
|
95
96
|
end
|
|
96
|
-
|
|
97
|
+
message
|
|
97
98
|
rescue Errno::ECONNRESET
|
|
98
|
-
|
|
99
|
+
nil
|
|
99
100
|
end
|
|
100
101
|
|
|
101
102
|
# Read an array message from the underlying file descriptor and return the
|
|
@@ -156,9 +157,9 @@ module PhusionPassenger
|
|
|
156
157
|
offset = delimiter_pos + 1
|
|
157
158
|
delimiter_pos = buffer.index(DELIMITER, offset)
|
|
158
159
|
end
|
|
159
|
-
|
|
160
|
+
result
|
|
160
161
|
rescue Errno::ECONNRESET
|
|
161
|
-
|
|
162
|
+
nil
|
|
162
163
|
end
|
|
163
164
|
|
|
164
165
|
# Read a scalar message from the underlying IO object. Returns the
|
|
@@ -190,7 +191,7 @@ module PhusionPassenger
|
|
|
190
191
|
size = buffer.unpack(UINT32_PACK_FORMAT)[0]
|
|
191
192
|
if size == 0
|
|
192
193
|
buffer.replace('')
|
|
193
|
-
|
|
194
|
+
buffer
|
|
194
195
|
else
|
|
195
196
|
if !max_size.nil? && size > max_size
|
|
196
197
|
raise SecurityError, "Scalar message size (#{size}) " <<
|
|
@@ -209,10 +210,10 @@ module PhusionPassenger
|
|
|
209
210
|
end
|
|
210
211
|
end
|
|
211
212
|
end
|
|
212
|
-
|
|
213
|
+
buffer
|
|
213
214
|
end
|
|
214
215
|
rescue Errno::ECONNRESET
|
|
215
|
-
|
|
216
|
+
nil
|
|
216
217
|
end
|
|
217
218
|
|
|
218
219
|
# Send an array message, which consists of the given elements, over the underlying
|
|
@@ -237,7 +238,7 @@ module PhusionPassenger
|
|
|
237
238
|
raise ArgumentError, 'Message size too large'
|
|
238
239
|
end
|
|
239
240
|
|
|
240
|
-
@io.write([message.size].pack('n') << message)
|
|
241
|
+
@io.write([ message.size ].pack('n') << message)
|
|
241
242
|
@io.flush
|
|
242
243
|
end
|
|
243
244
|
|
|
@@ -246,7 +247,7 @@ module PhusionPassenger
|
|
|
246
247
|
# Might raise SystemCallError, IOError or SocketError when something
|
|
247
248
|
# goes wrong.
|
|
248
249
|
def write_scalar(data)
|
|
249
|
-
@io.write([data.size].pack('N') << data)
|
|
250
|
+
@io.write([ data.size ].pack('N') << data)
|
|
250
251
|
@io.flush
|
|
251
252
|
end
|
|
252
253
|
|
|
@@ -260,7 +261,7 @@ module PhusionPassenger
|
|
|
260
261
|
write("pass IO") if negotiate
|
|
261
262
|
io = @io.recv_io(klass)
|
|
262
263
|
write("got IO") if negotiate
|
|
263
|
-
|
|
264
|
+
io
|
|
264
265
|
end
|
|
265
266
|
|
|
266
267
|
# Send an IO object (a file descriptor) over the channel. The other
|
|
@@ -293,7 +294,7 @@ module PhusionPassenger
|
|
|
293
294
|
result = read
|
|
294
295
|
if !result
|
|
295
296
|
raise EOFError, "End of stream"
|
|
296
|
-
elsif result != ["pass IO"]
|
|
297
|
+
elsif result != [ "pass IO" ]
|
|
297
298
|
raise IOError, "IO passing pre-negotiation header expected"
|
|
298
299
|
else
|
|
299
300
|
@io.send_io(io)
|
|
@@ -306,7 +307,7 @@ module PhusionPassenger
|
|
|
306
307
|
result = read
|
|
307
308
|
if !result
|
|
308
309
|
raise EOFError, "End of stream"
|
|
309
|
-
elsif result != ["got IO"]
|
|
310
|
+
elsif result != [ "got IO" ]
|
|
310
311
|
raise IOError, "IO passing post-negotiation header expected"
|
|
311
312
|
end
|
|
312
313
|
end
|
|
@@ -314,7 +315,7 @@ module PhusionPassenger
|
|
|
314
315
|
|
|
315
316
|
# Return the file descriptor of the underlying IO object.
|
|
316
317
|
def fileno
|
|
317
|
-
|
|
318
|
+
@io.fileno
|
|
318
319
|
end
|
|
319
320
|
|
|
320
321
|
# Close the underlying IO stream. Might raise SystemCallError or
|
|
@@ -325,7 +326,7 @@ module PhusionPassenger
|
|
|
325
326
|
|
|
326
327
|
# Checks whether the underlying IO stream is closed.
|
|
327
328
|
def closed?
|
|
328
|
-
|
|
329
|
+
@io.closed?
|
|
329
330
|
end
|
|
330
331
|
|
|
331
332
|
private
|
|
@@ -337,11 +338,11 @@ module PhusionPassenger
|
|
|
337
338
|
|
|
338
339
|
if defined?(ByteString)
|
|
339
340
|
def new_buffer
|
|
340
|
-
|
|
341
|
+
ByteString.new
|
|
341
342
|
end
|
|
342
343
|
else
|
|
343
344
|
def new_buffer
|
|
344
|
-
|
|
345
|
+
""
|
|
345
346
|
end
|
|
346
347
|
end
|
|
347
348
|
end
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# encoding: binary
|
|
2
|
+
|
|
2
3
|
# Phusion Passenger - https://www.phusionpassenger.com/
|
|
3
4
|
# Copyright (c) 2010-2025 Asynchronous B.V.
|
|
4
5
|
#
|
|
@@ -84,13 +85,13 @@ module PhusionPassenger
|
|
|
84
85
|
end
|
|
85
86
|
|
|
86
87
|
def connected?
|
|
87
|
-
|
|
88
|
+
!!@channel
|
|
88
89
|
end
|
|
89
90
|
|
|
90
91
|
### Low level I/O methods ###
|
|
91
92
|
|
|
92
93
|
def read
|
|
93
|
-
|
|
94
|
+
@channel.read
|
|
94
95
|
rescue
|
|
95
96
|
auto_disconnect
|
|
96
97
|
raise
|
|
@@ -111,14 +112,14 @@ module PhusionPassenger
|
|
|
111
112
|
end
|
|
112
113
|
|
|
113
114
|
def read_scalar
|
|
114
|
-
|
|
115
|
+
@channel.read_scalar
|
|
115
116
|
rescue
|
|
116
117
|
auto_disconnect
|
|
117
118
|
raise
|
|
118
119
|
end
|
|
119
120
|
|
|
120
121
|
def recv_io(klass = IO, negotiate = true)
|
|
121
|
-
|
|
122
|
+
@channel.recv_io(klass, negotiate)
|
|
122
123
|
rescue
|
|
123
124
|
auto_disconnect
|
|
124
125
|
raise
|