This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 31 Jul 2003 12:55:18 +0000 (12:55 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 31 Jul 2003 12:55:18 +0000 (12:55 +0000)
[ 20375]
We are change #20316 ahead of 1.75.

[ 20376]
Document the requirements for Module::Signature a bit.

[ 20377]
This test is pretty useless as it stands.

[ 20378]
The new PKI system is far too untested and rough yet
(think machines with no network, machines behind firewalls,
corporate and national encryption policies).  It cannot be
considered useable at this stage.

Therefore, create a fake CPAN 1.76.

[ 20379]
One more tweak for Mac OS X hints.
p4raw-link: @20379 on //depot/perl: c975d1a7a67c2dcfc5a992d06062de15cd9f8637
p4raw-link: @20378 on //depot/perl: 1dbacee72dc80ba3a07d2545c93bd4d46320c9fd
p4raw-link: @20377 on //depot/perl: f95c1422fa7828234ba339bc73e753677504f145
p4raw-link: @20376 on //depot/perl: 6a7bdc5005c252a20f424cac9c83b7df16348f9b
p4raw-link: @20375 on //depot/perl: c702939b2ffaa3ae28a86c43f65aa96451cca994
p4raw-link: @20316 on //depot/perl: 7b64e2de96f86540b6a77752a8a80ad714f1f7b6

p4raw-id: //depot/maint-5.8/perl@20380
p4raw-deleted: from //depot/perl@20374 'delete in'
lib/CPAN/t/signature.t (@20294..)
p4raw-integrated: from //depot/perl@20374 'copy in' lib/CPAN.pm
(@20316..) 'merge in' MANIFEST (@20366..) hints/darwin.sh
(@20369..)

MANIFEST
hints/darwin.sh
lib/CPAN.pm
lib/CPAN/t/signature.t [deleted file]

index 26f56d8..88cc77f 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1051,7 +1051,6 @@ lib/CPAN/Nox.pm                   Runs CPAN while avoiding compiled extensions
 lib/CPAN/t/loadme.t            See if CPAN the module works
 lib/CPAN/t/mirroredby.t                See if CPAN::Mirrored::By works
 lib/CPAN/t/Nox.t               See if CPAN::Nox works
-lib/CPAN/t/signature.t         See if CPAN signatures work
 lib/CPAN/t/vcmp.t              See if CPAN the module works
 lib/ctime.pl                   A ctime workalike
 lib/Cwd.pm                     Various cwd routines (getcwd, fastcwd, chdir)
index 55acede..c0cd5a0 100644 (file)
@@ -44,8 +44,8 @@ case "$prefix" in
        man1dir='/usr/share/man/man1';
        man3dir='/usr/share/man/man3';
        # But users' installs shouldn't touch the system man pages.
-       installsiteman1='/usr/local/share/man/man1';
-       installsiteman3='/usr/local/share/man/man3';
+       siteman1='/usr/local/share/man/man1';
+       siteman3='/usr/local/share/man/man3';
        ;;
   *)   # Anything else; use non-system directories, use Configure defaults
        ;;
index 28665a8..a7f3a64 100644 (file)
@@ -1,11 +1,11 @@
 # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*-
 package CPAN;
-$VERSION = '1.74_01';
-# $Id: CPAN.pm,v 1.409 2003/07/28 22:07:23 k Exp $
+$VERSION = '1.76';
+# $Id: CPAN.pm,v 1.405 2003/07/04 08:06:11 k Exp $
 
 # only used during development:
 $Revision = "";
-# $Revision = "[".substr(q$Revision: 1.409 $, 10)."]";
+# $Revision = "[".substr(q$Revision: 1.405 $, 10)."]";
 
 use Carp ();
 use Config ();
@@ -773,16 +773,6 @@ sub has_inst {
 
 });
        sleep 2;
-    } elsif ($mod eq "Module::Signature"){
-       # No point in complaining unless the user can reasonably install it.
-       if (eval { require Crypt::OpenPGP; 1 } or
-           defined $CPAN::Config->{'gpg'}) {
-           $CPAN::Frontend->myprint(qq{
-  CPAN: Module::Signature security checks disabled because Module::Signature
-  not installed.  Please consider installing the Module::Signature module.
-});
-           sleep 2;
-       }
     } else {
        delete $INC{$file}; # if it inc'd LWP but failed during, say, URI
     }
