You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Sam Tregar <sa...@tregar.com> on 2017/03/04 06:59:10 UTC

Problems using Apache::Test on Debian (and Ubuntu)

Hello all.  I've been working on getting Apache::Test running on Debian and
it's not going well.  One problem seems to be that Debian's system Apache
conf is not named what Apache::Test thinks it should be named (apache2.conf
vs httpd.conf).

After solving that problem I hit a bigger one - the system apache2.conf
file shipped with Debian is quite peculiar.  It requires numerous
environment variables (i.e. APACHE_RUN_DIR, APACHE_USER, etc) which are set
in apache2ctl.  Worse, it doesn't define a ServerRoot and neither does apxs
have a value for prefix.

Part of this bug appears in this bug report:

https://rt.cpan.org/Public/Bug/Display.html?id=118445

In short it seems like Apache::Test relies on the system Apache conf being
fairly vanilla and sane, but the Debian/Ubuntu maintainers have different
ideas.  I'm not sure what to do here - perhaps package up a very simple
default config for Debian/Ubuntu and sub that in?

Any help would be appreciated.  I'm happy to work up a patch if I can only
figure out what needs to change.

Thanks!

Sam

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by Joachim Zobel <jz...@heute-morgen.de>.
Hi.

Just wanted to point out that as a workaround running as root worked for 
me (on debian stretch using cpan2deb).

Sincerely,

Joachim

-- 
Papier ist gebundenes CO2. Bitte drucken Sie diese EMail aus und archivieren Sie sie.


Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by Sam Tregar <sa...@tregar.com>.
I have attached a patch for this issue and a few others I found while
trying to run tests on recent Debian and Ubuntu servers.  Please let me
know if you have any questions.

Part of this patch came from this Debian patch that seemingly hasn't gotten
back into the main distro:

https://sources.debian.net/patches/libapache2-mod-perl2/2.0.9~1624218-2%2Bdeb8u1/030-apxs-no-prefix.patch/

Sam


On Fri, Mar 3, 2017 at 10:59 PM, Sam Tregar <sa...@tregar.com> wrote:

> Hello all.  I've been working on getting Apache::Test running on Debian
> and it's not going well.  One problem seems to be that Debian's system
> Apache conf is not named what Apache::Test thinks it should be named
> (apache2.conf vs httpd.conf).
>
> After solving that problem I hit a bigger one - the system apache2.conf
> file shipped with Debian is quite peculiar.  It requires numerous
> environment variables (i.e. APACHE_RUN_DIR, APACHE_USER, etc) which are set
> in apache2ctl.  Worse, it doesn't define a ServerRoot and neither does apxs
> have a value for prefix.
>
> Part of this bug appears in this bug report:
>
> https://rt.cpan.org/Public/Bug/Display.html?id=118445
>
> In short it seems like Apache::Test relies on the system Apache conf being
> fairly vanilla and sane, but the Debian/Ubuntu maintainers have different
> ideas.  I'm not sure what to do here - perhaps package up a very simple
> default config for Debian/Ubuntu and sub that in?
>
> Any help would be appreciated.  I'm happy to work up a patch if I can only
> figure out what needs to change.
>
> Thanks!
>
> Sam
>
>
>

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by Sam Tregar <sa...@tregar.com>.
That seems like a reasonable solution.  Do you think we should switch to
using apachectl everywhere, or try to detect whether it's necessary?

Sam


On Mon, Mar 6, 2017 at 12:46 PM, Eric Covener <co...@gmail.com> wrote:

> On Mon, Mar 6, 2017 at 3:23 PM, Stefan Fritsch <sf...@sfritsch.de> wrote:
> > These are set in /etc/apache2/envvars. You should simply source that file
> > before running the test suite. Also, you can pass another config file
> name to
> > the test suite. Maybe this helps:
>
> I can't remember/find the parm, but on one system I have been asking
> the test suite to use "apachectl" instead of "httpd" even with
> something much less complex then the debian layout.  This also saves
> the envvars from affecting the framework itself.
>
>
> --
> Eric Covener
> covener@gmail.com
>

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by Eric Covener <co...@gmail.com>.
On Mon, Mar 6, 2017 at 3:23 PM, Stefan Fritsch <sf...@sfritsch.de> wrote:
> These are set in /etc/apache2/envvars. You should simply source that file
> before running the test suite. Also, you can pass another config file name to
> the test suite. Maybe this helps:

