Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 414829

Summary: www-apps/rt-4.0.5: Generated.pm configured directories point to /usr/share/webapps instaed of webapp install dir
Product: Gentoo Linux Reporter: Christoph Erdle <chris>
Component: Current packagesAssignee: Eric Martin <eric.joshua.martin>
Status: RESOLVED FIXED    
Severity: normal CC: proxy-maint, pva, radhermit, web-apps
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch for files/reconfig.
Last patch introduced a regression with 3.8.x. This fixes to check for Generated.pm

Description Christoph Erdle 2012-05-06 07:22:37 UTC
After deploying www-apps/rt-4.0.5 using webapp-config the paths in <webapp-hostroot>/rt-4.0.5/lib/RT/Generated.pm are not set correctly to reflect webapp install path.

Current content:
$BasePath = '//usr/share/webapps/rt/4.0.5/hostroot/rt-4.0.5';
$EtcPath = '//usr/share/webapps/rt/4.0.5/hostroot/rt-4.0.5/etc';
$BinPath = '//usr/share/webapps/rt/4.0.5/hostroot/rt-4.0.5/bin';
$SbinPath = '//usr/share/webapps/rt/4.0.5/hostroot/rt-4.0.5/sbin';
$VarPath = '//usr/share/webapps/rt/4.0.5/hostroot/rt-4.0.5/var';
$LexiconPath = '//usr/share/webapps/rt/4.0.5/hostroot/rt-4.0.5/share/po';
$PluginPath = '';
$LocalPath = '//usr/share/webapps/rt/4.0.5/hostroot/rt-4.0.5/local';
$LocalEtcPath = '//usr/share/webapps/rt/4.0.5/hostroot/rt-4.0.5/local/etc';
$LocalLibPath        =    '//usr/share/webapps/rt/4.0.5/hostroot/rt-4.0.5/local/lib';
$LocalLexiconPath = '//usr/share/webapps/rt/4.0.5/hostroot/rt-4.0.5/local/po';
$LocalPluginPath = '';
# $MasonComponentRoot is where your rt instance keeps its mason html files
$MasonComponentRoot = '//usr/share/webapps/rt/4.0.5/htdocs';
# $MasonLocalComponentRoot is where your rt instance keeps its site-local
# mason html files.
$MasonLocalComponentRoot = '//usr/share/webapps/rt/4.0.5/hostroot/rt-4.0.5/local/html';
# $MasonDataDir Where mason keeps its datafiles
$MasonDataDir = '//usr/share/webapps/rt/4.0.5/hostroot/rt-4.0.5/var/mason_data';
# RT needs to put session data (for preserving state between connections
# via the web interface)
$MasonSessionDir = '//usr/share/webapps/rt/4.0.5/hostroot/rt-4.0.5/var/session_data';

Workaround:
sed -i -e 's#//usr/share/webapps/rt/4.0.5/hostroot#//var/www/example.net/www#' Generated.pm


Reproducible: Always

Steps to Reproduce:
1. emerge www-apps/rt
2. webapp-config -I -h www.example.com -d rt rt 4.0.5
Actual Results:  
Initial sign of misconfiguration I noticed was that after creating RT_SiteConfig.pm the settings weren't picked up when using rt-setup-database

Expected Results:  
configured paths should point to the webapp deployment path, not to /usr/share/webapps
Comment 1 Eric Martin 2013-03-07 12:54:19 UTC
Created attachment 341230 [details, diff]
patch for files/reconfig.
Comment 2 Eric Martin 2013-03-07 12:55:40 UTC
Comment on attachment 341230 [details, diff]
patch for files/reconfig.

Fixed the problem mentioned in the ticket, and organized the line while I was at it.
Comment 3 Eric Martin 2013-03-07 12:56:45 UTC
I have confirmed and fixed this bug in my overlay.  Peter, can you please test this and commit to the tree?

Thanks!
Comment 4 Eric Martin 2013-03-08 15:43:38 UTC
Comment on attachment 341230 [details, diff]
patch for files/reconfig.

>diff --git a/www-apps/rt/files/reconfig b/www-apps/rt/files/reconfig
>index e84018c..605db4c 100644
>--- a/www-apps/rt/files/reconfig
>+++ b/www-apps/rt/files/reconfig
>@@ -12,7 +12,7 @@ if [ $1 = "install" ]; then
>        # fix location
>        cd ${VHOST_ROOT}/${PF}
>        sed -e "s|${MY_HOSTROOTDIR}/${PF}|${VHOST_ROOT}/${PF}|g
>-               s|${MY_HTDOCSDIR}|${MY_INSTALLDIR}|g" -i bin/* lib/RT.pm sbin/* etc/RT_Config.pm || die
>+               s|${MY_HTDOCSDIR}|${MY_INSTALLDIR}|g" -i bin/* etc/RT_Config.pm lib/RT/Generated.pm lib/RT.pm sbin/* || die
> 
>        if [[ -e ${VHOST_ROOT}/${PF}/etc/rt_apache2.conf ]]; then
>                sed -i \
Comment 5 Eric Martin 2013-03-08 15:54:52 UTC
Created attachment 341308 [details, diff]
Last patch introduced a regression with 3.8.x.  This fixes to check for Generated.pm
Comment 6 Eric Martin 2013-10-09 20:40:05 UTC
I just went to install 4.0.8 on a demo server and this patch still hasn't made it into Gentoo.  Can I please get this QA'd and pushed?
Comment 7 Peter Volkov (RETIRED) gentoo-dev 2013-10-12 11:54:56 UTC
Thank you Eric. Pushed to the tree.

+*rt-4.0.8-r1 (12 Oct 2013)
+
+  12 Oct 2013; Peter Volkov <pva@gentoo.org> +rt-4.0.8-r1.ebuild,
+  files/reconfig, metadata.xml:
+  Generated.pm should point on webapp-config installed directory, bug #414829,
+  thank Christoph Erdle for report and Eric Martin for this fix.