Cowell Computer Consulting

Create Packages for OSX using snapshots

Posted by Luke Cowell on December 14, 2007 at 09:17 AM

If your an administer for an OS X network, you probably know how much time can be saved by creating a package (.pkg) installation versus manually installing the software on each workstation. Many pieces of software use old or proprietary installers vs. packages, so building a package can take a little patience. That was the wind up, here's the pitch.

Building packages just got a lot easier with the snapshot feature in the newest version of packagemaker. Start the snapshot recording by choosing 'Add Snapshot Package...', run your installation procedure of whatever software you want to make into a package, and when you stop it will show you what files have changed.

snapshotstart

How is this magic done ? Spotlight keeps track of which files to reindex by adding hooks to all the low level write functions on the disk. You update or create a file and the OS knows that it needs to be reindexed. There's now a public framework called fsvents that keeps track of all file operations. So, all packagemaker needs to do is hook into that for the duration of the install.

(This is also how timemachine knows which files to back up on your computer without scanning your whole disk)

Check outArs technica for a more detailed explanation about how fseventsd. http://arstechnica.com/reviews/os/mac-os-x-10-5.ars/7

Once the snapshot is generated you have a chance to choose which files you want to include in the snapshot. Remember that files besides the installer will change during the period of the install. For example logs will be updated, but you definitely don't want to include those.

snapshotselect

That's it. Much easier than manually collecting those files.

Hierarchy: previous, next

Comments

There are 0 comments on this post. Post yours →

Post a comment

Required fields in bold.