diff -Nru passenger-3.0.11+109~natty1/bin/passenger-install-apache2-module passenger-3.0.12+111~natty1/bin/passenger-install-apache2-module --- passenger-3.0.11+109~natty1/bin/passenger-install-apache2-module 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/bin/passenger-install-apache2-module 2012-04-13 18:19:26.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env ruby # Phusion Passenger - http://www.modrails.com/ -# Copyright (c) 2010 Phusion +# Copyright (c) 2010, 2011, 2012 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # @@ -124,7 +124,7 @@ mpm = nil end end - if mpm != "prefork" && mpm != "worker" + if mpm != "prefork" && mpm != "worker" && mpm != "event" new_screen render_template 'apache2/apache_must_be_compiled_with_compatible_mpm', :current_mpm => mpm diff -Nru passenger-3.0.11+109~natty1/bin/passenger-install-nginx-module passenger-3.0.12+111~natty1/bin/passenger-install-nginx-module --- passenger-3.0.11+109~natty1/bin/passenger-install-nginx-module 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/bin/passenger-install-nginx-module 2012-04-13 18:19:26.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env ruby # Phusion Passenger - http://www.modrails.com/ -# Copyright (c) 2010 Phusion +# Copyright (c) 2010, 2011, 2012 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # @@ -392,6 +392,7 @@ def build_nginx_configure_command(prefix, extra_configure_flags = nil) command = "sh ./configure --prefix='#{prefix}' " command << "--with-http_ssl_module " + command << "--with-http_gzip_static_module " command << "--with-cc-opt='-Wno-error' " if @pcre_source_dir command << "--with-pcre='#{@pcre_source_dir}' " diff -Nru passenger-3.0.11+109~natty1/build/config.rb passenger-3.0.12+111~natty1/build/config.rb --- passenger-3.0.11+109~natty1/build/config.rb 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/build/config.rb 2012-04-13 18:19:26.000000000 +0000 @@ -33,7 +33,7 @@ # Extra compiler flags that should always be passed to the C/C++ compiler. # Should be included last in the command string, even after PlatformInfo.portability_cflags. -EXTRA_CXXFLAGS = "-Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long" +EXTRA_CXXFLAGS = "-Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long" EXTRA_CXXFLAGS << " -Wno-missing-field-initializers" if PlatformInfo.compiler_supports_wno_missing_field_initializers_flag? EXTRA_CXXFLAGS << " -mno-tls-direct-seg-refs" if PlatformInfo.requires_no_tls_direct_seg_refs? && PlatformInfo.compiler_supports_no_tls_direct_seg_refs_option? EXTRA_CXXFLAGS << " #{OPTIMIZATION_FLAGS}" if !OPTIMIZATION_FLAGS.empty? @@ -43,4 +43,4 @@ EXTRA_LDFLAGS = "" # Whether to use the vendored libev or the system one. -USE_VENDORED_LIBEV = boolean_option("USE_VENDORED_LIBEV", true) \ No newline at end of file +USE_VENDORED_LIBEV = boolean_option("USE_VENDORED_LIBEV", true) Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/build/._cplusplus_support.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/build/._cplusplus_support.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/build/._ruby_extension.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/build/._ruby_extension.rb differ diff -Nru passenger-3.0.11+109~natty1/configure passenger-3.0.12+111~natty1/configure --- passenger-3.0.11+109~natty1/configure 1970-01-01 00:00:00.000000000 +0000 +++ passenger-3.0.12+111~natty1/configure 2012-04-13 18:19:26.000000000 +0000 @@ -0,0 +1,10 @@ +#!/bin/sh +echo "This is not how you install Phusion Passenger! Please run one of:" +echo +echo " ./bin/passenger-install-apache2-module" +echo " ./bin/passenger-install-nginx-module" +echo +echo "When unsure, please consult the manual (see 'doc' directory)." +echo +echo "*** ABORTED" +exit 1 diff -Nru passenger-3.0.11+109~natty1/debian/bzr-builder.manifest passenger-3.0.12+111~natty1/debian/bzr-builder.manifest --- passenger-3.0.11+109~natty1/debian/bzr-builder.manifest 2012-04-07 00:17:32.000000000 +0000 +++ passenger-3.0.12+111~natty1/debian/bzr-builder.manifest 2012-04-13 18:19:29.000000000 +0000 @@ -1,2 +1,2 @@ -# bzr-builder format 0.3 deb-version {debupstream}+109 -lp:~brightbox/ruby-passenger/deb-passenger revid:git-v1:7f32bf6e9fea3a4daefe27a485cc914f27985df2 +# bzr-builder format 0.3 deb-version {debupstream}+111 +lp:~brightbox/ruby-passenger/deb-passenger revid:git-v1:69d8bda3ecd8fa0a13ac408091d94656e3bff77f diff -Nru passenger-3.0.11+109~natty1/debian/changelog passenger-3.0.12+111~natty1/debian/changelog --- passenger-3.0.11+109~natty1/debian/changelog 2012-04-07 00:17:32.000000000 +0000 +++ passenger-3.0.12+111~natty1/debian/changelog 2012-04-13 18:19:29.000000000 +0000 @@ -1,8 +1,14 @@ -passenger (3.0.11+109~natty1) natty; urgency=low +passenger (3.0.12+111~natty1) natty; urgency=low * Auto build. - -- John Leach Sat, 07 Apr 2012 00:17:32 +0000 + -- John Leach Fri, 13 Apr 2012 18:19:29 +0000 + +passenger (3.0.12-1bbox1+ng) lucid; urgency=low + + * New upstream release, 3.0.12 + + -- John Leach Fri, 13 Apr 2012 17:19:42 +0100 passenger (3.0.11-2bbox5) lucid; urgency=low diff -Nru passenger-3.0.11+109~natty1/doc/Users guide Apache.idmap.txt passenger-3.0.12+111~natty1/doc/Users guide Apache.idmap.txt --- passenger-3.0.11+109~natty1/doc/Users guide Apache.idmap.txt 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/doc/Users guide Apache.idmap.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -###### Autogenerated by Mizuho, DO NOT EDIT ###### -# This file maps section names to IDs so that the commenting system knows which -# comments belong to which section. Section names may be changed at will but -# IDs always stay the same, allowing one to retain old comments even if you -# rename a section. -# -# This file is autogenerated but is not a cache; you MUST NOT DELETE this -# file and you must check it into your version control system. If you lose -# this file you may lose the ability to identity old comments. -# -# Entries marked with "fuzzy" indicate that the section title has changed -# and that Mizuho has found an ID which appears to be associated with that -# section. You should check whether it is correct, and if not, fix it. - -1. Support information => support-information-1ai724i - -1.1. Supported operating systems => supported-operating-systems-18x8jzn - -1.2. Where to get support => where-to-get-support-h5oojh - -2. Installing, upgrading and uninstalling Phusion Passenger => installing-upgrading-and-uninstalling-phusion-passenger-a1zbnb - -2.1. Generic installation instructions => generic-installation-instructions-eh9xhl - -2.1.1. Overview of installation methods => overview-of-installation-methods-1rv04e2 - -2.1.2. Preparation (gem and source tarball only) => preparation-gem-and-source-tarball-only--11ofr29 - -2.1.3. Installing via the gem => installing-via-the-gem-6zjt30 - -2.1.4. Installing via the source tarball => installing-via-the-source-tarball-mly13a - -2.1.5. Installing via a native Linux package => installing-via-a-native-linux-package-7l0t4v - -2.1.6. What does the installer do? => what-does-the-installer-do--1j2bczq - -2.2. Operating system-specific instructions and information => operating-system-specific-instructions-and-information-pqoxte - -2.2.1. MacOS X => macos-x-kvt0z1 - -2.2.2. Ubuntu Linux => ubuntu-linux-1uu7vpl - -2.2.3. OpenSolaris => opensolaris-t7oylf - -2.3. Upgrading or downgrading Phusion Passenger => upgrading-or-downgrading-phusion-passenger-maq6fw - -2.3.1. Via a gem or a source tarball => via-a-gem-or-a-source-tarball-wzkten - -2.3.2. Via a native Linux package => via-a-native-linux-package-12eene2 - -2.4. Unloading (disabling) Phusion Passenger from Apache without uninstalling it => unloading-disabling-phusion-passenger-from-apache-without-uninstalling-it-1rb6log - -2.5. Uninstalling Phusion Passenger => uninstalling-phusion-passenger-u9x0gk - -3. Deploying a Ruby on Rails application => deploying-a-ruby-on-rails-application-itdr6l - -3.1. Deploying to a virtual host’s root => deploying-to-a-virtual-host-s-root-148jpxy - -3.2. Deploying to a sub URI => deploying-to-a-sub-uri-cukfoc - -3.3. Redeploying (restarting the Ruby on Rails application) => redeploying-restarting-the-ruby-on-rails-application--1unls8v - -3.4. Migrations => migrations-fjdjdr - -3.5. Capistrano integration => capistrano-integration-1m5sn2y - -4. Deploying a Rack-based Ruby application => deploying-a-rack-based-ruby-application-1swt4rl - -4.1. Tutorial/example: writing and deploying a Hello World Rack application => tutorial-example-writing-and-deploying-a-hello-world-rack-application-znzu46 - -4.2. Deploying to a virtual host’s root => deploying-to-a-virtual-host-s-root-5wmulv - -4.3. Deploying to a sub URI => deploying-to-a-sub-uri-l6sbwx - -4.4. Redeploying (restarting the Rack application) => redeploying-restarting-the-rack-application--vn8xzn - -4.5. Rackup specifications for various web frameworks => rackup-specifications-for-various-web-frameworks-13g881i - -4.5.1. Camping => camping-1e2lve4 - diff -Nru passenger-3.0.11+109~natty1/doc/Users guide Nginx.txt passenger-3.0.12+111~natty1/doc/Users guide Nginx.txt --- passenger-3.0.11+109~natty1/doc/Users guide Nginx.txt 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/doc/Users guide Nginx.txt 2012-04-13 18:19:26.000000000 +0000 @@ -205,7 +205,7 @@ Passenger was never installed in the first place. This might be useful to you if, for example, you seem to be experiencing a problem caused by Phusion Passenger, but you want to make sure whether that's actually the case, without having -to through the hassle of uninstalling Phusion Passenger completely. When disabled, +to go through the hassle of uninstalling Phusion Passenger completely. When disabled, Phusion Passenger will not occupy any memory or CPU or otherwise interfere with Nginx. @@ -1145,7 +1145,7 @@ } --------------------------- -Then specify the 'server_name' valuue followed by the sub-URI, like this: +Then specify the 'server_name' value followed by the sub-URI, like this: --------------------------- server { diff -Nru passenger-3.0.11+109~natty1/doc/users_guide_snippets/appendix_c_spawning_methods.txt passenger-3.0.12+111~natty1/doc/users_guide_snippets/appendix_c_spawning_methods.txt --- passenger-3.0.11+109~natty1/doc/users_guide_snippets/appendix_c_spawning_methods.txt 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/doc/users_guide_snippets/appendix_c_spawning_methods.txt 2012-04-13 18:19:26.000000000 +0000 @@ -122,7 +122,7 @@ Of course, smart spawning is not without gotchas. But if you understand the gotchas you can easily reap the benefits of smart spawning. -=== Smart spawning gotcha #1: unintential file descriptor sharing === +=== Smart spawning gotcha #1: unintentional file descriptor sharing === Because worker processes are created by forking from an ApplicationSpawner server, it will share all file descriptors that are opened by the @@ -133,7 +133,7 @@ descriptor at the same time, then their write calls will be interleaved, which may potentially cause problems. -The problem commonly involves socket connections that are unintentially being +The problem commonly involves socket connections that are unintentionally being shared. You can fix it by closing and reestablishing the connection when Phusion Passenger is creating a new worker process. Phusion Passenger provides the API call `PhusionPassenger.on_event(:starting_worker_process)` to do so. So you @@ -198,7 +198,7 @@ | Worker process 2 |-----/ +--------------------+ -As you can see, Worker process 1 and Worker process 2 have the same Memcache +As you can see, Worker process 1 and Worker process 2 have the same Memcached connection. Suppose that users Joe and Jane visit your website at the same time. Joe's @@ -250,7 +250,7 @@ ==== Example 2: Log file sharing (not harmful) ==== -There are also cases in which unintential file descriptor sharing is not harmful. +There are also cases in which unintentional file descriptor sharing is not harmful. One such case is log file file descriptor sharing. Even if two processes write to the log file at the same time, the worst thing that can happen is that the data in the log file is interleaved. Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/doc/users_guide_snippets/._tips.txt and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/doc/users_guide_snippets/._tips.txt differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/apache2/._Configuration.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/apache2/._Configuration.h differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/apache2/._DirectoryMapper.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/apache2/._DirectoryMapper.h differ diff -Nru passenger-3.0.11+109~natty1/ext/apache2/Hooks.cpp passenger-3.0.12+111~natty1/ext/apache2/Hooks.cpp --- passenger-3.0.11+109~natty1/ext/apache2/Hooks.cpp 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/apache2/Hooks.cpp 2012-04-13 18:19:26.000000000 +0000 @@ -1,6 +1,6 @@ /* * Phusion Passenger - http://www.modrails.com/ - * Copyright (c) 2010 Phusion + * Copyright (c) 2010, 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * @@ -79,6 +79,10 @@ extern "C" module AP_MODULE_DECLARE_DATA passenger_module; +#ifdef APLOG_USE_MODULE + APLOG_USE_MODULE(passenger); +#endif + /** * If the HTTP client sends POST data larger than this value (in bytes), @@ -99,6 +103,11 @@ #endif #endif +#if HTTP_VERSION(AP_SERVER_MAJORVERSION_NUMBER, AP_SERVER_MINORVERSION_NUMBER) >= 2004 + // Apache >= 2.4 + #define unixd_config ap_unixd_config +#endif + /** * Apache hook functions, wrapped in a class. @@ -230,16 +239,9 @@ * The existance of a request note means that the handler should be run. */ inline RequestNote *getRequestNote(request_rec *r) { - // The union is needed in order to be compliant with - // C99/C++'s strict aliasing rules. - // http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html - union { - RequestNote *note; - void *pointer; - } u; - u.note = 0; - apr_pool_userdata_get(&u.pointer, "Phusion Passenger", r->pool); - return u.note; + void *note = 0; + apr_pool_userdata_get(¬e, "Phusion Passenger", r->pool); + return (RequestNote *) note; } /** @@ -987,14 +989,23 @@ // Set standard CGI variables. - addHeader(headers, "SERVER_SOFTWARE", ap_get_server_version()); + #ifdef AP_GET_SERVER_VERSION_DEPRECATED + addHeader(headers, "SERVER_SOFTWARE", ap_get_server_banner()); + #else + addHeader(headers, "SERVER_SOFTWARE", ap_get_server_version()); + #endif addHeader(headers, "SERVER_PROTOCOL", r->protocol); addHeader(headers, "SERVER_NAME", ap_get_server_name(r)); addHeader(headers, "SERVER_ADMIN", r->server->server_admin); addHeader(headers, "SERVER_ADDR", r->connection->local_ip); addHeader(headers, "SERVER_PORT", apr_psprintf(r->pool, "%u", ap_get_server_port(r))); - addHeader(headers, "REMOTE_ADDR", r->connection->remote_ip); - addHeader(headers, "REMOTE_PORT", apr_psprintf(r->pool, "%d", r->connection->remote_addr->port)); + #if HTTP_VERSION(AP_SERVER_MAJORVERSION_NUMBER, AP_SERVER_MINORVERSION_NUMBER) >= 2004 + addHeader(headers, "REMOTE_ADDR", r->connection->client_ip); + addHeader(headers, "REMOTE_PORT", apr_psprintf(r->pool, "%d", r->connection->client_addr->port)); + #else + addHeader(headers, "REMOTE_ADDR", r->connection->remote_ip); + addHeader(headers, "REMOTE_PORT", apr_psprintf(r->pool, "%d", r->connection->remote_addr->port)); + #endif addHeader(headers, "REMOTE_USER", r->user); addHeader(headers, "REQUEST_METHOD", r->method); addHeader(headers, "QUERY_STRING", r->args ? r->args : ""); Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/apache2/._Hooks.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/apache2/._Hooks.h differ diff -Nru passenger-3.0.11+109~natty1/ext/apache2/mod_passenger.c passenger-3.0.12+111~natty1/ext/apache2/mod_passenger.c --- passenger-3.0.11+109~natty1/ext/apache2/mod_passenger.c 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/apache2/mod_passenger.c 2012-04-13 18:19:26.000000000 +0000 @@ -1,6 +1,6 @@ /* * Phusion Passenger - http://www.modrails.com/ - * Copyright (c) 2010 Phusion + * Copyright (c) 2010, 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/boost/smart_ptr/._enable_shared_from_this.hpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/boost/smart_ptr/._enable_shared_from_this.hpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/boost/smart_ptr/._make_shared.hpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/boost/smart_ptr/._make_shared.hpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/._Account.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/._Account.h differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/._AccountsDatabase.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/._AccountsDatabase.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/ApplicationPool/._Pool.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/ApplicationPool/._Pool.h differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/._BCrypt.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/._BCrypt.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/._BCrypt.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/._BCrypt.h differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/._Blowfish.c and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/._Blowfish.c differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/._Blowfish.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/._Blowfish.h differ diff -Nru passenger-3.0.11+109~natty1/ext/common/Constants.h passenger-3.0.12+111~natty1/ext/common/Constants.h --- passenger-3.0.11+109~natty1/ext/common/Constants.h 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/common/Constants.h 2012-04-13 18:19:26.000000000 +0000 @@ -1,6 +1,6 @@ /* * Phusion Passenger - http://www.modrails.com/ - * Copyright (c) 2010, 2011 Phusion + * Copyright (c) 2010, 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * @@ -26,7 +26,7 @@ #define _PASSENGER_CONSTANTS_H_ /* Don't forget to update lib/phusion_passenger.rb too. */ -#define PASSENGER_VERSION "3.0.11" +#define PASSENGER_VERSION "3.0.12" #define FEEDBACK_FD 3 Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/._EventedClient.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/._EventedClient.h differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/._EventedServer.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/._EventedServer.h differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/._FileDescriptor.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/._FileDescriptor.h differ diff -Nru passenger-3.0.11+109~natty1/ext/common/FileDescriptor.h passenger-3.0.12+111~natty1/ext/common/FileDescriptor.h --- passenger-3.0.11+109~natty1/ext/common/FileDescriptor.h 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/common/FileDescriptor.h 2012-04-13 18:19:26.000000000 +0000 @@ -42,7 +42,10 @@ using namespace oxt; -void safelyClose(int fd); +#ifndef _PASSENGER_SAFELY_CLOSE_DEFINED_ + #define _PASSENGER_SAFELY_CLOSE_DEFINED_ + void safelyClose(int fd, bool ignoreErrors = false); +#endif /** @@ -81,11 +84,7 @@ this_thread::disable_syscall_interruption dsi; int theFd = fd; fd = -1; - if (checkErrors) { - safelyClose(theFd); - } else { - syscalls::close(fd); - } + safelyClose(theFd, !checkErrors); } } Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/._Logging.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/._Logging.cpp differ diff -Nru passenger-3.0.11+109~natty1/ext/common/Process.h passenger-3.0.12+111~natty1/ext/common/Process.h --- passenger-3.0.11+109~natty1/ext/common/Process.h 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/common/Process.h 2012-04-13 18:19:26.000000000 +0000 @@ -40,6 +40,7 @@ #include #include #include +#include namespace Passenger { @@ -122,9 +123,7 @@ int ret; if (ownerPipe != -1) { - do { - ret = close(ownerPipe); - } while (ret == -1 && errno == EINTR); + safelyClose(ownerPipe, true); } for (it = serverSockets.begin(); it != serverSockets.end(); it++) { const SocketInfo &info = it->second; Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/._RandomGenerator.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/._RandomGenerator.h differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/._ServerInstanceDir.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/._ServerInstanceDir.h differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/._StringListCreator.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/._StringListCreator.h differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/Utils/._Base64.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/Utils/._Base64.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/Utils/._Base64.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/Utils/._Base64.h differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/Utils/._BufferedIO.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/Utils/._BufferedIO.h differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/Utils/._FileChangeChecker.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/Utils/._FileChangeChecker.h differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/Utils/._HttpHeaderBufferer.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/Utils/._HttpHeaderBufferer.h differ diff -Nru passenger-3.0.11+109~natty1/ext/common/Utils/IOUtils.cpp passenger-3.0.12+111~natty1/ext/common/Utils/IOUtils.cpp --- passenger-3.0.11+109~natty1/ext/common/Utils/IOUtils.cpp 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/common/Utils/IOUtils.cpp 2012-04-13 18:19:26.000000000 +0000 @@ -265,9 +265,7 @@ try { ret = syscalls::bind(fd, (const struct sockaddr *) &addr, sizeof(addr)); } catch (...) { - do { - ret = close(fd); - } while (ret == -1 && errno == EINTR); + safelyClose(fd, true); throw; } if (ret == -1) { @@ -275,9 +273,7 @@ string message = "Cannot bind Unix socket '"; message.append(filename.toString()); message.append("'"); - do { - ret = close(fd); - } while (ret == -1 && errno == EINTR); + safelyClose(fd, true); throw SystemException(message, e); } @@ -287,9 +283,7 @@ try { ret = syscalls::listen(fd, backlogSize); } catch (...) { - do { - ret = close(fd); - } while (ret == -1 && errno == EINTR); + safelyClose(fd, true); throw; } if (ret == -1) { @@ -297,9 +291,7 @@ string message = "Cannot listen on Unix socket '"; message.append(filename.toString()); message.append("'"); - do { - ret = close(fd); - } while (ret == -1 && errno == EINTR); + safelyClose(fd, true); throw SystemException(message, e); } @@ -337,9 +329,7 @@ try { ret = syscalls::bind(fd, (const struct sockaddr *) &addr, sizeof(addr)); } catch (...) { - do { - ret = close(fd); - } while (ret == -1 && errno == EINTR); + safelyClose(fd, true); throw; } if (ret == -1) { @@ -348,9 +338,7 @@ message.append(address); message.append("' port "); message.append(toString(port)); - do { - ret = close(fd); - } while (ret == -1 && errno == EINTR); + safelyClose(fd, true); throw SystemException(message, e); } @@ -361,9 +349,7 @@ printf("so_reuseaddr failed: %s\n", strerror(errno)); } } catch (...) { - do { - ret = close(fd); - } while (ret == -1 && errno == EINTR); + safelyClose(fd, true); throw; } // Ignore SO_REUSEPORT error, it's not fatal. @@ -374,9 +360,7 @@ try { ret = syscalls::listen(fd, backlogSize); } catch (...) { - do { - ret = close(fd); - } while (ret == -1 && errno == EINTR); + safelyClose(fd, true); throw; } if (ret == -1) { @@ -385,9 +369,7 @@ message.append(address); message.append("' port "); message.append(toString(port)); - do { - ret = close(fd); - } while (ret == -1 && errno == EINTR); + safelyClose(fd, true); throw SystemException(message, e); } @@ -440,9 +422,7 @@ try { ret = syscalls::connect(fd, (const sockaddr *) &addr, sizeof(addr)); } catch (...) { - do { - ret = close(fd); - } while (ret == -1 && errno == EINTR); + safelyClose(fd, true); throw; } if (ret == -1) { @@ -466,9 +446,7 @@ string message("Cannot connect to Unix socket '"); message.append(filename.toString()); message.append("'"); - do { - ret = close(fd); - } while (ret == -1 && errno == EINTR); + safelyClose(fd, true); throw SystemException(message, e); } } else { @@ -514,9 +492,7 @@ ret = syscalls::connect(fd, res->ai_addr, res->ai_addrlen); } catch (...) { freeaddrinfo(res); - do { - ret = close(fd); - } while (ret == -1 && errno == EINTR); + safelyClose(fd, true); throw; } e = errno; @@ -527,9 +503,7 @@ message.append(":"); message.append(toString(port)); message.append("'"); - do { - ret = close(fd); - } while (ret == -1 && errno == EINTR); + safelyClose(fd, true); throw SystemException(message, e); } @@ -1006,7 +980,7 @@ } void -safelyClose(int fd) { +safelyClose(int fd, bool ignoreErrors) { if (syscalls::close(fd) == -1) { /* FreeBSD has a kernel bug which can cause close() to return ENOTCONN. * This is harmless, ignore it. We check for this problem on all @@ -1015,7 +989,7 @@ * http://www.freebsd.org/cgi/query-pr.cgi?pr=79138 * http://www.freebsd.org/cgi/query-pr.cgi?pr=144061 */ - if (errno != ENOTCONN) { + if (errno != ENOTCONN && !ignoreErrors) { int e = errno; throw SystemException("Cannot close file descriptor", e); } diff -Nru passenger-3.0.11+109~natty1/ext/common/Utils/IOUtils.h passenger-3.0.12+111~natty1/ext/common/Utils/IOUtils.h --- passenger-3.0.11+109~natty1/ext/common/Utils/IOUtils.h 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/common/Utils/IOUtils.h 2012-04-13 18:19:26.000000000 +0000 @@ -414,12 +414,18 @@ /** * Closes the given file descriptor and throws an exception if anything goes wrong. - * This function also works around certain close() bugs on certain operating systems. + * This function also works around certain close() bugs and quirks on certain + * operating systems, such as the FreeBSD ENOTCONN-on-close bug and the fact that + * when close() returns EINTR the state of the file descriptor is unspecified. + * See IOUtils.cpp and ext/oxt/system_calls.cpp for details. * * @throws SystemException * @throws boost::thread_interrupted */ -void safelyClose(int fd); +#ifndef _PASSENGER_SAFELY_CLOSE_DEFINED_ + #define _PASSENGER_SAFELY_CLOSE_DEFINED_ + void safelyClose(int fd, bool ignoreErrors = false); +#endif } // namespace Passenger Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/Utils/._MemZeroGuard.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/Utils/._MemZeroGuard.h differ diff -Nru passenger-3.0.11+109~natty1/ext/common/Utils/MessageIO.h passenger-3.0.12+111~natty1/ext/common/Utils/MessageIO.h --- passenger-3.0.11+109~natty1/ext/common/Utils/MessageIO.h 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/common/Utils/MessageIO.h 2012-04-13 18:19:26.000000000 +0000 @@ -625,7 +625,7 @@ readFileDescriptorWithNegotiation(int fd, unsigned long long *timeout = NULL) { writeArrayMessage(fd, timeout, "pass IO", NULL); int result = readFileDescriptor(fd, timeout); - ScopeGuard guard(boost::bind(safelyClose, result)); + ScopeGuard guard(boost::bind(safelyClose, result, false)); writeArrayMessage(fd, timeout, "got IO", NULL); guard.clear(); return result; Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/Utils/._ScopeGuard.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/Utils/._ScopeGuard.h differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/common/Utils/._SystemTime.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/common/Utils/._SystemTime.h differ diff -Nru passenger-3.0.11+109~natty1/ext/common/Utils.cpp passenger-3.0.12+111~natty1/ext/common/Utils.cpp --- passenger-3.0.11+109~natty1/ext/common/Utils.cpp 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/common/Utils.cpp 2012-04-13 18:19:26.000000000 +0000 @@ -922,9 +922,7 @@ goto done; } else { - do { - ret = close(p[1]); - } while (ret == -1 && errno == EINTR); + close(p[1]); // Do not retry on EINTR: http://news.ycombinator.com/item?id=3363819 p[1] = -1; union { @@ -965,15 +963,12 @@ } done: + // Do not retry on EINTR: http://news.ycombinator.com/item?id=3363819 if (p[0] != -1) { - do { - ret = close(p[0]); - } while (ret == -1 && errno == EINTR); + close(p[0]); } if (p[1] != -1) { - do { - close(p[1]); - } while (ret == -1 && errno == EINTR); + close(p[1]); } if (pid != -1) { do { @@ -1007,6 +1002,11 @@ #endif for (int i = getHighestFileDescriptor(); i > lastToKeepOpen; i--) { + /* Even though we normally shouldn't retry on EINTR + * (http://news.ycombinator.com/item?id=3363819) + * it's okay to do that here because because this function + * may only be called in a single-threaded environment. + */ int ret; do { ret = close(i); diff -Nru passenger-3.0.11+109~natty1/ext/common/Utils.h passenger-3.0.12+111~natty1/ext/common/Utils.h --- passenger-3.0.11+109~natty1/ext/common/Utils.h 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/common/Utils.h 2012-04-13 18:19:26.000000000 +0000 @@ -50,7 +50,7 @@ static const uid_t USER_NOT_GIVEN = (uid_t) -1; static const gid_t GROUP_NOT_GIVEN = (gid_t) -1; -typedef struct CachedFileStat CachedFileStat; +class CachedFileStat; class ResourceLocator; /** Enumeration which indicates what kind of file a file is. */ diff -Nru passenger-3.0.11+109~natty1/ext/common/Watchdog.cpp passenger-3.0.12+111~natty1/ext/common/Watchdog.cpp --- passenger-3.0.11+109~natty1/ext/common/Watchdog.cpp 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/common/Watchdog.cpp 2012-04-13 18:19:26.000000000 +0000 @@ -90,7 +90,7 @@ #define REQUEST_SOCKET_PASSWORD_SIZE 64 -static string setOomScore(const StaticString &score); +static void setOomScore(const StaticString &score); /** @@ -764,46 +764,87 @@ }; +enum OomFileType { + OOM_ADJ, + OOM_SCORE_ADJ +}; + +static FILE * +openOomAdjFile(const char *mode, OomFileType &type) { + FILE *f = fopen("/proc/self/oom_score_adj", mode); + if (f == NULL) { + f = fopen("/proc/self/oom_adj", mode); + if (f == NULL) { + return NULL; + } else { + type = OOM_ADJ; + return f; + } + } else { + type = OOM_SCORE_ADJ; + return f; + } +} + /** * Linux-only way to change OOM killer configuration for * current process. Requires root privileges, which we * should have. */ -static string +static void setOomScore(const StaticString &score) { - if (!score.empty()) { - string oldScore; - - FILE *f = fopen("/proc/self/oom_adj", "r"); - if (f == NULL) { - return ""; - } - char buf[1024]; - size_t bytesRead; - while (true) { - bytesRead = fread(buf, 1, sizeof(buf), f); - if (bytesRead == 0 && feof(f)) { - break; - } else if (bytesRead == 0 && ferror(f)) { - fclose(f); - return ""; - } else { - oldScore.append(buf, bytesRead); - } - } + if (score.empty()) { + return; + } + + FILE *f; + OomFileType type; + + f = openOomAdjFile("r", type); + if (f != NULL) { + fwrite(score.data(), 1, score.size(), f); fclose(f); - - f = fopen("/proc/self/oom_adj", "w"); - if (f == NULL) { + } +} + +static string +setOomScoreNeverKill() { + string oldScore; + FILE *f; + OomFileType type; + + f = openOomAdjFile("r", type); + if (f == NULL) { + return ""; + } + char buf[1024]; + size_t bytesRead; + while (true) { + bytesRead = fread(buf, 1, sizeof(buf), f); + if (bytesRead == 0 && feof(f)) { + break; + } else if (bytesRead == 0 && ferror(f)) { + fclose(f); return ""; + } else { + oldScore.append(buf, bytesRead); } - fwrite(score.data(), 1, score.size(), f); - fclose(f); - - return oldScore; - } else { + } + fclose(f); + + f = openOomAdjFile("w", type); + if (f == NULL) { return ""; } + if (type == OOM_SCORE_ADJ) { + fprintf(f, "-1000\n"); + } else { + assert(type == OOM_ADJ); + fprintf(f, "-17\n"); + } + fclose(f); + + return oldScore; } /** @@ -965,7 +1006,7 @@ * for this watchdog. Note that the OOM score is inherited by child processes * so we need to restore it after each fork(). */ - oldOomScore = setOomScore("-17"); + oldOomScore = setOomScoreNeverKill(); agentsOptions = initializeAgent(argc, argv, "PassengerWatchdog"); logLevel = agentsOptions.getInt("log_level"); Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/libev/._config.guess and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/libev/._config.guess differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/libev/._config.sub and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/libev/._config.sub differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/libev/._install-sh and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/libev/._install-sh differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/libev/._LICENSE and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/libev/._LICENSE differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/libev/._missing and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/libev/._missing differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/libev/._mkinstalldirs and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/libev/._mkinstalldirs differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/libev/._README and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/libev/._README differ diff -Nru passenger-3.0.11+109~natty1/ext/nginx/Configuration.c passenger-3.0.12+111~natty1/ext/nginx/Configuration.c --- passenger-3.0.11+109~natty1/ext/nginx/Configuration.c 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/nginx/Configuration.c 2012-04-13 18:19:26.000000000 +0000 @@ -362,7 +362,9 @@ DEFINE_VAR_TO_PASS("SERVER_ADDR", "$server_addr"); DEFINE_VAR_TO_PASS("SERVER_PORT", "$server_port"); +#if NGINX_VERSION_NUM >= 1000010 ngx_str_set(&conf->upstream_config.module, "passenger"); +#endif return conf; } diff -Nru passenger-3.0.11+109~natty1/ext/nginx/ContentHandler.c passenger-3.0.12+111~natty1/ext/nginx/ContentHandler.c --- passenger-3.0.11+109~natty1/ext/nginx/ContentHandler.c 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/nginx/ContentHandler.c 2012-04-13 18:19:26.000000000 +0000 @@ -1197,8 +1197,10 @@ ngx_table_elt_t *h; ngx_http_upstream_header_t *hh; ngx_http_upstream_main_conf_t *umcf; + passenger_loc_conf_t *slcf; umcf = ngx_http_get_module_main_conf(r, ngx_http_upstream_module); + slcf = ngx_http_get_module_loc_conf(r, ngx_http_passenger_module); for ( ;; ) { @@ -1227,8 +1229,10 @@ h->value.data = h->key.data + h->key.len + 1; h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1; - ngx_cpystrn(h->key.data, r->header_name_start, h->key.len + 1); - ngx_cpystrn(h->value.data, r->header_start, h->value.len + 1); + ngx_memcpy(h->key.data, r->header_name_start, h->key.len); + h->key.data[h->key.len] = '\0'; + ngx_memcpy(h->value.data, r->header_start, h->value.len); + h->value.data[h->value.len] = '\0'; if (h->key.len == r->lowcase_index) { ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len); @@ -1276,7 +1280,11 @@ h->key.len = sizeof("Server") - 1; h->key.data = (u_char *) "Server"; - h->value.data = (u_char *) (NGINX_VER " + Phusion Passenger " PASSENGER_VERSION " (mod_rails/mod_rack)"); + if( slcf->show_version_in_header == 0 ) { + h->value.data = (u_char *) (NGINX_VER " + Phusion Passenger (mod_rails/mod_rack)"); + } else { + h->value.data = (u_char *) (NGINX_VER " + Phusion Passenger " PASSENGER_VERSION " (mod_rails/mod_rack)"); + } h->value.len = ngx_strlen(h->value.data); h->lowcase_key = (u_char *) "server"; } Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/nginx/._ContentHandler.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/nginx/._ContentHandler.h differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/nginx/._StaticContentHandler.c and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/nginx/._StaticContentHandler.c differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/oxt/._backtrace.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/oxt/._backtrace.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/oxt/._backtrace.hpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/oxt/._backtrace.hpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/oxt/detail/._backtrace_enabled.hpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/oxt/detail/._backtrace_enabled.hpp differ diff -Nru passenger-3.0.11+109~natty1/ext/oxt/detail/backtrace_enabled.hpp passenger-3.0.12+111~natty1/ext/oxt/detail/backtrace_enabled.hpp --- passenger-3.0.11+109~natty1/ext/oxt/detail/backtrace_enabled.hpp 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/oxt/detail/backtrace_enabled.hpp 2012-04-13 18:19:26.000000000 +0000 @@ -40,9 +40,9 @@ using namespace std; using namespace boost; -class trace_point; +struct trace_point; class tracable_exception; -class thread_registration; +struct thread_registration; extern boost::mutex _thread_registration_mutex; extern list _registered_threads; Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/oxt/detail/._spin_lock_gcc_x86.hpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/oxt/detail/._spin_lock_gcc_x86.hpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/oxt/detail/._tracable_exception_disabled.hpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/oxt/detail/._tracable_exception_disabled.hpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/oxt/detail/._tracable_exception_enabled.hpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/oxt/detail/._tracable_exception_enabled.hpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/oxt/._spin_lock.hpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/oxt/._spin_lock.hpp differ diff -Nru passenger-3.0.11+109~natty1/ext/oxt/system_calls.cpp passenger-3.0.12+111~natty1/ext/oxt/system_calls.cpp --- passenger-3.0.11+109~natty1/ext/oxt/system_calls.cpp 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/ext/oxt/system_calls.cpp 2012-04-13 18:19:26.000000000 +0000 @@ -137,12 +137,45 @@ int syscalls::close(int fd) { - int ret; - CHECK_INTERRUPTION( - ret == -1, - ret = ::close(fd) - ); - return ret; + /* Apparently POSIX says that if close() returns EINTR the + * file descriptor will be left in an undefined state, so + * when coding for POSIX we can't just loop on EINTR or we + * could run into race conditions with other threads. + * http://www.daemonology.net/blog/2011-12-17-POSIX-close-is-broken.html + * + * On Linux, FreeBSD and OpenBSD, close() releases the file + * descriptor when it returns EINTR. HP-UX does not. + * http://news.ycombinator.com/item?id=3363884 + * + * MacOS X is insane because although the system call does + * release the file descriptor, the close() function as + * implemented by libSystem may call pthread_testcancel() first + * which can also return EINTR. Whether this happens depends + * on whether unix2003 is enabled. + * http://www.reddit.com/r/programming/comments/ng6vt/posix_close2_is_broken/c38xrgu + */ + #if defined(_hpux) + int ret; + CHECK_INTERRUPTION( + ret == -1, + ret = ::close(fd) + ); + return ret; + #else + /* TODO: If it's not known whether the OS releases the file + * descriptor on EINTR-on-close(), we should print some kind of + * warning here. This would actually explain why some people get + * mysterious EBADF errors. I think the best thing we can do is + * to manually whitelist operating systems as we find out their + * behaviors. + */ + int ret = ::close(fd); + if (ret == -1 && errno == EINTR && this_thread::syscalls_interruptable()) { + throw thread_interrupted(); + } else { + return ret; + } + #endif } int Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/oxt/._thread.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/oxt/._thread.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/oxt/._thread.hpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/oxt/._thread.hpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/oxt/._tracable_exception.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/oxt/._tracable_exception.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/ext/oxt/._tracable_exception.hpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/ext/oxt/._tracable_exception.hpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/classic_rails/._request_handler.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/classic_rails/._request_handler.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/classic_rails_extensions/analytics_logging/._ac_benchmarking_extension.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/classic_rails_extensions/analytics_logging/._ac_benchmarking_extension.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/classic_rails_extensions/analytics_logging/._ac_rescue_extension.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/classic_rails_extensions/analytics_logging/._ac_rescue_extension.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/classic_rails_extensions/analytics_logging/._ar_abstract_adapter_extension.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/classic_rails_extensions/analytics_logging/._ar_abstract_adapter_extension.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/classic_rails_extensions/analytics_logging/._as_cache_extension.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/classic_rails_extensions/analytics_logging/._as_cache_extension.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/classic_rails_extensions/analytics_logging/._av_benchmark_helper_extension.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/classic_rails_extensions/analytics_logging/._av_benchmark_helper_extension.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/classic_rails_extensions/._init.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/classic_rails_extensions/._init.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/._constants.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/._constants.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/._message_channel.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/._message_channel.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/._message_client.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/._message_client.rb differ diff -Nru passenger-3.0.11+109~natty1/lib/phusion_passenger/packaging.rb passenger-3.0.12+111~natty1/lib/phusion_passenger/packaging.rb --- passenger-3.0.11+109~natty1/lib/phusion_passenger/packaging.rb 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/lib/phusion_passenger/packaging.rb 2012-04-13 18:19:26.000000000 +0000 @@ -1,5 +1,5 @@ # Phusion Passenger - http://www.modrails.com/ -# Copyright (c) 2010 Phusion +# Copyright (c) 2010, 2011, 2012 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # @@ -49,6 +49,7 @@ # A list of globs which match all files that should be packaged # in the Phusion Passenger gem or tarball. GLOB = [ + 'configure', 'Rakefile', 'README', 'DEVELOPERS.TXT', @@ -105,4 +106,4 @@ ] end -end # module PhusionPassenger \ No newline at end of file +end # module PhusionPassenger diff -Nru passenger-3.0.11+109~natty1/lib/phusion_passenger/platform_info/apache.rb passenger-3.0.12+111~natty1/lib/phusion_passenger/platform_info/apache.rb --- passenger-3.0.11+109~natty1/lib/phusion_passenger/platform_info/apache.rb 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/lib/phusion_passenger/platform_info/apache.rb 2012-04-13 18:19:26.000000000 +0000 @@ -1,5 +1,5 @@ # Phusion Passenger - http://www.modrails.com/ -# Copyright (c) 2010 Phusion +# Copyright (c) 2010, 2011, 2012 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # @@ -80,6 +80,17 @@ end end memoize :httpd + + # The Apache version, or nil if Apache is not found. + def self.httpd_version + if httpd + `#{httpd} -v` =~ %r{Apache/([\d\.]+)} + return $1 + else + return nil + end + end + memoize :httpd_version # The absolute path to the 'apr-config' or 'apr-1-config' executable, # or nil if not found. Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/platform_info/._curl.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/platform_info/._curl.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/platform_info/._linux.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/platform_info/._linux.rb differ diff -Nru passenger-3.0.11+109~natty1/lib/phusion_passenger/platform_info/ruby.rb passenger-3.0.12+111~natty1/lib/phusion_passenger/platform_info/ruby.rb --- passenger-3.0.11+109~natty1/lib/phusion_passenger/platform_info/ruby.rb 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/lib/phusion_passenger/platform_info/ruby.rb 2012-04-13 18:19:26.000000000 +0000 @@ -67,7 +67,7 @@ return filename else STDERR.puts "Your RVM wrapper scripts are too old. Please " + - "update them first by running 'rvm update --head && " + + "update them first by running 'rvm get head && " + "rvm reload && rvm repair all'." exit 1 end Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/._public_api.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/._public_api.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/rails3_extensions/._init.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/rails3_extensions/._init.rb differ diff -Nru passenger-3.0.11+109~natty1/lib/phusion_passenger/templates/apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb passenger-3.0.12+111~natty1/lib/phusion_passenger/templates/apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb --- passenger-3.0.11+109~natty1/lib/phusion_passenger/templates/apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/lib/phusion_passenger/templates/apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb 2012-04-13 18:19:26.000000000 +0000 @@ -1,9 +1,9 @@ -WARNING: Apache doesn't seem to be compiled with the 'prefork' or 'worker' MPM +WARNING: Apache doesn't seem to be compiled with the 'prefork', 'worker' or 'event' MPM -Passenger has only been tested on Apache with the 'prefork' and the 'worker' -MPM. Your Apache installation is compiled with the '<%= @current_mpm %>' MPM. We recommend -you to abort this installer and to recompile Apache with either the 'prefork' -or the 'worker' MPM. +Phusion Passenger has only been tested on Apache with the 'prefork', the +'worker' and the 'worker' MPM. Your Apache installation is compiled with +the '<%= @current_mpm %>' MPM. We recommend you to abort this installer and to recompile +Apache with either the 'prefork', the 'worker' or the 'event' MPM. Press Ctrl-C to abort this installer (recommended). Press Enter if you want to continue with installation anyway. diff -Nru passenger-3.0.11+109~natty1/lib/phusion_passenger/templates/apache2/deployment_example.txt.erb passenger-3.0.12+111~natty1/lib/phusion_passenger/templates/apache2/deployment_example.txt.erb --- passenger-3.0.11+109~natty1/lib/phusion_passenger/templates/apache2/deployment_example.txt.erb 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/lib/phusion_passenger/templates/apache2/deployment_example.txt.erb 2012-04-13 18:19:26.000000000 +0000 @@ -5,10 +5,13 @@ ServerName www.yourhost.com - DocumentRoot /somewhere/public # <-- be sure to point to 'public'! + # !!! Be sure to point DocumentRoot to 'public'! + DocumentRoot /somewhere/public - AllowOverride all # <-- relax Apache security settings - Options -MultiViews # <-- MultiViews must be turned off + # This relaxes Apache security settings. + AllowOverride all + # MultiViews must be turned off. + Options -MultiViews Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/lib/phusion_passenger/utils/._tmpdir.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/lib/phusion_passenger/utils/._tmpdir.rb differ diff -Nru passenger-3.0.11+109~natty1/lib/phusion_passenger.rb passenger-3.0.12+111~natty1/lib/phusion_passenger.rb --- passenger-3.0.11+109~natty1/lib/phusion_passenger.rb 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/lib/phusion_passenger.rb 2012-04-13 18:19:26.000000000 +0000 @@ -1,5 +1,5 @@ # Phusion Passenger - http://www.modrails.com/ -# Copyright (c) 2010, 2011 Phusion +# Copyright (c) 2010, 2011, 2012 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # @@ -25,10 +25,10 @@ ###### Version numbers ###### # Phusion Passenger version number. Don't forget to edit ext/common/Constants.h too. - VERSION_STRING = '3.0.11' + VERSION_STRING = '3.0.12' - PREFERRED_NGINX_VERSION = '1.0.10' - PREFERRED_PCRE_VERSION = '8.12' + PREFERRED_NGINX_VERSION = '1.0.15' + PREFERRED_PCRE_VERSION = '8.30' STANDALONE_INTERFACE_VERSION = 1 Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/._LICENSE and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/._LICENSE differ diff -Nru passenger-3.0.11+109~natty1/NEWS passenger-3.0.12+111~natty1/NEWS --- passenger-3.0.11+109~natty1/NEWS 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/NEWS 2012-04-13 18:19:26.000000000 +0000 @@ -1,8 +1,25 @@ +Release 3.0.12 +-------------- + + * [Apache] Support Apache 2.4. The event MPM is now also supported. + * [Nginx] Preferred Nginx version upgraded to 1.0.15. + * [Nginx] Preferred PCRE version upgraded to 8.30. + * [Nginx] Fixed compatibility with Nginx < 1.0.10. + * [Nginx] Nginx is now installed with http_gzip_static_module by default. + * [Nginx] Fixed a memory disclosure security problem. + The issue is documented at http://www.nginx.org/en/security_advisories.html + and affects more modules than just Phusion Passenger. Users are advised + to upgrade as soon as possible. Patch submitted by Gregory Potamianos. + * [Nginx] passenger_show_version_in_header now hides the Phusion Passenger version number from the 'Server:' header too. + Patch submitted by Gregory Potamianos. + * Fixed a /proc deprecation warning on Linux kernel >= 3.0. + + Release 3.0.11 -------------- * Fixed a compilation problem on platforms without alloca.h, such as FreeBSD 7. - * Improved performance and solves some warnings on Xen systems by compiling + * Improved performance and solved some warnings on Xen systems by compiling with `-mno-tls-direct-seg-refs`. Patch contributed by Michał Pokrywka. Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/cxx/._ApplicationPool_PoolTest.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/cxx/._ApplicationPool_PoolTest.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/cxx/._Base64Test.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/cxx/._Base64Test.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/cxx/._BufferedIOTest.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/cxx/._BufferedIOTest.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/cxx/._EventedClientTest.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/cxx/._EventedClientTest.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/cxx/._FileChangeCheckerTest.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/cxx/._FileChangeCheckerTest.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/cxx/._MessageIOTest.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/cxx/._MessageIOTest.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/cxx/._PoolOptionsTest.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/cxx/._PoolOptionsTest.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/cxx/._SystemTimeTest.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/cxx/._SystemTimeTest.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/cxx/._UtilsTest.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/cxx/._UtilsTest.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/cxx/._VariantMapTest.cpp and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/cxx/._VariantMapTest.cpp differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/integration_tests/._mycook_spec.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/integration_tests/._mycook_spec.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/ruby/shared/spawners/._spawner_spec.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/ruby/shared/spawners/._spawner_spec.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/ruby/._utils_spec.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/ruby/._utils_spec.rb differ diff -Nru passenger-3.0.11+109~natty1/test/stub/apache2/httpd.conf.erb passenger-3.0.12+111~natty1/test/stub/apache2/httpd.conf.erb --- passenger-3.0.11+109~natty1/test/stub/apache2/httpd.conf.erb 2012-04-07 00:17:30.000000000 +0000 +++ passenger-3.0.12+111~natty1/test/stub/apache2/httpd.conf.erb 2012-04-13 18:19:26.000000000 +0000 @@ -29,6 +29,10 @@ <% if !has_builtin_module?('mod_env.c') %> LoadModule env_module "<%= modules_dir %>/mod_env.so" <% end %> +<% if PlatformInfo.httpd_version >= '2.4.0' %> + LoadModule authz_core_module "<%= modules_dir %>/mod_authz_core.so" + LoadModule unixd_module "<%= modules_dir %>/mod_unixd.so" +<% end %> LoadModule passenger_module "<%= @mod_passenger %>" PassengerRoot "<%= @passenger_root %>" @@ -57,6 +61,11 @@ MaxSpareThreads 1 ThreadsPerChild 2 + + MinSpareThreads 1 + MaxSpareThreads 1 + ThreadsPerChild 2 + AllowOverride all @@ -66,12 +75,14 @@ ServerName passenger.test DocumentRoot "<%= @server_root %>" -LockFile <%= @server_root %>/httpd.lock +<% if PlatformInfo.httpd_version < '2.4.0' %> + LockFile <%= @server_root %>/httpd.lock +<% end %> PidFile <%= @server_root %>/httpd.pid ErrorLog <%= @passenger_root %>/test/test.log CustomLog <%= @server_root %>/access.log combined -<% if !vhosts.empty? %> +<% if !vhosts.empty? && PlatformInfo.httpd_version < '2.4.0' %> NameVirtualHost *:<%= @port %> <% end %> <% for vhost in vhosts %> Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/stub/rails_apps/2.3/mycook/config/._routes.rb and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/stub/rails_apps/2.3/mycook/config/._routes.rb differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/stub/wsgi/passenger_wsgi.pyc and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/stub/wsgi/passenger_wsgi.pyc differ Binary files /tmp/lZDT7f7FTw/passenger-3.0.11+109~natty1/test/tut/._tut_reporter.h and /tmp/UpclwpHELx/passenger-3.0.12+111~natty1/test/tut/._tut_reporter.h differ