Hi,
since there still is some confusion about Ruby in Factory and building
rubygem packages, I have updated
http://en.opensuse.org/Ruby
and added
http://en.opensuse.org/RubyPackaging
In case your rubygem package fails to build on Factory
http://en.opensuse.org/RubyPackaging#My_rubygem-.2A_package_fails_to_build
lists typical problems and their solution.
And remember, it's a Wiki ! ;-)
Enjoy,
Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany
--
To unsubscribe, e-mail: opensuse-ruby+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-ruby+owner(a)opensuse.org
I have a couple of feature suggestions based on a private discussion
with Klaus about packaging gems ...
In the cases where gem are only available from upstream via a git tag
rather than from rubygems.org (e.g. vagrant), gem2rpm only works with
these extra steps:
git clone git://github.com/mitchellh/vagrant.git
cd vagrant
gem build vagrant.gemspec
gem2rpm vagrant-1.5.0.dev.gem > vagrant.spec
It would be nice to automate this, given that tar_scm already builds
the tarball from git. Would it be worth extending gem2rpm so that it
can also operate on a given directory containing an unpacked gem, or a
tarball? Or maybe it would be even nicer to build a gem2rpm source
service which can automatically generate a .spec or update an existing
.spec?
--
To unsubscribe, e-mail: opensuse-ruby+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-ruby+owner(a)opensuse.org
[moving this thread to opensuse-ruby because it will almost certainly
affect others]
Klaus Kaempf (kkaempf(a)suse.de) wrote:
> * Adam Spiers <aspiers(a)suse.com> [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…
> 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(a)opensuse.org
To contact the owner, e-mail: opensuse-ruby+owner(a)opensuse.org
Hi,
Now that Klaus' ruby merge is done, I switched the OBS project
to use it - as a test bed of a "product". It's plain impossible
to keep yast and update OBS on 13.1 ;(
We have several things required by yast
libruby2.0.so.2.0 is required by yast2-ruby-bindings and libstorage-ruby
ruby(abi) == 2.0.0 is required by rubygem-ruby-dbus and rubygem-fast_gettext
So not to break yast the OBS "product" needs to provide at least 4
packages linking against ruby 2.1. The libruby2.0 problem will be gone
for future updates as we now have libruby2_1 as a special package, but
the ruby(abi) problem will stay and as I said before: making
/usr/bin/ruby an update-alternative is only a solution as long
as rubygem-fast_gettext isn't required by OBS with a different
ruby abi.
Greetings, Stephan
--
Ma muaß weiterkämpfen, kämpfen bis zum Umfalln, a wenn die
ganze Welt an Arsch offen hat, oder grad deswegn.
--
To unsubscribe, e-mail: opensuse-ruby+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-ruby+owner(a)opensuse.org