You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by mpchlets <mp...@gmail.com> on 2012/11/07 03:29:58 UTC

Re: [PATCH] enabling ruby in the subversion build

I am also very interested in seeing this get to a state of usability - I am
willing to help also.

If there is a current status or anyone working on this, I would love to
pitch in and get this finalized.



--
View this message in context: http://subversion.1072662.n5.nabble.com/PATCH-enabling-ruby-in-the-subversion-build-tp71512p175607.html
Sent from the Subversion Dev mailing list archive at Nabble.com.

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
Thank you!

Ruby community will be excited, I will continue to improve the tests.

On Thu, Nov 8, 2012 at 8:29 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Michael Chletsos <mp...@gmail.com> writes:
>
>> Initial support for ruby 1.9.3 when creating swig bindings for subversion.
>
> I tweaked the format a little and committed in r1407206.  Thanks!
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Michael Chletsos <mp...@gmail.com> writes:

> Initial support for ruby 1.9.3 when creating swig bindings for subversion.

I tweaked the format a little and committed in r1407206.  Thanks!

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
Initial support for ruby 1.9.3 when creating swig bindings for subversion.

* Makefile.in:
  Ruby 1.8 uses --verbose, 1.9 does not for run-test.rb
* subversion/bindings/swig/ruby/test/test_core.rb:
  Updated for ruby1.9 time, which uses nanoseconds
* subversion/bindings/swig/ruby/test/test_repos.rb:
  ruby1.8 carries the assignment through block, ruby1.9 does not carry
assignments, we need to explicitly do this.
* subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb:
  run priority tests only for ruby1.8
* subversion/bindings/swig/ruby/test/test_delta.rb:
  fix nil return in ruby1.9,
  ruby1.8 carries the assignment through block, ruby1.9 does not carry
assignments, we need to explicitly do this
  fix StringIO encoding to be ASCII-8BIT, no longer assumed as in ruby1.8
* subversion/bindings/swig/ruby/test/test-unit-ext.rb:
  turn off some tests for ruby1.9, they should be fixed still
* subversion/bindings/swig/ruby/test/test_fs.rb:
  update md5 to digest/md5 in require
* subversion/bindings/swig/ruby/test/test_wc.rb,
subversion/bindings/swig/ruby/test/test_client.rb:
  ruby1.8 carries the assignment through block, ruby1.9 does not carry
assignments, we need to explicitly do this
* subversion/bindings/swig/ruby/test/my-assertions.rb:
  create intermediary assertion block handler
* subversion/bindings/swig/ruby/svn/util.rb:
  convert to string before splitting for ruby1.9 compat
* subversion/bindings/swig/ruby/svn/info.rb:
  use each_line for ruby1.9 and each for ruby1.8
* configure.ac:
  detect ruby1.9.3 - added teeny version detection
  restrict build to 1.8.x and >= 1.9.3

Patch by: Michael Chletsos <mp...@gmail.com>,
               Vincent Batts <vb...@slackware.com>




On Thu, Nov 8, 2012 at 1:03 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Michael Chletsos <mp...@gmail.com> writes:
>
>> OK - this should fix your issues, tested on ruby1.9.3 and ruby1.8.7 -
>> passed for me, let me know what you get.
>
> That works for me.  It needs a log message before it can be committed.
> If you want to write it look at some old log messages and
> http://subversion.apache.org/docs/community-guide/conventions.html#log-messages
> for guidance.
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Michael Chletsos <mp...@gmail.com> writes:

> OK - this should fix your issues, tested on ruby1.9.3 and ruby1.8.7 -
> passed for me, let me know what you get.

That works for me.  It needs a log message before it can be committed.
If you want to write it look at some old log messages and
http://subversion.apache.org/docs/community-guide/conventions.html#log-messages
for guidance.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
OK - this should fix your issues, tested on ruby1.9.3 and ruby1.8.7 -
passed for me, let me know what you get.

