commit 58a5f2841998d9f3cb9a53e13df6823a5cbbda4a Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 11:12:35 2019 -0400 Package init 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?= +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ř +--- + 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/IPC-System-Simple-1.25.tar.gz b/IPC-System-Simple-1.25.tar.gz new file mode 100644 index 0000000..aa226e1 Binary files /dev/null and b/IPC-System-Simple-1.25.tar.gz differ diff --git a/perl-IPC-System-Simple.spec b/perl-IPC-System-Simple.spec new file mode 100644 index 0000000..701d7d2 --- /dev/null +++ b/perl-IPC-System-Simple.spec @@ -0,0 +1,53 @@ +Name: perl-IPC-System-Simple +Version: 1.25 +Release: 18 +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, +Patch0: IPC-System-Simple-1.25-Use-exucatable-name-as-a-source-of-taintedness.patch +BuildArch: noarch +# For Build +BuildRequires: coreutils findutils make perl-interpreter perl-generators perl(ExtUtils::MakeMaker) >= 6.30 +# For Runtime +BuildRequires: perl(Carp) perl(Config) perl(constant) perl(Exporter) perl(List::Util) +BuildRequires: perl(POSIX) perl(re) perl(Scalar::Util) perl(strict) perl(warnings) +# For Test +BuildRequires: perl(File::Basename) perl(Test) perl(Test::More) + +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) + +%description +Calling Perl's in-built system() function is easy, determining if it was successful is hard. +Let's face it, $? isn't the nicest variable in the world to play with, +and even if you do check it, producing a well-formatted error string takes a lot of work. + +%package_help + +%prep +%autosetup -n IPC-System-Simple-%{version} -p1 +chmod -c -x examples/*.pl + +%build +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 +%make_build + +%install +make pure_install DESTDIR=%{buildroot} +%{_fixperms} -c %{buildroot} + +%check +make test + +%files +%license LICENSE +%doc Changes README examples/ +%{perl_vendorlib}/IPC/ + +%files help +%{_mandir}/man3/IPC::System::Simple.3* + +%changelog +* Wed Sep 11 2019 openEuler Buildteam - 1.25-18 +- Package init