Archive for the ‘Python’ category

MacTech Conference 2013

November 5, 2013

MacTech_Conference_2013-Gradient-logo-200x073My colleague, Matt Schnittker, and I will be leading a workshop on “Python for Systems Administrators” on Wednesday at MacTech Conference 2013.

If you are planning on participating in the workshop, please visit here first to get your class materials:

Hope to see you there!


October 22, 2013

If you’ve been using InstaDMG to create compiled modular deployment images, you may find it takes some work to get it to work with Mavericks.

Might I suggest a look at AutoDMG?

Works great to build Mountain Lion and Mavericks modular images; comes with a GUI(!) but usable from the command-line as well if you want to automate it!

Congratulations to MagerValp (Per Olofsson) on an excellent tool. It’s still in early development, but is shaping up very quickly.

Mavericks day

October 22, 2013

Apple released OS X Mavericks today. What does that mean for some of your favorite open source tools?

The Munki preview release here is Mavericks-ready.

createOSXInstallPkg here supports packaging a Mavericks install.

And Reposado can replicate Apple Software Updates for Tiger through Mavericks.

Son of InstallLion.pkg

July 25, 2012

Mountain Lion imageLast fall, I released a set of tools I called “InstallLion.pkg”. The introductory post is here.

Now that Mountain Lion has been released, you may be wondering: “Can I use these tools to create a deployment package for Mountain Lion?” The answer is yes. InstallLion.pkg can be used to make an installer package for Mountain Lion.

But I have a better set of tools for you. Today I’m introducing createOSXinstallPkg. This tool can be used to create installer packages for Lion and Mountain Lion and features many improvements over the “InstallLion.pkg” tools.

The first improvement: it’s much easier to use createOSXinstallPkg to create installer packages. With the old tools, you had to run one or two scripts — one to download an “IncompatibleAppList” package, and one to customize the InstallESD.dmg if you wanted to install additional packages along with the OS X install. And then you had to manually assemble the package, copying several components into the right places within a template package.

With createOSXinstallPkg, it’s as easy as:

sudo ./createOSXinstallPkg --source /Applications/Install\ OS\ X\ Mountain\

to create a basic uncustomized package that installs Mountain Lion.

But wait! There’s more!


New Munki tools

April 20, 2012

A new release candidate of the Munki tools is available here:

Fixing packages with expired signatures

March 24, 2012

In my previous post, I provided a tool to enable you to check your collection(s) of packages to determine if any are affected by the Package Apocalypse.

But what to do once you’ve found packages with expired signatures? If Apple has provided an updated replacement package at, it’s probably best to replace the package with the expired signature with the updated one.

But that might not always be possible — Apple has not provided replacements for every package that has been affected, or the replacement might not be practical to use.

Package Apocalypse

March 24, 2012

Earlier this week a certificate Apple had used to sign flat packages over the last couple of years or so expired. This caused Apple to have to reissue a lot of update packages. This greatly affected sites running an Apple software update server, either Apple’s flavor, or the open-source Reposado replacement. See for more info on how this affects Software Update.

This also affects some update packages you might have downloaded from If they are flat packages, it’s possible they may also be signed with an expired certificate. Such packages can be manually installed – will display a warning, but you can choose to ignore the warning and proceed.

But if you have a mechanism that uses Apple’s command-line installer tool, these packages will fail to install. This will affect popular tools like InstaDMG, DeployStudio, Apple’s System Image Utility, and any software distribution mechanism that makes use of the command-line installer tool. Some examples include Munki, Casper, and AbsoluteManage.

Worse, this problem affects at least one software package originally distributed on DVD: iLife ’11. If you’ve imported the packages for iLife ’11 into your software distribution mechanism, they may now fail to install because of the expired certificate.

I am working on a tool to fix affected packages. (UPDATE: see this post.) But in the meantime, if you want to get an idea of how many packages you have that are affected by this issue, you might want to make use of a tool I wrote. It will scan a directory of packages or disk images containing packages and print information on any packages with bad or expired certificates.

Get it here.

The tool relies on a pkgutil option introduced in Lion, so you’ll need to run this on Lion!

An example of in use:

./ /Volumes/LaCie/InstaDMG/pkgs-10.6.8/

/Volumes/LaCie/SIU/Snow Leopard/pkgs-10.6.8/Install iTunes.pkg:
Package "Install iTunes":
Status: signed by a certificate that has since expired
/Volumes/LaCie/SIU/Snow Leopard/pkgs-10.6.8/JavaForMacOSX10.6Update4.pkg:
Package "JavaForMacOSX10.6Update4.pkg":
Status: signed by a certificate that has since expired
/Volumes/LaCie/SIU/Snow Leopard/pkgs-10.6.8/MacOSXUpdCombo10.6.8.pkg:
Package "MacOSXUpdCombo10.6.8.pkg":
Status: signed by a certificate that has since expired

Use this tool to scan any collection of packages you have to see which are affected by this issue. If a replacement package is available from Apple, you should replace it. If there is no replacement, there is hope. Keep checking back here for an update soon.

Xcode 4 Cocoa-Python Templates

March 15, 2012

I’ve developed a few applications using PyObjC — a bridge between Python and Apple’s Objective-C frameworks. Using Xcode 3 and some file and project templates, it was possible to use Interface Builder to create your user interface, and use Python and the PyObjC bridge to write the logic of your application.

With the release of Xcode 4, it seemed that PyObjC (or Cocoa-Python) development was not supported. Several discussions on the internet seemed to indicate that the Xcode-Interface Builder integration with Python was missing from Xcode 4, so I stayed away from Xcode 4.

With the move to Lion, avoiding Xcode 4 was no longer an option. I opened one of my PyObjC projects in Xcode 4.3, and found that Xcode/Interface Builder integration worked as I expected — I could bind UI objects to Python code as expected. So working on existing projects using Xcode 4.3 seemed to be no problem.

But starting a new PyObjC project was difficult. Xcode 3 had some project templates for creating “Cocoa-Python” applications and file templates for Python subclasses of certain NSObjects. Later versions of Xcode 3 did not include these templates, but you could download them and install them yourself. See for details.

Xcode 4 changed the format of file and project templates, and the downloadable Cocoa-Python templates for Xcode 3 do not work with Xcode 4. I looked around for updated templates, but didn’t find any online. So I decided to try to make my own…

The result is available here:

Hope these are useful to someone else!

Introduction to Munki

July 29, 2011

Munki is an open-source software deployment system for Mac OS X released by Walt Disney Animation Studios.

My series of MacTech articles on Munki are available in MacTech’s online archive:

MacTech Conference 2010

August 13, 2010

I’ll be attending and presenting at the MacTech Conference, this November in Los Angeles:

I’ll be talking about Munki, an open-source system for managing software installs and removals on Mac OS X. I haven’t talked about Munki much, if at all, here, but that’s likely to change soon.


Get every new post delivered to your Inbox.

Join 170 other followers