[ANNOUNCE] Apache-Test 1.25

2005-06-17 Thread Philippe M. Chiasson
The uploaded file

Apache-Test-1.25.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GO/GOZER/Apache-Test-1.25.tar.gz
  size: 145772 bytes
   md5: 315998641c7ba5d3a315da96c10e64d1

Changes since 1.24:

provide $Apache::TestUtil::DEBUG_OUTPUT as target for t_debug()
statements, defaulting to STDOUT.  this allows for changing
t_debug() to STDERR when using functions like t_write_file()
from within handler() server-side tests.  [Geoffrey Young]

adjust need_module()/have_module() to not try to require a module if
it was explicitly passed with a .c extension. in certain cases this
prevents a fatal error (e.g. trying to call
Apache::Test::have_module('mod_alias.c') from the Perl
sections. [Stas]


Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


[ANNOUNCE] Apache-Test 1.19

2005-01-06 Thread Philippe M. Chiasson
The uploaded file
   Apache-Test-1.19.tar.gz
has entered CPAN as
  file: $CPAN/authors/id/G/GO/GOZER/Apache-Test-1.19.tar.gz
  size: 142015 bytes
   md5: 795c1fcefd0f21b126f573fc46427139
Changes since 1.18:
Test for module.c instead of module.so for IfModule in
find_and_load_module [Chia-Liang Kao chialiang gmail.com]
Apache-Test/META.yml is excluded from mp2 distro to make PAUSE indexer
happy, but then perl Makefile.PL complains about a missing META.yml,
so autogenerate it if it wasn't in the distro [Stas]

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: OpenPGP digital signature


[ANNOUNCE] Apache-Test 1.18

2004-12-23 Thread Philippe M. Chiasson
The uploaded file
  Apache-Test-1.18.tar.gz
has entered CPAN as
   file: $CPAN/authors/id/G/GO/GOZER/Apache-Test-1.18.tar.gz
   size: 141721 bytes
md5: 22e566a51d2e2b5c6647ecd6f36a1b65
Changes since 1.17:
fix a bug in A-T config generation, when a vhost entry was in
autogenerated httpd.conf (e.g. coming from .pm file) and another from
extra.conf.in. We used to have a ports collision, since extra.conf
wasn't reparsed and the same port was getting assigned to more than
one vhost entry, preventing server startup:
   default_ VirtualHost overlap on port 8530, the first has precedence
   (98)Address already in use: make_sock: could not bind to address
   0.0.0.0:8530 no listening sockets available, shutting down
could be reproduced with t/TEST -conf followed by t/TEST -maxclients 1
in the mp2 test suite (or the new Apache-TestMe test suite, which now
includes a special setup for this bug). [Stas]
new TestConfig wrapper find_and_load_module [Chia-Liang Kao chialiang
gmail.com]
add Apache-TestItSelf and Apache-TestMe sub-projects. [Stas]
add various straps to aid the new Apache-TestItSelf sub-project, which
is used to test A-T config options [Stas]
avoid entering endless loops when interactive config is used, by
restarting the test suite with an explicit selected arguments for
-httpd (and optionally -apxs) [Stas]
META.yml is now locally maintained. we need to tell PAUSE indexer not
to try to index HTTP::Request::Common and warnings packages, which
happen to be used by A-T [Stas]
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



signature.asc
Description: OpenPGP digital signature


SVN release methodology : svn copy

2004-12-11 Thread Philippe M. Chiasson
[EMAIL PROTECTED] wrote:
Author: stas
Date: Sat Dec 11 11:15:27 2004
New Revision: 111615
URL: http://svn.apache.org/viewcvs?view=revrev=111615
Log:
tag 1.17
Added:
   httpd/test/tags/APACHE_TEST_1_17/
  - copied from r111612, httpd/test/trunk/perl-framework/Apache-Test/
   httpd/test/tags/APACHE_TEST_1_17/Changes
  - copied unchanged from r111614, 
httpd/test/trunk/perl-framework/Apache-Test/Changes
   httpd/test/tags/APACHE_TEST_1_17/Makefile.PL
  - copied unchanged from r111613, 
httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL
   httpd/test/tags/APACHE_TEST_1_17/RELEASE
  - copied unchanged from r111613, 
httpd/test/trunk/perl-framework/Apache-Test/RELEASE
Anybody care to shed some light to what exactly this means?
Our normal release process is something like this:
$ make dist
[... test ...]
$ vi lib/Apache/Test.pm [bump version]
$ svn ci -m'Bump version' lib/Apache/Test.pm
$ svn copy . https://svn.apache.org/[...]/tags/1.17
And I thought this was the appropriate way to go about it. From what I can 
gather by reading this message,
the copy operation wasn't 100% clean, am I right ?
At this point, I am just a bit worried that there is something going on that I 
am
not fully aware, so if anybody can shed some light, it would be much 
appreciated.

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: OpenPGP digital signature


Re: [NOTICE] Subversion conversion

2004-11-15 Thread Philippe M. Chiasson
Stas Bekman wrote:
Geoffrey Young wrote:
[...]
so, rock on svn.
yes, yes, I'm +1. Thanks for taking care of it.
Don't forget about preserving the frozen cvs though. I have lots of 
modified files all over.
Yah, the CVS repository will remain for a long time read-only. (don't 
exactly know what *long* means)

Also we will need to modify some of the sw to work with svn instead of 
cvs (Makefile(s) and RELEASE notes)
Yes, I am here too, so I volountereed to take care of all the work 
required to move us over painlessley. It will include:

Fix external svn linkage for Apache-Test/ and docs/
Makefile  Release notes.
Developer documentation
perl.apache.org cronned building.
Also worth noting, we should be pigning Gerald to plan moving embperl 
over to the perl svn repos as well.

Oh, and one last thing, the infrastructure people suggested we move the 
content of the perl-core repos to
commiters/pmc/perl ? Any objections to that as well?


signature.asc
Description: OpenPGP digital signature


Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestMM.pm

2004-11-03 Thread Philippe M. Chiasson
Seems it's not Win32 friendly, see this complaint:
http://marc.theaimsgroup.com/?t=10994804082r=1w=2
[EMAIL PROTECTED] wrote:
geoff   2004/10/25 18:42:14
  Modified:perl-framework/Apache-Test/lib/Apache TestMM.pm
  Log:
  make sure TEST_VERBOSE respects the environment, not just the current
  shell command.
  
  somebody shout if ?= isn't portable, but a few accounts indicate that it is
  
  Revision  ChangesPath
  1.42  +1 -1  httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm
  

--

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: OpenPGP digital signature


Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestMB.pm

2004-10-05 Thread Philippe M. Chiasson

[EMAIL PROTECTED] wrote:
theory  2004/10/05 12:45:08
  Modified:perl-framework/Apache-Test/lib/Apache TestMB.pm
  Log:
  Added testcover action.
  
  Revision  ChangesPath
  1.8   +28 -1 httpd-test/perl-framework/Apache-Test/lib/Apache/TestMB.pm
  
  Index: TestMB.pm
  ===
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestMB.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestMB.pm	5 Sep 2004 00:11:30 -	1.7
  +++ TestMB.pm	5 Oct 2004 19:45:08 -	1.8
  @@ -60,6 +60,27 @@
'-bugreport', '-verbose=' . ($self-verbose || 0));
   }
   
  +sub ACTION_testcover {
  +my $self = shift;
  +
  +unless ($self-find_module_by_name('Devel::Cover', [EMAIL PROTECTED])) {
  +warn(Cannot run testcover action unless Devel::Cover 
  + . is installed.\n);
  +return;
  +}
  +
  +$self-add_to_cleanup('coverage', 'cover_db');
  +
  +my $atdir = $self-localize_file_path($ENV{HOME}/.apache-test);
  +local $Test::Harness::switches=
  +local $Test::Harness::Switches=
  +local $ENV{HARNESS_PERL_SWITCHES} = -MDevel::Cover=+inc,'$atdir';
  +local $ENV{APACHE_TEST_EXTRA_ARGS} = -one-process;
  +
  +$self-depends_on('test');
  +$self-do_system('cover');
  +}
  +
   sub _bliblib {
   my $self = shift;
   return (
  @@ -69,7 +90,7 @@
   }
   
   sub ACTION_test {
  -my $self = shift;
  +my $self = shift
Feels like a typo to me ^^^
   $self-depends_on('code');
   $self-depends_on('run_tests');
   $self-depends_on('test_clean');
  @@ -233,6 +254,12 @@
   This action actually the tests by executing the test script,
   Ft/TEST. It is executed by the Ctest action, so most of the time
   it won't be executed directly.
  +
  +=item testcover
  +
  +CApache::TestMB overrides this action from CModule::Build in order to
  +prevent the CApache::Test preference files from being included in the test
  +coverage.
   
   =back
   
  
  
  

--

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


[Patch] Caching apxs queries

2004-09-16 Thread Philippe M. Chiasson
I had been investigating into ways to make test runs run faster, and I found 
that
one of the biggest bottlenecks on my test machine was useless repetitive calls
to apxs. The following patch caches apxs queries.
For instance, timings for mod_perl test run:
+ Before:
Files=218, Tests=2512, 1032 wallclock secs (594.94 cusr + 431.33 csys = 1026.27 
CPU)
+ After:
Files=218, Tests=2512, 246 wallclock secs (196.69 cusr + 33.55 csys = 230.24 
CPU)
--

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
Index: perl-framework/Apache-Test/lib/Apache/TestConfig.pm
===
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
retrieving revision 1.244
diff -u -I$Id -r1.244 TestConfig.pm
--- perl-framework/Apache-Test/lib/Apache/TestConfig.pm	5 Sep 2004 16:30:30 -	1.244
+++ perl-framework/Apache-Test/lib/Apache/TestConfig.pm	16 Sep 2004 17:46:54 -
@@ -1620,20 +1620,27 @@
 sub apxs {
 my($self, $q, $ok_fail) = @_;
 return unless $self-{APXS};
-local @ENV{ qw(PATH IFS CDPATH ENV BASH_ENV) };
-my $devnull = devnull();
-my $apxs = shell_ready($self-{APXS});
-my $val = qx($apxs -q $q 2$devnull);
-chomp $val if defined $val; # apxs post-2.0.40 adds a new line
-unless ($val) {
-if ($ok_fail) {
-return ;
+my $val;
+unless (exists $self-{_apxs}{$q}) {
+local @ENV{ qw(PATH IFS CDPATH ENV BASH_ENV) };
+my $devnull = devnull();
+my $apxs = shell_ready($self-{APXS});
+$val = qx($apxs -q $q 2$devnull);
+chomp $val if defined $val; # apxs post-2.0.40 adds a new line
+if ($val) {
+$self-{_apxs}{$q} = $val;
 }
-else {
-warn APXS ($self-{APXS}) query for $q failed\n;
+unless ($val) {
+if ($ok_fail) {
+return ;
+}
+else {
+warn APXS ($self-{APXS}) query for $q failed\n;
+return $val;
+}
 }
 }
-$val;
+$self-{_apxs}{$q};
 }
 
 sub pop_dir {


Re: [RELEASE CANDIDATE] Apache-Test-1.13

2004-08-03 Thread Philippe M. Chiasson

Geoffrey Young wrote:
a release candidate for Apache-Test 1.13 is now available.
  http://perl.apache.org/~geoff/Apache-Test-1.13-dev.tar.gz
please take the time to excercise the candidate through all your existing
applications that use Apache-Test and report back successes or failures.
All tests OK on :
OpenBSD 3.5 (httpd-1 and httpd-2)
Fedora Core 2
--Geoff
Changes since 1.12:
the have() function was removed entirely - use need() instead.
[Geoffrey Young]
add need() and need_* variant functions (need_module(), need_apache(),
etc) for use specifically with plan() to decide whether or not a test
should run.  have_* variants (have_module(), have_apache(), etc) are
now specifically for use outside of plan(), although they can continue
to be used within plan() without fear of current tests breaking.
[Geoffrey Young]
add need_php() and have_php() which will return true when either
mod_php4 or mod_php5 are available, providing functionality similar to
need_cgi() and have_cgi().
[Geoffrey Young]
Add APACHE_TEST_EXTRA_ARGS make variable to all invocations to t/TEST
to allow passing extra arguments from the command line. [Gozer]
When APACHE_TEST_NO_STICKY_PREFERENCES=1 is used don't even try to
interactively configure the server, as we don't save any config it was
entering an infinite loop. [Stas]
If a directory t/lib exists from where the tests are run, adjust
@INC so that this directory is added when running the tests,
both within t/TEST and within t/conf/modperl_inc.pl.
This allows inclusion of modules specific to the tests that
aren't intended to be installed. [Stas, Randy]
make a special case for threaded mpm configuration, to ensure that
unless maxclients was specified, MaxClients will be exactly twice
bigger than ThreadsPerChild (minclients), since if we don't do that,
Apache will reduce MaxClients to the same value as
ThreadsPerChild. [Stas]
Renamed generate_test_script() to generate_script() in Apache::TestMB
to match the naming convention used in Apache::TestMM and elsewhere.
[David]
Apache::TestMB now only prints the Generating test running script
message if verbosity is enabled (e.g., by passing --verbose when
executing Build.PL). [David]
Fixed the requests_redirectable parameter to
Apache::TestRequest::user_agent() so that it works as docmented when
passed a negative value. [Boris Zentner]
Documented support for passing an array reference to the
requests_redirectable parameter to Apache::TestRequest::user_agent()
to be passed to LWP::UserAgent if LWP ist installed. [David]
--

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: OpenPGP digital signature


Re: [Patch] add TEST_EXTRA_ARGS to allow passing arguments to t/TEST thru make invocation

2004-07-28 Thread Philippe M. Chiasson
Geoffrey Young wrote:
ping
:)
 

Must have fell off my radar. How is the following patch ?
--Geoff
Stas Bekman wrote:
 

Geoffrey Young wrote:
   

I'm not sure about the name choice. $(TEST_VERBOSE) and $(TEST_FILES)
are the same as other Test packages use. Do they have $TEST_EXTRA_ARGS
too? Otherwise we may better use some name specific to Apache-Test?
   

MakeMaker looks to support only three: TEST_VERBOSE, TEST_FILE(S), and
TESTDB_SW.
so how about APACHE_TEST_EXTRA_ARGS?  it's verbose but it shouldn't be
too
bad and it beats making tons of extra targets.
 

+1
   

 


Index: Apache-Test/lib/Apache/TestMM.pm
===
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm,v
retrieving revision 1.34
diff -u -I$Id -r1.34 TestMM.pm
--- Apache-Test/lib/Apache/TestMM.pm16 Apr 2004 19:47:42 -  1.34
+++ Apache-Test/lib/Apache/TestMM.pm28 Jun 2004 20:11:47 -
@@ -63,12 +63,12 @@
 
 test_clean :
$(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
-   t/TEST -clean
+   t/TEST $(APACHE_TEST_EXTRA_ARGS) -clean
 
 run_tests : test_clean
$(PASSENV) \
$(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
-   t/TEST -bugreport -verbose=$(TEST_VERBOSE) $(TEST_FILES)
+   t/TEST $(APACHE_TEST_EXTRA_ARGS) -bugreport -verbose=$(TEST_VERBOSE) 
$(TEST_FILES)
 
 test :: pure_all run_tests test_clean
 


signature.asc
Description: OpenPGP digital signature


[Patch] add TEST_EXTRA_ARGS to allow passing arguments to t/TEST thru make invocation

2004-06-28 Thread Philippe M. Chiasson
I am working on an Apache::Test based test framework, and being able to pass 
extra conditionnal
arguments to t/TEST thru make test would be very much usefull. Since right now, 
you can only
turn verbose on or off.
$ make test TEST_EXTRA_ARGS=-port 8899 -debug=gdb
For instance. Otherwise, I end up creating other make targets that look like
some_special_test:
$(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
t/TEST -port 8899 -bugreport -verbose=$(TEST_VERBOSE) $(TEST_FILES)
Forcing me to duplicate too much code for my taste.
Thoughts?
Index: Apache-Test/lib/Apache/TestMM.pm
===
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm,v
retrieving revision 1.34
diff -u -I$Id -r1.34 TestMM.pm
--- Apache-Test/lib/Apache/TestMM.pm16 Apr 2004 19:47:42 -  1.34
+++ Apache-Test/lib/Apache/TestMM.pm28 Jun 2004 20:11:47 -
@@ -63,12 +63,12 @@
 test_clean :
$(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
-   t/TEST -clean
+   t/TEST $(TEST_EXTRA_ARGS) -clean
 run_tests : test_clean
$(PASSENV) \
$(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
-   t/TEST -bugreport -verbose=$(TEST_VERBOSE) $(TEST_FILES)
+   t/TEST $(TEST_EXTRA_ARGS) -bugreport -verbose=$(TEST_VERBOSE) 
$(TEST_FILES)
 test :: pure_all run_tests test_clean
--

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: OpenPGP digital signature


Re: [Patch] Better IPv6 detection and configuration

2004-03-31 Thread Philippe M. Chiasson
On Tue, 2004-03-30 at 19:40 -0800, Stas Bekman wrote:
 Philippe M. Chiasson wrote:
  On Tue, 2004-03-30 at 15:25 -0500, Geoffrey Young wrote:
  
 Something like this will most likely work for everyone (ipv4/v6) with
 the only difference is that the test servers are not listening to
 localhost anymore and could be reached from oustide machines (do we
 care?)
 
 What happens in the following situation:
 
 One machine, two NICs, two IPs 10.0.0.1 and 10.0.0.2.
 
 If I say 'Listen *:8529' it'll try to listen on both IPs.
 
 What happens if 10.0.0.2:8529 is already taken and 10.0.0.1:8529 is 
 available? 
 Will it fail to start, saying that the port is busy?

That's what it'll do, yes. The test framework will detect this early and
report that :

port 8529 is in use, cannot determine server pid to shutdown

 I actually find that a nice feature, as it means you can use t/TEST -start
 to start up your test config then, say, hit it from a browser on a different
 box.  as it is now, you have to hand-edit the generated httpd.conf for that
 (or at least I did)
  
  
  Well, I agree with you, but other people might argue that it is somewhat
  of a security risk to start up a server and _not_ listen strictly on
  localhost.
  
  But, yes, I do think that Joe's suggestion is the best one and will keep
  tests passing until LWP becomes IPv6 aware.
 
 Untill we have a better solution (proper detection mechanism), by all means 
 go 
 with it, Philippe.

You mean the one with  Listen 0.0.0.0:port ?

 Thanks for the idea, Joe!
 
 __
 Stas BekmanJAm_pH -- Just Another mod_perl Hacker
 http://stason.org/ mod_perl Guide --- http://perl.apache.org
 mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
 http://modperlbook.org http://apache.org   http://ticketmaster.com


signature.asc
Description: This is a digitally signed message part


Re: [Patch] Better IPv6 detection and configuration

2004-03-30 Thread Philippe M. Chiasson
On Mon, 2004-03-29 at 16:21 -0800, Stas Bekman wrote:
 Philippe M. Chiasson wrote:
  On Mon, 2004-03-29 at 15:43 -0800, Stas Bekman wrote:
  
 Philippe M. Chiasson wrote:
 
 After a bit of poking around different flavors of IPv6 systems, I've
 encountered a few situations where Apache::Test ends up configuring
 httpd in a way that can't be tested.
 
 This typically only happens on a system that has IPv4-mapped IPv6
 addresses disabled, i.e. OpenBSD. If the hostname that is picked
 to form the Listen directives happens to have both an IPv4 and an
 IPv6 address, i.e localhot on OpenBSD, the server will start but will
 only be listening on an IPv6 address.
 
 And since LWP doesn't do requests over IPv6, all tests will fail.
 
 The following patch attempts to do handle all this by doing one of a few
 many things.
 
 gozer++
 
 
 If the server has ipv4-mapped addresses, Listen to *:port, forcing the
 use of ipv4-mapped addresses and insuring that the server will be
 available over it's ipv4 address.
 
 Otherwise try to use Socket6 to see if the hostname is both v4 and v6
 and Listen to *:port as well. Without Socket6 (not part of the Perl
 core), just warn the user about possible problems he/she will run into
 if the selected hostname happens to be ipv6.
 
 [...]
 
 +else {
 +if (eval { require Socket6 }) {
 +if (Socket6::gethostbyname2($name, Socket6::AF_INET6())) {
 +$self-{vars}{listen_addr} = '*';
 +}
 +}
 +else {
 +warning Socket6 not installed;
 +warning Test might fail if your hostname: '$name' has an 
 IPv6 address;
 
 I think we should die here:
 
error  EOI;
 Your system is configured to run both ipv6 and ipv4, but the right 
 interface 
 can't be selected.
 Please install the perl CPAN module Socket6 and re-run the last command.
 EOI
die \n;
  
  
  That's something I considered, but I figured it was better to be gentle
  and just warn people that things might not work. I am perfectly fine
  with die instead.
  
  
 and if Socket6 builds everywhere, and including older perls, we should 
 include 
 it in Apache-Test's %PREREQ_PM.
  
  
  Well, I built it successfully with a combination of 5.8.x and 5.6.x on
  linux, freebsd and openbsd. I am not sure if it builds on systems
  without ipv4 support though.
 
 OK, so let's keep it warning/out of prereq for now while we polish it.

Sure!

 but please replace s/warning/error/ so it'll more prominent. thanks.

Patch following:

Index: Apache-Test/lib/Apache/TestConfig.pm
===
RCS file: 
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
retrieving revision 1.213
diff -u -I$Id -r1.213 TestConfig.pm
--- Apache-Test/lib/Apache/TestConfig.pm4 Mar 2004 05:51:31 -   
1.213
+++ Apache-Test/lib/Apache/TestConfig.pm30 Mar 2004 00:48:58 -
@@ -63,6 +63,7 @@
documentroot= 'DocumentRoot (default is $ServerRoot/htdocs',
port= 'Port [port_number|select] (default ' . DEFAULT_PORT . 
')',
servername  = 'ServerName (default is localhost)',
+   listen_addr = 'The address to use in Listen directives',
user= 'User to run test server as (default is $USER)',
group   = 'Group to run test server as (default is $GROUP)',
bindir  = 'Apache bin/ dir (default is apxs -q BINDIR)',
@@ -272,7 +273,7 @@
 $vars-{servername}   ||= $self-default_servername;
 $vars-{port}   = $self-select_first_port;
 $vars-{remote_addr}  ||= $self-our_remote_addr;
-
+$vars-{listen_addr}  ||= $self-default_localhost;
 $vars-{user} ||= $self-default_user;
 $vars-{group}||= $self-default_group;
 $vars-{serveradmin}  ||= $self-default_serveradmin;
@@ -286,6 +287,8 @@
 $self-inherit_config; #see TestConfigParse.pm
 $self-configure_httpd_eapi; #must come after inherit_config
 
+$self-check_ipv6;
+
 $self-default_module(cgi= [qw(mod_cgi mod_cgid)]);
 $self-default_module(thread = [qw(worker threaded)]);
 $self-default_module(ssl= [qw(mod_ssl)]);
@@ -637,6 +640,45 @@
 $remote_addr ||= Socket::inet_ntoa($iaddr);
 }
 
+my  $apr_ipv6;
+sub apr_has_ipv6 {
+my $self = shift;
+return $apr_ipv6 if defined $apr_ipv6;
+foreach my $key (keys %{$self-{httpd_defines}}) {
+return $apr_ipv6 = $key if $key =~ /^APR_HAVE_IPV6/;
+}
+}
+
+sub apr_has_ipv4_mapped {
+my $self = shift;
+return $self-apr_has_ipv6 =~ /IPv4-mapped addresses enabled/;
+}
+
+sub check_ipv6 {
+my $self = shift;
+
+return if $self-{vars}{listen_addr} ne $self-default_localhost;
+
+my $name = $self-{vars}{servername};
+
+if ($self-apr_has_ipv6) {
+if ($self-apr_has_ipv4_mapped) {
+$self-{vars}{listen_addr} = '*';
+}
+else {
+if (eval { require Socket6

[Patch] Better IPv6 detection and configuration

2004-03-29 Thread Philippe M. Chiasson
}) {
 push @out_config = [NameVirtualHost = *:$port];
@@ -1785,7 +1827,7 @@
 
 
 __DATA__
-Listen @ServerName@:@Port@
+Listen @Listen_Addr@:@Port@
 
 ServerRoot   @ServerRoot@
 DocumentRoot @DocumentRoot@
-- 
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: This is a digitally signed message part


Re: [ANNOUNCE] Apache::Test 1.08 RC1

2004-02-24 Thread Philippe M. Chiasson
On Mon, 2004-02-23 at 16:53 -0800, Stas Bekman wrote:
 We would like to release Apache::Test 1.08. It includes multiple changes and 
 improvements, therefore we need your help to test it and report any problems 
 you may have noticed.

All tests successful : 
 + Linux-2.6
 + Linux-2.4
 + OpenBSD 3.4 (IPv4)
 + OpenBSD 3.4 (IPv6)

 http://apache.org/~stas/Apache-Test-1.08-dev.tar.gz
 
 Thanks.
 
 [...]
 
 __
 Stas BekmanJAm_pH -- Just Another mod_perl Hacker
 http://stason.org/ mod_perl Guide --- http://perl.apache.org
 mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
 http://modperlbook.org http://apache.org   http://ticketmaster.com


signature.asc
Description: This is a digitally signed message part


Re: [Patch] Handle RedHat style Include conf.d/*.conf default configuration

2003-11-25 Thread Philippe M. Chiasson
On Mon, 2003-11-24 at 16:20, Stas Bekman wrote:
 Philippe M. Chiasson wrote:
  Apache-Test currently doesn't inherit RedHat style configuration layout.
  
  Include conf.d/*.conf doesn't get expanded proprely, and most modules
  are not found/activated.
  
  Following patch glob()es Include directive just in case
 
 Nice, Philippe.
 
 +1 after doing a proper indentation ;) please get rid of those tabs! and see 
 below:

Sorry, millions of apologies, my editor popped on me ;-(

 Also please don't rely on $_ in the for loop that calls other functions. You 
 never know what they will do to $_ without localizing it and suddenly weird 
 things will start to happen. It's much safer to do:
 
   if ($directive eq Include) {
   my $include = $self-server_file_rel2abs($_);
 -$self-inherit_config_file_or_directory($include);
 +foreach my $file ($include)) {
 +   $self-inherit_config_file_or_directory($file);
 +}
   }

Yes, you are correct, here is the new (cleaned) patch:

Index: Apache-Test/Changes
===
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
retrieving revision 1.67
diff -u -I$Id: -r1.67 Changes
--- Apache-Test/Changes 24 Nov 2003 23:31:31 -  1.67
+++ Apache-Test/Changes 25 Nov 2003 20:12:35 -
@@ -8,6 +8,9 @@
 
 =item 1.07-dev
 
+Fix Apache::TestConfigParse to handle glob includes, like Include
+conf/*.conf on RedHat [Philippe M. Chiasson]
+
 Fix Apache::TestConfig::add_config not to append   at the end of the
 config lines. This was a problem with config sections imported from
 .pm files, the appended  made it impossible to have multi-line
Index: Apache-Test/lib/Apache/TestConfigParse.pm
===
RCS file: 
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigParse.pm,v
retrieving revision 1.37
diff -u -I$Id: -r1.37 TestConfigParse.pm
--- Apache-Test/lib/Apache/TestConfigParse.pm   10 Nov 2003 17:23:52 -  
1.37
+++ Apache-Test/lib/Apache/TestConfigParse.pm   25 Nov 2003 20:12:35 -
@@ -243,8 +243,9 @@
 (my $directive, $_) = split /\s+/, $_, 2;
 
 if ($directive eq Include) {
-my $include = $self-server_file_rel2abs($_);
-$self-inherit_config_file_or_directory($include);
+foreach my $include (glob($self-server_file_rel2abs($_))) {
+   $self-inherit_config_file_or_directory($include);
+}
 }
 
 #parse what we want


-- 

Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/print||$$++redo}'


signature.asc
Description: This is a digitally signed message part


Re: resolving Apache::Test vs. Apache::test collision

2003-05-28 Thread Philippe M. Chiasson
---BeginMessage---
[ This message is resent on behalf of Philippe M. Chiasson
[EMAIL PROTECTED].  -- justin ]

On Tue, 2003-05-13 at 07:36, Stas Bekman wrote:
 Geoffrey Young wrote:
 
  I actually like Apache::TestPlan, it's most of the functionality that
  this module provides. but there are a few subs that are not. May be
  this other functionality should move elsewhere.
 
 
  given that almost all of the functions from the various Test* packages
  are exported by default and almost nobody specifies an import list
  currently with Apache::Test, I wouldn't worry too much about shuffling
  stuff around later after the immediate problem has been fixed.

 This is what I see now as the simplest solution at all fronts:

 1) keep the distro name Apache-Test.

 2) s|Apache/Test.pm|Apache/TestPlan.pm|

 3) contents of Apache/TestPlan.pm:

 package Apache::Test;
 $Apache::Test::VERSION =3D '1.02';
 package Apache::TestPlan;
 # what was previously Apache::Test code follows

 I decided to nevertheless plug these two lines in:

 package Apache::Test;
 $Apache::Test::VERSION =3D '1.02';

 so that CPAN will still index Apache::Test, and we can still tell CPAN.pm to
 install Apache::Test, same for dependencies list. Also that's where we
 maintain the distro's version.

 Usage-wise, the only change you have to do is this:

 perl -pi -e 's|use Apache::Test([\s;])|use Apache::TestPlan$1|' files

 Is everybody happy with that solution?

[late on this thread, but nontheless] I also like it

 __
 Stas BekmanJAm_pH -- Just Another mod_perl Hacker
 http://stason.org/ mod_perl Guide --- http://perl.apache.org
 mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
 http://modperlbook.org http://apache.org   http://ticketmaster.com


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

--
-- =
-
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634=
E37B)
http://gozer.ectoplasm.org/F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3=
 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenio=
us.
perl -e'$$=3D\${gozer};{$_=3Dunpack(P7,pack(L,$$));/^JAm_pH\n$/print||$$+=
+redo}'

--=-16Hpeuu7KHwOm+VqGGS3
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA+wLCfyzKhB4jDpaURAusVAJ9PcjA/K65PlieSZfIN26xNIq/e9ACcC+fQ
p0oiGEqYX8/JEYzUo1gs5b4=
=OPin
-END PGP SIGNATURE-

--=-16Hpeuu7KHwOm+VqGGS3--
---End Message---