#1 Update to Concurrent Ruby 1.1.5.
Closed 4 years ago by vondruch. Opened 5 years ago by pvalena.
rpms/ pvalena/rubygem-concurrent-ruby rebase  into  master

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

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

- /concurrent-ruby-1.0.0.gem

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

- /concurrent-ruby-1.0.2.gem

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

- /concurrent-ruby-1.0.4.gem

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

- /concurrent-ruby-1.0.5.gem

+ /concurrent-ruby-*.gem

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

@@ -1,18 +0,0 @@ 

- diff --git a/lib/concurrent/map.rb b/lib/concurrent/map.rb

- index f3aa55d5..34696efc 100644

- --- a/lib/concurrent/map.rb

- +++ b/lib/concurrent/map.rb

- @@ -210,12 +210,8 @@ module Concurrent

-      undef :freeze

-  

-      # @!visibility private

- -    DEFAULT_OBJ_ID_STR_WIDTH = 0.size == 4 ? 7 : 14 # we want to look "native", 7 for 32-bit, 14 for 64-bit

- -    # override default #inspect() method: firstly, we don't want to be spilling our guts (i-vars), secondly, MRI backend's

- -    # #inspect() call on its @backend i-var will bump @backend's iter level while possibly yielding GVL

-      def inspect

- -      id_str = (object_id << 1).to_s(16).rjust(DEFAULT_OBJ_ID_STR_WIDTH, '0')

- -      "#<#{self.class.name}:0x#{id_str} entries=#{size} default_proc=#{@default_proc.inspect}>"

- +      format '%s entries=%d default_proc=%s>', to_s[0..-2], size.to_s, @default_proc.inspect

-      end

-  

-      private

file modified
+23 -16
@@ -1,24 +1,25 @@ 

  # Generated from concurrent-ruby-1.0.0.gem by gem2rpm -*- rpm-spec -*-

  %global gem_name concurrent-ruby

  

+ %bcond_without tests

+ 

  Name: rubygem-%{gem_name}

- Version: 1.0.5

- Release: 6%{?dist}

+ Version: 1.1.5

+ 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 checkout v1.0.5 && tar czvf concurrent-ruby-1.0.5-specs.tar.gz spec/

+ # git checkout v1.1.5 && tar czvf concurrent-ruby-1.1.5-specs.tar.gz spec/

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

- # Avoid sporadic test failures due to wrong object_id formatting.

- # https://github.com/ruby-concurrency/concurrent-ruby/pull/651

- Patch1: concurrent-ruby-1.0.5-fix-inspect-output.patch

  BuildRequires: ruby(release)

  BuildRequires: rubygems-devel

  BuildRequires: ruby >= 1.9.3

+ %if ! %{without tests}

  BuildRequires: rubygem(rspec)

  BuildRequires: rubygem(timecop)

+ %endif

  BuildArch: noarch

  

  %description
@@ -38,17 +39,15 @@ 

  Documentation for %{name}.

  

  %prep

- gem unpack %{SOURCE0}

- 

- %setup -q -D -T -n  %{gem_name}-%{version}

- 

- gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec

+ %setup -q -n %{gem_name}-%{version} -b1

  

- %patch1 -p1

+ # We do not ship the .java extension

+ %gemspec_remove_file Dir.glob('ext/**/*.*') + ['lib/concurrent/concurrent_ruby.jar']

+ rm -rf ext lib/concurrent/concurrent_ruby.jar

  

  %build

  # Create the gem as gem install only works on a gem file

- gem build %{gem_name}.gemspec

+ gem build ../%{gem_name}-%{version}.gemspec

  

  # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir

  # by default, so that we can move it into the buildroot in %%install
@@ -60,10 +59,11 @@ 

          %{buildroot}%{gem_dir}/

  

  

+ %if ! %{without tests}

  # Run the test suite

  %check

  pushd .%{gem_instdir}

- tar xzf %{SOURCE1}

+ ln -s %{_builddir}/spec .

  

  # -edge is not part of this gem.

  sed -i '/require.*concurrent-edge/ s/^/#/' spec/spec_helper.rb
