The PBI Format for 9.0 and Beyond
This document is intended to serve as a place for brainstorming ideas to improve and enhance the PBI (Push Button Installer) format for PC-BSD 9.0 and beyond.
What is the PBI format?
The idea behind creating the PBI format is that one of the things holding back mainstream adoption of open-source desktops is the package management format. With almost all open-source desktops, software is simply treated as part of your system itself. Thus when performing an update of some seemingly trivial application, you run the risk of potentially needing to upgrade other packages which in turn could break other critical parts of your desktop.
Example: User wants to upgrade to latest version of FireFox. However, this in turn requires new version of libFoo*, which is also used by Xorg and many other libs/apps. In order to perform update of libFoo, Xorg and any other dependent libraries must be updated as well. Newer Xorg may in turn require different version of libOtherFoo and so-on and so forth. All it takes is one failure at any point of the process, and the user may end up with a broken system, no GUI and a huge loss of productive time.
While package management systems have gotten better at resolving these issues, trying to fix conflicts and prevent breakage before it occurs, it still doesn't fix the underlying problem, that every software package is simply a part of the system, and pulling one any one thread has the potential of causing a break somewhere farther down the line.
The PBI format tries to correct the underlying flaw in this system for desktop computing. Rather than making every application apart of your base system, PBI's are self-contained, including their own dependent library tree and related data. As a result, when you install a PBI there are no dependency issues to resolve, and applications can be added / removed freely, without fear of causing breakage to the desktop or any other installed software.
Why update the format?
The current PBI format, while still very useful is beginning to show its age. The format when started was a new concept for the open-source world and now, after many years of real-world usage, it is time to take what we've learned, refine and implement it in a cleaner way, for the benefit of both PC-BSD and FreeBSD users.
The current PBI format
A .pbi file today is made up of several different components and organized as indicated below.
1. At the front of a PBI file is a small C binary, which makes the application executable, and starts the installation process.
2. Next is a small tarball which contains configuration meta-data, such as icon information, mime-data and install / uninstall scripts - all used by the GUI portion of the installer.
3. After the tarball, there is a location for an optional "icon" which can be used by thumbnailer utilities, to display the applications icon in file-managers.
4. Lastly is the program archive, which is made up of a LZMA compressed tarball for both maximum compression and fast extraction.
By using these components, the QT4 PBI installer is able to run, confirm some settings from the user, such as destination directory, and then extract the program archive to disk. The installer reads much of the included meta-data and uses it in the creation of XDG formatted desktop / menu icon creation, as well as registering mime types, etc.