<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>John Ford &#187; Mozilla</title>
	<atom:link href="http://blog.johnford.org/category/mozilla/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.johnford.org</link>
	<description>things that I remembered to write about</description>
	<lastBuildDate>Wed, 10 Oct 2012 18:08:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Desktop B2G builds now include Gaia</title>
		<link>http://blog.johnford.org/desktop-b2g-include-gaia/</link>
		<comments>http://blog.johnford.org/desktop-b2g-include-gaia/#comments</comments>
		<pubDate>Tue, 09 Oct 2012 12:30:43 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://blog.johnford.org/?p=511</guid>
		<description><![CDATA[The nightly builds of Desktop B2G now include Gaia profile on Mac, Linux and Windows! Please remember, though, that these builds are still experimental and are not currently supported. This means you no longer have to download Gaia sources and build it yourself to test a site on B2G or check out our progress. Building [...]]]></description>
			<content:encoded><![CDATA[<p>The nightly builds of Desktop B2G now include Gaia profile on Mac, Linux and Windows!  Please remember, though, that these builds are still experimental and are not currently supported.</p>
<p>This means you no longer have to download Gaia sources and build it yourself to test a site on B2G or check out our progress.  Building Gaia is easy if you already have a development environment, but setting up a development environment can be pretty painful, especially on Windows.  As of last week, our nightly builds now include a fully built Gaia profile and a small wrapper program to allow launching the Firefox OS simulator with one click.  This is especially useful on Mac, where launching the B2G directly in a terminal instead of through Finder causes input to be redirected to the terminal.</p>
<p><a href="http://blog.johnford.org/wp-content/uploads/2012/10/Screen-Shot-2012-10-08-at-1.08.58-PM.png"><img src="http://blog.johnford.org/wp-content/uploads/2012/10/Screen-Shot-2012-10-08-at-1.08.58-PM.png" alt="" title="Simulator on Mac" width="434" height="616" class="aligncenter size-full wp-image-512" /></a></p>
<p>These builds end up here: <a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/">http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/</a></p>
<p>On Windows and Linux, downloading the appropriate package, extracting it then running &#8220;b2g/b2g&#8221; will launch the simulator.  On Mac, you&#8217;ll need to mount the DMG then copy the B2G.app bundle to a writable location.  The App bundle needs to be on a writable location so the profile can be modified by Gecko.</p>
<p>Because we use a wrapper program to launch B2G, we&#8217;ve moved the actual &#8216;b2g&#8217; and &#8216;b2g.exe&#8217; files to &#8216;b2g-bin&#8217; and &#8216;b2g-bin.exe&#8217;, respectively.  If you need to launch b2g directly, please use the new b2g-bin name.  To see where the output of the B2G process goes on Mac, launch the &#8216;Console&#8217; application<br />
<a href="http://blog.johnford.org/wp-content/uploads/2012/10/Screen-Shot-2012-10-08-at-1.12.12-PM.png"><img src="http://blog.johnford.org/wp-content/uploads/2012/10/Screen-Shot-2012-10-08-at-1.12.12-PM.png" alt="" title="Console showing B2G output" width="1016" height="558" class="aligncenter size-full wp-image-514" /></a></p>
<p>Note: there is a crash in libxul.dll on Windows that is affecting startup.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnford.org/desktop-b2g-include-gaia/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A description of how Release Engineering is using Mock to decouple linux host OS from build environments</title>
		<link>http://blog.johnford.org/a-description-of-how-release-engineering-is-using-mock-to-decouple-linux-host-os-from-build-environments/</link>
		<comments>http://blog.johnford.org/a-description-of-how-release-engineering-is-using-mock-to-decouple-linux-host-os-from-build-environments/#comments</comments>
		<pubDate>Thu, 17 May 2012 07:45:28 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.johnford.org/?p=491</guid>
		<description><![CDATA[We&#8217;ve been using a fork of the Fedora Project&#8217;s Mock tool to produce b2g builds for a couple months now. I described this tool in an earlier post. This post is about how we are using this fork at Mozilla. Integrating with Buildbot automation Mock integrates with Buildbot through the MockInit, MockInstall, MockCommand and MockProperty [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been using a fork of the Fedora Project&#8217;s Mock tool to produce b2g builds for a couple months now.  I described this tool in an <a href="http://blog.johnford.org/using-mock-to-build-firefox-on-linux/" title="Using Mock to build Firefox on Linux">earlier post</a>.  This post is about how we are using this fork at Mozilla.</p>
<h2>Integrating with Buildbot automation</h2>
<p>Mock integrates with Buildbot through the <a href="http://hg.mozilla.org/build/buildbotcustom/file/b5ca2e87801b/steps/misc.py#l99">MockInit</a>, <a href="http://hg.mozilla.org/build/buildbotcustom/file/b5ca2e87801b/steps/misc.py#l110">MockInstall</a>, <a href="http://hg.mozilla.org/build/buildbotcustom/file/b5ca2e87801b/steps/misc.py#l121">MockCommand</a> and <a href="http://hg.mozilla.org/build/buildbotcustom/file/b5ca2e87801b/steps/misc.py#l210">MockProperty</a> classes.  The first two commands are used to configure and create the environment while the third and fourth are used to execute commands inside of a build environment.</p>
<p>MockInit is a basic wrapper for calling <code>mock --init -r target_name</code>.  It is provided to encapsulate the logic for this relatively simple operation.  Internally, initializing an environment means making sure that the environment is completely clean and has been recreated based on the contents of the root cache and the base packages specified in the mock config file.</p>
<p>MockInstall is also another basic wrapper.  MockInstall internally calls <code>mock -r target_name --install package1 package2 packageN</code>.  This step will install into the specified target environment the packages needed and any the packages requested depend on.  This requires all build tools and dependencies be packaged and added to a Yum repository.  Doing this is highly desirable regardless of whether or not Mock is being used.</p>
<p>MockCommand is derived from the standard ShellCommand as intended to operate like the base class.  When in non-Mock mode (i.e. use_mock is set to False), this command does nothing to the configuration options and passes all calls straight to the base ShellCommand.  When in Mock mode, the command runs its <code><a href="http://hg.mozilla.org/build/buildbotcustom/file/b5ca2e87801b/steps/misc.py#l150">magic</a></code> method to modify the command line to properly pass the requested buildbot environment through to the Mock call as well as passing the correctly modified command line given the working directory requested (using build environment paths) and the target that should be used.</p>
<p>MockProperty is to SetProperty what MockCommand is to ShellCommand with the important distinction that MockProperty inherits singly from MockCommand and duplicates logic from SetProperty.</p>
<p>In the current implementation, Mock has <code>/builds/</code> bind mounted into the build environment.  This means that all paths under <code>/builds/</code> have the exact same paths in the build environment and on the build host.  If the build process is substantially reworked to use a scripting framework other than Buildbot, it might make sense to stop making the <code>/builds/</code> directory available inside of the build root.  All commands which are &#8220;build system&#8221; commands are run under a MockCommand with use_mock set to true.  Currently, there are no uploads or X11 dependent jobs run under mock.  I have a blog post that <a href="http://blog.johnford.org/allowing-chroot-access-to-x11-on-centos-6/" title="Allowing chroot access to x11 on Centos 6">details X11 access</a> and uploads could be fixed by bind-mounting the host&#8217;s <code>~/.ssh</code> directory into the build environment.</p>
<h2>RPM and Yum infrastructure</h2>
<p>Because all dependencies are fetched and installed through Yum+RPM on each build, it is necessary to package all tools as RPMs.  How <a href="http://fedoraproject.org/wiki/How_to_create_an_RPM_package">RPMs are built</a> and <a href="http://docs.fedoraproject.org/en-US/Fedora/14/html/Deployment_Guide/sec-Creating_a_Yum_Repository.html">Yum repositories are created</a> is outside the scope of this document.  The current setup is for Mozilla to internally mirror the host OS and the build environment OS as well as a custom repo for each distribution.  Ideally, the mirrored copy of the repositories would be completely unaltered.  I haven&#8217;t experimented with overriding core packages yet, but we should be fine to put newer packages that override OS packages in the custom Mozilla repository.  As for building RPMs, I&#8217;ve been using <a href="https://github.com/jhford/releng-rpms">spec files in my repository</a> to build the rpms.</p>
<p>This repository has a directory for each distributions for which custom packages are generated, currently only &#8216;centos6&#8242;.  Inside the distribution directory are directories for each package.  There are no directories for each architecture, since rpm has facilities for specifying which architectures are valid for a given package.  Each package directory contains small patches and source files needed to build the package, a tooltool manifest for larger files and a symlink to a file called &#8220;actions.sh&#8221;.  This is a symlink to a script in a hidden directory at the root of the repository.  In this script, there are commands for the following actions:</p>
<ul>
<li>fetch &#8212; use tooltool to fetch the sources</li>
<li>store &#8212; add the specified file to the tooltool manifest</li>
<li>build &#8212; perform a simple rpmbuild on the given spec file</li>
<li>mock_build &#8212; perform a mock build of the package using upstream&#8217;s mock package</li>
</ul>
<p>It is the responsibility of the package author to add sources, specs and manifests to the repository and upload the files to the tooltool resource host.  The mock_build command can be invoked with the syntax <code>./actions.sh mock_build fedora-16-x86_64 x86_64 my_package.spec</code>.  The SRPMs created should be included in the list of rpm files included in Yum repository creation, since they are the canonical source of what the binary packages were built from.</p>
<h2>Creating a new target</h2>
<p>In the case that a new build environment configuration is needed, I&#8217;d recommend starting with an <a href="https://github.com/jhford/mock_mozilla/blob/49e831768e79f694d2fb4cc94f77d5f6c708ec21/etc/mock_mozilla/mozilla-f16-x86_64.cfg">existing mock_mozilla configuration</a>.  The values that you&#8217;re likely going to be working with are the root name, arch list, base package list, bind mount and repository list.  Deploying the cfg file is required and should be done through something like puppet.</p>
<h2>Development</h2>
<p>A release of mock_mozilla can be generated by running
<pre>
git clone git://github.com/jhford/mock_mozilla.git
cd mock_mozilla
./autogen.sh
make srpm # this is to get the tarball, don't care about the srpm created here
mock --buildsrpm --spec mock_mozilla.spec --sources . --resultdir srpm --target x86_64
mock -r epel-6-x86_64 mock_mozilla-1.0.1-1.el6.src.rpm --resultdir x86_64 --target x86_64</pre>
<p>The code to mock_mozilla is on <a href="https://github.com/jhford/mock_mozilla">github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnford.org/a-description-of-how-release-engineering-is-using-mock-to-decouple-linux-host-os-from-build-environments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tooltool: a way to help deploy development tools to CI machines in an agile way</title>
		<link>http://blog.johnford.org/tooltool-a-way-to-help-deploy-development-tools-to-ci-machines-in-an-agile-way/</link>
		<comments>http://blog.johnford.org/tooltool-a-way-to-help-deploy-development-tools-to-ci-machines-in-an-agile-way/#comments</comments>
		<pubDate>Thu, 17 May 2012 03:09:40 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.johnford.org/?p=472</guid>
		<description><![CDATA[One fairly common problem faced by teams at Mozilla is getting their tools plugged into the Release Engineering continuous testing infrastructure.  In the past, the workflow has been for the team to file a bug that required a Release Engineer to figure out how to build, package and deploy a new set of tools. This [...]]]></description>
			<content:encoded><![CDATA[<p>One fairly common problem faced by teams at Mozilla is getting their tools plugged into the Release Engineering continuous testing infrastructure.  In the past, the workflow has been for the team to file a bug that required a Release Engineer to figure out how to build, package and deploy a new set of tools. This is not the most scalable approach.  During our recent Release Engineering workweek, we brainstormed on how to improve scaling and agility by empowering developers to help build and deploy new tools for our CI machines.</p>
<h2>Tooltool basics</h2>
<p>Tooltool is a client side program written in Python that uses a file manifest in concert with HTTP servers to materialize large binary payloads for use in a job.  The manifests are JSON files which list details of individual files.  Each file is represented in the JSON by a dictionary with the keys “filename”, “digest”, “size” and “algorithm”. An example is located <a title="here" href="http://hg.mozilla.org/mozilla-central/file/0ff816e5e992/b2g/config/tooltool-manifests/releng.manifest" target="_blank">here</a>.  The current <a href="https://github.com/jhford/tooltool/blob/1936dd6109544eed8216637fbac92f31c5e920a1/tooltool.py#L105" target="_blank">JSONEncoder</a> and <a href="https://github.com/jhford/tooltool/blob/1936dd6109544eed8216637fbac92f31c5e920a1/tooltool.py#L124" target="_blank">JSONDecoder</a> derived classes only understand how to work with these keys. Making the JSON encoder and decoder work with an extensible version of the manifests should not be difficult.</p>
<h2>Tooltool fetch API</h2>
<p>When Tooltool needs to download a file from the file server it does so by creating a URL.  In the current implementation, there is a single base url that is used to construct the URLs that are to be fetched.  A good change to make would be to convert this single URL to a list of possible base urls.  The address of the file to fetch is generated using a string concatenation of the base URL, a slash, the hashing algorightm’s name, another slash and the full hash value represented in hexadecimal. Given a base url of “<a href="http://files.r.us:8080/tooltool">http://files.r.us:8080/tooltool</a>” and a file that has a SHA512 hash value of 0123456789abcdef, Tooltool will try to fetch  “<a href="http://files.r.us:8080/tooltool/sha512/0123456789abcdef">http://files.r.us:8080/tooltool/sha512/0123456789abcdef</a>”.</p>
<p>There is no server component for Tooltool yet.  As a result, the file server is currently implemented as a simple directory on an HTTP host that has the correct directory structure for responding to requests.  I&#8217;ve started working on a server side component but it isn&#8217;t finished. The server side component would allow for easy uploads by developers, easy listing of contents on the server and a way to store files in a nicer way on the server&#8217;s file system.</p>
<h2>Using Tooltool</h2>
<p>Tooltool has four commands presently: list, validate, add and fetch.  There are global options and command arguments.  All terminal interactions after the option parser finishes is done through the Python logging API.  The default is to print logging.INFO and higher messages.  Currently, the following global options exist:</p>
<ul>
<li><code>-q/--quiet</code> tells Tooltool to print only logging.ERROR and higher messages</li>
<li><code>-v/--verbose</code> specifies to print logging.INFO and higher</li>
<li><code>-m/--manifest &lt;file&gt;</code> instructs Tooltool to reference a manifest file located at the specified path</li>
<li><code>-d/--algorithm &lt;algorithm&gt;</code> instructs Tooltool to use the specified algorithm</li>
<li><code>-o/--overwrite</code> tells Tooltool to overwrite a local file if the filename matches the manifest but the hash value is different to the manifest</li>
<li><code>--url</code> specifies the base url to be used for remote operations</li>
</ul>
<h2>Listing and Validating</h2>
<p>The two most basic commands list a manifest and validate the local files against the manifest.  The list command lists out all of the files in the manifest as well as whether they are present and/or valid.  The return code from listing is zero unless there was an error in listing the files.  Absent or invalid files will still result in an exit code of zero if there was no error in the listing process.  The validate command is used to check if all the files in the manifest are present and valid.  The exit code for validating is zero if all files in the manifest are present and their hash matches the manifest.  It is non-zero if any file is missing locally or the file does not have the same hash as the manifest.</p>
<div id="attachment_476" class="wp-caption aligncenter" style="width: 709px"><a href="http://blog.johnford.org/wp-content/uploads/2012/05/list-and-validate.png"><img class=" wp-image-476  " title="Listing and validating a Tooltool manifest" src="http://blog.johnford.org/wp-content/uploads/2012/05/list-and-validate.png" alt="" width="699" height="565" /></a><p class="wp-caption-text">Listing and validating a Tooltool manifest. Note the exit codes</p></div>
<h2>Fetching</h2>
<p>The fetch command is used to materialize files locally.  Before fetching a file from a remote host, Tooltool will validate local files which match the filename specified in the manifest.  The default behaviour when a local file matches the filename but not the hash value is to exit with a non-zero exit code.  If &#8211;o or &#8211;overwrite is specified on the command line Tooltool will overwrite the local file without confirmation with the remote file.  The local file will be truncated as soon as Tooltool attempts to start writing the remote file locally.</p>
<div id="attachment_478" class="wp-caption aligncenter" style="width: 709px"><a href="http://blog.johnford.org/wp-content/uploads/2012/05/fetch.png"><img class="size-full wp-image-478" title="Fetching a file that exists locally with contents differing from manifest" src="http://blog.johnford.org/wp-content/uploads/2012/05/fetch.png" alt="" width="699" height="565" /></a><p class="wp-caption-text">Fetching a file that exists locally with contents differing from manifest. Note the difference in behaviour when using --overwrite</p></div>
<h2>Adding</h2>
<p style="text-align: left;">Files are added to manifests with the add command. This command looks for a manifest using either the default name of <a href="https://github.com/jhford/tooltool/blob/1936dd6109544eed8216637fbac92f31c5e920a1/tooltool.py#L493">manifest.tt</a> or by the value specified by the -m/&#8211;manifest command line option. If the manifest does not exist already on the file system, a new one will be created to store the first file given. An error message will be displayed if a file is added a second time, regardless of whether or not the local contents are the same as what is in the manifest. There is currently no logic to remove a file from a manfiest or overwrite a manifest entry.</p>
<div class="mceTemp mceIEcenter" style="text-align: left;">
<dl id="attachment_479" class="wp-caption aligncenter" style="width: 709px;">
<dt class="wp-caption-dt"><a href="http://blog.johnford.org/wp-content/uploads/2012/05/add.png"><img class=" wp-image-479" title="add a file to a manifest, creating the manifest in the process" src="http://blog.johnford.org/wp-content/uploads/2012/05/add.png" alt="" width="699" height="565" /></a></dt>
<dd class="wp-caption-dd">Creating a Tooltool manifest, adding a file to it, trying to re-add file and listing contents. Note that even though &#8216;a&#8217; didn&#8217;t change, tooltool didn&#8217;t allow it to be added a second time or overwrite the manifest&#8217;s entry</dd>
</dl>
</div>
<h2>Future direction and contributions</h2>
<p>Tooltool is a generic lookaside cache. My intention is to keep it as general as possible by not including logic to deal with payloads. We currently include a bootstrap script in the b2g manifests that understands how to take the rest of the payload and set up a working toolchain. Using a bootstrap script means that Tooltool can be tool agnostic while still allowing complex operations on the fetched tools. A standardized bootstrap script name and interface that is called by Tooltool might make sense. I&#8217;d also like to finish the server-side component that has an interface to upload files with and a method for storing files in a less obtuse method than just mirroring the API paths. A command for removing files from a manifest would be helpful, as would the ability to update a manifest with the contents of the directory as they exist right now. Another really cool feature would be the ability to configure a system wide cache directory where files are downloaded to. Once the server component is working, I&#8217;d like to add a way for servers to automatically sync their file stores when they are asked for a file that exists on another server but not locally.</p>
<p>Tooltool is GPLv2 and the source is available on <a href="https://github.com/jhford/tooltool">github</a>. The best way to contribute code is to send a pull request on github. Things are more likely to be merged if they pass the whole test suite (make check), have tests, improve Tooltool and don&#8217;t make Tooltool overly specific.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnford.org/tooltool-a-way-to-help-deploy-development-tools-to-ci-machines-in-an-agile-way/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom Android NDK for Mac and Linux that use the Gold linker by default are available</title>
		<link>http://blog.johnford.org/custom-android-ndk-for-mac-and-linux-that-use-the-gold-linker-by-default-are-available/</link>
		<comments>http://blog.johnford.org/custom-android-ndk-for-mac-and-linux-that-use-the-gold-linker-by-default-are-available/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 17:41:27 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://blog.johnford.org/?p=467</guid>
		<description><![CDATA[In an effort to improve mobile developer workflow, we&#8217;ve built a version of the Android NDK-r7 toolchain that uses the Gold linker by default. Please check out the documentation on the wiki for more information on how to use these packages. The Linux toolchain contains the exact bits that we will be using in production [...]]]></description>
			<content:encoded><![CDATA[<p>In an effort to improve mobile developer workflow, we&#8217;ve built a version of the Android NDK-r7 toolchain that uses the Gold linker by default.  Please check out the <a href="https://wiki.mozilla.org/Mobile/Fennec/Android#Using_mozilla-repackaged_NDKs">documentation on the wiki</a> for more information on how to use these packages.  The Linux toolchain contains the exact bits that we will be using in production very soon.  We currently use r5 for production builds but will be switching to the r7 package soon.</p>
<p>If you find any issues with either of these toolchains, please let us know as soon as possible by filing a <code>mozilla.org::Release Engineering</code> bug and CCing me (:jhford)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnford.org/custom-android-ndk-for-mac-and-linux-that-use-the-gold-linker-by-default-are-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We have new, fast Mac build machines in production!</title>
		<link>http://blog.johnford.org/we-have-new-fast-mac-build-machines-in-production/</link>
		<comments>http://blog.johnford.org/we-have-new-fast-mac-build-machines-in-production/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 03:54:29 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://blog.johnford.org/?p=454</guid>
		<description><![CDATA[Today, the final changes needed to shift our Mac build load to our new OS X 10.7 Lion build machines went live.  These machines are significantly faster, as demonstrated in my earlier blog post. To echo my message to a couple news groups, these are some things you might like to know: you need http://hg.mozilla.org/mozilla-central/rev/b687cabf75a1 [...]]]></description>
			<content:encoded><![CDATA[<p>Today, the final changes needed to shift our Mac build load to our new OS X 10.7 Lion build machines went live.  These machines are significantly faster, as demonstrated in my earlier <a title="Evaluating new Mac Mini builders, SSDs and -j settings" href="http://blog.johnford.org/new-mac-builders-ssds-j-settings/">blog post</a>.</p>
<p>To echo my message to a couple news groups, these are some things you might like to know:
<ol>
<li>you need http://hg.mozilla.org/mozilla-central/rev/b687cabf75a1 merged in to your branch to get the biggest build time improvement</li>
<li>pushing mozilla-aurora, mozilla-beta, mozilla-esr10 or mozilla-1.9.2 code to try will now attempt a build on 10.7 hardware.  Doing this is not suggested because your build may fail to build at all and it definitely will not match what we currently build on mozilla-aurora and older.</li>
<li>These builds are able to run on 10.5</li>
<li>we are using gcc-4.2 from xcode 4.1 running on OS X 10.7.2 right now and building against the 10.6sdk</li>
<li>the machines are macmini5,3 (quad-i7 2.0GHz, 8GB ram, 2x500GB 7200RPM in Raid0, exclusively intel graphics)</li>
<li>shark builds don&#8217;t work, bug 723301</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnford.org/we-have-new-fast-mac-build-machines-in-production/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Generating an epub copy of the Python Docs</title>
		<link>http://blog.johnford.org/generating-an-epub-copy-of-the-python-docs/</link>
		<comments>http://blog.johnford.org/generating-an-epub-copy-of-the-python-docs/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 03:43:20 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://blog.johnford.org/?p=427</guid>
		<description><![CDATA[I like Python documentation because it helps me get things done. I was curious if I could put a useful copy of the Python docs on my iphone. My first thought was to load the already generated docs. PDF is great on a large screen but doesn&#8217;t work well on a phone. Html files are [...]]]></description>
			<content:encoded><![CDATA[<p>I like Python documentation because it helps me get things done. I was curious if I could put a useful copy of the Python docs on my iphone. My first thought was to load the already generated <a title="documentation downloads" href="http://docs.python.org/download">docs</a>. PDF is great on a large screen but doesn&#8217;t work well on a phone. Html files are great, but I don&#8217;t know how to host those files on my iphone without having root and text files aren&#8217;t indexed.</p>
<p>I don&#8217;t know much about epub, but I do know that it is supported on the iphone and has better text layout than US letter sized PDF files on the device. Python docs are generated using a tool called <a href="http://sphinx.pocoo.org">Sphinx</a> and it turns out that they have an <a href="http://sphinx.pocoo.org/latest/builders.html#sphinx.builders.epub.EpubBuilder">epub builder</a>. Important to note is that this <a href="http://sphinx.pocoo.org/latest/faq.html#epub-faq">epub builder is experimental</a>.</p>
<p>To generate my epub file, I followed the directions in the <code>Python-2.7.2/Doc/README.txt</code> file, using a builder name of <code>epub</code> instead of one of the listed ones. The result was that I ran these commands:</p>
<pre>wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz
tar zxf Python-2.7.2.tgz
cd Python-2.7.2/Doc
virtualenv doc-tools &amp;&amp; source doc-tools/bin/activate
pip install sphinx jinja2 pygments
python tools/sphinx-build.py -bepub . build/epub</pre>
<p>Doing this resulted in a large number of html files and an epub file, <code>build/epub/Python.ebub</code>. I opened the file with itunes <code>open -a iTunes build/epub/Python.epub</code> and synced my iphone.</p>
<p>So far my experience is that ibooks is <em>very</em> slow when working with this file. The file is twice as large as the complete works of Shakespeare and has a lot more markup! Most of the things I&#8217;d expect to be links are links and the indexes seem to be working just fine. Ibooks (the iphone epub reader) even shows the correct table of contents. Code samples are legible, but are a nested panning area, which is awkward when the same gesture flips to the next page.</p>
<p>If you are feeling lazy, <a href="http://johnford.info/wp-content/uploads/2012/03/Python.epub">here is a copy</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnford.org/generating-an-epub-copy-of-the-python-docs/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>b2g gecko component builds are now building on each checkin and each night</title>
		<link>http://blog.johnford.org/b2g-gecko-component-builds-are-now-building-on-each-checkin-and-each-night/</link>
		<comments>http://blog.johnford.org/b2g-gecko-component-builds-are-now-building-on-each-checkin-and-each-night/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 19:01:52 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.johnford.org/?p=443</guid>
		<description><![CDATA[Today I landed and reconfigured our masters to build the gecko portion of b2g on every push to mozilla-central, project branches and try.  If you break these builds, you&#8217;ve broken b2g.  We are only uploading logs, but the resulting builds have been tested to work on an actual b2g phone. These builds also represent a [...]]]></description>
			<content:encoded><![CDATA[<p>Today I landed and reconfigured our masters to build the gecko portion of b2g on every push to mozilla-central, project branches and try.  If you break these builds, you&#8217;ve broken b2g.  We are only uploading logs, but the resulting builds have been tested to work on an actual b2g phone.</p>
<p>These builds also represent a huge step forward in making our infrastructure more responsive to developer requests.  We are decoupling our build host OS from our build environment using a <a href="https://github.com/jhford/mock_mozilla">fork</a> of Fedora&#8217;s <a href="http://fedoraproject.org/wiki/Projects/Mock">Mock</a> tool.  We are checking in a<a href="http://hg.mozilla.org/mozilla-central/file/0ff816e5e992/b2g/config/tooltool-manifests/releng.manifest"> tool manifest</a> that empowers community contributed toolchains to be deployed with <a href="https://github.com/jhford/tooltool">tooltool</a>.  We are also using a new set of <a href="http://hg.mozilla.org/build/puppet">puppet manifests</a> and a bunch of brand new HP build machines that are pretty fast.  These machines are set up using kickstart instead of a reference image, which means that when we want to rev our hardware, we aren&#8217;t tied to a particular model of hardware or even OS version.</p>
<p><a href="http://blog.johnford.org/wp-content/uploads/2012/03/Screen-Shot-2012-03-27-at-12.15.16-PM.png"><img class="aligncenter size-full wp-image-446" title="Buildbot WebUI showing Mozilla-Inbound builds going green" src="http://blog.johnford.org/wp-content/uploads/2012/03/Screen-Shot-2012-03-27-at-12.15.16-PM.png" alt="" width="828" height="440" /></a></p>
<p>These changes represent the direction we are moving in terms of our linux build environment.  A longer term goal is to move our Firefox desktop and mobile builds to mock build slaves for the same reasons we are doing b2g with mock.</p>
<p>Because of the shear number of brand new systems in play here there might be a few teething pains.  I&#8217;ve been running the full pool of 42 build machines on my staging master for 2 weeks with the code that landed today and for the last 3 weeks while in development and nothing has inexplicably failed.  Please don&#8217;t hesitate to file a bug if you see a problem with this new setup but make sure you CC me on it.</p>
<p>I&#8217;ll be writing up a more detailed blog post about what I did and the new tools written as time permits.  I am now focusing my attention towards getting our new quad-core Mac Mini machines into production, which will cut our nightly and release mac build times down from 4+ hours to 1:20.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnford.org/b2g-gecko-component-builds-are-now-building-on-each-checkin-and-each-night/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Allowing chroot access to x11 on Centos 6</title>
		<link>http://blog.johnford.org/allowing-chroot-access-to-x11-on-centos-6/</link>
		<comments>http://blog.johnford.org/allowing-chroot-access-to-x11-on-centos-6/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 19:19:26 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://blog.johnford.org/?p=413</guid>
		<description><![CDATA[I am working on a tool to do builds of Firefox and Boot2Gecko under a chroot management tool called mock. One thing that I am working on figuring out is access to the X11 server on the build host. I want this instead of Xephyr or Xvfb to make it possible to pass through 3D [...]]]></description>
			<content:encoded><![CDATA[<p>I am working on a tool to do builds of Firefox and Boot2Gecko under a chroot management tool called <a href="http://blog.johnford.org/using-mock-to-build-firefox-on-linux/" title="Using Mock to build Firefox on Linux">mock</a>.  One thing that I am working on figuring out is access to the X11 server on the build host.  I want this instead of Xephyr or Xvfb to make it possible to pass through 3D acceleration in case we decide to use mock for testing as well.</p>
<p>I tried specifying the hostname in my DISPLAY environment variable but got the following error:</p>
<pre><mock-chroot>bash-4.2# DISPLAY=localhost:0 xeyes
Error: Can't open display: localhost:0</pre>
<p>I did a bit of searching and found that a lot of people suggested that I run <code>xhost +</code>.  I found that had no effect on what I was trying.  Even more searching and I found out that Fedora and Centos have been invoking X11 with the <code>--nolisten tcp</code> option for some time.  This is a great default, but not for what I want to do.</p>
<p>In my search, I found that there were many, many ways with which to specify how X11 is launched.  All of these are part of the GDM configuration.  GDM is the login system in Gnome.  Over the years, there have been many substantial rewrites of GDM, each one seemingly completely changing where the options for the X server reside.</p>
<p>In the end, I found that the relevant file on CentOS 6.2 was <code>/etc/gdm/gdm.schemas</code>.  The relevant passage is</p>
<pre>&lt;schema&gt;
      &lt;key&gt;security/DisallowTCP&lt;/key&gt;
      &lt;signature&gt;b&lt;/signature&gt;
      &lt;default&gt;true&lt;/default&gt;
&lt;/schema&gt;</pre>
<p>I switched the false to true and retried running my command, <code>mock_mozilla -r test-f16-b --shell "/usr/bin/env DISPLAY=localhost:0 glxgears"</code> which resulted in a working GLXGears!<br />
<a href="http://blog.johnford.org/wp-content/uploads/2012/03/Screen-Shot-2012-03-08-at-9.33.04-AM.png"><img src="http://blog.johnford.org/wp-content/uploads/2012/03/Screen-Shot-2012-03-08-at-9.33.04-AM.png" alt="" title="Screen Shot 2012-03-08 at 9.33.04 AM" width="1138" height="904" class="aligncenter size-full wp-image-417" /></a></p>
<p>The keen observer will notice that this screenshot has a fairly low frame rate.  Even though this number is low, the build host gets approximately half this framerate outside of the chroot.  It looks like the VMware 3D drivers are slower than pure software.  Since glxgears doesn&#8217;t actually tell you whether or not you have acceleration, I ran glxinfo loking for the &#8216;direct rendering&#8217; line.</p>
<pre>libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so
libGL error: dlopen /usr/lib/dri/swrast_dri.so failed (/usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: swrast_dri.so
libGL: OpenDriver: trying /usr/lib/dri/swrastg_dri.so
libGL error: dlopen /usr/lib/dri/swrastg_dri.so failed (/usr/lib/dri/swrastg_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: swrastg_dri.so
libGL error: reverting to indirect rendering
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
</pre>
<p>Looks like the user land library component of the driver isn&#8217;t present in the build environment.  I hit this problem with a massive hammer and installed all mesa related packages with <code>mock_mozilla -r test-f16-b --install "*mesa*"</code> and now I get <code>direct rendering: Yes</code> and framerates similar to what the build host is showing (~730).  I compared the output of glxinfo with a fedora 16 vm on the same VMware host and noticed that I was getting very similar output.  I&#8217;d want to double check this on real hardware, but it looks like I am getting the same level of 3D acceleration in the build environment as on the build host!<br />
<a href="http://blog.johnford.org/wp-content/uploads/2012/03/Screen-Shot-2012-03-08-at-11.15.05-AM.png"><img src="http://blog.johnford.org/wp-content/uploads/2012/03/Screen-Shot-2012-03-08-at-11.15.05-AM.png" alt="" title="glxgears running from within the chroot" width="1138" height="904" class="aligncenter size-full wp-image-421" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnford.org/allowing-chroot-access-to-x11-on-centos-6/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Using Mock to build Firefox on Linux</title>
		<link>http://blog.johnford.org/using-mock-to-build-firefox-on-linux/</link>
		<comments>http://blog.johnford.org/using-mock-to-build-firefox-on-linux/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 22:36:28 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.johnford.org/?p=393</guid>
		<description><![CDATA[We currently have two different Linux build machine configurations. One does our 32bit desktop and Android builds, the other does our 64bit desktop builds. This isn&#8217;t very efficient because we have to segregate these two types of machine in their own pools.  If we have a burst of mobile builds, we end up with a [...]]]></description>
			<content:encoded><![CDATA[<p>We currently have two different Linux build machine configurations. One does our 32bit desktop and Android builds, the other does our 64bit desktop builds. This isn&#8217;t very efficient because we have to segregate these two types of machine in their own pools.  If we have a burst of mobile builds, we end up with a pool of overloaded 32bit machines while our 64bit machines sit idle.  We also have one build environment in which <em>all</em> linux based builds need to be done.  With boot2gecko and other projects coming online, we need to ensure that we are able to scale to serve these projects while allowing us to manage our build slaves in a sustainable way.</p>
<p>I have been working on a proof of concept for adapting Fedora&#8217;s Mock utility to build Firefox, Firefox for Mobile and other projects like boot2gecko in their own sandboxed build environment. Mock is what the Fedora project uses to build every single RPM included in their distribution. Mock separates our build host from our build environment, allows us to scale build hosts any way we desire, allows us to be more efficient and agile, improves security, improves the developer workflow and enables community engagement.</p>
<h2>Mock&#8217;s Architecture Simplified</h2>
<p>When Mock is used, yum and rpm populate the basic sandbox. Each time a command is run, Mock changes the root directory (chroot) to this sandboxed build environment. Mock then drops privileges as requested and runs the command in the sandbox. To speed up the creation of these sandboxes, Mock instructs yum to locally cache the rpm files it downloads. Mock also creates a tarball containing the sandbox after installing the base packages to further speed up sandbox creation. In all, it takes Mock approximately one minute on my local Fusion VM to initialize a build environment once the caches are warmed.</p>
<h2>Build Environment Isolation</h2>
<p>The host operating system is responsible for providing the kernel, the tools to drive Mock and Mock itself. Because each build environment is built on demand, the libraries that the host operating system provides aren&#8217;t important or used. This means that we can take security patches on the build host OS without risking our build environments. We are also able to bring up new fast hardware which may not support our build environment&#8217;s OS natively.  Mock uses the <a href="http://www.kernel.org/doc/man-pages/online/pages/man2/chroot.2.html">chroot system call</a>. This call has been around for quite some time and its abilities and flaws are well known. Chroot works on virtual machines which means we can use Mock even if we decide to scale to virtualized hardware.</p>
<h2>Efficiency and Agility</h2>
<p>Having no build dependencies installed on the build hosts, other than Mock itself, allows us to use the same configuration on our test and build machines. The test machines could even benefit from having Mock by allowing us to run tests against Gnome 2 and Gnome 3 on the same pool of slaves.</p>
<p>A common scenario that I&#8217;ve dealt with having to update a library which we link to Firefox. Lets say this we are using libfoo version 1 in Firefox 10. To support a developer landing a change to Firefox 11 that requires libfoo version 2, we currently need to figure out if Firefox 10 can maintain binary compatibility when built with libfoo version 2 or figure out how to install version 2 in a separate location and have only Firefox 11 and newer use libfoo version 2.  Using Mock, we would create a new build environment that only has libfoo version 2.  Because libfoo version 1 is unavailable to Firefox 11 builds and libfoo version 2 is unavailable to Firefox 10, we don&#8217;t risk depending on a new version of libfoo in Firefox 10 and we don&#8217;t risk silently falling back to using libfoo version 1 on Firefox 11.</p>
<p>Mobile moves quickly, often needing a completely unique build environment. When we split each mobile project out to its own Mock build environment, we are able to set up new environments significantly quicker because we are able to limit the scope of changes and no longer risk breaking Firefox by changing anything related to mobile. We can also allow mobile projects to use much newer Fedora software in their build environment while still running the more stable CentOS on our build hosts.  This means we enable mobile developers to use modern software while avoiding rebuilding a slew of packages in an alternate location.</p>
<h2>Security</h2>
<p>I understand that chroots are not a perfect sandboxing tool. I think we need to make sure that we don&#8217;t make perfect the enemy of good. We currently have no real sandboxing on our build slaves. Mock will enable us to run all developer submitted commands in an unprivileged chroot that is rebuilt for every build. Mock allows us to keep our system software updated on the build host to lessen our exposure to security vulnerabilities.</p>
<p>A special case in our infrastructure is Try. Each Try build is currently able to modify the system in ways that we might not want it to.  As a result, we currently have a completely separate pool of machines which run our Try builds.  Mock allows us to sandbox all developer submitted code into a disposable sandbox. Because all of the developer submitted code is limited to the sandbox, we can start looking at merging the Try and production pools.  The failure mode here is that the developer is able to exploit a kernel bug to gain root permissions in their sandbox.  Once a user has root in the sandbox they would be able to chroot back out of the sandbox.  This will be important when we discuss merging our Try and production pools.</p>
<h2>Correctness</h2>
<p>Each build environment will install the exact set of packages required for the build.  When a new dependency is required, we will explicitly add it to the list of dependencies. This means we won&#8217;t be surprised when Firefox starts depending on another library or tool.  We are also able to easily move actively developed branches of Firefox forward without taking risky changes to the build environment of shipping versions of Firefox. This is  increasingly important with the ESR (Extended Support Release)/ release.  Using Mock, we can continue to build in the exact same environment we use today for the rest of the ESR release even though we are building a 10 month newer version of Firefox with different dependencies on the same build host.  Having a single pool of slaves that can do <em>all</em> of our Linux based builds without having to figure out alternate install locations for each dependency is a major scalability win in my books.</p>
<h2>Developer workflow improvements</h2>
<p>Upgrading a library on our build slaves is currently a pain for developers and releng alike. Setting up a local copy of our Linux build machines is a pain. Mock makes this easier by allowing developers to use their existing machines to <em>exactly</em> replicate our official build environments.  Setting up a copy of our build environment on their machine would becomes trivially easy.  Developers could test their code changes in an exact match of our production build environment. Furthermore, with a tool like mozharness, a developer would be able to test an entire build using the exact same bits we use in production with the exact same commands and flow control.</p>
<p>Mock allows us to engage the community more effectively. Community members are able to work on our build machine configuration without impediment and would have access to the exact tools and packages that we use to build Firefox and Mobile.  When a community member finds or fixes a bug in our configuration or wants to upgrade a dependency, they are able to do so and submit patches for review.  This is a lot easier than our current process of signing out a slave for them, adding them to our vpn, letting them do their work followed by removing them from our vpn, reimaging the slave and setting it up again to be in production.  Project like SeaMonkey will be able to match official Firefox build environments with a lot less work required.</p>
<h2>Conclusion</h2>
<p>Mock is a very useful tool. Using it enables us to handle developer requests quicker, engage the community, improve developer workflow, improve security and reduce risk of breaking shipping versions of Firefox when moving development versions forward.  There are some changes that I&#8217;d like to make to the proof of concept before calling mock_mozilla complete, mainly how the driver script (mock_mozilla.py) parses the command line arguments and how build environment locking works.</p>
<p>If you&#8217;d like to take a look at the code for yourself, please feel free to check it out on github! <a href="https://github.com/jhford/mock_mozilla">https://github.com/jhford/mock_mozilla</a>.</p>
<h2>Demonstrations</h2>
<p>Before you start running code in a Mock sandbox, you need to intialize it.  Initializing cleans out the old contents and sets up the base packages specified in the sandbox config file.</p>
<pre>~/software/mock_mozilla $ mock_mozilla -r mozilla-f15-x86_64 --init
INFO: mock_mozilla.py version 1.1.17 starting...
INFO: State Changed: init plugins
INFO: selinux disabled
INFO: State Changed: start
INFO: State Changed: lock buildroot
INFO: State Changed: clean
INFO: State Changed: unlock buildroot
INFO: State Changed: init
INFO: State Changed: lock buildroot
INFO: Mock Version: 1.1.17
INFO: Mock Version: 1.1.17
INFO: Mock Version: 1.1.17
INFO: calling preinit hooks
INFO: enabled root cache
INFO: State Changed: unpacking root cache
INFO: enabled yum cache
INFO: State Changed: cleaning yum metadata
INFO: enabled ccache
INFO: State Changed: running yum
INFO: State Changed: unlock buildroot
INFO: State Changed: end</pre>
<p>Mock uses yum to install packages into the sandbox, but that doesn&#8217;t mean that we are limited to using yum and rpm to populate tools.</p>
<pre>~/software/mock_mozilla $ mock_mozilla -r mozilla-f15-x86_64 --shell "zip --version"
INFO: mock_mozilla.py version 1.1.17 starting...
INFO: State Changed: init plugins
INFO: selinux disabled
INFO: State Changed: start
INFO: State Changed: lock buildroot
INFO: State Changed: shell
/bin/sh: zip: command not found
INFO: State Changed: unlock buildroot
~/software/mock_mozilla $ mock_mozilla -r mozilla-f15-x86_64 --install zip
INFO: mock_mozilla.py version 1.1.17 starting...
INFO: State Changed: init plugins
INFO: selinux disabled
INFO: State Changed: start
INFO: Mock Version: 1.1.17
INFO: Mock Version: 1.1.17
INFO: Mock Version: 1.1.17
INFO: State Changed: lock buildroot
INFO: installing package(s): zip

================================================================================
 Package        Arch              Version               Repository         Size
================================================================================
Installing:
 zip            x86_64            3.0-3.fc15            fedora            251 k

Transaction Summary
================================================================================
Install       1 Package(s)

Total size: 251 k
Installed size: 770 k

Installed:
  zip.x86_64 0:3.0-3.fc15                                                      

INFO: State Changed: unlock buildroot
INFO: State Changed: end
~/software/mock_mozilla $ mock_mozilla -r mozilla-f15-x86_64 --shell "zip --version"
INFO: mock_mozilla.py version 1.1.17 starting...
INFO: State Changed: init plugins
INFO: selinux disabled
INFO: State Changed: start
INFO: State Changed: lock buildroot
INFO: State Changed: shell
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 3.0 (July 5th 2008), by Info-ZIP.
Currently maintained by E. Gordon.  Please send bug reports to
the authors using the web page at www.info-zip.org; see README for details.

Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip,
as of above date; see http://www.info-zip.org/ for other sites.

Compiled with gcc 4.6.0 20110205 (Red Hat 4.6.0-0.6) for Unix (Linux ELF) on Feb  8 2011.

Zip special compilation options:
     USE_EF_UT_TIME       (store Universal Time)
     SYMLINK_SUPPORT      (symbolic links supported)
     LARGE_FILE_SUPPORT   (can read and write large files on file system)
     ZIP64_SUPPORT        (use Zip64 to store large files in archives)
     UNICODE_SUPPORT      (store and read UTF-8 Unicode paths)
     STORE_UNIX_UIDs_GIDs (store UID/GID sizes/values using new extra field)
     UIDGID_NOT_16BIT     (old Unix 16-bit UID/GID extra field not used)
     [encryption, version 2.91 of 05 Jan 2007] (modified for Zip 3)

Encryption notice:
     The encryption code of this program is not copyrighted and is
     put in the public domain.  It was originally written in Europe
     and, to the best of our knowledge, can be freely distributed
     in both source and object forms from any country, including
     the USA under License Exception TSU of the U.S. Export
     Administration Regulations (section 740.13(e)) of 6 June 2002.

Zip environment options:
             ZIP:  [none]
          ZIPOPT:  [none]
INFO: State Changed: unlock buildroot</pre>
<p>Mock allows us to run developer submitted code as an unprivileged user to isolate their code and files from the rest of the machine.</p>
<pre>~/software/mock_mozilla $ mock_mozilla -r mozilla-f15-x86_64 --shell "whoami"
INFO: mock_mozilla.py version 1.1.17 starting...
INFO: State Changed: init plugins
INFO: selinux disabled
INFO: State Changed: start
INFO: State Changed: lock buildroot
INFO: State Changed: shell
root
INFO: State Changed: unlock buildroot
~/software/mock_mozilla $ mock_mozilla -r mozilla-f15-x86_64 --unpriv --shell "whoami"
INFO: mock_mozilla.py version 1.1.17 starting...
INFO: State Changed: init plugins
INFO: selinux disabled
INFO: State Changed: start
INFO: State Changed: lock buildroot
INFO: State Changed: shell
mock_mozilla
INFO: State Changed: unlock buildroot</pre>
<p>Putting all of the above together, I have written a <a href="https://github.com/jhford/mock_mozilla/blob/mozilla-changes/poc.sh">proof of concept script </a> and recorded a screencast of it building Firefox in a Mock sandbox.  I&#8217;ve cut the middle bit out because this takes a while on my Macbook-based VM.</p>
<p><video controls="controls"><br />
<source src="http://johnford.org/wp-content/mock.webm" type="video/webm;" /><br />
<a href="http://johnford.info/wp-content/mock.webm">Download in WebM (Firefox can play this!)</a><br />
</video></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnford.org/using-mock-to-build-firefox-on-linux/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
<enclosure url="http://johnford.org/wp-content/mock.webm" length="2228224" type="video/webm" />
<enclosure url="http://johnford.info/wp-content/mock.webm" length="2228224" type="video/webm" />
		</item>
		<item>
		<title>New OS X 10.7 build machine configuration almost ready &#8212; Are you able to help test the builds?</title>
		<link>http://blog.johnford.org/new-os-x-10-7-build-machine-configuration-almost-ready-are-you-able-to-help-test-the-builds/</link>
		<comments>http://blog.johnford.org/new-os-x-10-7-build-machine-configuration-almost-ready-are-you-able-to-help-test-the-builds/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 21:48:15 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://blog.johnford.org/?p=389</guid>
		<description><![CDATA[We are working on replacing our old Mac build slaves.  As shown in a previous blog post, our current Mac builders are very slow.  I am working on creating a OS X 10.7 builder configuration in bug 720470 and its gotten to the point where I need help verifying that these builds are valid and [...]]]></description>
			<content:encoded><![CDATA[<p>We are working on replacing our old Mac build slaves.  As shown in a previous <a title="Evaluating new Mac Mini builders, SSDs and -j settings" href="http://blog.johnford.org/new-mac-builders-ssds-j-settings/">blog post</a>, our current Mac builders are <em>very</em> slow.  I am working on creating a OS X 10.7 builder configuration in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=720470">bug 720470</a> and its gotten to the point where I need help verifying that these builds are valid and correct.  I&#8217;ve posted the complete output of two builds done on this new reference machine to my personal server (i.e. this site):</p>
<ul>
<li>Nightly build: <a href="http://johnford.org/files/2012-02-02-03-02-01-mozilla-central/">http://johnford.org/files/2012-02-02-03-02-01-mozilla-central/</a></li>
<li>Debug build: <a href="http://johnford.org/files/mozilla-central-macosx64lion-debug/">http://johnford.org/files/mozilla-central-macosx64lion-debug/</a></li>
</ul>
<p>The keen eye will notice that there are no links to shark builds.  As it happens, shark support on 10.7 is something we still need to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=723301">figure out</a>.  Once I have 10 more machines in our data center to test with, I am going to start producing these builds in a production environment for general consumption.  Soon after, we will want to start switching over to this new builder.  I&#8217;ll set these machines to build mozilla-central and project branches first and as we gain confidence, I&#8217;ll request approval to move Aurora and possibly Beta to these new machines.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnford.org/new-os-x-10-7-build-machine-configuration-almost-ready-are-you-able-to-help-test-the-builds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
