Packaging Android host utilities: Difference between revisions
m (→Linux) |
|||
Line 3: | Line 3: | ||
The host utilities are executable files that run on a *host* machine. The utilities provide services to an Android *target* device, including a web server and certificate authority. For historical reason, the host utilities include an essentially complete version of Firefox. Here's how to package new versions of the host utilities. | The host utilities are executable files that run on a *host* machine. The utilities provide services to an Android *target* device, including a web server and certificate authority. For historical reason, the host utilities include an essentially complete version of Firefox. Here's how to package new versions of the host utilities. | ||
First, identify the target build. Generally, prefer | First, identify the target build. Generally, prefer Beta channel builds to Nightly channel builds. | ||
=== Linux === | === Linux === | ||
Line 17: | Line 17: | ||
mv bin/* firefox | mv bin/* firefox | ||
mv firefox host-utils-37.0a2.en-US.linux-x86_64 | mv firefox host-utils-37.0a2.en-US.linux-x86_64 | ||
</pre> | |||
For the version 58 update, host utils was based on builds from https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=dab1c5badddbf3dafd34b52700c3e1129f76d632. For each of "Linux opt" and "Linux x64 opt", the build's target.tar.bz2 and target.common.tests.zip were downloaded, then: | |||
<pre> | |||
tar xvf target.tar.bz2 | |||
unzip target.common.tests.zip "bin/*" | |||
rm firefox/firefox* | |||
rm -r firefox/browser | |||
mv bin/* firefox | |||
mv firefox host-utils-58.0a1.en-US.linux-x86_64 | |||
</pre> | </pre> | ||
If preparing a new archive for upload to tooltool: | If preparing a new archive for upload to tooltool: |
Revision as of 23:07, 8 November 2017
Packaging Android host utilities
The host utilities are executable files that run on a *host* machine. The utilities provide services to an Android *target* device, including a web server and certificate authority. For historical reason, the host utilities include an essentially complete version of Firefox. Here's how to package new versions of the host utilities.
First, identify the target build. Generally, prefer Beta channel builds to Nightly channel builds.
Linux
Preparing for Linux is dead simple.
wget http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-37.0a2.en-US.linux-x86_64.tar.bz2 tar jxf firefox-37.0a2.en-US.linux-x86_64.tar.bz2 rm -rf firefox/firefox* firefox/components wget http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-37.0a2.en-US.linux-x86_64.tests.zip unzip firefox-37.0a2.en-US.linux-x86_64.tests.zip "bin/*" mv bin/* firefox mv firefox host-utils-37.0a2.en-US.linux-x86_64
For the version 58 update, host utils was based on builds from https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=dab1c5badddbf3dafd34b52700c3e1129f76d632. For each of "Linux opt" and "Linux x64 opt", the build's target.tar.bz2 and target.common.tests.zip were downloaded, then:
tar xvf target.tar.bz2 unzip target.common.tests.zip "bin/*" rm firefox/firefox* rm -r firefox/browser mv bin/* firefox mv firefox host-utils-58.0a1.en-US.linux-x86_64
If preparing a new archive for upload to tooltool:
tar cvf host-utils-37.0a2.en-US.linux-x86_64.tar host-utils-37.0a2.en-US.linux-x86_64 gzip host-utils-37.0a2.en-US.linux-x86_64.tar
Then upload host-utils-37.0a2.en-US.linux-x86_64.tar.gz to tooltool and update the manifest in testing/config/tooltool-manifests/linux64/hostutils.manifest.
Repeat, using another archive, for 32 bit.
Mac OS X
Preparing for Mac OS X is not quite so simple. Due to changes in the way that Mac OS X codesigns binaries, it's best to do this on a Mac OS X machine so that you can codesign the host utility binaries. If you don't codesign them, you will be prompted every invocation to "allow network connections". See http://apple.stackexchange.com/a/150711 for a discussion of the issue and the codesigning invocation used below. You will be prompted for your password (by sudo), but it's possible super user permissions are not needed.
wget http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-37.0a2.en-US.mac.tests.zip unzip firefox-37.0a2.en-US.linux-x86_64.tests.zip "bin/*" wget http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-37.0a2.en-US.mac.dmg open firefox-37.0a2.en-US.mac.dmg cp -R /Volumes/FirefoxDeveloperEdition/FirefoxDeveloperEdition.app/Contents/MacOS/* bin cp -R /Volumes/FirefoxDeveloperEdition/FirefoxDeveloperEdition.app/Contents/Resources/* bin find bin -type f -perm +111 -print | grep -v \\. | xargs sudo codesign --force --deep --sign - mv bin host-utils-37.0a2.en-US.mac