Hi Vit,

I'm not sure how this is something that upstream ruby/rubygems can know.  How is this a breaking change?
It's completely compatible with older versions of ruby.

We're tying our .spec file to very specific details of a .gemspec and hacking it with sed.
Anytime we modify upstream source code in .spec files, we are risking breakage.

If you have PRs on upstream repos that will help to remove this technical debt from our spec files, please provide links
so that we can support them and work toward their acceptance.


On Fri, Nov 18, 2016 at 3:38 PM, Vít Ondruch <vondruch@redhat.com> wrote:

I am slowly pushing Ruby 2.3.2 into Fedora.

Unfortunately, part of Ruby 2.3.2 is update of RubyGems and this update
has one annoying consequence. RubyGems developers decided, that it is
good idea to freeze all strings in generated .gemspec file. But because
of this, there might be several rubygem- packages FTBFS. For example,
rubygem-execjs fails to build with following errror:


+ gem build execjs.gemspec
WARNING:  See http://guides.rubygems.org/specification-reference/ for help
ERROR:  While executing gem ... (Gem::InvalidSpecificationException)
"lib/execjs/support/json2.js"] are not files


This is because there are some files removed from the package and the
previous sed:


+ sed -i -e '/files/ s|"lib/execjs/support/jscript_runner.js", ||' -e
'/files/ s|"lib/execjs/support/json2.js", ||' execjs.gemspec


Does not match/substitute anything, due to .freeze call :/ This is the
fix for rubygem-execjs:


$ git diff
diff --git a/rubygem-execjs.spec b/rubygem-execjs.spec
index b2df67c..fddb541 100644
--- a/rubygem-execjs.spec
+++ b/rubygem-execjs.spec
@@ -41,8 +41,8 @@ gem unpack %{SOURCE0}

 gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
 %patch0 -p1
-sed -i -e '/files/ s|"lib/execjs/support/jscript_runner.js", ||' \
-    -e '/files/ s|"lib/execjs/support/json2.js", ||' %{gem_name}.gemspec
+sed -i -e '/files/ s|"lib/execjs/support/jscript_runner.js".freeze, ||' \
+    -e '/files/ s|"lib/execjs/support/json2.js".freeze, ||'

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


I'm sorry for any inconvenience, but suggest to complain to
Ruby/RubyGems upstream, since minor/teeny version changes should not
break anything ...


ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org
To unsubscribe send an email to ruby-sig-leave@lists.fedoraproject.org