Features/JRuby 1.7

From FedoraProject

< Features(Difference between revisions)
Jump to: navigation, search
(Created page with "{{admon/important | Comments and Explanations | The page source contains comments providing guidance to fill out each section. They are invisible when viewing this page. To ...")
 
(Current status)
 
(33 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{admon/important | Comments and Explanations | The page source contains comments providing guidance to fill out each section.  They are invisible when viewing this page.  To read it, choose the "edit" link.<br/> '''Copy the source to a ''new page'' before making changes!  DO NOT EDIT THIS TEMPLATE FOR YOUR FEATURE.'''}}
 
 
{{admon/important | Set a Page Watch| Make sure you click ''watch'' on your new page so that you are notified of changes to it by others, including the Feature Wrangler}}
 
 
{{admon/note | All sections of this template are required for review by FESCo.  If any sections are empty it will not be reviewed }}
 
 
 
 
<!-- All fields on this form are required to be accepted by FESCo.
 
<!-- All fields on this form are required to be accepted by FESCo.
 
  We also request that you maintain the same order of sections so that all of the feature pages are uniform.  -->
 
  We also request that you maintain the same order of sections so that all of the feature pages are uniform.  -->
Line 11: Line 4:
 
<!-- The actual name of your feature page should look something like: Features/Your_Feature_Name.  This keeps all features in the same namespace -->
 
<!-- The actual name of your feature page should look something like: Features/Your_Feature_Name.  This keeps all features in the same namespace -->
  
= Feature Name <!-- The name of your feature --> =
+
= Features/JRuby 1.7 =
  
 
== Summary ==
 
== Summary ==
<!-- A sentence or two summarizing what this feature is and what it will do. This information is used for the overall feature summary page for each release. -->
+
JRuby is an alternative Ruby implementation with fast growing user base due to its great performance in parallel tasks. Although JRuby 1.6.7 is already in Fedora, this feature brings in new minor version and better Fedora integration.
  
 
== Owner ==
 
== Owner ==
<!--This should link to your home wiki page so we know who you are-->
+
* Name: [[User:Bkabrda| Bohuslav Kabrda]]
* Name: [[User:FASAcountName| Your Name]]
+
  
<!-- Include you email address that you can be reached should people want to contact you about helping with your feature, status is requested, or  technical issues need to be resolved-->
+
* Email: <bkabrda@redhat.com>
* Email: <your email address so we can contact you, invite you to meetings, etc.>
+
  
 
== Current status ==
 
== Current status ==
* Targeted release: [[Releases/<number> | Fedora <number> ]]  
+
* Targeted release: [[Releases/19 | Fedora 19 ]]  
* Last updated: (DATE)
+
* Last updated: 2013-02-27
* Percentage of completion: XX%
+
* Percentage of completion: 100%
  
 
<!-- CHANGE THE "FedoraVersion" TEMPLATES ABOVE TO PLAIN NUMBERS WHEN YOU COMPLETE YOUR PAGE. -->
 
<!-- CHANGE THE "FedoraVersion" TEMPLATES ABOVE TO PLAIN NUMBERS WHEN YOU COMPLETE YOUR PAGE. -->
  
 
== Detailed Description ==
 
== Detailed Description ==
<!-- Expand on the summary, if appropriate. A couple sentences suffices to explain the goal, but the more details you can provide the better. -->
+
Transition to JRuby 1.7 will consist of 3 basic steps:
 +
* Updating packages
 +
** Most of the packages that JRuby depends on are in Fedora just because of JRuby, so they can be safely updated.
 +
