Permalink
Browse files

Import passenger_apache2 version 0.99.2

  • Loading branch information...
1 parent b17bd46 commit 3dc89265e217bf36e26798fb07f448ae8a27c7a1 @jtimberman jtimberman committed Mar 1, 2012
@@ -6,6 +6,13 @@ Installs passenger for Apache 2.
Changes
====
+## v0.99.2:
+
+* [COOK-859] - don't hardcode module path
+* [COOK-539] - use --auto for installation
+* [COOK-608] - remove RailsAllowModRewrite from web_app.erb
+* [COOK-640] - use correct development headers on RHEL
+
## v0.99.0:
* Upgrade to passenger 3.0.7
@@ -1,7 +1,7 @@
{
"name": "passenger_apache2",
"description": "Installs passenger for Apache2",
- "long_description": "Description\n====\n\nInstalls passenger for Apache 2.\n\nChanges\n====\n\n## v0.99.0:\n\n* Upgrade to passenger 3.0.7\n* Attributes are all \"default\"\n* Install curl development headers\n* Move PassengerMaxPoolSize to config of module instead of vhost.\n\nRequirements\n====\n\n## Platform\n\nTested on Ubuntu 10.04. Should work on any Ubuntu/Debian platforms.\n\n## Cookbooks\n\nOpscode cookbooks:\n\n* apache2\n* build-essential\n\nAttributes \n====\n\n* `passenger[:version]` - Specify the version of passenger to install.\n* `passenger[:max_pool_size]` - Sets PassengerMaxPoolSize in the Apache module config.\n* `passenger[:root_path]` - The location of the passenger gem.\n* `passenger[:module_path]` - The location of the compiled passenger apache module.\n\nUsage\n====\n\nFor example, to run a Rails application on passenger:\n\n include_recipe \"rails\"\n include_recipe \"passenger\"\n \n web_app \"myproj\" do\n docroot \"/srv/myproj/public\"\n server_name \"myproj.#{node[:domain]}\"\n server_aliases [ \"myproj\", node[:hostname] ]\n rails_env \"production\"\n end\n\nA sample config template is provided, `web_app.conf.erb`. If this is suitable for your application, add 'cookbook \"passenger\"' to the define above to use that template. Otherwise, copy the template to the cookbook where you're using `web_app`, and modify as needed. The cookbook parameter is optional, if omitted it will search the cookbook where the define is used.\n\nLicense and Author\n====\n\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\nAuthor:: Joshua Sierles (<joshua@37signals.com>)\nAuthor:: Michael Hale (<mikehale@gmail.com>)\n\nCopyright:: 2009-2011, Opscode, Inc\nCopyright:: 2009, 37signals\nCoprighty:: 2009, Michael Hale\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
+ "long_description": "Description\n====\n\nInstalls passenger for Apache 2.\n\nChanges\n====\n\n## v0.99.2:\n\n* [COOK-859] - don't hardcode module path\n* [COOK-539] - use --auto for installation\n* [COOK-608] - remove RailsAllowModRewrite from web_app.erb\n* [COOK-640] - use correct development headers on RHEL\n\n## v0.99.0:\n\n* Upgrade to passenger 3.0.7\n* Attributes are all \"default\"\n* Install curl development headers\n* Move PassengerMaxPoolSize to config of module instead of vhost.\n\nRequirements\n====\n\n## Platform\n\nTested on Ubuntu 10.04. Should work on any Ubuntu/Debian platforms.\n\n## Cookbooks\n\nOpscode cookbooks:\n\n* apache2\n* build-essential\n\nAttributes \n====\n\n* `passenger[:version]` - Specify the version of passenger to install.\n* `passenger[:max_pool_size]` - Sets PassengerMaxPoolSize in the Apache module config.\n* `passenger[:root_path]` - The location of the passenger gem.\n* `passenger[:module_path]` - The location of the compiled passenger apache module.\n\nUsage\n====\n\nFor example, to run a Rails application on passenger:\n\n include_recipe \"rails\"\n include_recipe \"passenger\"\n \n web_app \"myproj\" do\n docroot \"/srv/myproj/public\"\n server_name \"myproj.#{node[:domain]}\"\n server_aliases [ \"myproj\", node[:hostname] ]\n rails_env \"production\"\n end\n\nA sample config template is provided, `web_app.conf.erb`. If this is suitable for your application, add 'cookbook \"passenger\"' to the define above to use that template. Otherwise, copy the template to the cookbook where you're using `web_app`, and modify as needed. The cookbook parameter is optional, if omitted it will search the cookbook where the define is used.\n\nLicense and Author\n====\n\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\nAuthor:: Joshua Sierles (<joshua@37signals.com>)\nAuthor:: Michael Hale (<mikehale@gmail.com>)\n\nCopyright:: 2009-2011, Opscode, Inc\nCopyright:: 2009, 37signals\nCoprighty:: 2009, Michael Hale\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
"maintainer": "Opscode, Inc.",
"maintainer_email": "cookbooks@opscode.com",
"license": "Apache 2.0",
@@ -12,7 +12,7 @@
"debian": ">= 0.0.0"
},
"dependencies": {
- "apache2": ">= 0.0.0",
+ "apache2": ">= 1.0.4",
"build-essential": ">= 0.0.0"
},
"recommendations": {
@@ -33,5 +33,5 @@
"passenger_apache2": "Installs Passenger as an Apache module",
"passenger_apache2::mod_rails": "Enables Apache module configuration for passenger module"
},
- "version": "0.99.0"
+ "version": "0.99.2"
}
@@ -3,12 +3,12 @@
license "Apache 2.0"
description "Installs passenger for Apache2"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version "0.99.0"
+version "0.99.2"
recipe "passenger_apache2", "Installs Passenger as an Apache module"
recipe "passenger_apache2::mod_rails", "Enables Apache module configuration for passenger module"
-depends "apache2"
+depends "apache2", ">= 1.0.4"
depends "build-essential"
%w{ redhat centos ubuntu debian }.each do |os|
@@ -27,7 +27,13 @@
if platform?("centos","redhat")
package "httpd-devel"
- package "curl-devel"
+ if node['platform_version'].to_f < 6.0
+ package 'curl-devel'
+ else
+ package 'libcurl-devel'
+ package 'openssl-devel'
+ package 'zlib-devel'
+ end
else
%w{ apache2-prefork-dev libapr1-dev libcurl4-gnutls-dev }.each do |pkg|
package pkg do
@@ -41,6 +47,6 @@
end
execute "passenger_module" do
- command 'echo -en "\n\n\n\n" | passenger-install-apache2-module'
+ command 'passenger-install-apache2-module --auto'
creates node[:passenger][:module_path]
end
@@ -24,20 +24,15 @@
include_recipe "passenger_apache2"
-template "#{node[:apache][:dir]}/mods-available/passenger.load" do
- cookbook "passenger_apache2"
- source "passenger.load.erb"
- owner "root"
- group "root"
- mode 0755
-end
template "#{node[:apache][:dir]}/mods-available/passenger.conf" do
cookbook "passenger_apache2"
source "passenger.conf.erb"
owner "root"
group "root"
- mode 0755
+ mode "644"
end
-apache_module "passenger"
+apache_module "passenger" do
+ module_path node[:passenger][:module_path]
+end
@@ -1 +0,0 @@
-LoadModule passenger_module <%= node[:passenger][:module_path] %>
@@ -5,7 +5,6 @@
RailsBaseURI /
RailsEnv <%= @params[:rails_env] %>
- RailsAllowModRewrite on
<Directory <%= @params[:docroot] %>>
Options FollowSymLinks

0 comments on commit 3dc8926

Please sign in to comment.