@@ -3669,18 +3659,6 @@ sub dir_listing {
     my $lc_want =
        File::Spec->catfile($CPAN::Config->{keep_source_where},
                            "authors", "id", @$chksumfile);
-
-    my $fh;
-
-    # Purge and refetch old (pre-PGP) CHECKSUMS; they are a security
-    # hazard.  (Without GPG installed they are not that much better,
-    # though.)
-    $fh = FileHandle->new;
-    if (open($fh, $lc_want)) {
-       my $line = <$fh>; close $fh;
-       unlink($lc_want) unless $line =~ /PGP/;
-    }
-
     local($") = "/";
     # connect "force" argument with "index_expire".
     my $force = 0;
@@ -3703,7 +3681,7 @@ sub dir_listing {
     }
 
     # adapted from CPAN::Distribution::MD5_check_file ;
-    $fh = FileHandle->new;
+    my $fh = FileHandle->new;
     my($cksum);
     if (open $fh, $lc_file){
        local($/);
@@ -3983,44 +3961,9 @@ sub get {
     }
 
     $self->{'build_dir'} = $packagedir;
-    $self->safe_chdir($builddir);
+    $self->safe_chdir(File::Spec->updir);
     File::Path::rmtree("tmp");
 
-    $self->safe_chdir($packagedir);
-    if ($CPAN::META->has_inst("Module::Signature")) {
-        if (-f "SIGNATURE") {
-            $self->debug("Module::Signature is installed, verifying") if $CPAN::DEBUG;
-            my $rv = Module::Signature::verify();
-            if ($rv != Module::Signature::SIGNATURE_OK() and
-                $rv != Module::Signature::SIGNATURE_MISSING()) {
-                $CPAN::Frontend->myprint(
-                                         qq{\nSignature invalid for }.
-                                         qq{distribution file. }.
-                                         qq{Please investigate.\n\n}.
-                                         $self->as_string,
-                                         $CPAN::META->instance(
-                                                               'CPAN::Author',
-                                                               $self->cpan_userid,
-                                                              )->as_string
-                                        );
-
-                my $wrap = qq{I\'d recommend removing $self->{localfile}. Its signature
-is invalid. Maybe you have configured your 'urllist' with
-a bad URL. Please check this array with 'o conf urllist', and
-retry.};
-                $CPAN::Frontend->mydie(Text::Wrap::wrap("","",$wrap));
-            }
-        } else {
-            $CPAN::Frontend->myprint(qq{Package came without SIGNATURE\n\n});
-        }
-    } else {
-       $self->debug("Module::Signature is NOT installed") if $CPAN::DEBUG;
-    }
-    $self->safe_chdir($builddir);
-    return if $CPAN::Signal;
-
-
-
     my($mpl) = File::Spec->catfile($packagedir,"Makefile.PL");
     my($mpl_exists) = -f $mpl;
     unless ($mpl_exists) {
@@ -4288,44 +4231,10 @@ sub verifyMD5 {
     $self->MD5_check_file($lc_file);
 }
 
-sub SIG_check_file {
-    my($self,$chk_file) = @_;
-    my $rv = eval { Module::Signature::_verify($chk_file) };
-
-    if ($rv == Module::Signature::SIGNATURE_OK()) {
-       $CPAN::Frontend->myprint("Signature for $chk_file ok\n");
-       return $self->{SIG_STATUS} = "OK";
-    } else {
-       $CPAN::Frontend->myprint(qq{\nSignature invalid for }.
-                                qq{distribution file. }.
-                                qq{Please investigate.\n\n}.
-                                $self->as_string,
-                               $CPAN::META->instance(
-                                                       'CPAN::Author',
-                                                       $self->cpan_userid
-                                                       )->as_string);
-
-       my $wrap = qq{I\'d recommend removing $chk_file. Its signature
-is invalid. Maybe you have configured your 'urllist' with
-a bad URL. Please check this array with 'o conf urllist', and
-retry.};
-
-       $CPAN::Frontend->mydie(Text::Wrap::wrap("","",$wrap));
-    }
-}
-
 #-> sub CPAN::Distribution::MD5_check_file ;
 sub MD5_check_file {
     my($self,$chk_file) = @_;
     my($cksum,$file,$basename);
-
-    if ($CPAN::META->has_inst("Module::Signature") and Module::Signature->VERSION >= 0.26) {
-       $self->debug("Module::Signature is installed, verifying");
-       $self->SIG_check_file($chk_file);
-    } else {
-       $self->debug("Module::Signature is NOT installed");
-    }
-
     $file = $self->{localfile};
     $basename = File::Basename::basename($file);
     my $fh = FileHandle->new;
diff --git a/lib/CPAN/t/signature.t b/lib/CPAN/t/signature.t
deleted file mode 100644 (file)
index cf81f88..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- mode: cperl -*-
-
-use strict;
-print "1..1\n";
-
-if (!eval { require Module::Signature; 1 }) {
-  print "ok 1 # skip - no Module::Signature found\n";
-}
-elsif (!eval { require Socket; Socket::inet_aton('pgp.mit.edu') }) {
-  print "ok 1 # skip - Cannot connect to the keyserver";
-}
-else {
-  (Module::Signature::verify() == Module::Signature::SIGNATURE_OK())
-      or print "not ";
-  print "ok 1 # Valid signature\n";
-}