ReleaseEngineering/PuppetAgain/HowTo/Build DMGs

From MozillaWiki
Jump to navigation Jump to search

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.

Requirements

You'll need:

  • bsdtar
  • 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.