Even though Solaris comes with a large selection of software these days (and some of it in recent versions) there still will be software that is not on the install media. In my case the greatest itch was rtorrent.
I was not too keen on the idea of building everything from scratch the classic way (tar; configure; make; make install;
), as this makes tracking software versions and removing software somewhat more complicated than I prefer it to be. If there had to be compiling it would have to come with some kind of system that kept track of the various programs it had compiled.
All this sounded a lot like the FreeBSD ports system to me which I found to be unavailable on Solaris. But the general idea was sound, and in the immediate neighbourhood I discovered the NetBSD pkgsrc
system.
pkgsrc
is what the ports system is to FreeBSD, a directory tree containing files describing the method to build a certain piece of software (dependencies, source files, patches and so on). It is primarily developed for NetBSD, of course, but over the years support for other UNIX like operating systems has been added, allowing the system to build software on non-NetBSD systems. Solaris has been on the list of supported systems for several years now.
pkgsrc
is able to build a self-contained software repository on the guest system, including it's own compiler, binutils and all the other utilities needed to build software. Of course it will initially need a compiler supplied by the guest system, but it's not necessary to keep using that compiler. In other words, pkgsrc
can pull a complete Münchhausen, if needed.
On the other hand it can be instructed to use the compiler and tools supplied by the guest operating system, if those are available and recent enough, so that just software that the guest system does not supply is built by pkgsrc
.
pkgsrc
will by default use it's own dedicated directory tree to keep the software built by it and write only a minimum amount of files into the guest systems file system space. Getting rid of pkgsrc
can be as simple as removing three directories (the source tree, the binary tree and the package database tree).pkgsrc
also builds it's own package management tools that allow clean deinstallation of it's packages.