passenger 5.1.10 → 5.1.11
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 +4 -4
- data/CHANGELOG +18 -0
- data/Rakefile +20 -17
- data/bin/passenger-install-apache2-module +14 -11
- data/build/agent.rb +45 -18
- data/build/apache2.rb +32 -16
- data/build/basics.rb +29 -40
- data/build/common_library.rb +70 -54
- data/build/cxx_tests.rb +34 -43
- data/build/integration_tests.rb +10 -10
- data/build/misc.rb +6 -6
- data/build/node_tests.rb +1 -2
- data/build/oxt_tests.rb +7 -5
- data/build/packaging.rb +11 -441
- data/build/ruby_extension.rb +1 -1
- data/build/ruby_tests.rb +1 -2
- data/build/support/cplusplus.rb +6 -5
- data/build/support/cxx_dependency_map.rb +357 -833
- data/build/support/general.rb +23 -1
- data/build/test_basics.rb +3 -28
- data/dev/ci/tests/rpm/Jenkinsfile +68 -0
- data/dev/ci/tests/rpm/run +63 -0
- data/dev/ci/tests/source-packaging/run +1 -1
- data/dev/ci/tests/source-packaging/setup +1 -1
- data/doc/{Packaging.txt.md → Packaging.md} +0 -0
- data/resources/templates/apache2/deployment_example.txt.erb +2 -2
- data/resources/templates/apache2/multiple_apache_installations_detected.txt.erb +2 -2
- data/resources/templates/nginx/deployment_example.txt.erb +1 -1
- data/resources/templates/standalone/mass_deployment_default_server.erb +2 -2
- data/resources/templates/standalone/server.erb +2 -2
- data/src/agent/AgentMain.cpp +0 -4
- data/src/agent/Core/CoreMain.cpp +88 -5
- data/src/agent/Core/SpawningKit/Spawner.h +2 -1
- data/src/agent/Shared/Fundamentals/AbortHandler.cpp +1109 -0
- data/src/agent/Shared/Fundamentals/AbortHandler.h +63 -0
- data/src/agent/Shared/Fundamentals/Implementation.cpp +7 -0
- data/src/agent/Shared/Fundamentals/Initialization.cpp +614 -0
- data/src/agent/Shared/{Base.h → Fundamentals/Initialization.h} +23 -14
- data/src/agent/Shared/Fundamentals/Utils.cpp +127 -0
- data/src/agent/Shared/Fundamentals/Utils.h +46 -0
- data/src/agent/TempDirToucher/TempDirToucherMain.cpp +1 -1
- data/src/agent/Watchdog/CoreWatcher.cpp +3 -1
- data/src/agent/Watchdog/InstanceDirToucher.cpp +90 -53
- data/src/agent/Watchdog/WatchdogMain.cpp +13 -29
- data/src/apache2_module/Hooks.cpp +4 -1
- data/src/cxx_supportlib/ConfigKit/Store.h +32 -5
- data/src/cxx_supportlib/Constants.h +1 -2
- data/src/cxx_supportlib/Crypto.cpp +2 -1
- data/src/cxx_supportlib/Hooks.h +16 -37
- data/src/cxx_supportlib/LoggingKit/Context.h +22 -0
- data/src/cxx_supportlib/LoggingKit/Forward.h +1 -0
- data/src/cxx_supportlib/LoggingKit/Implementation.cpp +106 -22
- data/src/cxx_supportlib/ProcessManagement/Ruby.cpp +106 -0
- data/src/{agent/UstRouter/FileSink.h → cxx_supportlib/ProcessManagement/Ruby.h} +23 -47
- data/src/cxx_supportlib/ProcessManagement/Spawn.cpp +199 -0
- data/src/cxx_supportlib/ProcessManagement/Spawn.h +150 -0
- data/src/cxx_supportlib/ProcessManagement/Utils.cpp +459 -0
- data/src/cxx_supportlib/ProcessManagement/Utils.h +107 -0
- data/src/cxx_supportlib/Utils.cpp +41 -561
- data/src/cxx_supportlib/Utils.h +0 -68
- data/src/cxx_supportlib/Utils/AsyncSignalSafeUtils.h +187 -0
- data/src/cxx_supportlib/Utils/ProcessMetricsCollector.h +14 -2
- data/src/cxx_supportlib/WatchdogLauncher.h +2 -12
- data/src/cxx_supportlib/oxt/dynamic_thread_group.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/jsoncpp/json-forwards.h +4 -0
- data/src/cxx_supportlib/vendor-modified/jsoncpp/json.h +16 -1
- data/src/cxx_supportlib/vendor-modified/jsoncpp/jsoncpp.cpp +12 -9
- data/src/cxx_supportlib/vendor-modified/libev/ev++.h +4 -4
- data/src/cxx_supportlib/vendor-modified/libev/ev.h +3 -3
- data/src/nginx_module/CacheLocationConfig.c +0 -75
- data/src/nginx_module/CacheLocationConfig.c.cxxcodebuilder +1 -0
- data/src/nginx_module/Configuration.c +0 -1
- data/src/nginx_module/Configuration.h +0 -1
- data/src/nginx_module/ConfigurationCommands.c +1 -1
- data/src/nginx_module/ContentHandler.c +0 -1
- data/src/nginx_module/ContentHandler.h +0 -1
- data/src/nginx_module/CreateLocationConfig.c +0 -5
- data/src/nginx_module/CreateLocationConfig.c.cxxcodebuilder +1 -0
- data/src/nginx_module/LocationConfig.h +0 -4
- data/src/nginx_module/LocationConfig.h.cxxcodebuilder +2 -1
- data/src/nginx_module/MergeLocationConfig.c +0 -12
- data/src/nginx_module/MergeLocationConfig.c.cxxcodebuilder +1 -0
- data/src/nginx_module/ngx_http_passenger_module.h +0 -1
- data/src/ruby_supportlib/phusion_passenger.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/common_library.rb +20 -11
- data/src/ruby_supportlib/phusion_passenger/config/api_call_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/reopen_logs_command.rb +0 -1
- data/src/ruby_supportlib/phusion_passenger/config/validate_install_command.rb +10 -3
- data/src/ruby_supportlib/phusion_passenger/console_text_template.rb +3 -1
- data/src/ruby_supportlib/phusion_passenger/constants.rb +0 -1
- data/src/ruby_supportlib/phusion_passenger/debug_logging.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +32 -6
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +0 -1
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +2 -4
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +101 -20
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache_detector.rb +21 -9
- data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +34 -31
- data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +3 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/apache2.rb +2 -14
- data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +40 -3
- data/src/ruby_supportlib/phusion_passenger/standalone/app_finder.rb +15 -14
- data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/config_utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +8 -3
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +19 -18
- data/src/ruby_supportlib/phusion_passenger/standalone/stop_command.rb +6 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +17 -1
- metadata +19 -97
- data/build/documentation.rb +0 -70
- data/doc/CloudLicensingConfiguration.html +0 -172
- data/doc/CloudLicensingConfiguration.txt.md +0 -3
- data/doc/Packaging.html +0 -488
- data/doc/Security of user switching support.idmap.txt +0 -34
- data/doc/Security of user switching support.txt +0 -197
- data/doc/ServerOptimizationGuide.html +0 -172
- data/doc/ServerOptimizationGuide.txt.md +0 -3
- data/doc/images/by_sa.png +0 -0
- data/doc/images/cloud_licensing_batch_job.png +0 -0
- data/doc/images/code_walkthrough.jpg +0 -0
- data/doc/images/direct_spawning.png +0 -0
- data/doc/images/direct_spawning.svg +0 -251
- data/doc/images/glyphicons-halflings-white.png +0 -0
- data/doc/images/glyphicons-halflings.png +0 -0
- data/doc/images/icons/README +0 -5
- data/doc/images/icons/callouts/1.png +0 -0
- data/doc/images/icons/callouts/10.png +0 -0
- data/doc/images/icons/callouts/11.png +0 -0
- data/doc/images/icons/callouts/12.png +0 -0
- data/doc/images/icons/callouts/13.png +0 -0
- data/doc/images/icons/callouts/14.png +0 -0
- data/doc/images/icons/callouts/15.png +0 -0
- data/doc/images/icons/callouts/2.png +0 -0
- data/doc/images/icons/callouts/3.png +0 -0
- data/doc/images/icons/callouts/4.png +0 -0
- data/doc/images/icons/callouts/5.png +0 -0
- data/doc/images/icons/callouts/6.png +0 -0
- data/doc/images/icons/callouts/7.png +0 -0
- data/doc/images/icons/callouts/8.png +0 -0
- data/doc/images/icons/callouts/9.png +0 -0
- data/doc/images/icons/caution.png +0 -0
- data/doc/images/icons/example.png +0 -0
- data/doc/images/icons/home.png +0 -0
- data/doc/images/icons/important.png +0 -0
- data/doc/images/icons/next.png +0 -0
- data/doc/images/icons/note.png +0 -0
- data/doc/images/icons/prev.png +0 -0
- data/doc/images/icons/tip.png +0 -0
- data/doc/images/icons/up.png +0 -0
- data/doc/images/icons/warning.png +0 -0
- data/doc/images/many_web_framework_protocols.png +0 -0
- data/doc/images/passenger_architecture.png +0 -0
- data/doc/images/passenger_architecture.svg +0 -385
- data/doc/images/passenger_architecture_overview.png +0 -0
- data/doc/images/passenger_core_architecture.png +0 -0
- data/doc/images/passenger_nodejs_architecture.svg +0 -558
- data/doc/images/phusion_banner.png +0 -0
- data/doc/images/rack.png +0 -0
- data/doc/images/smart_spawning.png +0 -0
- data/doc/images/smart_spawning.svg +0 -323
- data/doc/images/spawn_server_architecture.png +0 -0
- data/doc/images/spawn_server_architecture.svg +0 -655
- data/doc/images/spawning_preparation_work.png +0 -0
- data/doc/images/startup_sequence.png +0 -0
- data/doc/images/typical_isolated_web_application.png +0 -0
- data/doc/images/typical_isolated_web_application.svg +0 -213
- data/doc/users_guide_snippets/alternative_for_flying_passenger.txt +0 -1
- data/doc/users_guide_snippets/analysis_and_system_maintenance.txt +0 -61
- data/doc/users_guide_snippets/appendix_a_about.txt +0 -13
- data/doc/users_guide_snippets/appendix_b_terminology.txt +0 -71
- data/doc/users_guide_snippets/appendix_c_spawning_methods.txt +0 -36
- data/doc/users_guide_snippets/deployment_basics.txt +0 -37
- data/doc/users_guide_snippets/enterprise_only.txt +0 -1
- data/doc/users_guide_snippets/environment_variables.txt +0 -44
- data/doc/users_guide_snippets/global_queueing_explained.txt +0 -74
- data/doc/users_guide_snippets/installation.txt +0 -228
- data/doc/users_guide_snippets/installation/run_installer.txt +0 -58
- data/doc/users_guide_snippets/installation/verify_running_epilogue.txt +0 -6
- data/doc/users_guide_snippets/passenger_spawn_method.txt +0 -37
- data/doc/users_guide_snippets/rackup_specifications.txt +0 -1
- data/doc/users_guide_snippets/rvm_helper_tool.txt +0 -44
- data/doc/users_guide_snippets/since_version.txt +0 -1
- data/doc/users_guide_snippets/support_information.txt +0 -8
- data/doc/users_guide_snippets/tips.txt +0 -302
- data/doc/users_guide_snippets/troubleshooting/default.txt +0 -48
- data/doc/users_guide_snippets/troubleshooting/rails.txt +0 -59
- data/doc/users_guide_snippets/under_the_hood/page_caching_support.txt +0 -24
- data/doc/users_guide_snippets/under_the_hood/relationship_with_ruby.txt +0 -10
- data/doc/users_guide_snippets/where_to_get_support.txt +0 -9
- data/src/agent/Shared/Base.cpp +0 -1678
- data/src/agent/UstRouter/ApiServer.h +0 -292
- data/src/agent/UstRouter/Client.h +0 -112
- data/src/agent/UstRouter/Controller.h +0 -1309
- data/src/agent/UstRouter/LogSink.h +0 -145
- data/src/agent/UstRouter/OptionParser.h +0 -180
- data/src/agent/UstRouter/RemoteSender.h +0 -853
- data/src/agent/UstRouter/RemoteSink.h +0 -145
- data/src/agent/UstRouter/Transaction.h +0 -278
- data/src/agent/UstRouter/UstRouterMain.cpp +0 -681
- data/src/agent/Watchdog/UstRouterWatcher.cpp +0 -80
- data/src/ruby_supportlib/phusion_passenger/platform_info/macos.rb +0 -45
data/build/common_library.rb
CHANGED
@@ -36,8 +36,6 @@ PhusionPassenger.require_passenger_lib 'common_library'
|
|
36
36
|
# Defines tasks for compiling a static library containing Boost and OXT.
|
37
37
|
def define_libboost_oxt_task(namespace, output_dir, extra_compiler_flags = nil)
|
38
38
|
output_file = "#{output_dir}.a"
|
39
|
-
flags = "-Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified " +
|
40
|
-
"#{extra_compiler_flags} #{EXTRA_CXXFLAGS}"
|
41
39
|
|
42
40
|
if OPTIMIZE
|
43
41
|
optimize = "-O2"
|
@@ -57,8 +55,10 @@ def define_libboost_oxt_task(namespace, output_dir, extra_compiler_flags = nil)
|
|
57
55
|
define_cxx_object_compilation_task(
|
58
56
|
object_file,
|
59
57
|
source_file,
|
60
|
-
|
61
|
-
|
58
|
+
lambda { {
|
59
|
+
:include_paths => CXX_SUPPORTLIB_INCLUDE_PATHS,
|
60
|
+
:flags => [optimize, maybe_eval_lambda(extra_compiler_flags)]
|
61
|
+
} }
|
62
62
|
)
|
63
63
|
end
|
64
64
|
|
@@ -73,8 +73,10 @@ def define_libboost_oxt_task(namespace, output_dir, extra_compiler_flags = nil)
|
|
73
73
|
define_cxx_object_compilation_task(
|
74
74
|
object_file,
|
75
75
|
source_file,
|
76
|
-
|
77
|
-
|
76
|
+
lambda { {
|
77
|
+
:include_paths => CXX_SUPPORTLIB_INCLUDE_PATHS,
|
78
|
+
:flags => [optimize, maybe_eval_lambda(extra_compiler_flags)]
|
79
|
+
} }
|
78
80
|
)
|
79
81
|
end
|
80
82
|
|
@@ -102,9 +104,23 @@ end
|
|
102
104
|
|
103
105
|
if USE_VENDORED_LIBEV
|
104
106
|
LIBEV_SOURCE_DIR = File.expand_path("../src/cxx_supportlib/vendor-modified/libev", File.dirname(__FILE__)) + "/"
|
105
|
-
LIBEV_CFLAGS = "-Isrc/cxx_supportlib/vendor-modified/libev"
|
106
107
|
LIBEV_TARGET = LIBEV_OUTPUT_DIR + ".libs/libev.a"
|
107
108
|
|
109
|
+
let(:libev_cflags) do
|
110
|
+
result = '-Isrc/cxx_supportlib/vendor-modified/libev'
|
111
|
+
# Apple Clang 4.2 complains about ambiguous member templates in ev++.h.
|
112
|
+
result << ' -Wno-ambiguous-member-template' if PlatformInfo.compiler_supports_wno_ambiguous_member_template?
|
113
|
+
result
|
114
|
+
end
|
115
|
+
|
116
|
+
let(:libev_libs) do
|
117
|
+
la_contents = File.open(LIBEV_OUTPUT_DIR + ".libs/libev.la", "r") do |f|
|
118
|
+
f.read
|
119
|
+
end
|
120
|
+
la_contents =~ /dependency_libs='(.+)'/
|
121
|
+
"#{LIBEV_OUTPUT_DIR}.libs/libev.a #{$1}".strip
|
122
|
+
end
|
123
|
+
|
108
124
|
task :libev => LIBEV_TARGET
|
109
125
|
|
110
126
|
dependencies = [
|
@@ -113,20 +129,20 @@ if USE_VENDORED_LIBEV
|
|
113
129
|
"src/cxx_supportlib/vendor-modified/libev/Makefile.am"
|
114
130
|
]
|
115
131
|
file LIBEV_OUTPUT_DIR + "Makefile" => dependencies do
|
116
|
-
|
117
|
-
|
132
|
+
cc_command = cc
|
133
|
+
cxx_command = cxx
|
118
134
|
if OPTIMIZE && LTO
|
119
|
-
|
120
|
-
|
135
|
+
cc_command = "#{cc_command} -flto"
|
136
|
+
cxx_command = "#{cxx_command} -flto"
|
121
137
|
end
|
122
138
|
# Disable all warnings: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#COMPILER_WARNINGS
|
123
|
-
cflags = "#{
|
139
|
+
cflags = "#{extra_cflags} -w"
|
124
140
|
sh "mkdir -p #{LIBEV_OUTPUT_DIR}" if !File.directory?(LIBEV_OUTPUT_DIR)
|
125
141
|
sh "cd #{LIBEV_OUTPUT_DIR} && sh #{LIBEV_SOURCE_DIR}configure " +
|
126
142
|
"--disable-shared --enable-static " +
|
127
143
|
# libev's configure script may select a different default compiler than we
|
128
144
|
# do, so we force our compiler choice.
|
129
|
-
"CC='#{
|
145
|
+
"CC='#{cc_command}' CXX='#{cxx_command}' CFLAGS='#{cflags}' orig_CFLAGS=1"
|
130
146
|
end
|
131
147
|
|
132
148
|
libev_sources = Dir["src/cxx_supportlib/vendor-modified/libev/{*.c,*.h}"]
|
@@ -144,35 +160,38 @@ if USE_VENDORED_LIBEV
|
|
144
160
|
end
|
145
161
|
|
146
162
|
task :clean => 'libev:clean'
|
147
|
-
|
148
|
-
def libev_libs
|
149
|
-
la_contents = File.open(LIBEV_OUTPUT_DIR + ".libs/libev.la", "r") do |f|
|
150
|
-
f.read
|
151
|
-
end
|
152
|
-
la_contents =~ /dependency_libs='(.+)'/
|
153
|
-
"#{LIBEV_OUTPUT_DIR}.libs/libev.a #{$1}".strip
|
154
|
-
end
|
155
163
|
else
|
156
|
-
LIBEV_CFLAGS = string_option('LIBEV_CFLAGS', '-I/usr/include/libev')
|
157
164
|
LIBEV_TARGET = nil
|
158
|
-
task :libev # do nothing
|
159
165
|
|
160
|
-
|
161
|
-
string_option('
|
166
|
+
let(:libev_cflags) do
|
167
|
+
result = string_option('LIBEV_CFLAGS', '-I/usr/include/libev')
|
168
|
+
# Apple Clang 4.2 complains about ambiguous member templates in ev++.h.
|
169
|
+
result << ' -Wno-ambiguous-member-template' if PlatformInfo.compiler_supports_wno_ambiguous_member_template?
|
170
|
+
result
|
162
171
|
end
|
163
|
-
end
|
164
172
|
|
165
|
-
|
166
|
-
|
173
|
+
let(:libev_libs) { string_option('LIBEV_LIBS', '-lev') }
|
174
|
+
|
175
|
+
task :libev # do nothing
|
176
|
+
end
|
167
177
|
|
168
178
|
|
169
179
|
########## libuv ##########
|
170
180
|
|
171
181
|
if USE_VENDORED_LIBUV
|
172
182
|
LIBUV_SOURCE_DIR = File.expand_path("../src/cxx_supportlib/vendor-copy/libuv", File.dirname(__FILE__)) + "/"
|
173
|
-
LIBUV_CFLAGS = "-Isrc/cxx_supportlib/vendor-copy/libuv/include"
|
174
183
|
LIBUV_TARGET = LIBUV_OUTPUT_DIR + ".libs/libuv.a"
|
175
184
|
|
185
|
+
let(:libuv_cflags) { '-Isrc/cxx_supportlib/vendor-copy/libuv/include' }
|
186
|
+
|
187
|
+
let(:libuv_libs) do
|
188
|
+
la_contents = File.open(LIBUV_OUTPUT_DIR + ".libs/libuv.la", "r") do |f|
|
189
|
+
f.read
|
190
|
+
end
|
191
|
+
la_contents =~ /dependency_libs='(.+)'/
|
192
|
+
"#{LIBUV_OUTPUT_DIR}.libs/libuv.a #{$1}".strip
|
193
|
+
end
|
194
|
+
|
176
195
|
task :libuv => LIBUV_TARGET
|
177
196
|
|
178
197
|
dependencies = [
|
@@ -180,15 +199,15 @@ if USE_VENDORED_LIBUV
|
|
180
199
|
"src/cxx_supportlib/vendor-copy/libuv/Makefile.am"
|
181
200
|
]
|
182
201
|
file LIBUV_OUTPUT_DIR + "Makefile" => dependencies do
|
183
|
-
|
184
|
-
|
202
|
+
cc_command = cc
|
203
|
+
cxx_command = cxx
|
185
204
|
if OPTIMIZE && LTO
|
186
|
-
|
187
|
-
|
205
|
+
cc_command = "#{cc_command} -flto"
|
206
|
+
cxx_command = "#{cxx_command} -flto"
|
188
207
|
end
|
189
208
|
# Disable all warnings. The author has a clear standpoint on that:
|
190
209
|
# http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#COMPILER_WARNINGS
|
191
|
-
cflags = "#{
|
210
|
+
cflags = "#{extra_cflags} -w"
|
192
211
|
sh "mkdir -p #{LIBUV_OUTPUT_DIR}" if !File.directory?(LIBUV_OUTPUT_DIR)
|
193
212
|
# Prevent 'make' from regenerating autotools files
|
194
213
|
sh "cd #{LIBUV_SOURCE_DIR} && (touch aclocal.m4 configure Makefile.in || true)"
|
@@ -196,7 +215,7 @@ if USE_VENDORED_LIBUV
|
|
196
215
|
"--disable-shared --enable-static " +
|
197
216
|
# libuv's configure script may select a different default compiler than we
|
198
217
|
# do, so we force our compiler choice.
|
199
|
-
"CC='#{
|
218
|
+
"CC='#{cc_command}' CXX='#{cxx_command}' CFLAGS='#{cflags}'"
|
200
219
|
end
|
201
220
|
|
202
221
|
libuv_sources = Dir["src/cxx_supportlib/vendor-copy/libuv/**/{*.c,*.h}"]
|
@@ -214,22 +233,13 @@ if USE_VENDORED_LIBUV
|
|
214
233
|
end
|
215
234
|
|
216
235
|
task :clean => 'libuv:clean'
|
217
|
-
|
218
|
-
def libuv_libs
|
219
|
-
la_contents = File.open(LIBUV_OUTPUT_DIR + ".libs/libuv.la", "r") do |f|
|
220
|
-
f.read
|
221
|
-
end
|
222
|
-
la_contents =~ /dependency_libs='(.+)'/
|
223
|
-
"#{LIBUV_OUTPUT_DIR}.libs/libuv.a #{$1}".strip
|
224
|
-
end
|
225
236
|
else
|
226
|
-
LIBUV_CFLAGS = string_option('LIBUV_CFLAGS', '-I/usr/include/libuv')
|
227
237
|
LIBUV_TARGET = nil
|
228
|
-
task :libuv # do nothing
|
229
238
|
|
230
|
-
|
231
|
-
|
232
|
-
|
239
|
+
let(:libuv_cflags) { string_option('LIBUV_CFLAGS', '-I/usr/include/libuv') }
|
240
|
+
let(:libuv_libs) { string_option('LIBUV_LIBS', '-luv') }
|
241
|
+
|
242
|
+
task :libuv # do nothing
|
233
243
|
end
|
234
244
|
|
235
245
|
|
@@ -254,10 +264,16 @@ end
|
|
254
264
|
##############################
|
255
265
|
|
256
266
|
|
257
|
-
libboost_oxt_cflags
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
267
|
+
let(:libboost_oxt_cflags) do
|
268
|
+
result = []
|
269
|
+
result << PlatformInfo.adress_sanitizer_flag if USE_ASAN
|
270
|
+
result.join(' ')
|
271
|
+
end
|
272
|
+
|
273
|
+
LIBBOOST_OXT, LIBBOOST_OXT_LINKARG = define_libboost_oxt_task(
|
274
|
+
'common',
|
275
|
+
"#{COMMON_OUTPUT_DIR}libboost_oxt",
|
276
|
+
method(:libboost_oxt_cflags)
|
277
|
+
)
|
262
278
|
COMMON_LIBRARY.enable_optimizations!(LTO) if OPTIMIZE
|
263
|
-
COMMON_LIBRARY.define_tasks(libboost_oxt_cflags)
|
279
|
+
COMMON_LIBRARY.define_tasks(method(:libboost_oxt_cflags))
|
data/build/cxx_tests.rb
CHANGED
@@ -42,8 +42,6 @@ TEST_CXX_OBJECTS = {
|
|
42
42
|
"#{TEST_OUTPUT_DIR}cxx/Core/SpawningKit/SmartSpawnerTest.o" =>
|
43
43
|
"test/cxx/Core/SpawningKit/SmartSpawnerTest.cpp",
|
44
44
|
|
45
|
-
"#{TEST_OUTPUT_DIR}cxx/Core/UnionStationTest.o" =>
|
46
|
-
"test/cxx/Core/UnionStationTest.cpp",
|
47
45
|
"#{TEST_OUTPUT_DIR}cxx/Core/ResponseCacheTest.o" =>
|
48
46
|
"test/cxx/Core/ResponseCacheTest.cpp",
|
49
47
|
"#{TEST_OUTPUT_DIR}cxx/Core/SecurityUpdateCheckerTest.o" =>
|
@@ -51,9 +49,6 @@ TEST_CXX_OBJECTS = {
|
|
51
49
|
"#{TEST_OUTPUT_DIR}cxx/Core/ControllerTest.o" =>
|
52
50
|
"test/cxx/Core/ControllerTest.cpp",
|
53
51
|
|
54
|
-
"#{TEST_OUTPUT_DIR}cxx/UstRouter/TransactionTest.o" =>
|
55
|
-
"test/cxx/UstRouter/TransactionTest.cpp",
|
56
|
-
|
57
52
|
"#{TEST_OUTPUT_DIR}cxx/ServerKit/ChannelTest.o" =>
|
58
53
|
"test/cxx/ServerKit/ChannelTest.cpp",
|
59
54
|
"#{TEST_OUTPUT_DIR}cxx/ServerKit/FileBufferedChannelTest.o" =>
|
@@ -125,50 +120,44 @@ TEST_CXX_OBJECTS = {
|
|
125
120
|
"test/cxx/Base64DecodingTest.cpp"
|
126
121
|
}
|
127
122
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
flags << PlatformInfo.adress_sanitizer_flag
|
138
|
-
end
|
139
|
-
flags
|
123
|
+
let(:basic_test_cxx_flags) do
|
124
|
+
flags = [
|
125
|
+
libev_cflags,
|
126
|
+
libuv_cflags,
|
127
|
+
PlatformInfo.curl_flags,
|
128
|
+
TEST_COMMON_CFLAGS
|
129
|
+
]
|
130
|
+
if USE_ASAN
|
131
|
+
flags << PlatformInfo.adress_sanitizer_flag
|
140
132
|
end
|
133
|
+
flags
|
141
134
|
end
|
142
135
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
136
|
+
let(:test_cxx_include_paths) do
|
137
|
+
[
|
138
|
+
'test/cxx',
|
139
|
+
'test/support',
|
140
|
+
'src/agent',
|
148
141
|
*CXX_SUPPORTLIB_INCLUDE_PATHS
|
149
142
|
]
|
150
143
|
end
|
151
144
|
|
152
|
-
|
153
|
-
|
154
|
-
basic_test_cxx_flags
|
145
|
+
let(:test_cxx_flags) do
|
146
|
+
['-include test/cxx/TestSupport.h'] + basic_test_cxx_flags
|
155
147
|
end
|
156
148
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
result.strip!
|
170
|
-
result
|
171
|
-
end
|
149
|
+
let(:test_cxx_ldflags) do
|
150
|
+
result = "#{EXTRA_PRE_CXX_LDFLAGS} " <<
|
151
|
+
"#{TEST_COMMON_LIBRARY.link_objects_as_string} " <<
|
152
|
+
"#{TEST_BOOST_OXT_LIBRARY} #{libev_libs} #{libuv_libs} " <<
|
153
|
+
"#{PlatformInfo.curl_libs} " <<
|
154
|
+
"#{PlatformInfo.zlib_libs} " <<
|
155
|
+
"#{PlatformInfo.crypto_libs} " <<
|
156
|
+
"#{PlatformInfo.portability_cxx_ldflags}"
|
157
|
+
result << " #{PlatformInfo.adress_sanitizer_flag}" if USE_ASAN
|
158
|
+
result << " #{EXTRA_CXX_LDFLAGS}"
|
159
|
+
result.strip!
|
160
|
+
result
|
172
161
|
end
|
173
162
|
|
174
163
|
# Define compilation tasks for object files.
|
@@ -176,9 +165,11 @@ TEST_CXX_OBJECTS.each_pair do |object, source|
|
|
176
165
|
define_cxx_object_compilation_task(
|
177
166
|
object,
|
178
167
|
source,
|
179
|
-
|
180
|
-
|
181
|
-
|
168
|
+
lambda { {
|
169
|
+
:include_paths => test_cxx_include_paths,
|
170
|
+
:flags => test_cxx_flags,
|
171
|
+
:deps => 'test/cxx/TestSupport.h.gch'
|
172
|
+
} }
|
182
173
|
)
|
183
174
|
end
|
184
175
|
|
data/build/integration_tests.rb
CHANGED
@@ -44,8 +44,7 @@ task 'test:integration:apache2' => dependencies do
|
|
44
44
|
command = "#{PlatformInfo.ruby_sudo_command} -E #{command}"
|
45
45
|
end
|
46
46
|
if grep = string_option('E')
|
47
|
-
|
48
|
-
command << " -e #{Shellwords.escape(grep)}"
|
47
|
+
command << " -e #{shesc grep}"
|
49
48
|
end
|
50
49
|
sh "cd test && exec #{command}"
|
51
50
|
end
|
@@ -58,8 +57,7 @@ task 'test:integration:nginx' => dependencies do
|
|
58
57
|
command = "#{PlatformInfo.ruby_sudo_command} -E #{command}"
|
59
58
|
end
|
60
59
|
if grep = string_option('E')
|
61
|
-
|
62
|
-
command << " -e #{Shellwords.escape(grep)}"
|
60
|
+
command << " -e #{shesc grep}"
|
63
61
|
end
|
64
62
|
repeat = true
|
65
63
|
while repeat
|
@@ -73,8 +71,7 @@ desc "Run Passenger Standalone integration tests"
|
|
73
71
|
task 'test:integration:standalone' => dependencies do
|
74
72
|
command = "bundle exec rspec -c -f s --tty integration_tests/standalone_tests.rb"
|
75
73
|
if grep = string_option('E')
|
76
|
-
|
77
|
-
command << " -e #{Shellwords.escape(grep)}"
|
74
|
+
command << " -e #{shesc grep}"
|
78
75
|
end
|
79
76
|
sh "cd test && exec #{command}"
|
80
77
|
end
|
@@ -86,8 +83,7 @@ task 'test:integration:native_packaging' do
|
|
86
83
|
command = "#{PlatformInfo.ruby_sudo_command} -E #{command}"
|
87
84
|
end
|
88
85
|
if grep = string_option('E')
|
89
|
-
|
90
|
-
command << " -e #{Shellwords.escape(grep)}"
|
86
|
+
command << " -e #{shesc grep}"
|
91
87
|
end
|
92
88
|
case PlatformInfo.os_name_simple
|
93
89
|
when "linux"
|
@@ -124,7 +120,6 @@ end
|
|
124
120
|
dependencies = integration_test_dependencies(:_apache2)
|
125
121
|
desc "Run the 'apache2' integration test infinitely, and abort if/when it fails"
|
126
122
|
task 'test:restart' => dependencies do
|
127
|
-
require 'shellwords'
|
128
123
|
color_code_start = "\e[33m\e[44m\e[1m"
|
129
124
|
color_code_end = "\e[0m"
|
130
125
|
i = 1
|
@@ -132,9 +127,14 @@ task 'test:restart' => dependencies do
|
|
132
127
|
puts "#{color_code_start}Test run #{i} (press Ctrl-C multiple times to abort)#{color_code_end}"
|
133
128
|
command = "bundle exec rspec -c -f s --tty integration_tests/apache2_tests.rb"
|
134
129
|
if grep = string_option('E')
|
135
|
-
command << " -e #{
|
130
|
+
command << " -e #{shesc grep}"
|
136
131
|
end
|
137
132
|
sh "cd test && exec #{command}"
|
138
133
|
i += 1
|
139
134
|
end
|
140
135
|
end
|
136
|
+
|
137
|
+
desc "Run source packaging tests"
|
138
|
+
task 'test:source_packaging' do
|
139
|
+
sh 'bundle exec rspec -f s -c test/integration_tests/source_packaging_test.rb'
|
140
|
+
end
|
data/build/misc.rb
CHANGED
@@ -77,7 +77,7 @@ end
|
|
77
77
|
desc "Convert the Changelog items for the latest release to HTML"
|
78
78
|
task :changelog_as_html do
|
79
79
|
require 'cgi'
|
80
|
-
|
80
|
+
_, items = extract_latest_news_contents_and_items
|
81
81
|
|
82
82
|
puts "<ul>"
|
83
83
|
items.each do |item|
|
@@ -109,7 +109,7 @@ end
|
|
109
109
|
|
110
110
|
desc "Convert the Changelog items for the latest release to Markdown"
|
111
111
|
task :changelog_as_markdown do
|
112
|
-
contents,
|
112
|
+
contents, _ = extract_latest_news_contents_and_items
|
113
113
|
|
114
114
|
# Auto-link to issue tracker.
|
115
115
|
contents.gsub!(/(bug #|issue #|GH-)(\d+)/i) do
|
@@ -176,16 +176,16 @@ task :compile_app => dependencies do
|
|
176
176
|
:include_paths => CXX_SUPPORTLIB_INCLUDE_PATHS,
|
177
177
|
:flags => [
|
178
178
|
"-DSTANDALONE",
|
179
|
-
|
180
|
-
|
179
|
+
libev_cflags,
|
180
|
+
libuv_cflags
|
181
181
|
]
|
182
182
|
)
|
183
183
|
create_cxx_executable(exe,
|
184
184
|
object,
|
185
185
|
:flags => [
|
186
186
|
"-DSTANDALONE",
|
187
|
-
|
188
|
-
|
187
|
+
libev_cflags,
|
188
|
+
libuv_cflags,
|
189
189
|
COMMON_LIBRARY.link_objects_as_string,
|
190
190
|
LIBBOOST_OXT_LINKARG,
|
191
191
|
libev_libs,
|
data/build/node_tests.rb
CHANGED
@@ -26,11 +26,10 @@
|
|
26
26
|
|
27
27
|
desc "Run unit tests for the Node.js libraries"
|
28
28
|
task 'test:node' do
|
29
|
-
require 'shellwords'
|
30
29
|
command = "cd test && env NODE_PATH=#{PhusionPassenger.node_libdir} NODE_ENV=test " +
|
31
30
|
"../node_modules/.bin/mocha -R spec node/*_spec.js"
|
32
31
|
if grep = string_option('G')
|
33
|
-
command << " -g #{
|
32
|
+
command << " -g #{shesc grep}"
|
34
33
|
end
|
35
34
|
sh(command)
|
36
35
|
end
|
data/build/oxt_tests.rb
CHANGED
@@ -38,11 +38,13 @@ TEST_OXT_OBJECTS.each_pair do |object, source|
|
|
38
38
|
define_cxx_object_compilation_task(
|
39
39
|
object,
|
40
40
|
source,
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
41
|
+
lambda { {
|
42
|
+
:include_paths => [
|
43
|
+
"test/support",
|
44
|
+
*CXX_SUPPORTLIB_INCLUDE_PATHS
|
45
|
+
],
|
46
|
+
:flags => TEST_COMMON_CFLAGS
|
47
|
+
} }
|
46
48
|
)
|
47
49
|
end
|
48
50
|
|