From 3a86298b0339e0b075800ac03a2fcbf10ad16c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com> Date: Wed, 2 Aug 2017 17:44:27 +0200 Subject: Fix random test failures with Test-Simple 1.302065
--- ...xucatable-name-as-a-source-of-taintedness.patch | 37 ++++++++++++++++++++++ perl-IPC-System-Simple.spec | 9 +++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 IPC-System-Simple-1.25-Use-exucatable-name-as-a-source-of-taintedness.patch diff --git a/IPC-System-Simple-1.25-Use-exucatable-name-as-a-source-of-taintedness.patch b/IPC-System-Simple-1.25-Use-exucatable-name-as-a-source-of-taintedness.patch new file mode 100644 index 0000000..5e480db --- /dev/null +++ b/IPC-System-Simple-1.25-Use-exucatable-name-as-a-source-of-taintedness.patch @@ -0,0 +1,37 @@ +From ff8028c4d95425faa5b0705b8ed8c84b1112c7e4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com> +Date: Wed, 2 Aug 2017 17:29:13 +0200 +Subject: [PATCH] Use exucatable name as a source of taintedness +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Test::Simple >= 1.302065 injects variables into the environment. These +are not tainted and caused a random t/07_taint.t test failures. + +This patch fixes it by using executable name $0 instead. + +https://github.com/pjf/ipc-system-simple/issues/21 +Signed-off-by: Petr Písař <ppi...@redhat.com> +--- + t/07_taint.t | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/t/07_taint.t b/t/07_taint.t +index 49cee12..be449cd 100644 +--- a/t/07_taint.t ++++ b/t/07_taint.t +@@ -17,8 +17,8 @@ use_ok("IPC::System::Simple","run","capture"); + + chdir("t"); # Ignore return, since we may already be in t/ + +-my $taint = $ENV{(keys(%ENV))[0]} . "foo"; # ."foo" to avoid zero length +-ok(tainted($taint),"Sanity - ENV vars are tainted"); ++my $taint = $0 . "foo"; # ."foo" to avoid zero length ++ok(tainted($taint),"Sanity - executable name is tainted"); + + my $evil_zero = 1 - (length($taint) / length($taint)); + +-- +2.9.4 + diff --git a/perl-IPC-System-Simple.spec b/perl-IPC-System-Simple.spec index e1c3ea3..8828cc0 100644 --- a/perl-IPC-System-Simple.spec +++ b/perl-IPC-System-Simple.spec @@ -3,11 +3,14 @@ Name: perl-IPC-System-Simple Version: 1.25 -Release: 15%{?dist} +Release: 16%{?dist} License: GPL+ or Artistic Summary: Run commands simply, with detailed diagnostics URL: http://search.cpan.org/dist/IPC-System-Simple Source0: http://search.cpan.org/CPAN/authors/id/P/PJ/PJF/IPC-System-Simple-%{version}.tar.gz +# Fix random test failures with Test-Simple 1.302065, proposed to upstream, +# <https://github.com/pjf/ipc-system-simple/issues/21> +Patch0: IPC-System-Simple-1.25-Use-exucatable-name-as-a-source-of-taintedness.patch BuildArch: noarch # Module Build BuildRequires: coreutils @@ -66,6 +69,7 @@ return a zero exit value), or die with rich diagnostic messages. %prep %setup -q -n IPC-System-Simple-%{version} +%patch0 -p1 # Avoid doc-file dependencies chmod -c -x examples/*.pl @@ -98,6 +102,9 @@ make test \ %{_mandir}/man3/IPC::System::Simple.3* %changelog +* Wed Aug 02 2017 Petr Pisar <ppi...@redhat.com> - 1.25-16 +- Fix random test failures with Test-Simple 1.302065 + * Thu Jul 27 2017 Fedora Release Engineering <rel...@fedoraproject.org> - 1.25-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild -- cgit v1.1 https://src.fedoraproject.org/cgit/perl-IPC-System-Simple.git/commit/?h=master&id=3a86298b0339e0b075800ac03a2fcbf10ad16c2b _______________________________________________ perl-devel mailing list -- perl-devel@lists.fedoraproject.org To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org