Return-Path: Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 74944 invoked by uid 500); 10 Aug 2001 11:58:34 -0000 Mailing-List: contact test-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-dev@httpd.apache.org Received: (qmail 74933 invoked from network); 10 Aug 2001 11:58:33 -0000 X-Authentication-Warning: slippy.rat: gbenson owned process doing -bs Date: Fri, 10 Aug 2001 12:58:30 +0100 (BST) From: Gary Benson Sender: To: Subject: Ensure paths for EAPI exist Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi all, Another patch... If you have mod_ssl's EAPI compiled in, then Apache trys to write files to a location defined in EAPI_MM_CORE_PATH. If this path does not exist then httpd can't start and TestServer::start fails. You can't override this path with configuration directives; you just have to live with whatever it's set to. This patch ensures that the path exists. Hope it's ok, Gary [ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ] Index: Apache-Test/lib/Apache/TestConfig.pm =================================================================== RCS file: /home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v retrieving revision 1.14 diff -u -r1.14 TestConfig.pm --- Apache-Test/lib/Apache/TestConfig.pm 2001/08/07 16:18:32 1.14 +++ Apache-Test/lib/Apache/TestConfig.pm 2001/08/10 11:52:40 @@ -5,7 +5,8 @@ use constant WIN32 => $^O eq 'MSWin32'; -use File::Spec::Functions qw(catfile abs2rel splitdir); +use File::Spec::Functions qw(catfile abs2rel splitdir + catdir file_name_is_absolute); use Cwd qw(fastcwd); use Apache::TestConfigPerl (); @@ -155,6 +156,7 @@ $self->configure_apxs; $self->configure_httpd; $self->inherit_config; #see TestConfigParse.pm + $self->configure_httpd_eapi; #must come after inherit_config $self->{hostport} = $self->hostport; @@ -201,6 +203,25 @@ my $sem = catfile $vars->{t_logs}, 'apache_runtime_status.sem'; unless (-e $sem) { $self->{clean}->{files}->{$sem} = 1; + } +} + +sub configure_httpd_eapi { + my $self = shift; + my $vars = $self->{vars}; + + #deal with EAPI_MM_CORE_PATH if defined. + if (defined($self->{httpd_defines}->{EAPI_MM_CORE_PATH})) { + my $path = $self->{httpd_defines}->{EAPI_MM_CORE_PATH}; + + #ensure the directory exists + my @chunks = splitdir $path; + pop @chunks; #the file component of the path + $path = catdir @chunks; + unless (file_name_is_absolute $path) { + $path = catdir $vars->{serverroot}, $path; + } + $self->gendir($path); } }