Am Tue, 26 Aug 2003 16:07:21 +0000 schrieb Stas Bekman:
> As you posted in the followup, this is a problem with all Apache:: modules. 
> The problem originates within Apache, not us.

Didn't know that apache rejects to run as root. Strange (but safe) behaviour.

> Ideas how to solve this are *very* welcome.

The best idea I have is to serve the htdocs directory from outside the
~root hierarchy. Apache is initially started as root and thus has no
difficulties to get the configuration stuff needed to start up.

A quick (non MSWormOS compatible) fix would be to patch
lib/Apache/TestConfig.pm as follows:

-------CUT--------
--- TestConfig.pm       2003-06-07 01:43:28.000000000 +0200
+++ TestConfig.pm.docroot_patched       2003-08-27 12:13:26.000000000 +0200
@@ -214,7 +214,7 @@
 
     $vars->{t_dir}        ||= catfile $vars->{top_dir}, 't';
     $vars->{serverroot}   ||= $vars->{t_dir};
-    $vars->{documentroot} ||= catfile $vars->{serverroot}, 'htdocs';
+    $vars->{documentroot} ||= "/tmp/Apache-Test.$$/htdocs";
     $vars->{perlpod}      ||= $self->find_in_inc('pods') ||
                               $self->find_in_inc('pod');
     $vars->{perl}         ||= $^X;
-------CUT--------

Moving the entire t/ directory to temp is IMHO not necessary, but depending on
the test needs it may also be required to copy a cgi-bin directory to /tmp as 
well.

For a better solution of course it would also be reasonable to query the ENV 
settings that even exist on MSWorm (IIRC) and even better check that directory's 
permissions and fallback again to /tmp, if nothing else is found. But this is maybe 
something that File::Spec, which nathan mentioned, already does.

IMHO again the build dir in general should default to /tmp/cpan_$USER (or 
/var/tmp/cpan_$USER if you prefer), so it would be a good thing to change the default 
setting of CPAN's initial configuration for future CPAN releases.

In some ways CPAN packages are very similar to SRPMS and I think CPAN could learn
a lot from RPM here.

happy hacking

udo



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to