perl port 5.8.2 won't install?

Len Conrad LConrad at Go2France.com
Wed Jun 23 14:51:17 PDT 2004


fbsd 4.10 release

# cd /usr/ports/lang/perl5.8

# make && make install

===>  Vulnerability check disabled
 >> perl-5.8.2.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
 >> Attempting to fetch from 
http://www.cpan.dk/CPAN/modules/by-module/../../src/.
perl-5.8.2.tar.gz                             100% of   11 MB  264 kBps 00m00s
 >> BSDPAN-5.8.0_1.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
 >> Attempting to fetch from 
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/tobez/.
BSDPAN-5.8.0_1.tar.gz                         100% of 6338  B   36 kBps
===>  Extracting for perl-5.8.2_5
 >> Checksum OK for perl-5.8.2.tar.gz.
 >> Checksum OK for BSDPAN-5.8.0_1.tar.gz.
===>  Patching for perl-5.8.2_5
===>  Applying FreeBSD patches for perl-5.8.2_5
8 out of 8 hunks failed--saving rejects to ext/Opcode/Safe.pm.rej
 >> Patch patch-Safe.pm failed to apply cleanly.
 >> Patch(es) patch-Install.pm patch-MM_Unix.pm applied cleanly.
*** Error code 1

the .rej file contains:

# less /usr/ports/lang/perl5.8/work/perl-5.8.2/ext/Opcode/Safe.pm.rej
***************
*** 3,9 ****
   use 5.003_11;
   use strict;

- our $VERSION = "2.07";

   use Carp;

--- 3,9 ----
   use 5.003_11;
   use strict;

+ $Safe::VERSION = "2.09";

   use Carp;

***************
*** 47,53 ****
       # the whole glob *_ rather than $_ and @_ separately, otherwise
       # @_ in non default packages within the compartment don't work.
       $obj->share_from('main', $default_share);
-     Opcode::_safe_pkg_prep($obj->{Root});
       return $obj;
   }

--- 47,53 ----
       # the whole glob *_ rather than $_ and @_ separately, otherwise
       # @_ in non default packages within the compartment don't work.
       $obj->share_from('main', $default_share);
+     Opcode::_safe_pkg_prep($obj->{Root}) if($Opcode::VERSION > 1.04);
       return $obj;
   }

***************
*** 155,161 ****
       my $no_record = shift || 0;
       my $root = $obj->root();
       croak("vars not an array ref") unless ref $vars eq 'ARRAY';
-       no strict 'refs';
       # Check that 'from' package actually exists
       croak("Package \"$pkg\" does not exist")
         unless keys %{"$pkg\::"};
--- 155,161 ----
       my $no_record = shift || 0;
       my $root = $obj->root();
       croak("vars not an array ref") unless ref $vars eq 'ARRAY';
+     no strict 'refs';
       # Check that 'from' package actually exists
       croak("Package \"$pkg\" does not exist")
         unless keys %{"$pkg\::"};
***************
*** 190,196 ****
   sub share_redo {
       my $obj = shift;
       my $shares = \%{$obj->{Shares} ||= {}};
-       my($var, $pkg);
       while(($var, $pkg) = each %$shares) {
         # warn "share_redo $pkg\:: $var";
         $obj->share_from($pkg,  [ $var ], 1);
--- 190,196 ----
   sub share_redo {
       my $obj = shift;
       my $shares = \%{$obj->{Shares} ||= {}};
+     my($var, $pkg);
       while(($var, $pkg) = each %$shares) {
         # warn "share_redo $pkg\:: $var";
         $obj->share_from($pkg,  [ $var ], 1);
***************
*** 214,224 ****
       # Create anon sub ref in root of compartment.
       # Uses a closure (on $expr) to pass in the code to be executed.
       # (eval on one line to keep line numbers as expected by caller)
-       my $evalcode = sprintf('package %s; sub { eval $expr; }', $root);
       my $evalsub;

-       if ($strict) { use strict; $evalsub = eval $evalcode; }
-       else         {  no strict; $evalsub = eval $evalcode; }

       return Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub);
   }
--- 214,224 ----
       # Create anon sub ref in root of compartment.
       # Uses a closure (on $expr) to pass in the code to be executed.
       # (eval on one line to keep line numbers as expected by caller)
+     my $evalcode = sprintf('package %s; sub { @_ = (); eval $expr; }', 
$root);
       my $evalsub;

+     if ($strict) { use strict; $evalsub = eval $evalcode; }
+     else         {  no strict; $evalsub = eval $evalcode; }

       return Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub);
   }
***************
*** 228,234 ****
       my $root = $obj->{Root};

       my $evalsub = eval
-           sprintf('package %s; sub { do $file }', $root);
       return Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub);
   }

--- 228,234 ----
       my $root = $obj->{Root};

       my $evalsub = eval
+           sprintf('package %s; sub { @_ = (); do $file }', $root);
       return Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub);
   }

***************
*** 383,390 ****
   This is almost identical to exporting variables using the L<Exporter>
   module.

- Each NAME must be the B<name> of a variable, typically with the leading
- type identifier included. A bareword is treated as a function name.

   Examples of legal names are '$foo' for a scalar, '@foo' for an
   array, '%foo' for a hash, '&foo' or 'foo' for a subroutine and '*foo'
--- 383,391 ----
   This is almost identical to exporting variables using the L<Exporter>
   module.

+ Each NAME must be the B<name> of a non-lexical variable, typically
+ with the leading type identifier included. A bareword is treated as a
+ function name.

   Examples of legal names are '$foo' for a scalar, '@foo' for an
   array, '%foo' for a hash, '&foo' or 'foo' for a subroutine and '*foo'
***************
*** 426,432 ****
   Any attempt by the code in STRING to use an operator which is not permitted
   by the compartment will cause an error (at run-time of the main program
   but at compile-time for the code in STRING).  The error is of the form
- "%s trapped by operation mask operation...".

   If an operation is trapped in this way, then the code in STRING will
   not be executed. If such a trapped operation occurs or any other
--- 427,433 ----
   Any attempt by the code in STRING to use an operator which is not permitted
   by the compartment will cause an error (at run-time of the main program
   but at compile-time for the code in STRING).  The error is of the form
+ "'%s' trapped by operation mask...".

   If an operation is trapped in this way, then the code in STRING will
   not be executed. If such a trapped operation occurs or any other

thanks
Len



More information about the freebsd-questions mailing list