Thoughts about Package Formats

“Never do anything twice” That should be the mantra of all system administrators. Whatever you do, automate it. If it is installing a piece of software or the steps that you have to go through to add a user, automate it. On Unix, various tools exist to help. When it comes to managing the configuration of multiple machines, CFengine stands out. Its meta-language allows you to actions to take on various classes of machines. You can create classes (e.g. web-servers) and have packages installed on those machines and various configuration tweaks made. It really saves time because it helps you document all that you’ve done to set up a package or service. For compiling software and installing binaries, there are different methods available depending on your operating system. Solaris has a package system, but it installs software in funny places (usually something like /opt/packagename) and there is no obvious, easy way to make your own packages. RedHat Linux uses RPMs which at least learned the fallacy of putting every package in its own special hierarchy, but they didn’t make producing RPMs very easy. They use some sort of meta scripting language that is yet another thing to learn. At least the packaging system is free, though. The various free BSDs (FreeBSD, NetBSD, and OpenBSD) have what they call a ports system. This is based on Makefile, so you don’t have to learn anything if you already know about Makefiles, but it can be difficult to get everything right. For example, after you’ve gotten the whole thing to compile and install correctly, you may have to go through a few iterations of the install to produce a binary package so that you can ensure that you have all the files included and all the extra steps taken care of. The best system I’ve seen yet is Debian’s. They use Makefiles plus some scripts to simplify things. The scripts can take care of 90% of the work in most cases, and in those few that they don’t, they greatly simplify things. When it comes to installation, they have fakeroot which ensures that they’ve captured all the files that are installed. Another good thing about Debian is their Apt protocol. Apt will take a debian package, grab all dependencies from the Internet (optionally compiling them) and install everything. It can be done totally non-interactively — a huge benefit. The driving force behind good system administration, as with good programming, is laziness. As the SysAdmin, you have great power available to you to automate a lot of what you do. Use it.

2 thoughts on “Thoughts about Package Formats”

  1. Good advice. Thinking back over 17 years of writing columns, I can think of maybe a dozen or less that I wish had never been published. But then I started blogging and writing after 40, so that may have been saved me.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.