Dave Shields On Package Management: Apt-Get It or For-get It

Here is all you need to know about package management on Linux. By package management I mean how you install, update, or remove a package.

The most concise expression is: [1]

Apt-get it or for-get it.

Put another way:

If you cannot install a package using apt-get then you should forget about it. If the author doesn’t provide it so it can be installed with apt-get, then it’s not yet ready for serious consideration, so you shouldn’t waste your time on it if you have to use another package manager.

And also:

If you ask me to install a package and I can’t use apt-get to install it, then you need to give me a damn good reason to go to the bother of installing it. At the top of my list of reasons is, “the check is in the mail,” that is a check you need to send to me, not one I have to send to you. If I can’t use apt-get then I am going to forget about it — it doesn’t exist to me.

You may say, “Dave, I know apt-get is only available on Debian and its derivatives such as Ubuntu, but I only currently support other distributions such as RHEL (Red Hat Enterprise Linux) and SLED (Suse Linux Desktop Edition). I may support apt-get some day but I think this package is so good you should go to the bother of using another installation method.”[2]

And I will say, “Yes, but that’s one of the main reasons I use Ubuntu. It supports apt-get. I’m not going to waste my time on packages that are only supported on other Linux distributions. Sorry, I’m going to forget about it until I can apt-get it.”

For example, I recently went through the painful experience of installing IBM’s new Lotus Symphony office suite on Ubuntu. IBM doesn’t make it available in a form that lets you use apt-get to install it. Looking back, I should have stopped as soon as I found that I couldn’t use apt-get. I did slog through the install though, and will write a post about that experience.

Here’s another example. I met with folks in a couple of school districts back in late May. Both expressed interest in using an open-source email system for communication between faculty, staff and students. They had noticed that people were using external email providers such as Google and Yahoo, and were uncomfortable that they had no record of these e-mails. I had heard good things about Zimbra, but when I investigated I learned Zimba requires a customized LAMP-stack. See for example How To Install Zimbra Collaboration Suite (ZCS) On Ubuntu, which says in part, “Don’t install/enable any services (e.g. like LAMP or DNS) – if you do, you’ll have to disable them later on as they might interfere with Zimbra!” That was enough for me. If the install is that complicated, how can I recommend Zimbra to a school system? Perhaps the situation will improve since Yahoo’s recent acquisition of Zimbra for $350 million, but we’ll have to wait and see.

Here are some of my experiences with package management that led to this view.

I ran the Jikes project for its first year. At the start we provided Jikes only in tar format for Linux and zip format for Windows. Sometime in early August I decided to support it in RPM (RedHat Package Manager), the format created and used by Red Hat (RH), to make it easier to install on RH, and also as I wanted to suggest to RedHat that they include Jikes in their distribution, and realized I needed support RPM before I could do so. Towards that end, I purchased a copy of a book on RPM, and I recall going over it while we rented an RV and toured Yellowstone. While I strongly recommend visiting Yellowstone, I cannot recommend that book. Indeed when I just went to find my copy I realized I had thrown it out a couple of years back, to the tune of “good riddance.” I think it was Maximum RPM as it was in print by that time, but I can’t be sure. Then again, it doesn’t really matter, as it’s probably impossible to write a good book about RPM.

I found RPM’s choice of options absolutely maddening. I could never remember them, but had to consult the man page almost every time I used that sucker. See the RPM Man page. Also, compare Debian Linux apt-get package management cheat sheet with RPM Cheat Sheet.

By the way, this story does have a happy ending. After producing a Jikes RPM, I called Christian Grafton at Red Hat and suggested he might want to add Jikes; he replied that was already looking at it since several folks had recommended it, and I later learned : [3]

Sexy penguin admiring Jikes collageJikes was in Red Hat 6.1

A year or so later I was at a LinuxWorld in New York when I saw a booth manned by SuSE folks. I hadn’t yet run SuSE but had read some its documentation and had found it among the best I had yet seen, as it had lots of good technical details. I showed Jikes to them and was pleased to note a few months later that they had decided to include it. [4]

I built my first computer in May, 2004, and put SuSE (which by then had been acquired by Novell) on it. SuSE’s package manager is YAST. It’s ok, though SuSE comes with so many packages installed by default that you don’t need to use it that often.

I used SuSE until late this June, when one of the disks failed. The remaining disk still had my music archives, over 35 gigabytes worth, that I wanted to preserve. As a result, and also because I was by then interested in Ubuntu, I spent much of July installing SuSE and Ubuntu in various hardware combinations involving new motherboards, new machines I built, and so forth. (I”ll be reporting on that experience in a forthcoming post, “From Hardware Hell to Ubuntu Utopia.”)

I must have done at least fifty Ubuntu installs this past July. And the one thing that happened each and every time I first booted up Ubuntu after the install — I saw a little box that said “Updates available. Click on the icon to install them.” Each and every time I did click on that icon. Each and every time about 130 or so packages were flawlessly updated. I was so impressed by that, and other things I leaned about Ubuntu in July, that Ubuntu will be the primary focus of this blog for the forseeable future. See my ubuntu posts.

I have found apt-get to be rock-solid. In particular, I have no qualms about installing a new package — as long as I can use apt-get to do so — even if it means that packages already installed must be deleted, as I am confident that I can later uninstll the new package and reinstall the old one.

