Red Hat Bugzilla – Full Text Bug Listing
|Summary:||[RFE] Hard coded paths to share files|
|Product:||[Community] Publican||Reporter:||Jeff Fearn <jfearn>|
|Component:||publican||Assignee:||Jeff Fearn <jfearn>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||tools-bugs <tools-bugs>|
|Version:||2.5||CC:||mmcallis, pkovar, publican-list, raphael, rglasz, xma|
|Fixed In Version:||3.1.0||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2013-02-05 22:40:39 EST||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
Description Jeff Fearn 2010-12-09 22:14:13 EST
Description of problem: Currently Publican has hard coded paths for share content, /usr/share/publican on Linux, these path should be sourced from the local perl install. Version-Release number of selected component (if applicable): 2.5 Additional info: Hard coded path makes porting to other platforms harder. http://search.cpan.org/~jkutej/Module-Build-SysPath-0.13/ should allow this behaviour. http://search.cpan.org/~jkutej/Sys-Path-0.10/ has an example of using the above.
Comment 1 Jeff Fearn 2012-11-06 23:47:09 EST
Proposed solution: Add calls to config_data in Build.PL to create a Publican::ConfigData at build time. See http://search.cpan.org/~leont/Module-Build-0.4003/lib/Module/Build/Authoring.pod#SAVING_CONFIGURATION_INFORMATION e.g. In Build.PL $builder->config_data('cfg_path', $builder->install_path('etc')); Then in code: use Publican::ConfigData; my $cfg_path = Publican::ConfigData->config('cfg_path'); open($FOO, "<", "$cfg_path/publican-website.cfg");
Comment 2 Jeff Fearn 2012-11-27 07:00:02 EST
I've committed a first shot at fixing this to a new branch. git checkout bz661946 Seems to work well and should be fairly portable. Updated README with an example of how to override the paths on the command line during building.
Comment 3 Raphaël Hertzog 2012-12-03 04:01:39 EST
Did you expect me to review or have a try ? I'm fairly busy right now so I was not planning to do it... but if you believe that it's needed, I will try to find a slot for this.
Comment 4 Jeff Fearn 2012-12-03 17:25:18 EST
(In reply to comment #3) > Did you expect me to review or have a try ? I'm fairly busy right now so I > was not planning to do it... but if you believe that it's needed, I will try > to find a slot for this. The comment was mostly for me to remember what I'd done :) But if you have an itch to scratch then that's just free beer :D
Comment 5 Jeff Fearn 2013-01-06 23:25:35 EST
This fix has been committed to the devel branch for inclusion in Publican 3.1.
Comment 6 xuezhi ma 2013-01-31 03:20:17 EST
Hi Jeff, I remember that QE won't test this bug, and we have add this bug in "Features not to be tested" in test plan, so please help to verify this bug and change the bug status, thanks very much