Request #3196

Debian package ruby-opennebula doesn't place files into GEM_PATH

Added by Michael Moll almost 7 years ago. Updated almost 7 years ago.

Status:PendingStart date:09/22/2014
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Packaging
Target version:-
Pull request:

Description

While trying to package https://github.com/theforeman/foreman-one for Debian/wheezy, I installed ruby-opennebula 4.6.2-1 from the ONE repository.

Unfortunately, the gem does not show up in "gem list" and is not loadable in e.g. irb. At the moment it's imposible to use the opennebula gem from this package without further configuration.

I would propose to repackage the opennebula gem in gem2deb style, to have it usable in the system ruby right after installation.

History

#1 Updated by Javi Fontan almost 7 years ago

OpenNebula API Gem is already in gem repository:

http://rubygems.org/gems/opennebula

Also the foreman-one gem has it as a dependency and should be installed automatically:

https://github.com/theforeman/foreman-one/blob/master/foreman_one.gemspec#L23

#2 Updated by Michael Moll almost 7 years ago

The issue is not in the gem "package", but in the .deb package provided in the OpenNebula repository:

mmoll@sledge:~$ dpkg -l ruby-opennebula
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                  Version                 Architecture            Description
+++-=====================================-=======================-=======================-=============================================
ii  ruby-opennebula                       4.6.2-1                 all                     Ruby bindings for OpenNebula Cloud API (OCA)
mmoll@sledge:~$ irb
irb(main):001:0> require 'opennebula'
LoadError: cannot load such file -- opennebula
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from (irb):1
    from /usr/bin/irb:12:in `<main>'
irb(main):002:0> 
mmoll@sledge:~$ gem list|grep -c opennebula
0

The idea is, to have the foreman-one Debian package depend on ruby-opennebula >= 4.4.0, that does not work at the moment:
root@sledge:/tmp# dpkg -i ruby-foreman-one_0.2_all.deb
[...]
+ bundle install --local --no-prune
Could not find gem 'opennebula (>= 4.4.0) ruby', which is required by gem 'foreman_one (= 0.2) ruby', in any of the sources.
[...]

The package is here: https://github.com/mmoll/foreman-packaging/commit/172549a6698b577261d82fd7fee120ce26e337e7
Maybe there are some other ideas on solving this? :)

Also available in: Atom PDF