Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 121041 - www-apache/mod_survey 3.2.3 bugs and config file enhancements
Summary: www-apache/mod_survey 3.2.3 bugs and config file enhancements
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Web Application Packages Maintainers
URL: http://www.modsurvey.org
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-31 05:11 UTC by Joel Palmius
Modified: 2006-02-01 05:29 UTC (History)
1 user (show)

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


Attachments
modsurvey ebuild fix (modsurvey.diff,426 bytes, patch)
2006-01-31 06:52 UTC, Joel Palmius
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Palmius 2006-01-31 05:11:07 UTC
The following are a few issues with the current mod_survey ebuild (3.2.3).

Seems the ebuild behavior has changed so that the webroot directory in the mod_survey tarball is installed in /var/www/localhost/mod_survey instead of /usr/lib/mod_survey/webroot. This is sane and good, but the config file still specifies the old location for the alias. We need a sed replacing all occurrances of 

  /usr/lib/mod_survey/webroot

with

  /var/www/localhost/mod_survey

in survey.conf. This is possibly dependent a bit on the vhosts flag too.
  
The auto-generated survey.conf currently ends up in /usr/lib/mod_survey, which is a bit non-intuitive. It should probably end up in /etc/survey.conf, /etc/conf.d/modsurvey or /etc/mod_survey/survey.conf (or in the apache hierarchy, see below).

Further after installing mod_survey, a post-install text is displayed saying the user should copy survey.conf to the apache modules directory. This should be possible to do automatically via either

* symlinking the survey.conf file
* copying the survey.conf file

A solution to both of these issues would be simply placing survey.conf directly as /etc/[apache|apache2]/modules.d/98_mod_survey.conf instead of as now having it in /usr/lib/mod_survey/survey.conf

If this is done, the post-install instruction doesn't need be shown at all.
Comment 1 Renat Lumpau (RETIRED) gentoo-dev 2006-01-31 05:48:12 UTC
Note to self - also look into LINGUAS
Comment 2 Joel Palmius 2006-01-31 06:52:21 UTC
Created attachment 78562 [details, diff]
modsurvey ebuild fix

A humble attempt at making a patch for the above.
Comment 3 Renat Lumpau (RETIRED) gentoo-dev 2006-01-31 09:05:59 UTC
-r1 is in CVS.

I moved the config file into /var/www/${HOSTNAME}/mod_survey instead of /usr/lib. The reason for this is that reconfig hooks are sandboxed and do not have write access outside the /var/www hierarchy. 

The webroot location is set automatically, but the cp part still needs to be done manually b/c of the sandbox.

I also added limited i18n support. I'd appreciate if you could test it as it doesn't seem to do much on my machine. It needs USE="nls". It uses the first language specified in the LINGUAS variable in /etc/make.conf and falls back on English.
Comment 4 Joel Palmius 2006-01-31 09:46:36 UTC
Is placing the config file in that place wise? This means it's accessible from the web, which means paths are disclosed, for example one path (sysbase) which is guarranteed to be writable by the apache process. Admittedly, chances are pretty good one could guess all those paths anyway, but still?
Comment 5 Joel Palmius 2006-01-31 09:49:09 UTC
And, yes, I'll test the linguas stuff as soon as posible.
Comment 6 Renat Lumpau (RETIRED) gentoo-dev 2006-01-31 10:15:15 UTC
/var/www/localhost/mod_survey isn't accessible (or shouldn't be). /var/www/localhost/htdocs is
Comment 7 Joel Palmius 2006-01-31 11:47:54 UTC
/var/www/localhost/mod_survey is currently the directory which in the tarball is called 'webroot'. This is where online examples and online docs are. The survey.conf file (with the settings as of starting this thread) aliases a location /mod_survey/, pointing to webroot. See bottom of survey.conf.

Further, this location contains all the stylesheets for the built-in themes, so it necessarily has to be publicly available at the /mod_survey/ location.

In mod_survey's opinion this could equally well be copied as a directory under htdocs instead of set up as an alias, but the alias approach is what's used in the perl installation script.
Comment 8 Joel Palmius 2006-01-31 11:54:03 UTC
How about a subdir here, so that 

  /var/www/localhost/mod_survey/webroot

is the aliased directory, and 

  /var/www/localhost/mod_survey

is a non-accessible directory containing survey.conf and other secrets?
Comment 9 Renat Lumpau (RETIRED) gentoo-dev 2006-01-31 12:09:19 UTC
ah, you're right.
Comment 10 Andy Dustman 2006-01-31 13:21:50 UTC
What versions of mod_perl and apache actually work with mod_survey? From what I am able to determine, the current apache builds disable large file support (LFS), yet mod_perl is built with LFS (since libperl has it), and the two are incompatible. See bug #88512 for additional details.
Comment 11 Renat Lumpau (RETIRED) gentoo-dev 2006-01-31 13:26:01 UTC
This isn't a mod_survey issue.
Comment 12 Andy Dustman 2006-01-31 13:30:20 UTC
Well, if mod_survey needs mod_perl and apache, and those two things don't work together, it becomes an issue. I just want to know what versions do work, because otherwise mod_survey is a non-starter.
Comment 13 Renat Lumpau (RETIRED) gentoo-dev 2006-01-31 13:45:28 UTC
All I'm saying is that this bug won't be read by the apache or mod_perl folks, so you're better off discussing it in the bug you mentioned.

net-www/apache-2.0.55:  USE="apache2 ldap ssl -debug -doc -mpm-leader -mpm-peruser -mpm-prefork -mpm-threadpool -mpm-worker -no-suexec -static-modules -threads"

www-apache/mod_perl-2.0.1-r2
Comment 14 Renat Lumpau (RETIRED) gentoo-dev 2006-01-31 14:07:08 UTC
Ok, since the Alias is optional, let's not reinvent the wheel. Files in webroot/ now go into /var/www/localhost/mod_survey, Apache conf is still in /var/www/localhost/mod_survey which is no longer visible.
Comment 15 Joel Palmius 2006-01-31 22:44:58 UTC
Reply to andy dustman, comment 10. To my knowledge, mod_survey works with all available versions of mod_perl and apache. Much work has been put into ensuring this compatibility. 
Comment 16 Joel Palmius 2006-02-01 03:34:12 UTC
Thumbs up on nls/linguas stuff. Ebuild now works as desired for me.

(Although when trying it out I discovered yet another bug in mod_survey itself, but that's just life I guess. :-) )
Comment 17 Renat Lumpau (RETIRED) gentoo-dev 2006-02-01 05:29:56 UTC
Glad to help :)