For more information about the tinderbox and tbmaster scripts at this stage, see their respective man pages: tinderbox(1) and tbmaster(1).
The index.cgi script generates the HTML summary of tinderbox and tbmaster logs. Although originally intended to be used as a CGI script, as indicated by its name, this script can also be run from the command line or from a cron(8) job, in which case it will look for logs in the directory where the script is located. It will automatically detect context, generating HTTP headers when it is run as a CGI script. It conforms to XHTML standards and is styled using CSS.
The script starts in the
main() block by attempting to verify that it is running on the official Tinderbox website. If it is not, a page indicating it is not an official website is produced, and a URL to the official site is provided.
Next, it 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 matching the following pattern:
The configurations used on the official Tinderbox build servers are named for the branches they build. For example, the
releng_8 configuration is used to build
RELENG_8 as well as all still-supported release branches.
Once all of this startup procedure has been successfully completed,
do_config() is called for each configuration.
do_config() function generates HTML for a single Tinderbox configuration.
It works by first generating a header row, then iterating over each branch build with the specified configuration, producing a single row of results for each in the following manner:
For each item:
For each machine within that architecture:
If a brief log file exists, then:
success() to determine the outcome of the build.
Output the modification size.
Output the size of the brief log file with a link to the log file itself.
If a full log file also exists, then:
Output the size of the full log file with a link to the log file itself.
success() function mentioned above scans a brief log file for the string "tinderbox run completed" in order to determine whether the build was successful.
Configurations and branches are sorted according to their branch rank. This is computed as follows:
CURRENT have rank 9999.
RELENG_x has rank
RELENG_x_y has rank xxyy.
This means that
HEAD always ranks highest, and
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 8, the order from highest to lowest would be:
RELENG_8 (branch rank 899).
RELENG_8_3 (branch rank 803).
RELENG_8_2 (branch rank 802).
RELENG_8_1 (branch rank 801).
RELENG_8_0 (branch rank 800).
The colors that Tinderbox uses for each cell in the table are defined by CSS. Successful builds are displayed with green text; unsuccessful builds are displayed with red text. The color fades as time passes since the corresponding build, with every half an hour bringing the color closer to grey.
The official Tinderbox build servers are hosted by Sentex Data Communications, who also host the FreeBSD Netperf Cluster.
Three build servers currently exist:
HEAD for amd64, arm, i386, i386/pc98, ia64, mips, powerpc, powerpc64, and sparc64.
RELENG_9 and supported 9.X branches for amd64, arm, i386, i386/pc98, ia64, mips, powerpc, powerpc64, and sparc64.
RELENG_8 and supported 8.X branches for amd64, i386, i386/pc98, ia64, mips, powerpc and sparc64.
RELENG_7 and supported 7.X branches for amd64, i386, i386/pc98, ia64, powerpc, and sparc64.