Introduction and question about proper Debian Rails packaging methods
I'm Michael, and I am part of an IT company and have been working with
Ruby and Rails since 2009. I'm new to Debian mailing lists and Debian
packaging/maintainance in particular, but have spent the last 3 weeks
studying the Debian Policies about properly maintaining Debian packages.
I have successfully built a few binary packages written in C and Qt with
pbuilder/cowbuilder for different distributions and architectures.
My company has produced two major Point of Sale Software products for
Restaurants, Hotels and Supermarkets which have a Rails backend and a
as on almost all mobile devices and smartphones. Development started in
2009 and we have sold them many times since then, so they are out of
Beta and rather stable systems. We have been deploying them for our
customers in .deb format since over one year.
We've decided to make the sources available for free unter the MIT/Expat
license and I had the idea of generating a Debian package that hopefully
can be included in one of the coming Debian distributions.
The packaging and installation of the Rails application already works
well, but I don't really know what the proper Debian-way of packaging a
Bundle of Gems is:
1) Simply run `bundle install` from the postinst script. Advantage: no
Debian packaing of Gems is required at all. Disadvantage: Installation
is not self-contained, requires an internet connection, and native
extensions are compiled during `postinst` execution.
2) Install the raw .gem files into vendor/cache by calling `bundle
package` and make them part of the main Rails application gem. Then,
call `bundle install --local --deployment` in the `postinst` script.
Advantage: No internet connection required, installation is
self-contained. Disadvantage: Native extensions are compiled during
`postinst` execution, and the Debian Policy Manual discourages the use
of so-called "Convenience Code".
3) Generate an additional Debian package that contains all the gems
(pre-built with precompiled native extensions). Advantage: Installation
is self-contained, no compilation needed. Disadvantage: Many "programs"
are shipped in just one Debian package, which may not be the Debian way.
4) Use gem2deb to create one .deb per .gem. Advantage: Probably the
proper Debian way. Disadvantage: Up to 20 gems would have to be packaged
with proper dependencies and versions.
Feedback is highly appreciated.