I can't remember/find the parm, but on one system I have been asking
the test suite to use "apachectl" instead of "httpd" even with
something much less complex then the debian layout.  This also saves
the envvars from affecting the framework itself.


-- 
Eric Covener
covener@gmail.com

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Tuesday, 7 March 2017 12:56:04 CET William A Rowe Jr wrote:
> My comment was that having an alternate target name, e.g. httpd.prefork
> or httpd.worker ends up resulting in $prefix/conf/httpd.prefork.conf as the
> derived config file name (although that file is actually httpd.conf). The
> fact that TARGET was overloaded as both the name of the binary and conf
> file had caused me grief in the past. Splitting these two in apxs could
> prove helpful to others. Adding the path-to-envvars would also be very
> good.
> 
> If some variable from apxs would help us identify that /etc/apache2 is
> the current home of envvars ... then we can probably work around this
> missing bit of apxs info.

Not sure if you still need it if you use apachectl. But looking into SBINDIR 
and if it's not there into SYSCONFDIR should work. At least this works with 
the default layout and Debian.

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by Sam Tregar <sa...@tregar.com>.
Thanks - it wasn't clear to me which comments earlier were from maintainers
and which from interested bystanders.  No patch will ever be universally
loved, so I thought I'd try to figure out which changes needed to be made.

Sam


On Thu, Mar 9, 2017 at 2:26 PM, William A Rowe Jr <wr...@rowe-clan.net>
wrote:

> On Thu, Mar 9, 2017 at 3:23 PM, Sam Tregar <sa...@tregar.com> wrote:
> > I'm not totally clear on who's maintaining Apache::Test.
> >
> > If not, what changes would you need to take it?
>
> Refer back to my earlier comments. There is very little chance that any
> specific vendor deviations will be accommodated at the ASF. Once broken
> without community consensus, the vendor owns their choices. That said...
>
> There's a very good chance that making variable lookup more abstract
> in a way that allows all builders to inform Apache::Test and all other
> consumers of specific resources (through apachectl, apxs and similar)
> will be readily accepted. Please look at Eric's answer for a next step.
>
> In answer to your root question, Apache::Test is under the perl.apache.org
> PMC's domain.
>

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Thu, Mar 9, 2017 at 3:23 PM, Sam Tregar <sa...@tregar.com> wrote:
> I'm not totally clear on who's maintaining Apache::Test.
>
> If not, what changes would you need to take it?

Refer back to my earlier comments. There is very little chance that any
specific vendor deviations will be accommodated at the ASF. Once broken
without community consensus, the vendor owns their choices. That said...

There's a very good chance that making variable lookup more abstract
in a way that allows all builders to inform Apache::Test and all other
consumers of specific resources (through apachectl, apxs and similar)
will be readily accepted. Please look at Eric's answer for a next step.

In answer to your root question, Apache::Test is under the perl.apache.org
PMC's domain.

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Fri, Mar 10, 2017 at 1:51 PM, Sam Tregar <sa...@tregar.com> wrote:
>
> I think this could be fixed by just the part of my patch that allowed for
> IncludeOptional in addition to Include when finding sub-confs for inheriting
> the parts that load an MPM.  I'll work up a patch that switches to apachectl
> and includes that.  Thanks!

+1 to your IncludeOptional patch! However, Apache::Test needs to be graceful
in handling the non-existence of the directory/file pattern.

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by Sam Tregar <sa...@tregar.com>.
No it does not.  Ubuntu and Debian still error:

waiting 60 seconds for server to start: .AH00534: apache2: Configuration
error: No MPM loaded.


I think this could be fixed by just the part of my patch that allowed for
IncludeOptional in addition to Include when finding sub-confs for
inheriting the parts that load an MPM.  I'll work up a patch that switches
to apachectl and includes that.  Thanks!

Sam

On Thu, Mar 9, 2017 at 1:54 PM, Eric Covener <co...@gmail.com> wrote:

> On Thu, Mar 9, 2017 at 4:23 PM, Sam Tregar <sa...@tregar.com> wrote:
> > I'm not totally clear on who's maintaining Apache::Test.  If you are the
> > maintainer, can you say whether you'll take my patch to get the module
> > working on Debian and Ubuntu?  If not, what changes would you need to
> take
> > it?
>
> I think several of the responders can write to Apache::Test. But IMO
> the original patch ITT is not suitable, it duplicates a bunch of
> environment variables that are debian-specific. Does the framework
> work for you pass -httpd pointing to apachectl as in my previous post?
>
> --
> Eric Covener
> covener@gmail.com
>

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by Eric Covener <co...@gmail.com>.
On Thu, Mar 9, 2017 at 4:23 PM, Sam Tregar <sa...@tregar.com> wrote:
> I'm not totally clear on who's maintaining Apache::Test.  If you are the
> maintainer, can you say whether you'll take my patch to get the module
> working on Debian and Ubuntu?  If not, what changes would you need to take
> it?

I think several of the responders can write to Apache::Test. But IMO
the original patch ITT is not suitable, it duplicates a bunch of
environment variables that are debian-specific. Does the framework
work for you pass -httpd pointing to apachectl as in my previous post?

-- 
Eric Covener
covener@gmail.com

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by Sam Tregar <sa...@tregar.com>.
I'm not totally clear on who's maintaining Apache::Test.  If you are the
maintainer, can you say whether you'll take my patch to get the module
working on Debian and Ubuntu?  If not, what changes would you need to take
it?

Thanks!

Sam


On Tue, Mar 7, 2017 at 11:15 AM, William A Rowe Jr <wr...@rowe-clan.net>
wrote:

> On Tue, Mar 7, 2017 at 12:59 PM, Stefan Fritsch <sf...@sfritsch.de> wrote:
> > On Tuesday, 7 March 2017 11:17:57 CET Eric Covener wrote:
> >> On Tue, Mar 7, 2017 at 10:32 AM, William A Rowe Jr <wrowe@rowe-clan.net
> >
> > wrote:
> >> > It seems we should have the framework process the bin/envvars (in the
> >> > normal path,  or /etc/apache2 in this case)... but that should be
> based
> >> > on retrieving the
> >> > pathname of bin/envvars from apxs, and apxs doesn't have this info (it
> >> > also does not have two distinct entitites for the progname and config
> >> > file name, requiring that both be overridden if the progname is
> changed.)
> >>
> >> Having a bit of trouble sorting out these two, but they don't seem to
> >> affect the conf filename
> >>
> >> Apache-Test/lib/Apache/TestConfig.pm
> >>   httpd           => 'server to use for testing (default is
> $bindir/httpd)',
> >> target          => 'name of server binary (default is apxs -q TARGET)',
> >>
> >> e.g. this works for me:
> >>
> >> perl Makefile.PL  -apxs ~/SRC/httpd-trunk/built/bin/apxs -httpd
> >> ~/SRC/httpd-trunk/built/bin/apachectl
> >
> > Yes, always using apachectl is probably the best solution. The
> alternative
> > would have been to call something like
> >
> > env -i sh -c '. /etc/apache2/envvars; env'
> >
> > from Apache::Test and parse the output. But one would have to find the
> envvars
> > file, first.
>
> On Fedora, this is apparently /etc/sysconfig/httpd - although reduced
> now to mostly
> a no-op, as the systemd service config handles overriding any defines
> or envvars...
>
> [Service]
> Type=notify
> Environment=LANG=C
> ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
> ExecReload=/usr/sbin/httpd $OPTIONS -k graceful
>
> Agreed that apachectl solves a bunch of issues except SYSCONFDIR
> and conf file name... we can extract this like so...
>
> apachectl -V 2>/dev/null | sed "s# -D SERVER_CONFIG_FILE=##p;d;"
> "conf/httpd.conf"
>

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Tue, Mar 7, 2017 at 12:59 PM, Stefan Fritsch <sf...@sfritsch.de> wrote:
> On Tuesday, 7 March 2017 11:17:57 CET Eric Covener wrote:
>> On Tue, Mar 7, 2017 at 10:32 AM, William A Rowe Jr <wr...@rowe-clan.net>
> wrote:
>> > It seems we should have the framework process the bin/envvars (in the
>> > normal path,  or /etc/apache2 in this case)... but that should be based
>> > on retrieving the
>> > pathname of bin/envvars from apxs, and apxs doesn't have this info (it
>> > also does not have two distinct entitites for the progname and config
>> > file name, requiring that both be overridden if the progname is changed.)
>>
>> Having a bit of trouble sorting out these two, but they don't seem to
>> affect the conf filename
>>
>> Apache-Test/lib/Apache/TestConfig.pm
>>   httpd           => 'server to use for testing (default is $bindir/httpd)',
>> target          => 'name of server binary (default is apxs -q TARGET)',
>>
>> e.g. this works for me:
>>
>> perl Makefile.PL  -apxs ~/SRC/httpd-trunk/built/bin/apxs -httpd
>> ~/SRC/httpd-trunk/built/bin/apachectl
>
> Yes, always using apachectl is probably the best solution. The alternative
> would have been to call something like
>
> env -i sh -c '. /etc/apache2/envvars; env'
>
> from Apache::Test and parse the output. But one would have to find the envvars
> file, first.

