Mailinglist Archive: opensuse-ruby (27 mails)

< Previous Next >
[opensuse-ruby] documentation for recent Ruby packaging changes?
  • From: Adam Spiers <aspiers@xxxxxxxx>
  • Date: Tue, 25 Feb 2014 15:41:20 +0000
  • Message-id: <20140225154120.GG22244@pacific.linksys.moosehall>
[moving this thread to opensuse-ruby because it will almost certainly
affect others]

Klaus Kaempf (kkaempf@xxxxxxx) wrote:
* Adam Spiers <aspiers@xxxxxxxx> [Feb 25. 2014 15:13]:
Will do - please can you point me at where the Ruby 2.1 changes are
documented?

The installation path for binary gem extensions and their documentation
changed.
That's why all gems with binaries failed to build on d:l:r:e for Ruby
2.1

https://build.opensuse.org/package/view_file/devel:languages:ruby/ruby/ruby.rpm-macros?expand=1
reflects this in the %gem_base, %gem_extensions, %gem_doc_ext, and
%gem_platform macros.

The latest rubygem-gem2rpm takes care of all this automatically.

On 12.3 I updated to rubygem-gem2rpm-0.9.2-58.1.x86_64 and then got:

$ gem2rpm rubygem-vagrant.spec
/usr/lib64/ruby/1.9.1/rubygems/package/tar_input.rb:122:in `initialize': no
metadata found in rubygem-vagrant.spec (Gem::Package::FormatError)
from /usr/lib64/ruby/1.9.1/rubygems/package/tar_input.rb:20:in `new'
from /usr/lib64/ruby/1.9.1/rubygems/package/tar_input.rb:20:in `open'
from /usr/lib64/ruby/1.9.1/rubygems/package.rb:44:in `open'
from /usr/lib64/ruby/1.9.1/rubygems/format.rb:62:in `from_io'
from /usr/lib64/ruby/1.9.1/rubygems/format.rb:46:in `block in
from_file_by_path'
from /usr/lib64/ruby/1.9.1/open-uri.rb:35:in `open'
from /usr/lib64/ruby/1.9.1/open-uri.rb:35:in `open'
from /usr/lib64/ruby/1.9.1/rubygems/format.rb:45:in
`from_file_by_path'
from
/usr/lib64/ruby/gems/1.9.1/gems/gem2rpm-0.9.2/lib/gem2rpm/package.rb:11:in
`rescue in initialize'
from
/usr/lib64/ruby/gems/1.9.1/gems/gem2rpm-0.9.2/lib/gem2rpm/package.rb:11:in
`initialize'
from
/usr/lib64/ruby/gems/1.9.1/gems/gem2rpm-0.9.2/lib/gem2rpm.rb:35:in `new'
from
/usr/lib64/ruby/gems/1.9.1/gems/gem2rpm-0.9.2/lib/gem2rpm.rb:35:in `convert'
from /usr/lib64/ruby/gems/1.9.1/gems/gem2rpm-0.9.2/bin/gem2rpm:132:in
`<top (required)>'
from /usr/bin/gem2rpm:23:in `load'
from /usr/bin/gem2rpm:23:in `<main>'

On 13.1 I updated rubygem-gem2rpm-0.9.2-58.1.x86_64 and then got:

$ gem2rpm rubygem-vagrant.spec
/usr/lib64/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not
find gem2rpm (>= 0) amongst [bigdecimal-1.1.0, erubis-2.7.0, io-console-0.3,
jist-1.3.1, jist-1.1.0, json-1.5.5, minitest-2.5.1, rack-1.2.5, rake-0.9.2.2,
rdoc-3.9.5] (Gem::LoadError)
from /usr/lib64/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /usr/lib64/ruby/1.9.1/rubygems.rb:1231:in `gem'
from /usr/bin/gem2rpm:22:in `<main>'
$ head -n1 `which gem2rpm`
#!/usr/bin/ruby1.9
$ rpm -ql rubygem-gem2rpm | head
/usr/bin/gem2rpm
/usr/bin/gem2rpm-0.9.2
/usr/bin/gem2rpm-opensuse
/usr/lib64/ruby/gems/2.0.0/cache/gem2rpm-0.9.2.gem
/usr/lib64/ruby/gems/2.0.0/gems/gem2rpm-0.9.2
/usr/lib64/ruby/gems/2.0.0/gems/gem2rpm-0.9.2/AUTHORS
/usr/lib64/ruby/gems/2.0.0/gems/gem2rpm-0.9.2/LICENSE
/usr/lib64/ruby/gems/2.0.0/gems/gem2rpm-0.9.2/README
/usr/lib64/ruby/gems/2.0.0/gems/gem2rpm-0.9.2/bin
/usr/lib64/ruby/gems/2.0.0/gems/gem2rpm-0.9.2/bin/gem2rpm
$ ls -l /etc/alternatives/ruby
lrwxrwxrwx 1 root root 16 Oct 20 12:42 /etc/alternatives/ruby ->
/usr/bin/ruby2.0*
$ ruby2.0 `which gem2rpm` rubygem-vagrant.spec
package metadata is missing in rubygem-vagrant.spec

Maybe I'm doing something wrong? But either way, surely these changes
should be communicated on opensuse-ruby and also documented on
https://en.opensuse.org/openSUSE:Packaging_Ruby ?

It's a worthy goal to maintain a tool which automates everything and
makes gem packagers' lives easier. But things will inevitably go
wrong, and when they do, pain will be significantly reduced by clear
communication and documentation.

On a related note, I learned today that there has been some change in
approach to handling simultaneous installation of parallel versions of
gems, in a way which can involve update-alternatives. But again I
have not seen any public documentation or even discussion of this
change. I'm very happy to be pointed to anything I missed.

Thanks!
Adam
--
To unsubscribe, e-mail: opensuse-ruby+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-ruby+owner@xxxxxxxxxxxx

< Previous Next >
This Thread
  • Adam Spiers
    • Message not available
      • Message not available
        • Message not available
        • Message not available
        • Adam Spiers