Hello community,

here is the log from the commit of package perl-Test-Taint for openSUSE:Factory 
checked in at 2018-10-11 11:57:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Test-Taint (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Test-Taint.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Test-Taint"

Thu Oct 11 11:57:43 2018 rev:10 rq:640972 version:1.06

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Test-Taint/perl-Test-Taint.changes  
2013-06-06 13:56:32.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Test-Taint.new/perl-Test-Taint.changes     
2018-10-11 11:58:02.897825467 +0200
@@ -1,0 +2,6 @@
+Wed Oct 10 08:20:33 UTC 2018 - Dirk Stoecker <[email protected]>
+
+- add patch to prevent random test failures:
+  Test-Taint-1.06-Test-taintedness-on-X-instead-of-environment-variabl.patch
+
+-------------------------------------------------------------------

New:
----
  Test-Taint-1.06-Test-taintedness-on-X-instead-of-environment-variabl.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Test-Taint.spec ++++++
--- /var/tmp/diff_new_pack.CRMWx2/_old  2018-10-11 11:58:03.593824583 +0200
+++ /var/tmp/diff_new_pack.CRMWx2/_new  2018-10-11 11:58:03.593824583 +0200
@@ -23,16 +23,13 @@
 Summary:        Tools to test taintedness
 License:        GPL-1.0+ or Artistic-1.0
 Group:          Development/Libraries/Perl
-Url:            http://search.cpan.org/dist/Test-Taint/
-Source:         
http://www.cpan.org/authors/id/P/PE/PETDANCE/%{cpan_name}-%{version}.tar.gz
+Url:            https://metacpan.org/release/%{cpan_name}
+Source:         
https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/%{cpan_name}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM Random failure  
https://rt.cpan.org/Public/Bug/Display.html?id=119897
+Patch1:         
https://rt.cpan.org/Ticket/Attachment/1699180/912509/Test-Taint-1.06-Test-taintedness-on-X-instead-of-environment-variabl.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
-#BuildRequires: perl(My::ObjectHash)
-#BuildRequires: perl(Test::Taint)
-#BuildRequires: perl(Tie::StdArray)
-#BuildRequires: perl(Tie::StdHash)
-#BuildRequires: perl(Tie::StdScalar)
 %{perl_requires}
 
 %description
@@ -48,13 +45,14 @@
 
 %prep
 %setup -q -n %{cpan_name}-%{version}
+%patch1 -p1
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
-%{__make} %{?_smp_mflags}
+perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
+make %{?_smp_mflags}
 
 %check
-%{__make} test
+make test
 
 %install
 %perl_make_install

++++++ 
Test-Taint-1.06-Test-taintedness-on-X-instead-of-environment-variabl.patch 
++++++
>From cab25a93c2e8383cff35f55271a60f51645c98ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]>
Date: Wed, 18 Jan 2017 11:02:39 +0100
Subject: [PATCH] Test taintedness on $^X instead of environment variables
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Test::Simple adds TEST_ACTIVE and TEST2_ACTIVE members into %Env.
These are not tainted. t/tainted_ok.t and t/tainted.t tests can fail
if they pick up one of them.

This patch changes the tests to use $^X, interpreter path, instead as
discussed and implemented in simalar Scalar-List-Utils' bug
<https://rt.cpan.org/Public/Bug/Display.html?id=119169>.

Signed-off-by: Petr Písař <[email protected]>
---
 t/tainted.t    | 7 ++-----
 t/tainted_ok.t | 5 +----
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/t/tainted.t b/t/tainted.t
index bf1e629..f5fb6d1 100644
--- a/t/tainted.t
+++ b/t/tainted.t
@@ -7,11 +7,8 @@ use Test::More tests => 6;
 
 use Test::Taint;
 
-my @keys = keys %ENV;
-my $key = shift @keys;
-
 taint_checking_ok();
-ok( tainted($ENV{$key}), "\$ENV{$key} is tainted" );
+ok( tainted($^X), "\$^X is tainted" );
 
 my $foo = 43;
 ok( !tainted($foo), '43 is not tainted' );
@@ -21,7 +18,7 @@ RESET_SIG_DIE: {
 
     local $SIG{__DIE__} = sub { $counter++ };
 
-    ok( tainted($ENV{$key}), "\$ENV{$key} is tainted" );
+    ok( tainted($^X), "\$^X is tainted" );
     is($counter, 0, 'counter was not incremented (our die did not fire)');
 
     eval { die 'validly' };
diff --git a/t/tainted_ok.t b/t/tainted_ok.t
index 2dcc9db..ce87343 100644
--- a/t/tainted_ok.t
+++ b/t/tainted_ok.t
@@ -5,11 +5,8 @@ use strict;
 
 use Test::Taint tests=>3;
 
-my @keys = keys %ENV;
-my $key = shift @keys;
-
 taint_checking_ok();
-tainted_ok( $ENV{$key}, "\$ENV{$key} is tainted" );
+tainted_ok( $^X, "\$^X is tainted" );
 
 my $foo = 43;
 untainted_ok( $foo );
-- 
2.7.4


Reply via email to