Alexander,
Do we have a requirements document about ruby packaging? I'm all for avoiding upstream incompatibilities which we are currently not doing for some reasons. And having an official requirements document will make more clear what is a bug and what is a feature.
We have a document for Ruby packaging here. https://fedoraproject.org/wiki/Packaging:Ruby
Below is a proposed document for Ruby 2.5. The section Detailed Description might be close for the requirement. But I think that there is NOT requirement document for Ruby 2.5 as far as I know. https://fedoraproject.org/wiki/Changes/Ruby_2.5
Vit,
This appears to be related to the default location of where the gems are installed. Upstream Ruby installs the gems into their directory, we install the gems into home directory.
Thanks for checking about the default gem specification,
Why did we decide the gems to not default local but home directly? I think that we might have to add the default gem behavior as one of the incompatibility list on the document somewhere.
And we need to take note that our other rubygem packages can be affected by the compatibility. Last time, we skipped a test case of rubygem-bundler by the compatibility. https://src.fedoraproject.org/rpms/rubygem-bundler/blob/master/f/rubygem-bun...
Everyone,
I want to add below thing as the requirement of Ruby 2.5.0.
- User can see stdlibs from "gem list", and they can update the gem's version by "gem update".
This is a new available operation from Ruby 2.5.0. Let me show you example with Ruby 2.5.0 preview1 version on upstream for the operation.
``` $ dest/bin/ruby -v ruby 2.5.0dev (2017-10-10 trunk 60153) [x86_64-linux]
$ dest/bin/gem list
*** LOCAL GEMS ***
bigdecimal (default: 1.3.2) bundler (default: 1.15.4) cmath (default: 0.0.1) csv (default: 0.1.0) date (default: 0.0.1) dbm (default: 1.0.0.beta1) digest (default: 0.1.0) etc (default: 0.2.1) fcntl (default: 0.0.1) fileutils (default: 0.7.2) gdbm (default: 2.0.0.beta1) io-console (default: 0.4.6) ipaddr (default: 1.0.0) json (default: 2.1.0) openssl (default: 2.1.0.beta1) psych (default: 3.0.0.beta3) rdoc (default: 6.0.0.beta3) scanf (default: 0.0.1) sdbm (default: 0.0.1) stringio (default: 0.0.1) strscan (default: 0.0.1) webrick (default: 1.4.0.beta1)
$ dest/bin/gem update fileutils Updating installed gems Updating fileutils Fetching: fileutils-1.0.1.gem (100%) Successfully installed fileutils-1.0.1 Parsing documentation for fileutils-1.0.1 Installing ri documentation for fileutils-1.0.1 Installing darkfish documentation for fileutils-1.0.1 Done installing documentation for fileutils after 0 seconds Parsing documentation for fileutils-1.0.1 Done installing documentation for fileutils after 0 seconds Gems updated: fileutils
$ dest/bin/gem list
*** LOCAL GEMS ***
bigdecimal (default: 1.3.2) bundler (default: 1.15.4) cmath (default: 0.0.1) csv (default: 0.1.0) date (default: 0.0.1) dbm (default: 1.0.0.beta1) digest (default: 0.1.0) etc (default: 0.2.1) fcntl (default: 0.0.1) fileutils (1.0.1, default: 0.7.2) gdbm (default: 2.0.0.beta1) io-console (default: 0.4.6) ipaddr (default: 1.0.0) json (default: 2.1.0) openssl (default: 2.1.0.beta1) psych (default: 3.0.0.beta3) rdoc (default: 6.0.0.beta3) scanf (default: 0.0.1) sdbm (default: 0.0.1) stringio (default: 0.0.1) strscan (default: 0.0.1) webrick (default: 1.4.0.beta1) zlib (default: 0.1.0)
$ dest/bin/gem list | grep fileutils fileutils (1.0.1, default: 0.7.2) ```
To filling this requirement, 1. We might have to create new subpackges for the cmath, csv, fileutils, and etc in ruby.spec This is about https://src.fedoraproject.org/rpms/ruby/blob/private-ruby-2.5/f/ruby.spec#_9... # TODO: Gemify these libraries
2. We might have to add those as Requires rather than Recommends like blow current code. This is for the compatibility of upstream Ruby 2.5.0. If upstream Ruby is keeping the gems as a default, we would add it as a Requires of binary RPM ruby package.
ruby.spec ``` Recommends: ruby(rubygems) >= %{rubygems_version} Recommends: rubygem(bigdecimal) >= %{bigdecimal_version} Recommends: rubygem(did_you_mean) >= %{did_you_mean_version} Recommends: rubygem(openssl) >= %{openssl_version} ```
3 we might have to independent RPM packages such as rubygem-cmath, rubygem-csv, rubygem-fileutils If we keep the stdlibs (such as fileutils) as latest version as much as possible, monitoring the upstream ( https://rubygems.org/gems/cmath , and etc) rather than keeping same version with ruby internal default gems, we do not have to do this. That depends on the policy.
Jun
On Thu, Dec 14, 2017 at 7:03 PM, Vít Ondruch vondruch@redhat.com wrote:
Dne 14.12.2017 v 18:41 Vít Ondruch napsal(a):
Dne 14.12.2017 v 18:23 Jun Aruga napsal(a):
OK thanks for the info.
Comparing the result of "gem list" command between upstream and our Fedora package, I found the difference. That can be confusing people.
Some of the gem are not shown in the result such as cmath for Fedora package ruby.
When running below command on mock, we can load cmath that is not in "gem list" on mock, maybe those are only shown as a result of "gem list".
irb(main):003:0> require 'cmath' => true
Is it possible to add those gems in the result as a compatibility for upstream Ruby? Hidden gems such as cmath are confusing users.
Interesting. That is definitely unintentional. Will take a look into it.
This appears to be related to the default location of where the gems are installed. Upstream Ruby installs the gems into their directory, we install the gems into home directory. And therefore RubyGems on Fedora are trying to load the specifications for the default gems from the home directory "/builddir/.gem/ruby/specifications/default" (testing in mock). So far, we never had the default gem specifications, so this was not issue.
V.
ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org To unsubscribe send an email to ruby-sig-leave@lists.fedoraproject.org