Development:Providing Software Update for Third-Party Camino Builds

From Camino Wiki
Revision as of 15:29, 12 April 2010 by Sardisson (talk | contribs) (initial version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.

Application and Build Configuration

To build Camino with software update enabled, you must configure your build to export certain variables:

While an https: URL is preferred, http: URLs will work, too.

In addition, you currently must manually paste your DSA public key into the Camino.app/Contents/Info.plist, replacing the existing value for the SUPublicDSAKey key. (In the future, we plan to move the key to a separate file inside the bundle, allowing you to simply replace the Camino Project key with your own key file.) To generate a key, run the provided sparkle/generate_keys.rb script (see the Sparkle documentation for more on keys and signing). Be sure to do this to the universal Camino before packaging (before running make -C camino/installer).

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

Configure your server to provide a Camino appcast. The easiest way to do this is to use the Camino Project’s own appcast script (tools/autoupdate/update-check) on your own server, though this requires your server to support perl and cgi scripts. As an alternative, you can provide a static appcast file that conforms to the output format of the Camino Project’s appcast script.

If you use the Camino Project’s appcast script, you will also need to provide update definition and update description files. Be sure to escape any entities in the update description/HTML portion of the appcast.

If you use the Camino Project’s appcast script, you should change the script to output the correct values for the <link> and <author> elements.

When creating a new release, you should update the Version, VersionString, FileURL, FileSignature (the output of the sparkle/sign_update.rb script above), and FileSize (in bytes) values in the update definition file.

Sample Update Definition file

This is the update definition for the Camino 2.0.2 English-only build (separates file are necessary if you have separate English and Multilingual builds).

Version = 2010.02.16
VersionString = 2.0.2
MinOSVersion = 10.4
Arch = ppc,x86
Intl = 0
FileURL = http://download.mozilla.org/?product=camino-2.0.2&os=osx&lang=en-US
FileSignature = MCwCFBHRB1s6R0jwf3V2P3lk0zh2B3OrAhQoKkN9upF3le9zQZrKTp1v8ZqhrQ==
FileSize = 16527557
Date = Tue, 23 Feb 2010 13:00:00 GMT-8

Sample Update Description file

This is the English update description for Camino 2.0.2 (this file can be localized).

<p>Camino 2.0.2 is a security and stability update for Camino 2.0.x. All users are urged to upgrade.</p>
<p>For details, see the <a href="http://caminobrowser.org/releases/2.0.2/">release notes</a>.</p>

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.

<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
  <channel>
    <title>Camino Updates</title>
    <link>http://caminobrowser.org</link>
    <description>Camino Updates</description>
    <language>en</language>
    <item>

      <title>Camino 2.0.2</title>
      <pubDate>Tue, 23 Feb 2010 13:00:00 GMT-8</pubDate>
      <author>The Camino Project</author>
      <description><![CDATA[
        <p>Camino 2.0.2 is a security and stability update for Camino 2.0.x. All users are urged to upgrade.</p>
<p>For details, see the <a href="http://caminobrowser.org/releases/2.0.2/">release notes</a>.</p>

      ]]></description>
      <link>http://caminobrowser.org</link>
      <enclosure url="http://download.mozilla.org/?product=camino-2.0.2&os=osx&lang=en-US" length="16527557" sparkle:version="2010.02.16" sparkle:shortVersionString="2.0.2" sparkle:dsaSignature="MCwCFBHRB1s6R0jwf3V2P3lk0zh2B3OrAhQoKkN9upF3le9zQZrKTp1v8ZqhrQ==" type="application/octet-stream"/>
    </item>

  </channel>
</rss>