** Some dependencies are shared with other packages, so they will have to be discussed with their owners (see [[#Scope]]).
 +
* Integration with Fedora
 +
** Normally, each Ruby implementations ships with its own copy of RubyGems library. This is wrong because a) it's bundling, b) there is no reason why multiple Ruby implementations wouldn't be able to share one RubyGems library. There used to be some differencies in JRuby's copy of RubyGems, but the JRuby upstream has been very cooperative and managed to get them all merged into upstream RubyGems.
 +
** The integration will require changing Fedora's operating_system.rb (place for distro-specific defaults for RubyGems). This change will result into all Gems with binary extensions having to be recompiled, as the binary extension placement will change. See [1] for current operating_system.rb look and its changes from F18.
 +
** What should "/usr/bin/ruby" point to? During standard Gem packaging process, the executable files in Gems get shebangs according to the binary that they are packaged with (Ruby => "/usr/bin/ruby"; JRuby => "/usr/bin/jruby"). Therefore executing a Ruby "binary" runs the interpreter that was used for building (or the hardcoded one, which is usually Ruby). Using alternatives for "/usr/bin/ruby" doesn't seem to be a very good option, because Ruby and JRuby are not in fact full alternatives, as they for example cannot use same extension Gems (but it still makes sense to allow executing same binaries with them). Also, alternatives are only switchable on admin level (we want every developer with non-root privileges to be able to choose the interpreter). Therefore Ruby-SIG has come up with solution of having "/usr/bin/ruby" as a bash script (currently called rubypick) [2], that allows user to choose the interpreter as first argument on invocation (_mri_ or _jruby_), if such a parameter is present. Otherwise it falls back to a default. For example invoking "ruby_binary _jruby_ --foo=bar" in fact invokes "/usr/bin/jruby ruby_binary --foo=bar". This bash script will be in a separate package and both Ruby and JRuby will depend on it.
 +
*** Ruby-SIG knows that this feature might be controversial and we wouldn't want it to stop us from bringing JRuby's power to Fedora (if met with a heavy resistance). So if anyone will suggest a more suitable solution, we'll go with it instead of this one.
 +
*** EDIT [Jan 24 2013] Rubypick now also supports choosing runtime using environment variable RUBYPICK (values are also _mri_ or _jruby_ to keep them consistent).
 +
* Changes in packaging
 +
** None yet. JRuby will be able to use pure Ruby Gems packaged into RPM out of the box, but packaging of Gems with JRuby extensions is turning out to be very complicated, so the guidelines for it will be postponed to next release (as well as the actual packaging). Users will be still able to install Gems with JRuby extensions, both system-wide (into /usr/local/) and into their home directories.
 +
 
 +
[1] https://github.com/bkabrda/jruby.spec/blob/master/rubygems/operating_system.rb
 +
 
 +
[2] https://github.com/bkabrda/rubypick
  
 
== Benefit to Fedora ==
 
== Benefit to Fedora ==
<!-- What is the benefit to the platform?  If this is a major capability update, what has changed?  If this is a new feature, what capabilities does it bring? Why will Fedora become a better distribution or project because of this feature?-->
+
JRuby is starting to get very popular among Rubyists, mainly because of its excelent performance in tasks using concurrency (leveraging power of JVM). Because of this, JRuby is mainly used for running web (mostly Ruby on Rails) applications under great stress. Having up-to-date and sanely packaged JRuby is a must for Ruby development and deployment platform.
  
 
== Scope ==
 
== Scope ==
<!-- What work do the developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
+
The changes only affect Ruby packages in Fedora. Few updated Java packages (jansi, jcodings, jline2, snakeyaml; also some jnr-* dependencies of gradle) may also affect some dependent Java packages - this will have to be discussed with their owners.
 +
 
 +
=== New Packaging Guidelines ===
 +
Some alterations were made to Ruby Packaging Guidelines. These will prevent breakage by the future introduction of JRuby-specific guidelines. The new draft can be seen at [1]. The draft has been proposed to FPC [2].
 +
 
 +
[1] https://fedoraproject.org/wiki/PackagingDrafts/Ruby
 +
[2] https://fedorahosted.org/fpc/ticket/242
  
 
== How To Test ==
 
== How To Test ==
Line 53: Line 65:
 
3. What are the expected results of those actions?
 
3. What are the expected results of those actions?
 
-->
 
-->
 +
 +
1) There is a testing repo at http://bkabrda.fedorapeople.org/jruby/jruby.repo, which can be used to test. Do not install this on your system, due to the changes mentioned above, it would break your standard Ruby installation. This repo is meant to be tested in fedora-19-x86_64 mock chroot, where it can do no harm.
 +
 +
2) The repo also contains Ruby and basic set of Gems rebuilt with mentioned modifications (adoption to changes in Fedora-Ruby integration).
  
 
== User Experience ==
 
