OpenSolaris

Discussions Communities Projects Download Source Browser

Home » OpenSolaris Forums » webstack » discuss

Thread: GNU Readline, for Ruby/Rails.

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 6 - Last Post: Sep 15, 2007 6:22 PM by: comay
psriniva

Posts: 159
From: Menlo Park, CA, USA

Registered: 4/17/06
GNU Readline, for Ruby/Rails.
Posted: Sep 10, 2007 7:26 PM

  Click to reply to this thread Reply

Hello Webstackers,

How does one package external dependencies that a webstack component
depends on? Case in question: The interactive Ruby Interpretor(irb) is
only barely usable without GNU readline 5.2, and readline is also used
in rails(for script/console).

The problem is, readline is not packaged in Solaris, at least it wasn't
as of snv_71.

Does someone know if there are plans to include readline, so that the
Ruby extensions can link to them? Else, should we make a case to add
GNU Readline into Nevada along with Ruby/Rails?

Thanks,
-ps




_______________________________________________
webstack-discuss mailing list
webstack-discuss at opensolaris dot org
http://mail.opensolaris.org/mailman/listinfo/webstack-discuss


cmiles

Posts: 2
From: Melbourne, Australia

Registered: 11/2/06
Re: GNU Readline, for Ruby/Rails.
Posted: Sep 11, 2007 12:22 AM   in response to: psriniva

  Click to reply to this thread Reply

Sun supply GNU readline on the Companion Disc (from the Freeware
collection [1]) as SFWrline. This is what I use for compiling Python
with readline support [2].

It would be handy if this package were included as part of the OS
distribution.

Cheers,
Chris Miles

[1] http://www.sun.com/software/solaris/freeware/s10pkgs_download.xml
[2] http://systemsadmin.info/solaris/articles/building-python-with-
readline-on-solaris-10


On 11 Sep 2007, at 03:26, Prashant Srinivasan wrote:

> Hello Webstackers,
>
> How does one package external dependencies that a webstack component
> depends on? Case in question: The interactive Ruby Interpretor
> (irb) is
> only barely usable without GNU readline 5.2, and readline is also used
> in rails(for script/console).
>
> The problem is, readline is not packaged in Solaris, at least it
> wasn't
> as of snv_71.
>
> Does someone know if there are plans to include readline, so that the
> Ruby extensions can link to them? Else, should we make a case to add
> GNU Readline into Nevada along with Ruby/Rails?
>
_______________________________________________
webstack-discuss mailing list
webstack-discuss at opensolaris dot org
http://mail.opensolaris.org/mailman/listinfo/webstack-discuss


comay

Posts: 962
From: US

Registered: 3/9/05
Re: GNU Readline, for Ruby/Rails.
Posted: Sep 11, 2007 1:15 AM   in response to: psriniva

  Click to reply to this thread Reply

> How does one package external dependencies that a webstack component
> depends on? Case in question: The interactive Ruby Interpretor(irb) is
> only barely usable without GNU readline 5.2, and readline is also used
> in rails(for script/console).
>
> The problem is, readline is not packaged in Solaris, at least it wasn't
> as of snv_71.
>
> Does someone know if there are plans to include readline, so that the
> Ruby extensions can link to them? Else, should we make a case to add
> GNU Readline into Nevada along with Ruby/Rails?

There are plans to include readline although at the moment they are
sidelined a bit around concerns of introducing a GPL library into a
standard library path such as /usr/lib and what that might mean if
someone unsuspecting links against it. One option would be to deliver
it under /usr/gnu/lib although a number of us would rather see it
appear under /usr/lib. Another option would be to use something like
libedit instead.

Since I believe that Ruby is available under the terms of the GPL,
another possibility is to statically link readline with it. With
respect to Rails though, I'm not sure what's the right approach - isn't
Rails licensed under the MIT license?

dsc
_______________________________________________
webstack-discuss mailing list
webstack-discuss at opensolaris dot org
http://mail.opensolaris.org/mailman/listinfo/webstack-discuss


psriniva

Posts: 159
From: Menlo Park, CA, USA

Registered: 4/17/06
Re: GNU Readline, for Ruby/Rails.
Posted: Sep 11, 2007 9:55 AM   in response to: comay

  Click to reply to this thread Reply

David,

> With
respect to Rails though, I'm not sure what's the right approach - isn't
Rails licensed under the MIT license?

Rails uses readline through Ruby(readline appears as an extension to
Ruby), so a different integration is not needed.
How about incorporating readline into /usr/sfw/lib, since that seems to
be where software under different licenses are to be found?

Thanks,
-ps


