summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorAndrew Fresh <afresh1@cvs.openbsd.org>2016-12-11 18:45:01 +0000
committerAndrew Fresh <afresh1@cvs.openbsd.org>2016-12-11 18:45:01 +0000
commitbf79cea5e83a085f01303d96a20b5bd4775f6728 (patch)
treec0cc6c59f53c6f19070e5a61e0c1b5c565b62250 /gnu
parentd8b55d4cf69382a2bba0e4bd08957fc9235fab7f (diff)
Create perl directories 0775 in OBJDIR
Allows user to clean up after a noperm build requested and makes sense to tb@
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm3
-rw-r--r--gnu/usr.bin/perl/cpan/Sys-Syslog/Makefile.PL41
-rw-r--r--gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Install.pm89
3 files changed, 58 insertions, 75 deletions
diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
index 48ab3bd3abf..e2f7c9ab4e7 100644
--- a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+++ b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
@@ -2005,7 +2005,8 @@ Called by init_main. Initializes PERL_*
sub init_PERM {
my($self) = shift;
- $self->{PERM_DIR} = 755 unless defined $self->{PERM_DIR};
+ my $perm_dir = $self->{PERL_CORE} ? 770 : 755;
+ $self->{PERM_DIR} = $perm_dir unless defined $self->{PERM_DIR};
$self->{PERM_RW} = 644 unless defined $self->{PERM_RW};
$self->{PERM_RWX} = 755 unless defined $self->{PERM_RWX};
diff --git a/gnu/usr.bin/perl/cpan/Sys-Syslog/Makefile.PL b/gnu/usr.bin/perl/cpan/Sys-Syslog/Makefile.PL
index 790853ce8ad..fce84965200 100644
--- a/gnu/usr.bin/perl/cpan/Sys-Syslog/Makefile.PL
+++ b/gnu/usr.bin/perl/cpan/Sys-Syslog/Makefile.PL
@@ -1,11 +1,8 @@
+use 5.005;
use strict;
-use Config;
use ExtUtils::MakeMaker;
-eval 'use ExtUtils::MakeMaker::Coverage';
use File::Copy;
-use File::Path;
use File::Spec;
-require 5.005;
# create a typemap for Perl 5.6
@@ -16,21 +13,22 @@ if ($] < 5.008) {
}
# create a lib/ dir in order to avoid warnings in Test::Distribution
-mkdir "lib", 0755;
+mkdir "lib", $ENV{PERL_CORE} ? 0770 : 0755;
# virtual paths given to EU::MM
my %virtual_path = ( 'Syslog.pm' => '$(INST_LIBDIR)/Syslog.pm' );
# detect when to use Win32::EvenLog
my (@extra_params, @extra_prereqs);
-my $use_eventlog = eval "use Win32::EventLog; 1";
-if ($use_eventlog) {
+if ($^O =~ /Win32/) {
print " * Win32::EventLog detected.\n";
my $name = "PerlLog";
push @extra_prereqs,
- Win32 => 0, "Win32::TieRegistry" => 0, "Win32::EventLog" => 0;
+ "Win32::EventLog" => 0,
+ "Win32::TieRegistry" => 0,
+ "Win32::EventLog" => 0;
$virtual_path{'win32/Win32.pm' } = '$(INST_LIBDIR)/Syslog/Win32.pm';
$virtual_path{'win32/PerlLog.dll'} = '$(INST_ARCHAUTODIR)/PerlLog.dll';
@@ -53,22 +51,9 @@ if ($use_eventlog) {
close(DLL);
}
}
-elsif ($^O =~ /Win32/) {
- print <<"NOTICE"
- *** You're running on a Win32 system, but you lack the Win32::EventLog\a
- *** module, part of the libwin32 distribution. Although Sys::Syslog can
- *** be used without Win32::EventLog, it won't be very useful except for
- *** sending remote syslog messages. If you want to log messages on the
- *** local host as well, please install libwin32 then Sys::Syslog again.
-NOTICE
-}
# detect when being built in Perl core
-if (grep { $_ eq 'PERL_CORE=1' } @ARGV) {
- push @extra_params,
- MAN3PODS => {}; # Pods will be built by installman.
-}
-else {
+if (not grep { $_ eq 'PERL_CORE=1' } @ARGV) {
push @extra_params,
DEFINE => '-DUSE_PPPORT_H';
}
@@ -76,13 +61,18 @@ else {
# on pre-5.6 Perls, add warnings::compat to the prereq modules
push @extra_prereqs, "warnings::compat" => "0.06" if $] < 5.006;
+# starting with Perl 5.11, "site" and "vendor" directories finally are
+# before "perl" (core) in @INC, thus allowing dual-life modules to be
+# updated without the need to overwrite the old version
+my $installdirs = $] < 5.011 ? "perl" : "site";
+
WriteMakefile(
NAME => 'Sys::Syslog',
LICENSE => 'perl',
AUTHOR => 'Sebastien Aperghis-Tramoni <sebastien@aperghis.net>',
VERSION_FROM => 'Syslog.pm',
ABSTRACT_FROM => 'Syslog.pm',
- INSTALLDIRS => 'perl',
+ INSTALLDIRS => $installdirs,
XSPROTOARG => '-noprototypes',
PM => \%virtual_path,
PREREQ_PM => {
@@ -99,6 +89,11 @@ WriteMakefile(
# build/test prereqs
'Test::More' => 0,
},
+ META_MERGE => {
+ resources => {
+ repository => "https://github.com/maddingue/Sys-Syslog.git",
+ },
+ },
PL_FILES => {},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Sys-Syslog-*' },
diff --git a/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Install.pm b/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Install.pm
index da583650fdf..f868086bdbf 100644
--- a/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Install.pm
+++ b/gnu/usr.bin/perl/dist/ExtUtils-Install/lib/ExtUtils/Install.pm
@@ -38,11 +38,11 @@ ExtUtils::Install - install files from here to there
=head1 VERSION
-1.55
+1.67
=cut
-$VERSION = '1.55'; # <---- dont forget to update the POD section just above this line!
+$VERSION = '1.67'; # <-- do not forget to update the POD section just above this line!
$VERSION = eval $VERSION;
=pod
@@ -57,7 +57,7 @@ ExtUtils::MakeMaker handles the installation and deinstallation of
perl modules. They are not designed as general purpose tools.
On some operating systems such as Win32 installation may not be possible
-until after a reboot has occured. This can have varying consequences:
+until after a reboot has occurred. This can have varying consequences:
removing an old DLL does not impact programs using the new one, but if
a new DLL cannot be installed properly until reboot then anything
depending on it must wait. The package variable
@@ -66,17 +66,17 @@ depending on it must wait. The package variable
is used to store this status.
-If this variable is true then such an operation has occured and
+If this variable is true then such an operation has occurred and
anything depending on this module cannot proceed until a reboot
-has occured.
+has occurred.
If this value is defined but false then such an operation has
ocurred, but should not impact later operations.
-=begin _private
-
=over
+=begin _private
+
=item _chmod($$;$)
Wrapper to chmod() for debugging and error trapping.
@@ -96,33 +96,11 @@ Dies with a special message.
=cut
my $Is_VMS = $^O eq 'VMS';
-my $Is_VMS_noefs = $Is_VMS;
my $Is_MacPerl = $^O eq 'MacOS';
my $Is_Win32 = $^O eq 'MSWin32';
my $Is_cygwin = $^O eq 'cygwin';
my $CanMoveAtBoot = ($Is_Win32 || $Is_cygwin);
-
- if( $Is_VMS ) {
- my $vms_unix_rpt;
- my $vms_efs;
- my $vms_case;
-
- if (eval { local $SIG{__DIE__}; require VMS::Feature; }) {
- $vms_unix_rpt = VMS::Feature::current("filename_unix_report");
- $vms_efs = VMS::Feature::current("efs_charset");
- $vms_case = VMS::Feature::current("efs_case_preserve");
- } else {
- my $unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} || '';
- my $efs_charset = $ENV{'DECC$EFS_CHARSET'} || '';
- my $efs_case = $ENV{'DECC$EFS_CASE_PRESERVE'} || '';
- $vms_unix_rpt = $unix_rpt =~ /^[ET1]/i;
- $vms_efs = $efs_charset =~ /^[ET1]/i;
- $vms_case = $efs_case =~ /^[ET1]/i;
- }
- $Is_VMS_noefs = 0 if ($vms_efs);
- }
-
-
+my $Perm_Dir = $ENV{PERL_CORE} ? 0770 : 0755;
# *note* CanMoveAtBoot is only incidentally the same condition as below
# this needs not hold true in the future.
@@ -185,7 +163,7 @@ $target should be a ref to an array if the file is to be deleted
otherwise it should be a filespec for a rename. If the file is existing
it will be replaced.
-Sets $MUST_REBOOT to 0 to indicate a deletion operation has occured
+Sets $MUST_REBOOT to 0 to indicate a deletion operation has occurred
and sets it to 1 to indicate that a move operation has been requested.
returns 1 on success, on failure if $moan is false errors are fatal.
@@ -269,8 +247,6 @@ a derivative of the original in the same directory) so that the caller can
use it to install under. In all other cases of success returns $file.
On failure throws a fatal error.
-=back
-
=end _private
=cut
@@ -280,7 +256,14 @@ On failure throws a fatal error.
sub _unlink_or_rename { #XXX OS-SPECIFIC
my ( $file, $tryhard, $installing )= @_;
- _chmod( 0666, $file );
+ # this chmod was originally unconditional. However, its not needed on
+ # POSIXy systems since permission to unlink a file is specified by the
+ # directory rather than the file; and in fact it screwed up hard- and
+ # symlinked files. Keep it for other platforms in case its still
+ # needed there.
+ if ($^O =~ /^(dos|os2|MSWin32|VMS)$/) {
+ _chmod( 0666, $file );
+ }
my $unlink_count = 0;
while (unlink $file) { $unlink_count++; }
return $file if $unlink_count > 0;
@@ -297,7 +280,7 @@ sub _unlink_or_rename { #XXX OS-SPECIFIC
"Going to try to rename it to '$tmp'.\n";
if ( rename $file, $tmp ) {
- warn "Rename succesful. Scheduling '$tmp'\nfor deletion at reboot.\n";
+ warn "Rename successful. Scheduling '$tmp'\nfor deletion at reboot.\n";
# when $installing we can set $moan to true.
# IOW, if we cant delete the renamed file at reboot its
# not the end of the world. The other cases are more serious
@@ -310,7 +293,7 @@ sub _unlink_or_rename { #XXX OS-SPECIFIC
_move_file_at_boot( $tmp, $file );
return $tmp;
} else {
- _choke("Rename failed:$!", "Cannot procede.");
+ _choke("Rename failed:$!", "Cannot proceed.");
}
}
@@ -318,6 +301,8 @@ sub _unlink_or_rename { #XXX OS-SPECIFIC
=pod
+=back
+
=head2 Functions
=begin _private
@@ -415,7 +400,7 @@ be created first.
Returns a list, containing: C<($writable, $determined_by, @create)>
-C<$writable> says whether whether the directory is (hypothetically) writable
+C<$writable> says whether the directory is (hypothetically) writable
C<$determined_by> is the directory the status was determined from. It will be
either the C<$dir>, or one of its parents.
@@ -440,9 +425,7 @@ sub _can_write_dir {
my $path='';
my @make;
while (@dirs) {
- if ($Is_VMS_noefs) {
- # There is a bug in catdir that is fixed when the EFS character
- # set is enabled, which requires this VMS specific code.
+ if ($Is_VMS) {
$dir = File::Spec->catdir($vol,@dirs);
}
else {
@@ -520,7 +503,7 @@ sub _mkpath {
Wrapper around File::Copy::copy to handle errors.
-If $verbose is true and >1 then additional dignostics will be emitted.
+If $verbose is true and >1 then additional diagnostics will be emitted.
If $dry_run is true then the copy will not actually occur.
@@ -565,8 +548,12 @@ sub _chdir {
=pod
+=back
+
=end _private
+=over
+
=item B<install>
# deprecated forms
@@ -631,7 +618,7 @@ As of version 1.47 the following additions were made to the install interface.
Note that the new argument style and use of the %result hash is recommended.
The $always_copy parameter which when true causes files to be updated
-regardles as to whether they have changed, if it is defined but false then
+regardless as to whether they have changed, if it is defined but false then
copies are made only if the files have changed, if it is undefined then the
value of the environment variable EU_INSTALL_ALWAYS_COPY is used as default.
@@ -666,7 +653,7 @@ B<NEW ARGUMENT STYLE>
If there is only one argument and it is a reference to an array then
the array is assumed to contain a list of key-value pairs specifying
the options. In this case the option "from_to" is mandatory. This style
-means that you dont have to supply a cryptic list of arguments and can
+means that you do not have to supply a cryptic list of arguments and can
use a self documenting argument list that is easier to understand.
This is now the recommended interface to install().
@@ -790,13 +777,13 @@ sub install { #XXX OS-SPECIFIC
];
#restore the original directory we were in when File::Find
- #called us so that it doesnt get horribly confused.
+ #called us so that it doesn't get horribly confused.
_chdir($save_cwd);
}, $current_directory );
_chdir($cwd);
}
foreach my $targetdir (sort keys %check_dirs) {
- _mkpath( $targetdir, 0, 0755, $verbose, $dry_run );
+ _mkpath( $targetdir, 0, $Perm_Dir, $verbose, $dry_run );
}
foreach my $found (@found_files) {
my ($diff, $ffd, $origfile, $mode, $size, $atime, $mtime,
@@ -810,7 +797,7 @@ sub install { #XXX OS-SPECIFIC
$targetfile= _unlink_or_rename( $targetfile, 'tryhard', 'install' )
unless $dry_run;
} elsif ( ! -d $targetdir ) {
- _mkpath( $targetdir, 0, 0755, $verbose, $dry_run );
+ _mkpath( $targetdir, 0, $Perm_Dir, $verbose, $dry_run );
}
print "Installing $targetfile\n";
@@ -850,7 +837,7 @@ sub install { #XXX OS-SPECIFIC
if ($pack{'write'}) {
$dir = install_rooted_dir(dirname($pack{'write'}));
- _mkpath( $dir, 0, 0755, $verbose, $dry_run );
+ _mkpath( $dir, 0, $Perm_Dir, $verbose, $dry_run );
print "Writing $pack{'write'}\n" if $verbose;
$packlist->write(install_rooted_file($pack{'write'})) unless $dry_run;
}
@@ -863,7 +850,7 @@ sub install { #XXX OS-SPECIFIC
=item _do_cleanup
-Standardize finish event for after another instruction has occured.
+Standardize finish event for after another instruction has occurred.
Handles converting $MUST_REBOOT to a die for instance.
=end _private
@@ -1056,7 +1043,7 @@ sub uninstall {
Remove shadowed files. If $ignore is true then it is assumed to hold
a filename to ignore. This is used to prevent spurious warnings from
-occuring when doing an install at reboot.
+occurring when doing an install at reboot.
We now only die when failing to remove a file that has precedence over
our own, when our install has precedence we only warn.
@@ -1190,7 +1177,7 @@ be prepended as a directory to each installed file (and directory).
sub pm_to_blib {
my($fromto,$autodir,$pm_filter) = @_;
- _mkpath($autodir,0,0755);
+ _mkpath($autodir,0,$Perm_Dir);
while(my($from, $to) = each %$fromto) {
if( -f $to && -s $from == -s $to && -M $to < -M $from ) {
print "Skip $to (unchanged)\n";
@@ -1213,7 +1200,7 @@ sub pm_to_blib {
# we wont try hard here. its too likely to mess things up.
forceunlink($to);
} else {
- _mkpath(dirname($to),0,0755);
+ _mkpath(dirname($to),0,$Perm_Dir);
}
if ($need_filtering) {
run_filter($pm_filter, $from, $to);