Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mod_passenger.so location wrong for passenger >= '4.0.0' #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion manifests/passenger/apache/centos/post.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,21 @@
$gempath,
$binpath
) {

if $version > '4.0.0' {
$install_out_directory = 'buildout'
} elsif $version > '3.9.0' {
$install_out_directory = 'libout'
} else {
$install_out_directory = 'ext'
}

$install_creates = "${rvm::passenger::apache::gempath}/passenger-${rvm::passenger::apache::version}/${install_out_directory}/apache2/mod_passenger.so"

exec {
'passenger-install-apache2-module':
command => "${rvm::passenger::apache::binpath}rvm ${rvm::passenger::apache::ruby_version} exec passenger-install-apache2-module -a",
creates => "${rvm::passenger::apache::gempath}/passenger-${rvm::passenger::apache::version}/ext/apache2/mod_passenger.so",
creates => $install_creates,
logoutput => 'on_failure',
require => [Rvm_gem['passenger'], Package['httpd','httpd-devel','mod_ssl']];
}
Expand Down
14 changes: 12 additions & 2 deletions manifests/passenger/apache/ubuntu/post.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,20 @@
$binpath
) {

if $version > '4.0.0' {
$install_out_directory = 'buildout'
} elsif $version > '3.9.0' {
$install_out_directory = 'libout'
} else {
$install_out_directory = 'ext'
}

$install_creates = "${gempath}/passenger-${version}/${install_out_directory}/apache2/mod_passenger.so"

exec {
'passenger-install-apache2-module':
command => "${binpath}rvm ${ruby_version} exec passenger-install-apache2-module -a",
creates => "${gempath}/passenger-${version}/ext/apache2/mod_passenger.so",
creates => $install_creates,
logoutput => 'on_failure',
require => [Rvm_gem['passenger'], Package['apache2', 'build-essential', 'apache2-prefork-dev',
'libapr-dev', 'libaprutil-dev', 'libcurl4-openssl-dev']],
Expand All @@ -23,7 +33,7 @@
file {
'/etc/apache2/mods-available/passenger.load':
ensure => file,
content => "LoadModule passenger_module ${gempath}/passenger-${version}/ext/apache2/mod_passenger.so",
content => "LoadModule passenger_module ${install_creates}",
require => Exec['passenger-install-apache2-module'];

'/etc/apache2/mods-available/passenger.conf':
Expand Down
6 changes: 1 addition & 5 deletions templates/passenger-apache-centos.conf.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<% if version >= '3.9.0' %>
LoadModule passenger_module <%= @gempath %>/passenger-<%= @version %>/libout/apache2/mod_passenger.so
<% else %>
LoadModule passenger_module <%= @gempath %>/passenger-<%= @version %>/ext/apache2/mod_passenger.so
<% end %>
LoadModule passenger_module <%= @install_creates %>

<IfModule passenger_module>
PassengerRoot <%= @gempath %>/passenger-<%= @version %>
Expand Down