Software Update:HowToManuallyGenerateMARFiles

From MozillaWiki
Jump to: navigation, search

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



Get a mar to start with as your "source", for example firefox-10.0.complete.mar

Unwrap the original mar

mkdir old
cd old
perl ../ ../firefox-10.0.complete.mar
cd ..
cp -r old new

Make Changes

Make changes to the files in the "new" directory.

Create the partial mar

./ partial.mar old new

for your update snippet, do:

ls -al partial.mar | awk '{print $5}'
openssl dgst -sha512 partial.mar | awk '{print $2}'
<patch type="partial" URL="" hashFunction="SHA512" hashValue="e06fbd6c2989f83594dbee9c92dc6724965d0f5c99ce28091ff1a3e5b894de7e8d64ac1a99840c7b9f59b5cdd7592f6f46bf5e1b3ecaef2cc0d364e025e4c8bb" size="785"/>

Create the complete mar

./ complete.mar new

for your update snippet, do:

ls -al complete.mar | awk '{print $5}'
openssl dgst -sha512 complete.mar | awk '{print $2}'
<patch type="complete" URL="" hashFunction="SHA512" hashValue="b481cdb5a0e01aa8e5b419a455696650facebc269636591663e9d94bb0a300ad707f6626b98ae3bb738c0b75525e539b5659d933b4095cd913dfcf5f40dcad16" size="8258749"/>

Update Snippets

For more on update snippets, see Software_Update:HowToTestMajorUpdateUI