passenger 5.0.0.beta3 → 5.0.0.rc1
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 +8 -8
- checksums.yaml.gz.asc +7 -7
- data.tar.gz.asc +7 -7
- data/.editorconfig +11 -5
- data/CHANGELOG +38 -0
- data/CONTRIBUTING.md +1 -4
- data/Gemfile +0 -1
- data/Gemfile.lock +0 -2
- data/Rakefile +33 -33
- data/bin/passenger +1 -1
- data/bin/passenger-config +1 -1
- data/bin/passenger-install-apache2-module +800 -800
- data/bin/passenger-install-nginx-module +592 -592
- data/bin/passenger-memory-stats +127 -127
- data/bin/passenger-status +216 -216
- data/build/agents.rb +127 -127
- data/build/apache2.rb +87 -87
- data/build/basics.rb +60 -60
- data/build/common_library.rb +165 -165
- data/build/cplusplus_support.rb +51 -51
- data/build/cxx_tests.rb +268 -268
- data/build/debian.rb +143 -143
- data/build/documentation.rb +58 -58
- data/build/integration_tests.rb +81 -81
- data/build/misc.rb +132 -132
- data/build/nginx.rb +20 -20
- data/build/node_tests.rb +7 -7
- data/build/oxt_tests.rb +14 -14
- data/build/packaging.rb +570 -570
- data/build/preprocessor.rb +260 -260
- data/build/rake_extensions.rb +71 -71
- data/build/ruby_extension.rb +29 -29
- data/build/ruby_tests.rb +6 -6
- data/build/test_basics.rb +37 -37
- data/debian.template/control.template +3 -5
- data/dev/copy_boost_headers +134 -134
- data/dev/install_scripts_bootstrap_code.rb +25 -25
- data/dev/list_tests +20 -20
- data/dev/ruby_server.rb +223 -223
- data/dev/runner +18 -18
- data/doc/ServerOptimizationGuide.txt.md +55 -2
- data/doc/Users guide Nginx.txt +0 -26
- data/doc/Users guide Standalone.txt +5 -1
- data/doc/users_guide_snippets/tips.txt +9 -0
- data/ext/common/ApplicationPool2/Group.h +23 -11
- data/ext/common/ApplicationPool2/Implementation.cpp +32 -7
- data/ext/common/ApplicationPool2/Pool.h +22 -17
- data/ext/common/ApplicationPool2/SmartSpawner.h +4 -1
- data/ext/common/ApplicationPool2/Spawner.h +1 -1
- data/ext/common/Constants.h +1 -1
- data/ext/common/agents/Base.cpp +35 -20
- data/ext/common/agents/HelperAgent/Main.cpp +8 -1
- data/ext/common/agents/HelperAgent/OptionParser.h +18 -4
- data/ext/common/agents/HelperAgent/RequestHandler.h +2 -83
- data/ext/common/agents/HelperAgent/RequestHandler/ForwardResponse.cpp +54 -1
- data/ext/common/agents/HelperAgent/RequestHandler/InitRequest.cpp +7 -4
- data/ext/common/agents/Main.cpp +1 -1
- data/ext/common/agents/Watchdog/Main.cpp +54 -19
- data/ext/nginx/Configuration.c +7 -0
- data/ext/nginx/ContentHandler.c +9 -1
- data/helper-scripts/backtrace-sanitizer.rb +106 -87
- data/helper-scripts/crash-watch.rb +32 -0
- data/helper-scripts/download_binaries/extconf.rb +38 -38
- data/helper-scripts/meteor-loader.rb +107 -107
- data/helper-scripts/prespawn +101 -101
- data/helper-scripts/rack-loader.rb +96 -96
- data/helper-scripts/rack-preloader.rb +137 -137
- data/lib/phusion_passenger.rb +292 -292
- data/lib/phusion_passenger/abstract_installer.rb +438 -438
- data/lib/phusion_passenger/active_support3_extensions/init.rb +168 -170
- data/lib/phusion_passenger/admin_tools.rb +20 -20
- data/lib/phusion_passenger/admin_tools/instance.rb +178 -178
- data/lib/phusion_passenger/admin_tools/instance_registry.rb +61 -61
- data/lib/phusion_passenger/admin_tools/memory_stats.rb +267 -267
- data/lib/phusion_passenger/apache2/config_options.rb +182 -182
- data/lib/phusion_passenger/common_library.rb +479 -485
- data/lib/phusion_passenger/config/about_command.rb +161 -161
- data/lib/phusion_passenger/config/admin_command_command.rb +129 -129
- data/lib/phusion_passenger/config/agent_compiler.rb +121 -121
- data/lib/phusion_passenger/config/build_native_support_command.rb +43 -43
- data/lib/phusion_passenger/config/command.rb +25 -25
- data/lib/phusion_passenger/config/compile_agent_command.rb +62 -62
- data/lib/phusion_passenger/config/compile_nginx_engine_command.rb +88 -73
- data/lib/phusion_passenger/config/detach_process_command.rb +72 -72
- data/lib/phusion_passenger/config/download_agent_command.rb +246 -227
- data/lib/phusion_passenger/config/download_nginx_engine_command.rb +245 -224
- data/lib/phusion_passenger/config/install_agent_command.rb +144 -132
- data/lib/phusion_passenger/config/install_standalone_runtime_command.rb +205 -185
- data/lib/phusion_passenger/config/installation_utils.rb +204 -204
- data/lib/phusion_passenger/config/list_instances_command.rb +64 -64
- data/lib/phusion_passenger/config/main.rb +152 -152
- data/lib/phusion_passenger/config/nginx_engine_compiler.rb +319 -300
- data/lib/phusion_passenger/config/reopen_logs_command.rb +67 -67
- data/lib/phusion_passenger/config/restart_app_command.rb +155 -155
- data/lib/phusion_passenger/config/system_metrics_command.rb +13 -13
- data/lib/phusion_passenger/config/utils.rb +95 -95
- data/lib/phusion_passenger/config/validate_install_command.rb +198 -198
- data/lib/phusion_passenger/console_text_template.rb +25 -25
- data/lib/phusion_passenger/constants.rb +90 -90
- data/lib/phusion_passenger/debug_logging.rb +106 -106
- data/lib/phusion_passenger/loader_shared_helpers.rb +447 -432
- data/lib/phusion_passenger/message_channel.rb +312 -312
- data/lib/phusion_passenger/message_client.rb +176 -176
- data/lib/phusion_passenger/native_support.rb +369 -369
- data/lib/phusion_passenger/nginx/config_options.rb +297 -297
- data/lib/phusion_passenger/packaging.rb +131 -131
- data/lib/phusion_passenger/platform_info.rb +360 -360
- data/lib/phusion_passenger/platform_info/apache.rb +767 -767
- data/lib/phusion_passenger/platform_info/apache_detector.rb +199 -199
- data/lib/phusion_passenger/platform_info/binary_compatibility.rb +107 -107
- data/lib/phusion_passenger/platform_info/compiler.rb +570 -570
- data/lib/phusion_passenger/platform_info/curl.rb +32 -32
- data/lib/phusion_passenger/platform_info/cxx_portability.rb +188 -188
- data/lib/phusion_passenger/platform_info/depcheck.rb +372 -372
- data/lib/phusion_passenger/platform_info/depcheck_specs/apache2.rb +109 -109
- data/lib/phusion_passenger/platform_info/depcheck_specs/compiler_toolchain.rb +4 -4
- data/lib/phusion_passenger/platform_info/depcheck_specs/gems.rb +10 -34
- data/lib/phusion_passenger/platform_info/depcheck_specs/libs.rb +101 -101
- data/lib/phusion_passenger/platform_info/depcheck_specs/ruby.rb +5 -5
- data/lib/phusion_passenger/platform_info/depcheck_specs/utilities.rb +13 -13
- data/lib/phusion_passenger/platform_info/linux.rb +55 -55
- data/lib/phusion_passenger/platform_info/operating_system.rb +149 -149
- data/lib/phusion_passenger/platform_info/ruby.rb +468 -448
- data/lib/phusion_passenger/platform_info/zlib.rb +9 -9
- data/lib/phusion_passenger/plugin.rb +66 -66
- data/lib/phusion_passenger/preloader_shared_helpers.rb +126 -126
- data/lib/phusion_passenger/public_api.rb +191 -191
- data/lib/phusion_passenger/rack/out_of_band_gc.rb +93 -94
- data/lib/phusion_passenger/rack/thread_handler_extension.rb +231 -227
- data/lib/phusion_passenger/request_handler.rb +567 -577
- data/lib/phusion_passenger/request_handler/thread_handler.rb +379 -381
- data/lib/phusion_passenger/ruby_core_enhancements.rb +86 -86
- data/lib/phusion_passenger/ruby_core_io_enhancements.rb +74 -74
- data/lib/phusion_passenger/simple_benchmarking.rb +25 -25
- data/lib/phusion_passenger/standalone/app_finder.rb +153 -150
- data/lib/phusion_passenger/standalone/command.rb +44 -40
- data/lib/phusion_passenger/standalone/config_utils.rb +53 -53
- data/lib/phusion_passenger/standalone/control_utils.rb +38 -59
- data/lib/phusion_passenger/standalone/main.rb +73 -73
- data/lib/phusion_passenger/standalone/start_command.rb +697 -685
- data/lib/phusion_passenger/standalone/start_command/builtin_engine.rb +193 -155
- data/lib/phusion_passenger/standalone/start_command/nginx_engine.rb +162 -133
- data/lib/phusion_passenger/standalone/status_command.rb +64 -64
- data/lib/phusion_passenger/standalone/stop_command.rb +72 -72
- data/lib/phusion_passenger/standalone/version_command.rb +9 -9
- data/lib/phusion_passenger/union_station/connection.rb +32 -32
- data/lib/phusion_passenger/union_station/core.rb +251 -251
- data/lib/phusion_passenger/union_station/transaction.rb +126 -126
- data/lib/phusion_passenger/utils.rb +199 -167
- data/lib/phusion_passenger/utils/ansi_colors.rb +128 -128
- data/lib/phusion_passenger/utils/download.rb +196 -196
- data/lib/phusion_passenger/utils/file_system_watcher.rb +158 -158
- data/lib/phusion_passenger/utils/hosts_file_parser.rb +101 -101
- data/lib/phusion_passenger/utils/lock.rb +31 -31
- data/lib/phusion_passenger/utils/native_support_utils.rb +31 -31
- data/lib/phusion_passenger/utils/progress_bar.rb +26 -26
- data/lib/phusion_passenger/utils/shellwords.rb +20 -20
- data/lib/phusion_passenger/utils/terminal_choice_menu.rb +206 -206
- data/lib/phusion_passenger/utils/unseekable_socket.rb +272 -272
- data/lib/phusion_passenger/vendor/crash_watch/app.rb +129 -0
- data/lib/phusion_passenger/vendor/crash_watch/gdb_controller.rb +341 -0
- data/lib/phusion_passenger/vendor/crash_watch/version.rb +24 -0
- data/lib/phusion_passenger/vendor/daemon_controller.rb +877 -0
- data/lib/phusion_passenger/vendor/daemon_controller/lock_file.rb +127 -0
- data/lib/phusion_passenger/vendor/daemon_controller/spawn.rb +26 -0
- data/lib/phusion_passenger/vendor/daemon_controller/version.rb +29 -0
- data/packaging/rpm/passenger_spec/passenger.spec.template +0 -1
- data/passenger.gemspec +0 -1
- data/resources/templates/config/nginx_engine_compiler/possible_solutions_for_download_and_extraction_problems.txt.erb +27 -0
- data/resources/templates/standalone/config.erb +19 -15
- data/test/integration_tests/apache2_tests.rb +566 -566
- data/test/integration_tests/downloaded_binaries_tests.rb +126 -125
- data/test/integration_tests/native_packaging_spec.rb +296 -296
- data/test/integration_tests/nginx_tests.rb +393 -393
- data/test/integration_tests/shared/example_webapp_tests.rb +282 -280
- data/test/integration_tests/source_packaging_test.rb +138 -138
- data/test/integration_tests/spec_helper.rb +5 -5
- data/test/integration_tests/standalone_tests.rb +367 -367
- data/test/ruby/debug_logging_spec.rb +133 -133
- data/test/ruby/message_channel_spec.rb +186 -186
- data/test/ruby/rack/loader_spec.rb +28 -28
- data/test/ruby/rack/preloader_spec.rb +34 -34
- data/test/ruby/rails3.0/loader_spec.rb +12 -12
- data/test/ruby/rails3.0/preloader_spec.rb +18 -18
- data/test/ruby/rails3.1/loader_spec.rb +12 -12
- data/test/ruby/rails3.1/preloader_spec.rb +18 -18
- data/test/ruby/rails3.2/loader_spec.rb +12 -12
- data/test/ruby/rails3.2/preloader_spec.rb +18 -18
- data/test/ruby/rails4.0/loader_spec.rb +12 -12
- data/test/ruby/rails4.0/preloader_spec.rb +18 -18
- data/test/ruby/rails4.1/loader_spec.rb +12 -12
- data/test/ruby/rails4.1/preloader_spec.rb +18 -18
- data/test/ruby/request_handler_spec.rb +730 -730
- data/test/ruby/shared/loader_sharedspec.rb +224 -224
- data/test/ruby/shared/rails/union_station_extensions_sharedspec.rb +327 -327
- data/test/ruby/shared/ruby_loader_sharedspec.rb +47 -47
- data/test/ruby/spec_helper.rb +65 -65
- data/test/ruby/standalone/runtime_installer_spec.rb +384 -384
- data/test/ruby/union_station_spec.rb +276 -276
- data/test/ruby/utils/file_system_watcher_spec.rb +220 -220
- data/test/ruby/utils/hosts_file_parser.rb +248 -248
- data/test/ruby/utils/tee_input_spec.rb +215 -215
- data/test/ruby/utils/unseekable_socket_spec.rb +57 -57
- data/test/ruby/utils_spec.rb +21 -21
- data/test/stub/rack/config.ru +87 -87
- data/test/stub/rack/library.rb +8 -8
- data/test/stub/rack/start.rb +30 -30
- data/test/support/apache2_controller.rb +191 -191
- data/test/support/nginx_controller.rb +90 -99
- data/test/support/placebo-preloader.rb +57 -57
- data/test/support/test_helper.rb +435 -435
- metadata +11 -21
- metadata.gz.asc +7 -7
- data/lib/phusion_passenger/standalone/command2.rb +0 -292
- data/lib/phusion_passenger/standalone/start2_command.rb +0 -799
- data/resources/templates/standalone/download_tool_missing.txt.erb +0 -18
- data/resources/templates/standalone/possible_solutions_for_download_and_extraction_problems.txt.erb +0 -17
- data/resources/templates/standalone/run_installer_as_root.txt.erb +0 -8
data/build/rake_extensions.rb
CHANGED
@@ -97,91 +97,91 @@ module RakeExtensions
|
|
97
97
|
#
|
98
98
|
# Only the <tt>file</tt> and <tt>target</tt> Rake commands are supported.
|
99
99
|
def subdir(dir, &block)
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
100
|
+
subdir = Subdir.new(dir)
|
101
|
+
Dir.chdir(dir) do
|
102
|
+
subdir.instance_eval(&block)
|
103
|
+
end
|
104
104
|
end
|
105
105
|
|
106
106
|
class Subdir # :nodoc:
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
107
|
+
# Rake 0.9 compatibility since methods like <tt>task<tt> and <tt>desc</tt>
|
108
|
+
# aren't available in Object anymore.
|
109
|
+
# See: https://github.com/jimweirich/rake/issues/33#issuecomment-1213705
|
110
|
+
include Rake::DSL if defined?(Rake::DSL)
|
111
111
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
112
|
+
def initialize(dir)
|
113
|
+
@dir = dir
|
114
|
+
@toplevel_dir = Pathname.getwd
|
115
|
+
end
|
116
116
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
117
|
+
def file(args, &block)
|
118
|
+
case args
|
119
|
+
when String
|
120
|
+
args = mangle_path(args)
|
121
|
+
when Hash
|
122
|
+
target = mangle_path(args.keys[0])
|
123
|
+
sources = mangle_path_or_path_array(args.values[0])
|
124
|
+
args = { target => sources }
|
125
|
+
end
|
126
|
+
Rake::FileTask.define_task(args) do
|
127
|
+
puts "### In #{@dir}:"
|
128
|
+
Dir.chdir(@dir) do
|
129
|
+
Object.class_eval(&block)
|
130
|
+
end
|
131
|
+
puts ""
|
132
|
+
end
|
133
|
+
end
|
134
134
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
135
|
+
def task(*args, &block)
|
136
|
+
if !args.empty? && args[0].is_a?(Hash)
|
137
|
+
target = args[0].keys[0]
|
138
|
+
sources = mangle_path_or_path_array(args[0].values[0])
|
139
|
+
args[0] = { target => sources }
|
140
|
+
end
|
141
|
+
if block_given?
|
142
|
+
Rake::Task.define_task(*args) do
|
143
|
+
puts "### In #{@dir}:"
|
144
|
+
Dir.chdir(@dir) do
|
145
|
+
Object.class_eval(&block)
|
146
|
+
end
|
147
|
+
puts ""
|
148
|
+
end
|
149
|
+
else
|
150
|
+
Rake::Task.define_task(*args)
|
151
|
+
end
|
152
|
+
end
|
153
153
|
|
154
154
|
private
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
155
|
+
def mangle_path(path)
|
156
|
+
path = File.expand_path(path)
|
157
|
+
return Pathname.new(path).relative_path_from(@toplevel_dir).to_s
|
158
|
+
end
|
159
159
|
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
160
|
+
def mangle_path_array(array)
|
161
|
+
array = array.dup
|
162
|
+
array.each_with_index do |item, i|
|
163
|
+
if item.is_a?(String)
|
164
|
+
array[i] = mangle_path(item)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
return array
|
168
|
+
end
|
169
169
|
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
170
|
+
def mangle_path_or_path_array(item)
|
171
|
+
case item
|
172
|
+
when String
|
173
|
+
return mangle_path(item)
|
174
|
+
when Array
|
175
|
+
return mangle_path_array(item)
|
176
|
+
else
|
177
|
+
return item
|
178
|
+
end
|
179
|
+
end
|
180
180
|
end
|
181
181
|
|
182
182
|
end # module RakeExtensions
|
183
183
|
|
184
184
|
Object.class_eval do
|
185
|
-
|
185
|
+
include RakeExtensions
|
186
186
|
end
|
187
187
|
|
data/build/ruby_extension.rb
CHANGED
@@ -22,40 +22,40 @@
|
|
22
22
|
# THE SOFTWARE.
|
23
23
|
|
24
24
|
if !PlatformInfo.passenger_needs_ruby_dev_header?
|
25
|
-
|
25
|
+
NATIVE_SUPPORT_TARGET = nil
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
task :native_support do
|
28
|
+
# Do nothing.
|
29
|
+
end
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
task 'native_support:clean' do
|
32
|
+
# Do nothing.
|
33
|
+
end
|
34
34
|
else
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
35
|
+
output_dir = RUBY_EXTENSION_OUTPUT_DIR
|
36
|
+
output_name = "passenger_native_support.#{LIBEXT}"
|
37
|
+
source_dir = "ext/ruby"
|
38
|
+
NATIVE_SUPPORT_TARGET = File.join(output_dir, output_name)
|
39
39
|
|
40
|
-
|
41
|
-
|
40
|
+
task :native_support => NATIVE_SUPPORT_TARGET
|
41
|
+
task :clean => 'native_support:clean'
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
43
|
+
dependencies = [
|
44
|
+
File.join(output_dir, "Makefile"),
|
45
|
+
"#{source_dir}/passenger_native_support.c"
|
46
|
+
]
|
47
|
+
file(NATIVE_SUPPORT_TARGET => dependencies) do
|
48
|
+
sh "mkdir -p '#{output_dir}'" if !File.exist?(output_dir)
|
49
|
+
sh "cd '#{output_dir}' && make"
|
50
|
+
end
|
51
51
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
52
|
+
file(File.join(output_dir, "Makefile") => "#{source_dir}/extconf.rb") do
|
53
|
+
sh "mkdir -p '#{output_dir}'" if !File.exist?(output_dir)
|
54
|
+
extconf_rb = File.expand_path("#{source_dir}/extconf.rb")
|
55
|
+
sh "cd '#{output_dir}' && #{PlatformInfo.ruby_command} '#{extconf_rb}'"
|
56
|
+
end
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
58
|
+
task 'native_support:clean' do
|
59
|
+
sh "rm -rf #{output_dir}"
|
60
|
+
end
|
61
61
|
end
|
data/build/ruby_tests.rb
CHANGED
@@ -26,10 +26,10 @@
|
|
26
26
|
dependencies = [NATIVE_SUPPORT_TARGET, AGENT_OUTPUT_DIR + AGENT_EXE].compact
|
27
27
|
desc "Run unit tests for the Ruby libraries"
|
28
28
|
task 'test:ruby' => dependencies do
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
if maybe_grep = string_option('E')
|
30
|
+
require 'shellwords'
|
31
|
+
maybe_grep = "-e #{Shellwords.escape(maybe_grep)}"
|
32
|
+
end
|
33
|
+
command = "rspec -c -f s --tty -P 'dont-autoload-anything' #{maybe_grep} ruby/*_spec.rb ruby/*/*_spec.rb"
|
34
|
+
sh "cd test && exec bundle exec #{command}"
|
35
35
|
end
|
data/build/test_basics.rb
CHANGED
@@ -31,53 +31,53 @@ task :test => ['test:oxt', 'test:cxx', 'test:ruby', 'test:node', 'test:integrati
|
|
31
31
|
|
32
32
|
desc "Clean all compiled test files"
|
33
33
|
task 'test:clean' do
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
sh("rm -rf test/oxt/oxt_test_main test/oxt/*.o test/cxx/*.dSYM test/cxx/CxxTestMain")
|
35
|
+
sh("rm -f test/cxx/*.o test/cxx/*/*.o test/cxx/*.gch")
|
36
|
+
sh("rm -f test/support/allocate_memory")
|
37
37
|
end
|
38
38
|
|
39
39
|
task :clean => 'test:clean'
|
40
40
|
|
41
41
|
file 'test/support/allocate_memory' => 'test/support/allocate_memory.c' do
|
42
|
-
|
42
|
+
create_c_executable('test/support/allocate_memory', 'test/support/allocate_memory.c')
|
43
43
|
end
|
44
44
|
|
45
45
|
desc "Install developer dependencies"
|
46
46
|
task 'test:install_deps' do
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
47
|
+
gem_install = PlatformInfo.gem_command + " install --no-rdoc --no-ri"
|
48
|
+
gem_install = "#{PlatformInfo.ruby_sudo_command} #{gem_install}" if boolean_option('SUDO')
|
49
|
+
default = boolean_option('DEVDEPS_DEFAULT', true)
|
50
|
+
install_base_deps = boolean_option('BASE_DEPS', default)
|
51
|
+
install_doctools = boolean_option('DOCTOOLS', default)
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
53
|
+
if deps_target = string_option('DEPS_TARGET')
|
54
|
+
bundle_args = " --path #{deps_target}"
|
55
|
+
end
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
if !PlatformInfo.locate_ruby_tool('bundle')
|
58
|
+
sh "#{gem_install} bundler"
|
59
|
+
end
|
60
60
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
61
|
+
if install_base_deps && install_doctools
|
62
|
+
sh "bundle install #{bundle_args} --without="
|
63
|
+
else
|
64
|
+
if install_base_deps
|
65
|
+
sh "bundle install #{bundle_args} --without doc"
|
66
|
+
end
|
67
|
+
if install_doctools
|
68
|
+
sh "bundle install #{bundle_args} --without base"
|
69
|
+
end
|
70
|
+
end
|
71
|
+
if boolean_option('RAILS_BUNDLES', default)
|
72
|
+
sh "cd test/stub/rails3.0 && bundle install #{bundle_args}"
|
73
|
+
sh "cd test/stub/rails3.1 && bundle install #{bundle_args}"
|
74
|
+
sh "cd test/stub/rails3.2 && bundle install #{bundle_args}"
|
75
|
+
if RUBY_VERSION >= '1.9'
|
76
|
+
sh "cd test/stub/rails4.0 && bundle install #{bundle_args}"
|
77
|
+
sh "cd test/stub/rails4.1 && bundle install #{bundle_args}"
|
78
|
+
end
|
79
|
+
end
|
80
|
+
if boolean_option('NODE_MODULES', default)
|
81
|
+
sh "npm install"
|
82
|
+
end
|
83
83
|
end
|
@@ -31,13 +31,11 @@ Depends: ${shlibs:Depends}, ${misc:Depends},
|
|
31
31
|
ruby2.4 | ruby2.3 | ruby2.2 | ruby2.1 | ruby2.0 | ruby1.9.1 | ruby1.8 | ruby-interpreter,
|
32
32
|
rubygems-integration (>= 1.8) | rubygems1.9.1 | rubygems1.9 | rubygems (>= 1.2),
|
33
33
|
#if is_distribution?('<= lucid') || is_distribution?('<= squeeze')
|
34
|
-
librack-ruby
|
34
|
+
librack-ruby
|
35
35
|
#else
|
36
|
-
ruby-rack
|
36
|
+
ruby-rack
|
37
37
|
#endif
|
38
|
-
|
39
|
-
Recommends: passenger-doc (= ${binary:Version}), passenger-dev (= ${binary:Version}),
|
40
|
-
crash-watch
|
38
|
+
Recommends: passenger-doc (= ${binary:Version}), passenger-dev (= ${binary:Version})
|
41
39
|
Breaks: libapache2-mod-passenger (<< <%= DEBIAN_EPOCH %>:<%= PACKAGE_VERSION %>), passenger-common,
|
42
40
|
passenger-common1.8, passenger-common1.9.1, ruby-passenger
|
43
41
|
Replaces: libapache2-mod-passenger (<< <%= DEBIAN_EPOCH %>:<%= PACKAGE_VERSION %>), passenger-common,
|
data/dev/copy_boost_headers
CHANGED
@@ -23,62 +23,62 @@
|
|
23
23
|
# THE SOFTWARE.
|
24
24
|
|
25
25
|
ESSENTIALS = [
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
26
|
+
"boost/detail/{limits,endian}.hpp",
|
27
|
+
"boost/config",
|
28
|
+
"boost/mpl",
|
29
|
+
"boost/preprocessor/stringize.hpp",
|
30
|
+
"boost/smart_ptr/detail/sp_counted_*",
|
31
|
+
"boost/smart_ptr/detail/atomic_count*",
|
32
|
+
"boost/smart_ptr/detail/spinlock*",
|
33
|
+
"boost/atomic",
|
34
|
+
"boost/pool",
|
35
|
+
"boost/unordered*",
|
36
|
+
"boost/thread",
|
37
|
+
"boost/intrusive",
|
38
|
+
"boost/heap",
|
39
|
+
"boost/container",
|
40
|
+
"libs/thread/src",
|
41
|
+
"libs/system/src",
|
42
|
+
"libs/regex/src",
|
43
|
+
"boost/preprocessor",
|
44
|
+
"boost/parameter",
|
45
|
+
"boost/date_time/gregorian/formatters_limited.hpp",
|
46
|
+
"boost/date_time/date_formatting_limited.hpp",
|
47
|
+
"boost/type_traits/make_signed.hpp",
|
48
|
+
"boost/type_traits/detail/*",
|
49
|
+
"boost/non_type.hpp",
|
50
|
+
"boost/detail/fenv.hpp",
|
51
|
+
"boost/foreach.hpp",
|
52
|
+
"boost/*regex*"
|
53
53
|
]
|
54
54
|
EXCLUDE = [
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
55
|
+
"libs/thread/src/win32/*",
|
56
|
+
"libs/regex/src/w32_regex_traits.cpp",
|
57
|
+
"libs/regex/src/fileiter.cpp",
|
58
|
+
"libs/regex/src/icu.cpp",
|
59
|
+
"libs/regex/src/usinstances.cpp",
|
60
|
+
"boost/atomic/detail/windows.hpp",
|
61
|
+
"boost/regex/icu.hpp"
|
62
62
|
]
|
63
63
|
PROGRAM_SOURCE = %q{
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
64
|
+
#include <boost/shared_ptr.hpp>
|
65
|
+
#include <boost/shared_array.hpp>
|
66
|
+
#include <boost/weak_ptr.hpp>
|
67
|
+
#include <boost/make_shared.hpp>
|
68
|
+
#include <boost/enable_shared_from_this.hpp>
|
69
|
+
#include <boost/intrusive_ptr.hpp>
|
70
|
+
#include <boost/thread.hpp>
|
71
|
+
#include <boost/noncopyable.hpp>
|
72
|
+
#include <boost/function.hpp>
|
73
|
+
#include <boost/bind.hpp>
|
74
|
+
#include <boost/container/vector.hpp>
|
75
|
+
#include <boost/heap/d_ary_heap.hpp>
|
76
|
+
#include <boost/date_time/posix_time/posix_time.hpp>
|
77
|
+
#include <boost/foreach.hpp>
|
78
|
+
#include <boost/unordered_map.hpp>
|
79
|
+
#include <boost/cregex.hpp>
|
80
|
+
#include <boost/regex.hpp>
|
81
|
+
#include <boost/pool/object_pool.hpp>
|
82
82
|
}
|
83
83
|
|
84
84
|
require 'fileutils'
|
@@ -87,110 +87,110 @@ Dir.chdir(File.dirname(__FILE__) + "/../ext")
|
|
87
87
|
|
88
88
|
# Run the given command, and abort on error.
|
89
89
|
def sh(*command)
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
90
|
+
puts command.join(" ")
|
91
|
+
if !system(*command)
|
92
|
+
puts "*** ERROR"
|
93
|
+
exit 1
|
94
|
+
end
|
95
95
|
end
|
96
96
|
|
97
97
|
def install(source_filename, target_filename)
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
98
|
+
dir = File.dirname(target_filename)
|
99
|
+
if !File.exist?(dir)
|
100
|
+
sh "mkdir", "-p", dir
|
101
|
+
end
|
102
|
+
command = ["install", "-m", "u+rw,g+r,o+r", source_filename, target_filename]
|
103
|
+
sh(*command)
|
104
104
|
end
|
105
105
|
|
106
106
|
def copy_boost_files(patterns, exclude = nil)
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
107
|
+
patterns.each do |pattern|
|
108
|
+
files = Dir["#{BOOST_DIR}/#{pattern}"]
|
109
|
+
files -= exclude if exclude
|
110
|
+
files.each do |source|
|
111
|
+
if File.directory?(source)
|
112
|
+
source.slice!(0 .. BOOST_DIR.size)
|
113
|
+
copy_boost_files(["#{source}/*"], exclude)
|
114
|
+
else
|
115
|
+
target = source.slice(BOOST_DIR.size + 1 .. source.size - 1)
|
116
|
+
if target =~ /^libs\//
|
117
|
+
target = "boost/#{target}"
|
118
|
+
end
|
119
|
+
if !File.exist?(target)
|
120
|
+
install(source, target)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
125
|
end
|
126
126
|
|
127
127
|
def copy_essential_files
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
128
|
+
exclude = []
|
129
|
+
EXCLUDE.each do |pattern|
|
130
|
+
exclude.concat(Dir["#{BOOST_DIR}/#{pattern}"])
|
131
|
+
end
|
132
|
+
copy_boost_files(ESSENTIALS, exclude)
|
133
133
|
end
|
134
134
|
|
135
135
|
def prepare
|
136
|
-
|
137
|
-
|
138
|
-
|
136
|
+
File.open("test.cpp", "w") do |f|
|
137
|
+
f.write(PROGRAM_SOURCE)
|
138
|
+
end
|
139
139
|
end
|
140
140
|
|
141
141
|
def cleanup
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
142
|
+
FileUtils.rm_rf("boost/thread/win32")
|
143
|
+
FileUtils.rm_rf("boost/src/win32")
|
144
|
+
FileUtils.rm_rf("boost/asio/win32")
|
145
|
+
FileUtils.rm_rf("boost/smart_ptr/detail/spinlock_w32.hpp")
|
146
|
+
FileUtils.rm_rf("boost/smart_ptr/detail/sp_counted_base_w32.hpp")
|
147
|
+
FileUtils.rm_rf("boost/smart_ptr/detail/atomic_count_win32.hpp")
|
148
|
+
FileUtils.rm_rf("boost/config/platform/win32.hpp")
|
149
|
+
File.unlink("test.cpp") rescue nil
|
150
150
|
end
|
151
151
|
|
152
152
|
# Compile PROGRAM_SOURCE and copy whatever missing header files the compiler needs.
|
153
153
|
def copy_dependencies
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
154
|
+
done = false
|
155
|
+
while !done
|
156
|
+
missing_headers = `c++ test.cpp -c -I. 2>&1`.
|
157
|
+
split("\n").
|
158
|
+
grep(/(error: .*: No such file|fatal error: '.*' file not found)/).
|
159
|
+
map do |line|
|
160
|
+
if line =~ /error: (.*): No such file/
|
161
|
+
file = $1
|
162
|
+
elsif line =~ /fatal error: '(.*)' file not found/
|
163
|
+
file = $1
|
164
|
+
else
|
165
|
+
abort "Bug"
|
166
|
+
end
|
167
|
+
if file =~ /^boost\//
|
168
|
+
file
|
169
|
+
else
|
170
|
+
line =~ /(.*?):/
|
171
|
+
source = $1
|
172
|
+
File.dirname(source) + "/" + file
|
173
|
+
end
|
174
|
+
end
|
175
|
+
missing_headers.each do |header|
|
176
|
+
install("#{BOOST_DIR}/#{header}", header)
|
177
|
+
end
|
178
|
+
done = missing_headers.empty?
|
179
|
+
end
|
180
180
|
end
|
181
181
|
|
182
182
|
def start
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
183
|
+
if BOOST_DIR.nil? || BOOST_DIR.empty?
|
184
|
+
puts "Usage: copy_boost_headers.rb <boost source directory>"
|
185
|
+
exit 1
|
186
|
+
end
|
187
|
+
begin
|
188
|
+
prepare
|
189
|
+
copy_essential_files
|
190
|
+
copy_dependencies
|
191
|
+
ensure
|
192
|
+
cleanup
|
193
|
+
end
|
194
194
|
end
|
195
195
|
|
196
196
|
start
|