re-base old patch to new 5.8.8 source

This commit is contained in:
jvdias 2006-02-01 15:55:58 +00:00
parent c74188fcd2
commit 766b4a2747
8 changed files with 465 additions and 0 deletions

View File

@ -0,0 +1,122 @@
--- perl-5.8.8-RC1/utils/c2ph.PL.CAN-2004-0976 2004-10-19 15:45:42.000000000 -0400
+++ perl-5.8.8-RC1/utils/c2ph.PL 2006-01-20 15:51:09.000000000 -0500
@@ -1320,7 +1320,7 @@
$intrinsics{$_[1]} = $template{$_[0]};
}
close(PIPE) || die "couldn't read intrinsics!";
- unlink($TMP, '$SAFEDIR/a.out');
+ unlink($TMP, "$SAFEDIR/a.out");
print STDERR "done\n" if $trace;
}
--- perl-5.8.8-RC1/lib/CGI/Cookie.pm.CAN-2004-0976 2006-01-08 11:39:14.000000000 -0500
+++ perl-5.8.8-RC1/lib/CGI/Cookie.pm 2006-01-20 15:51:09.000000000 -0500
@@ -407,7 +407,7 @@
You may also retrieve cookies that were stored in some external
form using the parse() class method:
- $COOKIES = `cat /usr/tmp/Cookie_stash`;
+ $COOKIES = `cat /var/run/www/Cookie_stash`;
%cookies = parse CGI::Cookie($COOKIES);
If you are in a mod_perl environment, you can save some overhead by
--- perl-5.8.8-RC1/lib/Memoize/t/tie_storable.t.CAN-2004-0976 2002-07-12 15:56:19.000000000 -0400
+++ perl-5.8.8-RC1/lib/Memoize/t/tie_storable.t 2006-01-20 15:51:09.000000000 -0500
@@ -33,14 +33,7 @@
print "1..4\n";
-
-if (eval {require File::Spec::Functions}) {
- File::Spec::Functions->import();
-} else {
- *catfile = sub { join '/', @_ };
-}
-$tmpdir = $ENV{TMP} || $ENV{TMPDIR} || '/tmp';
-$file = catfile($tmpdir, "storable$$");
+$file = "storable$$";
1 while unlink $file;
tryout('Memoize::Storable', $file, 1); # Test 1..4
1 while unlink $file;
--- perl-5.8.8-RC1/lib/Memoize/t/tie_ndbm.t.CAN-2004-0976 2005-04-22 07:36:58.000000000 -0400
+++ perl-5.8.8-RC1/lib/Memoize/t/tie_ndbm.t 2006-01-20 15:51:09.000000000 -0500
@@ -28,14 +28,7 @@
print "1..4\n";
-
-if (eval {require File::Spec::Functions}) {
- File::Spec::Functions->import();
-} else {
- *catfile = sub { join '/', @_ };
-}
-$tmpdir = $ENV{TMP} || $ENV{TMPDIR} || '/tmp';
-$file = catfile($tmpdir, "md$$");
+$file = "md$$";
1 while unlink $file, "$file.dir", "$file.pag", "$file.db";
tryout('Memoize::NDBM_File', $file, 1); # Test 1..4
1 while unlink $file, "$file.dir", "$file.pag", "$file.db";
--- perl-5.8.8-RC1/lib/Memoize/t/tie.t.CAN-2004-0976 2002-07-12 15:56:19.000000000 -0400
+++ perl-5.8.8-RC1/lib/Memoize/t/tie.t 2006-01-20 15:51:09.000000000 -0500
@@ -29,14 +29,7 @@
$_[0]+1;
}
-if (eval {require File::Spec::Functions}) {
- File::Spec::Functions->import('tmpdir', 'catfile');
- $tmpdir = tmpdir();
-} else {
- *catfile = sub { join '/', @_ };
- $tmpdir = $ENV{TMP} || $ENV{TMPDIR} || '/tmp';
-}
-$file = catfile($tmpdir, "md$$");
+$file = "md$$";
@files = ($file, "$file.db", "$file.dir", "$file.pag");
1 while unlink @files;
--- perl-5.8.8-RC1/lib/Memoize/t/tie_sdbm.t.CAN-2004-0976 2002-07-12 15:56:19.000000000 -0400
+++ perl-5.8.8-RC1/lib/Memoize/t/tie_sdbm.t 2006-01-20 15:51:09.000000000 -0500
@@ -28,14 +28,7 @@
print "1..4\n";
-if (eval {require File::Spec::Functions}) {
- File::Spec::Functions->import('tmpdir', 'catfile');
- $tmpdir = tmpdir();
-} else {
- *catfile = sub { join '/', @_ };
- $tmpdir = $ENV{TMP} || $ENV{TMPDIR} || '/tmp';
-}
-$file = catfile($tmpdir, "md$$");
+$file = "md$$";
1 while unlink $file, "$file.dir", "$file.pag";
tryout('Memoize::SDBM_File', $file, 1); # Test 1..4
1 while unlink $file, "$file.dir", "$file.pag";
--- perl-5.8.8-RC1/lib/Memoize/t/tie_gdbm.t.CAN-2004-0976 2002-07-12 15:56:19.000000000 -0400
+++ perl-5.8.8-RC1/lib/Memoize/t/tie_gdbm.t 2006-01-20 15:51:09.000000000 -0500
@@ -26,13 +26,7 @@
print "1..4\n";
-if (eval {require File::Spec::Functions}) {
- File::Spec::Functions->import();
-} else {
- *catfile = sub { join '/', @_ };
-}
-$tmpdir = $ENV{TMP} || $ENV{TMPDIR} || '/tmp';
-$file = catfile($tmpdir, "md$$");
+$file = "md$$";
1 while unlink $file, "$file.dir", "$file.pag";
tryout('GDBM_File', $file, 1); # Test 1..4
1 while unlink $file, "$file.dir", "$file.pag";
--- perl-5.8.8-RC1/lib/Shell.pm.CAN-2004-0976 2004-06-01 05:42:17.000000000 -0400
+++ perl-5.8.8-RC1/lib/Shell.pm 2006-01-20 15:51:09.000000000 -0500
@@ -127,7 +127,7 @@
use Shell qw(cat ps cp);
$passwd = cat('</etc/passwd');
@pslines = ps('-ww'),
- cp("/etc/passwd", "/tmp/passwd");
+ cp("/etc/passwd", "/etc/passwd.orig");
# object oriented
my $sh = Shell->new;

