|
|
|
@ -1,22 +1,22 @@
|
|
|
|
|
%global gem_name mongo
|
|
|
|
|
# Disable tests as MongoDB was dropped from RHEL because of a licensing issue.
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1710863
|
|
|
|
|
%bcond_with tests
|
|
|
|
|
%global enable_tests 0
|
|
|
|
|
|
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
|
Version: 2.11.3
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Version: 2.5.1
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Summary: Ruby driver for MongoDB
|
|
|
|
|
License: ASL 2.0
|
|
|
|
|
URL: https://docs.mongodb.com/ruby-driver/
|
|
|
|
|
URL: http://www.mongodb.org
|
|
|
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
|
|
BuildRequires: ruby(release)
|
|
|
|
|
BuildRequires: rubygems-devel
|
|
|
|
|
BuildRequires: ruby
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
# For running the tests
|
|
|
|
|
BuildRequires: %{_bindir}/mongod
|
|
|
|
|
BuildRequires: rubygem(bson) >= 4.6.0
|
|
|
|
|
BuildRequires: rubygem(bson) >= 4.3.0
|
|
|
|
|
BuildRequires: rubygem(rspec)
|
|
|
|
|
%endif
|
|
|
|
|
BuildArch: noarch
|
|
|
|
@ -34,11 +34,15 @@ BuildArch: noarch
|
|
|
|
|
Documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{gem_name}-%{version}
|
|
|
|
|
gem unpack %{SOURCE0}
|
|
|
|
|
|
|
|
|
|
%setup -q -D -T -n %{gem_name}-%{version}
|
|
|
|
|
|
|
|
|
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# Create the gem as gem install only works on a gem file
|
|
|
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
|
|
|
|
gem build %{gem_name}.gemspec
|
|
|
|
|
|
|
|
|
|
%gem_install
|
|
|
|
|
|
|
|
|
@ -57,7 +61,7 @@ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
|
|
|
|
# Drop the shebang, file is not executable anyway.
|
|
|
|
|
sed -i '/#!\// d' %{buildroot}%{gem_instdir}/Rakefile
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
%check
|
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
|
|
|
|
|
@ -70,21 +74,6 @@ mongod \
|
|
|
|
|
--fork \
|
|
|
|
|
--auth
|
|
|
|
|
|
|
|
|
|
# timeout-interrupt is not available in Fedora yet.
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
# Shutdown mongo and cleanup the data.
|
|
|
|
@ -99,6 +88,7 @@ popd
|
|
|
|
|
%license %{gem_instdir}/LICENSE
|
|
|
|
|
%{gem_instdir}/bin
|
|
|
|
|
%{gem_libdir}
|
|
|
|
|
%exclude %{gem_instdir}/mongo.gemspec
|
|
|
|
|
%exclude %{gem_cache}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
|
|
|
|
@ -107,18 +97,9 @@ popd
|
|
|
|
|
%doc %{gem_instdir}/CONTRIBUTING.md
|
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
%{gem_instdir}/Rakefile
|
|
|
|
|
%{gem_instdir}/mongo.gemspec
|
|
|
|
|
%{gem_instdir}/spec
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Fri May 29 2020 Jun Aruga <jaruga@redhat.com> - 2.11.3-1
|
|
|
|
|
- Update to mongo 2.11.3 by merging Fedora master branch (commit: c3f83c2)
|
|
|
|
|
Resolves: rhbz#1817135
|
|
|
|
|
|
|
|
|
|
* Wed Jun 12 2019 Jun Aruga <jaruga@redhat.com> - 2.8.0-1
|
|
|
|
|
- Update to mongo 2.8.0 by merging Fedora master branch (commit: 87991f9)
|
|
|
|
|
Resolves: rhbz#1672575
|
|
|
|
|
|
|
|
|
|
* Thu May 16 2019 Jun Aruga <jaruga@redhat.com> - 2.5.1-2
|
|
|
|
|
- Disable tests to fix FTBFS by dropped MongoDB module.
|
|
|
|
|
Resolves: rhbz#1710863
|
|
|
|
|