Author: bdubbs
Date: 2008-10-29 22:47:44 -0600 (Wed, 29 Oct 2008)
New Revision: 1996
Added:
trunk/perl/perl-5.10.0-consolidated-1.patch
Log:
Add perl-5.10.0 patch to consolidate:
perl-5.10.0-security_fix-1.patch
perl-5.10.0-fix_posix_module.patch
perl-5.10.0-warnings.patch
perl-5.10.0-memory_corruption.patch
Added: trunk/perl/perl-5.10.0-consolidated-1.patch
===================================================================
--- trunk/perl/perl-5.10.0-consolidated-1.patch (rev 0)
+++ trunk/perl/perl-5.10.0-consolidated-1.patch 2008-10-30 04:47:44 UTC (rev
1996)
@@ -0,0 +1,176 @@
+Submitted By: Bruce Dubbs <bdubbs(at)linuxfromscratch(dot)org>
+Date: 2006-02-15
+Initial Package Version: 5.8.8
+Origin: Upstream
+Description: Consoilidation of several upstream patches.
+
+1. locate the correct libc.
+2. [perl bug #54186]
+3. Fix perl warnings
+4. Fix a segfault when there is a double-freed scalar
+
+Submitted By: Anderson Lizardo <andersonlizardo(at)yahoo(dot)com(dot)br>
+Date: 2006-02-15
+Initial Package Version: 5.8.8
+Origin: based on current LFS-BOOK patch (perl-5.8.0-libc-2.patch)
+Description: this patch adapts some hard-wired paths to the C library.
+ It uses the $prefix variable to locate the correct libc.
+
+Note: manually updated for perl-5.10.0
+diff -Naur perl-5.8.8.orig/hints/linux.sh perl-5.8.8/hints/linux.sh
+--- perl-5.8.8.orig/hints/linux.sh 2005-11-18 01:18:45.000000000 +0000
++++ perl-5.8.8/hints/linux.sh 2006-02-12 12:20:32.000000000 +0000
+@@ -60,9 +60,9 @@
+ # We don't use __GLIBC__ and __GLIBC_MINOR__ because they
+ # are insufficiently precise to distinguish things like
+ # libc-2.0.6 and libc-2.0.7.
+-if test -L /lib/libc.so.6; then
+- libc=`ls -l /lib/libc.so.6 | awk '{print $NF}'`
+- libc=/lib/$libc
++if test -L ${prefix}/lib/libc.so.6; then
++ libc=`ls -l ${prefix}/lib/libc.so.6 | awk '{print $NF}'`
++ libc=${prefix}/lib/$libc
+ fi
+
+ # Configure may fail to find lstat() since it's a static/inline
+@@ -423,3 +423,8 @@
+ libswanted="$libswanted pthread"
+ ;;
+ esac
++
++locincpth=""
++loclibpth=""
++glibpth="${prefix}/lib"
++usrinc="${prefix}/include"
+
+
+
+Fix 'constant subroutine SEEK_* redefined' warnings when using the
+Fcntl and POSIX modules together. (Closes: #479957)
+
+[perl #54186]
+
+Upstream change 33825.
+diff --git a/ext/POSIX/Makefile.PL b/ext/POSIX/Makefile.PL
+index bd93e59..5f6679d 100644
+--- a/ext/POSIX/Makefile.PL
++++ b/ext/POSIX/Makefile.PL
+@@ -48,13 +48,11 @@ my @names =
+ MAX_INPUT MB_LEN_MAX MSG_CTRUNC MSG_DONTROUTE MSG_EOR MSG_OOB MSG_PEEK
+ MSG_TRUNC MSG_WAITALL NAME_MAX NCCS NGROUPS_MAX NOFLSH OPEN_MAX OPOST
+ PARENB PARMRK PARODD PATH_MAX PIPE_BUF RAND_MAX R_OK SCHAR_MAX
+- SCHAR_MIN SEEK_CUR SEEK_END SEEK_SET SHRT_MAX SHRT_MIN SIGABRT SIGALRM
++ SCHAR_MIN SHRT_MAX SHRT_MIN SIGABRT SIGALRM
+ SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT
+ SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU
+ SIGUSR1 SIGUSR2 SIG_BLOCK SIG_SETMASK SIG_UNBLOCK SSIZE_MAX
+- STDERR_FILENO STDIN_FILENO STDOUT_FILENO STREAM_MAX
+- S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID
+- S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR TCIFLUSH TCIOFF
++ STDERR_FILENO STDIN_FILENO STDOUT_FILENO STREAM_MAX TCIFLUSH TCIOFF
+ TCIOFLUSH TCION TCOFLUSH TCOOFF TCOON TCSADRAIN TCSAFLUSH TCSANOW
+ TMP_MAX TOSTOP TZNAME_MAX VEOF VEOL VERASE VINTR VKILL VMIN VQUIT
+ VSTART VSTOP VSUSP VTIME WNOHANG WUNTRACED W_OK X_OK
+diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm
+index fbbd253..97d0b2c 100644
+--- a/ext/POSIX/POSIX.pm
++++ b/ext/POSIX/POSIX.pm
+@@ -13,7 +13,9 @@ use XSLoader ();
+ use Fcntl qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK F_SETFD
+ F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK O_ACCMODE O_APPEND
+ O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC
+- O_WRONLY);
++ O_WRONLY SEEK_CUR SEEK_END SEEK_SET
++ S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID
++ S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR);
+
+ # Grandfather old foo_h form to new :foo_h form
+ my $loaded;
+diff --git a/t/lib/proxy_constant_subs.t b/t/lib/proxy_constant_subs.t
+index 4af73d3..45b0a54 100644
+--- a/t/lib/proxy_constant_subs.t
++++ b/t/lib/proxy_constant_subs.t
+@@ -7,20 +7,20 @@ BEGIN {
+ print "1..0 # Skip -- Perl configured without B module\n";
+ exit 0;
+ }
+- if ($Config::Config{'extensions'} !~ /\bPOSIX\b/) {
+- print "1..0 # Skip -- Perl configured without POSIX\n";
++ if ($Config::Config{'extensions'} !~ /\bFcntl\b/) {
++ print "1..0 # Skip -- Perl configured without Fcntl\n";
+ exit 0;
+ }
+- # errno is a real subroutine, and acts as control
++ # S_IFMT is a real subroutine, and acts as control
+ # SEEK_SET is a proxy constant subroutine.
+- @symbols = qw(errno SEEK_SET);
++ @symbols = qw(S_IFMT SEEK_SET);
+ }
+
+ use strict;
+ use warnings;
+ use Test::More tests => 4 * @symbols;
+ use B qw(svref_2object GVf_IMPORTED_CV);
+-use POSIX @symbols;
++use Fcntl @symbols;
+
+ # GVf_IMPORTED_CV should not be set on the original, but should be set on the
+ # imported GV.
+@@ -29,7 +29,7 @@ foreach my $symbol (@symbols) {
+ my ($ps, $ms);
+ {
+ no strict 'refs';
+- $ps = svref_2object(\*{"POSIX::$symbol"});
++ $ps = svref_2object(\*{"Fcntl::$symbol"});
+ $ms = svref_2object(\*{"::$symbol"});
+ }
+ isa_ok($ps, 'B::GV');
+
+Perl Upstream Patch
+
+diff --git a/ext/PerlIO/via/via.xs b/ext/PerlIO/via/via.xs
+index 5670887..c53e43c 100644
+--- perl-5.10.0.orig/ext/PerlIO/via/via.xs
++++ perl-5.10.0/ext/PerlIO/via/via.xs
+@@ -89,7 +89,7 @@
+ if (!s->fh) {
+ GV *gv = newGVgen(HvNAME_get(s->stash));
+ GvIOp(gv) = newIO();
+- s->fh = newRV_noinc((SV *) gv);
++ s->fh = newRV((SV *) gv);
+ s->io = GvIOp(gv);
+ }
+ IoIFP(s->io) = PerlIONext(f);
+
+Fix for bug [perl #54934] Attempt to free unreferenced scalar
+
+diff -Naur perl-5.10.0.orig/lib/File/Path.pm perl-5.10.0/lib/File/Path.pm
+--- perl-5.10.0.orig/lib/File/Path.pm 2007-12-18 10:47:07.000000000 +0000
++++ perl-5.10.0/lib/File/Path.pm 2008-10-22 00:15:52.000000000 +0000
+@@ -350,9 +350,9 @@
+ next ROOT_DIR;
+ }
+
+- my $nperm = $perm & 07777 | 0600;
+- if ($nperm != $perm and not chmod $nperm, $root) {
+- if ($Force_Writeable) {
++ if ($Force_Writeable) {
++ my $nperm = $perm & 07777 | 0600;
++ if ($nperm != $perm and not chmod $nperm, $root) {
+ _error($arg, "cannot make file writeable", $canon);
+ }
+ }
+
+diff -Naur perl-5.10.0.orig/mg.c perl-5.10.0/mg.c
+--- perl-5.10.0.orig/mg.c 2007-12-18 10:47:08.000000000 +0000
++++ perl-5.10.0/mg.c 2008-10-23 04:02:22.000000000 +0000
+@@ -1543,7 +1543,7 @@
+ stash = GvSTASH(
+ SvTYPE(mg->mg_obj) == SVt_PVGV
+ ? (GV*)mg->mg_obj
+- : (GV*)SvMAGIC(mg->mg_obj)->mg_obj
++ : (GV*)mg_find(mg->mg_obj, PERL_MAGIC_isa)->mg_obj
+ );
+
+ mro_isa_changed_in(stash);
+
--
http://linuxfromscratch.org/mailman/listinfo/patches
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page