Contents |
fbuilder is the building system for Flock builds. It feeds tinderbox and downloadable builds.
fbuilder is an alternate tinderbox client. It builds software and publishes it, but does not report on its status in human readable way. fbuilder is far more generic.
fbuilder has all the same requirments as the Flock build environment. See Building Flock from Source.
Before you install fbuilder, be sure to have a non-privleged user named "build" on your machine.
Follow these steps:
Check out fbuilder into ~build/fbuilder.
$ svn co svn+ssh://svn.flock.com/home/svn/master/tools/trunk/fbuilder fbuilder
Follow instructions for your platform.
# cd ~build/fbuilder/startup/linux # make install-redhat or # make install-debian # /etc/init.d/fbuild start
tips for vmware buildserver
WARNING, if you install cygwin in an alternate path such as C:\Cygwin-Install
You must change these directions to reflect that and you must change the start-build.bat script
As a user with adminstrator access
As a build user you can just click on start-build.bat. Warning: It will not work well if it is already running, and this .bat file destroys the lock mechanism.
Additionally if building an official Flock binaries
You need to install Microsoft Platfrom SDK 2003 R2 (appropriate for Windows XPpro)
Once this is installed. Signtool must be run as a user with adminstrator privleges once. After this time the build user can run the program as long the as the build user is "logged in."
# cd ~build/fbuilder/startup/mac # make # make install # SystemStarter start MacFbuild
Disable spotlight!
Create a config at ~build/conf/tinderbox-build.conf
$ svn co svn+ssh://svn.flock.com/home/svn/private/fbuilder-conf/trunk/conf conf $ cd conf $ ln -s DIR/CONFIGFILE tinderbox-build.conf
The primary application is ~build/fbuilder/bin/tinderbox-build, it only accepts two somewhat exclusive optional arguments
tinderbox-build --config=ABSOLUTE_PATH_TO_FILENAME
tinderbox-build --thread-config=ABSOLUTE_PATH_TO_FILENAME
This is a simpler config file than a stander tinderbox-build config.
It lists paths to config files separated by new lines. If the path does not begin with a / it assumes it is a relative path to $HOME/conf
It will then iterate through the configs in the order they appear in the file (if the config exists on the filesystem). When it gets to the end of the list it will re-read the thread-config file to check for updates.
This feature is fully backwards compatible with daisy chained configs and once the chain has completed once it will move on to the next line in the thread-config.
Config file parameters can override anything in %global in a tinderbox-build.
Syntax of the config file:
Example:
# example comment SU = /usr/bin/su TEST_SCRIPT = /usr/bin/true daemonize = 0 BUILD_ARGS_STRING = F_SCM_BRANCH=trunks/buzzard buildname = MacOS 10.4 (admins-mac-mini.local) MAIL = /Users/build/conf/public/scripts/deliver ARCHIVE = true MAX_BUILDS = 1 CONFIG_FILE = /Users/build/conf/cardinal/parrot.conf
A few special config options
# include is non-recursive and pulls in 1 other config file, the name must be surround in double quotes # this is parsed at the time of reading the config file # include "ABSOLUTE_PATHNAME" # # This is actually the NEXT configfile to be read, it doesn't read it the first pass but does the second time # you should make all configfile in a chain use the same pidfile, if the CONFIG_FILE specified does not exit # the tinderbuilder will keep on using its last config until the file does exist # CONFIG_FILE = ABSOLUTE_PATHNAME # # this is is always appended to BUILD_ARGS_STRING, this exists only to allow template include files # build arguments are passed along to helper scritps as argument to build, deliver, and otheres # BUILD_ARGS_STRING1 = BUILD_ARGUMENT=VALUE
SIGNALS handled by tinderbox-build
There are two major strategies. Reboot the machine and let the startup scripts do it for you, or kill the processes listed in the PIDFILE (defaul value ~build/tinderbox-build.pid) -QUIT. There are specfic problems with each platform.
you can only send SIGNAL ipc from withing the same login session, and sometimes only within the same shell depending on how buggy cygwin has become. This makes killing a build that started out of standard startup procedure impossible, because cygwin cannot communicate with the processes. start-build.bat just wipes out the default pidfile and relaunches tinderbox-build, which makes it unsafe to run by hand as two build ast the same time cause problems.
The mac gets tinderbox-build process get automatically restarted every 10 seconds by macbuildd. macbuildd exist to provide bootstrap context so that the disk image utilities can be run. Basicilly all it has to do is sit there as root process and have direct parentage of the build script. It has it own lock files in /var/tmp/ (default /var/tmp/macbuildd.pid) macbuildd will clean up its pidfile when sent a QUIT signal.
This script requires sudo access as macbuildd must be run as root
$ start-macbuildd.sh /Users/build/config/cardinal/locale/crane-pl.conf locale
This starts a new macbuildd using the tmp file /var/tmp/locale-macbuildd.pid, and will launch tinderbox-build as user build with --config=/Users/build/config/cardinal/locale/crane-pl.conf argument.
or
this requires the build users password as it tries to su to build to start the build
Putting this in a separate document for now
If things are to make it to tinderbox or tinderbox build more steps need to be taken.
1 First ssh key trust must be setup between the build user on the build server to the archive server (archive.hq.flock.com) and tinderbox messageing server (tinderbox.flock.com).
2 The next step is update builds.txt on the archive server (archive.hq.flock.com:/archive/builds/installer/builds.txt)
trunk/crane.hq.flock.com trunk/mac trunk/chicken4 trunk/windows trunk/cuckoo trunk/linux trunk/chicken2 trunk/windows_incremental
This format
Left Side
Right Side
3 create the relative directories if you re creating a new server i.e. on archive.hq.flock.com as the build user.
$ mkdir archive.hq.flock.com:/archive/builds/installer/BRANCH/HOSTNAME
This makes the tree live.
checkout tinderbox (to your own machine, with SVN installed) website code and edit
$ svn co svn+ssh://svn.flock.com/home/svn/tools/tinderbox/trunk tinderbox
edit tinderbox/tinderbox2/default_conf/TreeData.pm
add your new tree definition to %VC_TREE
%VC_TREE = (
...
'BRANCH_BRANDING' => {
root => '/home/cvs/svn/master/flock',
module => 'all',
branch => 'branches/BRANCH',
},
next create the build directory for the builds and copy in the download application
$ svn cp tinderbox/tinderbox.flock.com/builds/trunk_sulfur tinderbox/tinderbox.flock.com/builds/BRANCH_BRANDING
the customize the message down in the html
$ vi tinderbox/tinderbox.flock.com/BRANCH_BRANDING/index.php
...
These are testing builds for branches/BRANCH
commit changes
$ svn ci tinderbox
login to tinderbox.flock.com become the tinderbox users and update the home directory
$ ssh -l USERNAME tinderbox.flock.com $ sudo su - tinderbox $ svn up .
make the build directories own by group build and writable
$ cd ~tinderbox/tinderbox.flock.com/builds/
$ sudo chgrp build BRANCH_BRANDING/{linux,mac,windows}
$ sudo chmod g+rwx BRANCH_BRANDING/{linux,mac,windows}
out of users tinderbox's crontab tinder.cgi --daemon-mode gets run every 5 minutes and that will produce.
http://tinderbox.flock.com/BRANCH_BRANDING/status.html
You need to Administer the tree
http://tinderbox.flock.com/cgi-bin/tinderbox/admintree.cgi?tree=BRANCH_BRANDING
after creating a password and adding someone else to be an admin at the bottom set the message of the day so people can find the builds.
A HREF="/builds/BRANCH_BRANDING">Download</A> builds created by the code at A HREF="http://svn-mirror.flock.com/trac/flock/browser/branches/BRANCH">branches/BRANCH</A>.
due to spam protection on this wiki you must manually add the < in front of both "A"
Diagram to help explain things on the left hand side are at rackspace and things on the right hand side are behind the firewall in the flock office.