Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add OpenSSL as required dependency for Nginx (fixes issue #422). Upda…

…te NEWS.
  • Loading branch information...
commit adad4c6d848a9b4ba8642c6c094ffde89808fd34 1 parent 3a5f21e
@FooBarWidget FooBarWidget authored
View
14 NEWS
@@ -1,3 +1,17 @@
+Release 2.2.8
+-------------
+
+ * [Nginx] Fixed some signal handling problems.
+ Restarting Nginx on OS X with SIGHUP can sometimes take a long time or
+ even fail completely. This is because of some signal handling problems,
+ which have now been fixed.
+ * [Nginx] Added OpenSSL as dependency.
+ OpenSSL is required in order to install Nginx, but this was not checked
+ by passenger-install-nginx-module. As a result,
+ passenger-install-nginx-module fails on e.g. out-of-the-box Ubuntu
+ installations until the user manually installs OpenSSL. Issue #422.
+
+
Release 2.2.7
-------------
View
1  bin/passenger-install-nginx-module
@@ -45,6 +45,7 @@ class Installer < PhusionPassenger::AbstractInstaller
Dependencies::Ruby_OpenSSL,
Dependencies::RubyGems,
Dependencies::Rake,
+ Dependencies::OpenSSL_Dev,
Dependencies::Zlib_Dev
]
if Dependencies.fastthread_required?
View
32 lib/phusion_passenger/dependencies.rb
@@ -357,6 +357,38 @@ def self.fastthread_required?
dep.install_instructions = "Please install RubyGems first, then run <b>#{PlatformInfo::GEM || "gem"} install rack</b>"
end
+ OpenSSL_Dev = Dependency.new do |dep|
+ dep.name = "OpenSSL development headers"
+ dep.define_checker do |result|
+ source_file = '/tmp/passenger-openssl-check.c'
+ object_file = '/tmp/passenger-openssl-check.o'
+ begin
+ File.open(source_file, 'w') do |f|
+ f.write("#include <openssl/ssl.h>")
+ end
+ Dir.chdir(File.dirname(source_file)) do
+ if system("(gcc #{ENV['CFLAGS']} -c '#{source_file}') >/dev/null 2>/dev/null")
+ result.found
+ else
+ result.not_found
+ end
+ end
+ ensure
+ File.unlink(source_file) rescue nil
+ File.unlink(object_file) rescue nil
+ end
+ end
+ if RUBY_PLATFORM =~ /linux/
+ tags = PlatformInfo.linux_distro_tags
+ if tags.include?(:debian)
+ dep.install_command = "apt-get install libssl-dev"
+ elsif tags.include?(:redhat)
+ dep.install_command = "yum install openssl-devel"
+ end
+ end
+ dep.website = "http://www.openssl.org/"
+ end
+
Zlib_Dev = Dependency.new do |dep|
dep.name = "Zlib development headers"
dep.define_checker do |result|
Please sign in to comment.
Something went wrong with that request. Please try again.