View File

@ -0,0 +1,123 @@
--- perl-5.8.8-RC1/lib/ExtUtils/MakeMaker.pm.USE_MM_LD_RUN_PATH 2006-01-20 15:51:09.000000000 -0500
+++ perl-5.8.8-RC1/lib/ExtUtils/MakeMaker.pm 2006-01-20 16:25:43.000000000 -0500
@@ -233,7 +233,7 @@
PERL_SRC PERM_RW PERM_RWX
PL_FILES PM PM_FILTER PMLIBDIRS POLLUTE PPM_INSTALL_EXEC
PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ
- SIGN SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
+ SKIP TYPEMAPS USE_MM_LD_RUN_PATH VERSION VERSION_FROM XS XSOPT XSPROTOARG
XS_VERSION clean depend dist dynamic_lib linkext macro realclean
tool_autosplit
@@ -369,7 +369,27 @@
print join(" ", map { "perl($_)>=$self->{PREREQ_PM}->{$_} " }
sort keys %{$self->{PREREQ_PM}}), "\n";
exit 0;
- }
+ }
+
+ # USE_MM_LD_RUN_PATH - another RedHatism to disable automatic RPATH generation
+ if ( ( ! $self->{USE_MM_LD_RUN_PATH} )
+ &&( ("@ARGV" =~ /\bUSE_MM_LD_RUN_PATH(=([01]))?\b/)
+ ||( exists( $ENV{USE_MM_LD_RUN_PATH} )
+ &&( $ENV{USE_MM_LD_RUN_PATH} =~ /([01])?$/ )
+ )
+ )
+ )
+ {
+ my $v = $1;
+ if( $v )
+ {
+ $v = ($v=~/=([01])$/)[0];
+ }else
+ {
+ $v = 1;
+ };
+ $self->{USE_MM_LD_RUN_PATH}=$v;
+ };
print STDOUT "MakeMaker (v$VERSION)\n" if $Verbose;
if (-f "MANIFEST" && ! -f "Makefile"){
@@ -1373,13 +1393,13 @@
This is the root directory into which the code will be installed. It
I<prepends itself to the normal prefix>. For example, if your code
-would normally go into F</usr/local/lib/perl> you could set DESTDIR=~/tmp/
-and installation would go into F<~/tmp/usr/local/lib/perl>.
+would normally go into /usr/local/lib/perl you could set DESTDIR=~/myperl/
+and installation would go into ~/myperl/usr/local/lib/perl.
This is primarily of use for people who repackage Perl modules.
NOTE: Due to the nature of make, it is important that you put the trailing
-slash on your DESTDIR. F<~/tmp/> not F<~/tmp>.
+slash on your DESTDIR. F<"~/myperl/"> not F<"~/myperl">.
=item DIR
@@ -2057,6 +2077,40 @@
precedence, even if it isn't listed in TYPEMAPS. The default system
typemap has lowest precedence.
+=item USE_MM_LD_RUN_PATH
+
+boolean
+The Red Hat perl MakeMaker distribution differs from the standard
+upstream release in that it disables use of the MakeMaker generated
+LD_RUN_PATH by default, UNLESS this attribute is specified , or the
+USE_MM_LD_RUN_PATH environment variable is set during the MakeMaker run.
+
+The upstream MakeMaker will set the ld(1) environment variable LD_RUN_PATH
+to the concatenation of every -L ld(1) option directory in which a -l ld(1)
+option library is found, which is used as the ld(1) -rpath option if none
+is specified. This means that, if your application builds shared libraries
+and your MakeMaker application links to them, that the absolute paths of the
+libraries in the build tree will be inserted into the RPATH header of all
+MakeMaker generated binaries, and that such binaries will be unable to link
+to these libraries if they do not still reside in the build tree directories
+(unlikely) or in the system library directories (/lib or /usr/lib), regardless
+of any LD_LIBRARY_PATH setting. So if you specified -L../mylib -lmylib , and
+ your 'libmylib.so' gets installed into /some_directory_other_than_usr_lib,
+ your MakeMaker application will be unable to link to it, even if LD_LIBRARY_PATH
+is set to include /some_directory_other_than_usr_lib, because RPATH overrides
+LD_LIBRARY_PATH.
+
+So for Red Hat MakeMaker builds LD_RUN_PATH is NOT generated by default for
+every link. You can still use explicit -rpath ld options or the LD_RUN_PATH
+environment variable during the build to generate an RPATH for the binaries.
+
+You can set the USE_MM_LD_RUN_PATH attribute to 1 on the MakeMaker command
+line or in the WriteMakefile arguments to enable generation of LD_RUN_PATH
+for every link command.
+
+USE_MM_LD_RUN_PATH will default to 1 (LD_RUN_PATH will be used) IF the
+$USE_MM_LD_RUN_PATH environment variable is set during a MakeMaker run.
+
=item VENDORPREFIX
Like PERLPREFIX, but only for the vendor install locations.
--- perl-5.8.8-RC1/lib/ExtUtils/MM_Unix.pm.USE_MM_LD_RUN_PATH 2005-10-21 10:11:03.000000000 -0400
+++ perl-5.8.8-RC1/lib/ExtUtils/MM_Unix.pm 2006-01-20 16:20:25.000000000 -0500
@@ -941,7 +941,7 @@
}
my $ld_run_path_shell = "";
- if ($self->{LD_RUN_PATH} ne "") {
+ if (($self->{LD_RUN_PATH} ne "") && ($self->{USE_MM_LD_RUN_PATH})) {
$ld_run_path_shell = 'LD_RUN_PATH="$(LD_RUN_PATH)" ';
}
--- perl-5.8.8-RC1/lib/ExtUtils/Liblist.pm.USE_MM_LD_RUN_PATH 2003-04-07 14:58:17.000000000 -0400
+++ perl-5.8.8-RC1/lib/ExtUtils/Liblist.pm 2006-01-20 16:21:57.000000000 -0500
@@ -87,6 +87,11 @@
in LDLOADLIBS. It is passed as an environment variable to the process
that links the shared library.
+Red Hat extension: This generation of LD_RUN_PATH is disabled by default.
+To use the generated LD_RUN_PATH for all links, set the USE_MM_LD_RUN_PATH
+MakeMaker object attribute / argument, (or set the $USE_MM_LD_RUN_PATH
+environment variable).
+
=head2 BSLOADLIBS
List of those libraries that are needed but can be linked in

11
perl-5.8.8-dashI.patch Normal file
View File

@ -0,0 +1,11 @@
--- perl-5.8.8-RC1/perl.c.dashI 2006-01-08 09:36:17.000000000 -0500
+++ perl-5.8.8-RC1/perl.c 2006-01-20 14:42:43.000000000 -0500
@@ -1755,7 +1755,7 @@
if (s && *s) {
STRLEN len = strlen(s);
const char * const p = savepvn(s, len);
- incpush(p, TRUE, TRUE, FALSE);
+ incpush(p, FALSE, FALSE, FALSE);
sv_catpvn(sv, "-I", 2);
sv_catpvn(sv, p, len);
sv_catpvn(sv, " ", 1);

63
perl-5.8.8-incpush.patch Normal file
View File

@ -0,0 +1,63 @@
--- perl-5.8.7/perl.c.orig 2005-04-22 17:14:27.000000000 +0300
+++ perl-5.8.7/perl.c 2005-06-17 22:31:31.000000000 +0300
@@ -109,6 +109,7 @@
#endif
static I32 read_e_script(pTHX_ int idx, SV *buf_sv, int maxlen);
+STATIC void incpush_oldversion(pTHX_ char *dir);
#ifdef IAMSUID
#ifndef DOSUID
@@ -4435,6 +4436,7 @@
* DLL-based path intuition to work correctly */
# if !defined(WIN32)
incpush(SITEARCH_EXP, FALSE, FALSE, TRUE);
+ incpush_oldversion(aTHX_ SITEARCH_EXP);
# endif
#endif
@@ -4456,6 +4458,7 @@
* DLL-based path intuition to work correctly */
# if !defined(WIN32)
incpush(PERL_VENDORARCH_EXP, FALSE, FALSE, TRUE);
+ incpush_oldversion(aTHX_ PERL_VENDORARCH_EXP);
# endif
#endif
@@ -4497,6 +4500,36 @@
# define PERLLIB_MANGLE(s,n) (s)
#endif
+#define VERSION_DIRECTORY_STRING "/" STRINGIFY(PERL_REVISION) "." STRINGIFY(PERL_VERSION) "." STRINGIFY(PERL_SUBVERSION)
+STATIC void
+incpush_oldversion(pTHX_ char *dir)
+{
+#ifdef PERL_INC_VERSION_LIST
+ const char *incverlist[] = { PERL_INC_VERSION_LIST };
+ const char **incver;
+ const char *verdir;
+
+ verdir = strstr(dir, VERSION_DIRECTORY_STRING);
+ if (!verdir)
+ return;
+
+ for (incver = incverlist; *incver; incver++) {
+ char *new_dir = malloc(strlen(dir) + strlen(*incver) + 2);
+ char *p = new_dir;
+
+ strcpy(new_dir, dir);
+ p += verdir - dir + 1; /* advance to char following '/' in VERSION_DIRECTORY_STRING */
+ memcpy(p, *incver, strlen(*incver)); /* copy incver there instead */
+ p += strlen(*incver); /* advance past version we just copied */
+ strcpy(p, verdir + strlen(VERSION_DIRECTORY_STRING)); /* and copy the rest of the original dir */
+
+ incpush(new_dir, FALSE, FALSE, FALSE);
+ free(new_dir);
+ }
+#endif
+}
+
+
/* Push a directory onto @INC if it exists.
Generate a new SV if we do this, to save needing to copy the SV we push
onto @INC */

22
perl-5.8.8-links.patch Normal file
View File

@ -0,0 +1,22 @@
--- perl-5.8.8-RC1/lib/CPAN/FirstTime.pm.links 2006-01-05 12:37:39.000000000 -0500
+++ perl-5.8.8-RC1/lib/CPAN/FirstTime.pm 2006-01-20 14:57:13.000000000 -0500
@@ -326,7 +326,7 @@
local $^W = $old_warn;
my $progname;
for $progname (qw/bzip2 gzip tar unzip make
- curl lynx wget ncftpget ncftp ftp
+ curl links wget ncftpget ncftp ftp
gpg/)
{
if ($^O eq 'MacOS') {
--- perl-5.8.8-RC1/lib/CPAN.pm.links 2006-01-05 12:37:39.000000000 -0500
+++ perl-5.8.8-RC1/lib/CPAN.pm 2006-01-20 14:55:51.000000000 -0500
@@ -2607,7 +2607,7 @@
my($wstatus);
if (($wstatus = system($system)) == 0
&&
- ($f eq "lynx" ?
+ ($f eq "links" ?
-s $asl_ungz # lynx returns 0 when it fails somewhere
: 1
)

View File

@ -0,0 +1,42 @@
--- perl-5.8.8-RC1/utils/perlbug.PL.perlbug 2006-01-03 14:07:41.000000000 -0500
+++ perl-5.8.8-RC1/utils/perlbug.PL 2006-01-20 14:33:26.000000000 -0500
@@ -71,7 +71,7 @@
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-my \$config_tag1 = '$extract_version - $Config{cf_time}';
+my \$config_tag1 = '$extract_version';
my \$patchlevel_date = $patchlevel_date;
my \$patch_tags = '$patch_tags';
@@ -287,18 +287,9 @@
# OK - send "OK" report for build on this system
$ok = 0;
if ($::opt_o) {
- if ($::opt_o eq 'k' or $::opt_o eq 'kay') {
- my $age = time - $patchlevel_date;
- if ($::opt_o eq 'k' and $age > 60 * 24 * 60 * 60 ) {
- my $date = localtime $patchlevel_date;
- print <<"EOF";
-"perlbug -ok" and "perlbug -nok" do not report on Perl versions which
-are more than 60 days old. This Perl version was constructed on
-$date. If you really want to report this, use
-"perlbug -okay" or "perlbug -nokay".
-EOF
- exit();
- }
+ #
+ # Red Hat modification: remove -ok / -nok refusal to report due to age
+ #
# force these options
unless ($::opt_n) {
$::opt_S = 1; # don't prompt for send
@@ -605,7 +596,7 @@
print OUT <<EFF;
---
EFF
- print OUT "This perlbug was built using Perl $config_tag1\n",
+ print OUT "This perlbug was built using Perl $config_tag1 in the Red Hat build system.\n",
"It is being executed now by Perl $config_tag2.\n\n"
if $config_tag2 ne $config_tag1;

View File

@ -0,0 +1,50 @@
--- perl-5.8.8-RC1/utils/perlbug.PL.perlbug 2006-01-03 14:07:41.000000000 -0500
+++ perl-5.8.8-RC1/utils/perlbug.PL 2006-01-31 14:33:47.000000000 -0500
@@ -27,7 +27,6 @@
open PATCH_LEVEL, "<" . catfile(updir, "patchlevel.h")
or die "Can't open patchlevel.h: $!";
-my $patchlevel_date = (stat PATCH_LEVEL)[9];
my $patchnum = "";
while (<PATCH_LEVEL>) {
@@ -71,9 +70,8 @@
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-my \$config_tag1 = '$extract_version - $Config{cf_time}';
+my \$config_tag1 = '$extract_version';
-my \$patchlevel_date = $patchlevel_date;
my \$patch_tags = '$patch_tags';
my \@patches = (
$patch_desc
@@ -288,17 +286,6 @@
$ok = 0;
if ($::opt_o) {
if ($::opt_o eq 'k' or $::opt_o eq 'kay') {
- my $age = time - $patchlevel_date;
- if ($::opt_o eq 'k' and $age > 60 * 24 * 60 * 60 ) {
- my $date = localtime $patchlevel_date;
- print <<"EOF";
-"perlbug -ok" and "perlbug -nok" do not report on Perl versions which
-are more than 60 days old. This Perl version was constructed on
-$date. If you really want to report this, use
-"perlbug -okay" or "perlbug -nokay".
-EOF
- exit();
- }
# force these options
unless ($::opt_n) {
$::opt_S = 1; # don't prompt for send
@@ -605,8 +592,8 @@
print OUT <<EFF;
---
EFF
- print OUT "This perlbug was built using Perl $config_tag1\n",
- "It is being executed now by Perl $config_tag2.\n\n"
+ print OUT "This perlbug was built using Perl $config_tag1 in the Red Hat build system.\n",
+ "It is being executed now by Perl $config_tag2.\n\n"
if $config_tag2 ne $config_tag1;
print OUT <<EOF;

View File

@ -0,0 +1,32 @@
--- perl-5.8.8-RC1/Makefile.SH.makerpath 2006-01-20 16:41:26.000000000 -0500
+++ perl-5.8.8-RC1/Makefile.SH 2006-01-20 16:41:57.000000000 -0500
@@ -125,26 +125,10 @@
esac
case "$osname" in
- linux)
- # If there is a pre-existing $libperl from a previous
- # installation, Linux needs to use LD_PRELOAD to
- # override the LD_LIBRARY_PATH setting. See the
- # INSTALL file, under "Building a shared perl library".
- # If there is no pre-existing $libperl, we don't need
- # to do anything further.
- if test -f $archlib/CORE/$libperl; then
- rm -f preload
- cat <<'EOT' > preload
-#! /bin/sh
-lib=$1
-shift
-test -r $lib && export LD_PRELOAD="$lib $LD_PRELOAD"
-exec "$@"
-EOT
- chmod 755 preload
- ldlibpth="$ldlibpth `pwd`/preload `pwd`/$libperl"
- fi
+ linux*)
+ ldlibpth="LD_PRELOAD=`pwd`/libperl.so $ldlibpth"
;;
+
os390) test -f /bin/env && ldlibpth="/bin/env $ldlibpth"
;;
esac