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.
Note to self - also look into LINGUAS
Created attachment 78562 [details, diff] modsurvey ebuild fix A humble attempt at making a patch for the above.
-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.
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?
And, yes, I'll test the linguas stuff as soon as posible.
/var/www/localhost/mod_survey isn't accessible (or shouldn't be). /var/www/localhost/htdocs is
/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.
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?
ah, you're right.
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.
This isn't a mod_survey issue.
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.
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
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.
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.
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. :-) )
Glad to help :)