Bug 667954 - Review Request: rubygem-arel - Arel is a Relational Algebra for Ruby
Summary: Review Request: rubygem-arel - Arel is a Relational Algebra for Ruby
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mo Morsi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 674587
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-07 12:15 UTC by Vít Ondruch
Modified: 2011-02-05 08:21 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-05 08:21:39 UTC
Type: ---
Embargoed:
mmorsi: fedora-review+
kevin: fedora-cvs+


Attachments (Terms of Use)
error building activerecord 3.0.3 against arel 2.0.6 (44.68 KB, text/plain)
2011-01-24 21:59 UTC, Mo Morsi
no flags Details
activerecord build in mock against arel 2.0.2 and 2.0.7 (95.11 KB, text/plain)
2011-01-31 21:33 UTC, Mo Morsi
no flags Details

Description Vít Ondruch 2011-01-07 12:15:08 UTC
Spec URL: http://people.redhat.com/vondruch/rubygem-arel.spec
SRPM URL: http://people.redhat.com/vondruch/rubygem-arel-2.0.6-1.fc14.src.rpm

Description: 
Arel is a Relational Algebra for Ruby. It 1) simplifies the generation complex of SQL queries and it 2) adapts to various RDBMS systems. It is intended to be a framework framework; that is, you can build your own ORM with it, focusing on innovative object and collection modeling as opposed to database compatibility and query generation.

Comment 1 Vít Ondruch 2011-01-07 14:56:16 UTC
Buildroot cleanup added:

Spec URL: http://people.redhat.com/vondruch/rubygem-arel.spec
SRPM URL: http://people.redhat.com/vondruch/rubygem-arel-2.0.6-2.fc14.src.rpm

Comment 2 Vít Ondruch 2011-01-07 15:35:55 UTC
All documentation moved into subpackage

Spec URL: http://people.redhat.com/vondruch/rubygem-arel.spec
SRPM URL: http://people.redhat.com/vondruch/rubygem-arel-2.0.6-3.fc14.src.rpm

Comment 3 Mo Morsi 2011-01-19 01:14:31 UTC
OK. A few comments.

* rpmlint output looks fine save 'no-%build-section', could you add one

* It turns out only rubygem-arel 2.0.2 is compatible w/ rails 3.0.3. Anything above that will cause errors in activerecord. Would you consider submitting arel 2.0.2 instead?

Other than that, looks good.

Comment 4 Mo Morsi 2011-01-19 02:09:30 UTC
Koji build looks good

http://koji.fedoraproject.org/koji/taskinfo?taskID=2730275

Comment 5 Vít Ondruch 2011-01-24 14:26:07 UTC
(In reply to comment #3)
> * It turns out only rubygem-arel 2.0.2 is compatible w/ rails 3.0.3. Anything
> above that will cause errors in activerecord. Would you consider submitting
> arel 2.0.2 instead?

How did you tested please?

This is list of gems I have on my system:

[vondruch@dhcp-25-1 activerecord ((v3.0.3) *)]$ gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.3)
actionpack (3.0.3)
activemodel (3.0.3)
activerecord (3.0.3)
activeresource (3.0.3)
activesupport (3.0.3)
addressable (2.2.3)
archive-tar-minitar (0.5.2)
arel (2.0.7)
builder (2.1.2)
bundler (1.0.9)
columnize (0.3.1)
erubis (2.6.6)
faker (0.9.4)
gem2rpm (0.6.0)
horo (1.0.3)
i18n (0.5.0)
json (1.4.3)
linecache (0.43)
mail (2.2.14)
memcache-client (1.8.5)
mime-types (1.16)
mocha (0.9.8)
nokogiri (1.4.3.1)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.7)
rails (3.0.3)
railties (3.0.3)
rake (0.8.7)
rbench (0.2.3)
rdoc (3.4)
ruby-debug (0.10.4)
ruby-debug-base (0.10.4)
ruby-prof (0.9.2)
ruby_core_source (0.1.4)
sqlite3 (1.3.3)
sqlite3-ruby (1.3.3)
system_timer (1.0)
text-format (1.0.0)
text-hyphen (1.0.0)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.24)
yajl-ruby (0.7.9)

and running: 

[vondruch@dhcp-25-1 activerecord ((v3.0.3) *)]$ rake test_sqlite3

produces no error:

Finished in 402.826755 seconds.

2380 tests, 7383 assertions, 0 failures, 0 errors

Comment 6 Mo Morsi 2011-01-24 21:59:12 UTC
Created attachment 475056 [details]
error building activerecord 3.0.3 against arel 2.0.6

$ gem list

*** LOCAL GEMS ***

activemodel (3.0.3)
activesupport (3.0.3)
arel (2.0.6)
builder (2.1.2)
hoe (2.6.2)
i18n (0.4.2)
json (1.4.3)
minitest (1.6.0)
mocha (0.9.8)
rake (0.8.7)
rubyforge (2.0.4)
sqlite3-ruby (1.2.4)
tzinfo (0.3.24)



All installed via yum from Fedora and the locally built copies.

When I build the rubygem-activerecord package with the following spec

http://mo.morsi.org/files/rpms/rubygem-activerecord.spec

Changing the arel dependency to 2.0.6, I get the attached errors in the activerecord spec suite

