passenger 5.0.27 → 5.0.28
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 +14 -1
- data/CONTRIBUTORS +2 -0
- data/Rakefile +6 -5
- data/build/agent.rb +1 -1
- data/build/basics.rb +6 -71
- data/build/misc.rb +2 -2
- data/build/nginx.rb +18 -1
- data/build/packaging.rb +3 -1
- data/build/{cplusplus_support.rb → support/cplusplus.rb} +0 -0
- data/build/{cxx_dependency_map.rb → support/cxx_dependency_map.rb} +72 -1
- data/build/support/general.rb +106 -0
- data/dev/ci/run_travis.sh +9 -0
- data/dev/vagrant/nginx_rakefile +1 -1
- data/src/agent/Core/ApplicationPool/Options.h +4 -0
- data/src/agent/Core/Controller/CheckoutSession.cpp +1 -2
- data/src/agent/Core/Controller/InitRequest.cpp +1 -0
- data/src/agent/Core/SpawningKit/DirectSpawner.h +12 -0
- data/src/agent/Core/SpawningKit/SmartSpawner.h +13 -2
- data/src/agent/Core/SpawningKit/Spawner.h +35 -0
- data/src/agent/Core/SpawningKit/UserSwitchingRules.h +12 -6
- data/src/apache2_module/ConfigurationCommands.cpp +7 -0
- data/src/apache2_module/ConfigurationFields.hpp +2 -0
- data/src/apache2_module/ConfigurationSetters.cpp +34 -0
- data/src/apache2_module/CreateDirConfig.cpp +1 -0
- data/src/apache2_module/MergeDirConfig.cpp +7 -0
- data/src/apache2_module/SetHeaders.cpp +5 -0
- data/src/cxx_supportlib/Constants.h +3 -1
- data/src/cxx_supportlib/Logging.h +11 -8
- data/src/cxx_supportlib/LveLoggingDecorator.h +92 -0
- data/src/cxx_supportlib/MemoryKit/mbuf.cpp +51 -16
- data/src/cxx_supportlib/MemoryKit/mbuf.h +27 -24
- data/src/cxx_supportlib/ServerKit/HttpServer.h +4 -0
- data/src/cxx_supportlib/vendor-copy/adhoc_lve.h +304 -0
- data/src/nginx_module/Configuration.c +8 -0
- data/src/nginx_module/config +26 -12
- data/src/ruby_supportlib/phusion_passenger.rb +8 -8
- data/src/ruby_supportlib/phusion_passenger/admin_tools/memory_stats.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +8 -0
- data/src/ruby_supportlib/phusion_passenger/common_library.rb +2 -2
- data/src/ruby_supportlib/phusion_passenger/config/about_command.rb +26 -1
- data/src/ruby_supportlib/phusion_passenger/config/main.rb +2 -0
- data/src/ruby_supportlib/phusion_passenger/constants.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/gdb_controller.rb +2 -1
- metadata +7 -4
@@ -74,10 +74,12 @@ static ngx_int_t traverse_static_location_tree(ngx_conf_t *cf,
|
|
74
74
|
ngx_http_core_srv_conf_t *server_conf,
|
75
75
|
ngx_http_location_tree_node_t *node,
|
76
76
|
postprocess_ctx_t *ctx);
|
77
|
+
#ifdef NGX_PCRE
|
77
78
|
static ngx_int_t traverse_regex_locations(ngx_conf_t *cf,
|
78
79
|
ngx_http_core_srv_conf_t *server_conf,
|
79
80
|
ngx_http_core_loc_conf_t **regex_locations,
|
80
81
|
postprocess_ctx_t *ctx);
|
82
|
+
#endif
|
81
83
|
static ngx_int_t merge_headers(ngx_conf_t *cf, passenger_loc_conf_t *conf,
|
82
84
|
passenger_loc_conf_t *prev);
|
83
85
|
static ngx_int_t merge_string_array(ngx_conf_t *cf, ngx_array_t **prev,
|
@@ -1141,8 +1143,12 @@ traverse_location_confs_nested_in_server_conf(ngx_conf_t *cf,
|
|
1141
1143
|
return result;
|
1142
1144
|
}
|
1143
1145
|
|
1146
|
+
#ifdef NGX_PCRE
|
1144
1147
|
return traverse_regex_locations(cf, server_conf,
|
1145
1148
|
location_conf->regex_locations, ctx);
|
1149
|
+
#else
|
1150
|
+
return result;
|
1151
|
+
#endif
|
1146
1152
|
}
|
1147
1153
|
|
1148
1154
|
static ngx_int_t
|
@@ -1185,6 +1191,7 @@ traverse_static_location_tree(ngx_conf_t *cf,
|
|
1185
1191
|
return NGX_OK;
|
1186
1192
|
}
|
1187
1193
|
|
1194
|
+
#ifdef NGX_PCRE
|
1188
1195
|
static ngx_int_t
|
1189
1196
|
traverse_regex_locations(ngx_conf_t *cf,
|
1190
1197
|
ngx_http_core_srv_conf_t *server_conf,
|
@@ -1208,6 +1215,7 @@ traverse_regex_locations(ngx_conf_t *cf,
|
|
1208
1215
|
|
1209
1216
|
return NGX_OK;
|
1210
1217
|
}
|
1218
|
+
#endif
|
1211
1219
|
|
1212
1220
|
static int
|
1213
1221
|
string_keyval_has_key(ngx_array_t *table, ngx_str_t *key)
|
data/src/nginx_module/config
CHANGED
@@ -7,27 +7,36 @@ if ! ruby -v >/dev/null 2>/dev/null; then
|
|
7
7
|
fi
|
8
8
|
|
9
9
|
## Magic comment: begin bootstrap ##
|
10
|
-
#
|
10
|
+
# Warning: this magic section will be replaced during packaging by the script in dev/install_scripts_bootstrap_code.rb,
|
11
|
+
# so keep its purpose purely for finding the passenger-config that belongs to this Phusion Passenger installation.
|
11
12
|
PATH="$ngx_addon_dir/../../bin:$PATH"
|
12
13
|
export PATH
|
13
14
|
|
14
15
|
PASSENGER_CONFIG=${PASSENGER_CONFIG:-passenger-config}
|
16
|
+
BUILD_DIRECTIVE="nginx"
|
17
|
+
COMPILE_CHECK_DIRECTIVE="--compiled"
|
15
18
|
|
16
|
-
if
|
19
|
+
if [ "$ngx_module_link" = DYNAMIC ]; then
|
20
|
+
BUILD_DIRECTIVE="nginx:as_dynamic_module"
|
21
|
+
COMPILE_CHECK_DIRECTIVE="--nginx-dynamic-compiled"
|
22
|
+
fi
|
23
|
+
|
24
|
+
# N.B. the compile check only looks at whether the common library objects are compiled and it assumes that
|
25
|
+
# their presence indicates a good build was performed. If other essential files were manually deleted the
|
26
|
+
# rake $BUILD_DIRECTIVE task (or rake clean) can be run manually to repair/reset the build.
|
27
|
+
if test "x$PASSENGER_LIBS" = "x" && ! $PASSENGER_CONFIG $COMPILE_CHECK_DIRECTIVE; then
|
17
28
|
echo "*** The Phusion Passenger support files are not yet compiled. Compiling them for you... ***"
|
18
|
-
echo "*** Running 'rake nginx CACHING=false' in $ngx_addon_dir... ***"
|
19
29
|
old_dir=`pwd`
|
20
30
|
if ! cd $ngx_addon_dir; then
|
21
31
|
exit 1
|
22
32
|
fi
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
fi
|
33
|
+
TRACE_DIRECTIVE=""
|
34
|
+
if test "x$TRACE" = "x1"; then
|
35
|
+
TRACE_DIRECTIVE="--trace"
|
36
|
+
fi
|
37
|
+
echo "*** Running 'rake $TRACE_DIRECTIVE $BUILD_DIRECTIVE CACHING=false' in $ngx_addon_dir... ***"
|
38
|
+
if ! rake $TRACE_DIRECTIVE $BUILD_DIRECTIVE CACHING=false; then
|
39
|
+
exit 1
|
31
40
|
fi
|
32
41
|
cd "$old_dir"
|
33
42
|
echo "*** Phusion Passenger support files have been successfully compiled. ***"
|
@@ -37,8 +46,13 @@ fi
|
|
37
46
|
if test "x$PASSENGER_INCLUDEDIR" = "x"; then
|
38
47
|
PASSENGER_INCLUDEDIR=`$PASSENGER_CONFIG --includedir`
|
39
48
|
fi
|
49
|
+
|
50
|
+
LINK_DIRECTIVE="--nginx-libs"
|
51
|
+
if [ "$ngx_module_link" = DYNAMIC ]; then
|
52
|
+
LINK_DIRECTIVE="--nginx-dynamic-libs"
|
53
|
+
fi
|
40
54
|
if test "x$PASSENGER_LIBS" = "x"; then
|
41
|
-
PASSENGER_LIBS=`$PASSENGER_CONFIG
|
55
|
+
PASSENGER_LIBS=`$PASSENGER_CONFIG $LINK_DIRECTIVE`
|
42
56
|
fi
|
43
57
|
|
44
58
|
PASSENGER_MODULE_INCS="$PASSENGER_INCLUDEDIR"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
# Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
# Copyright (c) 2010-
|
3
|
+
# Copyright (c) 2010-2016 Phusion Holding B.V.
|
4
4
|
#
|
5
5
|
# "Passenger", "Phusion Passenger" and "Union Station" are registered
|
6
6
|
# trademarks of Phusion Holding B.V.
|
@@ -31,10 +31,10 @@ module PhusionPassenger
|
|
31
31
|
|
32
32
|
PACKAGE_NAME = 'passenger'
|
33
33
|
# Run 'rake src/cxx_supportlib/Constants.h' after changing this number.
|
34
|
-
VERSION_STRING = '5.0.
|
34
|
+
VERSION_STRING = '5.0.28'
|
35
35
|
|
36
|
-
PREFERRED_NGINX_VERSION = '1.
|
37
|
-
NGINX_SHA256_CHECKSUM = '
|
36
|
+
PREFERRED_NGINX_VERSION = '1.10.0'
|
37
|
+
NGINX_SHA256_CHECKSUM = '8ed647c3dd65bc4ced03b0e0f6bf9e633eff6b01bac772bcf97077d58bc2be4d'
|
38
38
|
|
39
39
|
PREFERRED_PCRE_VERSION = '8.34'
|
40
40
|
PCRE_SHA256_CHECKSUM = '1dd78994c81e44ac41cf30b2a21d4b4cc6d76ccde7fc6e77713ed51d7bddca47'
|
@@ -235,15 +235,15 @@ module PhusionPassenger
|
|
235
235
|
require("#{ruby_libdir}/phusion_passenger/#{name}")
|
236
236
|
end
|
237
237
|
|
238
|
-
# Forward define public_api.rb methods for code that tries to hook
|
238
|
+
# Forward define public_api.rb methods for code that tries to hook
|
239
239
|
# Passenger events before an app is spawned (such as mongoid)
|
240
|
-
def on_event(name, &block)
|
240
|
+
def self.on_event(name, &block)
|
241
241
|
# The definition in `public_api.rb` will override this implementation when
|
242
242
|
# a Ruby application is spawned.
|
243
243
|
nil
|
244
244
|
end
|
245
|
-
|
246
|
-
def call_event(name, *args)
|
245
|
+
|
246
|
+
def self.call_event(name, *args)
|
247
247
|
# The definition in `public_api.rb` will override this implementation when
|
248
248
|
# a Ruby application is spawned.
|
249
249
|
nil
|
@@ -90,7 +90,7 @@ module PhusionPassenger
|
|
90
90
|
# Phusion Passenger is not running.
|
91
91
|
def passenger_processes
|
92
92
|
@passenger_processes ||= list_processes(:match =>
|
93
|
-
/((^| )Passenger|(^| )Rails:|(^| )Rack:|wsgi-loader.py)/)
|
93
|
+
/((^| )Passenger|(^| )Rails:|(^| )Rack:|wsgi-loader.py|(.*)PassengerAgent)/)
|
94
94
|
end
|
95
95
|
|
96
96
|
# Returns the sum of the memory usages of all given processes.
|
@@ -228,6 +228,14 @@ APACHE2_DIRECTORY_CONFIGURATION_OPTIONS = [
|
|
228
228
|
:desc => "Force #{SHORT_PROGRAM_NAME} to believe that an application process " \
|
229
229
|
"can handle the given number of concurrent requests per process"
|
230
230
|
},
|
231
|
+
{
|
232
|
+
:name => "PassengerLveMinUid",
|
233
|
+
:type => :integer,
|
234
|
+
:min_value => 0,
|
235
|
+
:context => ["RSRC_CONF"],
|
236
|
+
:desc => "Minimum user id starting from which entering LVE and CageFS is allowed."
|
237
|
+
},
|
238
|
+
|
231
239
|
|
232
240
|
##### Aliases #####
|
233
241
|
|
@@ -78,7 +78,7 @@ class CommonLibraryBuilder
|
|
78
78
|
result = []
|
79
79
|
|
80
80
|
selected_categories.each do |category|
|
81
|
-
object_names =
|
81
|
+
object_names = selected_objects_belonging_to_category(category)
|
82
82
|
result.concat(object_filenames_for(object_names))
|
83
83
|
end
|
84
84
|
|
@@ -231,7 +231,7 @@ private
|
|
231
231
|
return expected == actual
|
232
232
|
end
|
233
233
|
|
234
|
-
def
|
234
|
+
def selected_objects_belonging_to_category(category)
|
235
235
|
result = []
|
236
236
|
@selected_components.each_pair do |object_name, options|
|
237
237
|
if options[:category] == category
|
@@ -39,7 +39,12 @@ module PhusionPassenger
|
|
39
39
|
puts " ruby-libdir Show #{PROGRAM_NAME}'s Ruby library directory."
|
40
40
|
puts " includedir Show the Nginx runtime library headers directory."
|
41
41
|
puts " nginx-addon-dir Show #{PROGRAM_NAME}'s Nginx addon directory."
|
42
|
-
puts " nginx-libs Show
|
42
|
+
puts " nginx-libs Show paths to #{PROGRAM_NAME}'s libraries"
|
43
|
+
puts " for static linking to Nginx runtime."
|
44
|
+
puts " nginx-dynamic-libs Show paths to #{PROGRAM_NAME}'s libraries"
|
45
|
+
puts " for dynamic linking to Nginx runtime."
|
46
|
+
puts " nginx-dynamic-compiled Check whether runtime libraries for dynamic"
|
47
|
+
puts " linking to Nginx are compiled."
|
43
48
|
puts " resourcesdir Show #{PROGRAM_NAME}'s resources directory."
|
44
49
|
puts " support-binaries-dir Show #{PROGRAM_NAME}'s support binaries dir."
|
45
50
|
puts " compiled Check whether runtime libraries are compiled."
|
@@ -77,6 +82,8 @@ module PhusionPassenger
|
|
77
82
|
puts PhusionPassenger.nginx_module_source_dir
|
78
83
|
when "--nginx-libs"
|
79
84
|
puts "#{common_library.link_objects_as_string} #{PhusionPassenger.lib_dir}/common/libboost_oxt.a"
|
85
|
+
when "--nginx-dynamic-libs"
|
86
|
+
puts "#{common_dynamic_library.link_objects_as_string} #{PhusionPassenger.lib_dir}/nginx_dynamic/libboost_oxt.a"
|
80
87
|
when "--resourcesdir"
|
81
88
|
puts PhusionPassenger.resources_dir
|
82
89
|
when "--support-binaries-dir"
|
@@ -92,6 +99,17 @@ module PhusionPassenger
|
|
92
99
|
else
|
93
100
|
exit 1
|
94
101
|
end
|
102
|
+
when "--nginx-dynamic-compiled"
|
103
|
+
common_dynamic_library.link_objects.each do |filename|
|
104
|
+
if !File.exist?(filename)
|
105
|
+
exit 1
|
106
|
+
end
|
107
|
+
end
|
108
|
+
if File.exist?("#{PhusionPassenger.lib_dir}/nginx_dynamic/libboost_oxt.a")
|
109
|
+
exit 0
|
110
|
+
else
|
111
|
+
exit 1
|
112
|
+
end
|
95
113
|
when "--custom-packaged"
|
96
114
|
if PhusionPassenger.custom_packaged?
|
97
115
|
exit 0
|
@@ -200,6 +218,13 @@ module PhusionPassenger
|
|
200
218
|
only(*NGINX_LIBS_SELECTOR).
|
201
219
|
set_output_dir("#{PhusionPassenger.lib_dir}/common/libpassenger_common")
|
202
220
|
end
|
221
|
+
|
222
|
+
def common_dynamic_library
|
223
|
+
PhusionPassenger.require_passenger_lib 'common_library'
|
224
|
+
return COMMON_LIBRARY.
|
225
|
+
only(*NGINX_LIBS_SELECTOR).
|
226
|
+
set_output_dir("#{PhusionPassenger.lib_dir}/nginx_dynamic/module_libpassenger_common")
|
227
|
+
end
|
203
228
|
end
|
204
229
|
|
205
230
|
end # module Config
|
@@ -70,6 +70,7 @@ module PhusionPassenger
|
|
70
70
|
DEFAULT_UNION_STATION_GATEWAY_PORT = 443
|
71
71
|
DEFAULT_HTTP_SERVER_LISTEN_ADDRESS = "tcp://127.0.0.1:3000"
|
72
72
|
DEFAULT_UST_ROUTER_LISTEN_ADDRESS = "tcp://127.0.0.1:9344"
|
73
|
+
DEFAULT_LVE_MIN_UID = 500
|
73
74
|
|
74
75
|
# Size limits
|
75
76
|
MESSAGE_SERVER_MAX_USERNAME_SIZE = 100
|
@@ -258,7 +258,7 @@ module PhusionPassenger
|
|
258
258
|
end
|
259
259
|
end
|
260
260
|
|
261
|
-
# Method exists for backward
|
261
|
+
# Method exists for backward compatibility with old Nginx config templates
|
262
262
|
def boolean_config_value(val)
|
263
263
|
val ? "on" : "off"
|
264
264
|
end
|
@@ -328,7 +328,8 @@ module CrashWatch
|
|
328
328
|
end
|
329
329
|
elsif result.nil?
|
330
330
|
raise GdbNotFound,
|
331
|
-
"*** ERROR ***: 'gdb'
|
331
|
+
"*** ERROR ***: 'gdb' not found. Please install it (and if using Nginx " +
|
332
|
+
"ensure that PATH isn't filtered out, see also its \"env\" option).\n" +
|
332
333
|
" Debian/Ubuntu: sudo apt-get install gdb\n" +
|
333
334
|
"RedHat/CentOS/Fedora: sudo yum install gdb\n" +
|
334
335
|
" Mac OS X: please install the Developer Tools or XCode\n" +
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: passenger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phusion - http://www.phusion.nl/
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -71,8 +71,6 @@ files:
|
|
71
71
|
- build/apache2.rb
|
72
72
|
- build/basics.rb
|
73
73
|
- build/common_library.rb
|
74
|
-
- build/cplusplus_support.rb
|
75
|
-
- build/cxx_dependency_map.rb
|
76
74
|
- build/cxx_tests.rb
|
77
75
|
- build/documentation.rb
|
78
76
|
- build/integration_tests.rb
|
@@ -83,6 +81,9 @@ files:
|
|
83
81
|
- build/packaging.rb
|
84
82
|
- build/ruby_extension.rb
|
85
83
|
- build/ruby_tests.rb
|
84
|
+
- build/support/cplusplus.rb
|
85
|
+
- build/support/cxx_dependency_map.rb
|
86
|
+
- build/support/general.rb
|
86
87
|
- build/test_basics.rb
|
87
88
|
- configure
|
88
89
|
- dev/ci/inituidgid
|
@@ -407,6 +408,7 @@ files:
|
|
407
408
|
- src/cxx_supportlib/Integrations/LibevJsonUtils.h
|
408
409
|
- src/cxx_supportlib/Logging.cpp
|
409
410
|
- src/cxx_supportlib/Logging.h
|
411
|
+
- src/cxx_supportlib/LveLoggingDecorator.h
|
410
412
|
- src/cxx_supportlib/MemoryKit/mbuf.cpp
|
411
413
|
- src/cxx_supportlib/MemoryKit/mbuf.h
|
412
414
|
- src/cxx_supportlib/MemoryKit/palloc.cpp
|
@@ -511,6 +513,7 @@ files:
|
|
511
513
|
- src/cxx_supportlib/oxt/system_calls.hpp
|
512
514
|
- src/cxx_supportlib/oxt/thread.hpp
|
513
515
|
- src/cxx_supportlib/oxt/tracable_exception.hpp
|
516
|
+
- src/cxx_supportlib/vendor-copy/adhoc_lve.h
|
514
517
|
- src/cxx_supportlib/vendor-copy/libuv/AUTHORS
|
515
518
|
- src/cxx_supportlib/vendor-copy/libuv/ChangeLog
|
516
519
|
- src/cxx_supportlib/vendor-copy/libuv/LICENSE
|