Introducting gem2deb
Hi,
So, apparently I needed the feeling that I didn't have to worry anymore with
Ruby to get motivated again. I've spent some time today working on a
replacement for our packaging scripts, using dh7, and I made good progress.
It's called gem2deb. It's built as a set of small scripts, but combining them
later in a single "get me this gem and build me a .deb" tool will be easy, as
all the logic is in libraries.
I have reused the gem2tgz script from Antonio Terceiro (thanks!).
The targetted workflow looks like ([*] = almost fully implemented):
Download gem:
gem fetch foo [*]
|
v
Create a tarball. It contains the gem spec as metadata.yml
gem2tgz foo-1.2.gem [*]
|
v
Convert to a Debian source package with sane defaults:
dh-make-ruby foo-1.2.tar.gz [*]
|
v
Modify, if needed
|
v
Build the package:
dpkg-buildpackage -us -uc
Current status:
gem2tgz and dh-make-ruby work. dh-make-ruby generates a Debian source package
that uses Debhelper 7 with a custom build system (ruby.pm) that calls a
"dh_ruby" script.
dh_ruby is not yet feature-comparable with setup.rb, and needs some work.
Contributions are very much welcomed. The tool is hosted on github:
https://github.com/ln/gem2deb
There's a number of FIXMEs in lib/gem2deb/dh_ruby.rb, if you are looking for
something to do. Also, I would appreciate a review of my code.
Let's just implement something that works, and then we can discuss boring stuff
such as policy and migration plan. That's for squeeze+1 anyway, of course.
Thanks,
- Lucas
Reply to: