Tinderbox

This article describes the FreeBSD source tinderbox. To learn more about what it does, take a look at the current FreeBSD src build status.

The tinderbox ecosystem consists of:

History

tinderbox scripts were developed and are maintained by DagErlingSmørgrav. The original version was a shell script that ran on bento.freebsd.org once a day, after one Alpha-breaking commit too many. It was replaced with the current Perl implementation in early 2003.

All scripts and configuration files are kept in base/user/des/tinderbox.

Dashboard & Build Status

Note: The service described here is no longer operational and now redirects to the FreeBSD Jenkins Continuous Integration service: Tinderbox-style view.

Summaries and logs from the official build servers are made available online at http://tinderbox.freebsd.org/.

Currently, this site is hosted by DagErlingSmørgrav. The site is set up as follows:

tinderbox script

This section has not yet been written. See the tinderbox(1) manual page for details.

tbmaster script

This section has not yet been written. See the tbmaster(1) manual page for details.

Configuration Files

This section has not yet been written.

index.cgi script

The index.cgi script generates the HTML summary. Although intended to be used as a CGI script (as the name indicates), it can also be run from the command line, or from a cron job, in which case it will look for logs in the directory in which the script itself is located. It will automatically detect the context, and output HTTP headers only if run as a CGI script.

The script outputs strict XHTML 1.0 code and uses CSS for styling.

MAIN

The script's entry point is in the named block MAIN.

The script starts by attempting to verify that it is running on the official tinderbox web site. If it isn't, the page it produces will include text to that effect, and a link to the official site.

It then scans the log directory to get an inventory of configurations, branches and architectures for which log files exist, to avoid hard-coding a list into the script and potentially ending up with blank rows or columns. This information is derived from the names of the log files, which match the following pattern:

tinderbox-$config-$branch-$arch-$machine.{brief,full}

The configurations used on the official tinderbox build servers are named for the branches they build; for instance, the releng_6 configuration is used to build RELENG_6 as well as all still-supported release branches.

Once this has been determined, the script generates a prologue, calls do_config() for each configuration, and generates an epilogue.

do_config()

The do_config() subroutine generates HTML code for a single tinderbox configuration.

It first generates a header row, then iterates over each branch build with this particular configuration, producing a single row of results for each in the following manner:

success()

The success() subroutine scans a brief log file to determine whether the build was successful. This is done quite simply by searching for the string "tinderbox run completed".

Build Sorting

Configurations and branches are sorted according to their branch rank, which is computed as follows:

In practical terms, this means that HEAD always ranks highest, and that RELENG branches are ranked in numerical order, with each STABLE branch ranking higher than the release branches forked off of it. For instance, for FreeBSD 6, the order will be, from highest-ranking to lowest-ranking:

Colors

The summary script uses CSS to apply different colors to each cell in the table. Successful builds are displayed with green text, failed builds with red text. The color fades as time passes since the corresponding build, with every half-hour bringing it one step closer to gray.

Official Build Servers

The official tinderbox build servers are hosted by Sentex Data Communications, who also host the FreeBSD netperf cluster.

There are currently three build servers:

freebsd-current.sentex.ca
builds
  • HEAD for amd64, arm, i386, pc98, ia64, mips, powerpc, and sparc64; this takes about four hours.

  • RELENG_8 for amd64, arm, i386, pc98, ia64, mips, powerpc and sparc64; this takes about three and a half hours.

freebsd-stable.sentex.ca
builds RELENG_7 and supported 7.x branches for amd64, i386, pc98, ia64, powerpc and sparc64; each branch takes about six hours.
freebsd-legacy.sentex.ca
builds RELENG_6 and supported 6.x branches for amd64, i386, pc98 and sparc64; each branch takes about three hours.

Future Work

Suggested improvements:

See DagErlingSmørgrav/LightMyFire for more information on this subject.


CategoryServices CategoryStale

Tinderbox (last edited 2022-10-06T02:57:16+0000 by KubilayKocak)