website rev 511

Add Cookbook page about SliTaz Build Bot (tazbb)
author Christophe Lincoln <pankso@slitaz.org>
date Sat Jun 20 00:16:20 2009 +0200 (2009-06-20)
parents 7a4bd9bced35
children 86c34ce79f94
files en/doc/cookbook/build-bot.html en/doc/cookbook/index.html
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/en/doc/cookbook/build-bot.html	Sat Jun 20 00:16:20 2009 +0200
     1.3 @@ -0,0 +1,180 @@
     1.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     1.5 +	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     1.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     1.7 +<head>
     1.8 +	<title>SliTaz Cookbook (en) - Build Bot</title>
     1.9 +	<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    1.10 +	<meta name="description" content="slitaz English cookbook" />
    1.11 +	<meta name="expires" content="never" />
    1.12 +	<meta name="modified" content="2009-06-20 00:10:00" />
    1.13 +	<meta name="publisher" content="www.slitaz.org" />
    1.14 +	<meta name="author" content="SliTaz contributors"/>
    1.15 +	<link rel="shortcut icon" href="favicon.ico" />
    1.16 +	<link rel="stylesheet" type="text/css" href="book.css" />
    1.17 +</head>
    1.18 +<body bgcolor="#ffffff">
    1.19 +
    1.20 +<!-- Header and quick navigation -->
    1.21 +<div id="header">
    1.22 +<div align="right" id="quicknav">
    1.23 +	<a name="top"></a>
    1.24 +	<a href="build-host.html">Build host</a> |
    1.25 +	<a href="index.html">Table of contents</a>
    1.26 +</div>
    1.27 +<h1><font color="#3E1220">SliTaz Cookbook (en)</font></h1>
    1.28 +</div>
    1.29 +
    1.30 +<!-- Content. -->
    1.31 +<div id="content">
    1.32 +<div class="content-right"></div>
    1.33 +
    1.34 +<h2><font color="#DF8F06">Build Bot (tazbb)</font></h2>
    1.35 +
    1.36 +<p>
    1.37 +The goal of Tazbb is to automate, test and report packages building from a
    1.38 +wok. Run <code>tazbb usage</code> for the list of available commands with
    1.39 +a short description. Status of Tank Build Bot via Tazbb web interface at
    1.40 +<a href="http://bb.slitaz.org/">bb.slitaz.org</a> and for collaboration:
    1.41 +<a href="http://labs.slitaz.org/wiki/distro/Tazbb">Tazbb Wiki</a>.
    1.42 +</p>
    1.43 +
    1.44 +<ul>
    1.45 +	<li><a href="#about">How it works</a></li>
    1.46 +	<li><a href="#cmds">Commands</a></li>
    1.47 +	<li><a href="#wok">Hg and chroot Wok</a></li>
    1.48 +	<li><a href="#log">Log files</a></li>
    1.49 +	<li><a href="#web">Web interface</a></li>
    1.50 +	<li><a href="#hg-hook">Hg hook</a></li>
    1.51 +	<li><a href="#cron">Cron Job</a></li>
    1.52 +	<li><a href="#db">Database Files</a></li>
    1.53 +</ul>
    1.54 +
    1.55 +<a name="about"></a>
    1.56 +<h3>How it works</h3>
    1.57 +<p>
    1.58 +Tazbb can be run by a cron job and check the last commit done by contributors
    1.59 +and then cook modified packages. Runnning 'tazbb cook-commit' will just
    1.60 +rebuild last modified packages, to rebuild all missing, modified or unbuilt
    1.61 +packages you must use 'tazbb cook-all'.
    1.62 +</p>
    1.63 +<p>
    1.64 +Generating report will source all receipt in the wok and check if the package
    1.65 +file exist, if not we add the package name in the current cooklist. For
    1.66 +existing packages we compare all files date in the Hg wok (receipt, stuff)
    1.67 +to the package.tazpkg file date, if it differ we add the package to the cooklist.
    1.68 +</p>
    1.69 +<p>
    1.70 +Tazbb must also look in the chroot wok to check if the package is built, there
    1.71 +should be a taz/ directory, if none we log and add it also to the cooklist.
    1.72 +All package are cooked with 'script', log for cooked packages are stored in
    1.73 +$LOG_DIR and a link exist for the web interface so developers can easily check
    1.74 +the bug.
    1.75 +</p>
    1.76 +<p>
    1.77 +When run with the option 'cook' Tazbb will also remove oold and corrupted packages,
    1.78 +and then execute 'tazwok genlist --text' to rebuild all packages lists. To work
    1.79 +properly Tazwok and Tazbb configured paths must match. Tazbb system wide configuration
    1.80 +file is: <code>/etc/slitaz/tazbb.conf</code>
    1.81 +</p>
    1.82 +
    1.83 +<a name="cmds"></a>
    1.84 +<h3>Commands</h3>
    1.85 +<p>
    1.86 +Tazbb can be installed on your machine and be run manualy from the command
    1.87 +line, just type 'tazbb usage' for a list of available functions. Tazbb can be
    1.88 +run in report mode and display more information with the '--verbose' option.
    1.89 +</p>
    1.90 +
    1.91 +<a name="woks"></a>
    1.92 +<h3>Hg and chroot Wok</h3>
    1.93 +<p>
    1.94 +Tazbb use 2 wok: a clean Hg wok and a wok to build package in a chroot.
    1.95 +Each time Tazbb is called, the Hg wok is updated and copied to the build
    1.96 +wok so we avoid messing with build results and we can also modify manually
    1.97 +receipts or patches directly with affecting the main Hg. If configured
    1.98 +correctly 'tazdev update-wok' can also update the Hg wok and copy files.
    1.99 +</p>
   1.100 +
   1.101 +<a name="log"></a>
   1.102 +<h3>Log files</h3>
   1.103 +<p>
   1.104 +Tazbb use existing tool such as tazwok to build package but generate it own
   1.105 +log files and have it own database stored in text file. The log files are
   1.106 +available throught the web interface and the default path for the files is
   1.107 +naturally: <code>/var/log/tazbb</code>
   1.108 +</p>
   1.109 +
   1.110 +<a name="web"></a>
   1.111 +<h3>Web interface</h3>
   1.112 +<p>
   1.113 +Tazbb log's all his activity to log files and cooklist, these informations
   1.114 +can be displayed throught a nice web interface so developers can have a quick
   1.115 +overview of the last build results. Tazbb package provide a PHP web interface,
   1.116 +CSS style and images installed by default in <code>/var/lib/tazbb/web</code>,
   1.117 +a symlink is created in <code>/var/www/vhosts</code> by the package, it provide
   1.118 +easy access to the generated log files through a virtual host or you can use:
   1.119 +http://localhost/vhosts/bb
   1.120 +</p>
   1.121 +
   1.122 +<a name="hg-hook"></a>
   1.123 +<h3>Hg hook</h3>
   1.124 +<p>
   1.125 +Mercurial offers a powerful mechanism to perform automated actions in response
   1.126 +to events that occur in a repository. The name Mercurial uses for one of these
   1.127 +actions is a hook. So Tazbb can be run each time a commit is done in the wok
   1.128 +throught a simple hook in the .hgrc file of the repository. Example :
   1.129 +</p>
   1.130 +<pre class="script">
   1.131 +[hooks]
   1.132 +commit = tazbb cook-commit
   1.133 +</pre>
   1.134 +
   1.135 +<a name="cron"></a>
   1.136 +<h3>Cron Job</h3>
   1.137 +<p>
   1.138 +Tazbb can be run by a cron tab, so each new commit in the wok will cook the
   1.139 +correct package ech time you want, cron can also be used to refresh the report
   1.140 +or run a full cook. If the last cook is not yet finished or if tazbb has been
   1.141 +run by hand and is still running, it will exit due to a lock file in /var/lock.
   1.142 +Example of cron job's to cook commit each 2 hour and cook all missing, modified
   1.143 +or unbuilt packages each night :
   1.144 +</p>
   1.145 +<pre class="script">
   1.146 +*/2 * * * * /usr/bin/tazbb cook-commit
   1.147 +03 02 * * * /usr/bin/tazbb cook-all
   1.148 +</pre>
   1.149 +
   1.150 +<a name="db"></a>
   1.151 +<h3>Database Files</h3>
   1.152 +<ul>
   1.153 +	<li>blocked    : List of blocked packages</li>
   1.154 +	<li>cooklist   : Current or next cooklist</li>
   1.155 +	<li>corrupted  : Corrupted packages list</li>
   1.156 +	<li>packaged   : All packages from the build wok</li>
   1.157 +	<li>removed    : Last removed packages</li>
   1.158 +	<li>report     : Last report from check_{wok,commit}</li>
   1.159 +	<li>running    : Current task running</li>
   1.160 +	<li>summary    : Last summary for the web interface</li>
   1.161 +	<li>unbuilt    : List of unbuilt packages</li>
   1.162 +</ul>
   1.163 +
   1.164 +<!-- End of content -->
   1.165 +</div>
   1.166 +
   1.167 +<!-- Footer. -->
   1.168 +<div id="footer">
   1.169 +	<div class="footer-right"></div>
   1.170 +	<a href="#top">Top of the page</a> |
   1.171 +	<a href="index.html">Table of contents</a>
   1.172 +</div>
   1.173 +
   1.174 +<div id="copy">
   1.175 +	Copyright &copy; 2009 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   1.176 +	<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   1.177 +	Documentation is under
   1.178 +	<a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   1.179 +	and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   1.180 +</div>
   1.181 +
   1.182 +</body>
   1.183 +</html>
     2.1 --- a/en/doc/cookbook/index.html	Fri Jun 19 23:17:13 2009 +0200
     2.2 +++ b/en/doc/cookbook/index.html	Sat Jun 20 00:16:20 2009 +0200
     2.3 @@ -6,7 +6,7 @@
     2.4      <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
     2.5      <meta name="description" content="slitaz English cookbook" />
     2.6      <meta name="expires" content="never" />
     2.7 -    <meta name="modified" content="2009-03-27 21:30:00" />
     2.8 +    <meta name="modified" content="2009-06-20 00:10:00" />
     2.9      <meta name="publisher" content="www.slitaz.org" />
    2.10      <meta name="author" content="Christophe Lincoln"/>
    2.11      <link rel="shortcut icon" href="favicon.ico" />
    2.12 @@ -33,36 +33,40 @@
    2.13  
    2.14  <ul>
    2.15  	<li><a href="wok-tools.html">Wok &amp; Tools</a> - SliTaz Package Tools.</li>
    2.16 -	<li><a href="receipts.html">Receipts</a> - Receipts for creating SliTaz packages.</li>
    2.17 +	<li><a href="receipts.html">Receipts</a> - Receipts for creating SliTaz
    2.18 +	packages.</li>
    2.19  	<li><a href="build-host.html">Build Host</a> - SliTaz Build host (tank).</li>
    2.20 -	<li><a href="boot-scripts.html">Boot Scripts</a> - The startup and shutdown scripts.</li>
    2.21 +	<li><a href="build-bot.html">Build Bot</a> - SliTaz Build bot (tazbb).</li>
    2.22 +	<li><a href="boot-scripts.html">Boot Scripts</a> - The startup and shutdown
    2.23 +	scripts.</li>
    2.24  	<li><a href="slitaz-tools.html">SliTaz Tools</a> - The Toolbox.</li>
    2.25 -	<li><a href="reltasks.html">Release Tasks</a> - List of things to do before publishing a new version (Cooking or stable).</li>
    2.26 -	<li><a href="rootcd.html">Root cdrom (rootcd)</a> - Descriptions of files contained on the cdrom.</li>
    2.27 +	<li><a href="reltasks.html">Release Tasks</a> - List of things to do before
    2.28 +	publishing a new version.</li>
    2.29 +	<li><a href="rootcd.html">Root cdrom (rootcd)</a> - Descriptions of files
    2.30 +	contained on the cdrom.</li>
    2.31  </ul>
    2.32  
    2.33  <h3>About this Cookbook</h3>
    2.34  <p>
    2.35 -The Cookbook brings together information about the project management, operation and 
    2.36 -development of the distribution. It talks about creating packages, receipts, the wok, 
    2.37 -and scripts that start SliTaz.
    2.38 +The Cookbook brings together information about the project management, operation
    2.39 +and development of the distribution. It talks about creating packages, receipts,
    2.40 +the wok, and scripts that start SliTaz.
    2.41  </p>
    2.42  <p>
    2.43 -At the base of the Cookbook is the <a href="../scratchbook/">Scratchbook</a>, 
    2.44 -this contains instructions to create your own LiveCD by describing the creation of the 
    2.45 -first ever public version of SliTaz in March 2007. 
    2.46 -The Cookbook is modified by the SliTaz community and steadily improved, it provides technical
    2.47 -instructions about the project useful to developers and advanced users.
    2.48 +At the base of the Cookbook is the <a href="../scratchbook/">Scratchbook</a>,
    2.49 +this contains instructions to create your own LiveCD by describing the creation
    2.50 +of the first ever public version of SliTaz in March 2007. The Cookbook is modified
    2.51 +by the SliTaz community and steadily improved, it provides technical instructions
    2.52 +about the project useful to developers and advanced users.
    2.53  </p>
    2.54  
    2.55 -
    2.56  <!-- End of content -->
    2.57  </div>
    2.58  
    2.59  <!-- Footer. -->
    2.60  <div id="footer">
    2.61  	<div class="footer-right"></div>
    2.62 -	<a href="#top">Top of the page</a> | 
    2.63 +	<a href="#top">Top of the page</a> |
    2.64  	<a href="index.html">Table of contents</a>
    2.65  </div>
    2.66