Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 150255 - Ebuild for www-apache/mod_survey comments out required alias
Summary: Ebuild for www-apache/mod_survey comments out required alias
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
Depends on: 211985
Blocks:
  Show dependency tree
 
Reported: 2006-10-06 05:03 UTC by Joel Palmius
Modified: 2008-03-01 15:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Palmius 2006-10-06 05:03:41 UTC
The reconfig script for www-apache/mod_survey contains these lines:

if [ $1 = "install" ]; then
        sed -e "s|/usr/lib/mod_survey/webroot/|${MY_INSTALLDIR}/|g
                        s|\"/mod_survey/\"|\"${VHOST_APPDIR}/\"|
                        s|Alias|#Alias|" -i ${VHOST_ROOT}/${PN}/survey.conf || die


This breaks mod_survey, since it relies on having a /mod_survey/ alias in all domains it works for. This is the location where stylesheets are located. The Alias statement is required for normal functionality.

Suggest removing the the commenting out of the Alias statement, but am not sure if it breaks something else in re vhosts and webapps.
Comment 1 Renat Lumpau (RETIRED) gentoo-dev 2006-10-06 12:42:11 UTC
Well, my thinking was that this alias is unnecesary b/c the user can control where to install mod_survey via webapp-config. Does mod_survey always expect to find itself in /mod_survey?
Comment 2 Joel Palmius 2006-10-06 14:50:40 UTC
Hrm.. In practise and in most cases you're right here. I just ran into the problem because I had used virtualmin to set up subdomains. Mod_survey registers the *.survey file type globally in apache, so surveys will be parsed for all subdomains even if they have not installed the /mod_survey directory. Layout will be borked in all domains that didn't install the files though.

Since *.survey is registered globally I just felt intuitively that the alias /mod_survey/ should be too. All surveys in all subdomais requires that this exist, or at least that _SURVEY_ROOT_ALIAS (set in survey.conf) exist. 

To my thinking either the alias should exist in all domains, or the *.survey filetype shouldn't be registered globally. 

I guess the difference is if you see mod_survey as a file type interpreter like php or as an application like squirrelmail. Right now it's something in between. :-)

Comment 3 Renat Lumpau (RETIRED) gentoo-dev 2006-10-19 19:25:13 UTC
Makes sense. I'll defer to your judgment - what do you think we should do?
Comment 4 Joel Palmius 2006-10-19 22:58:54 UTC
I can see three alternate ways.

Approach one would be limiting the web app to the vhost that has it installed. This can be achieved with putting the *.survey type declaration in survey.conf inside a <Directory> block. If no vhosts use flag, register globally. I'm not literate enough with webapp-config to know if this is easy or not, but I imagine one would want to pre-fabricate a survey.conf and ship it rather than use the one produced by the install script. 

Approach number two is to move the contents of the mod_survey web root directory out of the web hierarchy (to /usr/share perhaps?) and register the /mod_survey/ alias globally again. Ie, remove the commenting out of the alias line in survey.conf.

Approach number three is to largely ignore the problem. :-) As said, most people will never run into it. Those who do will have edited apache's config files manually already and will likely be able to solve the problem. Maybe a post-install note could be printed about it from the ebuild so that those few that run into the problem can perform the minor manual routine necessary to solve it.

Way number two is most in line with how mod_survey works, but one and three I guess are more in line with how gentoo works.

Right now I have a hangover and don't feel very judgemental. :-) I'll take a look at the consequences of the approaches in the weekend and suggest a patch or something.
Comment 5 Renat Lumpau (RETIRED) gentoo-dev 2006-10-20 07:44:59 UTC
ok, thanks. i'd rather not stick anything outside of /usr/share, as i prefer the gentoo way :)
Comment 6 Renat Lumpau (RETIRED) gentoo-dev 2007-01-02 13:29:37 UTC
any thoughts?
Comment 7 Joel Palmius 2007-01-03 04:33:37 UTC
(In reply to comment #6)

> any thoughts?
> 

Only a sense of guilt that I didn't do anything about it. :-)

It is soon time for a maintainance release of mod_survey anyway, as there are some minor things that should be updated. I've been thinking about writing a special section of the perl install script for gentoo. That way we could avoid having to sed the config file and move stuff around. Part of why I didn't do any thing about this before is because the sed:ing of the config file got so complicated when taking vhosts into account. 

I assume it is possible to pass an argument to the perl install script. That way it could manage vhosts in a sane manner if the use flag is specified, or register the app globally if -vhosts is true. 
Comment 8 Renat Lumpau (RETIRED) gentoo-dev 2007-01-03 07:39:42 UTC
it's possible, but don't forget that the perl script is run at the ebuild stage, when nothing is known about which vhost the app is going to be installed into. 
Comment 9 Renat Lumpau (RETIRED) gentoo-dev 2007-05-27 20:51:33 UTC
Hello,

Please reopen this bug when you have more info for us.