David dot Comay at Sun dot COM wrote:
>> How does one package external dependencies that a webstack component
>> depends on? Case in question: The interactive Ruby Interpretor(irb) is
>> only barely usable without GNU readline 5.2, and readline is also used
>> in rails(for script/console).
>>
>> The problem is, readline is not packaged in Solaris, at least it wasn't
>> as of snv_71.
>>
>> Does someone know if there are plans to include readline, so that the
>> Ruby extensions can link to them? Else, should we make a case to add
>> GNU Readline into Nevada along with Ruby/Rails?
>>
>
> There are plans to include readline although at the moment they are
> sidelined a bit around concerns of introducing a GPL library into a
> standard library path such as /usr/lib and what that might mean if
> someone unsuspecting links against it. One option would be to deliver
> it under /usr/gnu/lib although a number of us would rather see it
> appear under /usr/lib. Another option would be to use something like
> libedit instead.
>
> Since I believe that Ruby is available under the terms of the GPL,
> another possibility is to statically link readline with it. With
> respect to Rails though, I'm not sure what's the right approach - isn't
> Rails licensed under the MIT license?
>
> dsc
> _______________________________________________
> webstack-discuss mailing list
> webstack-discuss at opensolaris dot org
> http://mail.opensolaris.org/mailman/listinfo/webstack-discuss
>
_______________________________________________
webstack-discuss mailing list
webstack-discuss at opensolaris dot org
http://mail.opensolaris.org/mailman/listinfo/webstack-discuss


jyri

Posts: 716
From:

Registered: 7/13/07
Re: GNU Readline, for Ruby/Rails.
Posted: Sep 11, 2007 2:31 PM   in response to: psriniva

  Click to reply to this thread Reply

Prashant Srinivasan wrote:
>
> Hello Webstackers,
>
> How does one package external dependencies that a webstack component
> depends on?

In general, I suggest to first check and discuss with the sfwnv
project (sfwnv-discuss). Common components of general interest are
often handled there. http://opensolaris.org/os/project/sfwnv/

If that doesn't turn up any plans for it, let's discuss the effort here.
>From there we can move to a concrete proposal if applicable.


--
Jyri J. Virkki - jyri dot virkki at sun dot com - Sun Microsystems
_______________________________________________
webstack-discuss mailing list
webstack-discuss at opensolaris dot org
http://mail.opensolaris.org/mailman/listinfo/webstack-discuss


psriniva

Posts: 159
From: Menlo Park, CA, USA

Registered: 4/17/06
Re: GNU Readline, for Ruby/Rails.
Posted: Sep 15, 2007 2:30 AM   in response to: jyri

  Click to reply to this thread Reply

Jyri Virkki wrote:
> Prashant Srinivasan wrote:
>
>> Hello Webstackers,
>>
>> How does one package external dependencies that a webstack component
>> depends on?
>>
>
> In general, I suggest to first check and discuss with the sfwnv
> project (sfwnv-discuss). Common components of general interest are
> often handled there. http://opensolaris.org/os/project/sfwnv/
>
> If that doesn't turn up any plans for it, let's discuss the effort here.
> >From there we can move to a concrete proposal if applicable.
>
>

Here are the options for Ruby/Readline based on reading the sfwnv
discussion. There is apparently intent to include readline into
/usr/lib, it's stalled(because of GPL concerns) to the point where the
initial proponents, the owners of Xen (virsh), had to resort to
statically linking readline.

If we adopt this strategy ourselves, it's easiest for now. But the
side effect is that there probably will be at least three statically
linked versions of readline, libvirt, ruby, and mysql(I'm guessing,
based on the existence of the header /usr/sfw/include/mysql/readline.h )

#1 Statically link the readline extension and libreadline into Ruby.
Easy to implement. It will need changes to Ruby Makefiles.(should be
fine, since we're going to be covered by OSRs).
#2 Use libedit instead of readline. Probably not a good idea since (1)
the libedit implementation is not 100% compatible with readline(might
necessitate code changes), and (2) highly unlikely to be bug-for-bug
compatible with readline as well.
#3 Make a case for readline to be installed in a non /usr/lib location
(/usr/sfw/lib?). Good to work around the GPL induced considerations
around placing libreadline in /usr/lib.

Here is the discussion around this topic on sfwnv -
http://opensolaris.org/jive/thread.jspa?messageID=153827
The ARC materials for Readline -
http://www.opensolaris.org/os/community/arc/caselog/2007/188/;jsessionid=498ADF5102D8894BEFB39CA286D0898B

-ps

_______________________________________________
webstack-discuss mailing list
webstack-discuss at opensolaris dot org
http://mail.opensolaris.org/mailman/listinfo/webstack-discuss


comay

Posts: 962
From: US

Registered: 3/9/05
Re: GNU Readline, for Ruby/Rails.
Posted: Sep 15, 2007 6:22 PM   in response to: psriniva

  Click to reply to this thread Reply

> #1 Statically link the readline extension and libreadline into Ruby.
> Easy to implement. It will need changes to Ruby Makefiles.(should be
> fine, since we're going to be covered by OSRs).

This is indeed the faster way of adding readline support at this time.

> #3 Make a case for readline to be installed in a non /usr/lib location
> (/usr/sfw/lib?). Good to work around the GPL induced considerations
> around placing libreadline in /usr/lib.

As I mentioned on sfwnv-discuss, no new components should be introduced
into /usr/sfw. Since readline is a GNU component, however,
/usr/gnu/lib is a possible location for this library. You should check
with Dermot McCluskey though as he's the one currently working on
integrating this library.

dsc
_______________________________________________
webstack-discuss mailing list
webstack-discuss at opensolaris dot org
http://mail.opensolaris.org/mailman/listinfo/webstack-discuss





Terms of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.
Copyright © 1995-2005 Sun Microsystems, Inc.