diff --git a/.cvsignore b/.cvsignore index e69de29..97c71af 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +Config-IniFiles-2.38.tar.gz diff --git a/Config-IniFiles-2.38-t-00load.t.patch b/Config-IniFiles-2.38-t-00load.t.patch new file mode 100644 index 0000000..812ef7d --- /dev/null +++ b/Config-IniFiles-2.38-t-00load.t.patch @@ -0,0 +1,34 @@ +There seems to be a permission problem in the 00load.t test +in Config::IniFiles 2.38 (my Perl: 5.8.0/ithreads, OS: Solaris 7/Sparc). + +The test01.ini is written with permissions 222 (derived from +test.ini, which is unpacked read-only), and also opened read-only, +which gave me a bunch of errors/warnings. Here is a proposal how +to fix the test: + +diff -ru Config-IniFiles-2.38/t/00load.t Config-IniFiles-2.38p/t/00load.t +--- Config-IniFiles-2.38/t/00load.t 2003-05-14 03:46:28.000000000 +0200 ++++ Config-IniFiles-2.38p/t/00load.t 2003-05-15 14:42:03.000000000 +0200 +@@ -69,10 +69,11 @@ + if( open( CONFIG, "test.ini" ) ) { + $ini = new Config::IniFiles -file => \*CONFIG; + $ini->SetFileName( 'test01.ini' ); ++ $ini->SetWriteMode( '644' ); + $ini->RewriteConfig(); + close CONFIG; + # Now test opening and re-write to the same handle +- if( open( CONFIG, "test01.ini" ) ) { ++ if( open( CONFIG, "+ \*CONFIG; + my $badname = scalar(\*CONFIG); + # Have to use open/close because -e seems to be always true! +@@ -81,6 +82,9 @@ + # In case it failed, remove the file + # (old behavior was to write to a file whose filename is the scalar value of the handle!) + unlink $badname; ++ } else { ++ print "Cannot open test01.ini for read/write: $!\n"; ++ ok( 0 ); + } # end if + } else { + ok( 0 ); diff --git a/perl-Config-IniFiles.spec b/perl-Config-IniFiles.spec new file mode 100644 index 0000000..aec6e23 --- /dev/null +++ b/perl-Config-IniFiles.spec @@ -0,0 +1,67 @@ +%{!?perl_vendorlib: %define perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib)} + +Name: perl-Config-IniFiles +Version: 2.38 +Release: 0.fdr.2 +Epoch: 0 +Summary: A module for reading .ini-style configuration files + +Group: Development/Libraries +License: GPL or Artistic +URL: http://search.cpan.org/dist/Config-IniFiles/ +Source0: http://www.cpan.org/authors/id/W/WA/WADG/Config-IniFiles-2.38.tar.gz +Patch0: http://rt.cpan.org/NoAuth/Attachment/7150/9132/Config-IniFiles-2.38-t-00load.t.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch +BuildRequires: perl >= 1:5.6.1 +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +%description +Config::IniFiles provides a way to have readable configuration files +outside your Perl script. Configurations can be imported (inherited, +stacked,...), sections can be grouped, and settings can be accessed +from a tied hash. + + +%prep +%setup -q -n Config-IniFiles-%{version} +%patch0 -p1 +chmod 644 README *.pm + + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' +find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' +chmod -R u+w $RPM_BUILD_ROOT/* + + +%check || : +make test + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc README +%{perl_vendorlib}/Config/ +%{_mandir}/man3/*.3* + + +%changelog +* Tue May 25 2004 Jose Pedro Oliveira - 0:2.38-0.fdr.2 +- Patch URI generated from the RT entry as suggested (bug 1625) + +* Thu May 20 2004 Jose Pedro Oliveira - 0:2.38-0.fdr.1 +- Patch: http://rt.cpan.org/NoAuth/Bug.html?id=2584 +- First build. diff --git a/sources b/sources index e69de29..31097d0 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +17e39e4244ede0061939dcb80ab6294e Config-IniFiles-2.38.tar.gz