lang/perl: Upgraded to Perl 5.24.1
Signed-off-by: Michail Frolov <frolovm@pobox.com>
This commit is contained in:
parent
340095b3d9
commit
571a810fd4
10 changed files with 72 additions and 217 deletions
|
@ -8,19 +8,19 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=perl
|
||||
PKG_VERSION:=5.22.1
|
||||
PKG_RELEASE:=4
|
||||
PKG_VERSION:=5.24.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \
|
||||
http://www.cpan.org/src/5.0 \
|
||||
ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/src/5.0 \
|
||||
http://ftp.mpi-sb.mpg.de/pub/perl/CPAN/src/5.0 \
|
||||
ftp://ftp.gmd.de/mirrors/CPAN/src/5.0 \
|
||||
http://ftp5.gwdg.de/pub/languages/perl/CPAN/src/ \
|
||||
ftp://ftp.funet.fi/pub/languages/perl/CPAN/src/5.0 \
|
||||
http://ftp.funet.fi/pub/languages/perl/CPAN/src/5.0
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_MD5SUM:=19295bbb775a3c36123161b9bf4892f1
|
||||
PKG_SOURCE_URL:=\
|
||||
https://cpan.metacpan.org/src/5.0 \
|
||||
https://cpan.uib.no/src/5.0 \
|
||||
https://mirrors.rit.edu/CPAN/src/5.0 \
|
||||
https://mirror.transip.net/CPAN/src/5.0 \
|
||||
https://mirrors.sonic.net/cpan/src/5.0 \
|
||||
https://www.cpan.org/src/5.0
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_MD5SUM:=af6a84c7c3e2b8b269c105a5db2f6d53
|
||||
PKG_HASH:=03a77bac4505c270f1890ece75afc7d4b555090b41aa41ea478747e23b2afb3f
|
||||
|
||||
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
|
||||
PKG_LICENSE_FILES:=Copying Artistic README
|
||||
|
|
|
@ -135,6 +135,7 @@ d_dlsymun='undef'
|
|||
d_dosuid='undef'
|
||||
d_drand48proto='define'
|
||||
d_dup2='define'
|
||||
d_duplocale='define'
|
||||
d_eaccess='undef'
|
||||
d_endgrent='define'
|
||||
d_endgrent_r='undef'
|
||||
|
@ -162,6 +163,7 @@ d_fcntl='define'
|
|||
d_fcntl_can_lock='define'
|
||||
d_fd_macros='define'
|
||||
d_fd_set='define'
|
||||
d_fdclose='undef'
|
||||
d_fdim='define'
|
||||
d_fgetpos='define'
|
||||
d_finite='define'
|
||||
|
@ -182,6 +184,7 @@ d_fpclassify='define'
|
|||
d_fpclassl='undef'
|
||||
d_fpgetround='undef'
|
||||
d_fpos64_t='undef'
|
||||
d_freelocale='define'
|
||||
d_frexpl='undef'
|
||||
d_fs_data_s='undef'
|
||||
d_fseeko='define'
|
||||
|
@ -297,6 +300,7 @@ d_mbtowc='define'
|
|||
d_memchr='define'
|
||||
d_memcmp='define'
|
||||
d_memcpy='define'
|
||||
d_memmem='define'
|
||||
d_memmove='define'
|
||||
d_memset='define'
|
||||
d_mkdir='define'
|
||||
|
@ -329,6 +333,7 @@ d_nanosleep='define'
|
|||
d_ndbm='undef'
|
||||
d_ndbm_h_uses_prototypes='undef'
|
||||
d_nearbyint='define'
|
||||
d_newlocale='define'
|
||||
d_nextafter='define'
|
||||
d_nice='define'
|
||||
d_nl_langinfo='define'
|
||||
|
@ -431,6 +436,14 @@ d_shmctl='define'
|
|||
d_shmdt='define'
|
||||
d_shmget='define'
|
||||
d_sigaction='define'
|
||||
d_siginfo_si_addr='define'
|
||||
d_siginfo_si_band='define'
|
||||
d_siginfo_si_errno='define'
|
||||
d_siginfo_si_fd='define'
|
||||
d_siginfo_si_pid='define'
|
||||
d_siginfo_si_status='define'
|
||||
d_siginfo_si_uid='define'
|
||||
d_siginfo_si_value='define'
|
||||
d_signbit='undef'
|
||||
d_sigprocmask='define'
|
||||
d_sigsetjmp='define'
|
||||
|
@ -505,6 +518,7 @@ d_uname='define'
|
|||
d_union_semun='undef'
|
||||
d_unordered='undef'
|
||||
d_unsetenv='define'
|
||||
d_uselocale='define'
|
||||
d_usleep='define'
|
||||
d_usleepproto='define'
|
||||
d_ustat='define'
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# Set the version here
|
||||
PERL_REVISION=5
|
||||
PERL_VERSION=22
|
||||
PERL_VERSION=24
|
||||
PERL_SUBVERSION=1
|
||||
|
||||
# (api_revison, api_version, api_subversion) = (revision, version, 0) usually
|
||||
PERL_API_REVISION=5
|
||||
PERL_API_VERSION=22
|
||||
PERL_API_VERSION=24
|
||||
PERL_API_SUBVERSION=0
|
||||
|
||||
known_extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize Win32 Win32API/File Win32CORE XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/Makefile.SH
|
||||
+++ b/Makefile.SH
|
||||
@@ -316,22 +316,11 @@ MANIFEST_SRT = MANIFEST.srt
|
||||
@@ -333,22 +333,11 @@ MANIFEST_SRT = MANIFEST.srt
|
||||
|
||||
!GROK!THIS!
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
perl: Work around recompile failures
|
||||
|
||||
Apparently, recompiling/relinking fails under some circumstances. This
|
||||
patch has been reported to work around that issue.
|
||||
|
||||
--- a/Makefile.SH
|
||||
+++ b/Makefile.SH
|
||||
@@ -818,7 +818,7 @@ $(LIBPERL): $& $(obj) $(DYNALOADER) $(LI
|
||||
true)
|
||||
$spitshell >>$Makefile <<'!NO!SUBS!'
|
||||
rm -f $@
|
||||
- $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs)
|
||||
+ $(CC) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs)
|
||||
!NO!SUBS!
|
||||
case "$osname" in
|
||||
aix)
|
42
lang/perl/patches/320-copy-pod-hack.patch
Normal file
42
lang/perl/patches/320-copy-pod-hack.patch
Normal file
|
@ -0,0 +1,42 @@
|
|||
--- a/cpan/podlators/Makefile.PL
|
||||
+++ b/cpan/podlators/Makefile.PL
|
||||
@@ -18,6 +18,19 @@ use Config;
|
||||
use ExtUtils::MakeMaker;
|
||||
use File::Spec;
|
||||
|
||||
+foreach (glob('scripts/pod*.PL')) {
|
||||
+ # The various pod*.PL extractors change directory. Doing that with relative
|
||||
+ # paths in @INC breaks. It seems the lesser of two evils to copy (to avoid)
|
||||
+ # the chdir doing anything, than to attempt to convert lib paths to
|
||||
+ # absolute, and potentially run into problems with quoting special
|
||||
+ # characters in the path to our build dir (such as spaces)
|
||||
+ require File::Copy;
|
||||
+
|
||||
+ my $temp = $_;
|
||||
+ $temp =~ s!scripts/!!;
|
||||
+ File::Copy::copy($_, $temp) or die "Can't copy $temp to $_: $!";
|
||||
+}
|
||||
+
|
||||
# Generate full paths for scripts distributed in the bin directory. Appends
|
||||
# the .com extension to scripts on VMS, unless they already have the .PL
|
||||
# extension.
|
||||
@@ -28,7 +41,7 @@ use File::Spec;
|
||||
# (Scalar) Space-separated relative paths from top of distribution
|
||||
sub scripts {
|
||||
my (@scripts) = @_;
|
||||
- my @paths = map { File::Spec->catfile('scripts', $_) } @scripts;
|
||||
+ my @paths = @scripts;
|
||||
if ($^O eq 'VMS') {
|
||||
@paths = map { m{ [.] PL \z }xms ? $_ : $_ . '.com' } @paths;
|
||||
}
|
||||
@@ -77,8 +90,8 @@ my %metadata = (
|
||||
|
||||
# Override the files that generate section 1 man pages.
|
||||
MAN1PODS => {
|
||||
- man1pod('scripts', 'pod2man.PL'),
|
||||
- man1pod('scripts', 'pod2text.PL'),
|
||||
+ man1pod('.', 'pod2man.PL'),
|
||||
+ man1pod('.', 'pod2text.PL'),
|
||||
|
||||
# Perl core uses a separate copy in the top-level pod directory.
|
||||
($ENV{PERL_CORE} ? () : man1pod('pod', 'perlpodstyle.pod')),
|
|
@ -1,26 +0,0 @@
|
|||
--- a/t/op/tie_fetch_count.t
|
||||
+++ b/t/op/tie_fetch_count.t
|
||||
@@ -250,12 +250,17 @@ for ([chdir=>''],[chmod=>'0,'],[chown=>'
|
||||
check_count "$op $args\\\$tied_glob$postargs";
|
||||
}
|
||||
|
||||
-$dummy = crypt $var,0; check_count 'crypt $tied, ...';
|
||||
-$dummy = crypt 0,$var; check_count 'crypt ..., $tied';
|
||||
-$var = substr(chr 256,0,0);
|
||||
-$dummy = crypt $var,0; check_count 'crypt $tied_utf8, ...';
|
||||
-$var = substr(chr 256,0,0);
|
||||
-$dummy = crypt 0,$var; check_count 'crypt ..., $tied_utf8';
|
||||
+SKIP: {
|
||||
+ use Config;
|
||||
+ skip "crypt() is unavailable", 4, unless defined $Config{'d_crypt'};
|
||||
+
|
||||
+ $dummy = crypt $var,0; check_count 'crypt $tied, ...';
|
||||
+ $dummy = crypt 0,$var; check_count 'crypt ..., $tied';
|
||||
+ $var = substr(chr 256,0,0);
|
||||
+ $dummy = crypt $var,0; check_count 'crypt $tied_utf8, ...';
|
||||
+ $var = substr(chr 256,0,0);
|
||||
+ $dummy = crypt 0,$var; check_count 'crypt ..., $tied_utf8';
|
||||
+}
|
||||
|
||||
SKIP:
|
||||
{
|
|
@ -1,57 +0,0 @@
|
|||
From b6307f728a4f842a54ea96959e386c7daa92ece1 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Cook <tony@develop-help.com>
|
||||
Date: Tue, 15 Dec 2015 10:56:54 +1100
|
||||
Subject: [perl #126862] ensure File::Spec::canonpath() preserves taint
|
||||
|
||||
Previously the unix specific XS implementation of canonpath() would
|
||||
return an untainted path when supplied a tainted path.
|
||||
|
||||
For the empty string case, newSVpvs() already sets taint as needed on
|
||||
its result.
|
||||
---
|
||||
dist/PathTools/Cwd.xs | 1 +
|
||||
dist/PathTools/t/taint.t | 19 ++++++++++++++++++-
|
||||
2 files changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/dist/PathTools/Cwd.xs
|
||||
+++ b/dist/PathTools/Cwd.xs
|
||||
@@ -535,6 +535,7 @@ THX_unix_canonpath(pTHX_ SV *path)
|
||||
*o = 0;
|
||||
SvPOK_on(retval);
|
||||
SvCUR_set(retval, o - SvPVX(retval));
|
||||
+ SvTAINT(retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
--- a/dist/PathTools/t/taint.t
|
||||
+++ b/dist/PathTools/t/taint.t
|
||||
@@ -12,7 +12,7 @@ use Test::More;
|
||||
BEGIN {
|
||||
plan(
|
||||
${^TAINT}
|
||||
- ? (tests => 17)
|
||||
+ ? (tests => 21)
|
||||
: (skip_all => "A perl without taint support")
|
||||
);
|
||||
}
|
||||
@@ -34,3 +34,20 @@ foreach my $func (@Functions) {
|
||||
|
||||
# Previous versions of Cwd tainted $^O
|
||||
is !tainted($^O), 1, "\$^O should not be tainted";
|
||||
+
|
||||
+{
|
||||
+ # [perl #126862] canonpath() loses taint
|
||||
+ my $tainted = substr($ENV{PATH}, 0, 0);
|
||||
+ # yes, getcwd()'s result should be tainted, and is tested above
|
||||
+ # but be sure
|
||||
+ ok tainted(File::Spec->canonpath($tainted . Cwd::getcwd)),
|
||||
+ "canonpath() keeps taint on non-empty string";
|
||||
+ ok tainted(File::Spec->canonpath($tainted)),
|
||||
+ "canonpath() keeps taint on empty string";
|
||||
+
|
||||
+ (Cwd::getcwd() =~ /^(.*)/);
|
||||
+ my $untainted = $1;
|
||||
+ ok !tainted($untainted), "make sure our untainted value is untainted";
|
||||
+ ok !tainted(File::Spec->canonpath($untainted)),
|
||||
+ "canonpath() doesn't add taint to untainted string";
|
||||
+}
|
|
@ -1,102 +0,0 @@
|
|||
From: Tony Cook <tony@develop-help.com>
|
||||
Date: Wed, 27 Jan 2016 00:52:15 +0000 (+1100)
|
||||
Subject: remove duplicate environment variables from environ
|
||||
X-Git-Url: http://perl5.git.perl.org/perl.git/commitdiff_plain/ae37b791a73a9e78dedb89fb2429d2628cf58076
|
||||
|
||||
remove duplicate environment variables from environ
|
||||
|
||||
If we see duplicate environment variables while iterating over
|
||||
environ[]:
|
||||
|
||||
a) make sure we use the same value in %ENV that getenv() returns.
|
||||
|
||||
Previously on a duplicate, %ENV would have the last entry for the name
|
||||
from environ[], but a typical getenv() would return the first entry.
|
||||
|
||||
Rather than assuming all getenv() implementations return the first entry
|
||||
explicitly call getenv() to ensure they agree.
|
||||
|
||||
b) remove duplicate entries from environ
|
||||
|
||||
Previously if there was a duplicate definition for a name in environ[]
|
||||
setting that name in %ENV could result in an unsafe value being passed
|
||||
to a child process, so ensure environ[] has no duplicates.
|
||||
|
||||
CVE-2016-2381
|
||||
---
|
||||
|
||||
--- a/perl.c
|
||||
+++ b/perl.c
|
||||
@@ -4298,23 +4298,70 @@ S_init_postdump_symbols(pTHX_ int argc,
|
||||
}
|
||||
if (env) {
|
||||
char *s, *old_var;
|
||||
+ STRLEN nlen;
|
||||
SV *sv;
|
||||
+ HV *dups = newHV();
|
||||
+
|
||||
for (; *env; env++) {
|
||||
old_var = *env;
|
||||
|
||||
if (!(s = strchr(old_var,'=')) || s == old_var)
|
||||
continue;
|
||||
+ nlen = s - old_var;
|
||||
|
||||
#if defined(MSDOS) && !defined(DJGPP)
|
||||
*s = '\0';
|
||||
(void)strupr(old_var);
|
||||
*s = '=';
|
||||
#endif
|
||||
- sv = newSVpv(s+1, 0);
|
||||
- (void)hv_store(hv, old_var, s - old_var, sv, 0);
|
||||
+ if (hv_exists(hv, old_var, nlen)) {
|
||||
+ const char *name = savepvn(old_var, nlen);
|
||||
+
|
||||
+ /* make sure we use the same value as getenv(), otherwise code that
|
||||
+ uses getenv() (like setlocale()) might see a different value to %ENV
|
||||
+ */
|
||||
+ sv = newSVpv(PerlEnv_getenv(name), 0);
|
||||
+
|
||||
+ /* keep a count of the dups of this name so we can de-dup environ later */
|
||||
+ if (hv_exists(dups, name, nlen))
|
||||
+ ++SvIVX(*hv_fetch(dups, name, nlen, 0));
|
||||
+ else
|
||||
+ (void)hv_store(dups, name, nlen, newSViv(1), 0);
|
||||
+
|
||||
+ Safefree(name);
|
||||
+ }
|
||||
+ else {
|
||||
+ sv = newSVpv(s+1, 0);
|
||||
+ }
|
||||
+ (void)hv_store(hv, old_var, nlen, sv, 0);
|
||||
if (env_is_not_environ)
|
||||
mg_set(sv);
|
||||
}
|
||||
+ if (HvKEYS(dups)) {
|
||||
+ /* environ has some duplicate definitions, remove them */
|
||||
+ HE *entry;
|
||||
+ hv_iterinit(dups);
|
||||
+ while ((entry = hv_iternext_flags(dups, 0))) {
|
||||
+ STRLEN nlen;
|
||||
+ const char *name = HePV(entry, nlen);
|
||||
+ IV count = SvIV(HeVAL(entry));
|
||||
+ IV i;
|
||||
+ SV **valp = hv_fetch(hv, name, nlen, 0);
|
||||
+
|
||||
+ assert(valp);
|
||||
+
|
||||
+ /* try to remove any duplicate names, depending on the
|
||||
+ * implementation used in my_setenv() the iteration might
|
||||
+ * not be necessary, but let's be safe.
|
||||
+ */
|
||||
+ for (i = 0; i < count; ++i)
|
||||
+ my_setenv(name, 0);
|
||||
+
|
||||
+ /* and set it back to the value we set $ENV{name} to */
|
||||
+ my_setenv(name, SvPV_nolen(*valp));
|
||||
+ }
|
||||
+ }
|
||||
+ SvREFCNT_dec_NN(dups);
|
||||
}
|
||||
#endif /* USE_ENVIRON_ARRAY */
|
||||
#endif /* !PERL_MICRO */
|
|
@ -1,7 +1,7 @@
|
|||
# This makefile simplifies perl module builds.
|
||||
#
|
||||
|
||||
PERL_VERSION:=5.22
|
||||
PERL_VERSION:=5.24
|
||||
|
||||
# Build environment
|
||||
HOST_PERL_PREFIX:=$(STAGING_DIR_HOSTPKG)/usr
|
||||
|
|
Loading…
Reference in a new issue