[perl-TAP-Harness-Env/f20] Initial import (perl-TAP-Harness-Env-3.30-2)

Paul Howarth pghmcfc at fedoraproject.org
Thu Feb 27 13:39:54 UTC 2014


commit 7136ef6bac9e071f0df988d837692d978149884a
Author: Paul Howarth <paul at city-fan.org>
Date:   Thu Feb 27 13:34:16 2014 +0000

    Initial import (perl-TAP-Harness-Env-3.30-2)
    
    This package is intended for F-20 and EPEL-7 only.
    
    It provides a module (TAP::Harness::Env) that was introduced as part of
    the Test-Harness distribution in version 3.29 (already in Rawhide), but
    we have decided that it would be inappropriate to update the whole
    perl-Test-Harness package from 3.28 as shipped in F-20 and EL-7; see
    http://bugzilla.redhat.com/1018157
    
    However, the TAP::Harness::Env module is a requirement of versions of
    Module-Build-Tiny after 0.028, and it is very desirable to have a recent
    version of this in F-20 and EPEL-7, as a growing number of upstream
    developers are using the Dist::Zilla::Plugin::ModuleBuildTiny module
    when building their releases, and this by default adds a build
    dependency on whatever version of Module::Build::Tiny is installed on
    the author's system (usually the most recent release). I have been asked
    a number of times to update this module in F-20 and EPEL-7
    (Bug #1056343, Bug #1064689), and the introduction of the
    perl-TAP-Harness-Env package allows me to do this.
    
    The idea for introducing this package came from upstream; see:
    https://github.com/Leont/dist-zilla-plugin-modulebuildtiny/issues/7

 .gitignore                          |    1 +
 TAP-Harness-Env-3.30-Makefile.patch |   17 +++++
 TAP-Harness-Env-3.30-tests.patch    |   34 ++++++++++
 perl-TAP-Harness-Env.spec           |  114 +++++++++++++++++++++++++++++++++++
 sources                             |    1 +
 5 files changed, 167 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..a7333b7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Test-Harness-3.30.tar.gz
diff --git a/TAP-Harness-Env-3.30-Makefile.patch b/TAP-Harness-Env-3.30-Makefile.patch
new file mode 100644
index 0000000..002762d
--- /dev/null
+++ b/TAP-Harness-Env-3.30-Makefile.patch
@@ -0,0 +1,17 @@
+--- Makefile.PL
++++ Makefile.PL
+@@ -12,13 +12,10 @@
+ 
+ my %mm_args = (
+     'NAME'         => 'Test::Harness',
+-    'VERSION_FROM' => 'lib/Test/Harness.pm',
++    'VERSION_FROM' => 'lib/TAP/Harness/Env.pm',
+     'INSTALLDIRS'  => ($] < 5.011 ? 'perl' : 'site'),
+     'PL_FILES'     => {},
+     'test'         => { 'TESTS' => 't/*.t t/compat/*.t' },
+-
+-   # The core autogenerates a Makefile.PL, and finds prove with utils/prove.PL
+-    'EXE_FILES' => ['bin/prove'],
+     'PREREQ_PM'    => {
+     }
+ );
diff --git a/TAP-Harness-Env-3.30-tests.patch b/TAP-Harness-Env-3.30-tests.patch
new file mode 100644
index 0000000..b266ecb
--- /dev/null
+++ b/TAP-Harness-Env-3.30-tests.patch
@@ -0,0 +1,34 @@
+--- t/000-load.t
++++ t/000-load.t
+@@ -17,28 +17,15 @@
+     map { file_to_mod($_) } filter_lib( keys %$manifest )
+ );
+ 
+-plan tests => @classes * 2 + 1;
++plan tests => @classes * 2 - 1;
+ 
+ for my $class (@classes) {
+     use_ok $class or BAIL_OUT("Could not load $class");
+     is $class->VERSION, TAP::Parser->VERSION,
+-      "... and $class should have the correct version";
++      "... and $class should have the correct version" unless $class eq "TAP::Harness::Env";
+ }
+ 
+-my @orphans = diff(
+-    [ filter_lib( keys %$manifest ) ],
+-    [ filter_lib( keys %$manifest_cummulative ) ]
+-);
+-my @waifs = intersection( \@orphans, [ keys %INC ] );
+-unless ( ok 0 == @waifs, 'no old versions loaded' ) {
+-    diag "\nThe following modules were loaded in error:\n";
+-    for my $waif ( sort @waifs ) {
+-        diag sprintf "  %s (%s)\n", file_to_mod($waif), $INC{$waif};
+-    }
+-    diag "\n";
+-}
+-
+-diag("Testing Test::Harness $Test::Harness::VERSION, Perl $], $^X")
++diag("Testing TAP::Harness::Env $TAP::Harness::Env::VERSION, Perl $], $^X")
+   unless $ENV{PERL_CORE};
+ 
+ sub intersection {
diff --git a/perl-TAP-Harness-Env.spec b/perl-TAP-Harness-Env.spec
new file mode 100644
index 0000000..e029150
--- /dev/null
+++ b/perl-TAP-Harness-Env.spec
@@ -0,0 +1,114 @@
+# This package is superseded by the version included in Test-Harness ≥ 3.29
+# included in Fedora 21 onwards
+
+Name:		perl-TAP-Harness-Env
+Version:	3.30
+Release:	2%{?dist}
+Summary:	Parsing harness related environmental variables where appropriate
+License:	GPL+ or Artistic
+URL:		https://metacpan.org/release/Test-Harness
+Source0:	http://cpan.metacpan.org/authors/id/L/LE/LEONT/Test-Harness-%{version}.tar.gz
+Patch0:		TAP-Harness-Env-3.30-Makefile.patch
+Patch1:		TAP-Harness-Env-3.30-tests.patch
+BuildArch:	noarch
+# Module Build
+BuildRequires:	perl(ExtUtils::MakeMaker)
+# Module
+BuildRequires:	perl(constant)
+BuildRequires:	perl(strict)
+BuildRequires:	perl(TAP::Object)
+BuildRequires:	perl(Text::ParseWords)
+BuildRequires:	perl(warnings)
+# Test Suite
+BuildRequires:	perl(App::Prove)
+BuildRequires:	perl(App::Prove::State)
+BuildRequires:	perl(App::Prove::State::Result)
+BuildRequires:	perl(base)
+BuildRequires:	perl(Config)
+BuildRequires:	perl(Exporter)
+BuildRequires:	perl(File::Spec)
+BuildRequires:	perl(File::Spec::Functions)
+BuildRequires:	perl(Getopt::Long)
+BuildRequires:	perl(IO::File)
+BuildRequires:	perl(IO::Handle)
+BuildRequires:	perl(lib)
+BuildRequires:	perl(TAP::Base)
+BuildRequires:	perl(TAP::Formatter::Console)
+BuildRequires:	perl(TAP::Harness)
+BuildRequires:	perl(TAP::Parser)
+BuildRequires:	perl(TAP::Parser::Aggregator)
+BuildRequires:	perl(TAP::Parser::Grammar)
+BuildRequires:	perl(TAP::Parser::Iterator)
+BuildRequires:	perl(TAP::Parser::Iterator::Array)
+BuildRequires:	perl(TAP::Parser::Iterator::Process)
+BuildRequires:	perl(TAP::Parser::Iterator::Stream)
+BuildRequires:	perl(TAP::Parser::IteratorFactory)
+BuildRequires:	perl(TAP::Parser::Multiplexer)
+BuildRequires:	perl(TAP::Parser::Result)
+BuildRequires:	perl(TAP::Parser::ResultFactory)
+BuildRequires:	perl(TAP::Parser::Scheduler)
+BuildRequires:	perl(TAP::Parser::Source)
+BuildRequires:	perl(TAP::Parser::SourceHandler)
+BuildRequires:	perl(TAP::Parser::SourceHandler::Executable)
+BuildRequires:	perl(TAP::Parser::SourceHandler::File)
+BuildRequires:	perl(TAP::Parser::SourceHandler::Handle)
+BuildRequires:	perl(TAP::Parser::SourceHandler::Perl)
+BuildRequires:	perl(TAP::Parser::SourceHandler::RawTAP)
+BuildRequires:	perl(TAP::Parser::YAMLish::Reader)
+BuildRequires:	perl(TAP::Parser::YAMLish::Writer)
+BuildRequires:	perl(Test::Harness)
+BuildRequires:	perl(Test::More)
+BuildRequires:	perl(Time::HiRes)
+# Runtime
+Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+Conflicts:	perl-Test-Harness >= 3.29
+
+%description
+This module implements the environmental variables that Test::Harness for use
+with TAP::Harness.
+
+%prep
+%setup -q -n Test-Harness-%{version}
+
+# Remove bits that we're going to pick up from the system Test-Harness
+perl -ne 'print unless /^(bin\/|HACKING\.pod|lib\/)/ and not /^lib\/TAP\/Harness\/Env\.pm$/;' MANIFEST > MANIFEST.mod
+for f in $(grep -Fvxf MANIFEST.mod MANIFEST); do
+	rm $f
+done
+mv MANIFEST.mod MANIFEST
+
+# Remove Makefile references to files we've just deleted
+%patch0
+
+# Fix up tests that assume all of Test-Harness is here and is the same version
+%patch1
+
+%build
+perl Makefile.PL INSTALLDIRS=vendor
+make %{?_smp_mflags}
+
+%install
+make pure_install DESTDIR=%{buildroot}
+find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
+%{_fixperms} %{buildroot}
+
+%check
+make test
+
+%files
+%doc Changes README
+%{perl_vendorlib}/TAP/Harness/Env.pm
+%{_mandir}/man3/TAP::Harness::Env.3pm*
+
+%changelog
+* Wed Feb 26 2014 Paul Howarth <paul at city-fan.org> - 3.30-2
+- Incorporate review feedback (#1067098)
+  - Remove files in %%prep that we won't be shipping, so as to run test suite
+    against system packages rather than bundled modules
+  - Fix up tests that assume all of Test-Harness is here and is the same
+    version
+  - Specify all dependencies
+- Clean up for modern rpmbuild since we're only targeting F-20 and EPEL-7
+
+* Wed Feb 19 2014 Paul Howarth <paul at city-fan.org> - 3.30-1
+- Initial RPM version
diff --git a/sources b/sources
index e69de29..3e8019e 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+c1ff25da5dfdf77adea13dc3465638dd  Test-Harness-3.30.tar.gz


More information about the scm-commits mailing list