ReleaseEngineering/PuppetAgain/HowTo/Build DMGs

< ReleaseEngineering‎ | PuppetAgain‎ | HowTo
Revision as of 21:08, 19 July 2012 by Djmitche (talk | contribs) (Created page with "= 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. = Requirement...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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:

  • rpm2cpio (which is just a short shell script - you could copy/paste it from somewhere)
  • 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

rpm2cpio *.src.rpm | cpio -ivd

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.