lördag 22 januari 2005 02.15 skrev Stas Bekman: > Oden Eriksson wrote: > > Sorry for dropping out of site, hardware problems here, my notebook is > dead again :( too much modperl smoking is not good for a notebook's > health. I wish somebody was sending me a new one :) > > >>>The server fails to start, but that's something else. I noticed though > >>>that if the /etc/httpd/conf/httpd.conf exists A-T is trying to inherit > >>>that config (inherit_config) but this fails as this file is for > >>>apache-1.x. Shouldn't something from "httpd2 -V" be used instead? > >> > >>Take a look at: lib/Apache/TestConfigParse.pm:sub inherit_config { > >>it should find the correct global config file, please check that code to > >>see if something goes wrong. > > > > I looked at it but it's hard to understand. I couldn't find where it > > actually looks for the httpd.conf file. > > it's right here: > > 1) my $file = $self->{vars}->{httpd_conf}; > > 2) unless ($file and -e $file) { > if (my $base = $self->{httpd_basedir}) { > my $default_conf = > $self->{httpd_defines}->{SERVER_CONFIG_FILE}; $default_conf ||= catfile > qw(conf httpd.conf); > $file = catfile $base, $default_conf; > # SERVER_CONFIG_FILE might be an absolute path > $file = $default_conf if !-e $file and -e $default_conf; > } > } > > (1) is set if you've passed an explicit -httpd_conf option to t/TEST (or > perl Makefile.PL). otherwise (2) is invoked, so you can see that it gets > the base dir of the server and looks for conf/httpd.conf under it. So in > your case it's probably that httpd_basedir gets a wrong value. The latter > gets set in TestConfig.pm: > > if ($vars->{httpd}) { > my @chunks = splitdir $vars->{httpd}; > #handle both $prefix/bin/httpd and $prefix/Apache.exe > for (1,2) { > pop @chunks; > last unless @chunks; > $self->{httpd_basedir} = catfile @chunks; > last if -d "$self->{httpd_basedir}/bin"; > } > } > > so it tries to find the root of the Apache install. > > As this of any help?
Yes! This worked very good! Very cool! > >>>Also the mod_perl module as all other code is built as non root, so > >>>certain files and directories can't be access. The snipppet above solves > >>>some of that. > >> > >>A-T handles that internally. See > >> > >> lib/Apache/TestRun.pm:sub adjust_t_perms { > >> > >>if you intervene with normal process, then you are on your own. > >> > >>I still can't understand what's wrong with the autogenerated httpd.conf, > >>that you need to write your own. Please explain. > > > > Ok. As it cannot find the correct httpd.conf file I have to do it like > > this. But I suspect even if it would, it wouldn't work anyway as we use > > two main config files and includes specific module config files using the > > scandir feature (Include conf.d/*.conf). > > And A-T should be able to do that just fine. > > > SUSE does it like that too, as well as > > RedHat, PLD, ALTLinux, and perhaps many more. As a non root user I do not > > have permissions to write a PidFile or LockFile unless it's in a > > directory I have permissions to. > > I don't understand that. Both PidFile or LockFile are rewritten by A-T to > point to t/logs/ check TestConfig.pm's __DATA__ section. There should be > no perms problems. Works ok now. > > I would be happy if I could disable this inherit_config thing so it does > > not search for any configuration files at all. > > it's easy: just pass your specific -httpd_conf option and point it to the > file that you create by yourself. That did the trick, thanks Stas! Now I have these failed tests with mod_perl-2.0.0-RC4: Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/apache/content_length_header.t 255 65280 27 54 200.00% 1-27 t/api/aplog.t 36 13 36.11% 24-36 t/apr-ext/finfo.t 29 7424 ?? ?? % ?? t/apr-ext/util.t 29 7424 ?? ?? % ?? t/apr/finfo.t 255 65280 ?? ?? % ?? t/apr/util.t 255 65280 ?? ?? % ?? 3 tests skipped. Failed 6/222 test scripts, 97.30% okay. 40/2257 subtests failed, 98.23% okay. It seems some of them are because of some other matching bug in A-T. Attached is the error_log file. -- Regards // Oden Eriksson