On Fedora, this is apparently /etc/sysconfig/httpd - although reduced
now to mostly
a no-op, as the systemd service config handles overriding any defines
or envvars...

[Service]
Type=notify
Environment=LANG=C
ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
ExecReload=/usr/sbin/httpd $OPTIONS -k graceful

Agreed that apachectl solves a bunch of issues except SYSCONFDIR
and conf file name... we can extract this like so...

apachectl -V 2>/dev/null | sed "s# -D SERVER_CONFIG_FILE=##p;d;"
"conf/httpd.conf"

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Tuesday, 7 March 2017 11:17:57 CET Eric Covener wrote:
> On Tue, Mar 7, 2017 at 10:32 AM, William A Rowe Jr <wr...@rowe-clan.net> 
wrote:
> > It seems we should have the framework process the bin/envvars (in the
> > normal path,  or /etc/apache2 in this case)... but that should be based
> > on retrieving the
> > pathname of bin/envvars from apxs, and apxs doesn't have this info (it
> > also does not have two distinct entitites for the progname and config
> > file name, requiring that both be overridden if the progname is changed.)
> 
> Having a bit of trouble sorting out these two, but they don't seem to
> affect the conf filename
> 
> Apache-Test/lib/Apache/TestConfig.pm
>   httpd           => 'server to use for testing (default is $bindir/httpd)',
> target          => 'name of server binary (default is apxs -q TARGET)',
> 
> e.g. this works for me:
> 
> perl Makefile.PL  -apxs ~/SRC/httpd-trunk/built/bin/apxs -httpd
> ~/SRC/httpd-trunk/built/bin/apachectl

Yes, always using apachectl is probably the best solution. The alternative 
would have been to call something like

env -i sh -c '. /etc/apache2/envvars; env'