Comment 7 Vít Ondruch 2011-01-28 16:19:35 UTC
I can't help myself but I see no failure for AR on my machine:

Finished in 308.784244 seconds.

2374 tests, 7372 assertions, 0 failures, 0 errors
+ exit 0
Processing files: rubygem-activerecord-3.0.3-1.fc14.noarch
Provides: rubygem(activerecord) = 3.0.3

I have the same gems as you except hoe, which is already updated in repository. Well actually also except Arel, because I have already update to Arel 2.0.7:

Spec URL: http://people.redhat.com/vondruch/rubygem-arel.spec
SRPM URL: http://people.redhat.com/vondruch/rubygem-arel-2.0.7-1.fc14.src.rpm

Koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=2747780

I hope I will find time to test the AR build in mock on my computer at Monday. Anyway I believe we should continue with Arel 2.0.7 and solve problem with AR later.

Comment 8 Vít Ondruch 2011-01-31 11:28:07 UTC
I have tested activerecord in mock today and the result is:

1) I can build activerecord with Arel-2.0.2 or 2.0.7 equally well when I use sqlite3-ruby 1.3.3
2) I can't build activerecord with Arel-2.0.2 neither with 2.0.7 while using rubygem-sqlite3-ruby 1.2.4, which is the default in rawhide.

Going to ping sqlite3 maintainers for update. However I am not sure what impact it will have on other packgages ...

Comment 9 Vít Ondruch 2011-01-31 11:30:02 UTC
This is the bugtrace:

/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/lib/sqlite3/driver/native/driver.rb:76: [BUG] Segmentation fault
ruby 1.8.7 (2010-12-23 patchlevel 330) [x86_64-linux]

rake aborted!
Command failed with status (): [/usr/bin/ruby -w -I"lib:test:test/connecti...]
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:994:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1009:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1009:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1093:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1028:in `ruby'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1093:in `ruby'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/testtask.rb:116:in `define'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1111:in `verbose'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/testtask.rb:101:in `define'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:589:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:582:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2022:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1997:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

Comment 10 Mo Morsi 2011-01-31 21:33:45 UTC
Created attachment 476270 [details]
activerecord build in mock against arel 2.0.2 and 2.0.7

I'm not quite sure how we are running into different results using mock. Attached are the commands I ran and their output to build activerecord in via mock. Once again it works with arel 2.0.2 but not 2.0.7. 

Before I ran this I removed the specific version of the arel dependency in the activerecord rpm so as to be able to build against both 2.0.2 and 2.0.7. In both cases I'm running the test suite against the stock sqlite3-ruby gem in Fedora (1.2.4)

Does anything look different between our approaches?

Comment 11 Mo Morsi 2011-01-31 21:38:29 UTC
Comment on attachment 476270 [details]
activerecord build in mock against arel 2.0.2 and 2.0.7

Please ignore this line in the attachment:

"mock -r fedora-14-x86_64 --copyin rubygem-activemodel-3.0.3-2.fc14.src.rpm /tmp/^C"

Notice I canceled it before it was run (the ^C). The activerecord srpm is copied in a little later afterwards.

Comment 12 Vít Ondruch 2011-02-02 08:16:49 UTC
If nothing else, you are using older mock. I have mock 1.1.8 on my system while you have mock 1.1.5. Also, I would say that you should try to build preferably against rawhide instead of f14, because that is the version we are targeting.

There is also unclear if we are on the same version of Sqlite for example.

Comment 13 Vít Ondruch 2011-02-02 08:59:28 UTC
My Sqlite versions:

[vondruch@dhcp-25-1 fedora-scm]$ mock shell
INFO: mock.py version 1.1.8 starting...
State Changed: init plugins
INFO: selinux enabled
State Changed: start
State Changed: lock buildroot
mock-chroot> rpm -q sqlite
sqlite-3.6.23.1-1.fc14.x86_64
mock-chroot> exit
State Changed: unlock buildroot
[vondruch@dhcp-25-1 fedora-scm]$ mock -r fedora-devel shell
INFO: mock.py version 1.1.8 starting...
State Changed: init plugins
INFO: selinux enabled
State Changed: start
State Changed: lock buildroot
mock-chroot> rpm -q sqlite
sqlite-3.7.4-1.fc15.x86_64

Comment 14 Mo Morsi 2011-02-02 18:56:29 UTC
OK thank you greatly for this rpm and your assistance. I was able to get it working on mock on F14 with your latest SRPM. I also verified the updated sqlite3 gem is needed to build activerecord (will review that next).

* package passes the review guidelines

* package builds fine on koji against dist-rawhide

* rpmlint is fine for the most part, complains about a missing %build section, please add (even if its empty) before you push

Other than that everything looks great.


APPROVED.

Comment 15 Vít Ondruch 2011-02-03 10:30:31 UTC
Thank you for your review!



New Package SCM Request
=======================
Package Name: rubygem-arel
Short Description: Arel is a Relational Algebra for Ruby
Owners: vondruch
Branches: 
InitialCC:

Comment 16 Kevin Fenzi 2011-02-03 20:28:44 UTC
Git done (by process-git-requests).


Note You need to log in before you can comment on or make changes to this bug.