ReleaseEngineering/PuppetAgain/HowTo/Build DMGs: Difference between revisions
No edit summary |
|||
| Line 2: | Line 2: | ||
DMG's cannot be uninstalled. They are unversioned, with no notion of "ugprades". They do not handle any dependencies. But, they're what we have. | DMG's cannot be uninstalled. They are unversioned, with no notion of "ugprades". They do not handle any dependencies. But, they're what we have. | ||
They also don't, by default, do a good job of being compatible between major versions of OS X. So we generally build a DMG for a particular version on a host running that version. If we need the same DMG for multiple versions, it gets built multiple times. The builds generally use exactly the same shell script. | |||
= Requirements = | = Requirements = | ||
Revision as of 12:52, 18 June 2013
DMGs Stink
DMG's cannot be uninstalled. They are unversioned, with no notion of "ugprades". They do not handle any dependencies. But, they're what we have.
They also don't, by default, do a good job of being compatible between major versions of OS X. So we generally build a DMG for a particular version on a host running that version. If we need the same DMG for multiple versions, it gets built multiple times. The builds generally use exactly the same shell script.
Requirements
You'll need:
- bsdtar (should be on the system to begin with)
- gcc (from XCode)
- packagemaker (from the full XCode install)
Building A Package
There are shell scripts to build every custom DMG from the corresponding RPM sources, in hg. They are named $package-dmg.sh.
In a fresh new directory, get a copy of the corresponding src.rpm from http://puppetagain.pub.build.mozilla.org/data, and run
bsdtar -xf whatever.src.rpm
it should unpack a tarball, a spec file, and maybe some patches.
Now, run the dmg script:
sh -x *-dmg.sh
it should build the DMG and point you to it in the last line of output.
Building A Package That Depends On Another
This is pretty annoying. You need to find a temporary machine where you can install the first (depended-upon) package, that also has all of the requirements installed.
Installing a Package
You can install DMGs with
packages::pkgdmg {
pkgname:
version => "version";
}
note that the version *must* match exactly that given in the name of the DMG.