#5 Update to Concurrent 1.2.3 and adapt test suite to new release
Opened a year ago by terjeros. Modified 4 months ago
rpms/ terjeros/rubygem-concurrent-ruby rawhide  into  rawhide

file modified
+4
@@ -10,3 +10,7 @@ 

  /concurrent-ruby-1.1.5.gem

  /concurrent-ruby-1.1.9-specs.tar.gz

  /concurrent-ruby-1.1.9.gem

+ /concurrent-ruby-1.2.2.gem

+ /concurrent-ruby-1.2.2-specs.tar.gz

+ /concurrent-ruby-1.2.3.gem

+ /concurrent-ruby-1.2.3-specs.tar.gz

@@ -0,0 +1,108 @@ 

+ diff --git a/spec/concurrent/atomic/atomic_boolean_spec.rb b/spec/concurrent/atomic/atomic_boolean_spec.rb

+ index 133b7f2c..9d5a4fe9 100644

+ --- a/spec/concurrent/atomic/atomic_boolean_spec.rb

+ +++ b/spec/concurrent/atomic/atomic_boolean_spec.rb

+ @@ -142,11 +142,11 @@ module Concurrent

+      end

+    end

+  

+ -  if Concurrent.allow_c_extensions?

+ -    RSpec.describe CAtomicBoolean do

+ -      it_should_behave_like :atomic_boolean

+ -    end

+ -  end

+ +#  if Concurrent.allow_c_extensions?

+ +#    RSpec.describe CAtomicBoolean do

+ +#      it_should_behave_like :atomic_boolean

+ +#    end

+ +#  end

+  

+    if Concurrent.on_jruby?

+      RSpec.describe JavaAtomicBoolean do

+ @@ -165,10 +165,10 @@ module Concurrent

+        it 'inherits from JavaAtomicBoolean' do

+          expect(AtomicBoolean.ancestors).to include(JavaAtomicBoolean)

+        end

+ -    elsif Concurrent.allow_c_extensions?

+ -      it 'inherits from CAtomicBoolean' do

+ -        expect(AtomicBoolean.ancestors).to include(CAtomicBoolean)

+ -      end

+ +#    elsif Concurrent.allow_c_extensions?

+ +#      it 'inherits from CAtomicBoolean' do

+ +#        expect(AtomicBoolean.ancestors).to include(CAtomicBoolean)

+ +#      end

+      else

+        it 'inherits from MutexAtomicBoolean' do

+          expect(AtomicBoolean.ancestors).to include(MutexAtomicBoolean)

+ diff --git a/spec/concurrent/atomic/atomic_fixnum_spec.rb b/spec/concurrent/atomic/atomic_fixnum_spec.rb

+ index 39259b13..a0bb5f96 100644

+ --- a/spec/concurrent/atomic/atomic_fixnum_spec.rb

+ +++ b/spec/concurrent/atomic/atomic_fixnum_spec.rb

+ @@ -204,11 +204,11 @@ module Concurrent

+      end

+    end

+  

+ -  if Concurrent.allow_c_extensions?

+ -    RSpec.describe CAtomicFixnum do

+ -      it_should_behave_like :atomic_fixnum

+ -    end

+ -  end

+ +#  if Concurrent.allow_c_extensions?

+ +#    RSpec.describe CAtomicFixnum do

+ +#      it_should_behave_like :atomic_fixnum

+ +#    end

+ +#  end

+  

+    if Concurrent.on_jruby?

+      RSpec.describe JavaAtomicFixnum do

+ @@ -227,10 +227,10 @@ module Concurrent

+        it 'inherits from JavaAtomicFixnum' do

+          expect(AtomicFixnum.ancestors).to include(JavaAtomicFixnum)

+        end

+ -    elsif Concurrent.allow_c_extensions?

+ -      it 'inherits from CAtomicFixnum' do

+ -        expect(AtomicFixnum.ancestors).to include(CAtomicFixnum)

