ReleaseEngineering/PuppetAgain/HowTo/Build DMGs: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 5: Line 5:
= Requirements =
= Requirements =
You'll need:
You'll need:
* bsdtar
* bsdtar (should be on the system to begin with)
** rpm2cpio is an alternative (which is available as [http://my.opera.com/ruario/blog/2012/01/15/rpm2cpio a short shell script], paste it in place)
* gcc (from XCode)
* gcc (from XCode)
* packagemaker (from the full XCode install)
* packagemaker (from the full XCode install)

Revision as of 22:05, 13 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.

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.