Hello community, here is the log from the commit of package ruby-common for openSUSE:Factory checked in at 2018-02-12 10:08:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ruby-common (Old) and /work/SRC/openSUSE:Factory/.ruby-common.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ruby-common" Mon Feb 12 10:08:32 2018 rev:12 rq:574040 version:2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/ruby-common/ruby-common.changes 2017-12-21 11:27:30.272929556 +0100 +++ /work/SRC/openSUSE:Factory/.ruby-common.new/ruby-common.changes 2018-02-12 10:08:36.639785557 +0100 @@ -1,0 +2,6 @@ +Wed Jan 24 16:13:42 UTC 2018 - lnus...@suse.de + +- generate bundled(rubygem($name)) = $version provides for bundled + gems in the vendor directory. + +------------------------------------------------------------------- New: ---- rubygems_bundled.attr ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ruby-common.spec ++++++ --- /var/tmp/diff_new_pack.VFwOuZ/_old 2018-02-12 10:08:39.171694308 +0100 +++ /var/tmp/diff_new_pack.VFwOuZ/_new 2018-02-12 10:08:39.175694163 +0100 @@ -1,7 +1,7 @@ # # spec file for package ruby-common # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -42,6 +42,7 @@ Source14: gemfile.rb Source15: rails.macros Source16: g2r +Source17: rubygems_bundled.attr Summary: Collection of scripts and macros for ruby packaging License: MIT Group: Development/Languages/Ruby @@ -100,6 +101,7 @@ install -D -m 0755 %{S:14} %{buildroot}/usr/lib/rpm/gemfile.rb install -D -m 0644 %{S:15} %{buildroot}/etc/rpm/macros.rails install -D -m 0755 %{S:16} %{buildroot}%{_bindir}/g2r +install -D -m 0644 %{S:17} %{buildroot}/usr/lib/rpm/fileattrs/rubygems_bundled.attr %files %defattr(-,root,root) @@ -109,6 +111,7 @@ %config /etc/rpm/macros.*ruby* %dir /usr/lib/rpm/fileattrs /usr/lib/rpm/fileattrs/rubygems.attr +/usr/lib/rpm/fileattrs/rubygems_bundled.attr /usr/lib/rpm/rubygemsdeps.rb /usr/lib/rpm/gem_install.sh /usr/lib/rpm/gem_build_cleanup.sh ++++++ rubygems_bundled.attr ++++++ %__rubygems_bundled_provides %{_rpmconfigdir}/rubygemsdeps.rb --provides --bundled %__rubygems_bundled_path .*/vendor/bundle/.*/specifications/.*\.gemspec$ ++++++ rubygemsdeps.rb ++++++ --- /var/tmp/diff_new_pack.VFwOuZ/_old 2018-02-12 10:08:39.375686956 +0100 +++ /var/tmp/diff_new_pack.VFwOuZ/_new 2018-02-12 10:08:39.379686811 +0100 @@ -47,7 +47,12 @@ opts.on("-R", "--requires", "Output the requires of the package") do |val| requires=true end -file_match=".*/gems/[^/]*/specifications/.*\.gemspec$" +bundled=false +opts.on("-b", "--bundled", "Output provides as bundled ones") do |val| + bundled=true +end + +file_match=nil opts.on("-m", "--file-match REGEX", String, "Override the regex against which the input file names", "matched with the supplied regex") do |val| @@ -65,6 +70,19 @@ exit(0) end +if file_match.nil? + if bundled + file_match = ".*/vendor/bundle/[^/]*/[^/]*/specifications/.*\.gemspec$" + else + file_match = ".*/gems/[^/]*/specifications/.*\.gemspec$" + end +end + +$rubyapi_re = %r{.*/([^/]*)/gems/([^/]*)/.*} +if bundled + $rubyapi_re = %r{.*/vendor/bundle/([^/]*)/([^/]*)/.*} +end + def fatal(msg) $stderr.puts msg exit 1 @@ -89,7 +107,7 @@ end def rubyabi_from_path(path) - m = path.match(%r{.*/([^/]*)/gems/([^/]*)/.*}) + m = path.match($rubyapi_re) # return m ? m[1] : RbConfig::CONFIG["ruby_version"] return { :interpreter => m[1], :version => m[2], :abi => "#{m[1]}:#{m[2]}", :requires => "#{m[1]}(abi) = #{m[2]}" } end @@ -124,12 +142,16 @@ # puts "rubygem-#{spec.name}-#{versions[0]}_#{versions[1]}_#{versions[2]} = #{spec.version}" if versions.length > 2 # version without ruby version - asking for trouble - puts "rubygem(#{spec.name}) = #{spec.version}" - if rubyabi - puts "rubygem(#{rubyabi}:#{spec.name}) = #{spec.version}" - puts "rubygem(#{rubyabi}:#{spec.name}:#{versions[0]}) = #{spec.version}" if versions.length > 0 - puts "rubygem(#{rubyabi}:#{spec.name}:#{versions[0]}.#{versions[1]}) = #{spec.version}" if versions.length > 1 - puts "rubygem(#{rubyabi}:#{spec.name}:#{versions[0]}.#{versions[1]}.#{versions[2]}) = #{spec.version}" if versions.length > 2 + if bundled + puts "bundled(rubygem(#{spec.name})) = #{spec.version}" + else + puts "rubygem(#{spec.name}) = #{spec.version}" + if rubyabi + puts "rubygem(#{rubyabi}:#{spec.name}) = #{spec.version}" + puts "rubygem(#{rubyabi}:#{spec.name}:#{versions[0]}) = #{spec.version}" if versions.length > 0 + puts "rubygem(#{rubyabi}:#{spec.name}:#{versions[0]}.#{versions[1]}) = #{spec.version}" if versions.length > 1 + puts "rubygem(#{rubyabi}:#{spec.name}:#{versions[0]}.#{versions[1]}.#{versions[2]}) = #{spec.version}" if versions.length > 2 + end end end