2009-03-13

New disk image tests

I got permission to release the changes I've made at work to the run_image_tests.py disk image test framework that Nigel Kersten originally wrote (thanks Chris, for pushing them into svn for me) along with a bunch of example tests you can use. These are all the tests I use at work every time I make a new master disk image that are generic enough the be useful to others.

I don't bother to manually test any images that don't pass all of the unit tests first.

You can find them at the pymacadmin project site at Google Code.

All the unit tests descend from macdmgtest.DMGUnitTest. DMGUnitTest provides some handy utility functions that convert paths relative to / to the path relative to the mounted dmg you're testing.

dmgtestutilities.py provides some more convenience functions - there are functions to lint plists and load plists using Foundation so plistlib doesn't crap out when you try to load a binary plist.

Example tests:
applications_dir_test.py:
Ensures all applications in /Applications and /Applications/Utilities have sane ownership/permissions.

blacklist_test.py:
Confirms the absence of files in your blacklist. I mainly use this to confirm that various settings files that would contain information specific to the hardware model I ran InstaDMG on don't end up on my master images.

empty_directory_test.py:
Confirms that directories that you want to be empty on the generated image, actually are.

network_plist_test.py:
Confirms the absence of various network preference files. This prevents a problem we ran into when booting MacBook Airs from an image created on a machine that has built-in ethernet.

ouradmin_test.py:
Ensures that there's a local admin user on the image named ouradmin, and that it's a member of the admin, _lpadmin and _appserveradm groups. Also lints the appropriate plist files in /var/db/dslocal/nodes/Default to detect if your user creation package corrupted them.

skipsetup_test.py:
Makes sure the appropriate files have been touched on the image to prevent a newly imaged machine from playing the annoying welcome movie.

software_update_test.py:
If you're using a local software update server in your environment, you can use this to make sure the dmg has the correct settings to use it instead of the standard Apple servers.

zz_plint_test.py:
Lints every plist on the dmg and displays a list of any files that failed their lint check.

zz_suidguid_test.py:
Finds every suid/setguid file on the dmg and reports any that aren't in your whitelist. Handy for detecting crappy installers.

zz_world_writable_test.py:
Finds every file or directory that is world writable and reports any that aren't in your whitelist. Also useful for detecting poorly written installers.

I've also included the whitelists and blacklists I'm using for these tests for you to use as a base to customize your own, though I'd appreciate it if you'd email any additions you think are useful.

2008-11-13

Photo of another solar system

Discover has an article about the first photo of another solar system. Not just a planet, multiple planets. Way cool.

Thanks to my friend Morf for the heads up.

2008-10-14

New MacBook and MacBookPros

So, new hardware. On the pro side, the hard drive is no longer an ordeal to swap out, which is great for those of us in the enterprise. On the down side, no more target disk mode, which was always one of the great things about working on Macs.

More later once I've had a chance to use one for a couple of days.

2008-10-08

Thin 1.0 is out

Marc André Cournoyer announced the release of Thin 1.0 on his blog last week.

2008-10-07

Updating gem to 1.3 on OS X Leopard

wincent.com has a clear set of instructions on how to deal with errors updating gem to 1.3.0 on OS X.

2008-09-28

Negadon and Miroku

If you're a fan of Godzilla and/or giant robot movies, you'll like this. All the feel of the 60s movies, but done with CGI.

Negadon and Miroku.

2008-06-17

Run Ruby Script Automator Action

Jason Foreman published an Automator action that allows you to take advantage of Cocoa in Ruby scripts on his blog.

2008-05-04

New Blog

My friend Jack is, among other things, a technical author. He's just set up a new site for his technology writing at http://jackherrington.com.

His latest book is on Flex, and is being published by O'Reilly. More details at his blog.

2008-04-02

Tracks

Tracks is a GPL Rails application to help implement David Allen's "Getting Things Done".

I've installed it on my MBP and it looks great so far. You can tag tasks (and view only tasks for one tag), set up contexts such as work/home/misc and then view things grouped by context, set due dates, set tasks to only be visible after a certain date, view graphs and statistics about how long it takes you to complete tasks, comes with an API so you can write your own scripts to interact with it - it's very comprehensive.

Gem 1.1 released

Bug fixes, speedups. More details on Eric Hodel's blog. Update with
sudo gem update --system

Creative Commons License

This work is licensed under a Creative Commons License.
Copyright 2007-2010, Joseph P. Block, Some Rights Reserved.

Creative Commons Logo