cvs commit: modperl-docs/src/docs/2.0/os/win32 mpinstall install.pod
randyk 2004/01/12 21:57:01 Modified:src/docs/1.0/os/win32 mpinstall src/docs/2.0/os/win32 mpinstall install.pod Log: For mod_perl 2, mention availability of a mod_perl-dev ppm package for Win32, based on cvs sources - the mod_perl package will now be based on the latest CPAN sources. Revision ChangesPath 1.9 +11 -3 modperl-docs/src/docs/1.0/os/win32/mpinstall Index: mpinstall === RCS file: /home/cvs/modperl-docs/src/docs/1.0/os/win32/mpinstall,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mpinstall 28 Nov 2003 04:54:26 - 1.8 +++ mpinstall 13 Jan 2004 05:57:01 - 1.9 @@ -141,11 +141,19 @@ else { $checksums = $ppmsx86 . $cs; if ($apache2) { -$ppdfile = 'mod_perl.ppd'; -$tgzfile = 'mod_perl.tar.gz'; +my $ans = prompt('Do you want the latest mod_perl 2 development version?', 'no'); +if ($ans =~ /^n/i) { +$ppdfile = 'mod_perl.ppd'; +$tgzfile = 'mod_perl.tar.gz'; +$so_fake = 'mod_perl.so'; + } +else { +$ppdfile = 'mod_perl-dev.ppd'; +$tgzfile = 'mod_perl-dev.tar.gz'; +$so_fake = 'mod_perl-dev.so'; +} $ppd = $ppms . $ppdfile; $tgz = $ppmsx86 . $tgzfile; -$so_fake = 'mod_perl.so'; $so_fetch = $ppmsx86 . $so_fake; } else { 1.9 +11 -3 modperl-docs/src/docs/2.0/os/win32/mpinstall Index: mpinstall === RCS file: /home/cvs/modperl-docs/src/docs/2.0/os/win32/mpinstall,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mpinstall 28 Nov 2003 04:54:26 - 1.8 +++ mpinstall 13 Jan 2004 05:57:01 - 1.9 @@ -141,11 +141,19 @@ else { $checksums = $ppmsx86 . $cs; if ($apache2) { -$ppdfile = 'mod_perl.ppd'; -$tgzfile = 'mod_perl.tar.gz'; +my $ans = prompt('Do you want the latest mod_perl 2 development version?', 'no'); +if ($ans =~ /^n/i) { +$ppdfile = 'mod_perl.ppd'; +$tgzfile = 'mod_perl.tar.gz'; +$so_fake = 'mod_perl.so'; + } +else { +$ppdfile = 'mod_perl-dev.ppd'; +$tgzfile = 'mod_perl-dev.tar.gz'; +$so_fake = 'mod_perl-dev.so'; +} $ppd = $ppms . $ppdfile; $tgz = $ppmsx86 . $tgzfile; -$so_fake = 'mod_perl.so'; $so_fetch = $ppmsx86 . $so_fake; } else { 1.33 +12 -4 modperl-docs/src/docs/2.0/os/win32/install.pod Index: install.pod === RCS file: /home/cvs/modperl-docs/src/docs/2.0/os/win32/install.pod,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- install.pod 7 Jan 2004 03:58:37 - 1.32 +++ install.pod 13 Jan 2004 05:57:01 - 1.33 @@ -171,14 +171,22 @@ if these packages contain XS-based modules. The mod_perl package available from this site will always -use the latest mod_perl sources compiled against the latest official +use the latest mod_perl sources available from CPAN +compiled against the latest official Apache release; depending on changes made in Apache, you may or may not be able to use an earlier Apache binary. However, in the Apache Win32 world it is particularly a good idea to use the latest version, -for bug and security fixes. If you encounter problems loading +for bug and security fixes. If you want to try a later development +version of mod_perl 2, get the F ppm package +instead; the development version may contain bug fixes that were +found since the last CPAN release, but it may also contain +experimental features that have not been fully tested. + +If you encounter problems loading F, ensure that the mod_perl version you are using matches -that of Apache, make certain C is in your C environment -variable, or try adding the Apache directive +that of Apache, make sure you are using at least Apache/2.0.47, +and also make certain C is in your C environment +variable or try adding the Apache directive LoadFile "C:/Path/to/your/Perl/bin/perlxx.dll" - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/os/win32 mpinstall
randyk 2003/11/27 20:54:26 Modified:src/docs/1.0/os/win32 mpinstall src/docs/2.0/os/win32 mpinstall Log: Point out the need to use Apache2.pm. Revision ChangesPath 1.8 +5 -3 modperl-docs/src/docs/1.0/os/win32/mpinstall Index: mpinstall === RCS file: /home/cvs/modperl-docs/src/docs/1.0/os/win32/mpinstall,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- mpinstall 7 Jul 2003 01:27:36 - 1.7 +++ mpinstall 28 Nov 2003 04:54:26 - 1.8 @@ -266,9 +266,11 @@ LoadFile "$dll" LoadModule perl_module modules/$so -in the section where other apache modules are loaded, -and then fire up the server. You may also have to add -$Config{bin} to your PATH environment variable. +in the section where other apache modules are loaded. +You should also either have a directive 'PerlModule Apache2' +in httpd.conf or put in a 'use Apache2 ();' in a startup +script. You may also have to add $Config{bin} +to your PATH environment variable. For more information, visit http://perl.apache.org/. 1.8 +5 -3 modperl-docs/src/docs/2.0/os/win32/mpinstall Index: mpinstall === RCS file: /home/cvs/modperl-docs/src/docs/2.0/os/win32/mpinstall,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- mpinstall 7 Jul 2003 01:27:36 - 1.7 +++ mpinstall 28 Nov 2003 04:54:26 - 1.8 @@ -266,9 +266,11 @@ LoadFile "$dll" LoadModule perl_module modules/$so -in the section where other apache modules are loaded, -and then fire up the server. You may also have to add -$Config{bin} to your PATH environment variable. +in the section where other apache modules are loaded. +You should also either have a directive 'PerlModule Apache2' +in httpd.conf or put in a 'use Apache2 ();' in a startup +script. You may also have to add $Config{bin} +to your PATH environment variable. For more information, visit http://perl.apache.org/. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/os/win32 mpinstall
randyk 2003/07/06 18:27:36 Modified:src/docs/1.0/os/win32 mpinstall src/docs/2.0/os/win32 mpinstall Log: some cleanup of the mpinstall script. Revision ChangesPath 1.7 +33 -33modperl-docs/src/docs/1.0/os/win32/mpinstall Index: mpinstall === RCS file: /home/cvs/modperl-docs/src/docs/1.0/os/win32/mpinstall,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- mpinstall 6 Jul 2003 17:33:18 - 1.6 +++ mpinstall 7 Jul 2003 01:27:36 - 1.7 @@ -14,7 +14,6 @@ use Config; use Safe; use Digest::MD5; -use IO::File; require Win32; require File::Spec; @@ -118,7 +117,7 @@ # set appropriate ppd and tar.gz files if ($] < 5.008) { -$checksums = $theoryx5 . '/ppmpackages/x86/' . $cs; +$checksums = $ppmpackagesx86 . $cs; if ($apache2) { die 'No mod_perl 2 package available for this perl version'; } @@ -140,7 +139,7 @@ } } else { -$checksums = $theoryx5 . '/ppms/x86/' . $cs; +$checksums = $ppmsx86 . $cs; if ($apache2) { $ppdfile = 'mod_perl.ppd'; $tgzfile = 'mod_perl.tar.gz'; @@ -186,34 +185,30 @@ print "Fetching $checksums ..."; getstore($checksums, $cs); print " done!\n"; +die "Failed to fetch $checksums" unless -e $cs; -# check CHECKSUMS for the tar.gz file -if (-e $cs) { -unless (verifyMD5($tgzfile)) { -die qq{CHECKSUM check for "$tgzfile" failed.\n}; -} -unless (verifyMD5($so_fake)) { -die qq{CHECKSUM check for "$so_fake" failed.\n}; -} -rename($so_fake, $so) or die "Rename of $so_fake to $so failed: $!"; -} -else { -die "Failed to fetch $checksums - cannot verify CHECKSUMS."; -} +# check CHECKSUMS for the tar.gz and so files +my $cksum = load_cs($cs); +die "Could not load $cs: $!" unless $cksum; +die qq{CHECKSUM check for "$tgzfile" failed.\n} +unless (verifyMD5($cksum, $tgzfile)); +die qq{CHECKSUM check for "$so_fake" failed.\n} +unless (verifyMD5($cksum, $so_fake)); +rename($so_fake, $so) or die "Rename of $so_fake to $so failed: $!"; # edit the ppd file to reflect a local installation my $old = $ppdfile . '.old'; -rename $ppdfile, $old +rename ($ppdfile, $old) or die "renaming $ppdfile to $old failed: $!"; -open(OLD, $old) or die "Cannot open $old: $!"; -open(NEW, ">$ppdfile") or die "Cannot open $ppdfile: $!"; -while () { +open(my $oldfh, $old) or die "Cannot open $old: $!"; +open(my $newfh, ">$ppdfile") or die "Cannot open $ppdfile: $!"; +while (<$oldfh>) { next if /new; -my $cksum; + +sub load_cs { +my $cs = shift; +my ($cksum, $fh); unless (open $fh, $cs) { warn "Could not open $cs: $!"; return; @@ -299,18 +294,23 @@ warn $@; return; } -my ($is, $should); -unless (open(FILE, $file)) { +return $cksum; +} + +sub verifyMD5 { +my ($cksum, $file) = @_; +my ($fh, $is, $should); +unless (open($fh, $file)) { warn "Cannot open $file: $!"; return; } -binmode(FILE); -unless ($is = Digest::MD5->new->addfile(*FILE)->hexdigest) { +binmode($fh); +unless ($is = Digest::MD5->new->addfile($fh)->hexdigest) { warn "Could not compute checksum for $file: $!"; -close(FILE); +close($fh); return; } -close(FILE); +close($fh); if ($should = $cksum->{$file}->{md5}) { my $test = $is eq $should ? 1 : 0; printf qq{Checksum for "$file" is %s\n}, 1.7 +33 -33modperl-docs/src/docs/2.0/os/win32/mpinstall Index: mpinstall === RCS file: /home/cvs/modperl-docs/src/docs/2.0/os/win32/mpinstall,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- mpinstall 6 Jul 2003 17:33:18 - 1.6 +++ mpinstall 7 Jul 2003 01:27:36 - 1.7 @@ -14,7 +14,6 @@ use Config; use Safe; use Digest::MD5; -use IO::File; require Win32; require File::Spec; @@ -118,7 +117,7 @@ # set appropriate ppd and tar.gz files if ($] < 5.008) { -$checksums = $theoryx5 . '/ppmpackages/x86/' . $cs; +$checksums = $ppmpackagesx86 . $cs; if ($apache2) { die 'No mod_perl 2 package available for this perl version'; } @@ -140,7 +139,7 @@ } } else { -$checksums = $theoryx5 . '/ppms/x86/' . $cs; +$checksums = $ppmsx86 . $cs; if ($apache2) { $ppdfile = 'mod_perl.ppd'; $tgzfile = 'mod_perl.tar.gz'; @@ -186,34 +185,30 @@ print "Fetching $checksums ..."; getstore($checksums, $cs); print " done!\n"; +die "Failed to fetch $che
cvs commit: modperl-docs/src/docs/2.0/os/win32 mpinstall
randyk 2003/05/30 20:04:55 Modified:src/docs/1.0/os/win32 mpinstall src/docs/2.0/os/win32 mpinstall Log: - adjust indentation style - attempt to handle stupid Win32 long filenames Revision ChangesPath 1.4 +164 -149 modperl-docs/src/docs/1.0/os/win32/mpinstall Index: mpinstall === RCS file: /home/cvs/modperl-docs/src/docs/1.0/os/win32/mpinstall,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- mpinstall 31 Dec 2002 23:25:01 - 1.3 +++ mpinstall 31 May 2003 03:04:55 - 1.4 @@ -1,3 +1,4 @@ +#!C:/Perl/bin # # A Perl script to fetch and install via ppm mod_perl on Win32 # Copyright 2002, by Randy Kobes. @@ -16,6 +17,7 @@ use Safe; use Digest::MD5; use IO::File; +require Win32; die "This only works for Win32" unless $^O =~ /Win32/i; die "No mod_perl ppm package available for this Perl" if ($] < 5.006001); @@ -24,124 +26,125 @@ # find a possible Apache2 directory APACHE2: { - for my $drive ('C'..'G') { -for my $p ('Apache2', 'Program files/Apache2', -'Program Files/Apache Group/Apache2') { - if (-d "$drive:/$p") { - $apache2 = "$drive:/$p"; - last APACHE2; - } +for my $drive ('C'..'G') { +for my $p ('Apache2', 'Program files/Apache2', + 'Program Files/Apache Group/Apache2') { +if (-d "$drive:/$p") { +$apache2 = "$drive:/$p"; +last APACHE2; +} +} } - } } if ($apache2) { - my $ans = prompt(qq{Install mod_perl-2 for "$apache2"?}, 'yes'); - $apache2 = undef unless ($ans =~ /^y/i); +$apache2 = fix_path($apache2); +my $ans = prompt(qq{Install mod_perl-2 for "$apache2"?}, 'yes'); +$apache2 = undef unless ($ans =~ /^y/i); } # if no Apache2, try to find Apache1 unless ($apache2) { - APACHE: { -for my $drive ('C'..'G') { - for my $p ('Apache', 'Program Files/Apache', - 'Program Files/Apache Group/Apache') { - if (-d "$drive:/$p") { - $apache = "$drive:/$p"; - last APACHE; - } - } + APACHE: { +for my $drive ('C'..'G') { +for my $p ('Apache', 'Program Files/Apache', + 'Program Files/Apache Group/Apache') { +if (-d "$drive:/$p") { +$apache = "$drive:/$p"; +last APACHE; +} +} +} } - } } if ($apache) { - my $ans = prompt(qq{Install mod_perl-1 for "$apache"?}, 'yes'); - $apache = undef unless ($ans =~ /^y/i); +$apache = fix_path($apache); +my $ans = prompt(qq{Install mod_perl-1 for "$apache"?}, 'yes'); +$apache = undef unless ($ans =~ /^y/i); } # check Apache versions if ($apache or $apache2) { - my $vers; - if ($apache) { -$vers = qx{"$apache\\apache.exe" -v}; -die qq{"$apache" does not appear to be version 1.3} - unless $vers =~ m!Apache/1.3!; - } - else { -$vers = qx{"$apache2\\bin\\apache.exe" -v}; -die qq{"$apache2" does not appear to be version 2.0} - unless $vers =~ m!Apache/2.0!; - } +my $vers; +if ($apache) { +$vers = qx{"$apache/apache.exe" -v}; +die qq{"$apache" does not appear to be version 1.3} +unless $vers =~ m!Apache/1.3!; +} +else { +$vers = qx{"$apache2/bin/apache.exe" -v}; +die qq{"$apache2" does not appear to be version 2.0} +unless $vers =~ m!Apache/2.0!; +} } - # prompt to get an Apache installation directory else { - my $dir = prompt("Where is your apache installation directory?", ''); - die 'Need to specify the Apache installation directory' unless $dir; - die qq{"$dir" does not exist} unless (-d $dir); - if ($dir =~ /Apache2/) { -my $ans = prompt(qq{Install mod_perl-2 for "$dir"?}, 'yes'); -$apache2 = $dir if ($ans =~ /^y/i); - } - else { -my $ans = prompt(qq{Install mod_perl-1 for "$dir"?}, 'yes'); -$apache = $dir if ($ans =~ /^y/i); - } - unless ($apache or $apache2) { -my $mpv = prompt('Which mod_perl version would you like [1 or 2]?', 2); -if ($mpv == 1) { - $apache = $dir; -} -elsif ($mpv == 2) { - $apache2 = $dir; +my $dir = prompt("Where is your apache installation directory?", ''); +die 'Need to specify the Apache installation directory' unless $dir; +$dir = fix_path($dir); +die qq{"$dir" does not exist} unless (-d $dir); +if ($dir =~ /Apache2/) { +my $ans = prompt(qq{Install mod_perl-2 for "$dir"?}, 'yes'); +$apache2 = $dir if ($ans =~
cvs commit: modperl-docs/src/docs/2.0/os/win32 mpinstall
randyk 2002/12/31 15:25:01 Modified:src/docs/1.0/os/win32 mpinstall src/docs/2.0/os/win32 mpinstall Log: s/warn/die/ Revision ChangesPath 1.3 +4 -4 modperl-docs/src/docs/1.0/os/win32/mpinstall Index: mpinstall === RCS file: /home/cvs/modperl-docs/src/docs/1.0/os/win32/mpinstall,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mpinstall 31 Dec 2002 22:59:48 - 1.2 +++ mpinstall 31 Dec 2002 23:25:01 - 1.3 @@ -163,11 +163,11 @@ # check CHECKSUMS for the tar.gz file if (-e $cs) { unless (verifyMD5($tgzfile)) { -print qq{CHECKSUM check for "$tgzfile" failed.\n}; +die qq{CHECKSUM check for "$tgzfile" failed.\n}; } } else { - warn "Failed to fetch $checksums - will not verify CHECKSUMS."; + die "Failed to fetch $checksums - cannot verify CHECKSUMS."; } # edit the ppd file to reflect a local installation @@ -258,8 +258,8 @@ my $file = shift; my $fh = IO::File->new; my $cksum; - unless (open $fh, 'CHECKSUMS') { -warn "Could not open CHECKSUMS: $!"; + unless (open $fh, $cs) { +warn "Could not open $cs: $!"; return; } local($/); 1.3 +4 -4 modperl-docs/src/docs/2.0/os/win32/mpinstall Index: mpinstall === RCS file: /home/cvs/modperl-docs/src/docs/2.0/os/win32/mpinstall,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mpinstall 31 Dec 2002 22:59:48 - 1.2 +++ mpinstall 31 Dec 2002 23:25:01 - 1.3 @@ -163,11 +163,11 @@ # check CHECKSUMS for the tar.gz file if (-e $cs) { unless (verifyMD5($tgzfile)) { -print qq{CHECKSUM check for "$tgzfile" failed.\n}; +die qq{CHECKSUM check for "$tgzfile" failed.\n}; } } else { - warn "Failed to fetch $checksums - will not verify CHECKSUMS."; + die "Failed to fetch $checksums - cannot verify CHECKSUMS."; } # edit the ppd file to reflect a local installation @@ -258,8 +258,8 @@ my $file = shift; my $fh = IO::File->new; my $cksum; - unless (open $fh, 'CHECKSUMS') { -warn "Could not open CHECKSUMS: $!"; + unless (open $fh, $cs) { +warn "Could not open $cs: $!"; return; } local($/); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: modperl-docs/src/docs/2.0/os/win32 mpinstall
randyk 2002/12/31 14:59:48 Modified:src/docs/1.0/os/win32 mpinstall src/docs/2.0/os/win32 mpinstall Log: added checksums check Revision ChangesPath 1.2 +66 -3 modperl-docs/src/docs/1.0/os/win32/mpinstall Index: mpinstall === RCS file: /home/cvs/modperl-docs/src/docs/1.0/os/win32/mpinstall,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- mpinstall 21 Dec 2002 07:26:16 - 1.1 +++ mpinstall 31 Dec 2002 22:59:48 - 1.2 @@ -13,6 +13,9 @@ use Compress::Zlib; use File::Copy; use Config; +use Safe; +use Digest::MD5; +use IO::File; die "This only works for Win32" unless $^O =~ /Win32/i; die "No mod_perl ppm package available for this Perl" if ($] < 5.006001); @@ -100,10 +103,12 @@ die 'Please specify an Apache directory' unless ($apache or $apache2); my $theoryx5 = 'http://theoryx5.uwinnipeg.ca'; -my ($ppd, $tgz, $ppdfile, $tgzfile); +my ($ppd, $tgz, $ppdfile, $tgzfile, $checksums); +my $cs = 'CHECKSUMS'; # set appropriate ppd and tar.gz files if ($] < 5.008) { + $checksums = $theoryx5 . '/ppmpackages/x86/' . $cs; if ($apache2) { $ppdfile = 'mod_perl-2.ppd'; $tgzfile = 'mod_perl-2.tar.gz'; @@ -111,7 +116,7 @@ $tgz = $theoryx5 . '/ppmpackages/x86/' . $tgzfile; } else { -my $ans = prompt('Do you need EAPI support for mod_ssl?', 'no'); + my $ans = prompt('Do you need EAPI support for mod_ssl?', 'no'); if ($ans =~ /^n/i) { $ppdfile = 'mod_perl.ppd'; $tgzfile = 'mod_perl.tar.gz'; @@ -127,6 +132,7 @@ } } else { + $checksums = $theoryx5 . '/ppms/x86/' . $cs; if ($apache2) { $ppdfile = 'mod_perl.ppd'; $tgzfile = 'mod_perl.tar.gz'; @@ -150,6 +156,19 @@ getstore($tgz, $tgzfile); print " done!\n"; die "Failed to fetch $tgz" unless -e $tgzfile; +print "Fetching $checksums ..."; +getstore($checksums, $cs); +print " done!\n"; + +# check CHECKSUMS for the tar.gz file +if (-e $cs) { + unless (verifyMD5($tgzfile)) { +print qq{CHECKSUM check for "$tgzfile" failed.\n}; + } +} +else { + warn "Failed to fetch $checksums - will not verify CHECKSUMS."; +} # edit the ppd file to reflect a local installation my $old = $ppdfile . 'old'; @@ -205,7 +224,7 @@ # clean up, if desired my $ans = prompt("Remove temporary installation files from $tmp?", 'yes'); if ($ans =~ /^y/i) { - unlink ($ppdfile, $old, $tgzfile) + unlink ($ppdfile, $old, $tgzfile, $cs) or warn "Cannot unlink files from $tmp: $!"; } @@ -232,3 +251,47 @@ For more information, visit http://perl.apache.org/. END + +# routine to verify the CHECKSUMS for a file +# adapted from the MD5 check of CPAN.pm +sub verifyMD5 { + my $file = shift; + my $fh = IO::File->new; + my $cksum; + unless (open $fh, 'CHECKSUMS') { +warn "Could not open CHECKSUMS: $!"; +return; + } + local($/); + my $eval = <$fh>; + $eval =~ s/\015?\012/\n/g; + close $fh; + my $comp = Safe->new(); + $cksum = $comp->reval($eval); + if ($@) { +warn $@; +return; + } + my ($is, $should); + unless (open(FILE, $file)) { +warn "Cannot open $file: $!"; +return; + } + binmode(FILE); + unless ($is = Digest::MD5->new->addfile(*FILE)->hexdigest) { +warn "Could not compute checksum for $file: $!"; +close(FILE); +return; + } + close(FILE); + if ($should = $cksum->{$file}->{md5}) { +my $test = $is eq $should ? 1 : 0; +printf qq{Checksum for "$file" is %s\n}, + ($test == 1) ? 'OK.' : 'NOT OK.'; +return $test; + } + else { +warn "Checksum data for $file not present in CHECKSUMS.\n"; +return; + } +} 1.2 +66 -3 modperl-docs/src/docs/2.0/os/win32/mpinstall Index: mpinstall === RCS file: /home/cvs/modperl-docs/src/docs/2.0/os/win32/mpinstall,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- mpinstall 21 Dec 2002 07:26:16 - 1.1 +++ mpinstall 31 Dec 2002 22:59:48 - 1.2 @@ -13,6 +13,9 @@ use Compress::Zlib; use File::Copy; use Config; +use Safe; +use Digest::MD5; +use IO::File; die "This only works for Win32" unless $^O =~ /Win32/i; die "No mod_perl ppm package available for this Perl" if ($] < 5.006001); @@ -100,10 +103,12 @@ die 'Please specify an Apache directory' unless ($apache or $apache2); my $theoryx5 = 'http://theoryx5.uwinnipeg.ca'; -my ($ppd, $tgz, $ppdfile, $tgzfile); +my ($ppd, $tgz, $ppdfile, $tgzfile, $checksums); +my $cs = 'CHECKSUMS'; # set appropriate ppd and tar.gz files if ($] < 5.008) { + $checksums = $theoryx5 . '/ppmpa
cvs commit: modperl-docs/src/docs/2.0/os/win32 mpinstall config.cfg install.pod
randyk 2002/12/20 23:26:16 Modified:src/docs/1.0/os/win32 config.cfg install.pod src/docs/2.0/os/win32 config.cfg install.pod Added: src/docs/1.0/os/win32 mpinstall src/docs/2.0/os/win32 mpinstall Log: added script to get and fetch mod_perl on Win32 via ppm. Revision ChangesPath 1.7 +4 -0 modperl-docs/src/docs/1.0/os/win32/config.cfg Index: config.cfg === RCS file: /home/cvs/modperl-docs/src/docs/1.0/os/win32/config.cfg,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- config.cfg22 Jul 2002 15:21:51 - 1.6 +++ config.cfg21 Dec 2002 07:26:16 - 1.7 @@ -15,6 +15,10 @@ multithread.pod )], +copy_glob => [qw( +mpinstall +)], + changes => 'Changes.pod', ); 1.15 +9 -2 modperl-docs/src/docs/1.0/os/win32/install.pod Index: install.pod === RCS file: /home/cvs/modperl-docs/src/docs/1.0/os/win32/install.pod,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- install.pod 19 Dec 2002 18:59:25 - 1.14 +++ install.pod 21 Dec 2002 07:26:16 - 1.15 @@ -262,8 +262,15 @@ After installing Perl and Apache, you can then install mod_perl via the PPM utility. ActiveState does not maintain mod_perl in their ppm repository, so you must get it from a different location other than -ActiveState's site. One way is simply as (broken over two lines for -readability) +ActiveState's site. A quick way to do this is to download +the script F and save it as, for example, I. +Invoking this as C on a command line +will take you through a dialogue, based on your configuration, +which will determine and install, via C, the desired +mod_perl ppm package. + +The direct way to install mod_perl via ppm is simply as (broken over +two lines for readability) C:\> ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/mod_perl.ppd 1.1 modperl-docs/src/docs/1.0/os/win32/mpinstall Index: mpinstall === # # A Perl script to fetch and install via ppm mod_perl on Win32 # Copyright 2002, by Randy Kobes. # This script may be distributed under the same terms as Perl itself. # Please report problems to Randy Kobes <[EMAIL PROTECTED]> # use strict; use warnings; use ExtUtils::MakeMaker; use LWP::Simple; use Archive::Tar; use Compress::Zlib; use File::Copy; use Config; die "This only works for Win32" unless $^O =~ /Win32/i; die "No mod_perl ppm package available for this Perl" if ($] < 5.006001); my ($apache2, $apache); # find a possible Apache2 directory APACHE2: { for my $drive ('C'..'G') { for my $p ('Apache2', 'Program files/Apache2', 'Program Files/Apache Group/Apache2') { if (-d "$drive:/$p") { $apache2 = "$drive:/$p"; last APACHE2; } } } } if ($apache2) { my $ans = prompt(qq{Install mod_perl-2 for "$apache2"?}, 'yes'); $apache2 = undef unless ($ans =~ /^y/i); } # if no Apache2, try to find Apache1 unless ($apache2) { APACHE: { for my $drive ('C'..'G') { for my $p ('Apache', 'Program Files/Apache', 'Program Files/Apache Group/Apache') { if (-d "$drive:/$p") { $apache = "$drive:/$p"; last APACHE; } } } } } if ($apache) { my $ans = prompt(qq{Install mod_perl-1 for "$apache"?}, 'yes'); $apache = undef unless ($ans =~ /^y/i); } # check Apache versions if ($apache or $apache2) { my $vers; if ($apache) { $vers = qx{"$apache\\apache.exe" -v}; die qq{"$apache" does not appear to be version 1.3} unless $vers =~ m!Apache/1.3!; } else { $vers = qx{"$apache2\\bin\\apache.exe" -v}; die qq{"$apache2" does not appear to be version 2.0} unless $vers =~ m!Apache/2.0!; } } # prompt to get an Apache installation directory else { my $dir = prompt("Where is your apache installation directory?", ''); die 'Need to specify the Apache installation directory' unless $dir; die qq{"$dir" does not exist} unless (-d $dir); if ($dir =~ /Apache2/) { my $ans = prompt(qq{Install mod_perl-2 for "$dir"?}, 'yes'); $apache2 = $dir if ($ans =~ /^y/i); } else { my $ans = prompt(qq{Install mod_perl-1 for "$dir"?}, 'yes'); $apache = $dir if ($ans =~ /^y/i); } unless ($apache or $apache2) { my $mpv = prompt('Which mod_p