Bug 637378

Summary: Review Request: rubygem-aws - Ruby gem for all Amazon Web Services
Product: [Fedora] Fedora Reporter: Michal Fojtik <mfojtik>
Component: Package ReviewAssignee: Mamoru TASAKA <mtasaka>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: clalance, fedora-package-review, mfojtik, notting
Target Milestone: ---Flags: mtasaka: fedora-review+
kevin: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-aws-2.3.21-4.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-20 17:04:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Fojtik 2010-09-25 10:44:38 UTC
Spec URL: http://mifo.sk/RPMS/rubygem-aws.spec
SRPM URL: http://mifo.sk/RPMS/rubygem-aws-2.3.21-1.fc13.src.rpm
Description: 

The RightScale AWS gems have been designed to provide a robust, fast, and
secure interface to Amazon EC2, EBS, S3, SQS, SDB, and CloudFront. These gems
have been used in production by RightScale since late 2006 and are being
maintained to track enhancements made by Amazon

Comment 1 Michal Fojtik 2010-09-25 10:46:25 UTC
rpmlint /home/mfojtik/rpm-devel/RPMS/rubygem-aws-2.3.21-1.fc13.noarch.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

rpmlint /home/mfojtik/rpm-devel/SRPMS/rubygem-aws-2.3.21-1.fc13.src.rpm
rubygem-aws.src: W: no-buildroot-tag
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

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

Comment 2 Mamoru TASAKA 2010-10-04 21:27:10 UTC
Well,

* Functionality
  - First of all:
---------------------------------------------------------------
[root@localhost i686]# irb
rirb(main):001:0> require "rubygems"
erqu=> true
irb(main):002:0> require "aws"
Gem::LoadError: Could not find RubyGem http_connection (>= 0)

        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:779:in `report_activate_error'
        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:214:in `activate'
        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:249:in `activate'
        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `each'
        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:35:in `require'
        from (irb):2
---------------------------------------------------------------
    Actually what is really needed is "right_http_connection", however
    metadata.gz in gem file has mistake.

  - Then after installed gemspec file is fixed so that aws.gem requires
    right_http_connection correctly, activating aws still fails like:
---------------------------------------------------------------
irb(main):001:0> require "rubygems"
=> true
irb(main):002:0> require "aws"
LoadError: no such file to load -- active_support
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/awsbase/right_awsbase.rb:31
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/aws.rb:18
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from (irb):2
---------------------------------------------------------------
    So "R:  rubygem(activesupport)" is needed.

  - And even if rubygem-activesupport is installed (after gemspec file is fixed),
    still aws cannot be activated like:
---------------------------------------------------------------
irb(main):001:0> require "rubygems"
=> true
irb(main):002:0> require "aws"
ArgumentError: wrong number of arguments (2 for 1)
        from /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/awsbase/support.rb:49:in `const_get'
        from /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/awsbase/support.rb:49:in `constantize'
        from /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/awsbase/support.rb:48:in `each'
        from /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/awsbase/support.rb:48:in `constantize'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:529:in `new_constants_in'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:525:in `collect'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:525:in `new_constants_in'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support.rb:58
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/awsbase/right_awsbase.rb:31
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/aws.rb:18
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from (irb):2
---------------------------------------------------------------
    It seems that the following patch is needed.
---------------------------------------------------------------
--- lib/awsbase/support.rb.debug	1970-01-01 09:00:00.000000000 +0900
+++ lib/awsbase/support.rb	2010-10-05 06:18:52.000000000 +0900
@@ -46,7 +46,10 @@
 
             constant = Object
             names.each do |name|
-                constant = constant.const_get(name, false) || constant.const_missing(name)
+                constant = ( 
+                    ( RUBY_VERSION >= "1.9" ? constant.const_get(name, false) : constant.const_get(name) ) || 
+                    constant.const_missing(name) 
+                    )
             end
             constant
         end
---------------------------------------------------------------

* Directory ownership issue
  - Currently the directory %geminstdir itself is not owned by any packages.

* BR
  - Would you check if "BR: rubygem(rake) rubygem(rspec)" are really needed?

Comment 3 Mamoru TASAKA 2010-10-04 21:28:27 UTC
By the way I would appreciate it if you would review my
rubygem related review request (bug 635302)

Comment 4 Michal Fojtik 2010-10-05 10:55:20 UTC
(In reply to comment #2)
> Well,
> 
> * Functionality
>   - First of all:
> ---------------------------------------------------------------
> [root@localhost i686]# irb
> rirb(main):001:0> require "rubygems"
> erqu=> true
> irb(main):002:0> require "aws"
> Gem::LoadError: Could not find RubyGem http_connection (>= 0)
> 
>         from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:779:in
> `report_activate_error'
>         from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:214:in `activate'
>         from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:249:in `activate'
>         from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `each'
>         from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate'
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:35:in
> `require'
>         from (irb):2
> ---------------------------------------------------------------
>     Actually what is really needed is "right_http_connection", however
>     metadata.gz in gem file has mistake.

Nice catch, fixed this one in gemspec.

> 
>   - Then after installed gemspec file is fixed so that aws.gem requires
>     right_http_connection correctly, activating aws still fails like:
> ---------------------------------------------------------------
> irb(main):001:0> require "rubygems"
> => true
> irb(main):002:0> require "aws"
> LoadError: no such file to load -- active_support
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require'
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `require'
>         from
> /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/awsbase/right_awsbase.rb:31
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require'
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `require'
>         from /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/aws.rb:18
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require'
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
>         from (irb):2
> ---------------------------------------------------------------
>     So "R:  rubygem(activesupport)" is needed.

