n8blog
distraction in action

This took me waaaay too long to figure out. A while back I set up printer sharing (with browsing) on my Ubuntu-based server. My Mac (running Tiger at the time) found the server just fine and it all just worked — I couldn’t believe how simple it was! But then I upgraded to Leopard, and among the (numerous) casualties was the shared printer. No matter what I tried, what protocol I used, what driver I used, the shared printer just wouldn’t work. After hours of banging my head against the keyboard I let it go. About 9 months have passed, and today I decided to take one more swing at. Can you believe it? I found the problem! There were two problems really.

First, to access a shared printer on another machine, you have to turn on print sharing on your machine. This defies all logic, but there you go.

Second, for some utterly inscrutable reason Apple decided to *dis*able the CUPS browsing protocol, leaving only Bonjour browsing working. ???? Stupid. Stupid. Stupid. It’s as if they said “let’s make sure Mac users will have lots of trouble printing to Linux servers, that’ll improve our customer satisfaction!” To fix this lameness, do the following:

cupsctl BrowseProtocols='"cups dnssd"'

Combining these two tips, the shared printer finally appeared in the “Default” pane of the new printer dialog and printing to it just worked. Hopefully Apple makes this more sensible in Snow Leopard…

Oh Mama! Another Backup Bouncer post! You might think that I, the author of Backup Bouncer, the crusader for end-user verification of backup tools, would have run BB on Time Machine at some point. If so, you have seriously underestimated my laziness. But this morning I got an e-mail from a user asking for help testing TM with BB, and this finally spurred me to do the test myself.

Here’s how you test Time Machine with Backup Bouncer:

$ mkdir ~/bb
# We need to trick BB into thinking this is a volume it created
$ touch ~/bb/bbouncer-vol
$ sudo bbouncer create ~/bb
# Now do a Time Machine backup and wait till it's done
$ mv ~/bb ~/bb-orig
# Now restore the ~/bb directory from Time Machine.  
# Try not to catch SPACE MADNESS!!!
$ bbouncer verify -d ~/bb-orig ~/bb

On my Leopard 10.5.3 machine here’s what I get with BB 0.1.3:

Verifying:    basic-permissions ... ok (Critical)
Verifying:           timestamps ... ok (Critical)
Verifying:             symlinks ... ok (Critical)
Verifying:    symlink-ownership ... FAIL 
Verifying:            hardlinks ... FAIL (Important)
Verifying:       resource-forks ... 
   Sub-test:             on files ... ok (Critical)
   Sub-test:  on hardlinked files ... FAIL (Important)
Verifying:         finder-flags ... ok (Critical)
Verifying:         finder-locks ... ok 
Verifying:        creation-date ... ok 
Verifying:            bsd-flags ... FAIL 
Verifying:       extended-attrs ... 
   Sub-test:             on files ... ok (Important)
   Sub-test:       on directories ... ok (Important)
   Sub-test:          on symlinks ... ok 
Verifying: access-control-lists ... 
   Sub-test:             on files ... ok (Important)
   Sub-test:              on dirs ... ok (Important)
Verifying:                 fifo ... FAIL 
Verifying:              devices ... FAIL 
Verifying:          combo-tests ... 
   Sub-test:  xattrs + rsrc forks ... ok 
   Sub-test:     lots of metadata ... ok 

The only annoyance is that hardlinks aren’t preserved, but that’s not surprising considering the way hardlinks are used internally by TM to prevent wasted space. (I should point out that the hardlink failure here is not the same as the Apple rsync one I mentioned earlier today, and it’s not nearly as bad.) These results are not perfect but I would have no problem recommending TM backups to any less-than-hardcore user.

I just released Backup Bouncer 0.1.3. I’ve changed the output format to print the “priority” of a test along with its outcome, which hopefully should clear up some confusion among less experienced users. On a tip from Patrick Power I’ve added a new test that combines resource forks and hard links. Unfortunately, Apple’s rsync fails this test in OS X 10.5.3:

------------------ rsync-apple ------------------
Verifying:    basic-permissions ... ok (Critical)
Verifying:           timestamps ... ok (Critical)
Verifying:             symlinks ... ok (Critical)
Verifying:    symlink-ownership ... ok 
Verifying:            hardlinks ... ok (Important)
Verifying:       resource-forks ... 
   Sub-test:             on files ... ok (Critical)
   Sub-test:  on hardlinked files ... FAIL (Important)
Verifying:         finder-flags ... ok (Critical)
Verifying:         finder-locks ... FAIL 
Verifying:        creation-date ... FAIL 
Verifying:            bsd-flags ... ok 
Verifying:       extended-attrs ... 
   Sub-test:             on files ... ok (Important)
   Sub-test:       on directories ... ok (Important)
   Sub-test:          on symlinks ... FAIL 
Verifying: access-control-lists ... 
   Sub-test:             on files ... ok (Important)
   Sub-test:              on dirs ... ok (Important)
Verifying:                 fifo ... ok 
Verifying:              devices ... ok 
Verifying:          combo-tests ... 
   Sub-test:  xattrs + rsrc forks ... ok 
   Sub-test:     lots of metadata ... ok 

If you add a resource fork to a file that’s hardlinked to another file then only one of the files gets copied. :( This, no doubt, is due to the hackery involved to make HFS+ look like it has a real hardlinks when it actually doesn’t.

Some of the changes in BB 0.1.3 were a bit invasive and Bash is not the greatest of programming languages, so please keep your eyes open for bugs. If you see something in your results that doesn’t make sense just let me know.

A friend recently pointed out that BB gets some love on the Carbon Copy Cloner product page. This is quite satisfying to me, since my indirect goal with BB was to get it into the hands of the folks making the tools. The primary goal was always to let users validate backup tools on their own, but it was always clear that this would end up putting pressure on the tool makers. When a user comes to you and says, “your tool fails backup bouncer test foo,” you either pay attention or lose a customer. This is very empowering for end-users, but one can see how it has the potential to irritate tool developers if they disagree with BB’s test methodology.

Read the rest of this entry »

My Popcorn Hour PCH A-100 media streamer has a mipsel architecture, which led me to wonder, “what the heck does mipsel mean anyway?” As it turns out, the difference between mips and mipsel is that mips is big-endian and mipsel is little-endian. Mystery solved.

Wisdom from the mouth of Amaya on a trip to McDonalds (even latte-liberals need fast food every now and then), where she had a Happy Meal:

I think the grownup meal is called a Sad Meal. It’s sad because it doesn’t have a toy.

Mind you, she was completely serious about this statement and delivered it with a totally straight face. Had my mouth been full of soda it would have come shooting out of my nose for sure…

I just upgraded the blog to Wordpress 2.5.1. I did some testing, but please let me know if anything’s busted.

I just put up the latest release of QLColorCode, and it’s a doozy! Well, not really, but it does (probably) fix a crash bug that was biting me pretty frequently. It also adds some more miscellaneous language UTIs and lets you put a cap on the size of rendered files so you don’t accidentally render massive 50MB SQL dumps and such. All in all, it seems like this project has reached a stable point so I’ve gone ahead and called it version 1.0.

Get it at the goog.