commit 3a3f04a037befd5eb07150d32ac0cea33b83e107 Author: Tom Callaway <spot@xxxxxxxxxxxxxxxxx> Date: Mon Jun 25 21:08:01 2012 -0400 add explicit Requires for perl(List::MoreUtils) perl-Config-IniFiles-2.72-el6.patch | 52 ++++++++++++++++++++++++++++++++++ perl-Config-IniFiles-2.72-warn.patch | 25 ++++++++++++++++ perl-Config-IniFiles.spec | 18 ++++++++++-- 3 files changed, 92 insertions(+), 3 deletions(-) --- diff --git a/perl-Config-IniFiles-2.72-el6.patch b/perl-Config-IniFiles-2.72-el6.patch new file mode 100644 index 0000000..c1be389 --- /dev/null +++ b/perl-Config-IniFiles-2.72-el6.patch @@ -0,0 +1,52 @@ +From 53d46071471820e0f18b5f5cd439e24cb7f94678 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel <lubo.rintel@xxxxxxxxxxxx> +Date: Fri, 1 Jun 2012 13:55:39 +0200 +Subject: [PATCH 1/2] Older List::MoreUtils provide no 'none' function + +--- + lib/Config/IniFiles.pm | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/lib/Config/IniFiles.pm b/lib/Config/IniFiles.pm +index 32a496e..1ababa2 100644 +--- a/lib/Config/IniFiles.pm ++++ b/lib/Config/IniFiles.pm +@@ -11,7 +11,7 @@ use Carp; + use Symbol 'gensym','qualify_to_ref'; # For the 'any data type' hack + use Fcntl qw( SEEK_SET SEEK_CUR ); + +-use List::MoreUtils qw(any none); ++use List::MoreUtils qw(any); + + use File::Basename qw( dirname ); + use File::Temp qw/ tempfile /; +@@ -687,7 +687,7 @@ sub newval { + + $self->AddSection($sect); + +- if (none { $_ eq $parm } @{$self->{parms}{$sect}}) ++ if (not grep { $_ eq $parm } @{$self->{parms}{$sect}}) + { + CORE::push(@{$self->{parms}{$sect}}, $parm) + } +@@ -1394,7 +1394,7 @@ sub _touch_section { + + $self->{mysects} ||= []; + +- if (none { $_ eq $sect } @{$self->{mysects}}) ++ if (not grep { $_ eq $sect } @{$self->{mysects}}) + { + CORE::push @{$self->{mysects}}, $sect; + } +@@ -1535,7 +1535,7 @@ sub _SetGroupMember_helper + $self->{group}{$group} = []; + } + +- if (none {$_ eq $sect} @{$self->{group}{$group}}) { ++ if (not grep {$_ eq $sect} @{$self->{group}{$group}}) { + CORE::push @{$self->{group}{$group}}, $sect; + } + +-- +1.7.1 + diff --git a/perl-Config-IniFiles-2.72-warn.patch b/perl-Config-IniFiles-2.72-warn.patch new file mode 100644 index 0000000..98bd8d0 --- /dev/null +++ b/perl-Config-IniFiles-2.72-warn.patch @@ -0,0 +1,25 @@ +From 688ed6edbc7d94181657de0de2ac9dc1ea5a20da Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel <lubo.rintel@xxxxxxxxxxxx> +Date: Fri, 1 Jun 2012 13:52:38 +0200 +Subject: [PATCH 2/2] Get rid of a warning + +--- + lib/Config/IniFiles.pm | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/lib/Config/IniFiles.pm b/lib/Config/IniFiles.pm +index 1ababa2..281c78c 100644 +--- a/lib/Config/IniFiles.pm ++++ b/lib/Config/IniFiles.pm +@@ -823,7 +823,7 @@ sub _no_filename + { + my $self = shift; + +- return not length $self->{cf}; ++ return not length ($self->{cf} || ''); + } + + sub _read_line_num +-- +1.7.1 + diff --git a/perl-Config-IniFiles.spec b/perl-Config-IniFiles.spec index 24b491c..ab885d5 100644 --- a/perl-Config-IniFiles.spec +++ b/perl-Config-IniFiles.spec @@ -1,6 +1,6 @@ Name: perl-Config-IniFiles Version: 2.72 -Release: 1%{?dist} +Release: 2%{?dist}.1 Summary: A module for reading .ini-style configuration files Group: Development/Libraries @@ -9,6 +9,9 @@ URL: http://search.cpan.org/dist/Config-IniFiles/ Source0: http://www.cpan.org/authors/id/S/SH/SHLOMIF/Config-IniFiles-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch0: perl-Config-IniFiles-2.72-el6.patch +Patch1: perl-Config-IniFiles-2.72-warn.patch + BuildRequires: perl(Module::Build::Compat) BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Test::More) @@ -17,6 +20,8 @@ BuildArch: noarch Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) # Not autodetected. Found in lib/Config/IniFiles.pm:2265 Requires: perl(IO::Scalar) >= 2.109 +# Not autodetected on el5 +Requires: perl(List::MoreUtils) %description Config::IniFiles provides a way to have readable configuration files @@ -27,6 +32,8 @@ from a tied hash. %prep %setup -q -n Config-IniFiles-%{version} +%patch0 -p1 +%patch1 -p1 %build %{__perl} Makefile.PL INSTALLDIRS=vendor @@ -42,9 +49,7 @@ chmod -R u+w $RPM_BUILD_ROOT/* %check -%if 0%{?fedora} make test -%endif %clean @@ -59,6 +64,13 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 25 2012 Tom Callaway <spot@xxxxxxxxxxxxxxxxx> - 2.72-2.1 +- add explicit Requires: perl(List::MoreUtils) for el5 (bz827198) + +* Fri Jun 01 2012 Lubomir Rintel (GoodData) <lubo.rintel@xxxxxxxxxxxx> - 2.72-2 +- Fix compatibility with el6 +- Enable test suite + * Fri May 11 2012 Tom Callaway <spot@xxxxxxxxxxxxxxxxx> - 2.72-1 - update to 2.72 - notable fix: SECURITY BUG FIX: Config::IniFiles used to write -- 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