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

Added support for passenger >= 4 #85

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
10 changes: 9 additions & 1 deletion manifests/passenger/apache/ubuntu/post.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,19 @@

exec {
'passenger-install-apache2-module':
environment => ["rvm_prefix=${rvm_prefix}", "rvm_path=${rvm_prefix}/rvm", "rvm_bin_path=${binpath}", "HOME=/tmp"],
command => "${binpath}rvm ${ruby_version} exec passenger-install-apache2-module -a",
creates => "${gempath}/passenger-${version}/ext/apache2/mod_passenger.so",
unless => "test -e ${gempath}/passenger-${version}/ext/apache2/mod_passenger.so",
logoutput => 'on_failure',
require => [Rvm_gem['passenger'], Package['apache2', 'build-essential', 'apache2-prefork-dev',
'libapr-dev', 'libaprutil-dev', 'libcurl4-openssl-dev']],
}

exec {
'create-symlink-for-passenger-4.0-modules':
command => "ln -s ${gempath}/passenger-${version}/libout/apache2/mod_passenger.so ${gempath}/passenger-${version}/ext/apache2/mod_passenger.so",
unless => "test -e ${gempath}/passenger-${version}/ext",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my system, the ext directory exists, causing this symlink to not be created. The mod_passenger.so does exist in the buildout directory. Can we just change the generated Apache config to point to that if the version is >= 4.0.0?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a pull request solving this in the template file for the Apache conf.d file (based on what was already there for the previous "ext" to "libout" changes). That may be a better method as it just uses the correct path in the LoadModule line. https://github.com/blt04/puppet-rvm/pull/89/files

require => Exec['passenger-install-apache2-module'],
}

file {
Expand Down