== User Experience ==
 
<!-- If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice. -->
 
<!-- If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice. -->
 +
JRuby will be up-to-date, usable and will be able to use Fedora's RPM-packaged pure Ruby Gems.
  
 
== Dependencies ==
 
== Dependencies ==
<!-- What other packages (RPMs) depend on this package?  Are there changes outside the developers' control on which completion of this feature depends?  In other words, completion of another feature owned by someone else and might cause you to not be able to finish on time or that you would need to coordinate?  Other upstream projects like the kernel (if this is not a kernel feature)? -->
+
As mentioned, few Java packages, that are dependencies of some other packages, will have to be updated (see [[#Scope]]). Also, all the RubyGems packages with binary extensions will have to be rebuilt:
 +
<pre>
 +
rubygem-atk
 +
rubygem-bcrypt-ruby
 +
rubygem-bson_ext
 +
rubygem-cairo
 +
rubygem-curb
 +
rubygem-eventmachine
 +
rubygem-ferret
 +
rubygem-ffi
 +
rubygem-gdk_pixbuf2
 +
rubygem-gherkin
 +
rubygem-gio2
 +
rubygem-glib2
 +
rubygem-goocanvas
 +
rubygem-gstreamer
 +
rubygem-gtk2
 +
rubygem-gtksourceview2
 +
rubygem-hpricot
 +
rubygem-idn
 +
rubygem-json
 +
rubygem-kgio
 +
rubygem-krb5-auth
 +
rubygem-linecache19
 +
rubygem-nokogiri
 +
rubygem-pam
 +
rubygem-pango
 +
rubygem-passenger
 +
rubygem-pg
 +
rubygem-poppler
 +
rubygem-qpid
 +
rubygem-qpid_messaging
 +
rubygem-raindrops
 +
rubygem-rdiscount
 +
rubygem-redcarpet
 +
rubygem-RedCloth
 +
rubygem-rsvg2
 +
rubygem-ruby-debug-base19
 +
rubygem-ruby-libvirt
 +
rubygem-ruby-opengl
 +
rubygem-sqlite3
 +
rubygem-therubyracer
 +
rubygem-thin
 +
rubygem-typhoeus
 +
rubygem-vte
 +
rubygem-xmlparser
 +
rubygem-zoom
 +
</pre>
  
 
== Contingency Plan ==
 
== Contingency Plan ==
<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "None necessary, revert to previous release behaviour."  Or it might not.  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy. -->
+
Reverting to the previous behaviour will always be doable very easily, no harm will be done.
 +
 
 +
EDIT [Jan 24 2013] Upgrade of JRuby itself is just a normal package upgrade, the Fedora integration bits are the things that might need reverting. These would be reverted by adjusting JRuby spec and rebuilding, so that JRuby would behave just the way it now does.
  
 
== Documentation ==
 
== Documentation ==
 
<!-- Is there upstream documentation on this feature, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->
 
<!-- Is there upstream documentation on this feature, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->
*
+
* https://github.com/bkabrda/jruby.spec
 +
* Discussions on Fedora's ruby-sig mailing list for last few months (http://lists.fedoraproject.org/pipermail/ruby-sig/).
  
 
== Release Notes ==
 
== Release Notes ==
 
<!-- The Fedora Release Notes inform end-users about what is new in the release.  Examples of past release notes are here: http://docs.fedoraproject.org/release-notes/ -->
 
<!-- The Fedora Release Notes inform end-users about what is new in the release.  Examples of past release notes are here: http://docs.fedoraproject.org/release-notes/ -->
 
<!-- The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the documentation team and shipped with the release. -->
 
<!-- The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the documentation team and shipped with the release. -->
*
+
* Upstream release notes at http://jruby.org/2012/10/22/jruby-1-7-0.html
  
 
== Comments and Discussion ==
 
== Comments and Discussion ==
Line 76: Line 143:
  
  
[[Category:FeaturePageIncomplete]]
+
[[Category:FeatureAcceptedF19]]
 
<!-- When your feature page is completed and ready for review -->
 
<!-- When your feature page is completed and ready for review -->
 
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->
 
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->
 
<!-- After review, the feature wrangler will move your page to Category:FeatureReadyForFesco... if it still needs more work it will move back to Category:FeaturePageIncomplete-->
 
<!-- After review, the feature wrangler will move your page to Category:FeatureReadyForFesco... if it still needs more work it will move back to Category:FeaturePageIncomplete-->
 
<!-- A pretty picture of the page category usage is at: https://fedoraproject.org/wiki/Features/Policy/Process -->
 
<!-- A pretty picture of the page category usage is at: https://fedoraproject.org/wiki/Features/Policy/Process -->

Latest revision as of 13:09, 27 February 2013


Contents

[edit] Features/JRuby 1.7

[edit] Summary

JRuby is an alternative Ruby implementation with fast growing user base due to its great performance in parallel tasks. Although JRuby 1.6.7 is already in Fedora, this feature brings in new minor version and better Fedora integration.

[edit] Owner

  • Email: <bkabrda@redhat.com>

[edit] Current status

  • Targeted release: Fedora 19
  • Last updated: 2013-02-27
  • Percentage of completion: 100%


[edit] Detailed Description

Transition to JRuby 1.7 will consist of 3 basic steps:

  • Updating packages
    • Most of the packages that JRuby depends on are in Fedora just because of JRuby, so they can be safely updated.
    • Some dependencies are shared with other packages, so they will have to be discussed with their owners (see #Scope).
  • Integration with Fedora
    • Normally, each Ruby implementations ships with its own copy of RubyGems library. This is wrong because a) it's bundling, b) there is no reason why multiple Ruby implementations wouldn't be able to share one RubyGems library. There used to be some differencies in JRuby's copy of RubyGems, but the JRuby upstream has been very cooperative and managed to get them all merged into upstream RubyGems.
    • The integration will require changing Fedora's operating_system.rb (place for distro-specific defaults for RubyGems). This change will result into all Gems with binary extensions having to be recompiled, as the binary extension placement will change. See [1] for current operating_system.rb look and its changes from F18.
    • What should "/usr/bin/ruby" point to? During standard Gem packaging process, the executable files in Gems get shebangs according to the binary that they are packaged with (Ruby => "/usr/bin/ruby"; JRuby => "/usr/bin/jruby"). Therefore executing a Ruby "binary" runs the interpreter that was used for building (or the hardcoded one, which is usually Ruby). Using alternatives for "/usr/bin/ruby" doesn't seem to be a very good option, because Ruby and JRuby are not in fact full alternatives, as they for example cannot use same extension Gems (but it still makes sense to allow executing same binaries with them). Also, alternatives are only switchable on admin level (we want every developer with non-root privileges to be able to choose the interpreter). Therefore Ruby-SIG has come up with solution of having "/usr/bin/ruby" as a bash script (currently called rubypick) [2], that allows user to choose the interpreter as first argument on invocation (_mri_ or _jruby_), if such a parameter is present. Otherwise it falls back to a default. For example invoking "ruby_binary _jruby_ --foo=bar" in fact invokes "/usr/bin/jruby ruby_binary --foo=bar". This bash script will be in a separate package and both Ruby and JRuby will depend on it.
      • Ruby-SIG knows that this feature might be controversial and we wouldn't want it to stop us from bringing JRuby's power to Fedora (if met with a heavy resistance). So if anyone will suggest a more suitable solution, we'll go with it instead of this one.
      • EDIT [Jan 24 2013] Rubypick now also supports choosing runtime using environment variable RUBYPICK (values are also _mri_ or _jruby_ to keep them consistent).
  • Changes in packaging
    • None yet. JRuby will be able to use pure Ruby Gems packaged into RPM out of the box, but packaging of Gems with JRuby extensions is turning out to be very complicated, so the guidelines for it will be postponed to next release (as well as the actual packaging). Users will be still able to install Gems with JRuby extensions, both system-wide (into /usr/local/) and into their home directories.

[1] https://github.com/bkabrda/jruby.spec/blob/master/rubygems/operating_system.rb

[2] https://github.com/bkabrda/rubypick

[edit] Benefit to Fedora

JRuby is starting to get very popular among Rubyists, mainly because of its excelent performance in tasks using concurrency (leveraging power of JVM). Because of this, JRuby is mainly used for running web (mostly Ruby on Rails) applications under great stress. Having up-to-date and sanely packaged JRuby is a must for Ruby development and deployment platform.

[edit] Scope

The changes only affect Ruby packages in Fedora. Few updated Java packages (jansi, jcodings, jline2, snakeyaml; also some jnr-* dependencies of gradle) may also affect some dependent Java packages - this will have to be discussed with their owners.

[edit] New Packaging Guidelines

Some alterations were made to Ruby Packaging Guidelines. These will prevent breakage by the future introduction of JRuby-specific guidelines. The new draft can be seen at [1]. The draft has been proposed to FPC [2].

[1] https://fedoraproject.org/wiki/PackagingDrafts/Ruby [2] https://fedorahosted.org/fpc/ticket/242

[edit] How To Test

1) There is a testing repo at http://bkabrda.fedorapeople.org/jruby/jruby.repo, which can be used to test. Do not install this on your system, due to the changes mentioned above, it would break your standard Ruby installation. This repo is meant to be tested in fedora-19-x86_64 mock chroot, where it can do no harm.

2) The repo also contains Ruby and basic set of Gems rebuilt with mentioned modifications (adoption to changes in Fedora-Ruby integration).

[edit] User Experience

JRuby will be up-to-date, usable and will be able to use Fedora's RPM-packaged pure Ruby Gems.

[edit] Dependencies

As mentioned, few Java packages, that are dependencies of some other packages, will have to be updated (see #Scope). Also, all the RubyGems packages with binary extensions will have to be rebuilt:

rubygem-atk
rubygem-bcrypt-ruby
rubygem-bson_ext
rubygem-cairo
rubygem-curb
rubygem-eventmachine
rubygem-ferret
rubygem-ffi
rubygem-gdk_pixbuf2
rubygem-gherkin
rubygem-gio2
rubygem-glib2
rubygem-goocanvas
rubygem-gstreamer
rubygem-gtk2
rubygem-gtksourceview2
rubygem-hpricot
rubygem-idn
rubygem-json
rubygem-kgio
rubygem-krb5-auth
rubygem-linecache19
rubygem-nokogiri
rubygem-pam
rubygem-pango
rubygem-passenger
rubygem-pg
rubygem-poppler
rubygem-qpid
rubygem-qpid_messaging
rubygem-raindrops
rubygem-rdiscount
rubygem-redcarpet
rubygem-RedCloth
rubygem-rsvg2
rubygem-ruby-debug-base19
rubygem-ruby-libvirt
rubygem-ruby-opengl
rubygem-sqlite3
rubygem-therubyracer
rubygem-thin
rubygem-typhoeus
rubygem-vte
rubygem-xmlparser
rubygem-zoom

[edit] Contingency Plan

Reverting to the previous behaviour will always be doable very easily, no harm will be done.

EDIT [Jan 24 2013] Upgrade of JRuby itself is just a normal package upgrade, the Fedora integration bits are the things that might need reverting. These would be reverted by adjusting JRuby spec and rebuilding, so that JRuby would behave just the way it now does.

[edit] Documentation

[edit] Release Notes

[edit] Comments and Discussion