views:

289

answers:

5

My company has a software product that's written in C for a Linux platform, built with autotools and distributed via binary packages. To make the binaries, we first produce a source RPM and then compile the source from the SRPM.

Currently we only provide RPM packages for 64-bit Fedora 10, but we want to start providing packages for multiple Linux distributions - 32-bit as well as 64-bit - and possibly different versions of each distribution as well (e.g. Fedora 11 as well as Fedora 10).

I've heard that the best way to produce builds for multiple Linux flavours is to have a single build server and use a different chrooted environment for each set of packages that you want to build. Does anyone have a good resource that explains this in more detail, maybe with examples of well known projects that use this build mechanism, or have a better alternative to achieve the same goal ?

+1  A: 

Maybe you can research the following projects to get started:

Novell Build service

Fedora Koji

Bash
+1  A: 

You can use LSB appchecker to test your application/dynlib/shell script compatibility : http://ldn.linuxfoundation.org/lsb/check-your-app. After that you can use RPM for all RPM distribution and use alien for all apt-get distribution and tar.gz for other

Johan Moreau
While appchecker shows valuable information about compatibility, it doesn't build packages with distribution-specific dependency specifications.
Pavel Shved
+1  A: 

Tools like checkinstall will help you to produce packages for different distros. Personally, if you are looking to integrate with existing package management systems, you will also want to host multiple repositories on your servers and provide packages there, then have users configure their package managers to pull the apps off your servers.

sybreon
A: 

Depending on what your software exactly does and which dependencies it has (if any) on local libraries, you may be able to build your software using an older glibc distribution and have it work in many different distributions. This is what we do with InstallBuilder. If you do not have dependencies on specific packages, it is also possible to create RPM or DEB packages that will run on most RPM or DEB-based Linux distros out there. Cross-Linux development, in any case, it is not easy :) Good luck!

Daniel Lopez
A: 

This is one of the cases covered by Bob Aiello in this article on build agents. We have several customers who use this approach to build on several platform in parallel.

Jeffrey Fredrick
Thanks - our build infrastructure in on Amazon EC2 so using build agents is a possibility, but I'd prefer to keep everything on one build server if possible for ease of maintenance (for example, if we upgrade the version of some dependent package, I don't want to have to update multiple Amazon machine images).
gareth_bowles