The Almost Offical Package Manager for Mac OS X

I recently watched the video of Mike McQuaid’s “Homebrew – The Good, the Bad, and the Ugly of OS X Packaging” talk from FOSDEM ’15 and it reminded me of the early days of package management for OS X.

Back then it was an exciting time. You had this new operating system from Apple with its roots coming from NeXTSTEP and a surge of open source software being ported over to the new OS. And at the same time you had Gentoo coming into existence which had influence on how people thought package managers should function.

Once Mac OS X came out as a public beta and after the release of 10.0 (Cheetah) there wasn’t a package manager to make installing OSS any easier on OS X. This led to Fink and DarwinPorts (later renamed to MacPorts). The work of these projects gave the Mac community a set of tools that were missing in the OS.

Remember Apple was still using PowerPC processors; the announcement of the Intel transition wouldn’t come till five years later.

Late 2006 I started working on an article covering the package managers available for OS X, the Metapkg Alliance and a rumor I heard that Apple considered adopting one of the package manager projects as the official system for OS X. For a long time I had all of the emails and notes sitting around and then I wrote up a short blog post around the middle of 2009 to share them. After starting writing again I gave myself a clean slate and didn’t import any of the old material, but after watching McQuaid’s talk I thought it’s still worth sharing.

Shortly after the release of the Mac OS X public beta in 2000 Christoph Pfisterer started the Fink project giving OS X it’s first package management tool.

Two years later a number of Apple employees including Landon Fuller, Kevin Van Vechten, and Jordan Hubbard (co-founder of FreeBSD) created DarwinPorts (now MacPorts).

Gentoo was working on support for Mac OS X in their package manager called Portage. And then in 2003 DarwinPorts, Fink and Gentoo formed the MetaPkg Alliance as a way to share information on porting software to OS X. These three projects represented the majority of people working towards making packages for the Mac.

Around this time a rumor was floating around that Apple was set to announce that Fink would become the official package management system at the next WWDC. What prevented this was their reluctance of using anything licensed under the GPL.

Below are a few quotes from the various email exchanges I had with people from Fink, MacPorts, and Gentoo. They give what I think is a look into an interesting bit of history from the early Mac OS X community.

I suggest you talk to Landon Fuller. Metapkg was his personal project from the beginning and I don’t think anyone from OpenDarwin (or Apple) ever got involved at all. Landon would know the details - I was one of those who never got involved with it and probably have as many questions about it as you do!

– Jordan K. Hubbard, former director of engineering for Unix Technologies at Apple 10/24/2006

When Mac OS X was originally released, porting software to the platform was considerably more difficult than it was today. It was highly unlikely that any mildly complex piece of software would work without (extensive) patching, and MetaPkg was intended to provide a venue for sharing the load of that porting work between Fink, DarwinPorts, and Gentoo.

However, MetaPkg arrived just in time to solve a problem that was disappearing:

– Apple improved Mac OS X’s support for common APIs (e.g., dlsym, poll, nls, etc.)

– As the UNIX Mac OS X developer community grew, projects were ported to the platform by the upstream developers, and fewer changes were required.

Simply put, the success of Mac OS X, and porting software to Mac OS X, quickly obsolesced the cooperative project. Good news, really.

– Landon Fuller, former Apple BSD Technology Group engineer and MacPorts developer 10/26/2008

It has also helped that libtool’s support for OS X has greatly matured (thanks in large part to Peter O’Gorman, formerly a Fink core team member).

– David R. Morrison, Fink 10/25/2006

Wow… a looooong time ago. As I remember it, Apple decided to name one of the package formats/repositories the “official” format at WWDC, very shortly after metapkg was announced, which seemed to go against the entire spirit of the metapkg alliance.

Daniel Robbins, Gentoo Founder 10/22/2006

Was there any influence from Apple after the Alliance was announced to consolidate to one format or any other changes to have an “official” repository?

Not especially. Apple had been struggling with the packaging question long before Kevin Van Vechten, JKH, and I wrote DarwinPorts, and until Apple selected a single packaging format there was little room for them to push for an official repository. DarwinPorts (now MacPorts) has never solved the packaging format question, though we did implement support for a variety of formats everything from rpm, to dpkg, to Apple’s .pkg.

– Landon Fuller 10/28/2006

We got an email from some guy at Apple telling us that one of the package formats was going to be declared officially supported by Apple at WWDC. My impression was that Apple didn’t want more than one package format/package repository to succeed on OS X and weeks after metapkg was launched tried to do some preemptive selection of format via announcement at WWDC that chose one format to be “official” and “blessed.”

– Daniel Robbins 10/22/2006

There were indications that Apple was seriously considering adopting one of the open source package management tools as the official one. (I don’t remember the timing too well, but it may have been right around the time that Metapkg started.)

– David R. Morrison 10/25/2006

Well, Apple never ended up doing anything about package management… The closest they came was creating dports, and it actually made it into one of the seeds of panther, but was quietly removed again, and as we all know by this point, opendarwin and dports got pretty much ignored except by the few people on the BSD team that spent their own time on it.

I’ve heard some rumors of RPM support in leopard server but hadn’t looked into it. I helped out on the early dports RPM-binary-generation port, RPM works pretty well on OS X and has the advantage of having an architecture designed for platform “variants” that should work reasonably well with universal binaries, so it seems a plausible rumor, if not likely.

– Benjamin Reed, Project Admin Fink 10/25/2006

The most promising code to come out of Apple in regards to a packaging format was Xar, originally written by Rob Braun and contributed to heavily by Kevin Van Vechten, who was also a member of the BSD team at Apple, as well as the fellow responsible for the creation of the OpenDarwin project.

– Landon Fuller 10/28/2006 in Mac OS 10.5 started to use xarchives from xar for installing software which replaced the previous method of using gzipped pax files.

Metapkg post-date’s any official Apple discussions along the lines of package management, by the time we formed it, it was for our own edification—internal politics had made them punt “real” package management in OS X until some future release, and the team “won” for the time being. We mostly did metapkg to save ourselves some time, but it turned out to not really work out that way, so it fell by the wayside, and we all continued on as we had been.

– Benjamin Reed

In the end Apple’s focus on the consumer, the on-again, off-again criticism from the Open Source community for Apple’s lack of participation, and Apple’s eventual abandonment (again) of the server market created the environment where a project like Homebrew was needed.

The last quote from Benjamin Reed saying that the “ team won” clearly shows that the OSS side of package management wasn’t a priority. And I’m pretty sure that was a good thing. That lack of attention gave the development community the room to create the tools we wanted and needed. And I think unintentionally lead to the wide spread adoption of Mac’s and Mac OS X as the computers that most of the modern web was built on.