tar.gz is the best package format for complex programs

Saturday, 26 July 08
There are two kind of Unix programs. The first are programs with little dependencies that will compile out of the box with GCC and some basic library like zlib and other libs that are installed by default in almost every Unix distribution. For this kind of applications it's not so important to be distributed in binary form, the real problem is for complex programs with tons of dependencies, like firefox, amule, openoffice and a lot of less famous unix applications. To compile this applications is hard for the newbie and tedious for the expert Unix user so it's mandatory to have a binary distribution if the project goal is to reach a big user base.

In order to distribute complex programs in binary form there are two widely adopted alternatives, that are to ship a tar.gz with a statically linked binary and other library dependencies shipped with the program and linked at run time with some linker trick when you execute the program (this is what firefox does), or to ship a package for every kind of well known distribution out there.

Of course there are projects that are doing both, that is the best solution but to do so requires a lot of work. The point of this article is that projects that need to select just one binary shipping method should choose the all-inside-tar-gz, and for good reasons.

The tar.gz will work almost everywhere, all it's needed is to download it, unpack everywhere and execute the program: done! it is as simple as what happens with windows programs like uTorrent. It makes very easy to run different versions of the same program in the same box, this will encourage users to try beta versions and give feedbacks for example. It is also much simpler even from the point of view of the developers: to handle all the major distributions out there is hard so basically in order to provide distribution specific packages developers need to do a lot of work (and usually this is not possible) or use the help of the community (that will give you very little quality control). And likely you will not covery 100% of users even with the best of the efforts.

What I think is that the Unix world really need a standard way of packaging applications that will run out of the box with everything inside the binary directory, but while this is not still possible at least big projects authors should be encouraged to ship easy to run binary packages with everything inside the tar.gz.
17035 views*
Posted at 08:00:15 | permalink | 7 comments | print