+ -      end

+ +#    elsif Concurrent.allow_c_extensions?

+ +#      it 'inherits from CAtomicFixnum' do

+ +#        expect(AtomicFixnum.ancestors).to include(CAtomicFixnum)

+ +#      end

+      else

+        it 'inherits from MutexAtomicFixnum' do

+          expect(AtomicFixnum.ancestors).to include(MutexAtomicFixnum)

+ diff --git a/spec/concurrent/atomic/atomic_reference_spec.rb b/spec/concurrent/atomic/atomic_reference_spec.rb

+ index 2cc0caad..dddaefc1 100644

+ --- a/spec/concurrent/atomic/atomic_reference_spec.rb

+ +++ b/spec/concurrent/atomic/atomic_reference_spec.rb

+ @@ -163,11 +163,11 @@ module Concurrent

+      it_should_behave_like :atomic_reference

+    end

+  

+ -  if Concurrent.allow_c_extensions?

+ -    RSpec.describe CAtomicReference do

+ -      it_should_behave_like :atomic_reference

+ -    end

+ -  end

+ +#  if Concurrent.allow_c_extensions?

+ +#    RSpec.describe CAtomicReference do

+ +#      it_should_behave_like :atomic_reference

+ +#    end

+ +#  end

+    if Concurrent.on_jruby?

+      RSpec.describe JavaAtomicReference do

+        it_should_behave_like :atomic_reference

+ @@ -190,10 +190,10 @@ module Concurrent

+        it 'inherits from JavaAtomicReference' do

+          expect(described_class.ancestors).to include(Concurrent::JavaAtomicReference)

+        end

+ -    elsif Concurrent.allow_c_extensions?

+ -      it 'inherits from CAtomicReference' do

+ -        expect(described_class.ancestors).to include(Concurrent::CAtomicReference)

+ -      end

+ +#    elsif Concurrent.allow_c_extensions?

+ +#      it 'inherits from CAtomicReference' do

+ +#        expect(described_class.ancestors).to include(Concurrent::CAtomicReference)

+ +#      end

+      elsif Concurrent.on_truffleruby?

+        it 'inherits from TruffleRubyAtomicReference' do

+          expect(described_class.ancestors).to include(Concurrent::TruffleRubyAtomicReference)

file modified
+13 -8
@@ -2,15 +2,18 @@ 

  %global gem_name concurrent-ruby

  

  Name: rubygem-%{gem_name}

- Version: 1.1.9

- Release: 4%{?dist}

+ Version: 1.2.3

+ Release: 1%{?dist}

  Summary: Modern concurrency tools for Ruby

  License: MIT

  URL: http://www.concurrent-ruby.com

  Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem

  # git clone https://github.com/ruby-concurrency/concurrent-ruby.git && cd concurrent-ruby

- # git archive -v -o concurrent-ruby-1.1.9-specs.tar.gz v1.1.9 spec/

+ # git archive -v -o concurrent-ruby-1.2.3-specs.tar.gz v1.2.3 spec/

  Source1: %{gem_name}-%{version}-specs.tar.gz

+ # We don't have the C extension. It would need to come from concurrent-ruby-ext

+ # and that would lead to circular dependency. Patch out such tests.

+ Patch0:  rubygem-concurrent-ruby-1.2.2-disable-c-ext-atomic.patch

  BuildRequires: ruby(release)

  BuildRequires: rubygems-devel

  BuildRequires: ruby >= 1.9.3
@@ -36,6 +39,8 @@ 

  

  %prep

  %setup -q -n %{gem_name}-%{version} -b 1

+ pushd ..

+ %patch0 -p1

  

  %build

  # Create the gem as gem install only works on a gem file
@@ -58,10 +63,6 @@ 

  # -edge is not part of this gem.

  sed -i '/require.*concurrent-edge/ s/^/#/' spec/spec_helper.rb

  

- # We don't have the C extension. It would need to come from concurrent-ruby-ext

