diff options
Diffstat (limited to 'debian/patches/fixes')
-rw-r--r-- | debian/patches/fixes/autodie-scope.diff | 97 | ||||
-rw-r--r-- | debian/patches/fixes/cpan_web_link.diff | 24 | ||||
-rw-r--r-- | debian/patches/fixes/document_makemaker_ccflags.diff | 28 | ||||
-rw-r--r-- | debian/patches/fixes/eumm-usrmerge.diff | 122 | ||||
-rw-r--r-- | debian/patches/fixes/getopt-long-4.diff | 28 | ||||
-rw-r--r-- | debian/patches/fixes/gid-parsing.diff | 35 | ||||
-rw-r--r-- | debian/patches/fixes/math_complex_doc_angle_units.diff | 26 | ||||
-rw-r--r-- | debian/patches/fixes/math_complex_doc_great_circle.diff | 23 | ||||
-rw-r--r-- | debian/patches/fixes/math_complex_doc_see_also.diff | 23 | ||||
-rw-r--r-- | debian/patches/fixes/memoize-pod.diff | 32 | ||||
-rw-r--r-- | debian/patches/fixes/memoize_storable_nstore.diff | 108 | ||||
-rw-r--r-- | debian/patches/fixes/respect_umask.diff | 150 |
12 files changed, 696 insertions, 0 deletions
diff --git a/debian/patches/fixes/autodie-scope.diff b/debian/patches/fixes/autodie-scope.diff new file mode 100644 index 0000000..f6372f3 --- /dev/null +++ b/debian/patches/fixes/autodie-scope.diff @@ -0,0 +1,97 @@ +From: Niko Tyni <ntyni@debian.org> +Date: Mon, 21 Dec 2015 19:20:12 +0200 +Subject: Fix a scoping issue with "no autodie" and the "system" sub + +Don't queue nonexisting subs for reinstalling later when +exiting the 'no autodie' scope. + +FIXME: if the original sub 'can be undef for "CORE::" subs', does this +break for those? Is that the case when $symbol =~ /::/, as guarded for +on L566? + +Bug: https://github.com/pjf/autodie/issues/69 +Bug-Debian: https://bugs.debian.org/798096 +Origin: upstream, https://github.com/pjf/autodie/commit/c1b4fc4a319f8139d1cd6770bfb7b72a59ae232d +--- + cpan/autodie/lib/Fatal.pm | 7 ++++++- + cpan/autodie/t/no-all.t | 22 ++++++++++++++++++++++ + cpan/autodie/t/no-default.t | 23 +++++++++++++++++++++++ + 3 files changed, 51 insertions(+), 1 deletion(-) + create mode 100644 cpan/autodie/t/no-all.t + create mode 100644 cpan/autodie/t/no-default.t + +diff --git a/cpan/autodie/lib/Fatal.pm b/cpan/autodie/lib/Fatal.pm +index 16e1743..2058abd 100644 +--- a/cpan/autodie/lib/Fatal.pm ++++ b/cpan/autodie/lib/Fatal.pm +@@ -580,7 +580,12 @@ sub unimport { + # Record the current sub to be reinstalled at end of scope + # and then restore the original (can be undef for "CORE::" + # subs) +- $reinstall_subs{$symbol} = \&$sub; ++ ++ { ++ no strict 'refs'; ++ $reinstall_subs{$symbol} = \&$sub ++ if exists ${"${pkg}::"}{$symbol}; ++ } + $uninstall_subs{$symbol} = $Original_user_sub{$sub}; + + } +diff --git a/cpan/autodie/t/no-all.t b/cpan/autodie/t/no-all.t +new file mode 100644 +index 0000000..1a503f6 +--- /dev/null ++++ b/cpan/autodie/t/no-all.t +@@ -0,0 +1,22 @@ ++#!/usr/bin/perl ++ ++package foo; ++use warnings; ++use strict; ++use Test::More tests => 1; ++use autodie qw(:all); ++ ++use_system(); ++ok("system() works with a lexical 'no autodie' block (github issue #69"); ++ ++sub break_system { ++ no autodie; ++ open(my $fh, "<", 'NONEXISTENT'); ++ ok("survived failing open"); ++} ++ ++sub use_system { ++ system($^X, '-e' , 1); ++} ++ ++1; +diff --git a/cpan/autodie/t/no-default.t b/cpan/autodie/t/no-default.t +new file mode 100644 +index 0000000..44d2acf +--- /dev/null ++++ b/cpan/autodie/t/no-default.t +@@ -0,0 +1,23 @@ ++#!/usr/bin/perl ++ ++package foo; ++use warnings; ++use strict; ++use Test::More tests => 2; ++use autodie; ++ ++ ++use_system(); ++ok("system() works with a lexical 'no autodie' block (github issue #69"); ++break_system(); ++ ++sub break_system { ++ no autodie; ++ open(my $fh, "<", 'NONEXISTENT'); ++ ok("survived failing open"); ++} ++ ++sub use_system { ++ system($^X, '-e' , 1); ++} ++1; diff --git a/debian/patches/fixes/cpan_web_link.diff b/debian/patches/fixes/cpan_web_link.diff new file mode 100644 index 0000000..958e1bc --- /dev/null +++ b/debian/patches/fixes/cpan_web_link.diff @@ -0,0 +1,24 @@ +From: Dominic Hargreaves <dom@earth.li> +Date: Sat, 30 Apr 2016 23:13:34 +0100 +Subject: CPAN: Add link to main CPAN web site + +Bug: https://github.com/andk/cpanpm/pull/96 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=367291 +--- + cpan/CPAN/lib/CPAN.pm | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/cpan/CPAN/lib/CPAN.pm b/cpan/CPAN/lib/CPAN.pm +index 0c9b9f5..3f30a83 100644 +--- a/cpan/CPAN/lib/CPAN.pm ++++ b/cpan/CPAN/lib/CPAN.pm +@@ -3992,6 +3992,9 @@ your operating system) then typing C<cpan> in a console window will + work for you as well. Above that the utility provides several + commandline shortcuts. + ++The main CPAN website, which includes general information about the ++service, is at L<http://www.cpan.org/>. ++ + melezhik (Alexey) sent me a link where he published a chef recipe to + work with CPAN.pm: http://community.opscode.com/cookbooks/cpan. + diff --git a/debian/patches/fixes/document_makemaker_ccflags.diff b/debian/patches/fixes/document_makemaker_ccflags.diff new file mode 100644 index 0000000..987b321 --- /dev/null +++ b/debian/patches/fixes/document_makemaker_ccflags.diff @@ -0,0 +1,28 @@ +From: Niko Tyni <ntyni@debian.org> +Date: Mon, 30 May 2011 22:54:24 +0300 +Subject: Document that CCFLAGS should include $Config{ccflags} + +Bug: https://rt.cpan.org/Public/Bug/Display.html?id=68613 +Bug-Debian: http://bugs.debian.org/628522 + +Compiling XS extensions without $Config{ccflags} can break the +binary interface on some platforms. +--- + cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm +index 90d9eac..81bdc96 100644 +--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm ++++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm +@@ -1838,6 +1838,10 @@ currently used by MakeMaker but may be handy in Makefile.PLs. + String that will be included in the compiler call command line between + the arguments INC and OPTIMIZE. + ++The default value is taken from $Config{ccflags}. When overriding ++CCFLAGS, make sure to include the $Config{ccflags} settings to avoid ++binary incompatibilities. ++ + =item CONFIG + + Arrayref. E.g. [qw(archname manext)] defines ARCHNAME & MANEXT from diff --git a/debian/patches/fixes/eumm-usrmerge.diff b/debian/patches/fixes/eumm-usrmerge.diff new file mode 100644 index 0000000..e228aaa --- /dev/null +++ b/debian/patches/fixes/eumm-usrmerge.diff @@ -0,0 +1,122 @@ +From: =?utf-8?q?Dagfinn_Ilmari_Manns=C3=A5ker?= <ilmari@ilmari.org> +Date: Tue, 13 Nov 2018 16:00:48 +0000 +Subject: Avoid mangling /bin non-perl shebangs on merged-/usr systems + +If the shebang is absolute and exists in PATH, but was not the first +one found, leave it alone if it's actually the same file as first one. + +This avoids packages built on merged-/usr systems with /usr/bin before +/bin in the path breaking when installed on systems without merged +/usr. See e.g. https://bugs.debian.org/913637. + +Origin: backport, https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/commit/9766f9c5ffd1ac915d75b309cd18c9f42794b710 +Bug: https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/pull/330 +Bug-Debian: https://bugs.debian.org/913637 +--- + cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 22 +++++++++++++-- + cpan/ExtUtils-MakeMaker/t/fixin.t | 33 +++++++++++++++++++++- + .../t/lib/MakeMaker/Test/Setup/BFD.pm | 3 ++ + 3 files changed, 55 insertions(+), 3 deletions(-) + +diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm +index bb41b27..2e33d0a 100644 +--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm ++++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm +@@ -1243,8 +1243,8 @@ sub _fixin_replace_shebang { + my ( $self, $file, $line ) = @_; + + # Now figure out the interpreter name. +- my ( $cmd, $arg ) = split ' ', $line, 2; +- $cmd =~ s!^.*/!!; ++ my ( $origcmd, $arg ) = split ' ', $line, 2; ++ (my $cmd = $origcmd) =~ s!^.*/!!; + + # Now look (in reverse) for interpreter in absolute PATH (unless perl). + my $interpreter; +@@ -1270,6 +1270,24 @@ sub _fixin_replace_shebang { + $interpreter = $maybefile; + } + } ++ ++ # If the shebang is absolute and exists in PATH, but was not ++ # the first one found, leave it alone if it's actually the ++ # same file as first one. This avoids packages built on ++ # merged-/usr systems with /usr/bin before /bin in the path ++ # breaking when installed on systems without merged /usr ++ if ($origcmd ne $interpreter and $self->file_name_is_absolute($origcmd)) { ++ my $origdir = dirname($origcmd); ++ if ($self->maybe_command($origcmd) && grep { $_ eq $origdir } @absdirs) { ++ my ($odev, $oino) = stat $origcmd; ++ my ($idev, $iino) = stat $interpreter; ++ if ($odev == $idev && $oino == $iino) { ++ warn "$origcmd is the same as $interpreter, leaving alone" ++ if $Verbose; ++ $interpreter = $origcmd; ++ } ++ } ++ } + } + + # Figure out how to invoke interpreter on this machine. +diff --git a/cpan/ExtUtils-MakeMaker/t/fixin.t b/cpan/ExtUtils-MakeMaker/t/fixin.t +index 061e456..872b023 100644 +--- a/cpan/ExtUtils-MakeMaker/t/fixin.t ++++ b/cpan/ExtUtils-MakeMaker/t/fixin.t +@@ -9,7 +9,7 @@ BEGIN { + + use File::Spec; + +-use Test::More tests => 22; ++use Test::More tests => 30; + + use Config; + use TieOut; +@@ -123,3 +123,34 @@ END + } + ); + } ++ ++SKIP: { ++ eval { chmod(0755, "usrbin/interp") } ++ or skip "no chmod", 8; ++ ++ my $dir = getcwd(); ++ local $ENV{PATH} = join $Config{path_sep}, map "$dir/$_", qw(usrbin bin); ++ ++ test_fixin(<<END, ++#!$dir/bin/interp ++ ++blah blah blah ++END ++ sub { ++ is $_[0], "#!$dir/usrbin/interp\n", 'interpreter updated to one found in PATH'; ++ } ++ ); ++ ++ eval { symlink("../usrbin/interp", "bin/interp") } ++ or skip "no symlinks", 4; ++ ++ test_fixin(<<END, ++#!$dir/bin/interp ++ ++blah blah blah ++END ++ sub { ++ is $_[0], "#!$dir/bin/interp\n", 'symlinked interpreter later in PATH not mangled'; ++ } ++ ); ++} +diff --git a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/BFD.pm b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/BFD.pm +index 3d093fc..cfe49e5 100644 +--- a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/BFD.pm ++++ b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/BFD.pm +@@ -53,6 +53,9 @@ program - this is a program + =cut + + 1; ++END ++ 'Big-Dummy/usrbin/interp' => <<'END', ++This is a dummy interpreter + END + + 'Big-Dummy/test.pl' => <<'END', diff --git a/debian/patches/fixes/getopt-long-4.diff b/debian/patches/fixes/getopt-long-4.diff new file mode 100644 index 0000000..9d5750e --- /dev/null +++ b/debian/patches/fixes/getopt-long-4.diff @@ -0,0 +1,28 @@ +From: Johan Vromans <jvromans@squirrel.nl> +Date: Tue, 13 Jun 2017 13:26:00 +0200 +Subject: Fix issue #122068. + +Origin: backport, https://github.com/sciurius/perl-Getopt-Long/commit/2d16f355e25537aa742eb2833a7d52a63051429b +Bug: https://rt.cpan.org/Ticket/Display.html?id=122068 +Bug-Debian: https://bugs.debian.org/864544 +--- + cpan/Getopt-Long/lib/Getopt/Long.pm | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/cpan/Getopt-Long/lib/Getopt/Long.pm b/cpan/Getopt-Long/lib/Getopt/Long.pm +index 664c8b6..e4e3026 100644 +--- a/cpan/Getopt-Long/lib/Getopt/Long.pm ++++ b/cpan/Getopt-Long/lib/Getopt/Long.pm +@@ -1123,6 +1123,12 @@ sub FindOption ($$$$$) { + $optargtype = 3; + } + if(($optargtype == 0) && !$mand) { ++ if ( $type eq 'I' ) { ++ # Fake incremental type. ++ my @c = @$ctl; ++ $c[CTL_TYPE] = '+'; ++ return (1, $opt, \@c, 1); ++ } + my $val + = defined($ctl->[CTL_DEFAULT]) ? $ctl->[CTL_DEFAULT] + : $type eq 's' ? '' diff --git a/debian/patches/fixes/gid-parsing.diff b/debian/patches/fixes/gid-parsing.diff new file mode 100644 index 0000000..4c0bd46 --- /dev/null +++ b/debian/patches/fixes/gid-parsing.diff @@ -0,0 +1,35 @@ +From: Manuel Mausz <manuel@mausz.at> +Date: Tue, 4 Jun 2019 00:29:09 +0200 +Subject: (perl #134169) mg.c reset endptr after use + +Perl_grok_atoUV has been changed so endptr constraints the input. Thus we need to reset the endptr after every use. + +Bug: https://rt.perl.org/Public/Bug/Display.html?id=134169 +Bug-Debian: https://bugs.debian.org/941985 +Origin: backport, http://perl5.git.perl.org/perl.git/commitdiff/79e302e6c3f815bf4cb72a5bacc3012595970db9 +--- + mg.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/mg.c b/mg.c +index afe452f..910bbd1 100644 +--- a/mg.c ++++ b/mg.c +@@ -3178,7 +3178,8 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) + { + const char *p = SvPV_const(sv, len); + Groups_t *gary = NULL; +- const char* endptr = p + len; ++ const char* p_end = p + len; ++ const char* endptr = p_end; + UV uv; + #ifdef _SC_NGROUPS_MAX + int maxgrp = sysconf(_SC_NGROUPS_MAX); +@@ -3201,6 +3202,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) + if (endptr == NULL) + break; + p = endptr; ++ endptr = p_end; + while (isSPACE(*p)) + ++p; + if (!*p) diff --git a/debian/patches/fixes/math_complex_doc_angle_units.diff b/debian/patches/fixes/math_complex_doc_angle_units.diff new file mode 100644 index 0000000..215c240 --- /dev/null +++ b/debian/patches/fixes/math_complex_doc_angle_units.diff @@ -0,0 +1,26 @@ +From: Dominic Hargreaves <dom@earth.li> +Date: Sat, 30 Apr 2016 22:56:56 +0100 +Subject: Math::Trig: document angle units + +Bug: https://rt.cpan.org/Ticket/Display.html?id=114106 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731505 +--- + cpan/Math-Complex/lib/Math/Trig.pm | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/cpan/Math-Complex/lib/Math/Trig.pm b/cpan/Math-Complex/lib/Math/Trig.pm +index acad31f..bc7ac78 100644 +--- a/cpan/Math-Complex/lib/Math/Trig.pm ++++ b/cpan/Math-Complex/lib/Math/Trig.pm +@@ -263,6 +263,11 @@ core Perl which defines only the C<sin()> and C<cos()>. The constant + B<pi> is also defined as are a few convenience functions for angle + conversions, and I<great circle formulas> for spherical movement. + ++=head1 ANGLES ++ ++All angles are defined in radians, except where otherwise specified ++(for example in the deg/rad conversion functions). ++ + =head1 TRIGONOMETRIC FUNCTIONS + + The tangent diff --git a/debian/patches/fixes/math_complex_doc_great_circle.diff b/debian/patches/fixes/math_complex_doc_great_circle.diff new file mode 100644 index 0000000..9eed968 --- /dev/null +++ b/debian/patches/fixes/math_complex_doc_great_circle.diff @@ -0,0 +1,23 @@ +From: Dominic Hargreaves <dom@earth.li> +Date: Sat, 30 Apr 2016 22:50:52 +0100 +Subject: Math::Trig: clarify definition of great_circle_midpoint + +Bug: https://rt.cpan.org/Ticket/Display.html?id=114104 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=697567 +--- + cpan/Math-Complex/lib/Math/Trig.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cpan/Math-Complex/lib/Math/Trig.pm b/cpan/Math-Complex/lib/Math/Trig.pm +index 1d9612a..efc2ff8 100644 +--- a/cpan/Math-Complex/lib/Math/Trig.pm ++++ b/cpan/Math-Complex/lib/Math/Trig.pm +@@ -608,7 +608,7 @@ or the midpoint if you know the end points: + ($thetam, $phim) = + great_circle_midpoint($theta0, $phi0, $theta1, $phi1); + +-The great_circle_midpoint() is just a special case of ++The great_circle_midpoint() is just a special case (with $way = 0.5) of + + =head2 great_circle_waypoint + diff --git a/debian/patches/fixes/math_complex_doc_see_also.diff b/debian/patches/fixes/math_complex_doc_see_also.diff new file mode 100644 index 0000000..7a19833 --- /dev/null +++ b/debian/patches/fixes/math_complex_doc_see_also.diff @@ -0,0 +1,23 @@ +From: Dominic Hargreaves <dom@earth.li> +Date: Sat, 30 Apr 2016 22:53:44 +0100 +Subject: Math::Trig: add missing SEE ALSO + +Bug: https://rt.cpan.org/Ticket/Display.html?id=114105 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=697568 +--- + cpan/Math-Complex/lib/Math/Trig.pm | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cpan/Math-Complex/lib/Math/Trig.pm b/cpan/Math-Complex/lib/Math/Trig.pm +index efc2ff8..acad31f 100644 +--- a/cpan/Math-Complex/lib/Math/Trig.pm ++++ b/cpan/Math-Complex/lib/Math/Trig.pm +@@ -743,6 +743,8 @@ an answer instead of giving a fatal runtime error. + + Do not attempt navigation using these formulas. + ++=head1 SEE ALSO ++ + L<Math::Complex> + + =head1 AUTHORS diff --git a/debian/patches/fixes/memoize-pod.diff b/debian/patches/fixes/memoize-pod.diff new file mode 100644 index 0000000..e253a07 --- /dev/null +++ b/debian/patches/fixes/memoize-pod.diff @@ -0,0 +1,32 @@ +From: Niko Tyni <ntyni@debian.org> +Date: Sat, 6 Feb 2016 20:15:19 +0200 +Subject: Fix POD errors in Memoize + +Bug: https://rt.cpan.org/Public/Bug/Display.html?id=89441 +Author: Dominic Hargreaves <dom@cpan.org> +--- + cpan/Memoize/Memoize.pm | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cpan/Memoize/Memoize.pm b/cpan/Memoize/Memoize.pm +index f4e6522d4..2f28b36 100644 +--- a/cpan/Memoize/Memoize.pm ++++ b/cpan/Memoize/Memoize.pm +@@ -752,6 +752,8 @@ cache that was populated by the first call. C<complicated> ends up + being called only once, and both subsequent calls return C<3> from the + cache, regardless of the calling context. + ++=back ++ + =head3 List values in scalar context + + Consider this function: +@@ -801,8 +803,6 @@ This normalizer function will store scalar context return values in + the disk file under keys that begin with C<S:>, and list context + return values under keys that begin with C<L:>. + +-=back +- + =head1 OTHER FACILITIES + + =head2 C<unmemoize> diff --git a/debian/patches/fixes/memoize_storable_nstore.diff b/debian/patches/fixes/memoize_storable_nstore.diff new file mode 100644 index 0000000..ba58a56 --- /dev/null +++ b/debian/patches/fixes/memoize_storable_nstore.diff @@ -0,0 +1,108 @@ +From: Jonathan Nieder <jrnieder@gmail.com> +Date: Fri, 27 Jul 2012 10:35:07 -0500 +Subject: Memoize::Storable: respect 'nstore' option not respected +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +Memoize(3perl) says: + + tie my %cache => 'Memoize::Storable', $filename, 'nstore'; + memoize 'function', SCALAR_CACHE => [HASH => \%cache]; + + Include the ‘nstore’ option to have the "Storable" database + written in ‘network order’. (See Storable for more details + about this.) + +In fact the "nstore" option does no such thing. Option parsing looks +like this: + + @options{@_} = (); + +$self->{OPTIONS}{'nstore'} is accordingly set to undef. Later +Memoize::Storable checks if the option is true, and since undef is +not true, the "else" branch is always taken. + + if ($self->{OPTIONS}{'nstore'}) { + Storable::nstore($self->{H}, $self->{FILENAME}); + } else { + Storable::store($self->{H}, $self->{FILENAME}); + } + +Correcting the condition to (exists $self->{OPTIONS}{'nstore'}) fixes +it. + +Noticed because git-svn, which uses the 'nstore' option for its +on-disk caches, was producing + + Byte order is not compatible at ../../lib/Storable.pm + +when run using a perl with a different integer size (and hence +byteorder). + +Reported by Tim Retout (RT#77790) + +Bug-Debian: http://bugs.debian.org/587650 +Bug: https://rt.cpan.org/Public/Bug/Display.html?id=77790 +Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=77790 +--- + cpan/Memoize/Memoize/Storable.pm | 2 +- + cpan/Memoize/t/tie_storable.t | 24 ++++++++++++++++++++---- + 2 files changed, 21 insertions(+), 5 deletions(-) + +diff --git a/cpan/Memoize/Memoize/Storable.pm b/cpan/Memoize/Memoize/Storable.pm +index 1314797..87876f2 100644 +--- a/cpan/Memoize/Memoize/Storable.pm ++++ b/cpan/Memoize/Memoize/Storable.pm +@@ -55,7 +55,7 @@ sub DESTROY { + require Carp if $Verbose; + my $self= shift; + print STDERR "Memoize::Storable::DESTROY(@_)\n" if $Verbose; +- if ($self->{OPTIONS}{'nstore'}) { ++ if (exists $self->{OPTIONS}{'nstore'}) { + Storable::nstore($self->{H}, $self->{FILENAME}); + } else { + Storable::store($self->{H}, $self->{FILENAME}); +diff --git a/cpan/Memoize/t/tie_storable.t b/cpan/Memoize/t/tie_storable.t +index de3b8dc..a624238 100644 +--- a/cpan/Memoize/t/tie_storable.t ++++ b/cpan/Memoize/t/tie_storable.t +@@ -31,18 +31,34 @@ if ($@) { + exit 0; + } + +-print "1..4\n"; ++print "1..9\n"; + + $file = "storable$$"; + 1 while unlink $file; + tryout('Memoize::Storable', $file, 1); # Test 1..4 + 1 while unlink $file; ++tryout('Memoize::Storable', $file, 5, 'nstore'); # Test 5..8 ++assert_netorder($file, 9); # Test 9 ++1 while unlink $file; ++ ++ ++sub assert_netorder { ++ my ($file, $testno) = @_; ++ ++ my $netorder = Storable::file_magic($file)->{'netorder'}; ++ print ($netorder ? "ok $testno\n" : "not ok $testno\n"); ++} + + sub tryout { +- my ($tiepack, $file, $testno) = @_; ++ my ($tiepack, $file, $testno, $option) = @_; + +- tie my %cache => $tiepack, $file +- or die $!; ++ if (defined $option) { ++ tie my %cache => $tiepack, $file, $option ++ or die $!; ++ } else { ++ tie my %cache => $tiepack, $file ++ or die $!; ++ } + + memoize 'c5', + SCALAR_CACHE => [HASH => \%cache], diff --git a/debian/patches/fixes/respect_umask.diff b/debian/patches/fixes/respect_umask.diff new file mode 100644 index 0000000..d3f84e4 --- /dev/null +++ b/debian/patches/fixes/respect_umask.diff @@ -0,0 +1,150 @@ +From: Brendan O'Dea <bod@debian.org> +Date: Tue, 8 Mar 2005 19:30:38 +1100 +Subject: Respect umask during installation + +This is needed to satisfy Debian policy regarding group-writable +site directories. +--- + cpan/ExtUtils-Install/lib/ExtUtils/Install.pm | 18 +++++++++--------- + cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 18 +++++++++--------- + 2 files changed, 18 insertions(+), 18 deletions(-) + +diff --git a/cpan/ExtUtils-Install/lib/ExtUtils/Install.pm b/cpan/ExtUtils-Install/lib/ExtUtils/Install.pm +index 047c007..cd7e4f2 100644 +--- a/cpan/ExtUtils-Install/lib/ExtUtils/Install.pm ++++ b/cpan/ExtUtils-Install/lib/ExtUtils/Install.pm +@@ -463,7 +463,7 @@ sub _can_write_dir { + + =pod + +-=item _mkpath($dir,$show,$mode,$verbose,$dry_run) ++=item _mkpath($dir,$show,$verbose,$dry_run) + + Wrapper around File::Path::mkpath() to handle errors. + +@@ -480,13 +480,13 @@ writable. + =cut + + sub _mkpath { +- my ($dir,$show,$mode,$verbose,$dry_run)=@_; ++ my ($dir,$show,$verbose,$dry_run)=@_; + if ( $verbose && $verbose > 1 && ! -d $dir) { + $show= 1; +- printf "mkpath(%s,%d,%#o)\n", $dir, $show, $mode; ++ printf "mkpath(%s,%d)\n", $dir, $show; + } + if (!$dry_run) { +- if ( ! eval { File::Path::mkpath($dir,$show,$mode); 1 } ) { ++ if ( ! eval { File::Path::mkpath($dir,$show); 1 } ) { + _choke("Can't create '$dir'","$@"); + } + +@@ -799,7 +799,7 @@ sub install { #XXX OS-SPECIFIC + _chdir($cwd); + } + foreach my $targetdir (sort keys %check_dirs) { +- _mkpath( $targetdir, 0, 0755, $verbose, $dry_run ); ++ _mkpath( $targetdir, 0, $verbose, $dry_run ); + } + foreach my $found (@found_files) { + my ($diff, $ffd, $origfile, $mode, $size, $atime, $mtime, +@@ -813,7 +813,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, $verbose, $dry_run ); + } + print "Installing $targetfile\n"; + +@@ -853,7 +853,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, $verbose, $dry_run ); + print "Writing $pack{'write'}\n" if $verbose; + $packlist->write(install_rooted_file($pack{'write'})) unless $dry_run; + } +@@ -1199,7 +1199,7 @@ environment variable will silence this output. + sub pm_to_blib { + my($fromto,$autodir,$pm_filter) = @_; + +- _mkpath($autodir,0,0755) if defined $autodir; ++ _mkpath($autodir,0) if defined $autodir; + while(my($from, $to) = each %$fromto) { + if( -f $to && -s $from == -s $to && -M $to < -M $from ) { + print "Skip $to (unchanged)\n" unless $INSTALL_QUIET; +@@ -1222,7 +1222,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); + } + if ($need_filtering) { + run_filter($pm_filter, $from, $to); +diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm +index fe53be1..274e35c 100644 +--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm ++++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm +@@ -2229,7 +2229,7 @@ doc__install : doc_site_install + $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site + + pure_perl_install :: all +- $(NOECHO) $(MOD_INSTALL) \ ++ $(NOECHO) umask 022; $(MOD_INSTALL) \ + }; + + push @m, +@@ -2249,7 +2249,7 @@ q{ "$(INST_LIB)" "$(DESTINSTALLPRIVLIB)" \ + + + pure_site_install :: all +- $(NOECHO) $(MOD_INSTALL) \ ++ $(NOECHO) umask 022; $(MOD_INSTALL) \ + }; + push @m, + q{ read "}.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{" \ +@@ -2267,7 +2267,7 @@ q{ "$(INST_LIB)" "$(DESTINSTALLSITELIB)" \ + "}.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{" + + pure_vendor_install :: all +- $(NOECHO) $(MOD_INSTALL) \ ++ $(NOECHO) umask 022; $(MOD_INSTALL) \ + }; + push @m, + q{ read "}.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{" \ +@@ -2299,8 +2299,8 @@ doc_vendor_install :: all + push @m, q{ + doc_perl_install :: all + $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod" +- -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)" +- -$(NOECHO) $(DOC_INSTALL) \ ++ -$(NOECHO) umask 022; $(MKPATH) "$(DESTINSTALLARCHLIB)" ++ -$(NOECHO) umask 022; $(DOC_INSTALL) \ + "Module" "$(NAME)" \ + "installed into" "$(INSTALLPRIVLIB)" \ + LINKTYPE "$(LINKTYPE)" \ +@@ -2310,8 +2310,8 @@ doc_perl_install :: all + + doc_site_install :: all + $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod" +- -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)" +- -$(NOECHO) $(DOC_INSTALL) \ ++ -$(NOECHO) umask 022; $(MKPATH) "$(DESTINSTALLARCHLIB)" ++ -$(NOECHO) umask 022; $(DOC_INSTALL) \ + "Module" "$(NAME)" \ + "installed into" "$(INSTALLSITELIB)" \ + LINKTYPE "$(LINKTYPE)" \ +@@ -2321,8 +2321,8 @@ doc_site_install :: all + + doc_vendor_install :: all + $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod" +- -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)" +- -$(NOECHO) $(DOC_INSTALL) \ ++ -$(NOECHO) umask 022; $(MKPATH) "$(DESTINSTALLARCHLIB)" ++ -$(NOECHO) umask 022; $(DOC_INSTALL) \ + "Module" "$(NAME)" \ + "installed into" "$(INSTALLVENDORLIB)" \ + LINKTYPE "$(LINKTYPE)" \ |