From c8cc6bf7c3423e546222a5db85adfd2f065af145 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 07 2019 07:34:10 +0000 Subject: import perl-Test-Taint-1.06-19.el8 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3d6d5b8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/Test-Taint-1.06.tar.gz diff --git a/.perl-Test-Taint.metadata b/.perl-Test-Taint.metadata new file mode 100644 index 0000000..4550d09 --- /dev/null +++ b/.perl-Test-Taint.metadata @@ -0,0 +1 @@ +e128816a8a7eb0676e55ae82cc170ca3db50a601 SOURCES/Test-Taint-1.06.tar.gz diff --git a/SOURCES/Test-Taint-1.06-Test-taintedness-on-X-instead-of-environment-variabl.patch b/SOURCES/Test-Taint-1.06-Test-taintedness-on-X-instead-of-environment-variabl.patch new file mode 100644 index 0000000..888ca5b --- /dev/null +++ b/SOURCES/Test-Taint-1.06-Test-taintedness-on-X-instead-of-environment-variabl.patch @@ -0,0 +1,68 @@ +From cab25a93c2e8383cff35f55271a60f51645c98ff Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +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 +. + +Signed-off-by: Petr Písař +--- + 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 + diff --git a/SPECS/perl-Test-Taint.spec b/SPECS/perl-Test-Taint.spec new file mode 100644 index 0000000..e9f486f --- /dev/null +++ b/SPECS/perl-Test-Taint.spec @@ -0,0 +1,188 @@ +Summary: Tools to test taintedness +Name: perl-Test-Taint +Version: 1.06 +Release: 19%{?dist} +License: GPL+ or Artistic +URL: http://search.cpan.org/dist/Test-Taint/ +Source0: http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/Test-Taint-%{version}.tar.gz + +# RHBZ#1413022, CPAN#119897 +Patch0: Test-Taint-1.06-Test-taintedness-on-X-instead-of-environment-variabl.patch + +BuildRequires: %{__perl} +BuildRequires: %{__make} + +BuildRequires: perl-devel +BuildRequires: perl-generators +BuildRequires: perl(base) +BuildRequires: perl(constant) +BuildRequires: perl(overload) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Test::Builder) +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Pod) >= 1.14 +BuildRequires: perl(Test::Pod::Coverage) >= 1.04 +BuildRequires: perl(Tie::Array) +BuildRequires: perl(Tie::Hash) +BuildRequires: perl(Tie::Scalar) + +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +%{?perl_default_filter} + +%description +Tainted data is data that comes from an unsafe source, such as the command +line, or, in the case of web apps, any GET or POST transactions. Read the +perlsec man page for details on why tainted data is bad, and how to untaint +the data. + +When you're writing unit tests for code that deals with tainted data, you'll +want to have a way to provide tainted data for your routines to handle, and +easy ways to check and report on the taintedness of your data, in standard +Test::More style. + +%prep +%setup -q -n Test-Taint-%{version} +%patch0 -p1 + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="${RPM_OPT_FLAGS}" NO_PACKLIST=1 +%{__make} %{?_smp_mflags} + +%install +%{__make} pure_install DESTDIR=$RPM_BUILD_ROOT +chmod -R u+w $RPM_BUILD_ROOT/* + +%check +%{__make} test + +%files +%doc Changes +%{perl_vendorarch}/Test +%{perl_vendorarch}/auto/Test +%{_mandir}/man3/* + +%changelog +* Fri Feb 09 2018 Fedora Release Engineering - 1.06-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 1.06-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.06-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sun Jun 04 2017 Jitka Plesnikova - 1.06-16 +- Perl 5.26 rebuild + +* Wed Feb 15 2017 Ralf Corsépius - 1.06-15 +- Add Test-Taint-1.06-Test-taintedness-on-X-instead-of-environment-variabl.patch. + (Address RHBZ#1413022, F26FTBFS) + +* Sat Feb 11 2017 Fedora Release Engineering - 1.06-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sun May 15 2016 Jitka Plesnikova - 1.06-13 +- Perl 5.24 rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 1.06-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sat Jan 30 2016 Ralf Corsépius - 1.06-11 +- Modernize spec. + +* Thu Jun 18 2015 Fedora Release Engineering - 1.06-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Jun 05 2015 Jitka Plesnikova - 1.06-9 +- Perl 5.22 rebuild + +* Wed Aug 27 2014 Jitka Plesnikova - 1.06-8 +- Perl 5.20 rebuild + +* Sun Aug 17 2014 Fedora Release Engineering - 1.06-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.06-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Feb 18 2014 Petr Pisar - 1.06-5 +- Build-require constant module and correct Test::Pod modules version + +* Sun Aug 04 2013 Fedora Release Engineering - 1.06-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Sat Jul 20 2013 Petr Pisar - 1.06-3 +- Perl 5.18 rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 1.06-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Nov 08 2012 Ralf Corsépius - 1.06-1 +- Upstream update. +- Add missing deps. + +* Thu Oct 25 2012 Jitka Plesnikova - 1.04-19 +- Specify all dependencies +- Drop %%defattr, redundant since rpm 4.4 +- Fix mixed use of spaces and tabs + +* Fri Jul 20 2012 Fedora Release Engineering - 1.04-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Jun 13 2012 Petr Pisar - 1.04-17 +- Perl 5.16 rebuild + +* Sun Jan 22 2012 Ralf Corsépius - 1.04-16 +- Modernize spec. +- Add %%{perl_default_filter}. + +* Fri Jan 13 2012 Fedora Release Engineering - 1.04-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Jun 20 2011 Marcela Mašláňová - 1.04-14 +- Perl mass rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 1.04-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Dec 22 2010 Marcela Maslanova - 1.04-12 +- 661697 rebuild for fixing problems with vendorach/lib + +* Fri May 07 2010 Marcela Maslanova - 1.04-11 +- Mass rebuild with perl-5.12.0 + +* Fri Dec 4 2009 Stepan Kasal - 1.04-10 +- rebuild against perl 5.10.1 + +* Sun Jul 26 2009 Fedora Release Engineering - 1.04-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Feb 26 2009 Fedora Release Engineering - 1.04-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Feb 27 2008 Tom "spot" Callaway - 1.04-7 +- Rebuild for perl 5.10 (again) + +* Sun Feb 10 2008 Ralf Corsépius - 1.04-6 +- Rebuild for gcc43. + +* Mon Jan 14 2008 Tom "spot" Callaway - 1.04-5 +- rebuild for new perl + +* Fri Aug 17 2007 Ralf Corsépius - 1.04-4 +- Reflect perl-package split. +- Update license tag. + +* Tue Sep 05 2006 Ralf Corsépius - 1.04-3 +- Mass rebuild. + +* Mon Feb 20 2006 Ralf Corsepius - 1.04-2 +- Rebuild. + +* Wed Aug 10 2005 Ralf Corsepius - 1.04-1 +- FE submission. + +* Sun Mar 20 2005 Ralf Corsepius - 1.04-0.pm.2 +- Initial version.