Hi all,
So, we've been having a discussion for a while now about how to use
bundler and how to fix the problems we have with it. As I understand
it, we have two main problems:
- Dealing with optional gems like libvirt, and ensuring at least one
db gem is installed - Packaging for various OSes
For the former, we can try playing with the --without options. I've
just tested with the mysql gem - this fails to build if the headers
aren't installed. Running "bundle install --path vendor/ --without
mysql" worked fine, even without the headers. So, it might be possible
to write some kind of ./install.sh which examines the system and runs
the correct bundle command. Hacky, but doable.
For packaging, I guess we have two options. One is to use bundler's
own packaging tool, and create one huge package file. Not nice, but
probably simple, and we could easily use that to create a
foreman-sqlite.pkg, foreman-mysql.pkg, etc, which has the right gems
in it.
The alternative is to look at FPM
(https://github.com/jordansissel/fpm) which, in theory, we can use to
spit out RPM and DEB files for each of the gem dependencies, stick
them in the foreman repo, and then require those dependencies in the
main foreman package. Slightly nicer, but slightly more work. we can
also (hopefully) do optional dependencies that way (such as the
libvirt and db gems).
I'm going to have a play with FPM and see if I can get a sample deb of
the second version working for the current develop branch.
Thoughts? Joschi, particularly interested if you want to have a play
Greg