httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [PATCH] Allow loading builtin dso modules
Date Mon, 20 Dec 2004 04:34:03 GMT
Chia-Liang Kao wrote:
> It seems I can never reach the list from my mail server.

May be apache.org blocks it?

Chia-Liang Kao, Please post messages inlined so it's easier to comment on 
those. Inlining this one for you:

Auto-merging (0, 1125) /Apache-Test to /remote/Apache-Test (base 
/remote/Apache-Test:1123).
Patching locally against mirror source 
http://svn.apache.org/repos/asf/httpd/test/trunk/perl-framework/Apache-Test.
U   lib/Apache/TestConfig.pm
==== Patch <-> level 1
Source: 1bc2e5b2-7eeb-0310-aef5-f4fb8ed75f6b:/Apache-Test:1125
Target: 
13f79535-47bb-0310-9956-ffa450edef68:/httpd/test/trunk/perl-framework/Apache-Test:122719
 
(http://svn.apache.org/repos/asf/httpd/test/trunk/perl-framework/Apache-Test)
Log:
  r1124@ab:  clkao | 2004-12-20 10:24:22 +0800
  local branch
  r1125@ab:  clkao | 2004-12-20 10:28:30 +0800
  Allow core modules to be loaded explicitly with find_and_load_module.
  This allows the apache from FreeBSD ports (with most modules built as
  shared) to run tests with Apache::Test, and also allows testing svk
  with a dav server.

  * Apache/TestConfig.pm:
    (find_and_load_module): New.
    (generate_types_config): Use find_and_load_module to load mod_alias.
    (httpd_config): Load mod_cgi and mod_access as they are part of the
      core tests.


=== lib/Apache/TestConfig.pm
==================================================================
--- lib/Apache/TestConfig.pm  (revision 122719)
+++ lib/Apache/TestConfig.pm  (patch - level 1)
@@ -404,6 +404,9 @@

      $self->{server}->post_config;

+    $self->find_and_load_module ('mod_cgi.so');
+    $self->find_and_load_module ('mod_access.so');
+
      $self;
  }

@@ -1204,6 +1207,18 @@
      };
  }

+sub find_and_load_module {
+    my ($self, $name) = @_;
+    my $mod_path = $self->find_apache_module($name) or return;
+    my ($sym) = $name =~ m/mod_(\w+)\./;
+
+    if ($mod_path && -e $mod_path) {
+        $self->preamble(IfModule => "!$name",
+                        qq{LoadModule ${sym}_module "$mod_path"\n});
+    }
+    return 1;
+}
+
  sub replace_vhost_modules {
      my $self = shift;

@@ -1257,11 +1272,7 @@

      # handle the case when mod_mime is built as a shared object
      # but wasn't included in the system-wide httpd.conf
-    my $mod_mime = $self->find_apache_module('mod_mime.so');
-    if ($mod_mime && -e $mod_mime) {
-        $self->preamble(IfModule => '!mod_mime.c',
-                        qq{LoadModule mime_module "$mod_mime"\n});
-    }
+    $self->find_and_load_module ('mod_mime.so');

      unless ($self->{inherit_config}->{TypesConfig}) {
          my $types = catfile $self->{vars}->{t_conf}, 'mime.types';
@@ -1513,6 +1524,8 @@

      my $out = $self->genfile($conf_file);

+    $self->find_and_load_module('mod_alias.so');
+
      $self->preamble_run($out);

      for my $name (qw(user group)) { #win32/cygwin do not support
@@ -1534,14 +1547,6 @@

      # handle the case when mod_alias is built as a shared object
      # but wasn't included in the system-wide httpd.conf
-    my $mod_alias = $self->find_apache_module('mod_alias.so');
-    if ($mod_alias && -e $mod_alias) {
-        print $out <<EOF;
-<IfModule !mod_alias.c>
-    LoadModule alias_module "$mod_alias"
-</IfModule>
-EOF
-    }

      print $out "<IfModule mod_alias.c>\n";
      for (keys %aliases) {

==== BEGIN SVK PATCH BLOCK ====
Version: svk 0.26 (freebsd)

eJyNlM9v3EQUxxdEQrJAFQIU8VND40hJi7P22F7vumi1LbSVKKoQ2fQEWo3t512zXtuyZ5OuMEj2
pgiJctucuCAu9MQFBJcKDnDpqb3xR0SIKwcOPM8maZACRdqVxjPvfb7vvXnzLied8201a7WUTFKV
bPP6Vct6l3Gnv6rqmVTPwPV5lEhGFsA2BJKWBVFP0rOQDQFP02iUOOWCs6QHvFz4zgB4q6UirjHD
XRKIQ6yg2oxHYSo1Bb7LEwBJzfS2kbW18teV1GaWAp4IbDeBbT/1oxCFVZUaaIHmKrpHMYTdJIpK
ZZVSU222aemtZE4QpdAt8biDYHSgEqYkPFw/AQdjGpf5+LaAHQGEvHEAeGC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 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Mime
View raw message