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
@@ -53,190 +53,190 @@
|
|
53
53
|
# non-nil, must be the name of the setter function.
|
54
54
|
|
55
55
|
APACHE2_DIRECTORY_CONFIGURATION_OPTIONS = [
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
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
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
56
|
+
{
|
57
|
+
:name => "PassengerRuby",
|
58
|
+
:type => :string,
|
59
|
+
:desc => "The Ruby interpreter to use.",
|
60
|
+
:header_expression => "config->ruby ? config->ruby : serverConfig.defaultRuby"
|
61
|
+
},
|
62
|
+
{
|
63
|
+
:name => "PassengerPython",
|
64
|
+
:type => :string,
|
65
|
+
:desc => "The Python interpreter to use."
|
66
|
+
},
|
67
|
+
{
|
68
|
+
:name => "PassengerNodejs",
|
69
|
+
:type => :string,
|
70
|
+
:desc => "The Node.js command to use."
|
71
|
+
},
|
72
|
+
{
|
73
|
+
:name => "PassengerAppEnv",
|
74
|
+
:type => :string,
|
75
|
+
:desc => "The environment under which applications are run."
|
76
|
+
},
|
77
|
+
{
|
78
|
+
:name => "PassengerMinInstances",
|
79
|
+
:type => :integer,
|
80
|
+
:context => ["OR_LIMIT", "ACCESS_CONF", "RSRC_CONF"],
|
81
|
+
:min_value => 0,
|
82
|
+
:header => "PASSENGER_MIN_PROCESSES",
|
83
|
+
:desc => "The minimum number of application instances to keep when cleaning idle instances."
|
84
|
+
},
|
85
|
+
{
|
86
|
+
:name => "PassengerMaxInstancesPerApp",
|
87
|
+
:type => :integer,
|
88
|
+
:context => ["RSRC_CONF"],
|
89
|
+
:header => "PASSENGER_MAX_PROCESSES",
|
90
|
+
:desc => "The maximum number of simultaneously alive application instances a single application may occupy."
|
91
|
+
},
|
92
|
+
{
|
93
|
+
:name => "PassengerUser",
|
94
|
+
:type => :string,
|
95
|
+
:context => ["ACCESS_CONF", "RSRC_CONF"],
|
96
|
+
:desc => "The user that Ruby applications must run as."
|
97
|
+
},
|
98
|
+
{
|
99
|
+
:name => "PassengerGroup",
|
100
|
+
:type => :string,
|
101
|
+
:context => ["ACCESS_CONF", "RSRC_CONF"],
|
102
|
+
:desc => "The group that Ruby applications must run as."
|
103
|
+
},
|
104
|
+
{
|
105
|
+
:name => "PassengerErrorOverride",
|
106
|
+
:type => :flag,
|
107
|
+
:context => ["OR_ALL"],
|
108
|
+
:desc => "Allow Apache to handle error response.",
|
109
|
+
:header => nil
|
110
|
+
},
|
111
|
+
{
|
112
|
+
:name => "PassengerMaxRequests",
|
113
|
+
:type => :integer,
|
114
|
+
:context => ["OR_LIMIT", "ACCESS_CONF", "RSRC_CONF"],
|
115
|
+
:min_value => 0,
|
116
|
+
:desc => "The maximum number of requests that an application instance may process."
|
117
|
+
},
|
118
|
+
{
|
119
|
+
:name => "PassengerStartTimeout",
|
120
|
+
:type => :integer,
|
121
|
+
:context => ["OR_LIMIT", "ACCESS_CONF", "RSRC_CONF"],
|
122
|
+
:min_value => 1,
|
123
|
+
:desc => "A timeout for application startup."
|
124
|
+
},
|
125
|
+
{
|
126
|
+
:name => "PassengerHighPerformance",
|
127
|
+
:type => :flag,
|
128
|
+
:context => ["OR_ALL"],
|
129
|
+
:desc => "Enable or disable Passenger's high performance mode.",
|
130
|
+
:header => nil
|
131
|
+
},
|
132
|
+
{
|
133
|
+
:name => "PassengerEnabled",
|
134
|
+
:type => :flag,
|
135
|
+
:context => ["OR_ALL"],
|
136
|
+
:desc => "Enable or disable Phusion Passenger.",
|
137
|
+
:header => nil
|
138
|
+
},
|
139
|
+
{
|
140
|
+
:name => "PassengerMaxRequestQueueSize",
|
141
|
+
:type => :integer,
|
142
|
+
:min_value => 0,
|
143
|
+
:context => ["OR_ALL"],
|
144
|
+
:desc => "The maximum number of queued requests."
|
145
|
+
},
|
146
|
+
{
|
147
|
+
:name => "PassengerMaxPreloaderIdleTime",
|
148
|
+
:type => :integer,
|
149
|
+
:min_value => 0,
|
150
|
+
:context => ["RSRC_CONF"],
|
151
|
+
:desc => "The maximum number of seconds that a preloader process may be idle before it is shutdown."
|
152
|
+
},
|
153
|
+
{
|
154
|
+
:name => "PassengerLoadShellEnvvars",
|
155
|
+
:type => :flag,
|
156
|
+
:desc => "Whether to load environment variables from the shell before running the application."
|
157
|
+
},
|
158
|
+
{
|
159
|
+
:name => "PassengerBufferUpload",
|
160
|
+
:type => :flag,
|
161
|
+
:context => ["OR_ALL"],
|
162
|
+
:desc => "Whether to buffer file uploads.",
|
163
|
+
:header => nil
|
164
|
+
},
|
165
|
+
{
|
166
|
+
:name => 'PassengerAppType',
|
167
|
+
:type => :string,
|
168
|
+
:context => ["OR_ALL"],
|
169
|
+
:desc => "Force specific application type.",
|
170
|
+
:header => nil
|
171
|
+
},
|
172
|
+
{
|
173
|
+
:name => 'PassengerStartupFile',
|
174
|
+
:type => :string,
|
175
|
+
:context => ["OR_ALL"],
|
176
|
+
:desc => "Force specific startup file."
|
177
|
+
},
|
178
|
+
{
|
179
|
+
:name => 'PassengerStickySessions',
|
180
|
+
:type => :flag,
|
181
|
+
:context => ["OR_ALL"],
|
182
|
+
:desc => "Whether to enable sticky sessions."
|
183
|
+
},
|
184
|
+
{
|
185
|
+
:name => 'PassengerStickySessionsCookieName',
|
186
|
+
:type => :flag,
|
187
|
+
:context => ["OR_ALL"],
|
188
|
+
:desc => "The cookie name to use for sticky sessions."
|
189
|
+
},
|
190
|
+
{
|
191
|
+
:name => "PassengerSpawnMethod",
|
192
|
+
:type => :string,
|
193
|
+
:context => ["RSRC_CONF"],
|
194
|
+
:desc => "The spawn method to use.",
|
195
|
+
:function => "cmd_passenger_spawn_method"
|
196
|
+
},
|
197
|
+
{
|
198
|
+
:name => "PassengerShowVersionInHeader",
|
199
|
+
:type => :flag,
|
200
|
+
:desc => "Whether to show the Phusion Passenger version number in the X-Powered-By header."
|
201
|
+
},
|
202
|
+
{
|
203
|
+
:name => "PassengerFriendlyErrorPages",
|
204
|
+
:type => :flag,
|
205
|
+
:desc => "Whether to display friendly error pages when something goes wrong."
|
206
|
+
},
|
207
|
+
{
|
208
|
+
:name => "PassengerRestartDir",
|
209
|
+
:type => :string,
|
210
|
+
:desc => "The directory in which Passenger should look for restart.txt."
|
211
|
+
},
|
212
|
+
{
|
213
|
+
:name => "PassengerAppGroupName",
|
214
|
+
:type => :string,
|
215
|
+
:desc => "Application process group name."
|
216
|
+
},
|
217
217
|
|
218
|
-
|
218
|
+
##### Aliases #####
|
219
219
|
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
220
|
+
{
|
221
|
+
:name => "RailsEnv",
|
222
|
+
:type => :string,
|
223
|
+
:desc => "The environment under which applications are run.",
|
224
|
+
:alias_for => "PassengerAppEnv"
|
225
|
+
},
|
226
|
+
{
|
227
|
+
:name => "RackEnv",
|
228
|
+
:type => :string,
|
229
|
+
:desc => "The environment under which applications are run.",
|
230
|
+
:alias_for => "PassengerAppEnv"
|
231
|
+
},
|
232
232
|
|
233
|
-
|
233
|
+
##### Deprecated options #####
|
234
234
|
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
235
|
+
{
|
236
|
+
:name => "RailsSpawnMethod",
|
237
|
+
:type => :string,
|
238
|
+
:context => ["RSRC_CONF"],
|
239
|
+
:desc => "Deprecated option.",
|
240
|
+
:alias_for => "PassengerSpawnMethod"
|
241
|
+
}
|
242
242
|
]
|
@@ -27,498 +27,492 @@
|
|
27
27
|
# lib/phusion_passenger/standalone/runtime_installer.rb.
|
28
28
|
|
29
29
|
class CommonLibraryBuilder
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
30
|
+
include Rake::DSL if defined?(Rake::DSL)
|
31
|
+
|
32
|
+
attr_reader :all_components, :selected_components, :output_dir
|
33
|
+
|
34
|
+
def initialize(&block)
|
35
|
+
@all_components = {}
|
36
|
+
@all_ordered_components = []
|
37
|
+
@selected_components = {}
|
38
|
+
@namespace = "common"
|
39
|
+
if defined?(COMMON_OUTPUT_DIR)
|
40
|
+
@output_dir = COMMON_OUTPUT_DIR + "libpassenger_common"
|
41
|
+
else
|
42
|
+
@output_dir = "."
|
43
|
+
end
|
44
|
+
instance_eval(&block) if block
|
45
|
+
end
|
46
|
+
|
47
|
+
def initialize_copy(other)
|
48
|
+
[:all_components, :all_ordered_components, :selected_components, :namespace, :output_dir].each do |name|
|
49
|
+
var_name = "@#{name}"
|
50
|
+
instance_variable_set(var_name, other.instance_variable_get(var_name).dup)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def define_component(object_name, options)
|
55
|
+
options[:deps] ||= []
|
56
|
+
@all_components[object_name] = options
|
57
|
+
@all_ordered_components << object_name
|
58
|
+
@selected_components[object_name] = options
|
59
|
+
end
|
60
|
+
|
61
|
+
def only(*selector)
|
62
|
+
return dup.send(:only!, *selector)
|
63
|
+
end
|
64
|
+
|
65
|
+
def exclude(*selector)
|
66
|
+
return dup.send(:exclude!, *selector)
|
67
|
+
end
|
68
|
+
|
69
|
+
def set_namespace(namespace)
|
70
|
+
return dup.send(:set_namespace!, namespace)
|
71
|
+
end
|
72
|
+
|
73
|
+
def set_output_dir(dir)
|
74
|
+
return dup.send(:set_output_dir!, dir)
|
75
|
+
end
|
76
|
+
|
77
|
+
def link_objects
|
78
|
+
result = []
|
79
|
+
|
80
|
+
selected_categories.each do |category|
|
81
|
+
if category_complete?(category) && false
|
82
|
+
# Feature disabled: we don't want to waste too much space when
|
83
|
+
# packaging the runtime ('passenger package-runtime') so we
|
84
|
+
# never generate static libraries.
|
85
|
+
if aggregate_sources?
|
86
|
+
result << "#{@output_dir}/#{category}.o"
|
87
|
+
else
|
88
|
+
result << "#{@output_dir}/#{category}.a"
|
89
|
+
end
|
90
|
+
else
|
91
|
+
object_names = selected_objects_beloging_to_category(category)
|
92
|
+
result.concat(object_filenames_for(object_names))
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
return result
|
97
|
+
end
|
98
|
+
|
99
|
+
def link_objects_as_string
|
100
|
+
return link_objects.join(' ')
|
101
|
+
end
|
102
|
+
|
103
|
+
def enable_optimizations!
|
104
|
+
@default_optimization_level = "-O"
|
105
|
+
end
|
106
|
+
|
107
|
+
def define_tasks(extra_compiler_flags = nil)
|
108
|
+
flags = "-Iext -Iext/common #{LIBEV_CFLAGS} #{extra_compiler_flags} "
|
109
|
+
cflags = (flags + EXTRA_CFLAGS).strip
|
110
|
+
cxxflags = (flags + EXTRA_CXXFLAGS).strip
|
111
|
+
|
112
|
+
group_all_components_by_category.each_pair do |category, object_names|
|
113
|
+
define_category_tasks(category, object_names, cflags, cxxflags)
|
114
|
+
end
|
115
|
+
|
116
|
+
task("#{@namespace}:clean") do
|
117
|
+
sh "rm -rf #{@output_dir}"
|
118
|
+
end
|
119
|
+
|
120
|
+
return self
|
121
|
+
end
|
122
122
|
|
123
123
|
private
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
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
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
124
|
+
def define_category_tasks(category, object_names, cflags, cxxflags)
|
125
|
+
object_filenames = object_filenames_for(object_names)
|
126
|
+
|
127
|
+
object_names.each do |object_name|
|
128
|
+
options = @all_components[object_name]
|
129
|
+
source_file = "ext/common/#{options[:source]}"
|
130
|
+
object_file = "#{@output_dir}/#{object_name}"
|
131
|
+
|
132
|
+
file(object_file => dependencies_for(options)) do
|
133
|
+
case options[:optimize]
|
134
|
+
when :light
|
135
|
+
optimize = "-O1"
|
136
|
+
when true, :heavy
|
137
|
+
optimize = "-O2"
|
138
|
+
when :very_heavy
|
139
|
+
optimize = "-O3"
|
140
|
+
when nil
|
141
|
+
optimize = @default_optimization_level
|
142
|
+
else
|
143
|
+
raise "Unknown optimization level #{options[:optimize]}"
|
144
|
+
end
|
145
|
+
if options[:strict_aliasing] == false
|
146
|
+
optimize = "#{optimize} -fno-strict-aliasing"
|
147
|
+
end
|
148
|
+
ensure_directory_exists(File.dirname(object_file))
|
149
|
+
if source_file =~ /\.c$/
|
150
|
+
compile_c(source_file, "#{optimize} #{cflags} -o #{object_file}".strip)
|
151
|
+
else
|
152
|
+
compile_cxx(source_file, "#{optimize} #{cxxflags} -o #{object_file}".strip)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
task "#{@namespace}:clean" do
|
158
|
+
sh "rm -f #{object_filenames.join(' ')}"
|
159
|
+
end
|
160
|
+
|
161
|
+
if aggregate_sources?
|
162
|
+
aggregate_source = "#{@output_dir}/#{category}.cpp"
|
163
|
+
aggregate_object = "#{@output_dir}/#{category}.o"
|
164
|
+
|
165
|
+
file(aggregate_object => dependencies_for(object_names)) do
|
166
|
+
ensure_directory_exists(File.dirname(aggregate_source))
|
167
|
+
ensure_directory_exists(File.dirname(aggregate_object))
|
168
|
+
|
169
|
+
File.open(aggregate_source, "w") do |f|
|
170
|
+
f.puts %q{
|
171
|
+
#ifndef _GNU_SOURCE
|
172
|
+
#define _GNU_SOURCE
|
173
|
+
#endif
|
174
|
+
}
|
175
|
+
object_names.each do |object_name|
|
176
|
+
options = @all_components[object_name]
|
177
|
+
source_file = options[:source].sub(%r(^ext/common), '')
|
178
|
+
f.puts "#include \"#{source_file}\""
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
compile_cxx(aggregate_source, "#{flags} -o #{aggregate_object}")
|
183
|
+
end
|
184
|
+
|
185
|
+
task "#{@namespace}:clean" do
|
186
|
+
sh "rm -f #{aggregate_source} #{aggregate_object}"
|
187
|
+
end
|
188
|
+
elsif false
|
189
|
+
# Feature disabled: we don't want to waste too much space when
|
190
|
+
# packaging the runtime ('passenger package-runtime') so we
|
191
|
+
# never generate static libraries.
|
192
|
+
library = "#{@output_dir}/#{category}.a"
|
193
|
+
|
194
|
+
file(library => object_filenames) do
|
195
|
+
create_static_library(library, object_filenames.join(' '))
|
196
|
+
end
|
197
|
+
|
198
|
+
task "#{@namespace}:clean" do
|
199
|
+
sh "rm -f #{library}"
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
def set_namespace!(namespace)
|
205
|
+
@namespace = namespace
|
206
|
+
return self
|
207
|
+
end
|
208
|
+
|
209
|
+
def set_output_dir!(dir)
|
210
|
+
@output_dir = dir
|
211
|
+
return self
|
212
|
+
end
|
213
|
+
|
214
|
+
def only!(*selector)
|
215
|
+
new_components = apply_selector(*selector)
|
216
|
+
@selected_components = new_components
|
217
|
+
return self
|
218
|
+
end
|
219
|
+
|
220
|
+
def exclude!(*selector)
|
221
|
+
apply_selector(*selector).each_key do |object_name|
|
222
|
+
@selected_components.delete(object_name)
|
223
|
+
end
|
224
|
+
return self
|
225
|
+
end
|
226
|
+
|
227
|
+
def apply_selector(*selector)
|
228
|
+
result = {}
|
229
|
+
selector = [selector].flatten
|
230
|
+
selector.each do |condition|
|
231
|
+
@selected_components.each do |object_name, options|
|
232
|
+
if component_satisfies_condition?(object_name, options, condition)
|
233
|
+
result[object_name] = options
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
237
|
+
return result
|
238
|
+
end
|
239
|
+
|
240
|
+
def component_satisfies_condition?(object_name, options, condition)
|
241
|
+
case condition
|
242
|
+
when Symbol
|
243
|
+
return condition == :all || options[:category] == condition
|
244
|
+
when String
|
245
|
+
return object_name == condition
|
246
|
+
else
|
247
|
+
raise ArgumentError, "Invalid condition #{condition.inspect}"
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
def ensure_directory_exists(dir)
|
252
|
+
sh("mkdir -p #{dir}") if !File.directory?(dir)
|
253
|
+
end
|
254
|
+
|
255
|
+
def selected_categories
|
256
|
+
categories = {}
|
257
|
+
@selected_components.each_value do |options|
|
258
|
+
categories[options[:category]] = true
|
259
|
+
end
|
260
|
+
return categories.keys
|
261
|
+
end
|
262
|
+
|
263
|
+
def category_complete?(category)
|
264
|
+
expected = 0
|
265
|
+
actual = 0
|
266
|
+
@all_components.each_value do |options|
|
267
|
+
if options[:category] == category
|
268
|
+
expected += 1
|
269
|
+
end
|
270
|
+
end
|
271
|
+
@selected_components.each_value do |options|
|
272
|
+
if options[:category] == category
|
273
|
+
actual += 1
|
274
|
+
end
|
275
|
+
end
|
276
|
+
return expected == actual
|
277
|
+
end
|
278
|
+
|
279
|
+
def selected_objects_beloging_to_category(category)
|
280
|
+
result = []
|
281
|
+
@selected_components.each_pair do |object_name, options|
|
282
|
+
if options[:category] == category
|
283
|
+
result << object_name
|
284
|
+
end
|
285
|
+
end
|
286
|
+
return result
|
287
|
+
end
|
288
|
+
|
289
|
+
def dependencies_for(component_options_or_object_names)
|
290
|
+
result = nil
|
291
|
+
case component_options_or_object_names
|
292
|
+
when Hash
|
293
|
+
component_options = component_options_or_object_names
|
294
|
+
result = ["ext/common/#{component_options[:source]}"]
|
295
|
+
component_options[:deps].each do |dependency|
|
296
|
+
result << "ext/common/#{dependency}"
|
297
|
+
end
|
298
|
+
when Array
|
299
|
+
result = []
|
300
|
+
object_names = component_options_or_object_names
|
301
|
+
object_names.each do |object_name|
|
302
|
+
options = @all_components[object_name]
|
303
|
+
result.concat(dependencies_for(options))
|
304
|
+
end
|
305
|
+
result.uniq!
|
306
|
+
end
|
307
|
+
return result
|
308
|
+
end
|
309
|
+
|
310
|
+
def object_filenames_for(object_names)
|
311
|
+
return object_names.map { |name| "#{@output_dir}/#{name}" }
|
312
|
+
end
|
313
|
+
|
314
|
+
def group_all_components_by_category
|
315
|
+
categories = {}
|
316
|
+
@all_ordered_components.each do |object_name|
|
317
|
+
options = @all_components[object_name]
|
318
|
+
category = options[:category]
|
319
|
+
categories[category] ||= []
|
320
|
+
categories[category] << object_name
|
321
|
+
end
|
322
|
+
return categories
|
323
|
+
end
|
324
|
+
|
325
|
+
def aggregate_sources?
|
326
|
+
# Feature disabled: it's too hard to make it work because
|
327
|
+
# lots of executables have to be linked to individual objects
|
328
|
+
# anyway.
|
329
|
+
return false
|
330
|
+
end
|
331
331
|
end
|
332
332
|
|
333
333
|
|
334
334
|
COMMON_LIBRARY = CommonLibraryBuilder.new do
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
#'BCrypt.o' => %w(
|
516
|
-
# BCrypt.cpp
|
517
|
-
# BCrypt.h
|
518
|
-
# Blowfish.h
|
519
|
-
# Blowfish.c)
|
335
|
+
define_component 'Logging.o',
|
336
|
+
:source => 'Logging.cpp',
|
337
|
+
:category => :base,
|
338
|
+
:optimize => :light,
|
339
|
+
:deps => %w(
|
340
|
+
Logging.cpp
|
341
|
+
Logging.h
|
342
|
+
)
|
343
|
+
define_component 'Exceptions.o',
|
344
|
+
:source => 'Exceptions.cpp',
|
345
|
+
:category => :base,
|
346
|
+
:deps => %w(
|
347
|
+
Exceptions.h
|
348
|
+
)
|
349
|
+
define_component 'Utils/SystemTime.o',
|
350
|
+
:source => 'Utils/SystemTime.cpp',
|
351
|
+
:category => :base,
|
352
|
+
:deps => %w(
|
353
|
+
Utils/SystemTime.h
|
354
|
+
)
|
355
|
+
define_component 'Utils/StrIntUtils.o',
|
356
|
+
:source => 'Utils/StrIntUtils.cpp',
|
357
|
+
:category => :base,
|
358
|
+
:optimize => :very_heavy,
|
359
|
+
:deps => %w(
|
360
|
+
Utils/StrIntUtils.h
|
361
|
+
)
|
362
|
+
define_component 'Utils/StrIntUtilsNoStrictAliasing.o',
|
363
|
+
:source => 'Utils/StrIntUtilsNoStrictAliasing.cpp',
|
364
|
+
:category => :base,
|
365
|
+
# Compiling with -O3 causes segfaults on RHEL 6
|
366
|
+
:optimize => :heavy,
|
367
|
+
:strict_aliasing => false,
|
368
|
+
:deps => %w(
|
369
|
+
Utils/StrIntUtils.h
|
370
|
+
)
|
371
|
+
define_component 'Utils/IOUtils.o',
|
372
|
+
:source => 'Utils/IOUtils.cpp',
|
373
|
+
:optimize => :light,
|
374
|
+
:category => :base,
|
375
|
+
:deps => %w(
|
376
|
+
Utils/IOUtils.h
|
377
|
+
)
|
378
|
+
define_component 'Utils.o',
|
379
|
+
:source => 'Utils.cpp',
|
380
|
+
:category => :base,
|
381
|
+
:deps => %w(
|
382
|
+
Utils.h
|
383
|
+
Utils/StrIntUtils.h
|
384
|
+
ResourceLocator.h
|
385
|
+
)
|
386
|
+
|
387
|
+
define_component 'Utils/modp_b64.o',
|
388
|
+
:source => 'Utils/modp_b64.cpp',
|
389
|
+
:category => :other,
|
390
|
+
:optimize => true,
|
391
|
+
:deps => %w(
|
392
|
+
Utils/modp_b64.h
|
393
|
+
Utils/modp_b64_data.h
|
394
|
+
)
|
395
|
+
define_component 'Utils/CachedFileStat.o',
|
396
|
+
:source => 'Utils/CachedFileStat.cpp',
|
397
|
+
:category => :other,
|
398
|
+
:deps => %w(
|
399
|
+
Utils/CachedFileStat.h
|
400
|
+
Utils/CachedFileStat.hpp
|
401
|
+
)
|
402
|
+
define_component 'Utils/LargeFiles.o',
|
403
|
+
:source => 'Utils/LargeFiles.cpp',
|
404
|
+
:category => :other,
|
405
|
+
:deps => %w(
|
406
|
+
Utils/LargeFiles.h
|
407
|
+
)
|
408
|
+
define_component 'ApplicationPool2/Implementation.o',
|
409
|
+
:source => 'ApplicationPool2/Implementation.cpp',
|
410
|
+
:category => :other,
|
411
|
+
:deps => %w(
|
412
|
+
ApplicationPool2/Spawner.h
|
413
|
+
ApplicationPool2/Common.h
|
414
|
+
ApplicationPool2/Pool.h
|
415
|
+
ApplicationPool2/SuperGroup.h
|
416
|
+
ApplicationPool2/Group.h
|
417
|
+
ApplicationPool2/Process.h
|
418
|
+
ApplicationPool2/Socket.h
|
419
|
+
ApplicationPool2/Session.h
|
420
|
+
ApplicationPool2/Options.h
|
421
|
+
ApplicationPool2/PipeWatcher.h
|
422
|
+
ApplicationPool2/AppTypes.h
|
423
|
+
ApplicationPool2/Spawner.h
|
424
|
+
ApplicationPool2/SpawnerFactory.h
|
425
|
+
ApplicationPool2/SmartSpawner.h
|
426
|
+
ApplicationPool2/DirectSpawner.h
|
427
|
+
ApplicationPool2/DummySpawner.h
|
428
|
+
)
|
429
|
+
define_component 'ApplicationPool2/AppTypes.o',
|
430
|
+
:source => 'ApplicationPool2/AppTypes.cpp',
|
431
|
+
:category => :other,
|
432
|
+
:deps => %w(
|
433
|
+
ApplicationPool2/AppTypes.h
|
434
|
+
Utils/StrIntUtils.h
|
435
|
+
Utils/CachedFileStat.h
|
436
|
+
)
|
437
|
+
define_component 'AgentsStarter.o',
|
438
|
+
:source => 'AgentsStarter.cpp',
|
439
|
+
:category => :other,
|
440
|
+
:deps => %w(
|
441
|
+
AgentsStarter.h
|
442
|
+
ResourceLocator.h
|
443
|
+
MessageClient.h
|
444
|
+
Utils/IniFile.h
|
445
|
+
Utils/VariantMap.h
|
446
|
+
)
|
447
|
+
define_component 'AgentsBase.o',
|
448
|
+
:source => 'agents/Base.cpp',
|
449
|
+
:category => :other,
|
450
|
+
:deps => %w(
|
451
|
+
agents/Base.h
|
452
|
+
Utils/VariantMap.h
|
453
|
+
)
|
454
|
+
define_component 'agents/LoggingAgent/FilterSupport.o',
|
455
|
+
:source => 'agents/LoggingAgent/FilterSupport.cpp',
|
456
|
+
:category => :logging_agent,
|
457
|
+
:deps => %w(
|
458
|
+
agents/LoggingAgent/FilterSupport.h
|
459
|
+
)
|
460
|
+
define_component 'MemoryKit/mbuf.o',
|
461
|
+
:source => 'MemoryKit/mbuf.cpp',
|
462
|
+
:category => :other,
|
463
|
+
:optimize => true,
|
464
|
+
:deps => %w(
|
465
|
+
MemoryKit/palloc.h
|
466
|
+
)
|
467
|
+
define_component 'MemoryKit/palloc.o',
|
468
|
+
:source => 'MemoryKit/palloc.cpp',
|
469
|
+
:category => :other,
|
470
|
+
:optimize => true,
|
471
|
+
:deps => %w(
|
472
|
+
MemoryKit/palloc.h
|
473
|
+
)
|
474
|
+
define_component 'ServerKit/http_parser.o',
|
475
|
+
:source => 'ServerKit/http_parser.cpp',
|
476
|
+
:category => :other,
|
477
|
+
:optimize => :very_heavy,
|
478
|
+
:deps => %w(
|
479
|
+
ServerKit/http_parser.h
|
480
|
+
)
|
481
|
+
define_component 'ServerKit/Implementation.o',
|
482
|
+
:source => 'ServerKit/Implementation.cpp',
|
483
|
+
:category => :other,
|
484
|
+
:optimize => true
|
485
|
+
|
486
|
+
define_component 'Utils/MD5.o',
|
487
|
+
:source => 'Utils/MD5.cpp',
|
488
|
+
:category => :other,
|
489
|
+
:optimize => true,
|
490
|
+
:deps => %w(
|
491
|
+
Utils/MD5.h
|
492
|
+
)
|
493
|
+
define_component 'Utils/Hasher.o',
|
494
|
+
:source => 'Utils/Hasher.cpp',
|
495
|
+
:category => :other,
|
496
|
+
:optimize => :very_heavy,
|
497
|
+
:deps => %w(
|
498
|
+
Utils/Hasher.h
|
499
|
+
)
|
500
|
+
define_component 'Utils/jsoncpp.o',
|
501
|
+
:source => 'Utils/jsoncpp.cpp',
|
502
|
+
:category => :other,
|
503
|
+
:optimize => true,
|
504
|
+
:deps => %w(
|
505
|
+
Utils/json.h
|
506
|
+
Utils/json-forwards.h
|
507
|
+
)
|
508
|
+
|
509
|
+
#'BCrypt.o' => %w(
|
510
|
+
# BCrypt.cpp
|
511
|
+
# BCrypt.h
|
512
|
+
# Blowfish.h
|
513
|
+
# Blowfish.c)
|
520
514
|
end
|
521
515
|
|
522
516
|
# Objects that must be linked into the Nginx binary.
|
523
517
|
NGINX_LIBS_SELECTOR = [:base, 'AgentsStarter.o', 'ApplicationPool2/AppTypes.o',
|
524
|
-
|
518
|
+
'Utils/CachedFileStat.o', 'agents/LoggingAgent/FilterSupport.o']
|