On Wed, Nov 7, 2012 at 4:40 PM, Philip Martin
<ph...@wandisco.com> wrote:
> Michael Chletsos <mp...@gmail.com> writes:
>
>> Here is a complete patch that I tested - more work needs to be done on
>> the tests, but currently all tests that are run, succeed on my system.
>
> It breaks the tests when run with ruby 1.8.7 on my Debian/testing
> machine which is a regression since they pass without the patch.
>
> Loaded suite .
> Started
> ............................Killed
> make: *** [check-swig-rb] Error 137
>
> I don't know much about Ruby but with --verbose=verbose the output ends:
>
> test_import_custom_revprops(SvnClientTest): .
> test_info(SvnClientTest): .
> test_info_with_depth(SvnClientTest): .
> test_list(SvnClientTest):
>
> so I think the last line is the failing test.
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Michael Chletsos <mp...@gmail.com> writes:

> Here is a complete patch that I tested - more work needs to be done on
> the tests, but currently all tests that are run, succeed on my system.

It breaks the tests when run with ruby 1.8.7 on my Debian/testing
machine which is a regression since they pass without the patch.

Loaded suite .
Started
............................Killed
make: *** [check-swig-rb] Error 137

I don't know much about Ruby but with --verbose=verbose the output ends:

test_import_custom_revprops(SvnClientTest): .
test_info(SvnClientTest): .
test_info_with_depth(SvnClientTest): .
test_list(SvnClientTest):

so I think the last line is the failing test.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
Here is a complete patch that I tested - more work needs to be done on
the tests, but currently all tests that are run, succeed on my system.

I based this on trunk today.

On Wed, Nov 7, 2012 at 8:57 AM, Michael Chletsos <mp...@gmail.com> wrote:
> Sorry - I am having one of those morning - this one should be good, I
> keep reversing my files and my thoughts . . .
>
> I will check out trunk later and fix the patches and this patch and
> make them all nice and be real.
>
>
>
> On Wed, Nov 7, 2012 at 8:54 AM, Peter Samuelson <pe...@p12n.org> wrote:
>>
>> [Michael Chletsos]
>>> sorry about confusion - here is the updated patch, with swig updates.
>>
>> Your patch seems to be reversed ('diff -u {new} {old}' whereas what
>> everyone wants to see is 'diff -u {old} {new}' or 'svn diff'), and also
>> seems to have been developed against something older than Subversion
>> trunk.  I note for example that you change some Config to RbConfig, a
>> change that was made in Subversion trunk months ago in r1337514.
>>
>> Please update your Subversion checkout to the current trunk, apply your
>> patch, then run 'svn diff' to generate a more current patch.
>>
>> Peter

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
Sorry - I am having one of those morning - this one should be good, I
keep reversing my files and my thoughts . . .

I will check out trunk later and fix the patches and this patch and
make them all nice and be real.



On Wed, Nov 7, 2012 at 8:54 AM, Peter Samuelson <pe...@p12n.org> wrote:
>
> [Michael Chletsos]
>> sorry about confusion - here is the updated patch, with swig updates.
>
> Your patch seems to be reversed ('diff -u {new} {old}' whereas what
> everyone wants to see is 'diff -u {old} {new}' or 'svn diff'), and also
> seems to have been developed against something older than Subversion
> trunk.  I note for example that you change some Config to RbConfig, a
> change that was made in Subversion trunk months ago in r1337514.
>
> Please update your Subversion checkout to the current trunk, apply your
> patch, then run 'svn diff' to generate a more current patch.
>
> Peter

Re: [PATCH] enabling ruby in the subversion build

Posted by Peter Samuelson <pe...@p12n.org>.
[Michael Chletsos]
> sorry about confusion - here is the updated patch, with swig updates.

Your patch seems to be reversed ('diff -u {new} {old}' whereas what
everyone wants to see is 'diff -u {old} {new}' or 'svn diff'), and also
seems to have been developed against something older than Subversion
trunk.  I note for example that you change some Config to RbConfig, a
change that was made in Subversion trunk months ago in r1337514.

Please update your Subversion checkout to the current trunk, apply your
patch, then run 'svn diff' to generate a more current patch.

Peter

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Philip Martin <ph...@wandisco.com> writes:

> Michael Chletsos <mp...@gmail.com> writes:
>
>> Sorry for delay.  Patch for configure is attached.
>
> You don't patch configure, that's a generated file.  You patch
> configure.ac.

Some of configure is generated from build/ac-macros/swig.m4.

The original patch for the testsuite no longer applies to trunk.  If you
could update that as well it would be a help.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
sorry about confusion - here is the updated patch, with swig updates.



On Wed, Nov 7, 2012 at 8:06 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Michael Chletsos <mp...@gmail.com> writes:
>
>> Sorry for delay.  Patch for configure is attached.
>
> You don't patch configure, that's a generated file.  You patch
> configure.ac.
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Michael Chletsos <mp...@gmail.com> writes:

> Sorry for delay.  Patch for configure is attached.

You don't patch configure, that's a generated file.  You patch
configure.ac.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
Sorry for delay.  Patch for configure is attached.

It also updates Config to RbConfig which will remove annoying errors
and is backwards compatible.

On Wed, Nov 7, 2012 at 5:43 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Michael Chletsos <mp...@gmail.com> writes:
>
>> The current patch I used does not fix the configure script, I could
>> modify that to only use <= 1.8.7 or >= 1.9.3 if you like.
>
> yes, please.
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Michael Chletsos <mp...@gmail.com> writes:

> The current patch I used does not fix the configure script, I could
> modify that to only use <= 1.8.7 or >= 1.9.3 if you like.

yes, please.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
I would support 1.9.3 - ruby 1.9.2 and 1.9.1 are not considered good
versions and are problematic.

The current patch I used does not fix the configure script, I could
modify that to only use <= 1.8.7 or >= 1.9.3 if you like.

On Wed, Nov 7, 2012 at 5:31 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Michael Chletsos <mp...@gmail.com> writes:
>
>> OK - first, I would not support ruby 1.9.1 - I assume that you really
>> have 1.9.2 (debian/ubuntu uses a meta-package)- can you show me the
>> output of ruby -v
>>
>> I would support ruby 1.9.3 and above - there were issues with 1.9.1 and 1.9.2.
>
> I used whatever was part of Debian stable:
>
> ii  ruby1.9.1      1.9.2.0-2      Interpreter of object-oriented scripting lan
>
> If 1.9.1 and 1.9.2 are not supported then the patch has to be modified
> to refuse to accpet them.  According to the package:
>
>  Ruby uses two parallel versioning schemes: the `Ruby library compatibility
>  version' (1.9.1 for this package), which is similar to a library SONAME, and
>  the `Ruby version' (1.9.3 for this package).
>
> Which versions should we support?
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Michael Chletsos <mp...@gmail.com> writes:

> OK - first, I would not support ruby 1.9.1 - I assume that you really
> have 1.9.2 (debian/ubuntu uses a meta-package)- can you show me the
> output of ruby -v
>
> I would support ruby 1.9.3 and above - there were issues with 1.9.1 and 1.9.2.

I used whatever was part of Debian stable:

ii  ruby1.9.1      1.9.2.0-2      Interpreter of object-oriented scripting lan

If 1.9.1 and 1.9.2 are not supported then the patch has to be modified
to refuse to accpet them.  According to the package:

 Ruby uses two parallel versioning schemes: the `Ruby library compatibility
 version' (1.9.1 for this package), which is similar to a library SONAME, and
 the `Ruby version' (1.9.3 for this package).

Which versions should we support?

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
OK - first, I would not support ruby 1.9.1 - I assume that you really
have 1.9.2 (debian/ubuntu uses a meta-package)- can you show me the
output of ruby -v

I would support ruby 1.9.3 and above - there were issues with 1.9.1 and 1.9.2.

If installing on debian/ubuntu, here are the steps for 1.9.3:

apt-get install build-essential openssl libreadline6 libreadline6-dev
zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz
tar -xzvf ruby-1.9.3-p286.tar.gz
cd ruby-1.9.3-p286

