Software Update:HowToManuallyGenerateMARFiles: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 7: Line 7:
== Getting set up ==
== Getting set up ==


* scripts live in [http://mxr.mozilla.org/mozilla-release/source/tools/update-packaging/ mozilla/tools/update-packaging]
* scripts live in <code>[http://mxr.mozilla.org/mozilla-release/source/tools/update-packaging/ mozilla/tools/update-packaging]</code>
* will need mbsdiff.exe (source in [http://mxr.mozilla.org/mozilla-release/source/other-licenses/bsdiff/ mozilla/other-licenses/bsdiff]) and mar.exe (source in [http://mxr.mozilla.org/mozilla-release/source/modules/libmar/tool/ mozilla/modules/libmar/tool]) in your path
* will need <code>mbsdiff.exe</code> and <code>mar.exe</code> in your path
* get a mar to start with as your "source", for example http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/firefox-3.0a2pre.en-US.win32.complete.mar
** sources in <code>[http://mxr.mozilla.org/mozilla-release/source/other-licenses/bsdiff/ mozilla/other-licenses/bsdiff]</code> and <code>[http://mxr.mozilla.org/mozilla-release/source/modules/libmar/tool/ mozilla/modules/libmar/tool]</code>
** compiled versions are available in the [https://developer.mozilla.org/en/Gecko_SDK Gecko SDK] under the folder <code>/host/bin</code> for your OS
* get a mar to start with as your "source", for example <code>[http://releases.mozilla.org/pub/mozilla.org/firefox/releases/10.0/update/win32/en-US/firefox-10.0.complete.mar firefox-10.0.complete.mar]</code>


== Unwrap the original mar ==
== Unwrap the original mar ==

Revision as of 02:46, 10 February 2012

How To Manually Generate a MAR file

Here are some notes for generating your own partial and complete mars for testing purposes.

Important Note: this is is not how the official mars are created, this is just how (as a developer), you can generate mars for testing software update.

Getting set up

Unwrap the original mar

  • mkdir old && cd old && unwrap_full_update.pl firefox-3.0a2pre.en-US.win32.complete.mar
  • mkdir new && cd new && unwrap_full_update.pl firefox-3.0a2pre.en-US.win32.complete.mar

Make Changes

  • make changes to the files in the "new" directory.

Create the partial mar

  • ./make_incremental_update.sh partial.mar old new
  • for your update snippet, do:
  • ls -al partial.mar | awk '{print $5}'
  • md5sum partial.mar | awk '{print $1}'
<patch type="partial" URL="http://foo.bar.com/partial.mar" hashFunction="MD5" hashValue="5b2469c51c585eed802a1d9eb7e22f8c" size="785"/>

Create the complete mar

  • ./make_full_update.sh complete.mar new
  • for your update snippet, do:
  • ls -al complete.mar | awk '{print $5}'
  • md5sum complete.mar | awk '{print $1}'
<patch type="complete" URL="http://foo.bar.com/complete.mar" hashFunction="MD5" hashValue="8181bb3967aa4c04905e432d29aa5091" size="8258749"/>

Update Snippets

For more on update snippets, see Software_Update:HowToTestMajorUpdateUI