Fixed. Dependency added.

> 
>   - And even if rubygem-activesupport is installed (after gemspec file is
> fixed),
>     still aws cannot be activated like:
> ---------------------------------------------------------------
> irb(main):001:0> require "rubygems"
> => true
> irb(main):002:0> require "aws"
> ArgumentError: wrong number of arguments (2 for 1)
>         from
> /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/awsbase/support.rb:49:in `const_get'
>         from
> /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/awsbase/support.rb:49:in
> `constantize'
>         from
> /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/awsbase/support.rb:48:in `each'
>         from
> /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/awsbase/support.rb:48:in
> `constantize'
>         from
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:529:in
> `new_constants_in'
>         from
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:525:in
> `collect'
>         from
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:525:in
> `new_constants_in'
>         from
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in
> `require'
>         from
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support.rb:58
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require'
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
>         from
> /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/awsbase/right_awsbase.rb:31
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require'
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `require'
>         from /usr/lib/ruby/gems/1.8/gems/aws-2.3.21/lib/aws.rb:18
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require'
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
>         from (irb):2
> ---------------------------------------------------------------
>     It seems that the following patch is needed.
> ---------------------------------------------------------------
> --- lib/awsbase/support.rb.debug 1970-01-01 09:00:00.000000000 +0900
> +++ lib/awsbase/support.rb 2010-10-05 06:18:52.000000000 +0900
> @@ -46,7 +46,10 @@
> 
>              constant = Object
>              names.each do |name|
> -                constant = constant.const_get(name, false) ||
> constant.const_missing(name)
> +                constant = ( 
> +                    ( RUBY_VERSION >= "1.9" ? constant.const_get(name, false)
> : constant.const_get(name) ) || 
> +                    constant.const_missing(name) 
> +                    )
>              end
>              constant
>          end
> ---------------------------------------------------------------

Patch added. Thanks for creating it. I was dealing with this issue as well
but I forgot including this patch in package.

> 
> * Directory ownership issue
>   - Currently the directory %geminstdir itself is not owned by any packages.
> * BR
>   - Would you check if "BR: rubygem(rake) rubygem(rspec)" are really needed?

Fixed and Removed.

Now the file:

http://mifo.sk/RPMS/rubygem-aws-2.3.21-2.fc13.src.rpm
http://mifo.sk/RPMS/rubygem-aws.spec

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

Comment 5 Michal Fojtik 2010-10-05 12:33:04 UTC
Ah I forgot to include patch in spec, here is fixed spec:

http://mifo.sk/RPMS/rubygem-aws-2.3.21-3.fc13.src.rpm
http://mifo.sk/RPMS/rubygem-aws.spec

Comment 6 Mamoru TASAKA 2010-10-05 16:13:25 UTC
(In reply to comment #5)
> Ah I forgot to include patch in spec, here is fixed spec:
> 
> http://mifo.sk/RPMS/rubygem-aws-2.3.21-3.fc13.src.rpm
> http://mifo.sk/RPMS/rubygem-aws.spec

It seems that the uploaded rpm is noarch.rpm, not src.rpm.

Comment 7 Michal Fojtik 2010-10-06 08:39:27 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Ah I forgot to include patch in spec, here is fixed spec:
> > 
> > http://mifo.sk/RPMS/rubygem-aws-2.3.21-3.fc13.src.rpm
> > http://mifo.sk/RPMS/rubygem-aws.spec
> 
> It seems that the uploaded rpm is noarch.rpm, not src.rpm.

Dammit, sorry for this. It should be SRPM now.

Comment 8 Mamoru TASAKA 2010-10-06 16:53:40 UTC
One misc comment

/usr/bin/patch - Please use %_bindir macro (or /usr/bin is not
needed)

--------------------------------------------------------------
    This package (rubygem-aws) is APPROVED by mtasaka
--------------------------------------------------------------

Comment 9 Michal Fojtik 2010-10-07 12:13:00 UTC
Thank you!

New Package SCM Request
=======================
Package Name:      rubygem-aws
Short Description: Ruby gem for all Amazon Web Services
Owners:            mfojtik
Branches:          f12 f13 f14

Comment 10 Kevin Fenzi 2010-10-08 20:31:45 UTC
Git done (by process-git-requests).

Comment 11 Fedora Update System 2010-10-11 09:36:31 UTC
rubygem-aws-2.3.21-4.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/rubygem-aws-2.3.21-4.fc13

Comment 12 Fedora Update System 2010-10-11 09:42:15 UTC
rubygem-aws-2.3.21-4.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/rubygem-aws-2.3.21-4.fc14

Comment 13 Fedora Update System 2010-10-11 09:47:43 UTC
rubygem-aws-2.3.21-4.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/rubygem-aws-2.3.21-4.fc12

Comment 14 Fedora Update System 2010-10-11 19:22:27 UTC
rubygem-aws-2.3.21-4.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update rubygem-aws'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/rubygem-aws-2.3.21-4.fc13

Comment 15 Mamoru TASAKA 2010-10-20 17:04:34 UTC
Closing.

Comment 16 Fedora Update System 2010-10-28 06:14:54 UTC
rubygem-aws-2.3.21-4.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2010-10-28 06:17:19 UTC
rubygem-aws-2.3.21-4.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2010-10-29 20:37:10 UTC
rubygem-aws-2.3.21-4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.