One of the things which seems to have been reinvented by every version of Unix and every distribution of Linux is the package management system. This post makes suggestions as to the best way of achieving a unified package system.
At the moment, quite a lot of time is going into packaging various different pieces of software. Debian has their own set of packaging, as do Fedora and others.
It would be futile to suggest that all distributions use the same set of packaging files. But it would greatly simplify things for software developers if they had some way of packaging their software so that it would be easily installable on every distribuion, and it might help distro developers if every piece of software came with its own packaging setup on which they could build.
Above, I've been using the term loosely. But below this point, I want to use some more precise terms:
Package manager: This is tools like dpkg, rpm, and the like. When given a package, they perform an action on it
Package Meta-manager: This is tools like apt, yum, and the like. They perform four tasks:
The first thing that needs to happen to create a universal package management tool is to unify the build system. You might be wondering how even this could be done. I have a suggestion as to what to do first: create a universal package specification.
Say that we call this universal package specification Universal Package Specification (UPS). The initial step would be to gain agreement between the developers of as many packaging systems as possible just what the .ups file format should be. My suggestion is that it should be able to support every feature of every major packaging system, but that all features should be optional except a few that can be agreed upon by everyone.
Anyway, the next step is to write converters to convert this format into the appropriate files for the different packaging systems. In the case of RPM, it would be converted into a .spec file. In the case of DEB (dpkg), it would be converted into a set of files that get put in control.tar.gz. Other package managers can make their own appropriate conversions.
Once this has been done, converters should be written that go the opposite direction. That's right; we want all the different distributions to be able to convert their existing package specifications into .ups format. So we'd need programs with names like spec2ups (for RPM) and control2ups (for DEB).
This will be a more difficult task than the first; agreeing on a universal source and binary packaging format.
For a start, I've noticed that some people have an almost religious feeling for or against rpm, or source-based package managers, or the like. But hopefully with the groundwork laid in the previous steps, these problems can be overcome.
One particular problem is that this will not seem immediately relevant to those who use source-based distributions. But, while the parts that concern binary packaging are indeed irrelevant to them, the parts that concern source packaging are not.
The binary format to be agreed upon should support all the features of the .ups specification; to reiterate, all the features of all the major packaging systems.
To save some effort in comparison, a comparison of the deb, rpm, tgz, and slp package formats [1] already exists.
Once the package format is agreed on there will be a few pieces of software to be written. The following should be developed as a collaboration between the developers of existing systems:
The two items above could be merged into one if necessary. The individual teams should then develop the next generation of their package management system which calls the libraries above to perform the specified function on the upf files. This generation at least would also be supporting the old package formats, but the new format would be the default.
After a number of years, the package management programs could all be replaced with a single new program that only operates on upf files.
Of course, we could also unify the package meta-manager, but that's a topic for another time.
Links:
[1] http://209.85.173.104/search?q=cache:debian-br.sourceforge.net/txt/alien.html