From 9054d02e2e7bd8656fd993c917c0d9f3fa8e4fcb Mon Sep 17 00:00:00 2001 From: Paul Howarth <p...@city-fan.org> Date: Wed, 24 May 2017 16:17:43 +0100 Subject: Fix t/07_perlcritic.t for @INC without '.' (GH#738)
Also: drop legacy Group: tags --- 62b12906.patch | 36 ++++++++++++++++++++++++++++++++++++ perl-Perl-Critic.spec | 22 ++++++++++++++-------- 2 files changed, 50 insertions(+), 8 deletions(-) create mode 100644 62b12906.patch diff --git a/62b12906.patch b/62b12906.patch new file mode 100644 index 0000000..9c425a7 --- /dev/null +++ b/62b12906.patch @@ -0,0 +1,36 @@ +From 62b12906e6d9afad570ec29716e3ef4d9bd1aa3f Mon Sep 17 00:00:00 2001 +From: Andy Lester <a...@petdance.com> +Date: Wed, 17 May 2017 23:05:50 -0500 +Subject: [PATCH] Use absolute paths so that lack of . in @INC should still + work. Also remove a comment about a now-deleted file. + +--- + t/07_perlcritic.t | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/t/07_perlcritic.t b/t/07_perlcritic.t +index 37aa4a1d..a4a13350 100644 +--- a/t/07_perlcritic.t ++++ b/t/07_perlcritic.t +@@ -14,19 +14,15 @@ our $VERSION = '1.126'; + + #----------------------------------------------------------------------------- + +-my $perlcritic = File::Spec->catfile( qw(blib script perlcritic) ); ++my $perlcritic = File::Spec->rel2abs( File::Spec->catfile( qw( blib script perlcritic ) ) ); + if (not -e $perlcritic) { +- $perlcritic = File::Spec->catfile( qw(bin perlcritic) ) ++ $perlcritic = File::Spec->rel2abs( File::Spec->catfile( qw( bin perlcritic ) ) ); + } + + require_ok($perlcritic); + + #----------------------------------------------------------------------------- + +-# ensure we return true if this test is loaded by +-# t/07_perlcritic.t_without_optional_dependencies.t +-1; +- + # Local Variables: + # mode: cperl + # cperl-indent-level: 4 diff --git a/perl-Perl-Critic.spec b/perl-Perl-Critic.spec index 8443571..e2039f4 100644 --- a/perl-Perl-Critic.spec +++ b/perl-Perl-Critic.spec @@ -1,11 +1,11 @@ Name: perl-Perl-Critic Version: 1.126 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Critique Perl source code for best-practices -Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/Perl-Critic/ Source0: http://search.cpan.org/CPAN/authors/id/T/TH/THALJEF/Perl-Critic-%{version}.tar.gz +Patch0: https://github.com/Perl-Critic/Perl-Critic/commit/62b12906.patch BuildArch: noarch # Build process @@ -19,7 +19,7 @@ BuildRequires: perl(Module::Build) >= 0.42 BuildRequires: perl(Task::Weaken) # Module requirements -%if ! (0%{?rhel} >= 7) +%if ! (0%{?rhel:1}) BuildRequires: aspell-en %endif BuildRequires: perl(B::Keywords) >= 1.05 @@ -73,7 +73,7 @@ BuildRequires: perl(Devel::EnforceEncapsulation) BuildRequires: perl(Perl::Critic::Policy::Editor::RequireEmacsFileVariables) BuildRequires: perl(Perl::Critic::Policy::ErrorHandling::RequireUseOfExceptions) BuildRequires: perl(Perl::Critic::Policy::Miscellanea::RequireRcsKeywords) -%if ! (0%{?rhel} >= 7) +%if ! (0%{?rhel:1}) BuildRequires: perl(Test::Kwalitee) >= 1.15 %endif BuildRequires: perl(Test::Perl::Critic) @@ -84,7 +84,7 @@ BuildRequires: perl(Test::Without::Module) # Optional/not automatically detected runtime dependencies Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) -%if ! (0%{?rhel} >= 7) +%if ! (0%{?rhel:1}) Requires: aspell %endif Requires: perl(File::HomeDir) @@ -107,9 +107,8 @@ also create new Policy modules that suit your own tastes. %package -n perl-Test-Perl-Critic-Policy Summary: A framework for testing your custom Policies -Group: Development/Libraries License: GPL+ or Artistic -Requires: perl(Test::Builder) >= 0.82 +Requires: perl(Test::Builder) >= 0.92 %description -n perl-Test-Perl-Critic-Policy This module provides a framework for function-testing your custom @@ -120,6 +119,9 @@ of Perl code were mixed directly in the test script. That sucked. %prep %setup -q -n Perl-Critic-%{version} +# Fix t/07_perlcritic.t for @INC without '.' (GH#738) +%patch0 -p1 + # Drop exec bits from samples/docs to avoid dependency bloat find tools examples -type f -exec chmod -c -x {} ';' @@ -129,7 +131,7 @@ perl Build.PL --installdirs=vendor %install ./Build install --destdir=%{buildroot} --create_packlist=0 -%{_fixperms} %{buildroot} +%{_fixperms} -c %{buildroot} %check LC_ALL=en_US ./Build %{!?perl_bootstrap:author}test @@ -151,6 +153,10 @@ LC_ALL=en_US ./Build %{!?perl_bootstrap:author}test %{_mandir}/man3/Test::Perl::Critic::Policy.3* %changelog +* Wed May 24 2017 Paul Howarth <p...@city-fan.org> - 1.126-6 +- Fix t/07_perlcritic.t for @INC without '.' (GH#738) +- Drop legacy Group: tags + * Sat Feb 11 2017 Fedora Release Engineering <rel...@fedoraproject.org> - 1.126-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild -- cgit v1.1 https://src.fedoraproject.org/cgit/perl-Perl-Critic.git/commit/?h=f26&id=9054d02e2e7bd8656fd993c917c0d9f3fa8e4fcb _______________________________________________ perl-devel mailing list -- perl-devel@lists.fedoraproject.org To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org