The .pkg File Format Has an 8Gb Size Limit
I just spent the better part of a day trying to figure out why Composer (part of the Casper Suite) was failing to output a .pkg file. Composer is usually rock solid; it’s the best part of Casper Suite and the industry leader in OS X packaging. Stephan Sudre’s Packages is good too, but Composer has an ease-of-use and feature set that is unrivaled.
So when it failed to create my .pkg I was at a bit of a loss as to how to troubleshoot. I tried it on a 2nd and then a 3rd Mac. Three different OS’s, three different versions of Composer. All failed.
Then I tried Packages. It too failed. This pointed the finger at my contents. One of the files was an 8.7Gb .dmg that had been output by AutoDMG. I tried renaming the file. No go. Then, at the suggestion of JAMF support, I tried having Composer output a (Casper-specific*) .dmg instead of a .pkg.
That was it. Now everything pointed to .pkg not being able to handle the large file I was stuffing into it.
Persistent Googling yielded this obscure reference in the Munki documentation that .pkg files can’t be larger than 8Gb. Ok, that’s not exactly correct. The default max. size for a .pkg is 8Gb if no changes are made to the “distribution.dist” file. Thing is, most packaging tools don’t let you alter this value.
Why was this so hard to figure out? Because when you hit the limit, no error is generated. Neither Composer nor Packages knew they were failing. They simply output a .pkg that didn’t contain everything I’d instructed them to include. There were no logs to view, no clues to follow.
So keep your .pkg files below 8Gb, or, if the file is for use in Casper Suite (see below), use .dmg format. If you’re distributing operating systems, modularize to keep sizes smaller. Everyone will be happier.
* Composer-created .dmg files are of a JAMF-specific file format. They work in Casper Suite but not in any other utility that handles .dmg files. Have Composer output .pkg format if you need to interact with anything outside of Casper.