<?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</title>
	<atom:link href="http://blog.johnford.org/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>For those searching for Cayman S in Norcal</title>
		<link>http://blog.johnford.org/for-those-searching-for-cayman-s-in-norcal/</link>
		<comments>http://blog.johnford.org/for-those-searching-for-cayman-s-in-norcal/#comments</comments>
		<pubDate>Thu, 17 May 2012 02:02:49 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Cars]]></category>

		<guid isPermaLink="false">http://blog.johnford.org/?p=473</guid>
		<description><![CDATA[This was a page before, but I&#8217;d like to move it from my pages to a post since my search has concluded. Here are the important links. Caymans at Dealers: Sonnen (Mill Valley) Rector (Burlingame) Michael Stead Porsche (Walnut Creek) Stevens Creek Carlsen (Redwood City) Monterey Livermore Fremont Michael (Fresno) Bakersfield Yahoo Autos for Cayman [...]]]></description>
			<content:encoded><![CDATA[<p>This was a page before, but I&#8217;d like to move it from my pages to a post since my search has concluded.  Here are the important links.</p>
<p>Caymans at Dealers:</p>
<ul>
<li><a href="http://sonnen.porschedealer.com/preowned/search.php?model=Cayman%20S">Sonnen</a> (Mill Valley)</li>
<li><a href="http://rector.porschedealer.com/preowned/search.php?model=Cayman%20S">Rector</a> (Burlingame)</li>
<li><a href="http://michael-stead.porschedealer.com/preowned/search.php?model=Cayman%20S">Michael Stead Porsche</a> (Walnut Creek)</li>
<li><a href="http://www.stevenscreekporsche.com/inventory.aspx?_used=true&amp;_makef=porsche&amp;_model=cayman&amp;_transclass=1">Stevens Creek</a></li>
<li><a href="http://carlsen.porschedealer.com/preowned/search.php?model=Cayman%20S">Carlsen </a>(Redwood City)</li>
<li><a href="http://porscheofmonterey.com/new/Porsche/Cayman/search.php">Monterey</a></li>
<li><a href="http://livermore.porschedealer.com/preowned/search.php?model=Cayman%20S">Livermore</a></li>
<li><a href="http://fremont.porschedealer.com/preowned/search.php?model=Cayman%20S">Fremont</a></li>
<li><a href="http://michael.porschedealer.com/preowned/search.php?model=Cayman%20S">Michael </a>(Fresno)</li>
<li><a href="http://bakersfield.porschedealer.com/preowned/search.php?model=Cayman%20S">Bakersfield</a></li>
</ul>
<p><a href="http://autos.yahoo.com/used-cars/overview?sortcol=price&amp;askpriceub=any&amp;askpricelb=any&amp;deliverymileageub=any&amp;deliverymileagelb=any&amp;location=San+Francisco%2C+CA+94107&amp;listingtype=used&amp;model=cayman&amp;make=porsche&amp;distance=100">Yahoo Autos for Cayman + Cayman S</a><br />
<a href="http://www.edmunds.com/inventory/used/srp.html?radius=100&amp;zip=94107&amp;model=Porsche|Cayman+Coupe&amp;sort=price|asc&amp;currentpage=1">Edmunds for Cayman + Cayman S</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnford.org/for-those-searching-for-cayman-s-in-norcal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Android NDK r7b available on Try and Production build slaves for testing</title>
		<link>http://blog.johnford.org/android-ndk-r7b-available-on-try-and-production-build-slaves-for-testing/</link>
		<comments>http://blog.johnford.org/android-ndk-r7b-available-on-try-and-production-build-slaves-for-testing/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 17:49:02 +0000</pubDate>
		<dc:creator>John Ford</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://blog.johnford.org/?p=469</guid>
		<description><![CDATA[With bug 675572 being resolved this week, we now have a copy of the Android NDK r7b available for testing and use. It is installed on the build machines and has an NDK root of /tools/android-ndk-r7b/ and a toolchain root of /tools/android-ndk-r7b/toolchains/arm-linux-androideabi-4.6.3/prebuilt/linux-x86/. This toolchain change includes us using the Gold linker by default for better [...]]]></description>
			<content:encoded><![CDATA[<p>With <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=675572" title="bug 675572">bug 675572</a> being resolved this week, we now have a copy of the Android NDK r7b available for testing and use.  It is installed on the build machines and has an NDK root of <code>/tools/android-ndk-r7b/</code> and a toolchain root of <code>/tools/android-ndk-r7b/toolchains/arm-linux-androideabi-4.6.3/prebuilt/linux-x86/</code>.  This toolchain change includes us using the Gold linker by default for better linking times.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.johnford.org/android-ndk-r7b-available-on-try-and-production-build-slaves-for-testing/feed/</wfw:commentRss>
		<slash:comments>0</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>
	</channel>
</rss>
