[SCM] Debian packaging of libtest-compile-perl branch, master, updated. d861e6847a7bdd1c02a5fabd9c8c7cbfa6647f45
Nicholas Bamber
nicholas at periapt.co.uk
Sun Nov 20 00:48:28 UTC 2011
The following commit has been merged in the master branch:
commit d861e6847a7bdd1c02a5fabd9c8c7cbfa6647f45
Author: Nicholas Bamber <nicholas at periapt.co.uk>
Date: Sun Nov 20 00:54:08 2011 +0000
* Added patch creating test for taint mode scripts
* Added patch creating test an fix for scripts using libraries
from the same distribution (Closes: #6493320)
diff --git a/debian/changelog b/debian/changelog
index 58c487a..0101d16 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,8 +12,10 @@ libtest-compile-perl (0.13-2) UNRELEASED; urgency=low
* Added myself to Uploaders
* Refreshed copyright and added myself
* Added lintian override about DEP-5
- * Added patch creating tests for taint mode scripts
+ * Added patch creating test for taint mode scripts
and respecting taint mode (Closes: #649301)
+ * Added patch creating test an fix for scripts using libraries
+ from the same distribution (Closes: #6493320)
-- Nicholas Bamber <nicholas at periapt.co.uk> Wed, 27 Jul 2011 18:48:18 +0200
diff --git a/debian/patches/lib.patch b/debian/patches/lib.patch
new file mode 100644
index 0000000..72a5a9a
--- /dev/null
+++ b/debian/patches/lib.patch
@@ -0,0 +1,41 @@
+Author: Nicholas Bamber <nicholas at periapt.co.uk>
+Subject: need to provide path to libraries of distribution
+Bug: http://rt.cpan.org/Ticket/Display.html?id=72557
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649332
+--- /dev/null
++++ b/t/scripts/lib.pl
+@@ -0,0 +1,13 @@
++#!/usr/bin/perl
++
++BEGIN {
++ require strict;
++ require warnings;
++ require Test::Builder;
++ require File::Spec;
++ require UNIVERSAL::require;
++ @INC = grep { $_ eq 'blib/lib' } @INC;
++}
++use Test::Compile;
++
++sleep 1;
+--- /dev/null
++++ b/t/11.lib.t
+@@ -0,0 +1,7 @@
++#!perl -w
++use strict;
++use warnings;
++use Test::More tests => 1;
++use Test::Compile;
++pl_file_ok('t/scripts/lib.pl', 'lib.pl compiles');
++
+--- a/lib/Test/Compile.pm
++++ b/lib/Test/Compile.pm
+@@ -72,7 +72,7 @@
+ return;
+ }
+ my $taint = _is_in_taint_mode($file);
+- my $out = `$^X -cw$taint $file 2>&1`;
++ my $out = `$^X -cw$taint -Iblib/lib $file 2>&1`;
+ if ($?) {
+ $Test->ok(0, 'Script does not compile');
+ $Test->diag($out);
diff --git a/debian/patches/series b/debian/patches/series
index 6336acc..8364656 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
taint.patch
+lib.patch
diff --git a/debian/patches/taint.patch b/debian/patches/taint.patch
index b72a594..5c1dcb5 100644
--- a/debian/patches/taint.patch
+++ b/debian/patches/taint.patch
@@ -39,7 +39,7 @@ Bug: http://rt.cpan.org/Ticket/Diplay.html?id=55837
+ my $file = shift;
+ open(FILE, $file) or die "could not open $file";
+ my $shebang = <FILE>;
-+ my $taint = undef;
++ my $taint = "";
+ if ($shebang =~ /^#![\/\w]+\s+\-w?(T)/) {
+ $taint = $1;
+ }
--
Debian packaging of libtest-compile-perl
More information about the Pkg-perl-cvs-commits
mailing list