export CFLAGS="-Os"
time (./configure --prefix=/usr --with-ruby-version=1.9.3-p286
--program-suffix=-1.9.3-p286 && make && make install
DESTDIR=/tmp/ruby1.9.3-p286)

apt-get install ruby1.9.1 # you already have this installed, you can ignore it
gem install fpm
fpm -s dir -t deb -n ruby -v 1.9.3-p286 --description "Self-packaged
Ruby 1.9.3-p286" -C /tmp/ruby1.9.3-p286 -p ruby193-VERSION_ARCH.deb -d
"libstdc++6 (>= 4.4.3)"   -d
"libc6 (>= 2.6)" -d "libffi5 (>= 3.0.4)" -d "libgdbm3 (>= 1.8.3)"   -d
"libncurses5 (>= 5.7)" -d "libreadline6 (>= 6.1)"   -d "libssl0.9.8
(>= 0.9.8)" -d "zlib1g (>= 1:1.2.2)"
  -d "libyaml-0-2 (>= 0.1.3)"  usr/bin usr/lib usr/share/man usr/include
apt-get remove ruby1.9.1

dpkg -i ruby-1.9.3-p286

For sanities sake, create a wrapper for your ruby since the gc will be
pretty poor, create /usr/bin/ruby:

#!/bin/sh
export RUBY_HEAP_MIN_SLOTS=600000
export RUBY_GC_MALLOC_LIMIT=59000000
export RUBY_FREE_MIN=200000
exec "/usr/bin/ruby-1.9.3-p286" "$@"

then test: ruby -ropenssl -rzlib -rreadline -ryaml -e "puts :success"

This should get ruby 1.9.3 installed on your system, then the patch
should work fine.

On Wed, Nov 7, 2012 at 5:09 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Michael Chletsos <mp...@gmail.com> writes:
>
>> Hi Philip -
>>
>> Not sure if you remember me from the Subversion Live! event the other
>> week (Michael with Assembla), anyhow . . . I was able to run the ruby
>> swig tests - though one test failed because of encoding, not a huge
>> deal breaker, and the regular make test ran fine - were you talking
>> about some other regression tests?
>
> I was unable to run the regression tests with the patch applied:
>
> http://svn.haxx.se/dev/archive-2012-01/0388.shtml
>
> The problem appears to be related to the test environment.  I don't do
> Ruby so I don't know how to fix it and I won't commit the patch until I
> can run the tests.
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Michael Chletsos <mp...@gmail.com> writes:

> Hi Philip -
>
> Not sure if you remember me from the Subversion Live! event the other
> week (Michael with Assembla), anyhow . . . I was able to run the ruby
> swig tests - though one test failed because of encoding, not a huge
> deal breaker, and the regular make test ran fine - were you talking
> about some other regression tests?

I was unable to run the regression tests with the patch applied:

http://svn.haxx.se/dev/archive-2012-01/0388.shtml

The problem appears to be related to the test environment.  I don't do
Ruby so I don't know how to fix it and I won't commit the patch until I
can run the tests.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
Hi Philip -

Not sure if you remember me from the Subversion Live! event the other
week (Michael with Assembla), anyhow . . . I was able to run the ruby
swig tests - though one test failed because of encoding, not a huge
deal breaker, and the regular make test ran fine - were you talking
about some other regression tests?

Thanks,
michael

On Wed, Nov 7, 2012 at 12:51 AM, Philip Martin
<ph...@wandisco.com> wrote:
> mpchlets <mp...@gmail.com> writes:
>
>> I am also very interested in seeing this get to a state of usability -
>> I am willing to help also.
>>
>> If there is a current status or anyone working on this, I would love
>> to pitch in and get this finalized.
>
> The patch allowed the tests to build when I tried it but I could not get
> the regression tests to run.  Can you run the tests?
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
mpchlets <mp...@gmail.com> writes:

> I am also very interested in seeing this get to a state of usability -
> I am willing to help also.
>
> If there is a current status or anyone working on this, I would love
> to pitch in and get this finalized.

The patch allowed the tests to build when I tried it but I could not get
the regression tests to run.  Can you run the tests?

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download