Monday, December 14, 2009

Ports and Software Design

As a programmer myself I hugely appreciate the FreeBSD ports system but as a user I think it stinks. My problem with the ports system is with the config system. In reality for the most part it's just a menu to apply patches to the source code. The problem is that it generates different binaries. How do you keep track of all the configuration options or know which ones to apply?

It would be fine for compiling alpha and beta features but it's not the correct answer for standard usage. And when you have more than one page of options for patches obviously those are not all experimental features.

The optimal solution is a ports system that produces binary packages. The ports system should be designed to compile a PACKAGE. With chroot and jails it should be fairly easy to do this. It should just compile. Only when installing should a user be presented with a menu of options.

And the package files should be reproducable and identifyable with checksums. As a whole and segmentally. I think it's necessary that we move beyond tar. We need a new and extensible file packing format. Something that can grow as packaging and file systems evolve. A file format that can adapt to new packaging systems.

If you have to recompile a program to get a feature or install an alternate package I don't know about you but at that point I do a "pkg_delete -a" and just reinstall everything just to be safe but who thinks this is the right thing to do? The programs themselves should have been engineered to be modular from the point of conception but that is in an ideal world. In the practical world we need tools for porters to hack the programs to make them modular and configurable at run time.

Also I believe that the concepts behind the PBI's in PCBSD are very close to the mark. But it should be a run time configurable option as far as which libraries are global and which are local to the program. And all libraries need to be hacked so that mutiple versions can all coexist in the same installation.

That's enough for now.