By the way, if you don’t want to use apt-get then you can use Synaptic, a graphical front-end to apt-get. It’s especially useful for searching the package database.

I’m also fond of apt-get since — and you folks who know me already know where I’m headed — one of the first commands I tried on Ubuntu was:

$ apt-get jikes

It worked. Which means that if you run

$ apt-get jikes | jikes -version | grep Shields

then you will get the output “Originally written by Philippe Charles and David Shields of IBM Research.” [5]

I say this not just to boast but to point out an important reason for using Ubuntu, Debian, and other distributions based on Debian.

Philippe and I stopped work on Jikes in December 1999, almost eight years ago. I knew when IBM released Jikes that our days with it would be limited, and so did what I could to build a community that could carry on our work. I’m very proud that Jikes can be found in Ubuntu today, thanks to all the folks who worked on the code and, especially, to the Debian developers who decided to include Jikes in Debian and have kept it there to this day.

That’s why you only want to use packages you can get with apt-get. They have been vetted. Someone has committed to make them easy for you to install.

Howver, there is another way you can get a package via apt-get: if its provider has created a repository supporting Ubuntu, as has been done by Google. But this is another form of vetting. The package provider has deemed Ubuntu worthy of support. For example, Google “gets it” when it comes to Ubuntu, and one can only hope other large companies “get it” soon so you can “apt-get” their packages, as for example you can’t do now with Lotus Sympony.

If I want to use a packge, or you suggest one to me, then:

If I can’t apt-get it I will for-get about it.

Count-on-it.

Notes.

1. The concise form is based on the teachings of the master of marketing, Ron Popeil. One of his most famous products is Showtime Rotisserie, a small oven designed for cooking smaller sized portions of meat such as whole chicken and lamb. “Set it, and forget it!” If you haven’t heard this phrase at least a hundred times then you have not watched TV in the U.S. within the last ten years or so.

2. RHEL and SLED are acronyms, as discussed in my post , On Three Letter Acronyms (TLA’s) and IBM-Speak.

3. Christian was the gatekeeper on what went into RH Linux. I got his phone number from someone in Raleigh, NC, who worked at RTP. RTP was just down the road from RH headquarters, and the IBMers active in Linux, such as Bill Stoddard’s Apache team, spoke frequently with their kindred spirits at RH.

4. LinuxWorld (LW)was for many years the main Linux-related conference, the nicest part being the “open-source pavilion” where all the techies would hang around. For example, I first met Daniel Robbins, creator of the Gentoo Linux distribution, and Klaus Knopper, creator of Knoppix, at LW’s in New York. LW is now mainly for the folks in suits and you see fewer open-source folks, though you can a video interview of me and some of them taped in the open-source pavilion at the LW in Boston in April, 2006; see Me Tube.

5. I recall adding that line to the Jikes code back in 1998. We had earned it, and as I typed it in I wondered how many machines would contain that string in the years ahead. Since Jikes was part of RedHat for several years, and can today is still part of SuSe, Debian, Ubuntu, and various BSD’s, the count must by now run at least into the hundreds of thousands.

2 Comments

  1. Posted September 24, 2007 at 18:00 | Permalink

    two alternatives to apt-get:
    1) there’s at least one available for rpm-based systems – I’m not sure if it’s still called apt-get or not
    2) aptitude is a good improvement over apt-get for many cases

    As to using repositories from a mix of providers, your mileage will vary. Some mixtures will be more incompatible than others. And while some may work fine, their “vetting” may be sub-standard; the Skype deb package, for example, doesn’t contain a real changelog.

    Of course there are a number of groups for whom your recipe doesn’t really apply. My development team really needs to be working from source archives, so our support group can have a solid trail back to how our software was built. I guess my main point here is that sometimes it’s hard to know which audience any given blogger is writing to.

    On a final note – thanks for Jikes! I haven’t needed it lately, but when I did, it was really great to have.

    Regards,

    -james.

  2. Posted September 28, 2007 at 05:04 | Permalink

    Vendor-specific repos are a bit of a pain, as the vendors don’t get to take part in the QA processes of a distribution, meaning that they don’t have input into how the dependencies evolve, leading to the typical problem of broken dependencies for packages from third-party repos.

    That’s, of course, just one further problem with proprietary software in general, so it does not really matter for most of us using free software. If you are a vendor making open source software, though, you’d be better off working in the context of a distribution to make sure your software is readily available, though, rather than setting up a separate repository.


One Trackback/Pingback

  1. [...] Wayward’s author ← Dave Shields On Package Management: Apt-Get It or For-get It [...]

Post a Comment

Required fields are marked *
*
*

  • Pages

  • September 2007
    M T W T F S S
    « Aug   Oct »
     12
    3456789
    10111213141516
    17181920212223
    24252627282930
  • RSS The Wayward Word Press

  • Recent Comments

    daveshields on SNOBOL4 for Linux
    Walter Rutherford on SNOBOL4 for Linux
    David Plummer on SNOBOL4 for Linux
    David Plummer on SNOBOL4 for Linux
    Thomas A Naegele on SNOBOL4 for Linux
  • Archives

  • Blog Stats

  • Top Posts

  • Top Rated

  • Recent Posts

  • Archives

  • Top Rated

  • %d bloggers like this: