diff options
47 files changed, 4570 insertions, 2 deletions
diff --git a/recipes/perl/perl-5.10.1/abstract-sockets.diff b/recipes/perl/perl-5.10.1/abstract-sockets.diff new file mode 100644 index 0000000000..954f9cbb3f --- /dev/null +++ b/recipes/perl/perl-5.10.1/abstract-sockets.diff @@ -0,0 +1,122 @@ +Author: Lubomir Rintel <lkundrak@v3.sk> +Subject: Add support for Abstract namespace sockets. +Bug-Debian: http://bugs.debian.org/490660 +Bug-Debian: http://bugs.debian.org/329291 +Origin: upstream, http://perl5.git.perl.org/perl.git/commit/99f13d4c3419e967e95c5ac6a3af61e9bb0fd3c0 +Origin: upstream, http://perl5.git.perl.org/perl.git/commit/89904c08923161afd23c629d5c2c7472a09c16bb + +trivially backported for 5.10.1 by Niko Tyni <ntyni@debian.org> + + +--- + ext/Socket/Socket.xs | 33 ++++++++++++++++++++++++--------- + ext/Socket/t/Socket.t | 14 ++++++++++++-- + 2 files changed, 36 insertions(+), 11 deletions(-) + +diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs +index 076297f..3522303 100644 +--- a/ext/Socket/Socket.xs ++++ b/ext/Socket/Socket.xs +@@ -303,6 +303,7 @@ pack_sockaddr_un(pathname) + struct sockaddr_un sun_ad; /* fear using sun */ + STRLEN len; + char * pathname_pv; ++ int addr_len; + + Zero( &sun_ad, sizeof sun_ad, char ); + sun_ad.sun_family = AF_UNIX; +@@ -336,7 +337,17 @@ pack_sockaddr_un(pathname) + Copy( pathname_pv, sun_ad.sun_path, len, char ); + # endif + if (0) not_here("dummy"); +- ST(0) = sv_2mortal(newSVpvn((char *)&sun_ad, sizeof sun_ad)); ++ if (len > 1 && sun_ad.sun_path[0] == '\0') { ++ /* Linux-style abstract-namespace socket. ++ * The name is not a file name, but an array of arbitrary ++ * character, starting with \0 and possibly including \0s, ++ * therefore the length of the structure must denote the ++ * end of that character array */ ++ addr_len = (void *)&sun_ad.sun_path - (void *)&sun_ad + len; ++ } else { ++ addr_len = sizeof sun_ad; ++ } ++ ST(0) = sv_2mortal(newSVpvn((char *)&sun_ad, addr_len)); + #else + ST(0) = (SV *) not_here("pack_sockaddr_un"); + #endif +@@ -352,7 +363,7 @@ unpack_sockaddr_un(sun_sv) + struct sockaddr_un addr; + STRLEN sockaddrlen; + char * sun_ad = SvPVbyte(sun_sv,sockaddrlen); +- char * e; ++ int addr_len; + # ifndef __linux__ + /* On Linux sockaddrlen on sockets returned by accept, recvfrom, + getpeername and getsockname is not equal to sizeof(addr). */ +@@ -371,13 +382,17 @@ unpack_sockaddr_un(sun_sv) + addr.sun_family, + AF_UNIX); + } +- e = (char*)addr.sun_path; +- /* On Linux, the name of abstract unix domain sockets begins +- * with a '\0', so allow this. */ +- while ((*e || (e == addr.sun_path && e[1] && sockaddrlen > 1)) +- && e < (char*)addr.sun_path + sizeof addr.sun_path) +- ++e; +- ST(0) = sv_2mortal(newSVpvn(addr.sun_path, e - (char*)addr.sun_path)); ++ ++ if (addr.sun_path[0] == '\0') { ++ /* Linux-style abstract socket address begins with a nul ++ * and can contain nuls. */ ++ addr_len = (void *)&addr - (void *)&addr.sun_path + sockaddrlen; ++ } else { ++ for (addr_len = 0; addr.sun_path[addr_len] ++ && addr_len < sizeof addr.sun_path; addr_len++); ++ } ++ ++ ST(0) = sv_2mortal(newSVpvn(addr.sun_path, addr_len)); + #else + ST(0) = (SV *) not_here("unpack_sockaddr_un"); + #endif +diff --git a/ext/Socket/t/Socket.t b/ext/Socket/t/Socket.t +index f707999..d1e7447 100755 +--- a/ext/Socket/t/Socket.t ++++ b/ext/Socket/t/Socket.t +@@ -14,7 +14,7 @@ BEGIN { + + use Socket qw(:all); + +-print "1..17\n"; ++print "1..18\n"; + + $has_echo = $^O ne 'MSWin32'; + $alarmed = 0; +@@ -152,7 +152,7 @@ print (($@ =~ /^Bad arg length for Socket::sockaddr_family, length is 0, should + + if ($^O eq 'linux') { + # see if we can handle abstract sockets +- my $test_abstract_socket = chr(0) . '/tmp/test-perl-socket'; ++ my $test_abstract_socket = chr(0) . '/org/perl/hello'. chr(0) . 'world'; + my $addr = sockaddr_un ($test_abstract_socket); + my ($path) = sockaddr_un ($addr); + if ($test_abstract_socket eq $path) { +@@ -163,7 +163,17 @@ if ($^O eq 'linux') { + print "# got <$path>\n"; + print "not ok 17\n"; + } ++ ++ # see if we calculate the address structure length correctly ++ if (length ($test_abstract_socket) + 2 == length $addr) { ++ print "ok 18\n"; ++ } else { ++ print "# got ".(length $addr)."\n"; ++ print "not ok 18\n"; ++ } ++ + } else { + # doesn't have abstract socket support + print "ok 17 - skipped on this platform\n"; ++ print "ok 18 - skipped on this platform\n"; + } +-- +tg: (daf8b46..) fixes/abstract-sockets (depends on: upstream) diff --git a/recipes/perl/perl-5.10.1/anon-tmpfile-dir.diff b/recipes/perl/perl-5.10.1/anon-tmpfile-dir.diff new file mode 100644 index 0000000000..a010a6ac9a --- /dev/null +++ b/recipes/perl/perl-5.10.1/anon-tmpfile-dir.diff @@ -0,0 +1,102 @@ +From: Niko Tyni <ntyni@debian.org> +Subject: Honor TMPDIR when open()ing an anonymous temporary file +Bug-Debian: http://bugs.debian.org/528544 +Bug: http://rt.perl.org/rt3/Public/Bug/Display.html?id=66452 + +[perl #66452] + +As reported by Norbert Buchmuller <norbi@nix.hu>, opening an anonymous +temporary file with the magical open($fh, '+>', undef) ignores TMPDIR. + + +--- + perlio.c | 20 ++++++++++++++++---- + t/io/perlio.t | 15 ++++++++++++++- + 2 files changed, 30 insertions(+), 5 deletions(-) + +diff --git a/perlio.c b/perlio.c +index 3803247..3ce579f 100644 +--- a/perlio.c ++++ b/perlio.c +@@ -5167,18 +5167,30 @@ PerlIO_tmpfile(void) + f = PerlIO_fdopen(fd, "w+b"); + #else /* WIN32 */ + # if defined(HAS_MKSTEMP) && ! defined(VMS) && ! defined(OS2) +- SV * const sv = newSVpvs("/tmp/PerlIO_XXXXXX"); ++ int fd = -1; ++ char tempname[] = "/tmp/PerlIO_XXXXXX"; ++ const char * const tmpdir = PL_tainting ? NULL : PerlEnv_getenv("TMPDIR"); ++ SV * const sv = tmpdir && *tmpdir ? newSVpv(tmpdir, 0) : NULL; + /* + * I have no idea how portable mkstemp() is ... NI-S + */ +- const int fd = mkstemp(SvPVX(sv)); ++ if (sv) { ++ /* if TMPDIR is set and not empty, we try that first */ ++ sv_catpv(sv, tempname + 4); ++ fd = mkstemp(SvPVX(sv)); ++ } ++ if (fd < 0) { ++ /* else we try /tmp */ ++ fd = mkstemp(tempname); ++ } + if (fd >= 0) { + f = PerlIO_fdopen(fd, "w+"); + if (f) + PerlIOBase(f)->flags |= PERLIO_F_TEMP; +- PerlLIO_unlink(SvPVX_const(sv)); ++ PerlLIO_unlink(sv ? SvPVX_const(sv) : tempname); + } +- SvREFCNT_dec(sv); ++ if (sv) ++ SvREFCNT_dec(sv); + # else /* !HAS_MKSTEMP, fallback to stdio tmpfile(). */ + FILE * const stdio = PerlSIO_tmpfile(); + +diff --git a/t/io/perlio.t b/t/io/perlio.t +index c145945..c1eebec 100755 +--- a/t/io/perlio.t ++++ b/t/io/perlio.t +@@ -8,13 +8,14 @@ BEGIN { + } + } + +-use Test::More tests => 37; ++use Test::More tests => 39; + + use_ok('PerlIO'); + + my $txt = "txt$$"; + my $bin = "bin$$"; + my $utf = "utf$$"; ++my $nonexistent = "nex$$"; + + my $txtfh; + my $binfh; +@@ -89,6 +90,17 @@ ok(close($utffh)); + # report after STDOUT is restored + ok($status, ' re-open STDOUT'); + close OLDOUT; ++ ++ SKIP: { ++ skip("TMPDIR not honored on this platform", 2) ++ if !$Config{d_mkstemp} ++ || $^O eq 'VMS' || $^O eq 'MSwin32' || $^O eq 'os2'; ++ local $ENV{TMPDIR} = $nonexistent; ++ ok( open(my $x,"+<",undef), 'TMPDIR honored by magic temp file via 3 arg open with undef - works if TMPDIR points to a non-existent dir'); ++ ++ mkdir $ENV{TMPDIR}; ++ ok(open(my $x,"+<",undef), 'TMPDIR honored by magic temp file via 3 arg open with undef - works if TMPDIR points to an existent dir'); ++ } + } + + # in-memory open +@@ -136,5 +148,6 @@ END { + 1 while unlink $txt; + 1 while unlink $bin; + 1 while unlink $utf; ++ rmdir $nonexistent; + } + +-- +tg: (daf8b46..) fixes/anon-tmpfile-dir (depends on: upstream) diff --git a/recipes/perl/perl-5.10.1/archive-tar-instance-error.diff b/recipes/perl/perl-5.10.1/archive-tar-instance-error.diff new file mode 100644 index 0000000000..23c45ef3b7 --- /dev/null +++ b/recipes/perl/perl-5.10.1/archive-tar-instance-error.diff @@ -0,0 +1,109 @@ +From: Niko Tyni <ntyni@debian.org> +Subject: Separate Archive::Tar instance error strings from each other +Bug-Debian: http://bugs.debian.org/539355 +Bug: http://rt.cpan.org/Public/Bug/Display.html?id=48879 + +Included upstream in Archive-Tar-1.54. + + +--- + lib/Archive/Tar.pm | 17 +++++++++++++++-- + lib/Archive/Tar/t/06_error.t | 39 +++++++++++++++++++++++++++++++++++++++ + 2 files changed, 54 insertions(+), 2 deletions(-) + +diff --git a/lib/Archive/Tar.pm b/lib/Archive/Tar.pm +index 022a172..bc97c0e 100644 +--- a/lib/Archive/Tar.pm ++++ b/lib/Archive/Tar.pm +@@ -117,7 +117,7 @@ sub new { + + ### copying $tmpl here since a shallow copy makes it use the + ### same aref, causing for files to remain in memory always. +- my $obj = bless { _data => [ ], _file => 'Unknown' }, $class; ++ my $obj = bless { _data => [ ], _file => 'Unknown', _error => '' }, $class; + + if (@_) { + unless ( $obj->read( @_ ) ) { +@@ -1445,6 +1445,10 @@ method call instead. + my $self = shift; + my $msg = $error = shift; + $longmess = Carp::longmess($error); ++ if (ref $self) { ++ $self->{_error} = $error; ++ $self->{_longmess} = $longmess; ++ } + + ### set Archive::Tar::WARN to 0 to disable printing + ### of errors +@@ -1457,7 +1461,11 @@ method call instead. + + sub error { + my $self = shift; +- return shift() ? $longmess : $error; ++ if (ref $self) { ++ return shift() ? $self->{_longmess} : $self->{_error}; ++ } else { ++ return shift() ? $longmess : $error; ++ } + } + } + +@@ -1817,6 +1825,11 @@ use is very much discouraged. Use the C<error()> method instead: + + warn $tar->error unless $tar->extract; + ++Note that in older versions of this module, the C<error()> method ++would return an effectively global value even when called an instance ++method as above. This has since been fixed, and multiple instances of ++C<Archive::Tar> now have separate error strings. ++ + =head2 $Archive::Tar::INSECURE_EXTRACT_MODE + + This variable indicates whether C<Archive::Tar> should allow +diff --git a/lib/Archive/Tar/t/06_error.t b/lib/Archive/Tar/t/06_error.t +new file mode 100644 +index 0000000..5c728bc +--- /dev/null ++++ b/lib/Archive/Tar/t/06_error.t +@@ -0,0 +1,39 @@ ++BEGIN { ++ if( $ENV{PERL_CORE} ) { ++ chdir '../lib/Archive/Tar' if -d '../lib/Archive/Tar'; ++ } ++ use lib '../../..'; ++} ++ ++BEGIN { chdir 't' if -d 't' } ++ ++use Test::More 'no_plan'; ++use strict; ++use lib '../lib'; ++ ++use Archive::Tar; ++use File::Spec; ++ ++$Archive::Tar::WARN = 0; ++ ++my $t1 = Archive::Tar->new; ++my $t2 = Archive::Tar->new; ++ ++is($Archive::Tar::error, "", "global error string is empty"); ++is($t1->error, "", "error string of object 1 is empty"); ++is($t2->error, "", "error string of object 2 is empty"); ++ ++ok(!$t1->read(), "can't read without a file"); ++ ++isnt($t1->error, "", "error string of object 1 is set"); ++is($Archive::Tar::error, $t1->error, "global error string equals that of object 1"); ++is($Archive::Tar::error, Archive::Tar->error, "the class error method returns the global error"); ++is($t2->error, "", "error string of object 2 is still empty"); ++ ++my $src = File::Spec->catfile( qw[src short b] ); ++ok(!$t2->read($src), "error when opening $src"); ++ ++isnt($t2->error, "", "error string of object 1 is set"); ++isnt($t2->error, $t1->error, "error strings of objects 1 and 2 differ"); ++is($Archive::Tar::error, $t2->error, "global error string equals that of object 2"); ++is($Archive::Tar::error, Archive::Tar->error, "the class error method returns the global error"); +-- +tg: (daf8b46..) fixes/archive-tar-instance-error (depends on: upstream) diff --git a/recipes/perl/perl-5.10.1/arm-alignment.diff b/recipes/perl/perl-5.10.1/arm-alignment.diff new file mode 100644 index 0000000000..28038b7115 --- /dev/null +++ b/recipes/perl/perl-5.10.1/arm-alignment.diff @@ -0,0 +1,39 @@ +From: Niko Tyni <ntyni@debian.org> +Subject: Prevent gcc from optimizing the alignment test away on armel +Bug-Debian: http://bugs.debian.org/289884 +Author: Marc Pignat <marc.pignat@hevs.ch> +Origin: upstream, http://perl5.git.perl.org/perl.git/commit/f1c7503b9028d20741c9a01345ba8704998ea381 + +As hunted down by Marc Pignat, gcc optimizations make the check for +u32align (U32_ALIGNMENT_REQUIRED) a no-op on armel, breaking the MD5 +module. + +--- + Configure | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Configure b/Configure +index 01fa3c0..f39b2f9 100755 +--- a/Configure ++++ b/Configure +@@ -18533,6 +18533,7 @@ $cat <<EOM + + Checking to see whether you can access character data unalignedly... + EOM ++: volatile so that the compiler does not optimize the test away + case "$d_u32align" in + '') $cat >try.c <<EOCP + #include <stdio.h> +@@ -18549,8 +18550,8 @@ $signal_t bletch(int s) { exit(4); } + #endif + int main() { + #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321 +- U8 buf[8]; +- U32 *up; ++ $volatile U8 buf[8]; ++ $volatile U32 *up; + int i; + + if (sizeof(U32) != 4) { +-- +tg: (daf8b46..) fixes/arm-alignment (depends on: upstream) diff --git a/recipes/perl/perl-5.10.1/arm_thread_stress_timeout.diff b/recipes/perl/perl-5.10.1/arm_thread_stress_timeout.diff new file mode 100644 index 0000000000..785ac46361 --- /dev/null +++ b/recipes/perl/perl-5.10.1/arm_thread_stress_timeout.diff @@ -0,0 +1,23 @@ +Subject: Raise the timeout of ext/threads/shared/t/stress.t to accommodate slower build hosts +Bug-Debian: http://bugs.debian.org/501970 + + +--- + ext/threads-shared/t/stress.t | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/ext/threads-shared/t/stress.t b/ext/threads-shared/t/stress.t +index e36ab0a..33aa3b8 100755 +--- a/ext/threads-shared/t/stress.t ++++ b/ext/threads-shared/t/stress.t +@@ -34,7 +34,7 @@ use threads::shared; + { + my $cnt = 50; + +- my $TIMEOUT = 60; ++ my $TIMEOUT = 150; + + my $mutex = 1; + share($mutex); +-- +tg: (daf8b46..) debian/arm_thread_stress_timeout (depends on: upstream) diff --git a/recipes/perl/perl-5.10.1/assorted_docs.diff b/recipes/perl/perl-5.10.1/assorted_docs.diff new file mode 100644 index 0000000000..49c509ff4e --- /dev/null +++ b/recipes/perl/perl-5.10.1/assorted_docs.diff @@ -0,0 +1,25 @@ +Subject: Math::BigInt::CalcEmu documentation grammar fix +Bug-Debian: http://bugs.debian.org/443733 +Origin: upstream, http://perl5.git.perl.org/perl.git/commit/384f06ae49854089e0cf13ffe34560627ea86f8a + +This is fixed in blead by change 33129 but was skipped for maint-5.10. + +--- + lib/Math/BigInt/CalcEmu.pm | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/lib/Math/BigInt/CalcEmu.pm b/lib/Math/BigInt/CalcEmu.pm +index 79efac6..5810f5d 100644 +--- a/lib/Math/BigInt/CalcEmu.pm ++++ b/lib/Math/BigInt/CalcEmu.pm +@@ -295,7 +295,7 @@ Math::BigInt::CalcEmu - Emulate low-level math with BigInt code + =head1 DESCRIPTION + + Contains routines that emulate low-level math functions in BigInt, e.g. +-optional routines the low-level math package does not provide on it's own. ++optional routines the low-level math package does not provide on its own. + + Will be loaded on demand and called automatically by BigInt. + +-- +tg: (daf8b46..) fixes/assorted_docs (depends on: upstream) diff --git a/recipes/perl/perl-5.10.1/autodie-flock.diff b/recipes/perl/perl-5.10.1/autodie-flock.diff new file mode 100644 index 0000000000..19ea3aae67 --- /dev/null +++ b/recipes/perl/perl-5.10.1/autodie-flock.diff @@ -0,0 +1,98 @@ +From: Niko Tyni <ntyni@debian.org> +Subject: Allow for flock returning EAGAIN instead of EWOULDBLOCK on linux/parisc +Bug-Debian: http://bugs.debian.org/543731 +Origin: upstream, http://github.com/pfenwick/autodie/commit/037738e11a6097734b0e1dabdd77b92e5fe35219 + + +--- + lib/Fatal.pm | 14 +++++++++++++- + lib/autodie/t/flock.t | 12 ++++++++++-- + 2 files changed, 23 insertions(+), 3 deletions(-) + +diff --git a/lib/Fatal.pm b/lib/Fatal.pm +old mode 100644 +new mode 100755 +index 18e71ed..c17a257 +--- a/lib/Fatal.pm ++++ b/lib/Fatal.pm +@@ -5,6 +5,7 @@ use Carp; + use strict; + use warnings; + use Tie::RefHash; # To cache subroutine refs ++use Config; + + use constant PERL510 => ( $] >= 5.010 ); + +@@ -52,6 +53,10 @@ our %_EWOULDBLOCK = ( + MSWin32 => 33, + ); + ++# the linux parisc port has separate EAGAIN and EWOULDBLOCK, ++# and the kernel returns EAGAIN ++my $try_EAGAIN = ($^O eq 'linux' and $Config{archname} =~ /hppa|parisc/) ? 1 : 0; ++ + # We have some tags that can be passed in for use with import. + # These are all assumed to be CORE:: + +@@ -720,6 +725,11 @@ sub _one_invocation { + my $EWOULDBLOCK = eval { POSIX::EWOULDBLOCK(); } + || $_EWOULDBLOCK{$^O} + || _autocroak("Internal error - can't overload flock - EWOULDBLOCK not defined on this system."); ++ my $EAGAIN = $EWOULDBLOCK; ++ if ($try_EAGAIN) { ++ $EAGAIN = eval { POSIX::EAGAIN(); } ++ || _autocroak("Internal error - can't overload flock - EAGAIN not defined on this system."); ++ } + + require Fcntl; # For Fcntl::LOCK_NB + +@@ -735,7 +745,9 @@ sub _one_invocation { + # If we failed, but we're using LOCK_NB and + # returned EWOULDBLOCK, it's not a real error. + +- if (\$_[1] & Fcntl::LOCK_NB() and \$! == $EWOULDBLOCK ) { ++ if (\$_[1] & Fcntl::LOCK_NB() and ++ (\$! == $EWOULDBLOCK or ++ ($try_EAGAIN and \$! == $EAGAIN ))) { + return \$retval; + } + +diff --git a/lib/autodie/t/flock.t b/lib/autodie/t/flock.t +index a7550ba..6421a56 100755 +--- a/lib/autodie/t/flock.t ++++ b/lib/autodie/t/flock.t +@@ -2,7 +2,8 @@ + use strict; + use Test::More; + use Fcntl qw(:flock); +-use POSIX qw(EWOULDBLOCK); ++use POSIX qw(EWOULDBLOCK EAGAIN); ++use Config; + + require Fatal; + +@@ -10,6 +11,9 @@ my $EWOULDBLOCK = eval { EWOULDBLOCK() } + || $Fatal::_EWOULDBLOCK{$^O} + || plan skip_all => "EWOULDBLOCK not defined on this system"; + ++my $try_EAGAIN = ($^O eq 'linux' and $Config{archname} =~ /hppa|parisc/) ? 1 : 0; ++my $EAGAIN = eval { EAGAIN() }; ++ + my ($self_fh, $self_fh2); + + eval { +@@ -55,7 +59,11 @@ eval { + $return = flock($self_fh2, LOCK_EX | LOCK_NB); + }; + +-is($!+0, $EWOULDBLOCK, "Double-flocking should be EWOULDBLOCK"); ++if (!$try_EAGAIN) { ++ is($!+0, $EWOULDBLOCK, "Double-flocking should be EWOULDBLOCK"); ++} else { ++ ok($!+0 == $EWOULDBLOCK || $!+0 == $EAGAIN, "Double-flocking should be EWOULDBLOCK or EAGAIN"); ++} + ok(!$return, "flocking a file twice should fail"); + is($@, "", "Non-blocking flock should not fail on EWOULDBLOCK"); + +-- +tg: (daf8b46..) fixes/autodie-flock (depends on: upstream) diff --git a/recipes/perl/perl-5.10.1/cpan_config_path.diff b/recipes/perl/perl-5.10.1/cpan_config_path.diff new file mode 100644 index 0000000000..c4f161977c --- /dev/null +++ b/recipes/perl/perl-5.10.1/cpan_config_path.diff @@ -0,0 +1,22 @@ +Subject: Set location of CPAN::Config to /etc/perl as /usr may not be writable. + + +--- + lib/CPAN/HandleConfig.pm | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/lib/CPAN/HandleConfig.pm b/lib/CPAN/HandleConfig.pm +index 903b414..ba7dae8 100644 +--- a/lib/CPAN/HandleConfig.pm ++++ b/lib/CPAN/HandleConfig.pm +@@ -541,7 +541,7 @@ sub load { + $configpm = $INC{"CPAN/MyConfig.pm"}; + $redo++; + } else { +- my($path_to_cpan) = File::Basename::dirname($INC{"CPAN.pm"}); ++ my($path_to_cpan) = '/etc/perl'; + my($configpmdir) = File::Spec->catdir($path_to_cpan,"CPAN"); + my($configpmtest) = File::Spec->catfile($configpmdir,"Config.pm"); + my $inc_key; +-- +tg: (daf8b46..) debian/cpan_config_path (depends on: upstream) diff --git a/recipes/perl/perl-5.10.1/cpan_definstalldirs.diff b/recipes/perl/perl-5.10.1/cpan_definstalldirs.diff new file mode 100644 index 0000000000..1b306aba12 --- /dev/null +++ b/recipes/perl/perl-5.10.1/cpan_definstalldirs.diff @@ -0,0 +1,35 @@ +Subject: Provide a sensible INSTALLDIRS default for modules installed from CPAN. + +Some modules which are included in core set INSTALLDIRS => 'perl' +explicitly in Makefile.PL or Build.PL. This makes sense for the normal @INC +ordering, but not ours. + + +--- + lib/CPAN/FirstTime.pm | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/CPAN/FirstTime.pm b/lib/CPAN/FirstTime.pm +index 50bebc3..0136fef 100644 +--- a/lib/CPAN/FirstTime.pm ++++ b/lib/CPAN/FirstTime.pm +@@ -952,7 +952,7 @@ sub init { + my_prompt_loop(prefer_installer => 'MB', $matcher, 'MB|EUMM|RAND'); + + if (!$matcher or 'makepl_arg make_arg' =~ /$matcher/) { +- my_dflt_prompt(makepl_arg => "", $matcher); ++ my_dflt_prompt(makepl_arg => "INSTALLDIRS=site", $matcher); + my_dflt_prompt(make_arg => "", $matcher); + if ( $CPAN::Config->{makepl_arg} =~ /LIBS=|INC=/ ) { + $CPAN::Frontend->mywarn( +@@ -974,7 +974,7 @@ sub init { + my_dflt_prompt(make_install_arg => $CPAN::Config->{make_arg} || "", + $matcher); + +- my_dflt_prompt(mbuildpl_arg => "", $matcher); ++ my_dflt_prompt(mbuildpl_arg => "--installdirs site", $matcher); + my_dflt_prompt(mbuild_arg => "", $matcher); + + if (exists $CPAN::HandleConfig::keys{mbuild_install_build_command} +-- +tg: (daf8b46..) debian/cpan_definstalldirs (depends on: upstream) diff --git a/recipes/perl/perl-5.10.1/cpanplus_config_path.diff b/recipes/perl/perl-5.10.1/cpanplus_config_path.diff new file mode 100644 index 0000000000..321ac451d2 --- /dev/null +++ b/recipes/perl/perl-5.10.1/cpanplus_config_path.diff @@ -0,0 +1,43 @@ +From: Niko Tyni <ntyni@debian.org> +Subject: Save local versions of CPANPLUS::Config::System into /etc/perl. + +This is a configuration file and needs to go in /etc by policy. +Besides, /usr may not even be writable. + +This mirrors the Debian setup of CPAN.pm in debian/cpan_config_path. + +See #533707. + +--- + lib/CPANPLUS/Configure.pm | 1 + + lib/CPANPLUS/Internals/Constants.pm | 3 +++ + 2 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/lib/CPANPLUS/Configure.pm b/lib/CPANPLUS/Configure.pm +index 2d249e5..bbed1b8 100644 +--- a/lib/CPANPLUS/Configure.pm ++++ b/lib/CPANPLUS/Configure.pm +@@ -276,6 +276,7 @@ Saves the configuration to the package name you provided. + If this package is not C<CPANPLUS::Config::System>, it will + be saved in your C<.cpanplus> directory, otherwise it will + be attempted to be saved in the system wide directory. ++(On Debian systems, this system wide directory is /etc/perl.) + + If no argument is provided, it will default to your personal + config. +diff --git a/lib/CPANPLUS/Internals/Constants.pm b/lib/CPANPLUS/Internals/Constants.pm +index 1d05c98..7a5cef8 100644 +--- a/lib/CPANPLUS/Internals/Constants.pm ++++ b/lib/CPANPLUS/Internals/Constants.pm +@@ -194,6 +194,9 @@ use constant CONFIG_USER_FILE => sub { + ) . '.pm'; + }; + use constant CONFIG_SYSTEM_FILE => sub { ++ # Debian-specific short |
