[DRE-maint] On CDBS and packaging gems

Gunnar Wolf gwolf at gwolf.org
Fri Mar 16 03:10:12 CET 2007


I've been reviewing the excellent work Filipe has invested in
packaging Mongrel - I just started with a very simplistic packaging,
and he has done quite a bit of polishing/documenting, getting the work
more in line with the rest of the pkg-ruby-extras team work. Now, one
of the things he did is to rework my debian/rules to use CDBS -
Compare revisions 1258 and 1263 [1].

Now, packaging Gems is not such a hassle after all - Gems are
basically tarball-in-a-tarball, precisely one of the motivations that
brought CDBS to life (somehow, using
/usr/share/cdbs/1/rules/tarball.mk). If we manage our patches via
dpatch (as we are doing), it should not be too hard to properly take
care of them. After extracting the tarball-in-a-tarball, we can
perfectly call our usual
/usr/share/ruby-pkg-tools/1/class/ruby-setup-rb.mk CDBS class to do
the work. Only there is a problem: The order in which operations are
done. Look at the package resulting from our tree: 

gwolf at mosca:~/cvs/pkg-ruby-extras/packages-wip/mongrel$ ls -l build-area/
total 384
-rw-r--r-- 1 gwolf gwolf 155332 2007-03-15 10:18 mongrel_1.0.1-1.diff.gz
-rw-r--r-- 1 gwolf gwolf    472 2007-03-15 10:18 mongrel_1.0.1-1.dsc
-rw-r--r-- 1 gwolf gwolf    792 2007-03-15 10:18 mongrel_1.0.1-1_i386.changes
-rw-r--r-- 1 gwolf gwolf  56468 2007-03-15 10:18 mongrel_1.0.1-1_i386.deb
-rw-r--r-- 2 gwolf gwolf 156486 2007-03-15 09:24 mongrel_1.0.1.orig.tar.gz

The .diff.gz is basically the whole orig.tar.gz - Why? Because the
step just _before_ building the source package (dpkg-source -b
mongrel-1.0.1) is unpacking the tarball-in-a-tarball. This step should
_follow_ dpkg-source -b. In fact, I don't know why it makes sense to
build the source package _after_ calling setup.rb - It just happens so
because that's what the CDBS rules mandate.

And the problem is? Quite simply, I'm still baffled trying to find out
how to work with CDBS. I have found out the right targets for several
points in the process, but cannot just hit the right spot.

So, in short: As a first step, I need help from you CDBS gurus to
properly build Mongrel without a 155KB diff.gz

As a second step, I'm sure the solution will be quite generic, and can
be converted into a /usr/share/ruby-pkg-tools/1/class/ruby-gem.mk or
similar CDBS class. And although we officially Do Not Like Gems, we
will be much better equipped to convert them into nice Debian packages

So, who said "ok, I'll do it"?


[1] http://svn.debian.org/wsvn/pkg-ruby-extras/packages-wip/mongrel/trunk/debian/rules?op=log&rev=0&sc=0&isdir=1

Gunnar Wolf - gwolf at gwolf.org - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20070315/da0a3f54/attachment.pgp

More information about the Pkg-ruby-extras-maintainers mailing list