commit 4976495d2bae27134da9b3804eaa4cc5da4252b3 Author: Paul Howarth <paul@xxxxxxxxxxxx> Date: Wed Mar 14 12:49:39 2012 +0000 Create EPEL-5 version (1.06-1.el5.1) - Revert to 1.06-1 package as per EL-6 - Fixes for EPEL-5 compatibility: - Drop unavailable release testing buildreqs - Turn off RELEASE_TESTING - Add patch to work around issues with t/03_compiles_bad.t - Drop %defattr, redundant since rpm 4.4 - Don't need to remove empty directories from buildroot - Use DESTDIR rather than PERL_INSTALL_ROOT - Use search.cpan.org source URL - Don't use macros for commands - Make %files list more explicit .gitignore | 2 +- Test-Script-1.06-compiles_bad.patch | 20 ++++++++ perl-Test-Script.spec | 83 +++++++++++++--------------------- sources | 2 +- 4 files changed, 54 insertions(+), 53 deletions(-) --- diff --git a/.gitignore b/.gitignore index 0f12328..6405488 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -Test-Script-1.07.tar.gz +/Test-Script-[0-9.]*.tar.gz diff --git a/Test-Script-1.06-compiles_bad.patch b/Test-Script-1.06-compiles_bad.patch new file mode 100644 index 0000000..994fd4b --- /dev/null +++ b/Test-Script-1.06-compiles_bad.patch @@ -0,0 +1,20 @@ +--- Test-Script-1.06/t/03_compiles_bad.t 2009-09-17 10:00:11.000000000 +0100 ++++ Test-Script-1.06/t/03_compiles_bad.t 2009-09-17 19:02:36.000000000 +0100 +@@ -32,7 +32,7 @@ + test_out("not ok 1 - Script t/bin/bad.pl compiles"); + test_fail(+4); + test_err("/# Using.*?/") if $] < 5.008; +- test_err("/# \\d+ - Bad at " . quotemeta($bad) . " line 4./"); ++ test_err("# @EXITCODE@ - Bad at $bad line 4."); + test_err("# BEGIN failed--compilation aborted at $bad line 5."); + my $rv = script_compiles('t/bin/bad.pl'); + test_test('Bad script returns false'); +@@ -44,7 +44,7 @@ + test_out("not ok 1 - It worked"); + test_fail(+4); + test_err("/# Using.*?/") if $] < 5.008; +- test_err("/# \\d+ - Bad at " . quotemeta($bad) . " line 4./"); ++ test_err("# @EXITCODE@ - Bad at $bad line 4."); + test_err("# BEGIN failed--compilation aborted at $bad line 5."); + my $rv = script_compiles('t/bin/bad.pl', 'It worked'); + test_test('Bad script returns false'); diff --git a/perl-Test-Script.spec b/perl-Test-Script.spec index 752d795..d647880 100644 --- a/perl-Test-Script.spec +++ b/perl-Test-Script.spec @@ -1,27 +1,20 @@ Name: perl-Test-Script -Version: 1.07 -Release: 7%{?dist} +Version: 1.06 +Release: 1%{?dist}.1 Summary: Cross-platform basic tests for scripts License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Test-Script/ Source0: http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Test-Script-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch0: Test-Script-1.06-compiles_bad.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildArch: noarch - BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(IPC::Run3) >= 0.034 BuildRequires: perl(Probe::Perl) -BuildRequires: perl(Test::More) - -# For improved tests -%if !%{defined perl_bootstrap} BuildRequires: perl(Test::CPAN::Meta) >= 0.12 -BuildRequires: perl(Test::Pod) >= 1.26 -BuildRequires: perl(Test::MinimumVersion) >= 0.008 -BuildRequires: perl(Perl::MinimumVersion) >= 1.20 -%endif -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +BuildRequires: perl(Test::More) +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %description The intent of this module is to provide a series of basic tests for scripts @@ -30,60 +23,48 @@ in the bin directory of your Perl distribution. %prep %setup -q -n Test-Script-%{version} +# Sometimes t/bin/bad.pl dies with exit code 9, sometimes with 255. +# Upstream has tried to cater for this using a regex but old versions +# of Test::More don't support the use of regexes like this (it fails +# with 0.62 and passes with 0.78, probably needs 0.77), so we need to +# patch the test to check for the correct value. +%patch0 -p1 +EXITCODE=$(perl t/bin/bad.pl &> /dev/null || echo $?) +sed -i -e "s/@EXITCODE@/$EXITCODE/" t/03_compiles_bad.t + %build -%{__perl} Makefile.PL INSTALLDIRS=vendor +perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT - -make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT - +make pure_install DESTDIR=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; -find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; - -%{_fixperms} $RPM_BUILD_ROOT/* +%{_fixperms} $RPM_BUILD_ROOT %check -%if !%{defined perl_bootstrap} -make test AUTOMATED_TESTING=1 RELEASE_TESTING=1 -%endif +make test AUTOMATED_TESTING=1 %clean rm -rf $RPM_BUILD_ROOT %files -%defattr(-,root,root,-) %doc Changes LICENSE README -%{perl_vendorlib}/* -%{_mandir}/man3/* +%{perl_vendorlib}/Test/ +%{_mandir}/man3/Test::Script.3pm* %changelog -* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 1.07-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Tue Jun 28 2011 Marcela Mašláňová <mmaslano@xxxxxxxxxx> - 1.07-6 -- Perl mass rebuild -- perl_bootstrap macro - -* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 1.07-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Wed Dec 22 2010 Marcela Maslanova <mmaslano@xxxxxxxxxx> - 1.07-4 -- 661697 rebuild for fixing problems with vendorach/lib - -* Tue May 25 2010 Ralf Corsépius <corsepiu@xxxxxxxxxxxxxxxxx> - 1.07-3 -- Reactivate pmv tests. - -* Fri May 07 2010 Marcela Maslanova <mmaslano@xxxxxxxxxx> - 1.07-2 -- Mass rebuild with perl-5.12.0 - -* Tue Dec 15 2009 Ralf Corsépius <corsepiu@xxxxxxxxxxxxxxxxx> - 1.07-1 -- Upstream update. -- Reflect Source0-URL having changed. - -* Fri Dec 4 2009 Stepan Kasal <skasal@xxxxxxxxxx> - 1.06-2 -- rebuild against perl 5.10.1 +* Wed Mar 14 2012 Paul Howarth <paul@xxxxxxxxxxxx> - 1.06-1.1 +- Fixes for EPEL-5 compatibility: + - Drop unavailable release testing buildreqs + - Turn off RELEASE_TESTING + - Add patch to work around issues with t/03_compiles_bad.t +- Drop %%defattr, redundant since rpm 4.4 +- Don't need to remove empty directories from buildroot +- Use DESTDIR rather than PERL_INSTALL_ROOT +- Use search.cpan.org source URL +- Don't use macros for commands +- Make %%files list more explicit * Mon Sep 28 2009 Ralf Corsépius <corsepiu@xxxxxxxxxxxxxxxxx> - 1.06-1 - Upstream update. diff --git a/sources b/sources index 57ae2fd..1af8359 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f6b5baa6403cd24dac7f023e0ea22384 Test-Script-1.07.tar.gz +43e8f1429472da66a853be819b11a5b9 Test-Script-1.06.tar.gz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel