Blob Blame History Raw
Name:           perl-MongoDB
Version:        1.6.1
Release:        2%{?dist}
Summary:        A MongoDB Driver for Perl
## Installed:
# lib/MongoDB/_Link.pm:             ASL 2.0 and (GPL+ or Artistic)
# ppport.h:                         GPL+ or Artistic
# Other files:                      ASL 2.0
## Not installed:
# bson/bson-stdint-win32.h:         BSD
# bson/b64_ntop.h:                  MIT
# bson/b64_pton.h:                  MIT
# bson/bson-md5.c:                  zlib
# inc/Module/Install/Compiler.pm:   GPL+ or Artistic
# pstdint.h:                        BSD
License:        ASL 2.0 and (GPL+ or Artistic)
URL:            http://search.cpan.org/dist/MongoDB/
Source0:        http://www.cpan.org/authors/id/M/MO/MONGODB/MongoDB-v%{version}.tar.gz
# Use system libbson if available <https://jira.mongodb.org/browse/PERL-521>
Patch0:         MongoDB-v1.2.2-Use-system-libbson-library-if-possible.patch
# Build:
BuildRequires:  coreutils
BuildRequires:  findutils
BuildRequires:  gcc
BuildRequires:  make
BuildRequires:  perl
BuildRequires:  perl-devel
BuildRequires:  perl-generators
BuildRequires:  perl(Config)
BuildRequires:  perl(Config::AutoConf) >= 0.22
BuildRequires:  perl(constant)
BuildRequires:  perl(Cwd)
BuildRequires:  perl(File::Spec::Functions)
BuildRequires:  perl(inc::Module::Install)
BuildRequires:  perl(Module::Install::Base)
BuildRequires:  perl(Module::Install::Compiler)
BuildRequires:  perl(Module::Install::Metadata)
BuildRequires:  perl(Module::Install::WriteAll)
BuildRequires:  perl(Path::Tiny) >= 0.054
BuildRequires:  perl(strict)
BuildRequires:  perl(warnings)
BuildRequires:  pkgconfig(libbson-1.0)
BuildRequires:  sed
# Runtime:
# Authen::SCRAM::Client 0.003 not used at tests
BuildRequires:  perl(boolean) >= 0.25
BuildRequires:  perl(BSON::Decimal128) >= 1
BuildRequires:  perl(BSON::Types)
BuildRequires:  perl(bytes)
BuildRequires:  perl(Carp)
BuildRequires:  perl(DateTime)
BuildRequires:  perl(Digest::MD5)
BuildRequires:  perl(Encode)
BuildRequires:  perl(Errno)
BuildRequires:  perl(Exporter) >= 5.57
BuildRequires:  perl(if)
BuildRequires:  perl(File::Compare)
BuildRequires:  perl(IO::File)
BuildRequires:  perl(IO::Socket)
# Prefer IO::Socket::IP over IO::Socket::INET
BuildRequires:  perl(IO::Socket::IP) >= 0.25
# IO::Socket::SSL 1.42 not used at tests
BuildRequires:  perl(List::Util)
# Math::BigInt needed only on 32-bit system at run-time, but always needed for
# tests
BuildRequires:  perl(MIME::Base64)
BuildRequires:  perl(Moo) >= 2
BuildRequires:  perl(Moo::Role)
BuildRequires:  perl(namespace::clean)
# Net::SSLeay 1.49 not used at tests
BuildRequires:  perl(overload)
BuildRequires:  perl(Safe::Isa)
BuildRequires:  perl(Scalar::Util)
BuildRequires:  perl(Socket)
BuildRequires:  perl(Sub::Quote)
BuildRequires:  perl(Tie::IxHash)
BuildRequires:  perl(Time::HiRes)
BuildRequires:  perl(Try::Tiny)
BuildRequires:  perl(Type::Library)
BuildRequires:  perl(Type::Utils)
BuildRequires:  perl(Types::Standard)
BuildRequires:  perl(version)
BuildRequires:  perl(XSLoader)
# Optional runtime:
# Authen::SASL not used at tests
# Mozilla::CA no used at tests
# Tests only:
BuildRequires:  mongodb-server
BuildRequires:  perl(bigint)
BuildRequires:  perl(Data::Dumper)
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(File::Compare)
BuildRequires:  perl(File::Spec)
BuildRequires:  perl(File::Temp)
BuildRequires:  perl(FileHandle)
BuildRequires:  perl(JSON::MaybeXS) >= 1.002005
BuildRequires:  perl(lib)
BuildRequires:  perl(Math::BigInt)
BuildRequires:  perl(Test::Deep) >= 0.111
BuildRequires:  perl(Test::Fatal)
BuildRequires:  perl(Test::More) >= 0.96
BuildRequires:  perl(threads)
BuildRequires:  perl(threads::shared)
BuildRequires:  perl(utf8)
# Optional tests:
# CPAN::Meta not useful
BuildRequires:  perl(Cpanel::JSON::XS)
BuildRequires:  perl(DateTime::Tiny) >= 1
BuildRequires:  perl(JSON::PP) >= 2.27300
BuildRequires:  perl(JSON::Tiny)
BuildRequires:  perl(Mojo::JSON)
BuildRequires:  perl(Test::Harness) >= 3.31
BuildRequires:  perl(Time::Moment) >= 0.22
BuildRequires:  perl(Types::Serialiser)
Requires:       perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version))
Suggests:       perl(Authen::SASL)
Requires:       perl(Authen::SCRAM::Client) >= 0.003
# Class::XSAccessor for performance
Recommends:     perl(Class::XSAccessor)
Requires:       perl(BSON::Decimal128) >= 1
# Prefer IO::Socket::IP over IO::Socket::INET
Requires:       perl(IO::Socket::IP) >= 0.25
Requires:       perl(IO::Socket::SSL) >= 1.42
%if 0%(perl -MConfig -e 'print defined $Config{use64bitint} ? 0 : 1')
Requires:       perl(Math::BigInt)
%endif
Requires:       perl(Moo) >= 2
Recommends:     perl(Mozilla::CA)
Requires:       perl(Net::SSLeay) >= 1.49