@@ -74,14 +74,15 @@ 

  

  # Exclude the -edge test cases.

  rspec -rspec_helper \

-   --exclude-pattern 'spec/concurrent/{actor_spec.rb,channel_spec.rb,lazy_register_spec.rb,channel/**/*,atomic/atomic_markable_reference_spec.rb,edge/**/*}' \

+   --exclude-pattern 'spec/concurrent/{{scheduled_task,cancellation,timer_task,promises,throttle,actor,channel,lazy_register}_spec.rb,channel/**/*,atomic/atomic_markable_reference_spec.rb,edge/**/*}' \

    spec

  

  popd

+ %endif

  

  %files

  %dir %{gem_instdir}

- %license %{gem_instdir}/LICENSE.txt

+ %license %{gem_instdir}/LICENSE.md

  %{gem_libdir}

  %exclude %{gem_cache}

  %{gem_spec}
@@ -90,8 +91,14 @@ 

  %doc %{gem_docdir}

  %doc %{gem_instdir}/CHANGELOG.md

  %doc %{gem_instdir}/README.md

+ %{gem_instdir}/Gemfile

+ %{gem_instdir}/Rakefile

+ 

  

  %changelog

+ * Sun Aug 04 2019 Pavel Valena <pvalena@redhat.com> - 1.1.5-1

+ - Update to concurrent-ruby 1.1.5.

+ 

  * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-6

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

  

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

- SHA512 (concurrent-ruby-1.0.5-specs.tar.gz) = f13da35b9b6cce1182d822723811b27aa661c3dfd231e2d3ace09451ee01f737d343d1d18f5debc296b1534ef0b6a919e679a8ef693a7d75b557e65d19432ef0

- SHA512 (concurrent-ruby-1.0.5.gem) = 523df60096e77a377405b71f9133f28284ca73284bb52456bf1e1a38dbb34c593b3aa2ed9ceb019afbed4805ba2bc3d7c846d3a66139924ec7fa0ccb3fcf9324

+ SHA512 (concurrent-ruby-1.1.5.gem) = 357fa6bbf65ff4143adba9de6713d28eacb03170b3b4218f53d80433de13ba50b1c3741a62ec355a3aa01388bcbd059e1bca3dd82c88cf56b8b3110c24b37613

+ SHA512 (concurrent-ruby-1.1.5-specs.tar.gz) = b71782e090c31fbf664e96966bac90a9cc0dfcd4872db16060a9805061658da0a7d474c569cfefdf2241fde0ebfcd4c09672b9accb719137b1b0a68619c6d854

Scratch-build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=36714047

Copr build:
https://copr.fedorainfracloud.org/coprs/build/990373

Checks:

  • Dependent packages: ok ( constraints with< 2 )
  • Tests: ok ( disabled 4 additional tests that require edge )
  • Rpmlint: ok
  • Smoke test: ok

There is present lib/concurrent/concurrent_ruby.jar which should not be there IMO. BTW it would be probably much better to remove the "ext" directory already in %prep section, just to be safe.

In my understanding, historically this kind of test specific archive file such as Source1 has been extracted in the check section not the prep section.
The reason is to minimize the scope of the test spec file. We do not want to think about the influence of the spec files for the created RPM.
What is the reason to change this part actively?

There are several advantages.

The main advantage is when the source is expanded using %setup macro and patches are applied using %patch macro, tooling such as RPMDiff understands these resources are used and does not complain.

Also, some people expect that all he sources are expanded/prepared in %prep section. This was actually the main reason, why the gems are repackaged nowadays.

Okay, you changed your mind for that.

rebased onto 03b0c6c

5 years ago

I believe I've adressed the .jar and ext/ issues.

rebased onto 7dc411c

4 years ago

rebased onto 125081c

4 years ago

Pull-Request has been closed by vondruch

4 years ago

Sorry, I forgot about this PR and updated the package myself :blush:

Well, yes, I've noticed. :) I have to push for the existing PR's more. Would adding additional comments be helpful to remind you of a [needs-response] PR?