Bug 91556 - [update proposal] lang/ruby18: 1.8.2 => 1.8.4
Summary: [update proposal] lang/ruby18: 1.8.2 => 1.8.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-09 15:20 UTC by alexander
Modified: 2006-01-14 13:26 UTC (History)
0 users

See Also:


Attachments
ruby184.diff (121.95 KB, patch)
2006-01-09 15:20 UTC, alexander
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description alexander 2006-01-09 15:20:03 UTC
There has been a new stable release of ruby 1.8. The attached directory diff of
the lang/ruby18 directory updates the port from version 1.8.2 to 1.8.4 (iirc
1.8.3 was a developer's release).

To avoid problems as with the 1.8.3 update that has been backed out again I did
some testing on my machines. The port compiles cleanly on 4.11 (without
pthreads, current patch from 1.8.2 still works) and 6.0. The new version passes
all ruby tests provided with the source distribution except for the openssl
test (see note below). The portupgrade (2.0.1) / pkgdb tools also work fine
with the new version. I also set up ruby on rails successfully (installing the
port which installs ruby-gems, uses it to install rails). Creating a new
application and running WEBrick worked, too.

As for openssl: I belive this is a bug in the ruby openssl component. I use the
openssl 0.9.8a port instead of the version supplied with the base system.
Certain functions (SSL sockets, HMACs, ...) cause a segfault. I glanced at the
code for the ruby extension an it has some comments saying 'this might break in
openssl releases after 0.9.7x'. I guess this is the reason for the segfaults.

This is not new behaviour. I ran the tests supplied with 1.8.2 with the ruby18
port on FBSD 4.11 and got the same result: openssl test segfault.

As I do not have any machine with the base openssl to test my new port with I'd
be glad to get some feedback on this issue from other testers.

If the problem really is caused by a broken ruby extension I'll file a PR with
the ruby development team and maybe the ruby port should be marked broken with
openssl 0.9.8a.

Along with this port there are several other ports that have to be updated if
this one is. I have not done that yet because I'd like to get some feedback
first. If the attached update is working I'll look after the other dependent
ports.

Note: The first two lines in the new Makefile should go into the
ports/Mk/bsd.ruby.mk file (the lines there should be changed accordingly) if
this port is to replace the current ruby18 port.

How-To-Repeat: Openssl 0.9.8a: 
1) install security/openssl
2) install original or patched lang/ruby18 port
3) cd lang/ruby18/work/ruby-1.8.2/test
4) run "ruby runner.rb -v openssl" to start openssl tests
5) you should see several tests passing and then one that fails (tested on 4.11):
test_dup(OpenSSL::TestHMAC): ./openssl/test_hmac.rb:30: [BUG] Segmentation fault
ruby 1.8.2 (2004-12-25) [i386-freebsd4]
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2006-01-09 22:56:44 UTC
State Changed
From-To: open->feedback

This looks good. I haven't tried to run it (I wouldn't be able to test it more 
than you did anyway). There are some formal problems with patch: 

- don't remove PORTEPOCH 
- please use -N flag to diff, so the content of added patch files is included 

If you could update the related ports too, I'd be happy to shepherd this into 
the tree. If something esoteric breaks, can we count on you to help with 
fixing? 


Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2006-01-09 22:56:44 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Interests me
Comment 3 Pav Lucistnik freebsd_committer freebsd_triage 2006-01-11 23:46:38 UTC
State Changed
From-To: feedback->open

Working on this
Comment 4 Pav Lucistnik freebsd_committer freebsd_triage 2006-01-14 13:26:28 UTC
State Changed
From-To: open->closed

Committed, thanks!