diff --git a/.gitignore b/.gitignore index 806dbbb..925fd61 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /mongo-2.11.1.gem /mongo-2.11.2.gem /mongo-2.11.3.gem +/mongo-2.14.0.gem diff --git a/rubygem-mongo.spec b/rubygem-mongo.spec index 45b8d6e..4c72182 100644 --- a/rubygem-mongo.spec +++ b/rubygem-mongo.spec @@ -4,20 +4,23 @@ %bcond_with tests Name: rubygem-%{gem_name} -Version: 2.11.3 -Release: 2%{?dist} +Version: 2.14.0 +Release: 1%{?dist} Summary: Ruby driver for MongoDB License: ASL 2.0 -URL: https://docs.mongodb.com/ruby-driver/ +URL: https://docs.mongodb.com/ruby-driver/current/ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby %if %{with tests} # For running the tests -BuildRequires: %{_bindir}/mongod -BuildRequires: rubygem(bson) >= 4.6.0 +BuildRequires: rubygem(bson) >= 4.8.2 +# ffi is an optional runtime dependency. +# https://jira.mongodb.org/browse/RUBY-2465 +BuildRequires: rubygem(ffi) BuildRequires: rubygem(rspec) +BuildRequires: rubygem(timecop) %endif BuildArch: noarch @@ -55,6 +58,7 @@ cp -a .%{_bindir}/* \ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x # Drop the shebang, file is not executable anyway. +# https://jira.mongodb.org/browse/RUBY-2469 sed -i '/#!\// d' %{buildroot}%{gem_instdir}/Rakefile %if %{with tests} @@ -62,30 +66,61 @@ sed -i '/#!\// d' %{buildroot}%{gem_instdir}/Rakefile pushd .%{gem_instdir} # Create data directory and start testing mongo instance. -# See https://github.com/mongodb/mongo-ruby-driver/blob/master/.travis.yml mkdir data +# The enableTestCommands=1 is required. +# https://github.com/mongodb/mongo-ruby-driver/blob/master/spec/README.md#standalone +# https://github.com/mongodb/mongo-ruby-driver/blob/master/spec/README.md#fail-points mongod \ --dbpath data \ --logpath data/log \ - --fork \ - --auth + --setParameter enableTestCommands=1 \ + --fork # timeout-interrupt is not available in Fedora yet. +# timeout-interrupt does not work on glibc >= 2.32. +# https://jira.mongodb.org/projects/RUBY/issues/RUBY-2462 sed -i "/^if SpecConfig\.instance\.mri?$/i\\ require 'timeout'\\ TimeoutInterrupt = Timeout\\ -" spec/spec_helper.rb -sed -i "/^if SpecConfig\.instance\.mri?$/,/^end$/ s/^/#/" spec/spec_helper.rb +" spec/lite_spec_helper.rb +sed -i "/^if SpecConfig\.instance\.mri?$/,/^end$/ s/^/#/" spec/lite_spec_helper.rb # rspec-retry is not available in Fedora yet. sed -i "/require 'rspec\/retry'/ s/^/#/" spec/spec_helper.rb -# I can't figure why this fails. It might be upstream issue, because it seems -# it was not tested against MonogoDB 4.x. -sed -i "/collection.client.use(:admin).command(FAIL_POINT_BASE_COMMAND.merge(/i\ pending" \ - spec/integration/bulk_insert_spec.rb - -CI=1 EXTERNAL_DISABLED=1 rspec spec +# ice_nine is not available in Fedora yet. +sed -i "/^autoload :IceNine, 'ice_nine'/ s/^/#/" spec/lite_spec_helper.rb +sed -i "/IceNine\.deep_freeze/ s/^/#/" spec/runners/transactions/test.rb +sed -i "s/IceNine\.deep_freeze(spec)/spec/" spec/runners/crud/operation.rb + +# Drop byebug dependency that is not needed to build. +sed -i '/^if \%w(1 true yes)\.include\?/,/^end$/ s/^/#/' spec/lite_spec_helper.rb +sed -i "/autoload :Byebug, 'byebug'/ s/^/#/" spec/support/aws_utils.rb + +# rubydns is not available in Fedora yet. +sed -i "/require 'rubydns'/ s/^/#/" spec/support/dns.rb +mv spec/integration/srv_monitoring_spec.rb{,.disabled} +mv spec/integration/srv_spec.rb{,.disabled} +sed -i "/^ context 'in unknown topology' do$/,/^ end$/ s/^/#/" \ + spec/integration/reconnect_spec.rb + +# Skip tests using internet. +# https://jira.mongodb.org/browse/RUBY-2468 +mv spec/mongo/uri/srv_protocol_spec.rb{,.disabled} + +# Creates necessary user accounts in the cluster +# See Rakefile "spec:prepare". +# https://jira.mongodb.org/browse/RUBY-2466 +ruby -I lib:spec/shared/lib:spec < - 2.14.0-1 +- Update to mongo 2.14.0. + * Wed Jul 29 2020 Fedora Release Engineering - 2.11.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 1d5747c..6ee2c8c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mongo-2.11.3.gem) = 0705ed8c5a26b07f77702fbfd035c82e45647f4531ded42516a5930c447e7a1f1be431f54223bb434a8ab5e2389106d0cee7bacc4a4408f700cf93ee4a06f8b8 +SHA512 (mongo-2.14.0.gem) = d62dca02e063eac74076bf556a453ff6a09b0d8628843901a30f5296d6b1f01844d1fdfe5e55736d54907f2f9705f1913b87cf15bc7ea9c4f4cf441e0538937e