You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Eugene Eric Kim <ee...@eekim.com> on 2002/09/25 19:40:53 UTC
installation bug with Apache v2.0.42
I found a minor installation bug in both modperl v1.99-5. (The same bug
also seems to be in the latest modperl-2.0 CVS tree.)
The bug occurs when you try to install modperl 2 with the latest version
of Apache (2.0.42). For whatever reason, the Apache folks changed the
format of the macros in include/ap_release.h between 2.0.40 and 2.0.42.
AP_SERVER_BASEREVISION is now:
#define AP_SERVER_BASEREVISION AP_SERVER_MINORREVISION "." AP_SERVER_PATCHLEVEL
instead of simply:
#define AP_SERVER_BASEREVISION "2.0.42"
This breaks the httpd_version method in Apache/Build.pm.
I got around it by simply changing the AP_SERVER_BASEREVISION in
include/ap_release.h to the latter format. The "correct" solution depends
on how stable the macro format will be for future versions of Apache. If
it's going to stay the way it is, httpd_version needs to be modified to
search for other macros as an alternative method for computing the
version.
-Eugene
--
+=== Eugene Eric Kim ===== eekim@eekim.com ===== http://www.eekim.com/ ===+
| "Writer's block is a fancy term made up by whiners so they |
+===== can have an excuse to drink alcohol." --Steve Martin ===========+
Re: installation bug with Apache v2.0.42
Posted by Andreas Hasenack <an...@conectiva.com.br>.
Em Wed, Sep 25, 2002 at 10:40:53AM -0700, Eugene Eric Kim escreveu:
> format of the macros in include/ap_release.h between 2.0.40 and 2.0.42.
> AP_SERVER_BASEREVISION is now:
>
> #define AP_SERVER_BASEREVISION AP_SERVER_MINORREVISION "." AP_SERVER_PATCHLEVEL
>
> instead of simply:
>
> #define AP_SERVER_BASEREVISION "2.0.42"
>
> This breaks the httpd_version method in Apache/Build.pm.
Try this patch, is what I'm using here:
--- mod_perl-1.99_05/lib/Apache/Build.pm.orig 2002-09-19 18:44:56.000000000 -0300
+++ mod_perl-1.99_05/lib/Apache/Build.pm 2002-09-19 18:46:32.000000000 -0300
@@ -740,14 +740,17 @@
return undef;
};
- my $version;
+ my ($version,$maj,$min,$pat);
while(<$fh>) {
- next unless /^\#define\s+AP_SERVER_BASEREVISION\s+\"(.*)\"/;
- $version = $1;
- last;
+ $maj = $1 if /^#define\s+AP_SERVER_MAJORVERSION\s+\"(.*)\"/;
+ $min = $1 if /^#define\s+AP_SERVER_MINORVERSION\s+\"(.*)\"/;
+ $pat = $1 if /^#define\s+AP_SERVER_PATCHLEVEL\s+\"(.*)\"/;
+ $maj && $min && $pat && last;
}
+ $version = "$maj.$min.$pat";
+
close $fh;
$self->httpd_version_cache($dir, $version);