[perl-Crypt-Random] Fix intermittent FTBFS (#1158379)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 2059a231d49f21d74d3b815cf97d6fadd29a57f1
Author: Paul Howarth <paul@xxxxxxxxxxxx>
Date:   Wed Oct 29 11:21:36 2014 +0000

    Fix intermittent FTBFS (#1158379)
    
    - Prevent test that should fail 0.1% of the time from causing FTBFS
      (CPAN RT#99880, #1158379)
    - Classify buildreqs by usage
    - Drop %defattr, redundant since rpm 4.4
    - Don't need to remove empty directories from the buildroot

 Crypt-Random-1.25-test-fix.patch |   13 +++++++++++++
 perl-Crypt-Random.spec           |   33 ++++++++++++++++++++++++++++-----
 2 files changed, 41 insertions(+), 5 deletions(-)
---
diff --git a/Crypt-Random-1.25-test-fix.patch b/Crypt-Random-1.25-test-fix.patch
new file mode 100644
index 0000000..7c2a822
--- /dev/null
+++ b/Crypt-Random-1.25-test-fix.patch
@@ -0,0 +1,13 @@
+--- t/generator.t
++++ t/generator.t
+@@ -23,7 +23,10 @@
+     my $y = $gen->integer (Size => 10);
+     ok($x < 1025, 1);
+     ok($y < 1025, 1);
++    TODO: {
++    local $TODO = "There's about a 0.1% chance that this test will fail normally";
+     ok($x != $y, 1);
++    }
+     ok($gen->integer (Upper => 500) < 501, 1);
+     ok($gen->integer (Size => 128));
+     ok(length($gen->string (Length => 30)), 30);
diff --git a/perl-Crypt-Random.spec b/perl-Crypt-Random.spec
index a5f7737..1e86de4 100644
--- a/perl-Crypt-Random.spec
+++ b/perl-Crypt-Random.spec
@@ -1,17 +1,31 @@
 Summary:	Cryptographically Secure, True Random Number Generator
 Name:		perl-Crypt-Random
 Version:	1.25
-Release:	20%{?dist}
+Release:	21%{?dist}
 License:	GPL+ or Artistic
 Group:		Development/Libraries
 Url:		http://search.cpan.org/dist/Crypt-Random/
 Source0:	http://search.cpan.org/CPAN/authors/id/V/VI/VIPUL/Crypt-Random-%{version}.tar.gz
+Patch0:		Crypt-Random-1.25-test-fix.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildArch:	noarch
+# Module Build
+BuildRequires:	perl
+BuildRequires:	perl(ExtUtils::MakeMaker)
+# Module Runtime
 BuildRequires:	perl(Carp)
 BuildRequires:	perl(Class::Loader)	>= 2.00
-BuildRequires:	perl(ExtUtils::MakeMaker)
+BuildRequires:	perl(Data::Dumper)
+BuildRequires:	perl(Exporter)
+BuildRequires:	perl(Fcntl)
+BuildRequires:	perl(IO::Socket)
+BuildRequires:	perl(lib)
 BuildRequires:	perl(Math::Pari)	>= 2.001804
+BuildRequires:	perl(strict)
+BuildRequires:	perl(vars)
+# Test Suite
+BuildRequires:	perl(Test)
+# Runtime
 Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 
 %description
@@ -25,6 +39,10 @@ interval.
 %prep
 %setup -q -n Crypt-Random-%{version}
 
+# Prevent test that should fail 0.1% of the time from causing FTBFS (#1158379)
+# https://rt.cpan.org/Public/Bug/Display.html?id=99880
+%patch0
+
 # Remove shellbangs to shut rpmlint up
 find ./lib -name '*.pm' -print | xargs sed -i -e '/^#! *\/usr\/bin\/perl /d'
 
@@ -36,7 +54,6 @@ make %{?_smp_mflags}
 rm -rf %{buildroot}
 make pure_install DESTDIR=%{buildroot}
 find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
-find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
 %{_fixperms} %{buildroot}
 
 %check
@@ -46,13 +63,19 @@ make test
 rm -rf %{buildroot}
 
 %files
-%defattr(-,root,root,-)
 %doc Changes README
 %{_bindir}/makerandom
 %{perl_vendorlib}/Crypt/
-%{_mandir}/man3/Crypt::Random.3pm*
+%{_mandir}/man3/Crypt::Random.3*
 
 %changelog
+* Wed Oct 29 2014 Paul Howarth <paul@xxxxxxxxxxxx> - 1.25-21
+- Prevent test that should fail 0.1%% of the time from causing FTBFS
+  (CPAN RT#99880, #1158379)
+- Classify buildreqs by usage
+- Drop %%defattr, redundant since rpm 4.4
+- Don't need to remove empty directories from the buildroot
+
 * Wed Aug 27 2014 Jitka Plesnikova <jplesnik@xxxxxxxxxx> - 1.25-20
 - Perl 5.20 rebuild
 
--
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





[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux