From dad7a47ffcc0c0a3caeee0ce72d0e4a75d78cda4 Mon Sep 17 00:00:00 2001 From: Petr Písař Date: Mar 17 2017 09:37:45 +0000 Subject: 1.4.0 bump --- diff --git a/.gitignore b/.gitignore index 8f66bd9..33241c2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /BSON-v1.2.2.tar.gz +/BSON-v1.4.0.tar.gz diff --git a/.rpmlint b/.rpmlint new file mode 100644 index 0000000..8776acb --- /dev/null +++ b/.rpmlint @@ -0,0 +1,2 @@ +from Config import * +addFilter("spelling-error .* (bsonspec|deserialization|http|versa)"); diff --git a/BSON-v1.2.2-Do-not-produce-Math-BigFloat-by-BSON-Time.patch b/BSON-v1.2.2-Do-not-produce-Math-BigFloat-by-BSON-Time.patch deleted file mode 100644 index 129199a..0000000 --- a/BSON-v1.2.2-Do-not-produce-Math-BigFloat-by-BSON-Time.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 8880ecb3084e6a4ed8cd37ea8b6701d8cd2987ef Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Fri, 24 Feb 2017 14:02:28 +0100 -Subject: [PATCH] Do not produce Math::BigFloat by BSON::Time -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Tests failed on 32-bit Perl without 64-bit intergers: - -During encode_one, Don't know how to encode Math::BigFloat '151109408000' as an Int64. at /builddir/build/BUILD/BSON-v1.2.2/blib/lib/BSON.pm line 299. - at t/legacy/10-bson.t line 385. - -That was caused by BSON::Time returning Math::BigFloat instead of -Math::BigInt. And as consequence BSON::PP::_pack_int64() bailed out -because it does not support Math::BigFloat. - -The issue was that Math::BigFloat->int() does not return Math::BigInt. -It still returns Math::BigFloat. This patch fixes by calling -as_number() that does so. - - - -Signed-off-by: Petr Písař ---- - lib/BSON/Time.pm | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/lib/BSON/Time.pm b/lib/BSON/Time.pm -index bf10583..4f874a9 100644 ---- a/lib/BSON/Time.pm -+++ b/lib/BSON/Time.pm -@@ -43,7 +43,7 @@ sub BUILDARGS { - else { - $args{value} = Math::BigFloat->new(time()); - $args{value}->bmul(1000); -- $args{value} = int($args{value}); -+ $args{value} = $args{value}->as_number('zero'); - } - } - elsif ( $n == 1 ) { -@@ -53,7 +53,7 @@ sub BUILDARGS { - if ( !$Config{use64bitint} && ref($args{value}) ne 'Math::BigInt' ) { - $args{value} = Math::BigFloat->new(shift); - $args{value}->bmul(1000); -- $args{value} = int($args{value}); -+ $args{value} = $args{value}->as_number('zero'); - } - else { - $args{value} = 1000 * shift; -@@ -73,7 +73,7 @@ sub BUILDARGS { - if ( !$Config{use64bitint} && ref($args{value}) ne 'Math::BigInt' ) { - $args{value} = Math::BigFloat->new(shift); - $args{value}->bmul(1000); -- $args{value} = int($args{value}); -+ $args{value} = $args{value}->as_number('zero'); - } - else { - $args{value} = 1000 * shift; --- -2.7.4 - diff --git a/perl-BSON.spec b/perl-BSON.spec index 66d7267..24696cf 100644 --- a/perl-BSON.spec +++ b/perl-BSON.spec @@ -1,21 +1,17 @@ Name: perl-BSON -Version: 1.2.2 -Release: 3%{?dist} +Version: 1.4.0 +Release: 1%{?dist} Summary: BSON serialization and deserialization License: ASL 2.0 -Group: Development/Libraries URL: http://search.cpan.org/dist/BSON/ Source0: http://www.cpan.org/authors/id/M/MO/MONGODB/BSON-v%{version}.tar.gz -# Fix constructing BSON::Time objects on 32-bit perl, bug #1401448, -# -Patch0: BSON-v1.2.2-Do-not-produce-Math-BigFloat-by-BSON-Time.patch BuildArch: noarch BuildRequires: findutils BuildRequires: make BuildRequires: perl BuildRequires: perl-generators -BuildRequires: perl(:VERSION) >= 5.8.1 -BuildRequires: perl(ExtUtils::MakeMaker) >= 6.17 +BuildRequires: perl(:VERSION) >= 5.10.1 +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(strict) BuildRequires: perl(warnings) # Run-time: @@ -86,15 +82,13 @@ versa in accordance with the BSON specification . %prep %setup -q -n BSON-v%{version} -%patch0 -p1 %build -perl Makefile.PL INSTALLDIRS=vendor +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 make %{?_smp_mflags} %install make pure_install DESTDIR=$RPM_BUILD_ROOT -find $RPM_BUILD_ROOT -type f -name .packlist -delete %{_fixperms} $RPM_BUILD_ROOT/* %check @@ -108,6 +102,9 @@ make test %{_mandir}/man3/* %changelog +* Fri Mar 17 2017 Petr Pisar - 1.4.0-1 +- 1.4.0 bump + * Fri Feb 24 2017 Petr Pisar - 1.2.2-3 - Fix constructing BSON::Time objects on 32-bit perl (bug #1401448) diff --git a/sources b/sources index 78f8da1..12bc889 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -723b5eaea49be2df4f8bdedff9b8bc18 BSON-v1.2.2.tar.gz +SHA512 (BSON-v1.4.0.tar.gz) = 3904ad3e426514fc826ef3dea31c93c9ce22e3b0d4b4790528e8eba91412e7dc626b44c08a43fb528780bd53a29d25a5b9ad6fd270cfb52fe8e3fdcbc3ba5afe