Bug#750240: libapache2-mod-perl2: FTBFS with perl 5.20

Damyan Ivanov dmn at debian.org
Tue Jun 3 19:46:20 UTC 2014


-=| Damyan Ivanov, 03.06.2014 21:42:14 +0300 |=-
> I tried to find the reason and failed. Documenting what I did in the 
> hope that it helps in the future.
> 
> -=| gregor herrmann, 02.06.2014 20:00:29 +0200 |=-
> > libapache2-mod-perl2 fails to build with perl 5.20:
> > http://people.debian.org/~ntyni/perl/5.20/logs/20140530/misc/libapache2-mod-perl2_2.0.8+httpd24-r1449661-6+b2_amd64-20140531-0331.build
> 
> That's failing the third subtest of t/directive/perlloadmodule2.t.
> 
> Adding some debugging statements leads to:
> 
> Expected <dir: one two three four five six> but received <<!DOCTYPE HTML PUBLIC 
> "-//IETF//DTD HTML 2.0//EN">
> <html><head>
> <title>500 Internal Server Error</title>
> </head><body>
> <h1>Internal Server Error</h1>
> <p>The server encountered an internal error or
> misconfiguration and was unable to complete
> your request.</p>
> <p>Please contact the server administrator at 
>  pbuilder at localhost to inform them of the time this error occurred,
>  and the actions you performed just before this error.</p>
> <p>More information about this error may be available
> in the server error log.</p>
> <hr>
> <address>Apache/2.4.9 (Debian) world domination series/2.0 mod_perl/2.0.8 Perl/v
> 5.20.0 Server at localhost Port 8529</address>
> </body></html>
> > at t/directive/perlloadmodule2.t line 32.
> 
> Unfortunately the error log contains only:
> 
>  [perl:error] [pid 479:tid 140499903702784] [client 127.0.0.1:46172] Use of uninitialized value in string eq at /tmp/buildd/libapache2-mod-perl2-2.0.8+httpd24-r1449661/t/response/TestDirective/perlloadmodule2.pm line 85.
> 
> which is not very enlightening.

Or is it?

Applying the following patch makes the test pass:

--- a/t/response/TestDirective/perlloadmodule2.pm
+++ b/t/response/TestDirective/perlloadmodule2.pm
@@ -82,7 +82,7 @@ sub handler : method {
 
     my $s = $r->server;
 
-    if ($r->args eq 'srv') {
+    if ($r->args and $r->args eq 'srv') {
         my $srv_cfg = $self->get_config($s);
         $r->print("srv: @{ $srv_cfg->{MyMergeTest}||[] }");
     }


# Failed test 1 in t/reload.t at line 39
# Failed test 2 in t/reload.t at line 47
t/reload.t .. Failed 2/3 subtests 

The reason is the same -- comparing undefined $r->args with eq.

--- a/Apache-Reload/t/lib/Apache2/TestReload.pm
+++ b/Apache-Reload/t/lib/Apache2/TestReload.pm
@@ -15,7 +15,7 @@ our $pass = 0;
 sub handler {
     my $r = shift;
     $pass++;
-    if ($r->args eq 'last') {
+    if ($r->args and $r->args eq 'last') {
         Apache2::Reload->unregister_module($package);
         ModPerl::Util::unload_package($package);
         $pass = 0;


So it seems with perl 5.20 $r->args is undefined if there is no query 
string. Strange.

With the above two patches the test suite completes. There are 
problems in the install phase because of usr/lib/perl5 no longer 
existing, but that should be trivial to fix.



More information about the pkg-perl-maintainers mailing list