ppisar pushed to perl-Module-Starter-Plugin-CGIApp (master). "Adapt to changes in Module-Starter-1.71"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu May 7 11:52:07 UTC 2015
From 08f6e5151b6e6bd01e60956e0e90725ebf1e41a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
Date: Thu, 7 May 2015 13:43:25 +0200
Subject: Adapt to changes in Module-Starter-1.71
diff --git a/Module-Starter-Plugin-CGIApp-0.42-Adapt-to-Module-Starter-1.71.patch b/Module-Starter-Plugin-CGIApp-0.42-Adapt-to-Module-Starter-1.71.patch
new file mode 100644
index 0000000..6bd3a1d
--- /dev/null
+++ b/Module-Starter-Plugin-CGIApp-0.42-Adapt-to-Module-Starter-1.71.patch
@@ -0,0 +1,57 @@
+From a1e8f3b6937be2c8c03de3dfb09ca53ca62be88a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Thu, 7 May 2015 13:37:53 +0200
+Subject: [PATCH] Adapt to Module-Starter-1.71
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Module-Starter 1.70 and 1.71 changed how test files are created. This
+adjusts to the change.
+
+Filtering t/boilerplate.t from MANIFEST is a hack. I don't understand why
+it's not created into xt directory.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1189463
+https://rt.cpan.org/Public/Bug/Display.html?id=101894
+https://github.com/xsawyerx/module-starter/issues/47#issuecomment-73425236
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ lib/Module/Starter/Plugin/CGIApp.pm | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/lib/Module/Starter/Plugin/CGIApp.pm b/lib/Module/Starter/Plugin/CGIApp.pm
+index cb0f1b7..f3aa37b 100644
+--- a/lib/Module/Starter/Plugin/CGIApp.pm
++++ b/lib/Module/Starter/Plugin/CGIApp.pm
+@@ -125,7 +125,6 @@ sub create_distro {
+ push @files, $self->create_modules( @{ $self->{modules} } );
+
+ push @files, $self->create_t( @{ $self->{modules} } );
+- push @files, $self->create_xt( @{ $self->{modules} } );
+ push @files, $self->create_tmpl();
+ my %build_results = $self->create_build();
+ push @files, @{ $build_results{files} };
+@@ -147,7 +146,7 @@ sub _create_manifest {
+
+ my $file = File::Spec->catfile( $self->{basedir}, 'MANIFEST' );
+ open my $fh, '>', $file or croak "Can't open file $file: $OS_ERROR\n";
+- foreach my $file ( sort @files ) {
++ foreach my $file ( grep !m{^\Qt/boilerplate.t\E$}, sort @files ) {
+ print {$fh} "$file\n" or croak "$OS_ERROR\n";
+ }
+ close $fh or croak "Can't close file $file: $OS_ERROR\n";
+@@ -261,9 +260,7 @@ in the distribution.
+ sub create_t {
+ my ( $self, @modules ) = @_;
+
+- my %t_files = $self->t_guts(@modules);
+-
+- my @files = map { $self->_create_t( $_, $t_files{$_} ) } keys %t_files;
++ my @files = $self->SUPER::create_t(@modules);
+
+ # This next part is for the static files dir t/www
+ my @dirparts = ( $self->{basedir}, 't', 'www' );
+--
+2.1.0
+
diff --git a/perl-Module-Starter-Plugin-CGIApp.spec b/perl-Module-Starter-Plugin-CGIApp.spec
index 702a3af..a98ee22 100644
--- a/perl-Module-Starter-Plugin-CGIApp.spec
+++ b/perl-Module-Starter-Plugin-CGIApp.spec
@@ -1,11 +1,13 @@
Name: perl-Module-Starter-Plugin-CGIApp
Version: 0.42
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: Template based module starter for CGI apps
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Module-Starter-Plugin-CGIApp/
Source0: http://www.cpan.org/authors/id/J/JA/JALDHAR/Module-Starter-Plugin-CGIApp-%{version}.tar.gz
+# Adapt to changes in Module-Starter-1.71, bug #1189463, CPAN RT#101894
+Patch0: Module-Starter-Plugin-CGIApp-0.42-Adapt-to-Module-Starter-1.71.patch
BuildArch: noarch
BuildRequires: perl(File::Copy::Recursive)
BuildRequires: perl(File::DirCompare)
@@ -13,7 +15,8 @@ BuildRequires: perl(File::ShareDir)
BuildRequires: perl(HTML::Template)
BuildRequires: perl(Module::Build)
BuildRequires: perl(Module::Signature)
-BuildRequires: perl(Module::Starter)
+# Constrain Module::Starter version due to bug #1189463
+BuildRequires: perl(Module::Starter) >= 1.71
BuildRequires: perl(Pod::Coverage) >= 0.18
BuildRequires: perl(Test::Builder)
BuildRequires: perl(Test::MockTime)
@@ -24,8 +27,11 @@ BuildRequires: perl(Test::WWW::Mechanize::CGIApp)
BuildRequires: perl(Time::Piece)
BuildRequires: perl(Titanium)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires: perl(Module::Starter) >= 1.71
%{?perl_default_filter}
+# Remove under-specified dependencies:
+%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Module::Starter\\)$
%description
This is a plugin for Module::Starter that builds you a skeleton
@@ -34,6 +40,7 @@ CPAN. You can customize the output using HTML::Template.
%prep
%setup -q -n Module-Starter-Plugin-CGIApp-%{version}
+%patch0 -p1
%build
@@ -60,6 +67,9 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_mandir}/man3/*
%changelog
+* Thu May 07 2015 Petr Pisar <ppisar at redhat.com> - 0.42-9
+- Adapt to changes in Module-Starter-1.71 (bug #1189463)
+
* Mon Sep 01 2014 Jitka Plesnikova <jplesnik at redhat.com> - 0.42-8
- Perl 5.20 rebuild
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/perl-Module-Starter-Plugin-CGIApp.git/commit/?h=master&id=08f6e5151b6e6bd01e60956e0e90725ebf1e41a9
More information about the perl-devel
mailing list