Using autopkg for “general purpose” packaging

A few days ago I made a simple tool for building packages available: munkipkg.

I got many comments and suggestions for additional features and all sorts of cool additions. Some have even been added to the tool already. But I would like to keep munkipkg a pretty simple, basic tool.

The Luggage ( has been around for a while; if munkipkg is too simple for your needs, please have look at that.

I also suggested to several people that if they had more complex needs than munkipkg could handle, it might make more sense to use autopkg, which supports very complex, customizable workflows.

I could tell by the awkward silence that my suggestion was confusing to some — that they had trouble grokking how to use autopkg to build packages “from scratch”, using files and scripts on the local disk.

So I created a GitHub repo demonstrating how to use autopkg in this manner. It’s here:

munkipkg comes with three demo package projects. Two of the packages install files, the third is a “payload-free” package that simply runs a script when installed. The autopkg-packaging-demo duplicates these packages, but uses autopkg to build them instead of munkipkg.

(One could also imagine building these packages using either tool: the payload and scripts directories would be the same — in other words, you could have both a build-info.plist for munkipkg and a recipe for autopkg in the same package project directory.)

Assuming you have autopkg installed, you can `git clone` the repo, or download and expand the zip file, and run the autopkg recipes within.

I hope this clears up some confusion, and sparks some new ideas!

Using autopkg for “general purpose” packaging

Introducing munkipkg

munkipkg is a simple tool for building packages in a consistent, repeatable manner from source files and scripts in a project directory.

Files, scripts, and metadata are stored in a way that is easy to track and manage using a version control system like git.

Another tool that solves a similar problem is Joe Block’s The Luggage ( If you are happily using The Luggage, you can probably safely ignore this tool.

Though this tool may eventually be added to the set of tools installed with the Munki command-line tools, it’s not currently tied to Munki and can be run completely standalone.

Learn more here.

Introducing munkipkg

Introducing Imagr

The prolific Graham Gilbert is working on a new tool:

Imagr is an application designed to be run from a NetInstall environment. It is able to restore a disk image and install packages on a target volume.

Though Graham claims it is not intended to be a replacement for DeployStudio, I think in time it could very well be exactly that, at least for many people/organizations.

Some exciting things about Imagr:

  • It is open source! DeployStudio is free, but the source is closed. Open source means you can look at the code and see what it is doing. You can fix bugs and perhaps even help add features to the product.
  • It’s written in Cocoa-Python, with much of the “interesting” tasks in Python — a language many OS X admins are familiar with.
  • And most importantly: it does not require a specialized server: it can work with any plain-old web server. This means that you (potentially) can eliminate the last OS X device in your server room/data center. Almost every service of interest to OS X admins can be run on platforms other than OS X with the huge exception of a DeployStudio server. If Imagr can meet your imaging/machine build needs, you can finally get rid of that poor Mac mini sitting on a shelf in the server room.

Graham has posted detailed instructions on how to build a NetBoot image that contains Imagr. But if you just want to take a look and play with the tool, and you have an existing DeployStudio NBI with Python support included, you can play with Imagr without needing to build a new NBI. More importantly, you can test new versions (or work on the code yourself and test new versions you build) without having to build a new NBI each time.

Continue reading “Introducing Imagr”

Introducing Imagr