diff -ur apache-mod_rails-2.2.15-o/Rakefile apache-mod_rails-2.2.15/Rakefile --- apache-mod_rails-2.2.15-o/Rakefile 2010-08-28 23:04:20.000000000 -0600 +++ apache-mod_rails-2.2.15/Rakefile 2010-08-30 12:29:27.000000000 -0600 @@ -18,10 +18,8 @@ $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/misc") -require 'rubygems' require 'pathname' require 'rake/rdoctask' -require 'rake/gempackagetask' require 'rake/extensions' require 'rake/cplusplus' require 'phusion_passenger/platform_info' @@ -640,101 +638,6 @@ rd.options << "-S" << "-N" << "-p" << "-H" end - -##### Packaging - -spec = Gem::Specification.new do |s| - s.platform = Gem::Platform::RUBY - s.homepage = "http://www.modrails.com/" - s.summary = "Apache module for Ruby on Rails support." - s.name = "passenger" - s.version = PACKAGE_VERSION - s.rubyforge_project = "passenger" - s.author = "Phusion - http://www.phusion.nl/" - s.email = "info@phusion.nl" - s.requirements << "fastthread" << "Apache 2 with development headers" - s.require_paths = ["lib", "ext"] - s.add_dependency 'rake', '>= 0.8.1' - s.add_dependency 'fastthread', '>= 1.0.1' - s.add_dependency 'rack' - s.extensions << 'ext/phusion_passenger/extconf.rb' - s.files = FileList[ - 'Rakefile', - 'README', - 'DEVELOPERS.TXT', - 'LICENSE', - 'INSTALL', - 'NEWS', - 'lib/**/*.rb', - 'lib/**/*.py', - 'lib/phusion_passenger/templates/*', - 'lib/phusion_passenger/templates/apache2/*', - 'lib/phusion_passenger/templates/nginx/*', - 'bin/*', - 'doc/*', - - # If you're running 'rake package' for the first time, then these - # files don't exist yet, and so won't be matched by the above glob. - # So we add these filenames manually. - 'doc/Users guide Apache.html', - 'doc/Users guide Nginx.html', - 'doc/Security of user switching support.html', - - 'doc/*/*', - 'doc/*/*/*', - 'doc/*/*/*/*', - 'doc/*/*/*/*/*', - 'doc/*/*/*/*/*/*', - 'man/*', - 'debian/*', - 'ext/common/*.{cpp,c,h,hpp}', - 'ext/apache2/*.{cpp,h,c,TXT}', - 'ext/nginx/*.{c,cpp,h}', - 'ext/nginx/config', - 'ext/boost/*.{hpp,TXT}', - 'ext/boost/**/*.{hpp,cpp,pl,inl,ipp}', - 'ext/oxt/*.hpp', - 'ext/oxt/*.cpp', - 'ext/oxt/detail/*.hpp', - 'ext/phusion_passenger/*.{c,rb}', - 'benchmark/*.{cpp,rb}', - 'misc/*', - 'misc/*/*', - 'test/*.{rb,cpp,example}', - 'test/support/*.{cpp,h,rb}', - 'test/oxt/*.cpp', - 'test/ruby/**/*', - 'test/integration_tests/**/*', - 'test/stub/**/*' - ] - s.executables = [ - 'passenger-spawn-server', - 'passenger-install-apache2-module', - 'passenger-install-nginx-module', - 'passenger-config', - 'passenger-memory-stats', - 'passenger-make-enterprisey', - 'passenger-status', - 'passenger-stress-test' - ] - s.has_rdoc = true - s.extra_rdoc_files = ['README'] - s.rdoc_options << - "-S" << "-N" << "-p" << "-H" << - '--main' << 'README' << - '--title' << 'Passenger Ruby API' - s.description = "Passenger is an Apache module for Ruby on Rails support." -end - -Rake::GemPackageTask.new(spec) do |pkg| - pkg.need_tar_gz = true -end - -Rake::Task['package'].prerequisites.unshift(:doc) -Rake::Task['package:gem'].prerequisites.unshift(:doc) -Rake::Task['package:force'].prerequisites.unshift(:doc) -task :clobber => :'package:clean' - desc "Create a fakeroot, useful for building native packages" task :fakeroot => [:apache2, :native_support, :doc] do require 'rbconfig' @@ -772,34 +675,6 @@ sh "rm", "-rf", *Dir["#{docdir}/{definitions.h,Doxyfile,template}"] end -desc "Create a Debian package" -task 'package:debian' => :fakeroot do - if Process.euid != 0 - STDERR.puts - STDERR.puts "*** ERROR: the 'package:debian' task must be run as root." - STDERR.puts - exit 1 - end - - fakeroot = "pkg/fakeroot" - raw_arch = `uname -m`.strip - arch = case raw_arch - when /^i.86$/ - "i386" - when /^x86_64/ - "amd64" - else - raw_arch - end - - sh "sed -i 's/Version: .*/Version: #{PACKAGE_VERSION}/' debian/control" - sh "cp -R debian #{fakeroot}/DEBIAN" - sh "sed -i 's/: any/: #{arch}/' #{fakeroot}/DEBIAN/control" - sh "chown -R root:root #{fakeroot}" - sh "dpkg -b #{fakeroot} pkg/passenger_#{PACKAGE_VERSION}-#{arch}.deb" -end - - ##### Misc desc "Run 'sloccount' to see how much code Passenger has" diff -ur apache-mod_rails-2.2.15-o/lib/phusion_passenger/application.rb apache-mod_rails-2.2.15/lib/phusion_passenger/application.rb --- apache-mod_rails-2.2.15-o/lib/phusion_passenger/application.rb 2010-06-24 06:23:06.000000000 -0600 +++ apache-mod_rails-2.2.15/lib/phusion_passenger/application.rb 2010-08-30 12:29:27.000000000 -0600 @@ -21,7 +21,10 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -require 'rubygems' +begin + require 'rubygems' +rescue LoadError +end require 'phusion_passenger/exceptions' module PhusionPassenger Only in apache-mod_rails-2.2.15/lib/phusion_passenger: platform_info.rb~ diff -ur apache-mod_rails-2.2.15-o/lib/phusion_passenger/rack/application_spawner.rb apache-mod_rails-2.2.15/lib/phusion_passenger/rack/application_spawner.rb --- apache-mod_rails-2.2.15-o/lib/phusion_passenger/rack/application_spawner.rb 2010-06-24 06:23:06.000000000 -0600 +++ apache-mod_rails-2.2.15/lib/phusion_passenger/rack/application_spawner.rb 2010-08-30 12:29:51.000000000 -0600 @@ -101,7 +101,7 @@ # Make sure RubyGems uses any new environment variable values # that have been set now (e.g. $HOME, $GEM_HOME, etc) and that # it is able to detect newly installed gems. - Gem.clear_paths + Gem.clear_paths if defined? Gem setup_bundler_support app = load_rack_app end Only in apache-mod_rails-2.2.15/lib/phusion_passenger/rack: application_spawner.rb~ diff -ur apache-mod_rails-2.2.15-o/lib/phusion_passenger/railz/application_spawner.rb apache-mod_rails-2.2.15/lib/phusion_passenger/railz/application_spawner.rb --- apache-mod_rails-2.2.15-o/lib/phusion_passenger/railz/application_spawner.rb 2010-06-24 06:23:06.000000000 -0600 +++ apache-mod_rails-2.2.15/lib/phusion_passenger/railz/application_spawner.rb 2010-08-30 12:32:04.000000000 -0600 @@ -21,7 +21,10 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -require 'rubygems' +begin + require 'rubygems' +rescue LoadError +end require 'socket' require 'etc' require 'fcntl' @@ -173,7 +176,7 @@ # Make sure RubyGems uses any new environment variable values # that have been set now (e.g. $HOME, $GEM_HOME, etc) and that # it is able to detect newly installed gems. - Gem.clear_paths + Gem.clear_paths if defined? Gem setup_bundler_support require File.expand_path('config/environment') @@ -262,7 +265,7 @@ # Make sure RubyGems uses any new environment variable values # that have been set now (e.g. $HOME, $GEM_HOME, etc) and that # it is able to detect newly installed gems. - Gem.clear_paths + Gem.clear_paths if defined? Gem setup_bundler_support preload_application end Only in apache-mod_rails-2.2.15/lib/phusion_passenger/railz: application_spawner.rb~ diff -ur apache-mod_rails-2.2.15-o/lib/phusion_passenger/railz/framework_spawner.rb apache-mod_rails-2.2.15/lib/phusion_passenger/railz/framework_spawner.rb --- apache-mod_rails-2.2.15-o/lib/phusion_passenger/railz/framework_spawner.rb 2010-06-24 06:23:06.000000000 -0600 +++ apache-mod_rails-2.2.15/lib/phusion_passenger/railz/framework_spawner.rb 2010-08-30 12:31:50.000000000 -0600 @@ -21,7 +21,10 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -require 'rubygems' +begin + require 'rubygems' +rescue LoadError +end require 'phusion_passenger/abstract_server' require 'phusion_passenger/abstract_server_collection' require 'phusion_passenger/railz/application_spawner' @@ -299,7 +302,7 @@ # missing gem. If that's the case then the sysadmin # will install probably the gem. So we clear RubyGems's # cache so that it can detect new gems. - Gem.clear_paths + Gem.clear_paths if defined? Gem end return end Only in apache-mod_rails-2.2.15/lib/phusion_passenger/railz: framework_spawner.rb~ diff -ur apache-mod_rails-2.2.15-o/lib/phusion_passenger/spawn_manager.rb apache-mod_rails-2.2.15/lib/phusion_passenger/spawn_manager.rb --- apache-mod_rails-2.2.15-o/lib/phusion_passenger/spawn_manager.rb 2010-06-24 06:23:06.000000000 -0600 +++ apache-mod_rails-2.2.15/lib/phusion_passenger/spawn_manager.rb 2010-08-30 12:29:27.000000000 -0600 @@ -292,7 +292,7 @@ # missing gem. If that's the case then the sysadmin # will install probably the gem. So we clear RubyGems's # cache so that it can detect new gems. - Gem.clear_paths + Gem.clear_paths if defined? Gem send_error_page(client, 'load_error', :error => e, :app_root => app_root, :app_name => app_name(app_type)) elsif e.child_exception.is_a?(SystemExit) diff -ur apache-mod_rails-2.2.15-o/lib/phusion_passenger/utils.rb apache-mod_rails-2.2.15/lib/phusion_passenger/utils.rb --- apache-mod_rails-2.2.15-o/lib/phusion_passenger/utils.rb 2010-06-24 06:23:06.000000000 -0600 +++ apache-mod_rails-2.2.15/lib/phusion_passenger/utils.rb 2010-08-30 12:29:27.000000000 -0600 @@ -22,7 +22,10 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -require 'rubygems' +begin + require 'rubygems' +rescue LoadError +end require 'thread' if (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby") && RUBY_VERSION < "1.8.7" require 'fastthread'