Packaging
From WikiBabulu
Contents |
[edit] Packaging
A lot of the things we do here are moving toward rpms, which are RedHat packages, and can thusly be installed easily on machines here and there. There is a LOT of documentation on this, but I thought I'd put a little need-to-know here.
[edit] Packaging philosophy
The main idea of what's going on is that any linux program, when you make install, will probably install a bunch of files in a bunch of different places, but they are often standardized (hopefully). Uninstalling these is not an easily available feature in make, nor is upgrading to newer versions.
Therefore packaging systems are invented. A package is usually just a compressed tarball or cpio of files that will be installed at the root directory. These are managed by a system such as rpm or dpkg-deb which keeps a database of which packages have been installed, and what files they installed. The system can then easily change or remove packages if necessary.
There is often also a higher level package retrieval and upgrade system such as apt on Debian or yum on CentOS or Fedora installations. These are sometimes front-ended by guis like synaptic.
Many of these packaging systems share a lot of common tasks. I've tried to table-ize them here:
[edit] rpm
Redhat Package Manager uses a single file called a spec file to define its packages. One writes a spec file which is a collection of scripts that explain how one builds and installs the package of interest. These are built with a utility called rpmbuild, which creates a binary .rpm file, which can be directly installed on the system, and a source .rpm file, which can be built and then installed on the system.
[edit] dpkg
Debian's solution to this is a bit different, and I haven't quite tackled it. At some point I will. What is known is that there is a collection of files in a folder called "debian" which are, collectively, the analogous spec file from rpm. Here are some things that might be filled in later:
[edit] OS X port/MacPorts
MacPorts are the answer to the demand for a lot of the missing gnu-based tools and other such things for OS X. They also represent a pretty clean packaging system. The catch is that everything is built from source whenever you install. I'm not really sure why, but I suppose community support for pre-built packages is much more difficult than the brief Portfiles that come with MacPorts.
[edit] OpenBSD Ports and Packages
Similarly to OS X, OpenBSD and FreeBSD have a very hackish port system based mostly on Makefiles and perl scripts. It works pretty well, except when you mix up versions of the ports tree. They operate pretty similarly, but since I only have a live OpenBSD box at the moment, I'll be talking about that:
Categories: Linux | UNIX | OS X | System Administration | Packaging