from Apache::Test and parse the output. But one would have to find the envvars 
file, first.



Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Tue, Mar 7, 2017 at 10:17 AM, Eric Covener <co...@gmail.com> wrote:
> On Tue, Mar 7, 2017 at 10:32 AM, William A Rowe Jr <wr...@rowe-clan.net> wrote:
>> It seems we should have the framework process the bin/envvars (in the normal
>> path,  or /etc/apache2 in this case)... but that should be based on
>> retrieving the
>> pathname of bin/envvars from apxs, and apxs doesn't have this info (it also does
>> not have two distinct entitites for the progname and config file name, requiring
>> that both be overridden if the progname is changed.)
>
> Having a bit of trouble sorting out these two, but they don't seem to
> affect the conf filename
>
> Apache-Test/lib/Apache/TestConfig.pm
>   httpd           => 'server to use for testing (default is $bindir/httpd)',
>   target          => 'name of server binary (default is apxs -q TARGET)',
>
> e.g. this works for me:
>
> perl Makefile.PL  -apxs ~/SRC/httpd-trunk/built/bin/apxs -httpd
> ~/SRC/httpd-trunk/built/bin/apachectl

Interesting, you are right... overriding -httpd doesn't affect target.

My comment was that having an alternate target name, e.g. httpd.prefork
or httpd.worker ends up resulting in $prefix/conf/httpd.prefork.conf as the
derived config file name (although that file is actually httpd.conf). The
fact that TARGET was overloaded as both the name of the binary and conf
file had caused me grief in the past. Splitting these two in apxs could
prove helpful to others. Adding the path-to-envvars would also be very
good.

If some variable from apxs would help us identify that /etc/apache2 is
the current home of envvars ... then we can probably work around this
missing bit of apxs info.

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by Eric Covener <co...@gmail.com>.
On Tue, Mar 7, 2017 at 10:32 AM, William A Rowe Jr <wr...@rowe-clan.net> wrote:
> It seems we should have the framework process the bin/envvars (in the normal
> path,  or /etc/apache2 in this case)... but that should be based on
> retrieving the
> pathname of bin/envvars from apxs, and apxs doesn't have this info (it also does
> not have two distinct entitites for the progname and config file name, requiring
> that both be overridden if the progname is changed.)

Having a bit of trouble sorting out these two, but they don't seem to
affect the conf filename

Apache-Test/lib/Apache/TestConfig.pm
  httpd           => 'server to use for testing (default is $bindir/httpd)',
  target          => 'name of server binary (default is apxs -q TARGET)',

e.g. this works for me:

perl Makefile.PL  -apxs ~/SRC/httpd-trunk/built/bin/apxs -httpd
~/SRC/httpd-trunk/built/bin/apachectl

-- 
Eric Covener
covener@gmail.com

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by Sam Tregar <sa...@tregar.com>.
If you're looking for a stop-gap for Ubuntu, apply my patch and tests start
running.  :)

Or are you looking for a better stop-gap?  I'm happy to make changes if you
can explain what needs to work differently.

Sam


On Tue, Mar 7, 2017 at 7:32 AM, William A Rowe Jr <wr...@rowe-clan.net>
wrote:

> On Mon, Mar 6, 2017 at 3:11 PM, Sam Tregar <sa...@tregar.com> wrote:
> > Are you suggesting that people who want to run tests that use
> Apache::Test
> > should know that they have to source /etc/apache2/envvars first?  Or
> that I
> > should patch Apache::Test to source that file instead of guessing which
> vars
> > to set?
> >
> > That file unsets HOME on Ubuntu and changes LANG to C, so if we tell
> people
> > to source it we should probably also tell them to logout afterwards.
>
> It seems we should have the framework process the bin/envvars (in the
> normal
> path,  or /etc/apache2 in this case)... but that should be based on
> retrieving the
> pathname of bin/envvars from apxs, and apxs doesn't have this info (it
> also does
> not have two distinct entitites for the progname and config file name,
> requiring
> that both be overridden if the progname is changed.)
>
> Because of a small delta between fedora's openssl x509 and my stock openssl
> build (and fedora's is found first on the path)... processing
> bin/envvars without
> loading it into the current console session would be a big win for me!
>
> I guess we aught to add both the envvars and distinct conffile defaults to
> the
> apxs utility, and then we can play catch-up in Apache::Test. Not sure what
> the
> stop-gap would be for Ubuntu short-term. WDYT?
>

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Mon, Mar 6, 2017 at 3:11 PM, Sam Tregar <sa...@tregar.com> wrote:
> Are you suggesting that people who want to run tests that use Apache::Test
> should know that they have to source /etc/apache2/envvars first?  Or that I
> should patch Apache::Test to source that file instead of guessing which vars
> to set?
>
> That file unsets HOME on Ubuntu and changes LANG to C, so if we tell people
> to source it we should probably also tell them to logout afterwards.

It seems we should have the framework process the bin/envvars (in the normal
path,  or /etc/apache2 in this case)... but that should be based on
retrieving the
pathname of bin/envvars from apxs, and apxs doesn't have this info (it also does
not have two distinct entitites for the progname and config file name, requiring
that both be overridden if the progname is changed.)

