passenger 4.0.30 → 4.0.31
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.
- data.tar.gz.asc +7 -7
- data/NEWS +31 -0
- data/bin/passenger +5 -5
- data/bin/passenger-config +6 -126
- data/bin/passenger-install-apache2-module +108 -26
- data/bin/passenger-install-nginx-module +81 -27
- data/bin/passenger-memory-stats +7 -6
- data/bin/passenger-status +13 -10
- data/build/agents.rb +8 -12
- data/build/apache2.rb +12 -7
- data/build/basics.rb +28 -20
- data/build/common_library.rb +4 -4
- data/build/cplusplus_support.rb +4 -4
- data/build/cxx_tests.rb +5 -3
- data/build/debian.rb +1 -2
- data/build/integration_tests.rb +25 -9
- data/build/misc.rb +2 -2
- data/build/oxt_tests.rb +5 -6
- data/build/packaging.rb +72 -40
- data/build/ruby_tests.rb +5 -1
- data/build/test_basics.rb +1 -2
- data/debian.template/locations.ini.template +1 -0
- data/debian.template/rules.template +2 -1
- data/dev/install_scripts_bootstrap_code.rb +42 -0
- data/dev/run_travis.sh +1 -0
- data/dev/runner +27 -0
- data/doc/Packaging.txt.md +5 -10
- data/doc/Users guide Apache.idmap.txt +3 -1
- data/doc/Users guide Apache.txt +5 -3
- data/doc/Users guide Nginx.idmap.txt +9 -5
- data/doc/Users guide Nginx.txt +47 -17
- data/doc/users_guide_snippets/environment_variables.txt +2 -2
- data/doc/users_guide_snippets/installation.txt +6 -2
- data/doc/users_guide_snippets/tips.txt +4 -0
- data/ext/apache2/Hooks.cpp +16 -3
- data/ext/common/Account.h +6 -5
- data/ext/common/AgentsStarter.h +1 -1
- data/ext/common/ApplicationPool2/Common.h +72 -0
- data/ext/common/ApplicationPool2/Group.h +263 -148
- data/ext/common/ApplicationPool2/Implementation.cpp +66 -44
- data/ext/common/ApplicationPool2/Options.h +1 -7
- data/ext/common/ApplicationPool2/Pool.h +96 -72
- data/ext/common/ApplicationPool2/Process.h +12 -17
- data/ext/common/ApplicationPool2/Socket.h +4 -4
- data/ext/common/ApplicationPool2/SuperGroup.h +20 -17
- data/ext/common/Constants.h +15 -1
- data/ext/common/MessageServer.h +22 -0
- data/ext/common/Utils.cpp +4 -1
- data/ext/common/Utils.h +3 -1
- data/ext/common/Utils/StrIntUtils.h +1 -0
- data/ext/common/Utils/Timer.h +15 -1
- data/ext/common/Utils/utf8/checked.h +0 -0
- data/ext/common/Utils/utf8/core.h +0 -0
- data/ext/common/Utils/utf8/unchecked.h +0 -0
- data/ext/common/agents/Base.cpp +59 -35
- data/ext/common/agents/HelperAgent/Main.cpp +23 -12
- data/ext/common/agents/HelperAgent/RequestHandler.h +10 -1
- data/ext/common/agents/LoggingAgent/FilterSupport.h +9 -5
- data/ext/common/agents/TempDirToucher.c +12 -3
- data/ext/common/agents/Watchdog/Main.cpp +8 -2
- data/ext/nginx/ConfigurationCommands.c +10 -0
- data/ext/nginx/ConfigurationFields.h +2 -0
- data/ext/nginx/ContentHandler.c +32 -19
- data/ext/nginx/CreateLocationConfig.c +5 -0
- data/ext/nginx/MergeLocationConfig.c +6 -0
- data/ext/nginx/config +13 -6
- data/ext/ruby/passenger_native_support.c +61 -2
- data/helper-scripts/classic-rails-loader.rb +9 -10
- data/helper-scripts/classic-rails-preloader.rb +10 -11
- data/helper-scripts/node-loader.js +3 -2
- data/helper-scripts/rack-loader.rb +8 -9
- data/helper-scripts/rack-preloader.rb +9 -10
- data/lib/phusion_passenger.rb +36 -7
- data/lib/phusion_passenger/abstract_installer.rb +16 -15
- data/lib/phusion_passenger/active_support3_extensions/init.rb +1 -1
- data/lib/phusion_passenger/admin_tools/memory_stats.rb +2 -2
- data/lib/phusion_passenger/admin_tools/server_instance.rb +5 -5
- data/lib/phusion_passenger/analytics_logger.rb +3 -3
- data/lib/phusion_passenger/classic_rails/thread_handler_extension.rb +1 -1
- data/lib/phusion_passenger/config.rb +125 -0
- data/lib/phusion_passenger/config/about_command.rb +183 -0
- data/lib/phusion_passenger/config/command.rb +57 -0
- data/lib/phusion_passenger/config/restart_app_command.rb +146 -0
- data/lib/phusion_passenger/config/utils.rb +108 -0
- data/lib/phusion_passenger/console_text_template.rb +2 -1
- data/lib/phusion_passenger/constants.rb +7 -2
- data/lib/phusion_passenger/loader_shared_helpers.rb +12 -21
- data/lib/phusion_passenger/message_client.rb +15 -4
- data/lib/phusion_passenger/native_support.rb +116 -98
- data/lib/phusion_passenger/nginx/config_options.rb +5 -0
- data/lib/phusion_passenger/platform_info.rb +1 -1
- data/lib/phusion_passenger/platform_info/apache.rb +9 -5
- data/lib/phusion_passenger/platform_info/apache_detector.rb +5 -6
- data/lib/phusion_passenger/platform_info/binary_compatibility.rb +3 -3
- data/lib/phusion_passenger/platform_info/compiler.rb +29 -11
- data/lib/phusion_passenger/platform_info/curl.rb +1 -1
- data/lib/phusion_passenger/platform_info/cxx_portability.rb +30 -16
- data/lib/phusion_passenger/platform_info/depcheck.rb +6 -6
- data/lib/phusion_passenger/platform_info/linux.rb +2 -2
- data/lib/phusion_passenger/platform_info/operating_system.rb +25 -5
- data/lib/phusion_passenger/platform_info/ruby.rb +7 -4
- data/lib/phusion_passenger/platform_info/zlib.rb +1 -1
- data/lib/phusion_passenger/plugin.rb +0 -1
- data/lib/phusion_passenger/preloader_shared_helpers.rb +1 -1
- data/lib/phusion_passenger/public_api.rb +1 -1
- data/lib/phusion_passenger/rack/thread_handler_extension.rb +1 -1
- data/lib/phusion_passenger/request_handler.rb +8 -9
- data/lib/phusion_passenger/request_handler/thread_handler.rb +21 -9
- data/lib/phusion_passenger/ruby_core_enhancements.rb +1 -1
- data/lib/phusion_passenger/standalone/app_finder.rb +2 -2
- data/lib/phusion_passenger/standalone/command.rb +10 -8
- data/lib/phusion_passenger/standalone/help_command.rb +1 -1
- data/lib/phusion_passenger/standalone/main.rb +3 -3
- data/lib/phusion_passenger/standalone/package_runtime_command.rb +2 -2
- data/lib/phusion_passenger/standalone/runtime_installer.rb +55 -13
- data/lib/phusion_passenger/standalone/runtime_locator.rb +3 -3
- data/lib/phusion_passenger/standalone/start_command.rb +6 -7
- data/lib/phusion_passenger/standalone/status_command.rb +1 -1
- data/lib/phusion_passenger/standalone/stop_command.rb +1 -1
- data/lib/phusion_passenger/standalone/utils.rb +1 -1
- data/lib/phusion_passenger/standalone/version_command.rb +2 -3
- data/lib/phusion_passenger/utils.rb +1 -1
- data/lib/phusion_passenger/utils/download.rb +1 -2
- data/lib/phusion_passenger/utils/file_system_watcher.rb +1 -1
- data/lib/phusion_passenger/utils/hosts_file_parser.rb +1 -1
- data/lib/phusion_passenger/utils/tee_input.rb +1 -1
- data/lib/phusion_passenger/utils/terminal_choice_menu.rb +217 -0
- data/lib/phusion_passenger/utils/unseekable_socket.rb +1 -1
- data/resources/templates/apache2/config_snippets.txt.erb +2 -3
- data/resources/templates/apache2/deployment_example.txt.erb +2 -2
- data/resources/templates/apache2/notify_apache_module_installed.txt.erb +3 -0
- data/resources/templates/nginx/config_snippets.txt.erb +1 -1
- data/resources/templates/nginx/deployment_example.txt.erb +2 -2
- data/resources/templates/nginx/nginx_module_sources_not_available.txt.erb +11 -5
- data/rpm/Vagrantfile +1 -0
- data/test/cxx/ApplicationPool2/PoolTest.cpp +224 -35
- data/test/cxx/ApplicationPool2/ProcessTest.cpp +6 -6
- data/test/cxx/MessagePassingTest.cpp +1 -1
- data/test/cxx/RequestHandlerTest.cpp +26 -26
- data/test/integration_tests/apache2_tests.rb +162 -243
- data/test/integration_tests/native_packaging_spec.rb +10 -10
- data/test/integration_tests/nginx_tests.rb +87 -107
- data/test/integration_tests/shared/example_webapp_tests.rb +246 -0
- data/test/integration_tests/source_packaging_test.rb +2 -1
- data/test/integration_tests/standalone_tests.rb +34 -19
- data/test/ruby/admin_tools_spec.rb +4 -4
- data/test/ruby/analytics_logger_spec.rb +1 -1
- data/test/ruby/debug_logging_spec.rb +2 -2
- data/test/ruby/message_channel_spec.rb +1 -1
- data/test/ruby/request_handler_spec.rb +171 -64
- data/test/ruby/shared/loader_sharedspec.rb +5 -5
- data/test/ruby/shared/rails/analytics_logging_extensions_sharedspec.rb +2 -2
- data/test/ruby/spec_helper.rb +4 -4
- data/test/ruby/standalone/runtime_installer_spec.rb +1 -1
- data/test/ruby/standalone/runtime_locator_spec.rb +1 -1
- data/test/ruby/utils/file_system_watcher_spec.rb +1 -1
- data/test/ruby/utils/hosts_file_parser.rb +1 -1
- data/test/ruby/utils/unseekable_socket_spec.rb +1 -1
- data/test/ruby/utils_spec.rb +4 -4
- data/test/stub/apache2/httpd.conf.erb +5 -0
- data/test/stub/index.html +1 -0
- data/test/stub/rack/config.ru +80 -33
- data/test/stub/{rails_apps/1.2/empty/app/models → rack/public}/.gitignore +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/Rakefile +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/controllers/application_controller.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/controllers/recipes_controller.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/controllers/uploads_controller.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/controllers/welcome_controller.rb +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/app/helpers/application_helper.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/helpers/recipes_helper.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/helpers/test_helper.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/helpers/uploads_helper.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/helpers/welcome_helper.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/layouts/default.rhtml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/recipes/create.rhtml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/recipes/index.rhtml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/recipes/new.rhtml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/uploads/index.rhtml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/uploads/new.html.erb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/welcome/cached.rhtml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/app/views/welcome/index.rhtml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/config/boot.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/config/database.yml +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/config/environment.rb +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/config/environments/development.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/config/environments/production.rb +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/config/initializers/inflections.rb +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/config/initializers/mime_types.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/config/routes.rb +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/log/useless.txt +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/.htaccess +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/public/404.html +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/public/422.html +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/public/500.html +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/dispatch.cgi +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/dispatch.fcgi +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/dispatch.rb +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/public/favicon.ico +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/images/angrywizard.gif +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/images/cookbook.gif +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/images/header.png +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/public/images/rails.png +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/public/robots.txt +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/uploads.html +0 -0
- data/test/stub/{rails_apps/1.2/empty/db → rails2.3-mycook/public/uploads}/.gitignore +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/public/welcome/cached.html +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/about +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/console +0 -0
- data/test/stub/{rails_apps/2.2/empty → rails2.3-mycook}/script/dbconsole +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/destroy +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/generate +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/script/performance/benchmarker +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/script/performance/profiler +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/performance/request +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/plugin +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/script/process/inspector +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/script/process/reaper +0 -0
- data/test/stub/{rails_apps/1.2/empty → rails2.3-mycook}/script/process/spawner +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/runner +0 -0
- data/test/stub/{rails_apps/2.0/empty → rails2.3-mycook}/script/server +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/sites/some.site/public/uploads.html +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/sites/some.site/public/welcome/cached.html +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/tmp/cache/useless.txt +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/tmp/pids/useless.txt +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/tmp/sessions/useless.txt +0 -0
- data/test/stub/{rails_apps/2.3/mycook → rails2.3-mycook}/tmp/sockets/useless.txt +0 -0
- data/test/stub/rails2.3/app/controllers/foo_controller.rb +1 -1
- data/test/stub/rails2.3/config/routes.rb +1 -2
- data/test/stub/wsgi/passenger_wsgi.py +47 -8
- data/test/stub/{rails_apps/1.2/empty/public/stylesheets → wsgi/public}/.gitignore +0 -0
- data/test/support/apache2_controller.rb +2 -2
- data/test/support/nginx_controller.rb +11 -5
- data/test/support/placebo-preloader.rb +2 -2
- data/test/support/test_helper.rb +26 -7
- metadata +78 -240
- metadata.gz.asc +7 -7
- data/debian.template/repack.sh +0 -42
- data/debian.template/watch +0 -3
- data/test/integration_tests/cgi_environment_spec.rb +0 -36
- data/test/integration_tests/hello_world_rack_spec.rb +0 -43
- data/test/integration_tests/hello_world_wsgi_spec.rb +0 -41
- data/test/integration_tests/mycook_spec.rb +0 -166
- data/test/stub/rack/public/rack.jpg +0 -0
- data/test/stub/rails_apps/1.2/empty/.gitignore +0 -3
- data/test/stub/rails_apps/1.2/empty/app/controllers/application.rb +0 -7
- data/test/stub/rails_apps/1.2/empty/config/boot.rb +0 -108
- data/test/stub/rails_apps/1.2/empty/config/database.yml +0 -31
- data/test/stub/rails_apps/1.2/empty/config/environment.rb +0 -66
- data/test/stub/rails_apps/1.2/empty/config/environments/development.rb +0 -21
- data/test/stub/rails_apps/1.2/empty/config/environments/production.rb +0 -18
- data/test/stub/rails_apps/1.2/empty/config/environments/staging.rb +0 -18
- data/test/stub/rails_apps/1.2/empty/config/environments/test.rb +0 -19
- data/test/stub/rails_apps/1.2/empty/config/routes.rb +0 -23
- data/test/stub/rails_apps/1.2/empty/doc/README_FOR_APP +0 -2
- data/test/stub/rails_apps/1.2/empty/public/.htaccess +0 -40
- data/test/stub/rails_apps/1.2/empty/public/500.html +0 -30
- data/test/stub/rails_apps/1.2/empty/public/dispatch.cgi +0 -10
- data/test/stub/rails_apps/1.2/empty/public/dispatch.fcgi +0 -24
- data/test/stub/rails_apps/1.2/empty/public/dispatch.rb +0 -10
- data/test/stub/rails_apps/1.2/empty/public/robots.txt +0 -1
- data/test/stub/rails_apps/1.2/empty/script/about +0 -3
- data/test/stub/rails_apps/1.2/empty/script/breakpointer +0 -3
- data/test/stub/rails_apps/1.2/empty/script/console +0 -3
- data/test/stub/rails_apps/1.2/empty/script/destroy +0 -3
- data/test/stub/rails_apps/1.2/empty/script/generate +0 -3
- data/test/stub/rails_apps/1.2/empty/script/plugin +0 -3
- data/test/stub/rails_apps/1.2/empty/script/runner +0 -3
- data/test/stub/rails_apps/1.2/empty/script/server +0 -3
- data/test/stub/rails_apps/1.2/empty/test/test_helper.rb +0 -28
- data/test/stub/rails_apps/2.0/empty/.gitignore +0 -3
- data/test/stub/rails_apps/2.0/empty/Rakefile +0 -10
- data/test/stub/rails_apps/2.0/empty/app/controllers/application.rb +0 -10
- data/test/stub/rails_apps/2.0/empty/app/helpers/application_helper.rb +0 -3
- data/test/stub/rails_apps/2.0/empty/app/models/.gitignore +0 -0
- data/test/stub/rails_apps/2.0/empty/config/boot.rb +0 -108
- data/test/stub/rails_apps/2.0/empty/config/database.yml +0 -31
- data/test/stub/rails_apps/2.0/empty/config/environment.rb +0 -59
- data/test/stub/rails_apps/2.0/empty/config/environments/production.rb +0 -18
- data/test/stub/rails_apps/2.0/empty/config/environments/staging.rb +0 -18
- data/test/stub/rails_apps/2.0/empty/config/environments/test.rb +0 -22
- data/test/stub/rails_apps/2.0/empty/config/routes.rb +0 -35
- data/test/stub/rails_apps/2.0/empty/db/.gitignore +0 -0
- data/test/stub/rails_apps/2.0/empty/doc/README_FOR_APP +0 -2
- data/test/stub/rails_apps/2.0/empty/public/.htaccess +0 -40
- data/test/stub/rails_apps/2.0/empty/public/404.html +0 -30
- data/test/stub/rails_apps/2.0/empty/public/dispatch.cgi +0 -10
- data/test/stub/rails_apps/2.0/empty/public/dispatch.fcgi +0 -24
- data/test/stub/rails_apps/2.0/empty/public/dispatch.rb +0 -10
- data/test/stub/rails_apps/2.0/empty/public/favicon.ico +0 -0
- data/test/stub/rails_apps/2.0/empty/public/images/rails.png +0 -0
- data/test/stub/rails_apps/2.0/empty/public/stylesheets/.gitignore +0 -0
- data/test/stub/rails_apps/2.0/empty/script/performance/benchmarker +0 -3
- data/test/stub/rails_apps/2.0/empty/script/performance/profiler +0 -3
- data/test/stub/rails_apps/2.0/empty/script/process/inspector +0 -3
- data/test/stub/rails_apps/2.0/empty/script/process/reaper +0 -3
- data/test/stub/rails_apps/2.0/empty/script/process/spawner +0 -3
- data/test/stub/rails_apps/2.0/empty/test/test_helper.rb +0 -38
- data/test/stub/rails_apps/2.2/empty/.gitignore +0 -3
- data/test/stub/rails_apps/2.2/empty/Rakefile +0 -10
- data/test/stub/rails_apps/2.2/empty/app/controllers/application.rb +0 -15
- data/test/stub/rails_apps/2.2/empty/app/helpers/application_helper.rb +0 -3
- data/test/stub/rails_apps/2.2/empty/app/models/.gitignore +0 -0
- data/test/stub/rails_apps/2.2/empty/config/boot.rb +0 -109
- data/test/stub/rails_apps/2.2/empty/config/database.yml +0 -31
- data/test/stub/rails_apps/2.2/empty/config/environment.rb +0 -75
- data/test/stub/rails_apps/2.2/empty/config/environments/development.rb +0 -17
- data/test/stub/rails_apps/2.2/empty/config/environments/production.rb +0 -24
- data/test/stub/rails_apps/2.2/empty/config/environments/staging.rb +0 -24
- data/test/stub/rails_apps/2.2/empty/config/environments/test.rb +0 -22
- data/test/stub/rails_apps/2.2/empty/config/initializers/inflections.rb +0 -10
- data/test/stub/rails_apps/2.2/empty/config/initializers/mime_types.rb +0 -5
- data/test/stub/rails_apps/2.2/empty/config/initializers/new_rails_defaults.rb +0 -17
- data/test/stub/rails_apps/2.2/empty/config/locales/en.yml +0 -5
- data/test/stub/rails_apps/2.2/empty/config/routes.rb +0 -43
- data/test/stub/rails_apps/2.2/empty/db/.gitignore +0 -0
- data/test/stub/rails_apps/2.2/empty/doc/README_FOR_APP +0 -5
- data/test/stub/rails_apps/2.2/empty/public/404.html +0 -30
- data/test/stub/rails_apps/2.2/empty/public/422.html +0 -30
- data/test/stub/rails_apps/2.2/empty/public/500.html +0 -33
- data/test/stub/rails_apps/2.2/empty/public/dispatch.cgi +0 -10
- data/test/stub/rails_apps/2.2/empty/public/dispatch.fcgi +0 -24
- data/test/stub/rails_apps/2.2/empty/public/dispatch.rb +0 -10
- data/test/stub/rails_apps/2.2/empty/public/favicon.ico +0 -0
- data/test/stub/rails_apps/2.2/empty/public/images/rails.png +0 -0
- data/test/stub/rails_apps/2.2/empty/public/robots.txt +0 -5
- data/test/stub/rails_apps/2.2/empty/public/stylesheets/.gitignore +0 -0
- data/test/stub/rails_apps/2.2/empty/script/about +0 -4
- data/test/stub/rails_apps/2.2/empty/script/console +0 -3
- data/test/stub/rails_apps/2.2/empty/script/destroy +0 -3
- data/test/stub/rails_apps/2.2/empty/script/generate +0 -3
- data/test/stub/rails_apps/2.2/empty/script/performance/benchmarker +0 -3
- data/test/stub/rails_apps/2.2/empty/script/performance/profiler +0 -3
- data/test/stub/rails_apps/2.2/empty/script/performance/request +0 -3
- data/test/stub/rails_apps/2.2/empty/script/plugin +0 -3
- data/test/stub/rails_apps/2.2/empty/script/process/inspector +0 -3
- data/test/stub/rails_apps/2.2/empty/script/process/reaper +0 -3
- data/test/stub/rails_apps/2.2/empty/script/process/spawner +0 -3
- data/test/stub/rails_apps/2.2/empty/script/runner +0 -3
- data/test/stub/rails_apps/2.2/empty/script/server +0 -3
- data/test/stub/rails_apps/2.2/empty/test/performance/browsing_test.rb +0 -9
- data/test/stub/rails_apps/2.2/empty/test/test_helper.rb +0 -38
- data/test/stub/rails_apps/2.3/empty/.gitignore +0 -3
- data/test/stub/rails_apps/2.3/empty/Rakefile +0 -10
- data/test/stub/rails_apps/2.3/empty/app/controllers/application_controller.rb +0 -10
- data/test/stub/rails_apps/2.3/empty/app/helpers/application_helper.rb +0 -3
- data/test/stub/rails_apps/2.3/empty/app/models/.gitignore +0 -0
- data/test/stub/rails_apps/2.3/empty/config/boot.rb +0 -110
- data/test/stub/rails_apps/2.3/empty/config/database.yml +0 -31
- data/test/stub/rails_apps/2.3/empty/config/environment.rb +0 -41
- data/test/stub/rails_apps/2.3/empty/config/environments/development.rb +0 -17
- data/test/stub/rails_apps/2.3/empty/config/environments/production.rb +0 -28
- data/test/stub/rails_apps/2.3/empty/config/environments/staging.rb +0 -28
- data/test/stub/rails_apps/2.3/empty/config/environments/test.rb +0 -28
- data/test/stub/rails_apps/2.3/empty/config/initializers/backtrace_silencers.rb +0 -7
- data/test/stub/rails_apps/2.3/empty/config/initializers/inflections.rb +0 -10
- data/test/stub/rails_apps/2.3/empty/config/initializers/mime_types.rb +0 -5
- data/test/stub/rails_apps/2.3/empty/config/initializers/new_rails_defaults.rb +0 -21
- data/test/stub/rails_apps/2.3/empty/config/initializers/session_store.rb +0 -15
- data/test/stub/rails_apps/2.3/empty/config/locales/en.yml +0 -5
- data/test/stub/rails_apps/2.3/empty/config/routes.rb +0 -43
- data/test/stub/rails_apps/2.3/empty/db/.gitignore +0 -0
- data/test/stub/rails_apps/2.3/empty/db/seeds.rb +0 -7
- data/test/stub/rails_apps/2.3/empty/doc/README_FOR_APP +0 -2
- data/test/stub/rails_apps/2.3/empty/public/404.html +0 -30
- data/test/stub/rails_apps/2.3/empty/public/422.html +0 -30
- data/test/stub/rails_apps/2.3/empty/public/500.html +0 -30
- data/test/stub/rails_apps/2.3/empty/public/favicon.ico +0 -0
- data/test/stub/rails_apps/2.3/empty/public/images/rails.png +0 -0
- data/test/stub/rails_apps/2.3/empty/public/robots.txt +0 -5
- data/test/stub/rails_apps/2.3/empty/public/stylesheets/.gitignore +0 -0
- data/test/stub/rails_apps/2.3/empty/script/about +0 -4
- data/test/stub/rails_apps/2.3/empty/script/console +0 -3
- data/test/stub/rails_apps/2.3/empty/script/dbconsole +0 -3
- data/test/stub/rails_apps/2.3/empty/script/destroy +0 -3
- data/test/stub/rails_apps/2.3/empty/script/generate +0 -3
- data/test/stub/rails_apps/2.3/empty/script/performance/benchmarker +0 -3
- data/test/stub/rails_apps/2.3/empty/script/performance/profiler +0 -3
- data/test/stub/rails_apps/2.3/empty/script/plugin +0 -3
- data/test/stub/rails_apps/2.3/empty/script/runner +0 -3
- data/test/stub/rails_apps/2.3/empty/script/server +0 -3
- data/test/stub/rails_apps/2.3/empty/test/performance/browsing_test.rb +0 -9
- data/test/stub/rails_apps/2.3/empty/test/test_helper.rb +0 -38
- data/test/stub/rails_apps/2.3/mycook/Rakefile +0 -10
- data/test/stub/rails_apps/2.3/mycook/app/helpers/application_helper.rb +0 -3
- data/test/stub/rails_apps/2.3/mycook/config/environments/development.rb +0 -18
- data/test/stub/rails_apps/2.3/mycook/config/initializers/inflections.rb +0 -10
- data/test/stub/rails_apps/2.3/mycook/config/initializers/mime_types.rb +0 -5
- data/test/stub/rails_apps/2.3/mycook/public/404.html +0 -30
- data/test/stub/rails_apps/2.3/mycook/public/422.html +0 -30
- data/test/stub/rails_apps/2.3/mycook/public/500.html +0 -30
- data/test/stub/rails_apps/2.3/mycook/public/favicon.ico +0 -0
- data/test/stub/rails_apps/2.3/mycook/public/images/rails.png +0 -0
- data/test/stub/rails_apps/2.3/mycook/public/robots.txt +0 -5
- data/test/stub/rails_apps/2.3/mycook/public/uploads/.gitignore +0 -0
- data/test/stub/rails_apps/2.3/mycook/script/about +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/console +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/dbconsole +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/destroy +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/generate +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/performance/benchmarker +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/performance/profiler +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/performance/request +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/plugin +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/process/inspector +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/process/reaper +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/process/spawner +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/runner +0 -3
- data/test/stub/rails_apps/2.3/mycook/script/server +0 -3
- data/test/stub/wsgi/public/wsgi-snake.jpg +0 -0
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
|
+
iQEcBAABAgAGBQJSxKiOAAoJECrHRaUKISqMerYH/iVcRRuAKssMiGFLbLIk3UwW
|
6
|
+
CXa/+ccArp4JBe6Zzo1SWh41LtE6WDO3seaFje7N1oSsaU7FVhEHLp7yFWHrLF0V
|
7
|
+
CgT0yi2gKcig57L7r4hkT5SP0O1vrmPXlkmSDbRgd/ZkrMmjU75OusNUWimXFSVe
|
8
|
+
mlBAPhk6ysJKsmBFr4dfhWFfO6NwXLE7WxniISBQUK5oEfWW8jcPN6+/zMUepkhj
|
9
|
+
AAxbkOV0qA+QIXCH3h8XBiG6piADmIJYLo2P17tV9RnJY6auoix1lBX/qyYTJWPd
|
10
|
+
33wk4zNBol06CCk1CCr1qvEoK8F9sO4yVUc1yVe30N80NNWvLzaVCMcv8gNxjmA=
|
11
|
+
=WFaL
|
12
12
|
-----END PGP SIGNATURE-----
|
data/NEWS
CHANGED
@@ -1,3 +1,34 @@
|
|
1
|
+
Release 4.0.31
|
2
|
+
--------------
|
3
|
+
|
4
|
+
* Introduced a new tool: `passenger-config restart-app`. With this command you
|
5
|
+
can initiate an application restart without touching restart.txt.
|
6
|
+
Unlike touching restart.txt, this tool initiates the restart immediately
|
7
|
+
instead of on the next request.
|
8
|
+
* Fixed some problems in process spawning and request handling.
|
9
|
+
* Fixed some problems with the handling of HTTP chunked transfer encoding
|
10
|
+
bodies. These problems only occurred in Ruby.
|
11
|
+
* Fixed the HelperAgent, upon shutdown, not correctly waiting 5 seconds until
|
12
|
+
all clients have disconnected. Fixes issue #884.
|
13
|
+
* Fixed compilation problems on FreeBSD.
|
14
|
+
* Fixed some C++ strict aliasing problems.
|
15
|
+
* Fixed some problems with spawning applications that print messages without
|
16
|
+
newline during startup. Fixes issue #1039.
|
17
|
+
* Fixed potential hangs on JRuby when Ctrl-C is used to shutdown the server.
|
18
|
+
Fixes issue #1035.
|
19
|
+
* When Phusion Passenger is installed through the Debian package,
|
20
|
+
passenger-install-apache2-module now checks whether the Apache
|
21
|
+
module package (libapache2-mod-passenger) is properly installed,
|
22
|
+
and installs it using apt-get if it's not installed. Fixes
|
23
|
+
issue #1031.
|
24
|
+
* The `passenger-status --show=xml` command no longer prints the non-XML
|
25
|
+
preamble, such as the version number and the time. Fixes issue #1037.
|
26
|
+
* The Ruby native extension check whether it's loaded against the right Ruby
|
27
|
+
version, to prevent problems when people upgrade Ruby without recompiling
|
28
|
+
their native extensions.
|
29
|
+
* Various other minor Debian packaging improvements.
|
30
|
+
|
31
|
+
|
1
32
|
Release 4.0.30
|
2
33
|
--------------
|
3
34
|
|
data/bin/passenger
CHANGED
@@ -22,15 +22,15 @@
|
|
22
22
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
23
|
# THE SOFTWARE.
|
24
24
|
|
25
|
-
## Magic comment:
|
26
|
-
|
25
|
+
## Magic comment: begin bootstrap ##
|
27
26
|
source_root = File.expand_path("..", File.dirname(__FILE__))
|
28
27
|
$LOAD_PATH.unshift("#{source_root}/lib")
|
28
|
+
require 'rubygems' rescue nil
|
29
29
|
require 'phusion_passenger'
|
30
|
-
|
30
|
+
## Magic comment: end bootstrap ##
|
31
31
|
|
32
|
-
|
33
|
-
|
32
|
+
PhusionPassenger.locate_directories
|
33
|
+
PhusionPassenger.require_passenger_lib 'standalone/main'
|
34
34
|
|
35
35
|
STDOUT.sync = STDERR.sync = true
|
36
36
|
PhusionPassenger::Standalone::Main.run!(ARGV)
|
data/bin/passenger-config
CHANGED
@@ -22,133 +22,13 @@
|
|
22
22
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
23
|
# THE SOFTWARE.
|
24
24
|
|
25
|
-
## Magic comment:
|
26
|
-
|
25
|
+
## Magic comment: begin bootstrap ##
|
27
26
|
source_root = File.expand_path("..", File.dirname(__FILE__))
|
28
27
|
$LOAD_PATH.unshift("#{source_root}/lib")
|
28
|
+
require 'rubygems' rescue nil
|
29
29
|
require 'phusion_passenger'
|
30
|
-
|
31
|
-
|
32
|
-
require 'phusion_passenger/platform_info'
|
33
|
-
require 'phusion_passenger/platform_info/compiler'
|
34
|
-
|
35
|
-
def help
|
36
|
-
puts "Tool for showing Passenger configuration information."
|
37
|
-
puts "Usage: passenger-config <OPTION>"
|
38
|
-
puts
|
39
|
-
puts "Options:"
|
40
|
-
puts " --root Show Phusion Passenger's root directory."
|
41
|
-
puts " --includedir Show the Nginx runtime library headers directory."
|
42
|
-
puts " --nginx-addon-dir Show the Phusion Passenger Nginx addon directory."
|
43
|
-
puts " --nginx-libs Show Nginx runtime library flags."
|
44
|
-
puts " --compiled Check whether runtime libraries are compiled."
|
45
|
-
puts " --natively-packaged Check whether Phusion Passenger is natively packged."
|
46
|
-
puts " --installed-from-release-package Check whether this installation came from an official release package."
|
47
|
-
puts " --make-locations-ini Generate a locations.ini based on the current install paths."
|
48
|
-
puts " --detect-apache2 Autodetect Apache installations."
|
49
|
-
puts " --ruby-command Print the correct command for invoking the Ruby interpreter."
|
50
|
-
puts " --ruby-libdir Show Phusion Passenger's Ruby library directory."
|
51
|
-
puts " --rubyext-compat-id Print the Ruby extension binary compatibility ID."
|
52
|
-
puts " --cxx-compat-id Print the C++ binary compatibility ID."
|
53
|
-
puts " --version Show version number."
|
54
|
-
end
|
30
|
+
## Magic comment: end bootstrap ##
|
55
31
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
only(*NGINX_LIBS_SELECTOR).
|
60
|
-
set_output_dir("#{PhusionPassenger.lib_dir}/common/libpassenger_common")
|
61
|
-
end
|
62
|
-
|
63
|
-
case ARGV[0]
|
64
|
-
when "--root"
|
65
|
-
puts PhusionPassenger.source_root
|
66
|
-
when "--includedir"
|
67
|
-
puts PhusionPassenger.include_dir
|
68
|
-
when "--nginx-addon-dir"
|
69
|
-
puts PhusionPassenger.nginx_module_source_dir
|
70
|
-
when "--nginx-libs"
|
71
|
-
puts "#{common_library.link_objects_as_string} #{PhusionPassenger.lib_dir}/common/libboost_oxt.a"
|
72
|
-
when "--compiled"
|
73
|
-
common_library.link_objects.each do |filename|
|
74
|
-
if !File.exist?(filename)
|
75
|
-
exit 1
|
76
|
-
end
|
77
|
-
end
|
78
|
-
if File.exist?("#{PhusionPassenger.lib_dir}/common/libboost_oxt.a")
|
79
|
-
exit 0
|
80
|
-
else
|
81
|
-
exit 1
|
82
|
-
end
|
83
|
-
when "--natively-packaged"
|
84
|
-
if PhusionPassenger.natively_packaged?
|
85
|
-
exit 0
|
86
|
-
else
|
87
|
-
exit 1
|
88
|
-
end
|
89
|
-
when "--installed-from-release-package"
|
90
|
-
if PhusionPassenger.installed_from_release_package?
|
91
|
-
exit 0
|
92
|
-
else
|
93
|
-
exit 1
|
94
|
-
end
|
95
|
-
when "--make-locations-ini"
|
96
|
-
puts "[locations]"
|
97
|
-
puts "natively_packaged=true"
|
98
|
-
PhusionPassenger::REQUIRED_LOCATIONS_INI_FIELDS.each do |field|
|
99
|
-
puts "#{field}=#{PhusionPassenger.send(field)}"
|
100
|
-
end
|
101
|
-
when "--detect-apache2"
|
102
|
-
require 'phusion_passenger/platform_info/apache_detector'
|
103
|
-
detector = PhusionPassenger::PlatformInfo::ApacheDetector.new(STDOUT)
|
104
|
-
begin
|
105
|
-
detector.detect_all
|
106
|
-
detector.report
|
107
|
-
ensure
|
108
|
-
detector.finish
|
109
|
-
end
|
110
|
-
when "--ruby-command"
|
111
|
-
require 'phusion_passenger/platform_info/ruby'
|
112
|
-
ruby = PhusionPassenger::PlatformInfo.ruby_command
|
113
|
-
puts "passenger-config was invoked through the following Ruby interpreter:"
|
114
|
-
puts " Command: #{ruby}"
|
115
|
-
STDOUT.write " Version: "
|
116
|
-
STDOUT.flush
|
117
|
-
system("/bin/sh -c '#{ruby} -v'")
|
118
|
-
puts " To use in Apache: PassengerRuby #{ruby}"
|
119
|
-
puts " To use in Nginx : passenger_ruby #{ruby}"
|
120
|
-
puts " To use with Standalone: #{ruby} #{PhusionPassenger.bin_dir}/passenger start"
|
121
|
-
puts
|
122
|
-
|
123
|
-
ruby = PhusionPassenger::PlatformInfo.find_command('ruby')
|
124
|
-
if ruby && !ruby.include?("rvm/rubies/")
|
125
|
-
# If this is an RVM Ruby executable then we don't show it. We want people to
|
126
|
-
# use the RVM wrapper scripts only.
|
127
|
-
puts "The following Ruby interpreter was found first in $PATH:"
|
128
|
-
puts " Command: #{ruby}"
|
129
|
-
STDOUT.write " Version: "
|
130
|
-
STDOUT.flush
|
131
|
-
system("/bin/sh -c '#{ruby} -v'")
|
132
|
-
puts " To use in Apache: PassengerRuby #{ruby}"
|
133
|
-
puts " To use in Nginx : passenger_ruby #{ruby}"
|
134
|
-
puts " To use with Standalone: #{ruby} #{PhusionPassenger.bin_dir}/passenger start"
|
135
|
-
elsif !ruby.include?("rvm/rubies/")
|
136
|
-
puts "No Ruby interpreter found in $PATH."
|
137
|
-
end
|
138
|
-
puts
|
139
|
-
puts "## Notes for RVM users"
|
140
|
-
puts "Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'."
|
141
|
-
when "--ruby-libdir"
|
142
|
-
puts PhusionPassenger.ruby_libdir
|
143
|
-
when "--rubyext-compat-id"
|
144
|
-
require 'phusion_passenger/platform_info/binary_compatibility'
|
145
|
-
puts PhusionPassenger::PlatformInfo.ruby_extension_binary_compatibility_id
|
146
|
-
when "--cxx-compat-id"
|
147
|
-
require 'phusion_passenger/platform_info/binary_compatibility'
|
148
|
-
puts PhusionPassenger::PlatformInfo.cxx_binary_compatibility_id
|
149
|
-
when "--version"
|
150
|
-
puts PhusionPassenger::VERSION_STRING
|
151
|
-
else
|
152
|
-
help
|
153
|
-
exit 1
|
154
|
-
end
|
32
|
+
PhusionPassenger.locate_directories
|
33
|
+
PhusionPassenger.require_passenger_lib 'config'
|
34
|
+
PhusionPassenger::Config.run!(ARGV)
|
@@ -22,11 +22,13 @@
|
|
22
22
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
23
|
# THE SOFTWARE.
|
24
24
|
|
25
|
-
## Magic comment:
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
## Magic comment: begin bootstrap ##
|
26
|
+
source_root = File.expand_path("..", File.dirname(__FILE__))
|
27
|
+
$LOAD_PATH.unshift("#{source_root}/lib")
|
28
|
+
require 'rubygems' rescue nil
|
29
29
|
require 'phusion_passenger'
|
30
|
+
## Magic comment: end bootstrap ##
|
31
|
+
|
30
32
|
PhusionPassenger.locate_directories
|
31
33
|
|
32
34
|
# The Apache executable may be located in an 'sbin' folder. We add
|
@@ -37,14 +39,16 @@ ENV["PATH"] += ":/usr/sbin:/sbin:/usr/local/sbin"
|
|
37
39
|
|
38
40
|
require 'optparse'
|
39
41
|
require 'stringio'
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
PhusionPassenger.require_passenger_lib 'constants'
|
43
|
+
PhusionPassenger.require_passenger_lib 'platform_info/ruby'
|
44
|
+
PhusionPassenger.require_passenger_lib 'platform_info/apache'
|
45
|
+
PhusionPassenger.require_passenger_lib 'platform_info/apache_detector'
|
46
|
+
PhusionPassenger.require_passenger_lib 'abstract_installer'
|
47
|
+
PhusionPassenger.require_passenger_lib 'utils/terminal_choice_menu'
|
45
48
|
|
46
49
|
class Installer < PhusionPassenger::AbstractInstaller
|
47
50
|
include PhusionPassenger
|
51
|
+
TerminalChoiceMenu = PhusionPassenger::Utils::TerminalChoiceMenu
|
48
52
|
|
49
53
|
def dependencies
|
50
54
|
specs = [
|
@@ -60,14 +64,18 @@ class Installer < PhusionPassenger::AbstractInstaller
|
|
60
64
|
'libcurl-dev',
|
61
65
|
'openssl-dev',
|
62
66
|
'zlib-dev',
|
63
|
-
PlatformInfo.passenger_needs_ruby_dev_header? ? 'ruby-dev' : nil,
|
64
|
-
'ruby-openssl',
|
65
|
-
'rubygems',
|
66
|
-
'rake',
|
67
|
-
'rack',
|
68
67
|
'apache2',
|
69
|
-
'apache2-dev'
|
70
|
-
|
68
|
+
'apache2-dev',
|
69
|
+
'rake',
|
70
|
+
'ruby-openssl',
|
71
|
+
'rubygems'
|
72
|
+
]
|
73
|
+
if @languages.include?("ruby")
|
74
|
+
if PlatformInfo.passenger_needs_ruby_dev_header?
|
75
|
+
ids << 'ruby-dev'
|
76
|
+
end
|
77
|
+
ids << 'rack'
|
78
|
+
end
|
71
79
|
# Some broken servers don't have apr-config or apu-config installed.
|
72
80
|
# Nevertheless, it is possible to compile Apache modules if Apache
|
73
81
|
# was configured with --included-apr. So here we check whether
|
@@ -92,14 +100,18 @@ class Installer < PhusionPassenger::AbstractInstaller
|
|
92
100
|
|
93
101
|
def run_steps
|
94
102
|
if PhusionPassenger.natively_packaged?
|
95
|
-
|
96
|
-
|
97
|
-
|
103
|
+
if apache_module_available?
|
104
|
+
notify_apache_module_installed
|
105
|
+
show_deployment_example
|
106
|
+
else
|
107
|
+
install_apache_module_from_native_package || exit(1)
|
108
|
+
end
|
98
109
|
exit
|
99
110
|
end
|
100
111
|
|
101
|
-
Dir.chdir(
|
112
|
+
Dir.chdir(PhusionPassenger.source_root)
|
102
113
|
show_welcome_screen
|
114
|
+
query_interested_languages
|
103
115
|
check_gem_install_permission_problems || exit(1)
|
104
116
|
check_directory_accessible_by_web_server
|
105
117
|
check_dependencies || exit(1)
|
@@ -123,6 +135,45 @@ private
|
|
123
135
|
wait
|
124
136
|
end
|
125
137
|
|
138
|
+
def query_interested_languages
|
139
|
+
menu = TerminalChoiceMenu.new(["Ruby", "Python", "Node.js", "Meteor"])
|
140
|
+
menu["Ruby"].checked = interesting_language?('ruby')
|
141
|
+
menu["Python"].checked = interesting_language?('python')
|
142
|
+
menu["Node.js"].checked = interesting_language?('nodejs', 'node')
|
143
|
+
menu["Meteor"].checked = interesting_language?('meteor')
|
144
|
+
|
145
|
+
new_screen
|
146
|
+
puts "<banner>Which languages are you interested in?</banner>"
|
147
|
+
puts
|
148
|
+
if interactive?
|
149
|
+
puts "Use <space> to select."
|
150
|
+
else
|
151
|
+
puts "Override selection with --languages."
|
152
|
+
end
|
153
|
+
puts
|
154
|
+
|
155
|
+
if interactive?
|
156
|
+
begin
|
157
|
+
menu.query
|
158
|
+
rescue Interrupt
|
159
|
+
raise Abort
|
160
|
+
end
|
161
|
+
else
|
162
|
+
menu.display_choices
|
163
|
+
puts
|
164
|
+
end
|
165
|
+
|
166
|
+
@languages = menu.selected_choices.map{ |x| x.downcase.gsub(/\./, '') }
|
167
|
+
end
|
168
|
+
|
169
|
+
def interesting_language?(name, command = nil)
|
170
|
+
if @languages
|
171
|
+
return @languages.include?(name)
|
172
|
+
else
|
173
|
+
return !!PlatformInfo.find_command(command || name)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
126
177
|
def check_whether_there_are_multiple_apache_installs
|
127
178
|
new_screen
|
128
179
|
puts '<banner>Sanity checking Apache installation...</banner>'
|
@@ -221,7 +272,7 @@ private
|
|
221
272
|
puts
|
222
273
|
line
|
223
274
|
puts '<banner>Compiling and installing Apache 2 module...</banner>'
|
224
|
-
puts "cd #{
|
275
|
+
puts "cd #{PhusionPassenger.source_root}"
|
225
276
|
if ENV['TRACE']
|
226
277
|
puts "#{PlatformInfo.rake_command} --trace apache2:clean apache2 RELEASE=yes"
|
227
278
|
return sh("#{PlatformInfo.rake_command} --trace apache2:clean apache2 RELEASE=yes")
|
@@ -252,13 +303,13 @@ private
|
|
252
303
|
end
|
253
304
|
|
254
305
|
def show_deployment_example
|
255
|
-
|
256
|
-
line
|
306
|
+
new_screen
|
257
307
|
render_template 'apache2/deployment_example',
|
258
308
|
:users_guide_path => users_guide_path,
|
259
309
|
:users_guide_url => users_guide_url,
|
260
310
|
:phusion_website => PHUSION_WEBSITE,
|
261
|
-
:passenger_website => PASSENGER_WEBSITE
|
311
|
+
:passenger_website => PASSENGER_WEBSITE,
|
312
|
+
:languages => @languages
|
262
313
|
end
|
263
314
|
|
264
315
|
def show_possible_solutions_for_compilation_and_installation_problems
|
@@ -268,6 +319,31 @@ private
|
|
268
319
|
:users_guide_url => users_guide_url,
|
269
320
|
:support_url => SUPPORT_URL
|
270
321
|
end
|
322
|
+
|
323
|
+
def apache_module_available?
|
324
|
+
return File.exist?(PhusionPassenger.apache2_module_path)
|
325
|
+
end
|
326
|
+
|
327
|
+
def install_apache_module_from_native_package
|
328
|
+
case PhusionPassenger.native_packaging_method
|
329
|
+
when 'deb'
|
330
|
+
sh! "sudo apt-get update"
|
331
|
+
sh! "sudo apt-get install #{DEB_APACHE_MODULE_PACKAGE}"
|
332
|
+
return true
|
333
|
+
when 'rpm'
|
334
|
+
sh! "sudo yum install #{RPM_APACHE_MODULE_PACKAGE}"
|
335
|
+
return true
|
336
|
+
else
|
337
|
+
puts "<red>The #{PROGRAM_NAME} Apache module package is not installed.</red>"
|
338
|
+
puts "Please ask your operating system vendor how to install it."
|
339
|
+
return false
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
343
|
+
def notify_apache_module_installed
|
344
|
+
render_template 'apache2/notify_apache_module_installed'
|
345
|
+
wait
|
346
|
+
end
|
271
347
|
end
|
272
348
|
|
273
349
|
ORIG_ARGV = ARGV.dup
|
@@ -276,10 +352,11 @@ parser = OptionParser.new do |opts|
|
|
276
352
|
opts.banner = "Usage: passenger-install-apache2-module [options]"
|
277
353
|
opts.separator ""
|
278
354
|
|
355
|
+
indent = ' ' * 37
|
279
356
|
opts.separator "Options:"
|
280
357
|
opts.on("-a", "--auto", String, "Automatically build the Apache module,\n" <<
|
281
|
-
"#{
|
282
|
-
"#{
|
358
|
+
"#{indent}without interactively asking for user\n" <<
|
359
|
+
"#{indent}input.") do
|
283
360
|
options[:auto] = true
|
284
361
|
end
|
285
362
|
opts.on("--apxs2-path PATH", String, "Path to 'apxs2' command.") do |value|
|
@@ -288,6 +365,11 @@ parser = OptionParser.new do |opts|
|
|
288
365
|
opts.on("--apr-config-path PATH", String, "Path to 'apr-config' command.") do |value|
|
289
366
|
ENV['APR_CONFIG'] = value
|
290
367
|
end
|
368
|
+
opts.on("--languages NAMES", "Comma-separated list of interested\n" <<
|
369
|
+
"#{indent}languages (e.g.\n" <<
|
370
|
+
"#{indent}'ruby,python,nodejs,meteor')") do |value|
|
371
|
+
options[:languages] = value.split(",")
|
372
|
+
end
|
291
373
|
opts.on("--snippet", "Show just the Apache config snippet.") do
|
292
374
|
options[:snippet] = true
|
293
375
|
end
|
@@ -22,22 +22,26 @@
|
|
22
22
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
23
|
# THE SOFTWARE.
|
24
24
|
|
25
|
-
## Magic comment:
|
26
|
-
|
25
|
+
## Magic comment: begin bootstrap ##
|
27
26
|
source_root = File.expand_path("..", File.dirname(__FILE__))
|
28
27
|
$LOAD_PATH.unshift("#{source_root}/lib")
|
28
|
+
require 'rubygems' rescue nil
|
29
29
|
require 'phusion_passenger'
|
30
|
+
## Magic comment: end bootstrap ##
|
31
|
+
|
30
32
|
PhusionPassenger.locate_directories
|
31
33
|
|
32
34
|
require 'digest'
|
33
35
|
require 'optparse'
|
34
36
|
require 'fileutils'
|
35
|
-
|
36
|
-
|
37
|
-
|
37
|
+
PhusionPassenger.require_passenger_lib 'platform_info/ruby'
|
38
|
+
PhusionPassenger.require_passenger_lib 'abstract_installer'
|
39
|
+
PhusionPassenger.require_passenger_lib 'utils/terminal_choice_menu'
|
40
|
+
PhusionPassenger.require_passenger_lib 'utils/tmpio'
|
38
41
|
|
39
42
|
class Installer < PhusionPassenger::AbstractInstaller
|
40
43
|
include PhusionPassenger
|
44
|
+
TerminalChoiceMenu = PhusionPassenger::Utils::TerminalChoiceMenu
|
41
45
|
|
42
46
|
def dependencies
|
43
47
|
specs = [
|
@@ -51,15 +55,19 @@ class Installer < PhusionPassenger::AbstractInstaller
|
|
51
55
|
'cc',
|
52
56
|
'c++',
|
53
57
|
'download-tool',
|
54
|
-
PlatformInfo.passenger_needs_ruby_dev_header? ? 'ruby-dev' : nil,
|
55
|
-
'ruby-openssl',
|
56
|
-
'rubygems',
|
57
|
-
'rake',
|
58
|
-
'rack',
|
59
58
|
'libcurl-dev',
|
60
59
|
'openssl-dev',
|
61
|
-
'zlib-dev'
|
62
|
-
|
60
|
+
'zlib-dev',
|
61
|
+
'rake',
|
62
|
+
'ruby-openssl',
|
63
|
+
'rubygems'
|
64
|
+
]
|
65
|
+
if @languages.include?("ruby")
|
66
|
+
if PlatformInfo.passenger_needs_ruby_dev_header?
|
67
|
+
ids << 'ruby-dev'
|
68
|
+
end
|
69
|
+
ids << 'rack'
|
70
|
+
end
|
63
71
|
return [specs, ids]
|
64
72
|
end
|
65
73
|
|
@@ -75,8 +83,9 @@ class Installer < PhusionPassenger::AbstractInstaller
|
|
75
83
|
# Make sure the configure script finds the correct
|
76
84
|
# passenger-config command.
|
77
85
|
ENV['PATH'] = PhusionPassenger.bin_dir + ":" + ENV['PATH']
|
78
|
-
|
86
|
+
|
79
87
|
show_welcome_screen
|
88
|
+
query_interested_languages
|
80
89
|
check_gem_install_permission_problems || exit(1)
|
81
90
|
check_directory_accessible_by_web_server
|
82
91
|
check_nginx_module_sources_available || exit(1)
|
@@ -148,6 +157,45 @@ private
|
|
148
157
|
wait
|
149
158
|
end
|
150
159
|
|
160
|
+
def query_interested_languages
|
161
|
+
menu = TerminalChoiceMenu.new(["Ruby", "Python", "Node.js", "Meteor"])
|
162
|
+
menu["Ruby"].checked = interesting_language?('ruby')
|
163
|
+
menu["Python"].checked = interesting_language?('python')
|
164
|
+
menu["Node.js"].checked = interesting_language?('nodejs', 'node')
|
165
|
+
menu["Meteor"].checked = interesting_language?('meteor')
|
166
|
+
|
167
|
+
new_screen
|
168
|
+
puts "<banner>Which languages are you interested in?</banner>"
|
169
|
+
puts
|
170
|
+
if interactive?
|
171
|
+
puts "Use <space> to select."
|
172
|
+
else
|
173
|
+
puts "Override selection with --languages."
|
174
|
+
end
|
175
|
+
puts
|
176
|
+
|
177
|
+
if interactive?
|
178
|
+
begin
|
179
|
+
menu.query
|
180
|
+
rescue Interrupt
|
181
|
+
raise Abort
|
182
|
+
end
|
183
|
+
else
|
184
|
+
menu.display_choices
|
185
|
+
puts
|
186
|
+
end
|
187
|
+
|
188
|
+
@languages = menu.selected_choices.map{ |x| x.downcase.gsub(/\./, '') }
|
189
|
+
end
|
190
|
+
|
191
|
+
def interesting_language?(name, command = nil)
|
192
|
+
if @languages
|
193
|
+
return @languages.include?(name)
|
194
|
+
else
|
195
|
+
return !!PlatformInfo.find_command(command || name)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
151
199
|
def check_nginx_module_sources_available
|
152
200
|
if PhusionPassenger.natively_packaged? && !File.exist?(PhusionPassenger.nginx_module_source_dir)
|
153
201
|
new_screen
|
@@ -494,36 +542,42 @@ parser = OptionParser.new do |opts|
|
|
494
542
|
opts.banner = "Usage: passenger-install-nginx-module [options]"
|
495
543
|
opts.separator ""
|
496
544
|
|
545
|
+
indent = ' ' * 37
|
497
546
|
opts.separator "Options:"
|
498
547
|
opts.on("--auto", "Automatically confirm 'Press ENTER to\n" <<
|
499
|
-
"#{
|
548
|
+
"#{indent}continue' prompts.") do
|
500
549
|
options[:auto] = true
|
501
550
|
end
|
502
551
|
opts.on("--prefix=DIR", String, "Use the given Nginx install prefix instead\n" <<
|
503
|
-
"#{
|
552
|
+
"#{indent}of asking for it interactively.") do |dir|
|
504
553
|
options[:prefix] = dir
|
505
554
|
end
|
506
555
|
opts.on("--auto-download", "Download and install Nginx automatically,\n" <<
|
507
|
-
"#{
|
508
|
-
"#{
|
509
|
-
"#{
|
556
|
+
"#{indent}instead of asking interactively whether to\n" <<
|
557
|
+
"#{indent}download+install or to use an existing\n" <<
|
558
|
+
"#{indent}Nginx source directory.") do
|
510
559
|
options[:auto_download] = true
|
511
560
|
end
|
512
561
|
opts.on("--nginx-source-dir=DIR", String, "Compile and install Nginx using the given\n" <<
|
513
|
-
"#{
|
514
|
-
"#{
|
515
|
-
"#{
|
516
|
-
"#{
|
562
|
+
"#{indent}Nginx source directory, instead of\n" <<
|
563
|
+
"#{indent}interactively asking to download+install\n" <<
|
564
|
+
"#{indent}or to use an existing Nginx source\n" <<
|
565
|
+
"#{indent}directory. Conflicts with --auto-download.") do |dir|
|
517
566
|
options[:nginx_source_dir] = dir
|
518
567
|
end
|
519
568
|
opts.on("--extra-configure-flags=STRING", String, "Pass these extra flags to Nginx's\n" <<
|
520
|
-
"#{
|
521
|
-
"#{
|
522
|
-
"#{
|
523
|
-
"#{
|
524
|
-
"#{
|
569
|
+
"#{indent}'configure' script, instead of asking for\n" <<
|
570
|
+
"#{indent}it interactively. Specify 'none' if you\n" <<
|
571
|
+
"#{indent}do not want to pass additional flags but do\n" <<
|
572
|
+
"#{indent}not want this installer to ask\n" <<
|
573
|
+
"#{indent}interactively either.") do |flags|
|
525
574
|
options[:extra_configure_flags] = flags
|
526
575
|
end
|
576
|
+
opts.on("--languages NAMES", "Comma-separated list of interested\n" <<
|
577
|
+
"#{indent}languages (e.g.\n" <<
|
578
|
+
"#{indent}'ruby,python,nodejs,meteor')") do |value|
|
579
|
+
options[:languages] = value.split(",")
|
580
|
+
end
|
527
581
|
end
|
528
582
|
begin
|
529
583
|
parser.parse!
|