Software Update:MAR: Difference between revisions

m
No edit summary
m (→‎MAR extraction tools:: Updating URL)
Line 108: Line 108:
This question was given a fair amount of consideration.  Ultimately, we decided to go with a custom file format because using libjar would have required a fair bit of hacking.  Writing custom code was a simpler option, and it resulted in less code (mar_read.c is less than 300 lines of code).  Moreover, the update system does not need a standard file format.  The elements stored in the archive are bzip2 compressed binary diffs, generated using a variation of bsdiff.  So, being able to unpack the archive file using standard tools wouldn't be very useful in and of itself.
This question was given a fair amount of consideration.  Ultimately, we decided to go with a custom file format because using libjar would have required a fair bit of hacking.  Writing custom code was a simpler option, and it resulted in less code (mar_read.c is less than 300 lines of code).  Moreover, the update system does not need a standard file format.  The elements stored in the archive are bzip2 compressed binary diffs, generated using a variation of bsdiff.  So, being able to unpack the archive file using standard tools wouldn't be very useful in and of itself.


== MAR extraction tools: ==
== MAR extraction tools ==
There’s 2 different python scripts:
There’s 2 different python scripts:
* http://hg.mozilla.org/build/tools/file/b77b517eab66/buildfarm/utils/mar.py
* http://hg.mozilla.org/build/tools/file/b77b517eab66/buildfarm/utils/mar.py
* https://github.com/catlee/build-mar
* https://github.com/mozilla/build-mar
Note:  
Note:  
* The latter is more recent, but has more dependencies.
* The latter is more recent, but has more dependencies.
* The former works just fine for extracting files
* The former works just fine for extracting files
** to use the former: cd tmp_dir; mar.py -x ../foo.mar
** to use the former: cd tmp_dir; mar.py -x ../foo.mar
Confirmed users
2,456

edits