Herewith the unexpurgated diary of my simultaneously rebuilding my Mac environment from scratch, and moving to Leopard. This is partly just for my own benefit, so I don’t forget the important steps, but may be of mild interest to others who carry a heavy OSS load on their Macs, and may prove a mildly useful in someone’s search results down the line.

Back Story · What happened was, I was installing Leopard on Black Beauty, my 13" MacBook, when the world ended. Apple dropped the ball. (WTF did I spend Sun’s money on AppleCare for?) So I went over to NCIX and picked up a 160G 7200RPM Seagate. Nice place, NCIX; I’d go back.

Hardware · It turns out that replacing a MacBook disk drive is a doddle; it took me like ten minutes end-to-end, and I’m no hardware wizard. So if anyone is finding their disk filling up, go ahead and upgrade yourself, it’s a snap. It’s a really elegant piece of design in there.

What to Restore · In the interim, I’d stitched my life back together on my old 15" PowerBook, which felt heavy and klunky and slow and was totally useless with Adobe Lightroom. Once I’d got the MacBook pieced back together, and OS X installed, I could have FireWire’d ’em together and replicated one onto the other with Migration Assistant. But I decided not to; I’d replicated each of my Macs onto the next, dating back to 2003, and whereas my home directory is reasonably clean, the system was cluttered up with all sorts of stuff I’d installed and wasn’t using, or semi-uninstalled. Also, my open-source ecosystem was a witches’ brew of Fink and DarwinPorts and hand-built stuff in /usr/local. Half the time I had no idea what instance of Perl or Ruby or ImageMagick or whatever was actually being used. And furthermore, I knew that a lot of that code was probably PowerPC binaries running through Rosetta.

So, I decided to bring over just my home directory from the PowerBook and rebuild my OSS environment from scratch.

Installer Can’t See New Disk · The only glitch with installing Leopard was that after booting from the CD, the installer couldn’t see my new disk. Fortunately, the installer has a “Disk Utility”, and it could see that Seagate 148G (Huh!? I paid for 160!) disk. Unfortunately, it didn’t have a “Format” button. Fortunately, it did have an “Erase” button, which gets you a standard Format-this-disk menu. I guess some Human-Factors genius at Apple decided that the pain avoided by people not realizing that formatting a disk erases it as a side-effect was greater than the pain experienced by people who can’t find the “Format” button.

Anyhow, formatting the disk took just a few seconds.

Copying Over with Migration Assistant · I was assuming I’d just plug the old PowerBook into the MacBook and boot in FireWire-disk mode (hold down the “T” key at power-on), and use tar or something to get my data.

But it turns out that Migration Assistant is actually pretty flexible, it was happy to copy over my data and a few system settings, like networks and sharing, without taking any of the other System stuff.

There was one fly in the ointment. I got everything plugged in, logged in, fired up Migration Assistant, it looked at the new disk and said “Sure, I can copy over Tim Bray, but there’s already an account of that name here.” It gave me a few options: choose a new name, restore somewhere else, and what I really wanted, just overwrite the existing Tim Bray. But that was greyed out, without any indication of why. I decided that it might be a problem that I was currently logged in as myself, so I created another account named “Backup” with admin privileges, logged into that, and then everything went fine. It took two or three hours to bring over my fifty-odd gig of data.

Compilers and Build Tools · If you want to do anything with software, you’ll need compilers and linkers and libraries and so on. To get them, after you’ve installed Leopard you have to look in the “Extra Software” folder on the install DVD and install something called “Xcode Tools”.

Leopard Has More Stuff · On previous releases of OS X, the built-in versions of Perl and Ruby and so on were pathetically out-of-date, so I’d been building them from source. Leopard comes with Ruby 1.8.6 and Perl 5.8.8; on impulse I typed “cpan” at the shell and, wonder of wonders, there was a nice cpan> prompt looking at me. Hey, it has gem too.

Fink or MacPorts? · One should be enough. I poked around and there’s not a slam-dunk winner, but more people seemed to be leaning to MacPorts, so I went that way. So I went there and installed ImageMagick, aspell, and aspell-dict-en, no fuss, no muss, but no hurry either. The amount of code that MacPorts has to assemble to build ImageMagick in particular is mind-boggling.

The mantras you need to learn to install any particular “fooball” are as follows. First, find out what packages there are:

port list | grep -i fooball

Next, install:

sudo port install fooball-v5

You’re done, but you do have to munge your path to know about /opt/local/bin.

MySQL · I noticed that the MySQL Downloads Page has a nice .dmg with two packages; one for MySQL itself and another to set up auto-start on boot. Cool.

That doesn’t give you libraries though, so if you try to install DBD::mysql, it’ll whine. For that to work, I had to go get a .tar.gz from opensource.apple.com and do the ./configure/make dance.

Distant Laughter · Do you hear it? That’d be Mark Pilgrim laughing at me for being such a fuckwit as to not be on Ubuntu, on which basically none of this work is necessary.

OSS Extras · I went and got NeoOffice and NetBeans from their respective homes, and that, I think, is all the OSS I need.

Hey, Adobe · I needed to get Lightroom again. I poked around in my mail archives and found the original mail from Adobe from when I bought it back in March; the download link still worked, and my serial number was right there, so I had Lightroom up and running in no time. Imagine, commercial software that’s almost as convenient as Open Source! What a concept.

Happy Ending · With the new disk, I have 74G free... wow! And the reconstituted MacBook is really a lot faster than both the PowerBook and than it used to be, pre-rebuild. There’s no way to tell what combination of Leopard and the faster disk and the cleaned-up OSS ecosystem produced this result, but I’m enjoying it.



Contributions

Comment feed for ongoing:Comments feed

From: Jesper (Dec 06 2007, at 12:08)

It's possible that you could install a MacPorts port of MySQL and get API hooks without compiling. MacPorts offers "variants" for ports, but none jump out at me as "has extra API hooks". However, both a "devel" version of mysql as well as several bindings packages show up in the Big List when you grep mysql.

This would bringing the experience closer to what Mark Pilgrim says Ubuntu has, minus the graphical package manager. (Seriously, did anyone think that port package software on Mac OS X, of all platforms, wouldn't come with a graphical package manager?)

[link]

From: Bart Schuller (Dec 06 2007, at 13:31)

"port list | grep -i fooball" is better written as "port search fooball". If only it searched the long descriptions as well, like "apt-cache search" does...

[link]

From: Pedro Melo (Dec 06 2007, at 14:16)

I'm intrigued, I've installed the MySQL package from http://dev.mysql.com/ and the libraries required to compile DBD::mysql are there in /usr/local/mysql/lib.

I'm still on 10.4.x so maybe thats the difference...

Best regards,

[link]

From: John Cowan (Dec 06 2007, at 14:24)

OS X told you you have 148*1024^3 = 158,913,789,952 bytes available, near enough to the 160,000,000,000 bytes you bought. The remaining 10,86,210,048 bytes were consumed by formatting, the bulk of them as i-nodes or the Mac equivalent thereof.

[link]

From: Mark (Dec 06 2007, at 21:01)

Oh, don't feel bad. I got a new box this week (long story, involves a birthday present and a convoluted chain of hand-me-downs) and had to compile a custom kernel because Debian only had packages for 2.6.22 and the (on-board! Intel!) sound wasn't supported until 2.6.23. You may now commence pointing and giggling. Mind you, this was hours -- mere hours, damn it -- before 2.6.23 packages started showing up in unstable. All computers suck. But at least now I can get watch full HD 1920x1080 H.264-encoded video... with sound! Not that there's any HD content I can legally watch on Linux. I'm just saying, theoretically, if there were some, it wouldn't be silent.

[link]

From: paul (Dec 06 2007, at 23:17)

There are a couple of graphical package managers for MacPorts, but I have never found them useful or necessary. As long as all those ^&*(ing dependencies are managed, I couldn't care less about how it's all presented.

[link]

From: Asbjørn Ulsberg (Dec 07 2007, at 03:51)

Congratulations on your new disk and freshly installed MacBook! I'd put most money on that the 1.800 extra RPM (or is it 2.700? Depends on how fast the burnt disk was) is the most significant contributor to the speed enhancement you're experiencing. I've also heard 10.5 uses more memory and less CPU than 10.4, so that might also contribute a bit, plus having less trash everywhere helps too, of course.

[link]

From: dave (Dec 07 2007, at 05:42)

I've not yet upgraded to Leopard, and I'm not really a big word processor but I'd be intrigued to know how a NeoOffice user gets on with Leopard TextEdit.

I'd imagine the system-wide spell- and grammar-checking, ODF support, EMACS shortcuts, apple script-ability and general spit and polish improvements could well add up to something special (assuming it all works as advertised)

http://www.apple.com/macosx/features/300.html#textedit

[link]

From: James Shepherd (Dec 16 2007, at 01:31)

After my second hard disk failure, dvd failure, battery failure, and 2 memory module failures, I have been forced to ditch the macbook.

Not happy at all about this, as I am self-funding at the moment so I can't really afford it, but I can't afford to keep replacing hardware either, so there comes a point...

After buying a desktop and installing linux my productivity is up by 5 times, maybe more. It's difficult to know if you are just making excuses for yourself, or something like this is really holding you back. Seeing as apple owes me two months when I didn't have the macbook, I will take some convincing to buy apple again.

On the other hand, I'm typing this on a gentoo linux install on the macbook. I get occasional file system corruptions, which I have never got on ext3 before, but apart from that it's pretty good - and has Java6. For occasional use this macbook is reliable enough.

I'm tempted to release a 'macbook live cd' for other troubled souls.

[link]

From: Grurp (Dec 19 2007, at 00:15)

Bart Schuller you can search the long description under MacPorts. The magic incantation is "port search long_description".

There are also a bunch of other things/types you can search for. One example is: to list all of the ports that have the variant "foo" you would type "port search variant:foo". To get a list of more "pseudo-portnames" (what the "long_description" and "variant" strings are called) along with some other helpfull information type "port help".

[link]

author · Dad · software · colophon · rights
picture of the day
December 06, 2007
· Technology (85 fragments)
· · Mac OS X (118 more)

By .

The opinions expressed here
are my own, and no other party
necessarily agrees with them.

A full disclosure of my
professional interests is
on the author page.