Author: geoff
Date: Fri Mar 11 08:27:43 2005
New Revision: 157105
URL: http://svn.apache.org/viewcvs?view=rev&rev=157105
Log:
first pass at removing Apache2.pm and MP_INST_APACHE2
testers wanted
Modified:
perl/modperl/branches/apache2-rename-unstable/Makefile.PL
perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/t/conf/extra.conf.in
perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Build.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildMM.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildOptions.pm
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/MM.pm
perl/modperl/branches/apache2-rename-unstable/t/apr/constants.t
perl/modperl/branches/apache2-rename-unstable/t/hooks/trans.t
perl/modperl/branches/apache2-rename-unstable/t/htdocs/vhost/startup.pl
perl/modperl/branches/apache2-rename-unstable/t/modperl/status.t
perl/modperl/branches/apache2-rename-unstable/t/response/TestDirective/perlrequire.pm
perl/modperl/branches/apache2-rename-unstable/t/response/TestPerl/ithreads.pm
Modified: perl/modperl/branches/apache2-rename-unstable/Makefile.PL
URL:
http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/Makefile.PL?view=diff&r1=157104&r2=157105
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/Makefile.PL (original)
+++ perl/modperl/branches/apache2-rename-unstable/Makefile.PL Fri Mar 11
08:27:43 2005
@@ -9,17 +9,17 @@
use constant MIN_HTTPD_VERSION_DYNAMIC => '2.0.47';
use constant MIN_HTTPD_VERSION_STATIC => '2.0.51';
-my($old_modperl_version, $old_modperl_pm);
+my($old_modperl_version, $old_modperl_pm, $apache2_pm);
BEGIN {
eval {
- require mod_perl2;
-# XXX: this section is unnecessary now
-# if ($mod_perl2::VERSION < 1.99) {
-# $old_modperl_version = $mod_perl::VERSION;
-# }
- $old_modperl_pm = delete $INC{'mod_perl.pm'};
- %mod_perl:: = ();
+ require Apache2;
+ $apache2_pm = 1;
+ require mod_perl;
+ if ($mod_perl::VERSION < 1.999_22) {
+ $old_modperl_version = $mod_perl::VERSION;
+ $old_modperl_pm = delete $INC{'mod_perl.pm'};
+ }
};
}
@@ -56,7 +56,6 @@
local %ModPerl::BuildMM::PM = (
'lib/typemap' => 'blib/lib/Apache2/typemap',
- 'lib/Apache2.pm' => 'blib/lib/Apache2.pm',
);
# these h files need to be installed system-wide so 3rd party XS
@@ -130,52 +129,37 @@
my $vstring = "mod_perl/$old_modperl_version";
print "$vstring installation detected...";
- if ($build->{MP_INST_APACHE2}) {
- print "ok (installing relative to Apache2/)\n";
+ my $prefix;
+ /^PREFIX=(.*)/ && $1 && ($prefix = canonpath glob($1)) for @ARGV;
+
+ # check that it's a full path
+ my $path = canonpath $old_modperl_pm;
+ # XXX: doesn't handle relative paths yet
+ # if PREFIX=/foo/bar is used, and it's not the same as the
+ # path where mod_perl < 1.99_22 is installed
+ if ($prefix && $path !~ /^$prefix/) {
+ print "ok (will install mod_perl/$VERSION into PREFIX=$prefix, " .
+ "no collision)\n";
}
else {
- my $prefix;
- /^PREFIX=(.*)/ && $1 && ($prefix = canonpath glob($1)) for @ARGV;
+ print " not ok\n\n";
+ print <<EOI;
+Cannot install mod_perl/$VERSION on top of $vstring
+due to a major API change between mod_perl 1.999_21 and 1.999_22.
+Please nuke the prior mod_perl installation from your site_lib,
+use a different perl to run the installation process, or use the
+PREFIX option when creating your Makefile. see
- # check that it's a full path
- my $mp1_path = canonpath $old_modperl_version;
- # XXX: doesn't handle relative paths yet
- # if PREFIX=/foo/bar is used, and it's not the same as the
- # path where mod_perl 1 is installed, we don't need to require
- # MP_INST_APACHE2
- if ($prefix && $mp1_path !~ /^$prefix/) {
- print "ok (will install mod_perl 2 into PREFIX=$prefix, " .
- "no collision)\n";
- }
- else {
- print " not ok\n\n";
- error <<EOI;
-Cannot install mod_perl/$VERSION on top of $vstring.
-Add the MP_INST_APACHE2=1 option or answer 'yes'
-to the next question
-EOI
- my $prompt = "Is it OK to install relative to Apache2/?";
- if ($build->prompt_y($prompt)) {
- $build->{MP_INST_APACHE2} = 1;
- }
- else {
- error <<EOI;
-
-The answer is 'No' => aborting...
-
-To build mod_perl 2 either add MP_INST_APACHE2=1 Makefile.PL option
-or first remove mod_perl $old_modperl_version files, including
-$old_modperl_pm
+ http://perl.apache.org/somelinkwellwritelater
+for more details.
+
+aborting...
EOI
exit 1;
- }
- }
}
}
- $build->generate_apache2_pm;
-
# On Win32, in order to decouple APR::* from mod_perl.so, we
# make up a static library MP_APR_LIB of the symbols required from
# src/modules/perl/*.c (see xs/APR/aprext/Makefile.PL), and
@@ -384,13 +368,6 @@
if ($build->is_dynamic) {
warning "You'll need to add the following to httpd.conf:",
" LoadModule perl_module modules/$build->{MODPERL_LIB_DSO}\n";
- }
-
- if ($build->{MP_INST_APACHE2}) {
- warning "Apache Perl modules will be installed relative to Apache2/";
- warning "Don't forget to:",
- "- configure 'PerlModule Apache2' in httpd.conf",
- "- or 'use Apache2 ();' in a startup script";
}
$build->save;
Modified:
perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/t/conf/extra.conf.in
URL:
http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/t/conf/extra.conf.in?view=diff&r1=157104&r2=157105
==============================================================================
---
perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/t/conf/extra.conf.in
(original)
+++
perl/modperl/branches/apache2-rename-unstable/ModPerl-Registry/t/conf/extra.conf.in
Fri Mar 11 08:27:43 2005
@@ -12,8 +12,6 @@
# make sure that we test under Taint and warnings mode enabled
PerlSwitches -wT
-PerlModule Apache2
-
PerlSwitches [EMAIL PROTECTED]@/../lib \
[EMAIL PROTECTED]@/../../Apache-Test/lib \
[EMAIL PROTECTED]@/../../lib \
Modified: perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Build.pm
URL:
http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Build.pm?view=diff&r1=157104&r2=157105
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Build.pm
(original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/Apache2/Build.pm Fri Mar
11 08:27:43 2005
@@ -1545,8 +1545,7 @@
my $self = shift;
return unless (my $mp_apr_lib = $self->{MP_APR_LIB});
my $lib_mp_apr_lib = 'lib' . $mp_apr_lib;
- my @dirs = $self->{MP_INST_APACHE2} ?
- qw(blib arch Apache2 auto) : qw(blib arch auto);
+ my @dirs = qw(blib arch auto);
my $apr_blib = catdir $self->{cwd}, @dirs, $lib_mp_apr_lib;
my $full_libname = $lib_mp_apr_lib . $Config{lib_ext};
return ($apr_blib, $full_libname);
@@ -1807,7 +1806,6 @@
# for post install use
for (@INC) {
# make sure not to pick mod_perl 1.0 typemap
- next if $self->{MP_INST_APACHE2} && $_ !~ /Apache2$/;
my $file = "$_/auto/Apache2/typemap";
push @typemaps, $file if -e $file;
}
@@ -1967,56 +1965,6 @@
my $self = shift;
return "";
-}
-
-# in case MP_INST_APACHE2=0 we shouldn't try to adjust @INC
-# because it may pick older Apache2 from the previous install
-sub generate_apache2_pm {
- my $self = shift;
-
- my $fixup = !$self->{MP_INST_APACHE2}
- ? '# MP_INST_APACHE2=0, do nothing'
- : <<'EOF';
-BEGIN {
- my @dirs = ();
-
- for my $path (@INC) {
- my $dir = "$path/Apache2";
- next unless -d $dir;
- push @dirs, $dir;
- }
-
- if (@dirs) {
- unshift @INC, @dirs;
- }
-
- # now re-org the libs to have first devel libs, then blib libs,
- # and only then perl core libs
- use File::Basename qw(dirname);
- my $project_root = $blib ? dirname(dirname($blib)) : '';
- if ($project_root) {
- my (@a, @b, @c);
- for (@INC) {
- if (m|^\Q$project_root\E|) {
- m|blib| ? push @b, $_ : push @a, $_;
- }
- else {
- push @c, $_;
- }
- }
- @INC = (@a, @b, @c);
- }
-
-}
-EOF
-
- my $content = join "\n\n", noedit_warning_hash(),
- 'package Apache2;', $fixup, "1;";
- my $file = catfile qw(lib Apache2.pm);
- open my $fh, '>', $file or die "Can't open $file: $!";
- print $fh $content;
- close $fh;
-
}
1;
Modified: perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildMM.pm
URL:
http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildMM.pm?view=diff&r1=157104&r2=157105
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildMM.pm
(original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildMM.pm Fri
Mar 11 08:27:43 2005
@@ -137,12 +137,6 @@
my $self = shift;
$build ||= build_config();
- #install everything relative to the Apache2/ subdir
- if ($build->{MP_INST_APACHE2}) {
- $self->{INST_ARCHLIB} = catdir $self->{INST_ARCHLIB}, 'Apache2';
- $self->{INST_LIB} = catdir $self->{INST_LIB}, 'Apache2';
- }
-
#"discover" xs modules. since there is no list hardwired
#any module can be unpacked in the mod_perl-2.xx directory
#and built static
@@ -207,8 +201,6 @@
my $cwd = Cwd::getcwd();
my $blib_dir = catdir qw(blib lib);
- $blib_dir = catdir $blib_dir, "Apache2"
- if $build->{MP_INST_APACHE2};
# those autogenerated under WrapXS/
# those living under xs/
@@ -316,30 +308,6 @@
# perl-lib-tree it won't be picked by non-mod_perl modules
if (exists $pm->{'lib/typemap'} ) {
$pm->{'lib/typemap'} = '$(INST_ARCHLIB)/auto/Apache2/typemap';
- }
-
- #not everything in MakeMaker uses INST_LIB
- #so we have do fixup a few PMs to make sure *everything*
- #gets installed into Apache2/
- if ($build->{MP_INST_APACHE2}) {
- while (my($k, $v) = each %$pm) {
- #up one from the Apache2/ subdir
- #so it can be found for 'use Apache2 ()'
- next if $v =~ /Apache2\.pm$/;
-
- # another module generated by A-T that needs to go to the
- # normal @INC
- next if $v =~ /TestConfigData\.pm$/;
-
- #move everything else to the Apache2/ subdir
- #unless already specified with \$(INST_LIB)
- #or already in Apache2/
- unless ($v =~ /Apache2/) {
- $v =~ s{ (blib[/\\:]lib) }{ catdir $1, 'Apache2'}xe;
- }
-
- $pm->{$k} = $v;
- }
}
'';
Modified:
perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildOptions.pm
URL:
http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildOptions.pm?view=diff&r1=157104&r2=157105
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildOptions.pm
(original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/BuildOptions.pm
Fri Mar 11 08:27:43 2005
@@ -225,7 +225,6 @@
TRACE 0 Turn on tracing
USE_DSO 0 Build mod_perl as a dso
USE_STATIC 0 Build mod_perl static
-INST_APACHE2 0 Install *.pm relative to Apache2/ directory
PROMPT_DEFAULT 0 Accept default value for all would-be prompts
OPTIONS_FILE 0 Read options from given file
STATIC_EXTS 0 Build Apache2::*.xs as static extensions
Modified: perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/MM.pm
URL:
http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/MM.pm?view=diff&r1=157104&r2=157105
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/MM.pm (original)
+++ perl/modperl/branches/apache2-rename-unstable/lib/ModPerl/MM.pm Fri Mar 11
08:27:43 2005
@@ -83,21 +83,6 @@
$build->{$key};
}
-#strip the Apache2/ subdir so things are install where they should be
-sub install {
- my $hash = shift;
-
- if (build_config('MP_INST_APACHE2')) {
- while (my($k,$v) = each %$hash) {
- delete $hash->{$k};
- $k =~ s{[/\\:]Apache2$}{};
- $hash->{$k} = $v;
- }
- }
-
- ExtUtils::Install::install($hash, @_);
-}
-
#the parent WriteMakefile moves MY:: methods into a different class
#so alias them each time WriteMakefile is called in a subdir
@@ -177,21 +162,6 @@
#### MM overrides ####
-sub ModPerl::MM::MY::constants {
- my $self = shift;
-
- my $build = build_config();
-
- #install everything relative to the Apache2/ subdir
- if ($build->{MP_INST_APACHE2}) {
- $self->{INST_ARCHLIB} .= '/Apache2';
- $self->{INST_LIB} .= '/Apache2';
- }
-
- $self->MM::constants;
-}
-
-
sub ModPerl::MM::MY::post_initialize {
my $self = shift;
@@ -200,22 +170,6 @@
while (my($k, $v) = each %PM) {
if (-e $k) {
- $pm->{$k} = $v;
- }
- }
-
- #not everything in MakeMaker uses INST_LIB
- #so we have do fixup a few PMs to make sure *everything*
- #gets installed into Apache2/
- if ($build->{MP_INST_APACHE2}) {
- while (my($k, $v) = each %$pm) {
- #move everything to the Apache2/ subdir
- #unless already specified with \$(INST_LIB)
- #or already in Apache2/
- unless ($v =~ /Apache2/) {
- $v =~ s|(blib/lib)|$1/Apache2|;
- }
-
$pm->{$k} = $v;
}
}
Modified: perl/modperl/branches/apache2-rename-unstable/t/apr/constants.t
URL:
http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/apr/constants.t?view=diff&r1=157104&r2=157105
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/apr/constants.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/apr/constants.t Fri Mar 11
08:27:43 2005
@@ -4,7 +4,6 @@
use Apache::Test;
-use Apache2 ();
use Apache::TestUtil;
use APR::Const -compile => qw(:common POLLIN :filetype);
Modified: perl/modperl/branches/apache2-rename-unstable/t/hooks/trans.t
URL:
http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/hooks/trans.t?view=diff&r1=157104&r2=157105
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/hooks/trans.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/hooks/trans.t Fri Mar 11
08:27:43 2005
@@ -5,7 +5,6 @@
use Apache::TestUtil;
use Apache::TestRequest;
-use Apache2 ();
use Apache2::Const ':common';
my $module = 'TestHooks::trans';
Modified:
perl/modperl/branches/apache2-rename-unstable/t/htdocs/vhost/startup.pl
URL:
http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/htdocs/vhost/startup.pl?view=diff&r1=157104&r2=157105
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/htdocs/vhost/startup.pl
(original)
+++ perl/modperl/branches/apache2-rename-unstable/t/htdocs/vhost/startup.pl Fri
Mar 11 08:27:43 2005
@@ -1,7 +1,6 @@
use warnings;
use strict;
-use Apache2;
use Apache2::ServerUtil ();
use Apache2::ServerRec ();
Modified: perl/modperl/branches/apache2-rename-unstable/t/modperl/status.t
URL:
http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/modperl/status.t?view=diff&r1=157104&r2=157105
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/modperl/status.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/modperl/status.t Fri Mar 11
08:27:43 2005
@@ -5,7 +5,6 @@
use Apache::TestRequest;
use Apache::TestUtil qw(t_cmp t_server_log_error_is_expected);
-use Apache2;
use Apache2::Const -compile => qw(OK DECLINED
NOT_FOUND SERVER_ERROR FORBIDDEN
HTTP_OK);
Modified:
perl/modperl/branches/apache2-rename-unstable/t/response/TestDirective/perlrequire.pm
URL:
http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/response/TestDirective/perlrequire.pm?view=diff&r1=157104&r2=157105
==============================================================================
---
perl/modperl/branches/apache2-rename-unstable/t/response/TestDirective/perlrequire.pm
(original)
+++
perl/modperl/branches/apache2-rename-unstable/t/response/TestDirective/perlrequire.pm
Fri Mar 11 08:27:43 2005
@@ -75,7 +75,6 @@
# use test system's @INC
PerlSwitches [EMAIL PROTECTED]@
PerlRequire "conf/modperl_inc.pl"
- PerlModule Apache2
PerlSwitches [EMAIL PROTECTED]@/testdirective/vh
PerlRequire "ApacheTest/PerlRequireTest.pm"
Modified:
perl/modperl/branches/apache2-rename-unstable/t/response/TestPerl/ithreads.pm
URL:
http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/response/TestPerl/ithreads.pm?view=diff&r1=157104&r2=157105
==============================================================================
---
perl/modperl/branches/apache2-rename-unstable/t/response/TestPerl/ithreads.pm
(original)
+++
perl/modperl/branches/apache2-rename-unstable/t/response/TestPerl/ithreads.pm
Fri Mar 11 08:27:43 2005
@@ -93,7 +93,6 @@
# use test system's @INC
PerlSwitches [EMAIL PROTECTED]@
PerlRequire "conf/modperl_inc.pl"
- PerlModule Apache2
<Location /TestPerl__ithreads>
SetHandler modperl