Bug 1021940 - mod_passenger should contain PassengerRoot ini file with local paths configuration
mod_passenger should contain PassengerRoot ini file with local paths configur...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rubygem-passenger (Show other bugs)
20
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Brett Lentz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-22 07:19 EDT by Jan Kaluža
Modified: 2014-02-15 02:02 EST (History)
6 users (show)

See Also:
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 02:02:42 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed patch (3.29 KB, patch)
2013-10-31 05:43 EDT, Jan Kaluža
no flags Details | Diff
proposed patch v2 (3.32 KB, patch)
2013-10-31 06:17 EDT, Jan Kaluža
no flags Details | Diff

  None (edit)
Description Jan Kaluža 2013-10-22 07:19:52 EDT
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 07:20:41 EDT
Changing priority, because without this change, mod_passenger is not useful out-of-box.
Comment 2 Jan Kaluža 2013-10-22 07:29:29 EDT
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 07:53:58 EDT
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 05:43:39 EDT
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 06:17:51 EDT
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 07:19:29 EST
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 10:16:57 EST
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 12:58:33 EST
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-11 19:28:49 EST
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 02:30:28 EST
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-13 22:03:48 EST
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 02:02:42 EST
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.

Note You need to log in before you can comment on or make changes to this bug.