passenger 4.0.48 → 4.0.49
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 +36 -2
- data/.travis.yml +1 -1
- data/CHANGELOG +16 -0
- data/Rakefile +0 -1
- data/build/apache2.rb +4 -4
- data/build/common_library.rb +18 -18
- data/build/cplusplus_support.rb +2 -2
- data/build/documentation.rb +1 -1
- data/build/integration_tests.rb +12 -4
- data/build/misc.rb +12 -7
- data/build/packaging.rb +14 -14
- data/build/preprocessor.rb +10 -10
- data/build/rake_extensions.rb +11 -11
- data/build/ruby_extension.rb +2 -2
- data/dev/ci/inituidgid +24 -0
- data/dev/ci/run_jenkins.sh +57 -0
- data/dev/ci/run_rpm_tests.sh +77 -0
- data/dev/{run_travis.sh → ci/run_travis.sh} +60 -4
- data/doc/Users guide Nginx.txt +2 -2
- data/doc/users_guide_snippets/environment_variables.txt +0 -2
- data/doc/users_guide_snippets/tips.txt +20 -1
- data/ext/apache2/Bucket.cpp +18 -18
- data/ext/apache2/Bucket.h +4 -4
- data/ext/apache2/Configuration.cpp +7 -7
- data/ext/apache2/Configuration.hpp +43 -43
- data/ext/apache2/DirectoryMapper.h +5 -5
- data/ext/apache2/Hooks.cpp +142 -142
- data/ext/apache2/MergeDirConfig.cpp +40 -40
- data/ext/common/Account.h +17 -17
- data/ext/common/AccountsDatabase.h +9 -9
- data/ext/common/AgentsStarter.cpp +2 -2
- data/ext/common/AgentsStarter.h +40 -40
- data/ext/common/ApplicationPool2/Common.h +10 -6
- data/ext/common/ApplicationPool2/ComponentInfo.h +2 -2
- data/ext/common/ApplicationPool2/DirectSpawner.h +17 -17
- data/ext/common/ApplicationPool2/DummySpawner.h +5 -5
- data/ext/common/ApplicationPool2/Group.h +54 -38
- data/ext/common/ApplicationPool2/Implementation.cpp +76 -49
- data/ext/common/ApplicationPool2/Options.h +98 -91
- data/ext/common/ApplicationPool2/Pool.h +70 -69
- data/ext/common/ApplicationPool2/Process.h +21 -21
- data/ext/common/ApplicationPool2/Session.h +11 -11
- data/ext/common/ApplicationPool2/SmartSpawner.h +60 -60
- data/ext/common/ApplicationPool2/Socket.h +19 -19
- data/ext/common/ApplicationPool2/Spawner.h +64 -72
- data/ext/common/ApplicationPool2/SpawnerFactory.h +4 -4
- data/ext/common/ApplicationPool2/SuperGroup.h +41 -41
- data/ext/common/BackgroundEventLoop.cpp +1 -1
- data/ext/common/BackgroundEventLoop.h +2 -2
- data/ext/common/Constants.h +1 -1
- data/ext/common/EventedBufferedInput.h +5 -5
- data/ext/common/EventedClient.h +51 -51
- data/ext/common/EventedMessageServer.h +39 -39
- data/ext/common/EventedServer.h +32 -32
- data/ext/common/Exceptions.h +23 -23
- data/ext/common/FileDescriptor.h +18 -18
- data/ext/common/Logging.cpp +1 -1
- data/ext/common/MessageClient.h +27 -27
- data/ext/common/MessageReadersWriters.h +79 -79
- data/ext/common/MessageServer.h +59 -59
- data/ext/common/RandomGenerator.h +12 -12
- data/ext/common/ResourceLocator.h +8 -8
- data/ext/common/SafeLibev.h +54 -25
- data/ext/common/ServerInstanceDir.h +31 -31
- data/ext/common/StaticString.h +50 -48
- data/ext/common/Utils.cpp +73 -78
- data/ext/common/Utils.h +6 -6
- data/ext/common/Utils/Base64.cpp +3 -3
- data/ext/common/Utils/Base64.h +7 -7
- data/ext/common/Utils/BlockingQueue.h +9 -9
- data/ext/common/Utils/BufferedIO.h +17 -17
- data/ext/common/Utils/CachedFileStat.hpp +16 -16
- data/ext/common/Utils/Dechunker.h +25 -25
- data/ext/common/Utils/FileChangeChecker.h +10 -10
- data/ext/common/Utils/MemZeroGuard.h +5 -5
- data/ext/common/Utils/MemoryBarrier.h +1 -1
- data/ext/common/Utils/MessageIO.h +61 -61
- data/ext/common/Utils/ProcessMetricsCollector.h +40 -40
- data/ext/common/Utils/ScopeGuard.h +7 -7
- data/ext/common/Utils/SpeedMeter.h +1 -1
- data/ext/common/Utils/StrIntUtils.cpp +13 -13
- data/ext/common/Utils/StrIntUtils.h +3 -3
- data/ext/common/Utils/StringScanning.h +5 -5
- data/ext/common/Utils/SystemMetricsCollector.h +2 -2
- data/ext/common/Utils/SystemTime.h +10 -10
- data/ext/common/Utils/Template.h +2 -2
- data/ext/common/Utils/Timer.h +6 -6
- data/ext/common/Utils/VariantMap.h +29 -29
- data/ext/common/agents/Base.cpp +19 -19
- data/ext/common/agents/HelperAgent/AgentOptions.h +1 -1
- data/ext/common/agents/HelperAgent/FileBackedPipe.h +6 -6
- data/ext/common/agents/HelperAgent/Main.cpp +44 -43
- data/ext/common/agents/HelperAgent/RequestHandler.cpp +4 -4
- data/ext/common/agents/HelperAgent/RequestHandler.h +29 -28
- data/ext/common/agents/HelperAgent/ScgiRequestParser.h +56 -50
- data/ext/common/agents/LoggingAgent/AdminController.h +8 -8
- data/ext/common/agents/LoggingAgent/DataStoreId.h +17 -17
- data/ext/common/agents/LoggingAgent/FilterSupport.h +167 -167
- data/ext/common/agents/LoggingAgent/LoggingServer.h +122 -122
- data/ext/common/agents/LoggingAgent/Main.cpp +7 -7
- data/ext/common/agents/LoggingAgent/RemoteSender.h +54 -54
- data/ext/common/agents/SpawnPreparer.cpp +4 -4
- data/ext/common/agents/TempDirToucher.c +2 -2
- data/ext/common/agents/Watchdog/AgentWatcher.cpp +47 -47
- data/ext/common/agents/Watchdog/HelperAgentWatcher.cpp +7 -7
- data/ext/common/agents/Watchdog/LoggingAgentWatcher.cpp +7 -7
- data/ext/common/agents/Watchdog/Main.cpp +22 -22
- data/ext/common/agents/Watchdog/ServerInstanceDirToucher.cpp +9 -9
- data/ext/libeio/eio.c +1 -1
- data/ext/nginx/Configuration.c +30 -30
- data/ext/nginx/Configuration.h +1 -1
- data/ext/nginx/ContentHandler.c +54 -54
- data/ext/nginx/ContentHandler.h +3 -3
- data/ext/nginx/StaticContentHandler.c +2 -2
- data/ext/nginx/ngx_http_passenger_module.c +21 -21
- data/ext/oxt/detail/backtrace_enabled.hpp +1 -1
- data/ext/oxt/detail/context.hpp +1 -1
- data/ext/oxt/detail/spin_lock_darwin.hpp +4 -4
- data/ext/oxt/detail/spin_lock_gcc_x86.hpp +3 -3
- data/ext/oxt/detail/spin_lock_pthreads.hpp +4 -4
- data/ext/oxt/detail/tracable_exception_disabled.hpp +1 -1
- data/ext/oxt/dynamic_thread_group.hpp +18 -18
- data/ext/oxt/implementation.cpp +9 -8
- data/ext/oxt/macros.hpp +2 -2
- data/ext/oxt/system_calls.cpp +11 -11
- data/ext/oxt/system_calls.hpp +13 -13
- data/ext/oxt/thread.hpp +22 -14
- data/ext/ruby/passenger_native_support.c +55 -55
- data/lib/phusion_passenger.rb +24 -24
- data/lib/phusion_passenger/common_library.rb +2 -0
- data/lib/phusion_passenger/loader_shared_helpers.rb +18 -18
- data/lib/phusion_passenger/packaging.rb +9 -4
- data/lib/phusion_passenger/platform_info/apache.rb +45 -31
- data/lib/phusion_passenger/platform_info/compiler.rb +11 -11
- data/lib/phusion_passenger/rack/thread_handler_extension.rb +1 -1
- data/lib/phusion_passenger/request_handler/thread_handler.rb +8 -8
- data/lib/phusion_passenger/standalone/app_finder.rb +16 -16
- data/lib/phusion_passenger/standalone/command.rb +22 -22
- data/packaging/rpm/LICENSE.txt +19 -0
- data/packaging/rpm/Makefile +13 -0
- data/packaging/rpm/README.md +41 -0
- data/packaging/rpm/Vagrantfile +38 -0
- data/{rpm/Vagrantfile → packaging/rpm/Vagrantfile.centos} +0 -0
- data/packaging/rpm/build +170 -0
- data/packaging/rpm/create_project +41 -0
- data/packaging/rpm/git_update +88 -0
- data/packaging/rpm/image/Dockerfile +37 -0
- data/packaging/rpm/image/Gemfile +3 -0
- data/packaging/rpm/image/Gemfile.lock +12 -0
- data/packaging/rpm/image/RPM-GPG-KEY-amazon-ga +19 -0
- data/packaging/rpm/image/amazon2014-i386.cfg +96 -0
- data/packaging/rpm/image/amazon2014-x86_64.cfg +96 -0
- data/packaging/rpm/image/site-defaults.cfg +168 -0
- data/packaging/rpm/internal/build_tasks.rb +238 -0
- data/packaging/rpm/internal/dummygpg +11 -0
- data/packaging/rpm/internal/exec_build +42 -0
- data/packaging/rpm/internal/get_distro_arch +14 -0
- data/packaging/rpm/internal/get_distro_id +10 -0
- data/packaging/rpm/internal/git_update +27 -0
- data/packaging/rpm/internal/inituidgid +17 -0
- data/packaging/rpm/internal/my_init +344 -0
- data/packaging/rpm/internal/python27 +3 -0
- data/packaging/rpm/internal/repo_update +46 -0
- data/packaging/rpm/internal/setuser +26 -0
- data/packaging/rpm/internal/tracking_helper +40 -0
- data/packaging/rpm/jenkins_release +99 -0
- data/packaging/rpm/lib/build_tasks_support.rb +402 -0
- data/packaging/rpm/lib/preprocessor.rb +341 -0
- data/packaging/rpm/nginx_spec/404.html +119 -0
- data/packaging/rpm/nginx_spec/50x.html +119 -0
- data/packaging/rpm/nginx_spec/index.html +116 -0
- data/packaging/rpm/nginx_spec/nginx-auto-cc-gcc.patch +13 -0
- data/packaging/rpm/nginx_spec/nginx-logo.png +0 -0
- data/packaging/rpm/nginx_spec/nginx-upgrade +13 -0
- data/packaging/rpm/nginx_spec/nginx-upgrade.8 +151 -0
- data/packaging/rpm/nginx_spec/nginx.conf +131 -0
- data/packaging/rpm/nginx_spec/nginx.init +144 -0
- data/packaging/rpm/nginx_spec/nginx.logrotate +13 -0
- data/packaging/rpm/nginx_spec/nginx.service +15 -0
- data/packaging/rpm/nginx_spec/nginx.spec.template +559 -0
- data/packaging/rpm/nginx_spec/nginx.sysconfig +4 -0
- data/packaging/rpm/nginx_spec/passenger.conf +9 -0
- data/packaging/rpm/nginx_spec/poweredby.png +0 -0
- data/{rpm → packaging/rpm/passenger_spec}/apache-passenger.conf.in +0 -0
- data/{rpm → packaging/rpm/passenger_spec}/config.json +0 -0
- data/{rpm → packaging/rpm/passenger_spec}/passenger.logrotate +0 -0
- data/{rpm → packaging/rpm/passenger_spec}/passenger.spec.template +58 -31
- data/{rpm → packaging/rpm/passenger_spec}/passenger_dynamic_thread_group.patch +0 -0
- data/{rpm → packaging/rpm/passenger_spec}/passenger_tests_default_config_example.patch +0 -0
- data/{rpm → packaging/rpm/passenger_spec}/rubygem-passenger-4.0.18-GLIBC_HAVE_LONG_LONG.patch +0 -0
- data/{rpm → packaging/rpm/passenger_spec}/rubygem-passenger-4.0.18-gcc47-include-sys_types.patch +0 -0
- data/packaging/rpm/repo_update +114 -0
- data/packaging/rpm/setup-system +60 -0
- data/packaging/rpm/shell +10 -0
- data/resources/templates/standalone/config.erb +3 -1
- data/test/config.json.rpm-automation +1 -1
- data/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp +11 -11
- data/test/cxx/ApplicationPool2/OptionsTest.cpp +5 -5
- data/test/cxx/ApplicationPool2/PoolTest.cpp +129 -89
- data/test/cxx/ApplicationPool2/ProcessTest.cpp +15 -15
- data/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp +22 -22
- data/test/cxx/ApplicationPool2/SpawnerTestCases.cpp +11 -11
- data/test/cxx/ScgiRequestParserTest.cpp +75 -61
- data/test/cxx/UtilsTest.cpp +86 -85
- data/test/gdbinit.example +3 -0
- data/test/integration_tests/nginx_tests.rb +3 -3
- data/test/integration_tests/source_packaging_test.rb +3 -1
- data/test/stub/nginx/nginx.conf.erb +8 -1
- data/test/support/nginx_controller.rb +7 -7
- metadata +62 -17
- metadata.gz.asc +7 -7
- data/build/rpm.rb +0 -128
- data/dev/rpmtool +0 -21
- data/dev/test_rpm_packaging.sh +0 -28
- data/rpm/get_distro_id.py +0 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzZiZGQzODhkNDZjNTUwZjM2M2VlMzI2OTQ3ZGI1NDA5ZmY3NjM1Ng==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NmMxNDdmNzY2MWNjYzllMDBmYzMyODUxZTIzZDA3MzY0ZjU3OTE1MQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTBiZTUxOGE1MTRlMDUxZDljZDBhN2JjYTg3ZGFhODU3ZjM1ODZkMTUwMTcy
|
10
|
+
ZDQwYzFiOTIyM2JiYzcwNjI2NGYwZThhM2NhYjQzNWY3YjEyYTg0MjljMjVm
|
11
|
+
OWFlZGMzNmM2YjM5ODI2ODRiNzgzMmJmNGQ4ODY1ZmJmMmU3MGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzRkYjE0OTg2M2VhYjIxMWQyMmFlODJlMjRlOGU5ODgyOWM5YjliM2NkODJj
|
14
|
+
N2FjNWYwNjUyOGFlOGI2MTVmZGZkYjU1NTYxNzU5MjE2YzRjOGFkN2ZkM2M5
|
15
|
+
YTI4OTZhYTUwODgyY2UwODliMDY1YmZhZDU2ODQ3NDJiODU2MDk=
|
checksums.yaml.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
5
|
+
iQEcBAABAgAGBQJT91guAAoJECrHRaUKISqMi8AIAKcJEymk64GyK27CR7KRYByH
|
6
|
+
OTsizdQ5gTq2pETdjwDjAGn7T1lp1tWObakMbbOw4Fm0MU1kEMFFZg0GK0XTe2N+
|
7
|
+
iF7T4tGP83pgUKNP3uuM4QPgfouVrRUGFNGJOsBiqIFKFTLdiBZkLDYQpOTU3+Q1
|
8
|
+
ZIKKHbzzXoxKYdlpz+AP6OCurqrIIYGlaPmnEqafg1zP99K76HTGmQmL/j3e940q
|
9
|
+
Sp8wPgBXpRDfv9f5oe9yRl46sCI61B+IFgubNG9ECrnTf/I1Qpe4jx7Xv65Ne6sJ
|
10
|
+
EtHbZ5IwJyNnlIqzs7gX5lIIDlRUuA6pThkzD2zlf6em5mdDe4Yge8nn47/lMfI=
|
11
|
+
=vGWc
|
12
12
|
-----END PGP SIGNATURE-----
|
data.tar.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
5
|
+
iQEcBAABAgAGBQJT91guAAoJECrHRaUKISqMhbwIAKnAe12hzjsoxbOFMTXuX7GE
|
6
|
+
EGEgQeVsTOkrWTJT7cPg+dcyyUCcNf9GggVARjCRpFOaUcTvwxi+kk53GcicOUex
|
7
|
+
FKheeJe2cX7iwrS/yScE4sECFVYfz/tE0J78yhDlRGWPUYHg/0aRkPMIEIyxEoNl
|
8
|
+
4RuLoy12RMRRFoVa57sfZXzvui7HpGOKFkqvpo7mcKATkw8I+9bl5rAY4cSp0CBf
|
9
|
+
RNfO3BvSRNUcV0dueiomegep+c4ANiks/w4kJ/I9rpjs5hi5Y/1jevnBZqpTjD3O
|
10
|
+
Zhp2plPWifd2gAlasT7gzUdjg2MTnz10ejXpcgree80BcR7jAaCjwp0pQQjwxNI=
|
11
|
+
=sAyH
|
12
12
|
-----END PGP SIGNATURE-----
|
data/.editorconfig
CHANGED
@@ -6,14 +6,48 @@ root = true
|
|
6
6
|
end_of_line = lf
|
7
7
|
charset = utf-8
|
8
8
|
|
9
|
-
[
|
9
|
+
[doc/*.txt]
|
10
|
+
indent_style=tab
|
11
|
+
indent_size=4
|
12
|
+
|
13
|
+
[doc/*/*.txt]
|
14
|
+
indent_style=tab
|
15
|
+
indent_size=4
|
16
|
+
|
17
|
+
[*.cpp]
|
18
|
+
indent_style = tab
|
19
|
+
indent_size = 4
|
20
|
+
trim_trailing_whitespace = true
|
21
|
+
insert_final_newline = true
|
22
|
+
|
23
|
+
[*.c]
|
24
|
+
indent_style = tab
|
25
|
+
indent_size = 4
|
26
|
+
trim_trailing_whitespace = true
|
27
|
+
insert_final_newline = true
|
28
|
+
|
29
|
+
[*.h]
|
10
30
|
indent_style = tab
|
11
31
|
indent_size = 4
|
12
32
|
trim_trailing_whitespace = true
|
33
|
+
insert_final_newline = true
|
13
34
|
|
14
|
-
[
|
35
|
+
[*.hpp]
|
36
|
+
indent_style = tab
|
37
|
+
indent_size = 4
|
38
|
+
trim_trailing_whitespace = true
|
15
39
|
insert_final_newline = true
|
16
40
|
|
41
|
+
[*.rb]
|
42
|
+
indent_style = tab
|
43
|
+
indent_size = 4
|
44
|
+
trim_trailing_whitespace = true
|
45
|
+
|
46
|
+
[*.js]
|
47
|
+
indent_style = tab
|
48
|
+
indent_size = 4
|
49
|
+
trim_trailing_whitespace = true
|
50
|
+
|
17
51
|
[ext/nginx/{*.c,*.h}]
|
18
52
|
indent_style = space
|
19
53
|
indent_size = 4
|
data/.travis.yml
CHANGED
data/CHANGELOG
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
Release 4.0.49
|
2
|
+
--------------
|
3
|
+
|
4
|
+
* Upgraded the preferred Nginx version to 1.6.1.
|
5
|
+
* Fixed a crash that may be triggered by the `passenger_max_requests` feature.
|
6
|
+
* Introduced the `spawn_failed` hook, which is called when an application
|
7
|
+
process fails to spawn. You could use this hook to setup an error
|
8
|
+
notification system. Closes GH-1252.
|
9
|
+
* Fonts, RSS and XML are now gzip-compressed by default in Phusion Passenger
|
10
|
+
Standalone. Thanks to Jacob Elder. Closes GH-1254.
|
11
|
+
* Fixed some user and group information lookup issues. Closes GH-1253.
|
12
|
+
* Fixed some request handling crashes. Closes GH-1250.
|
13
|
+
* Fixed some compilation problems on Gentoo. Closes GH-1261.
|
14
|
+
* Fixed some compilation problems on Solaris. Closes GH-1260.
|
15
|
+
|
16
|
+
|
1
17
|
Release 4.0.48
|
2
18
|
--------------
|
3
19
|
|
data/Rakefile
CHANGED
data/build/apache2.rb
CHANGED
@@ -63,7 +63,7 @@ APACHE2_MODULE_CFLAGS =
|
|
63
63
|
"#{EXTRA_CFLAGS}"
|
64
64
|
APACHE2_MODULE_CXXFLAGS =
|
65
65
|
"#{EXTRA_PRE_CXXFLAGS} " <<
|
66
|
-
"-Iext -Iext/common #{PlatformInfo.
|
66
|
+
"-Iext -Iext/common #{PlatformInfo.apache2_module_cxxflags} " <<
|
67
67
|
"#{EXTRA_CXXFLAGS}"
|
68
68
|
|
69
69
|
APACHE2_MODULE_BOOST_OXT_LIBRARY = define_libboost_oxt_task("apache2",
|
@@ -126,16 +126,16 @@ file APACHE2_MODULE => dependencies do
|
|
126
126
|
PlatformInfo.apxs2.nil? and raise "Could not find 'apxs' or 'apxs2'."
|
127
127
|
PlatformInfo.apache2ctl.nil? and raise "Could not find 'apachectl' or 'apache2ctl'."
|
128
128
|
PlatformInfo.httpd.nil? and raise "Could not find the Apache web server binary."
|
129
|
-
|
129
|
+
|
130
130
|
sources = (APACHE2_MODULE_OBJECTS + [APACHE2_MOD_PASSENGER_O]).join(' ')
|
131
131
|
linkflags =
|
132
132
|
"#{EXTRA_PRE_CXX_LDFLAGS} " <<
|
133
133
|
"#{APACHE2_MODULE_COMMON_LIBRARIES.join(' ')} " <<
|
134
134
|
"#{APACHE2_MODULE_BOOST_OXT_LIBRARY} " <<
|
135
|
-
"#{PlatformInfo.
|
135
|
+
"#{PlatformInfo.apache2_module_cxx_ldflags} " <<
|
136
136
|
"#{PlatformInfo.portability_cxx_ldflags} " <<
|
137
137
|
"#{EXTRA_CXX_LDFLAGS} "
|
138
|
-
|
138
|
+
|
139
139
|
create_shared_library(APACHE2_MODULE, sources, linkflags)
|
140
140
|
end
|
141
141
|
|
data/build/common_library.rb
CHANGED
@@ -35,18 +35,18 @@ PhusionPassenger.require_passenger_lib 'common_library'
|
|
35
35
|
def define_libboost_oxt_task(namespace, output_dir, extra_compiler_flags = nil)
|
36
36
|
output_file = "#{output_dir}.a"
|
37
37
|
flags = "-Iext #{extra_compiler_flags} #{EXTRA_CXXFLAGS}"
|
38
|
-
|
38
|
+
|
39
39
|
if false && boolean_option('RELEASE')
|
40
40
|
# Disable RELEASE support. Passenger Standalone wants to link to the
|
41
41
|
# common library but does not know whether it was compiled with RELEASE
|
42
42
|
# or not. See http://code.google.com/p/phusion-passenger/issues/detail?id=808
|
43
43
|
sources = Dir['ext/boost/libs/**/*.cpp'] + Dir['ext/oxt/*.cpp']
|
44
44
|
sources.sort!
|
45
|
-
|
45
|
+
|
46
46
|
aggregate_source = "#{output_dir}/aggregate.cpp"
|
47
47
|
aggregate_object = "#{output_dir}/aggregate.o"
|
48
48
|
object_files = [aggregate_object]
|
49
|
-
|
49
|
+
|
50
50
|
file(aggregate_object => sources) do
|
51
51
|
sh "mkdir -p #{output_dir}" if !File.directory?(output_dir)
|
52
52
|
aggregate_content = %Q{
|
@@ -71,13 +71,13 @@ def define_libboost_oxt_task(namespace, output_dir, extra_compiler_flags = nil)
|
|
71
71
|
boost_output_dir = "#{output_dir}/boost"
|
72
72
|
object_file = "#{boost_output_dir}/#{object_name}"
|
73
73
|
boost_object_files << object_file
|
74
|
-
|
74
|
+
|
75
75
|
file object_file => source_file do
|
76
76
|
sh "mkdir -p #{boost_output_dir}" if !File.directory?(boost_output_dir)
|
77
77
|
compile_cxx(source_file, "#{flags} -o #{object_file}")
|
78
78
|
end
|
79
79
|
end
|
80
|
-
|
80
|
+
|
81
81
|
# Define compilation targets for .cpp files in ext/oxt.
|
82
82
|
oxt_object_files = []
|
83
83
|
oxt_dependency_files = Dir["ext/oxt/*.hpp"] + Dir["ext/oxt/detail/*.hpp"]
|
@@ -89,22 +89,22 @@ def define_libboost_oxt_task(namespace, output_dir, extra_compiler_flags = nil)
|
|
89
89
|
|
90
90
|
file object_file => [source_file, *oxt_dependency_files] do
|
91
91
|
sh "mkdir -p #{oxt_output_dir}" if !File.directory?(oxt_output_dir)
|
92
|
-
compile_cxx(source_file, "#{flags} -o #{object_file}")
|
92
|
+
compile_cxx(source_file, "-O2 #{flags} -o #{object_file}".strip)
|
93
93
|
end
|
94
94
|
end
|
95
|
-
|
95
|
+
|
96
96
|
object_files = boost_object_files + oxt_object_files
|
97
97
|
end
|
98
|
-
|
98
|
+
|
99
99
|
file(output_file => object_files) do
|
100
100
|
sh "mkdir -p #{output_dir}"
|
101
101
|
create_static_library(output_file, object_files.join(' '))
|
102
102
|
end
|
103
|
-
|
103
|
+
|
104
104
|
task "#{namespace}:clean" do
|
105
105
|
sh "rm -rf #{output_file} #{output_dir}"
|
106
106
|
end
|
107
|
-
|
107
|
+
|
108
108
|
return output_file
|
109
109
|
end
|
110
110
|
|
@@ -116,9 +116,9 @@ if USE_VENDORED_LIBEV
|
|
116
116
|
LIBEV_CFLAGS = "-Iext/libev"
|
117
117
|
LIBEV_LIBS = LIBEV_OUTPUT_DIR + ".libs/libev.a"
|
118
118
|
LIBEV_TARGET = LIBEV_LIBS
|
119
|
-
|
119
|
+
|
120
120
|
task :libev => LIBEV_TARGET
|
121
|
-
|
121
|
+
|
122
122
|
dependencies = [
|
123
123
|
"ext/libev/configure",
|
124
124
|
"ext/libev/config.h.in",
|
@@ -136,7 +136,7 @@ if USE_VENDORED_LIBEV
|
|
136
136
|
# do, so we force our compiler choice.
|
137
137
|
"CC='#{cc}' CXX='#{cxx}' CFLAGS='#{cflags}' orig_CFLAGS=1"
|
138
138
|
end
|
139
|
-
|
139
|
+
|
140
140
|
libev_sources = Dir["ext/libev/{*.c,*.h}"]
|
141
141
|
file LIBEV_OUTPUT_DIR + ".libs/libev.a" => [LIBEV_OUTPUT_DIR + "Makefile"] + libev_sources do
|
142
142
|
sh "rm -f #{LIBEV_OUTPUT_DIR}/libev.la"
|
@@ -148,7 +148,7 @@ if USE_VENDORED_LIBEV
|
|
148
148
|
sh "cd #{LIBEV_OUTPUT_DIR} && make maintainer-clean"
|
149
149
|
end
|
150
150
|
end
|
151
|
-
|
151
|
+
|
152
152
|
task :clean => 'libev:clean'
|
153
153
|
else
|
154
154
|
LIBEV_CFLAGS = string_option('LIBEV_CFLAGS', '-I/usr/include/libev')
|
@@ -168,9 +168,9 @@ if USE_VENDORED_LIBEIO
|
|
168
168
|
LIBEIO_CFLAGS = "-Iext/libeio"
|
169
169
|
LIBEIO_LIBS = LIBEIO_OUTPUT_DIR + ".libs/libeio.a"
|
170
170
|
LIBEIO_TARGET = LIBEIO_LIBS
|
171
|
-
|
171
|
+
|
172
172
|
task :libeio => LIBEIO_TARGET
|
173
|
-
|
173
|
+
|
174
174
|
dependencies = [
|
175
175
|
"ext/libeio/configure",
|
176
176
|
"ext/libeio/config.h.in",
|
@@ -189,13 +189,13 @@ if USE_VENDORED_LIBEIO
|
|
189
189
|
# do, so we force our compiler choice.
|
190
190
|
"CC='#{cc}' CXX='#{cxx}' CFLAGS='#{cflags}'"
|
191
191
|
end
|
192
|
-
|
192
|
+
|
193
193
|
libeio_sources = Dir["ext/libeio/{*.c,*.h}"]
|
194
194
|
file LIBEIO_OUTPUT_DIR + ".libs/libeio.a" => [LIBEIO_OUTPUT_DIR + "Makefile"] + libeio_sources do
|
195
195
|
sh "rm -f #{LIBEIO_OUTPUT_DIR}/libeio.la"
|
196
196
|
sh "cd #{LIBEIO_OUTPUT_DIR} && make libeio.la"
|
197
197
|
end
|
198
|
-
|
198
|
+
|
199
199
|
task :clean do
|
200
200
|
if File.exist?(LIBEIO_OUTPUT_DIR + "Makefile")
|
201
201
|
sh "cd #{LIBEIO_OUTPUT_DIR} && make maintainer-clean"
|
data/build/cplusplus_support.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Phusion Passenger - https://www.phusionpassenger.com/
|
2
|
-
# Copyright (c) 2010-
|
2
|
+
# Copyright (c) 2010-2014 Phusion
|
3
3
|
#
|
4
4
|
# "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
|
5
5
|
#
|
@@ -87,7 +87,7 @@ def create_shared_library(target, sources, flags = "#{EXTRA_PRE_CXXFLAGS} #{EXTR
|
|
87
87
|
else
|
88
88
|
shlib_flag = "-shared"
|
89
89
|
end
|
90
|
-
if PhusionPassenger::PlatformInfo.
|
90
|
+
if PhusionPassenger::PlatformInfo.cxx_is_sun_studio?
|
91
91
|
fPIC = "-KPIC"
|
92
92
|
else
|
93
93
|
fPIC = "-fPIC"
|
data/build/documentation.rb
CHANGED
data/build/integration_tests.rb
CHANGED
@@ -23,11 +23,19 @@
|
|
23
23
|
|
24
24
|
### Integration tests ###
|
25
25
|
|
26
|
+
def integration_test_dependencies(runtime_target_name)
|
27
|
+
if string_option('PASSENGER_LOCATION_CONFIGURATION_FILE')
|
28
|
+
return []
|
29
|
+
else
|
30
|
+
return [runtime_target_name, NATIVE_SUPPORT_TARGET].compact
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
26
34
|
desc "Run all integration tests"
|
27
35
|
task 'test:integration' => ['test:integration:apache2', 'test:integration:nginx'] do
|
28
36
|
end
|
29
37
|
|
30
|
-
dependencies =
|
38
|
+
dependencies = integration_test_dependencies(:_apache2)
|
31
39
|
desc "Run Apache 2 integration tests"
|
32
40
|
task 'test:integration:apache2' => dependencies do
|
33
41
|
if PlatformInfo.rspec.nil?
|
@@ -45,7 +53,7 @@ task 'test:integration:apache2' => dependencies do
|
|
45
53
|
end
|
46
54
|
end
|
47
55
|
|
48
|
-
dependencies =
|
56
|
+
dependencies = integration_test_dependencies(:_nginx)
|
49
57
|
desc "Run Nginx integration tests"
|
50
58
|
task 'test:integration:nginx' => dependencies do
|
51
59
|
if PlatformInfo.rspec.nil?
|
@@ -67,7 +75,7 @@ task 'test:integration:nginx' => dependencies do
|
|
67
75
|
end
|
68
76
|
end
|
69
77
|
|
70
|
-
dependencies =
|
78
|
+
dependencies = integration_test_dependencies(:_nginx)
|
71
79
|
desc "Run Passenger Standalone integration tests"
|
72
80
|
task 'test:integration:standalone' => dependencies do
|
73
81
|
if PlatformInfo.rspec.nil?
|
@@ -124,7 +132,7 @@ task 'test:integration:native_packaging' do
|
|
124
132
|
sh "cd test && exec #{command}"
|
125
133
|
end
|
126
134
|
|
127
|
-
dependencies =
|
135
|
+
dependencies = integration_test_dependencies(:_apache2)
|
128
136
|
desc "Run the 'apache2' integration test infinitely, and abort if/when it fails"
|
129
137
|
task 'test:restart' => dependencies do
|
130
138
|
require 'shellwords'
|
data/build/misc.rb
CHANGED
@@ -60,18 +60,18 @@ def extract_latest_news_contents_and_items
|
|
60
60
|
# * More text.
|
61
61
|
# * A header.
|
62
62
|
# With yet more text.
|
63
|
-
#
|
63
|
+
#
|
64
64
|
# Release y.y.y
|
65
65
|
# -------------
|
66
66
|
# .....
|
67
67
|
contents = File.read("CHANGELOG")
|
68
|
-
|
68
|
+
|
69
69
|
# We're only interested in the latest release, so extract the text for that.
|
70
70
|
contents =~ /\A(Release.*?)^(Release|Older releases)/m
|
71
71
|
contents = $1
|
72
72
|
contents.sub!(/\A.*?\n-+\n+/m, '')
|
73
73
|
contents.sub!(/\n+\Z/, '')
|
74
|
-
|
74
|
+
|
75
75
|
# Now split the text into individual items.
|
76
76
|
items = contents.split(/^ \* /)
|
77
77
|
items.shift while items.first == ""
|
@@ -83,7 +83,7 @@ desc "Convert the Changelog items for the latest release to HTML"
|
|
83
83
|
task :changelog_as_html do
|
84
84
|
require 'cgi'
|
85
85
|
contents, items = extract_latest_news_contents_and_items
|
86
|
-
|
86
|
+
|
87
87
|
puts "<ul>"
|
88
88
|
items.each do |item|
|
89
89
|
def format_paragraph(text)
|
@@ -92,13 +92,13 @@ task :changelog_as_html do
|
|
92
92
|
while text.index(' ')
|
93
93
|
text.gsub!(' ', ' ')
|
94
94
|
end
|
95
|
-
|
95
|
+
|
96
96
|
# Auto-link to issue tracker.
|
97
97
|
text.gsub!(/(bug #|issue #|GH-)(\d+)/i) do
|
98
98
|
url = "https://github.com/phusion/passenger/issues/#{$2}"
|
99
99
|
%Q(<{a href="#{url}"}>#{$1}#{$2}<{/a}>)
|
100
100
|
end
|
101
|
-
|
101
|
+
|
102
102
|
text.strip!
|
103
103
|
text = CGI.escapeHTML(text)
|
104
104
|
text.gsub!(%r(<\{(.*?)\}>(.*?)<\{/(.*?)\}>)) do
|
@@ -183,9 +183,14 @@ task :compile_app => dependencies do
|
|
183
183
|
end
|
184
184
|
source = '_source.cpp'
|
185
185
|
end
|
186
|
+
object = source.sub(/\.cpp$/, '.o')
|
186
187
|
exe = source.sub(/\.cpp$/, '')
|
187
188
|
begin
|
188
|
-
|
189
|
+
compile_cxx(source,
|
190
|
+
"-DSTANDALONE -o #{object} " <<
|
191
|
+
"-Iext -Iext/common #{LIBEV_CFLAGS} #{LIBEIO_CFLAGS} " <<
|
192
|
+
"#{EXTRA_CXXFLAGS}")
|
193
|
+
create_executable(exe, object,
|
189
194
|
"-DSTANDALONE " <<
|
190
195
|
"-Iext -Iext/common #{LIBEV_CFLAGS} #{LIBEIO_CFLAGS} " <<
|
191
196
|
"#{EXTRA_CXXFLAGS} " <<
|
data/build/packaging.rb
CHANGED
@@ -121,7 +121,7 @@ task 'package:release' => ['package:set_official', 'package:gem', 'package:tarba
|
|
121
121
|
basename = "#{PhusionPassenger::PACKAGE_NAME}-#{PhusionPassenger::VERSION_STRING}"
|
122
122
|
version = PhusionPassenger::VERSION_STRING
|
123
123
|
is_beta = !!version.split('.')[3]
|
124
|
-
|
124
|
+
|
125
125
|
if !`git status --porcelain | grep -Ev '^\\?\\? '`.empty?
|
126
126
|
STDERR.puts "-------------------"
|
127
127
|
abort "*** ERROR: There are uncommitted files. See 'git status'"
|
@@ -155,7 +155,7 @@ task 'package:release' => ['package:set_official', 'package:gem', 'package:tarba
|
|
155
155
|
puts "Proceed with pushing tag to remote Git repo and uploading the gem and signatures? [y/n]"
|
156
156
|
if STDIN.readline == "y\n"
|
157
157
|
sh "git push origin #{git_tag}"
|
158
|
-
|
158
|
+
|
159
159
|
if is_open_source?
|
160
160
|
sh "s3cmd -P put #{PKG_DIR}/passenger-#{version}.{gem,tar.gz,gem.asc,tar.gz.asc} s3://phusion-passenger/releases/"
|
161
161
|
sh "gem push #{PKG_DIR}/passenger-#{version}.gem"
|
@@ -293,7 +293,7 @@ task 'package:sign' do
|
|
293
293
|
password = h.ask("Password for software-signing@phusion.nl GPG key: ") { |q| q.echo = false }
|
294
294
|
passphrase_opt = "--passphrase-file .gpg-password"
|
295
295
|
end
|
296
|
-
|
296
|
+
|
297
297
|
begin
|
298
298
|
if password
|
299
299
|
File.open(".gpg-password", "w", 0600) do |f|
|
@@ -428,7 +428,7 @@ task :fakeroot => [:apache2, :nginx, :doc] do
|
|
428
428
|
psg_apache2_module_path = ENV['APACHE2_MODULE_PATH'] || "#{fs_libdir}/apache2/modules/mod_passenger.so"
|
429
429
|
psg_ruby_extension_source_dir = "#{fs_datadir}/#{GLOBAL_NAMESPACE_DIRNAME}/ruby_extension_source"
|
430
430
|
psg_nginx_module_source_dir = "#{fs_datadir}/#{GLOBAL_NAMESPACE_DIRNAME}/ngx_http_passenger_module"
|
431
|
-
|
431
|
+
|
432
432
|
fakeroot = "pkg/fakeroot"
|
433
433
|
fake_rubylibdir = "#{fakeroot}#{psg_rubylibdir}"
|
434
434
|
fake_nodelibdir = "#{fakeroot}#{psg_nodelibdir}"
|
@@ -446,10 +446,10 @@ task :fakeroot => [:apache2, :nginx, :doc] do
|
|
446
446
|
fake_nginx_module_source_dir = "#{fakeroot}#{psg_nginx_module_source_dir}"
|
447
447
|
|
448
448
|
native_packaging_method = ENV['NATIVE_PACKAGING_METHOD'] || "deb"
|
449
|
-
|
449
|
+
|
450
450
|
sh "rm -rf #{fakeroot}"
|
451
451
|
sh "mkdir -p #{fakeroot}"
|
452
|
-
|
452
|
+
|
453
453
|
# Ruby sources
|
454
454
|
sh "mkdir -p #{fake_rubylibdir}"
|
455
455
|
sh "cp #{PhusionPassenger.ruby_libdir}/phusion_passenger.rb #{fake_rubylibdir}/"
|
@@ -463,24 +463,24 @@ task :fakeroot => [:apache2, :nginx, :doc] do
|
|
463
463
|
sh "mkdir -p #{fake_libdir}"
|
464
464
|
sh "cp -R #{PhusionPassenger.lib_dir}/common #{fake_libdir}/"
|
465
465
|
sh "rm -rf #{fake_libdir}/common/libboost_oxt"
|
466
|
-
|
466
|
+
|
467
467
|
# Ruby extension binaries
|
468
468
|
sh "mkdir -p #{fake_native_support_dir}"
|
469
469
|
native_support_archdir = PlatformInfo.ruby_extension_binary_compatibility_id
|
470
470
|
sh "mkdir -p #{fake_native_support_dir}"
|
471
471
|
sh "cp -R buildout/ruby/#{native_support_archdir}/*.#{LIBEXT} #{fake_native_support_dir}/"
|
472
|
-
|
472
|
+
|
473
473
|
# Agents
|
474
474
|
sh "mkdir -p #{fake_agents_dir}"
|
475
475
|
sh "cp -R #{PhusionPassenger.agents_dir}/* #{fake_agents_dir}/"
|
476
476
|
sh "rm -rf #{fake_agents_dir}/*.dSYM"
|
477
477
|
sh "rm -rf #{fake_agents_dir}/*/*.dSYM"
|
478
478
|
sh "rm -rf #{fake_agents_dir}/*.o"
|
479
|
-
|
479
|
+
|
480
480
|
# Helper scripts
|
481
481
|
sh "mkdir -p #{fake_helper_scripts_dir}"
|
482
482
|
sh "cp -R #{PhusionPassenger.helper_scripts_dir}/* #{fake_helper_scripts_dir}/"
|
483
|
-
|
483
|
+
|
484
484
|
# Resources
|
485
485
|
sh "mkdir -p #{fake_resources_dir}"
|
486
486
|
sh "cp -R resources/* #{fake_resources_dir}/"
|
@@ -508,12 +508,12 @@ task :fakeroot => [:apache2, :nginx, :doc] do
|
|
508
508
|
# Nginx module sources
|
509
509
|
sh "mkdir -p #{fake_nginx_module_source_dir}"
|
510
510
|
sh "cp ext/nginx/* #{fake_nginx_module_source_dir}/"
|
511
|
-
|
511
|
+
|
512
512
|
# Documentation
|
513
513
|
sh "mkdir -p #{fake_docdir}"
|
514
514
|
sh "cp doc/*.html #{fake_docdir}/"
|
515
515
|
sh "cp -R doc/images #{fake_docdir}/"
|
516
|
-
|
516
|
+
|
517
517
|
# User binaries
|
518
518
|
sh "mkdir -p #{fake_bindir}"
|
519
519
|
Packaging::USER_EXECUTABLES.each do |exe|
|
@@ -522,7 +522,7 @@ task :fakeroot => [:apache2, :nginx, :doc] do
|
|
522
522
|
change_shebang("#{fake_bindir}/#{exe}", "#{fs_bindir}/ruby")
|
523
523
|
end
|
524
524
|
end
|
525
|
-
|
525
|
+
|
526
526
|
# Superuser binaries
|
527
527
|
sh "mkdir -p #{fake_sbindir}"
|
528
528
|
Packaging::SUPER_USER_EXECUTABLES.each do |exe|
|
@@ -531,7 +531,7 @@ task :fakeroot => [:apache2, :nginx, :doc] do
|
|
531
531
|
change_shebang("#{fake_sbindir}/#{exe}", "#{fs_bindir}/ruby")
|
532
532
|
end
|
533
533
|
end
|
534
|
-
|
534
|
+
|
535
535
|
# Apache 2 module
|
536
536
|
sh "mkdir -p #{File.dirname(fake_apache2_module_path)}"
|
537
537
|
sh "cp #{APACHE2_MODULE} #{fake_apache2_module_path}"
|