# Mongodb must run on a 32-bit little-endian or 64-bit any-endian CPU
# (see bug #630898)
ExcludeArch:    ppc %{sparc} s390

# Filter under-specified dependencies
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((boolean|BSON::Decimal128|Moo)\\)$

%description
The perl database access module for MongoDB.

%prep
%setup -q -n MongoDB-v%{version}
# Unbundle libbson
%patch0 -p1
rm -r bson
sed -i -e '/^bson\//d' MANIFEST
# Remove bundled modules
find inc/Module -type f \! -name Mongo.pm \
    -exec rm -- {} \; -exec sed -i '\,{},d' MANIFEST \;
# The inc::Module::Install cannot bootstrap with private extensions,
# it needs double init:
mv inc inc.old
sed -i -e 's/^mongo;$/#mongo;/' Makefile.PL
perl Makefile.PL --ssl --sasl
sed -i -e 's/^#mongo;$/mongo;/' Makefile.PL
rmdir inc/.author
cp -r inc.old/* inc
rm -r inc.old

%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1
make %{?_smp_mflags}

%install
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name '*.bs' -size 0 -delete
%{_fixperms} %{buildroot}/*

%check
mkdir test_db
mongod --fork --logpath $PWD/mongod.log --pidfilepath $PWD/mongod.pid \
    --dbpath $PWD/test_db/ --smallfiles || test_rc=$?
if [ -n "$test_rc" ]; then
    printf "Error: Could not start mongod server\n"
    cat mongod.log
    exit 1
fi
FAILPOINT_TESTING=1 make test || test_rc=$?
kill `cat mongod.pid`
cat mongod.log
exit $test_rc

%files
%license LICENSE
%doc Changes CONTRIBUTING.md README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/MongoDB*
%{_mandir}/man3/*

%changelog
* Fri Feb 24 2017 Petr Pisar <ppisar@redhat.com> - 1.6.1-2
- Enable builds on 64-bit big-endian platforms

* Fri Feb 24 2017 Petr Pisar <ppisar@redhat.com> - 1.6.1-1
- 1.6.1 bump

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Petr Pisar <ppisar@redhat.com> - 1.4.5-3
- Adapt tests to MongoDB server 3.4.0-rc0

* Thu Oct 13 2016 Petr Pisar <ppisar@redhat.com> - 1.4.5-2
- Rebuild against libbson-1.5.0-rc2 (bug #1380063)

* Fri Sep 02 2016 Petr Pisar <ppisar@redhat.com> - 1.4.5-1
- 1.4.5 bump

* Mon Aug 29 2016 Petr Pisar <ppisar@redhat.com> - 1.4.4-2
- Rebuild against libbson-1.4.0 (bug #1361166)

* Mon Aug 01 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.4.4-1
- 1.4.4 bump

* Tue Jul 19 2016 Petr Pisar <ppisar@redhat.com> - 1.4.3-1
- 1.4.3 bump

* Tue Jun 14 2016 Petr Pisar <ppisar@redhat.com> - 1.4.2-1
- 1.4.2 bump

* Thu May 19 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.4.1-2
- Perl 5.24 re-rebuild of bootstrapped packages

* Thu May 19 2016 Petr Pisar <ppisar@redhat.com> - 1.4.1-1
- 1.4.1 bump
- Fix MongoDB::GridFSBucket::DownloadStream to work without Class::XSAccessor
- Recommend Class::XSAccessor for performance

* Tue May 17 2016 Petr Pisar <ppisar@redhat.com> - 1.4.0-3
- Enable grid tests and add an explicit dependency on Class::XSAccessor to avoid
  a Moo memory bug

* Tue May 17 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.4.0-2
- Perl 5.24 rebuild

* Fri May 13 2016 Petr Pisar <ppisar@redhat.com> - 1.4.0-1
- 1.4.0 bump
- Disable grid tests on x86

* Fri Apr 01 2016 Petr Pisar <ppisar@redhat.com> - 1.2.3-2
- Enable tests on ARM (bug #1303864)
- Do not override server's storage in tests (bug #1303846)

* Wed Mar 09 2016 Petr Pisar <ppisar@redhat.com> - 1.2.3-1
- 1.2.3 bump

* Tue Feb 16 2016 Petr Pisar <ppisar@redhat.com> - 1.2.2-1
- 1.2.2 bump
- License changed to (ASL 2.0 and (GPL+ or Artistic))

* Tue Feb 16 2016 Petr Pisar <ppisar@redhat.com> - 0.708.4.0-4
- Unbundle libbson
- Unbundle Perl modules

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.708.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Feb 02 2016 Petr Pisar <ppisar@redhat.com> - 0.708.4.0-2
- Print log if server could not been started
- Use mmapv1 engine in tests (bug #1303846)
- Disable tests on ARM because of the server (bug #1303864)

* Wed Aug 12 2015 Petr Šabata <contyk@redhat.com> - 0.708.4.0-1
- 0.708.4.0 bump, fix the build
- Source URL updated
- Modernize the spec file

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.702.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Jun 08 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.702.2-6
- Perl 5.22 rebuild

* Mon Sep 01 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.702.2-5
- Perl 5.20 rebuild

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.702.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.702.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue Sep 24 2013 Robin Lee <cheeselee@fedoraproject.org> - 0.702.2-2
- Actually remove arm from ExcludeArch

* Tue Sep 24 2013 Robin Lee <cheeselee@fedoraproject.org> - 0.702.2-1
- Update to 0.702.2, fix ARM build (BZ#997975)

* Tue Aug 13 2013 Robin Lee <cheeselee@fedoraproject.org> - 0.702.1-1
- Update to 0.702.1
- ExcludeArch arm (BZ#997975)
- Make sure mongodb server is killed after tests
- Summary revised

* Sun Aug 04 2013 Petr Pisar <ppisar@redhat.com> - 0.702.0-2
- Perl 5.18 rebuild

* Sun Aug  4 2013 Robin Lee <cheeselee@fedoraproject.org> - 0.702.0-1
- Update to 0.702.0, enable sasl support

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.700.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Mon Apr 22 2013 Robin Lee <cheeselee@fedoraproject.org> - 0.700.0-2
- Use perldoc to find Module::Install::Compiler

* Mon Apr 22 2013 Robin Lee <cheeselee@fedoraproject.org> - 0.700.0-1
- Update to 0.700.0

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.503.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Thu Jan 24 2013 Robin Lee <cheeselee@fedoraproject.org> - 0.503.3-1
- Update to 0.503.3
- Enable SSL support

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.45-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jun 22 2012 Petr Pisar <ppisar@redhat.com> - 0.45-4
- Perl 5.16 rebuild

* Wed Feb 08 2012 Dan Horák <dan[at]danny.cz> - 0.45-3
- set ExcludeArch to all big-endian arches

* Wed Jan 11 2012 Robin Lee <cheeselee@fedoraproject.org> - 0.45-2
- BR revised
- Prepare a MongoDB server to run the test suite
- Other minor cleanup

* Tue Sep 20 2011 Michal Ingeli <mi@v3.sk> 0.45-1
- Upstream upgrade 0.45
- removed ccflags patch, fixed in upstream

* Mon Aug 08 2011 Michal Ingeli <mi@v3.sk> 0.44-1
- Version update to 0.44
- Removing ccflags from Makefile.PL that breaks i686 build

* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 0.41-5
- Perl mass rebuild

* Tue Jul 19 2011 Petr Sabata <contyk@redhat.com> - 0.41-4
- Perl mass rebuild

* Sat Jan 22 2011 Michal Ingeli <mi@v3.sk> 0.41-3
- Conditionalize perl_default_filter
- Added Try::Tiny, required for test phase

* Sat Jan 22 2011 Michal Ingeli <mi@v3.sk> 0.41-2
- Removed redundant requires

* Wed Jan 19 2011 Michal Ingeli <mi@v3.sk> 0.41-1
- Provides filtering
- Fixed license
- Specfile autogenerated by cpanspec 1.78.