Because of a small delta between fedora's openssl x509 and my stock openssl
build (and fedora's is found first on the path)... processing
bin/envvars without
loading it into the current console session would be a big win for me!

I guess we aught to add both the envvars and distinct conffile defaults to the
apxs utility, and then we can play catch-up in Apache::Test. Not sure what the
stop-gap would be for Ubuntu short-term. WDYT?

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by Sam Tregar <sa...@tregar.com>.
Are you suggesting that people who want to run tests that use Apache::Test
should know that they have to source /etc/apache2/envvars first?  Or that I
should patch Apache::Test to source that file instead of guessing which
vars to set?

That file unsets HOME on Ubuntu and changes LANG to C, so if we tell people
to source it we should probably also tell them to logout afterwards.

Sam


On Mon, Mar 6, 2017 at 12:23 PM, Stefan Fritsch <sf...@sfritsch.de> wrote:

> On Friday, 3 March 2017 22:59:10 CET Sam Tregar wrote:
> > Hello all.  I've been working on getting Apache::Test running on Debian
> and
> > it's not going well.  One problem seems to be that Debian's system Apache
> > conf is not named what Apache::Test thinks it should be named
> (apache2.conf
> > vs httpd.conf).
> >
> > After solving that problem I hit a bigger one - the system apache2.conf
> > file shipped with Debian is quite peculiar.  It requires numerous
> > environment variables (i.e. APACHE_RUN_DIR, APACHE_USER, etc) which are
> set
> > in apache2ctl.
>
> These are set in /etc/apache2/envvars. You should simply source that file
> before running the test suite. Also, you can pass another config file name
> to
> the test suite. Maybe this helps:
>
> https://sources.debian.net/src/apache2/2.4.25-3/debian/
> tests/run-test-suite/
>
> (Though this is a rather quick and dirty hack that was done to get the test
> suite included in the next Debian stable release).
>
> > Worse, it doesn't define a ServerRoot and neither does apxs
> > have a value for prefix.
>
> I have done this patch to Apache::Test:
>
> http://svn.apache.org/viewvc?view=revision&revision=1782838
>
> That seems to take care of most warnings about apxs.
>
>

Re: Problems using Apache::Test on Debian (and Ubuntu)

Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Friday, 3 March 2017 22:59:10 CET Sam Tregar wrote:
> Hello all.  I've been working on getting Apache::Test running on Debian and
> it's not going well.  One problem seems to be that Debian's system Apache
> conf is not named what Apache::Test thinks it should be named (apache2.conf
> vs httpd.conf).
> 
> After solving that problem I hit a bigger one - the system apache2.conf
> file shipped with Debian is quite peculiar.  It requires numerous
> environment variables (i.e. APACHE_RUN_DIR, APACHE_USER, etc) which are set
> in apache2ctl.

These are set in /etc/apache2/envvars. You should simply source that file 
before running the test suite. Also, you can pass another config file name to 
the test suite. Maybe this helps:

https://sources.debian.net/src/apache2/2.4.25-3/debian/tests/run-test-suite/

(Though this is a rather quick and dirty hack that was done to get the test 
suite included in the next Debian stable release).

> Worse, it doesn't define a ServerRoot and neither does apxs
> have a value for prefix.

I have done this patch to Apache::Test: 

http://svn.apache.org/viewvc?view=revision&revision=1782838

That seems to take care of most warnings about apxs.