Partnering/Repacks/Script: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 5: Line 5:
* a Mac with OSX. Part of the repack process involves creating DMGs, and unfortunately hdiutil is OSX-only. There are alternative methods to creating DMGs, but any we've found so far have been sub-optimal. If hdiutil isn't installed on your Mac, you'll need to grab Apple's Xcode.  
* a Mac with OSX. Part of the repack process involves creating DMGs, and unfortunately hdiutil is OSX-only. There are alternative methods to creating DMGs, but any we've found so far have been sub-optimal. If hdiutil isn't installed on your Mac, you'll need to grab Apple's Xcode.  


* [ http://www.python.org/ python 2.5] (needed for the subprocess module). It either needs to be the default python used on said mac, or you can run the script using "python2.5 partner-repacks.py ..."
* [ http://www.python.org/ python 2.7.5] (needed for the subprocess module). It either needs to be the default python used on said mac, or you can run the script using "python partner-repacks.py ..."


* pkg-dmg must be in PATH. This tool can be found [http://hg.mozilla.org/mozilla-central/file/tip/build/package/mac_osx/pkg-dmg here].
* pkg-dmg must be in PATH. This tool can be found [http://hg.mozilla.org/mozilla-central/file/tip/build/package/mac_osx/pkg-dmg here].


* [http://www.7-zip.org/ 7-zip] (specifically 7za) must be in PATH. Can install this via port or via dmg (p7zip)
* [http://www.7-zip.org/ 7-zip] (specifically 7za) must be in PATH. Can install this via port, brew or via dmg (p7zip).  Using brew you can <code>brew install p7zip</code>


* [http://www.gnu.org/software/wget/ wget] must be in PATH. Again, install via port or whatever.  
* [http://www.gnu.org/software/wget/ wget] must be in PATH. Again, install via port or whatever. Using brew, <code>brew install wget</code>


The repack script can be pulled from SVN
* upx must be in the PATH.  Using brew, <code>brew install upx</code>
 
* A current pull of the partner repo.
** hg clone https://hg.mozilla.org/build/partner-repacks
 
== Building a local repack ==
 
cd partner-repacks/scripts
bash signing-server-setup.sh
export PYTHONPATH=$PWD/tools/lib/python
partner-repacks.py -v $VERSION -n $BUILD -d ../partners -p $PARTNERNAME \
                    --dmg-extract-script `pwd`/tools/release/common/unpack-diskimage.sh \
                    --pkg-dmg ~/moz/fx-team/build/package/mac_osx/pkg-dmg
 
== Example builds ==
 
Building a current release:
 
partner-repacks.py -v 33.0 -n 1 -d ../partners -p $PARTNERNAME \
                    --dmg-extract-script `pwd`/tools/release/common/unpack-diskimage.sh \
                    --pkg-dmg ~/moz/fx-team/build/package/mac_osx/pkg-dmg
 
Building a beta release:
 
partner-repacks.py -v 34.0b6 -n 1 -d ../partners -p $PARTNERNAME \
                    --dmg-extract-script `pwd`/tools/release/common/unpack-diskimage.sh \
                    --pkg-dmg ~/moz/fx-team/build/package/mac_osx/pkg-dmg \
                    --repo releases/mozilla-beta
 
== Build output ==
 
Your new builds will appear at <code>partner-repacks/scripts/repacked_builds/34.0b6/build1/unsigned/partner-repacks/$PARTNERNAME/</code>

Revision as of 17:26, 6 November 2014

Install

To use the repack script, you'll need a few things. They are:

  • a Mac with OSX. Part of the repack process involves creating DMGs, and unfortunately hdiutil is OSX-only. There are alternative methods to creating DMGs, but any we've found so far have been sub-optimal. If hdiutil isn't installed on your Mac, you'll need to grab Apple's Xcode.
  • [ http://www.python.org/ python 2.7.5] (needed for the subprocess module). It either needs to be the default python used on said mac, or you can run the script using "python partner-repacks.py ..."
  • pkg-dmg must be in PATH. This tool can be found here.
  • 7-zip (specifically 7za) must be in PATH. Can install this via port, brew or via dmg (p7zip). Using brew you can brew install p7zip
  • wget must be in PATH. Again, install via port or whatever. Using brew, brew install wget
  • upx must be in the PATH. Using brew, brew install upx

Building a local repack

cd partner-repacks/scripts
bash signing-server-setup.sh
export PYTHONPATH=$PWD/tools/lib/python
partner-repacks.py -v $VERSION -n $BUILD -d ../partners -p $PARTNERNAME \
                   --dmg-extract-script `pwd`/tools/release/common/unpack-diskimage.sh \
                   --pkg-dmg ~/moz/fx-team/build/package/mac_osx/pkg-dmg

Example builds

Building a current release:

partner-repacks.py -v 33.0 -n 1 -d ../partners -p $PARTNERNAME \
                   --dmg-extract-script `pwd`/tools/release/common/unpack-diskimage.sh \
                   --pkg-dmg ~/moz/fx-team/build/package/mac_osx/pkg-dmg

Building a beta release:

partner-repacks.py -v 34.0b6 -n 1 -d ../partners -p $PARTNERNAME \
                   --dmg-extract-script `pwd`/tools/release/common/unpack-diskimage.sh \
                   --pkg-dmg ~/moz/fx-team/build/package/mac_osx/pkg-dmg \
                   --repo releases/mozilla-beta

Build output

Your new builds will appear at partner-repacks/scripts/repacked_builds/34.0b6/build1/unsigned/partner-repacks/$PARTNERNAME/