Mailinglist Archive: opensuse-ruby (8 mails)

< Previous Next >
[opensuse-ruby] Call to arms: devel:languages:ruby:extensions refresh
Hi,

yesterday we migrated devel:languages:ruby:backports [1] and
devel:languages:ruby [2] to the new ruby packaging scheme. my personal test
projects [3] show, that this gives us a working base. So now it is the
time to fix all the old cruft we have in d:l:r:e. Some packages havent
been touched since 5+years and still have the packaging schema from back
then.

Preparation
=============
# add devel:languages:ruby:backports as repository to your distro if you
# are not on factory:
$ zypper ar
http://download.opensuse.org/repositories/devel:/languages:/ruby:/backports/openSUSE_13.1/devel:languages:ruby:backports.repo
$ zypper in ruby2.0-rubygem-gem2rpm
#
# script attached. if you are not on 13.1 you have to update the path to
# the template.
#
$ mv g2r ~/bin/g2r ; chmod a+rx ~/bin/g2r

Fixing a single package
=========================

#
# Inside the package working copy
#
$ g2r

#
# check if we lost any important fields like license, buildrequires,
# custom descriptions.
#
$ osc diff

#
# if we lost anything copy gem2rpm.yml and move the lost bits into the
# config. Hint: the old spec file is still in the .osc directory.
#
$ cp /usr/share/doc/packages/ruby2.0-rubygem-gem2rpm/gem2rpm.yml .
# port port port
$ g2r

#
# changes entry
#
$ osc vc -m 'update to new packaging scheme and add gem2rpm.yml'

$ osc addremove
$ osc build ...
$ osc ci

Bonus Points
==============

If the gem2rpm.yml only holds the license for the package, file a pull
request upstream to add the license to the gemspec. rubygems also
recommends spdx format, which will make out life a lot easier. [4]

Known Issues
==============

For now please ignore build failures on SLE 11 SP3, if the symptoms are
"unpackaged files found". There is a bug in rpm which cuts off the
output generated by scripts in macros.

[1] https://build.opensuse.org/project/show/devel:languages:ruby:backports
[2] https://build.opensuse.org/project/show/devel:languages:ruby
[3] https://build.opensuse.org/project/monitor/home:darix:ruby
https://build.opensuse.org/project/monitor/home:darix:apps
[4] http://guides.rubygems.org/specification-reference/#license

--
openSUSE - SUSE Linux is my linux
openSUSE is good for you
www.opensuse.org
#!/bin/sh
TEMPLATE='/usr/share/doc/packages/ruby2.0-rubygem-gem2rpm/sles12.spec.erb'
if [ -e gem2rpm.yml ] ; then
cfg="--config gem2rpm.yml"
fi
exec gem2rpm $cfg -t $TEMPLATE -o *spec *gem
< Previous Next >
List Navigation
This Thread
  • No further messages