- # and that would lead to cicrular dependency.

- sed -i '/allow_c_extensions?/,/^      end/ s/^/#/' spec/concurrent/atomic/atomic_reference_spec.rb

- 

  # Exclude the -edge test cases.

  #

  # Also exclude `scheduled_task_spec` and `timer_task_spec`,
@@ -72,7 +73,7 @@ 

  # spec/concurrent/executor/executor_service_shared.rb spawning new Ruby instance

  RUBYOPT=-Ilib/concurrent-ruby rspec -rspec_helper \

    -fd \

-   --exclude-pattern 'spec/concurrent/{actor_spec.rb,channel_spec.rb,lazy_register_spec.rb,channel/**/*,edge/**/*,promises_spec.rb,throttle_spec.rb,cancellation_spec.rb,scheduled_task_spec.rb,timer_task_spec.rb,executor/wrapping_executor_spec.rb}' \

+   --exclude-pattern 'spec/concurrent/{actor_spec.rb,channel_spec.rb,lazy_register_spec.rb,processing_actor_spec.rb,channel/**/*,edge/**/*,promises_spec.rb,throttle_spec.rb,cancellation_spec.rb,scheduled_task_spec.rb,timer_task_spec.rb,executor/wrapping_executor_spec.rb}' \

    spec

  

  popd
@@ -94,6 +95,10 @@ 

  %{gem_instdir}/Rakefile

  

  %changelog

+ * Tue Jan 16 2024 Terje Rosten <terje.rosten@ntnu.no> - 1.2.3-1

+ - Update to Concurrent 1.2.2 and adapt test suite to new release

+   Resolves: rhbz#2066526

+   

  * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.9-4

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

  

file modified
+2 -2
@@ -1,2 +1,2 @@ 

- SHA512 (concurrent-ruby-1.1.9-specs.tar.gz) = bde6b5553de4188900192e54f3d6166b18fd0a47bf6f3a23857e0d4c5ca26e99fe517ccd0bb21dbd91533605945659820816489984a7c6ebfa76054ade491c8b

- SHA512 (concurrent-ruby-1.1.9.gem) = 39472a1b5589a125428e67c532b23b8fead2a9e1a56e53d8de7d94cf95b52fc856540db657d751a2abfd1accbbbc66f3a7e05bc308f44445bb4344025abf00d5

+ SHA512 (concurrent-ruby-1.2.3.gem) = 644696300373709f2ed0c76a7abbfb989f2325578ebf92c3536419cf8e25b2defab251d60fd9f0ad6f9d79e102baac6578de4f2822d9cb0cf571ed2f7a05b9ea

+ SHA512 (concurrent-ruby-1.2.3-specs.tar.gz) = 2877d6adee2b61839bffd59a3f01eeb00933d6d5983e10043d942eb1950130ceb4c0205bf0b2fa6d264208d6f6326afe03762c37f8bbe6aa0016b6c222f2fe6c

This will resolve rhbz#20665261.

Due to changes in new release, some more C extension tests had to be disabled.

Builds fine in rawhide scratch build in koji:

https://koji.fedoraproject.org/koji/taskinfo?taskID=98037876

I think Puppet is still incompatible with version >= 1.2. I should update it to the latest version and at least put it in Requires so it's visible at runtime.

Due to changes in new release, some more C extension tests had to be disabled.

I am curious about what's the reason of the test failures? Do you know if the failures are reported to the upstream project as an issue ticket?

I am curious about what's the reason of the test failures? Do you know if the failures are > reported to the upstream project as an issue ticket?

Test suite seems to depend on presence of the C extension, however we don't ship that and
these tests must be removed. This should covered by the following section in the spec file:

+# We don't have the C extension. It would need to come from concurrent-ruby-ext
+# and that would lead to circular dependency. Patch out such tests.
+Patch0: rubygem-concurrent-ruby-1.2.2-disable-c-ext-atomic.patch

rebased onto 0327807

4 months ago