Revision as of 17:46, 28 March 2012

Camino only enables software updates for official builds produced by Camino tinderboxen and disables parts of the application’s software update infrastructure at build time in other builds. If you are a third-party builder, or a Camino developer managing a long-lived series of experimental builds, these instructions will help you enable software update in your builds.

Contents

Generating a DSA Key for Updates

You will need a DSA key to sign your updates and generate a hash to include in your appcast. To create a key for your updates, run the provided sparkle/generate_keys.rb script (see the Sparkle documentation for more on keys and signing).

WARNING: Flying monkeys will h4xx0r your users’ Macs if you make the private key public. Guard the keys with your life, and never mistake the public key (dsa_pub.pem) for the private one (which has no pub in its filename).

Application and Build Configuration

To build Camino with software update enabled, you must configure your build to export certain variables before running make -f client.mk:

In addition, you must replace the Camino Project DSA public key with your DSA public key. Before beginning your build, copy your DSA public key to resources/application/camino_dsa_pub.pem. WARNING: Flying monkeys will h4xx0r your users’ Macs if you make the private key public, so be sure to use the public key (dsa_pub.pem), not your private key.

Once the build is complete and your disk image is created (in $objdir/$arch/dist for the $objdir/$arch where you ran make -C camino/installer), you will need to sign the disk image. Run the provided sparkle/sign_update.rb script, which will output a hash that your appcast requires.

Server Configuration

You must configure your server to provide a Camino appcast. The easiest way to do this is to provide a static appcast file that conforms to the output format of the Camino Project’s appcast script. This appcast should be served with an XML content-type; often the easiest way to do this is to give the file an .xml extension.

Note: If you are releasing multiple series of builds (for example, branch releases and trunk milestones), you should configure each branch with a separate appcast URL when building.

You should customize the <channel> portion of your appcast, as well as the <author> element in the <item> portion, to reflect your own build series and site.

When creating a new release, you should update the <item> portion of your appcast for your release.

Change the <title> to include the new version number and update the <pubDate>.

Update the the <description> as you see fit, remembering to escape any entities.

Update the <enclosure> to match the new build, remembering to escape any entities.

url should contain the URL to your download (be sure to escape any literal ampersands in the URL).

length is the size, in bytes, of your disk image.

sparkle:version is the CFBundleVersion of your build; this can be found in the Info.plist of your final Camino binary.

sparkle:shortVersionString is the CFBundleShortVersionString of your build; this, too, can be found in the Info.plist of your final Camino binary.

sparkle:dsaSignature is the update hash, the output of the sparkle/sign_update.rb script above.

Sample Appcast

This is the output of the Camino Project’s appcast script for an English-only Camino 2.0.1 build running on Mac OS X 10.5.8 on an Intel Mac.