[perl-Data-Random] Update to 0.06, refresh patch, clean up spec file and enable all tests

Emmanuel Seyman eseyman at fedoraproject.org
Wed Dec 7 19:45:02 UTC 2011


commit 45ca4e4e816ab4e61b17f4de48ec5daba93ac41f
Author: Emmanuel Seyman <emmanuel.seyman at club-internet.fr>
Date:   Wed Dec 7 20:44:42 2011 +0100

    Update to 0.06, refresh patch, clean up spec file and enable all tests

 .gitignore                                         |    1 +
 ...ndom-0.06-Check-if-_to_secs-returns-undef.patch |   51 +++++---------------
 perl-Data-Random.spec                              |   24 +++++-----
 sources                                            |    2 +-
 4 files changed, 27 insertions(+), 51 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c9898ed..394c9a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 Data-Random-0.05.tar.gz
+/Data-Random-0.06.tar.gz
diff --git a/perl-Data-Random-0.05-Check-if-_to_secs-returns-undef.patch b/perl-Data-Random-0.06-Check-if-_to_secs-returns-undef.patch
similarity index 51%
rename from perl-Data-Random-0.05-Check-if-_to_secs-returns-undef.patch
rename to perl-Data-Random-0.06-Check-if-_to_secs-returns-undef.patch
index 078ff4f..d5b505e 100644
--- a/perl-Data-Random-0.05-Check-if-_to_secs-returns-undef.patch
+++ b/perl-Data-Random-0.06-Check-if-_to_secs-returns-undef.patch
@@ -1,24 +1,15 @@
-From 7dcdfa9edfc632609b3fc99aabb46a40b0083875 Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni at iki.fi>
-Date: Fri, 17 Dec 2010 10:35:33 +0100
-Subject: [PATCH] Check if _to_secs() returns undef
+Description: Fix test failures when rand_time() returns "00:00:00".
+Origin: vendor
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=27392
+Bug-Debian: http://bugs.debian.org/441746
+Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=27392
+Author: Damyan Ivanov <dmn at debian.org>
+Reviewed-by: gregor herrmann <gregoa at debian.org>
+Last-Update: 2011-11-26
 
-t/rand_time.t fails when rand_time() returns "00:00:00", since
-_to_secs() then returns 0 which evaluates to false. This happens with a
-probability of about 7 % and was found in an automatic build of the Debian
-packaged version of Data::Random.
-
-https://rt.cpan.org/Public/Bug/Display.html?id=27392
----
- t/rand_datetime.t |   10 +++++-----
- t/rand_time.t     |    2 +-
- 2 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/t/rand_datetime.t b/t/rand_datetime.t
-index b7a2118..00d8993 100755
 --- a/t/rand_datetime.t
 +++ b/t/rand_datetime.t
-@@ -35,7 +35,7 @@ SKIP: {
+@@ -35,7 +35,7 @@
  
              $pass = 0
                unless $delta >= 0 && $delta <= $max_days
@@ -27,7 +18,7 @@ index b7a2118..00d8993 100755
  
              $i++;
          }
-@@ -59,7 +59,7 @@ SKIP: {
+@@ -59,7 +59,7 @@
  
              $pass = 0
                unless $delta >= 0 && $delta <= $max_days
@@ -36,7 +27,7 @@ index b7a2118..00d8993 100755
  
              $i++;
          }
-@@ -89,7 +89,7 @@ SKIP: {
+@@ -89,7 +89,7 @@
  
              $pass = 0
                unless $delta >= 0 && $delta <= $max_days
@@ -45,7 +36,7 @@ index b7a2118..00d8993 100755
  
              $i++;
          }
-@@ -121,7 +121,7 @@ SKIP: {
+@@ -121,7 +121,7 @@
  
              $pass = 0
                unless $delta >= 0 && $delta <= $max_days
@@ -54,7 +45,7 @@ index b7a2118..00d8993 100755
  
              $i++;
          }
-@@ -139,7 +139,7 @@ SKIP: {
+@@ -139,7 +139,7 @@
  
          $pass = 0
            unless $new_year == $year && $new_month == $month && $new_day == $day
@@ -63,19 +54,3 @@ index b7a2118..00d8993 100755
  
          ok($pass);
      }
-diff --git a/t/rand_time.t b/t/rand_time.t
-index 1f9b656..3592c7e 100755
---- a/t/rand_time.t
-+++ b/t/rand_time.t
-@@ -16,7 +16,7 @@ use Data::Random qw( rand_time );
-     while ( $pass && $i < $max_secs ) {
-         my $time = rand_time();
- 
--        $pass = 0 unless _to_secs($time);
-+        $pass = 0 unless defined( _to_secs($time) );
- 
-         $i++;
-     }
--- 
-1.7.3.3
-
diff --git a/perl-Data-Random.spec b/perl-Data-Random.spec
index 3f152c8..0318312 100644
--- a/perl-Data-Random.spec
+++ b/perl-Data-Random.spec
@@ -1,17 +1,18 @@
 Name:           perl-Data-Random
-Version:        0.05
-Release:        6%{?dist}
+Version:        0.06
+Release:        1%{?dist}
 Summary:        Perl module to generate random data
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Data-Random/
-Source0:        http://www.cpan.org/authors/id/A/AD/ADEO/Data-Random-%{version}.tar.gz
-Patch0:         perl-Data-Random-0.05-Check-if-_to_secs-returns-undef.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source0:        http://www.cpan.org/authors/id/B/BA/BAREFOOT/Data-Random-%{version}.tar.gz
+Patch0:         perl-Data-Random-0.06-Check-if-_to_secs-returns-undef.patch
 BuildArch:      noarch
 BuildRequires:  perl(Date::Calc)
 BuildRequires:  perl(GD)
 BuildRequires:  perl(ExtUtils::MakeMaker)
+BuildRequires:  perl(Test::Pod)
+BuildRequires:  perl(Test::Pod::Coverage)
 BuildRequires:  perl(Test::More)
 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 
@@ -23,15 +24,13 @@ A module used to generate random data. Useful mostly for test programs.
 %prep
 %setup -q -n Data-Random-%{version}
 %patch0 -p1 -b .test
-chmod 644 Random.pm README.linux.words README2.linux.words Random/WordList.pm
+chmod 644 lib/Data/Random.pm README.linux.words README2.linux.words lib/Data/Random/WordList.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 {} \;
@@ -42,16 +41,17 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
 %check
 make test
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %files
-%defattr(-,root,root,-)
 %doc Changes README README2.linux.words README.linux.words
 %{perl_vendorlib}/*
 %{_mandir}/man3/*
 
 %changelog
+* Wed Dec  7 2011 Emmanuel Seyman <emmanuel.seyman at club-internet.fr> - 0.05-1
+- Update to 0.06 and refresh the patch
+- Clean up spec file
+- Enable all tests
+
 * Tue Jul 19 2011 Petr Sabata <contyk at redhat.com> - 0.05-6
 - Perl mass rebuild
 
diff --git a/sources b/sources
index 4671ec4..971f513 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-6c0233d074577771421d77712758d898  Data-Random-0.05.tar.gz
+eb0e4ac63927cc4e37476b0907a03ab9  Data-Random-0.06.tar.gz



More information about the perl-devel mailing list