Bug 1021940

Summary: mod_passenger should contain PassengerRoot ini file with local paths configuration
Product: [Fedora] Fedora Reporter: Jan Kaluža <jkaluza>
Component: rubygem-passengerAssignee: Brett Lentz <brett.lentz>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 20CC: brett.lentz, fedora, jkaluza, jmader, tdawson, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-passenger-4.0.18-4.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-15 07:02:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed patch
none
proposed patch v2 none

Description Jan Kaluža 2013-10-22 11:19:52 UTC
When updating to mod_passenger 4.x, rubygem-passenger-3.0.12-force-native.patch has been removed. It is true this patch is not needed now, but we still have to tell mod_passenger somehow that in Fedora we use different directories then the once configured by default in ResourceLocator.h:

> string root = rootOrFile;
> binDir              = root + "/bin";
> agentsDir           = root + "/buildout/agents";
> helperScriptsDir    = root + "/helper-scripts";
> resourcesDir        = root + "/resources";
> docDir              = root + "/doc";
> rubyLibDir          = root + "/lib";

It looks mod_passenger 4.x can load INI file as "PassengerRoot" with [locations] section containing all the hardcoded paths. I think we should use this way in Fedora and define default INI file with the local paths to agentsDir, binDir and so on...

Following part of ResourceLocator.h describes the configuration variables available for the INI file:

> string file = rootOrFile;
> IniFileSectionPtr options = IniFile(file).section("locations");
> binDir              = getOption(file, options, "bin_dir");
> agentsDir           = getOption(file, options, "agents_dir");
> helperScriptsDir    = getOption(file, options, "helper_scripts_dir");
> resourcesDir        = getOption(file, options, "resources_dir");
> docDir              = getOption(file, options, "doc_dir");
> rubyLibDir          = getOption(file, options, "ruby_libdir");

Comment 1 Jan Kaluža 2013-10-22 11:20:41 UTC
Changing priority, because without this change, mod_passenger is not useful out-of-box.

Comment 2 Jan Kaluža 2013-10-22 11:29:29 UTC
Example INI file which can be used as PassengerRoot (I'm not sure with doc_dir):

[locations]
bin_dir=/usr/bin
agents_dir=/usr/lib64/gems/exts/passenger-4.0.18/agents
helper_scripts_dir=/usr/share/gems/gems/passenger-4.0.18/helper-scripts
resources_dir=/usr/share/gems/gems/passenger-4.0.18/resources
doc_dir=/usr/share/gems/doc/
ruby_libdir=/usr/share/gems/gems/passenger-4.0.18/lib

Comment 3 Jan Kaluža 2013-10-22 11:53:58 UTC
Ok, there are more configuration variables which have to be set, but I think you got the idea...

Comment 4 Jan Kaluža 2013-10-31 09:43:39 UTC
Created attachment 817783 [details]
proposed patch

This patch adds "locations.ini" into passenger's lib directory as described in <https://github.com/phusion/passenger/blob/master/doc/Packaging.txt.md>. This file contains paths to passenger directories as they are packaged in Fedora.

I've tested this patch and mod_passenger is working out-of-box for me with this patch applied.

Comment 5 Jan Kaluža 2013-10-31 10:17:51 UTC
Created attachment 817809 [details]
proposed patch v2

Previous patch was corrupted. This one is OK

This patch adds "locations.ini" into passenger's lib directory as described in <https://github.com/phusion/passenger/blob/master/doc/Packaging.txt.md>. This file contains paths to passenger directories as they are packaged in Fedora.

I've tested this patch and mod_passenger is working out-of-box for me with this patch applied.

Comment 6 Jan Kaluža 2013-11-07 12:19:29 UTC
Hi again, committing this patch would really help people using F20 once released. Right now rubygem-passenger does not work out-of-box and without creating this locations.ini file manually one can't use it.

Comment 9 Fedora Update System 2013-11-11 15:16:57 UTC
rubygem-passenger-4.0.18-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/rubygem-passenger-4.0.18-3.fc20

Comment 10 Johan Cwiklinski 2013-11-11 17:58:33 UTC
Using Fedora 20, using the latest build solve the issue "watchdog executable not found" starting apache with mod_passenger I had with the -2 build.

Now, trying to run a ruby app (chiliproject), I get the following error:
Phusion Passenger: no passenger_native_support.so found for the current Ruby interpreter

$ locate passenger_native_support.so
/usr/lib64/gems/ruby/passenger-4.0.18/lib/native/passenger_native_support.so

IMO, that seems related to the current bug to me; passenger cannot find one of its files. Let me know if it is not, I'll open another bug.

Comment 11 Fedora Update System 2013-11-12 00:28:49 UTC
Package rubygem-passenger-4.0.18-3.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing rubygem-passenger-4.0.18-3.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-21082/rubygem-passenger-4.0.18-3.fc20
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2013-11-15 07:30:28 UTC
rubygem-passenger-4.0.18-4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/rubygem-passenger-4.0.18-4.fc20

Comment 13 Joe 2014-02-14 03:03:48 UTC
When will rubygem-passenger-4.0.18-4.fc20 get pushed to stable? I had to deploy it from updates-testing (which fixed this issue for me). Kind of a deal-breaker for folks trying to deploy ruby/rails apps on F20 who might not know about updates-testing or be willing to temporarily enable the repo...

Comment 14 Fedora Update System 2014-02-15 07:02:42 UTC
rubygem-passenger-4.0.18-4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.