2001-12-31 21:39:20 +03:00
|
|
|
|
|
|
|
Tinderbox Documentation:
|
|
|
|
------------------------
|
2001-12-21 22:45:31 +03:00
|
|
|
|
2001-12-31 23:03:15 +03:00
|
|
|
*) Every directory has a ReadMe file which tells about all the files
|
2001-12-21 22:45:31 +03:00
|
|
|
in that directory.
|
|
|
|
|
|
|
|
*) Every executable can be run with --help so that you can see what
|
|
|
|
the program does and what its arguments are. If you have trouble
|
|
|
|
running the file just look at the file in a text editor and find
|
|
|
|
the string "usage".
|
|
|
|
|
2001-12-31 21:39:20 +03:00
|
|
|
*) The top of every file (both code and configuration) has a short
|
|
|
|
explanation of what this file does.
|
|
|
|
|
2001-12-21 22:45:31 +03:00
|
|
|
*) The code has lots of documentation so you can read the code if you
|
|
|
|
need more details about how something works.
|
|
|
|
|
2000-08-15 02:22:15 +04:00
|
|
|
|
|
|
|
To install:
|
2001-12-31 21:39:20 +03:00
|
|
|
-----------
|
2000-06-22 08:17:19 +04:00
|
|
|
|
2002-04-25 04:14:36 +04:00
|
|
|
|
|
|
|
*) You will need to ensure that Perl is installed on your webserver.
|
|
|
|
It would be a good idea to have these modules installed:
|
|
|
|
Storable, Date::Format,
|
|
|
|
|
2003-08-04 21:15:17 +04:00
|
|
|
You can easily check if these are installed by executing these two
|
|
|
|
commands.
|
|
|
|
|
|
|
|
If the module is installed, you'll get no output:
|
|
|
|
perl -e 'use Storable'
|
|
|
|
perl -e 'use Date::Format'
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-12-31 23:03:15 +03:00
|
|
|
*) Read the Policies and Overview documents found in this directory to
|
|
|
|
help you get a feel for the scope of this installation.
|
|
|
|
|
2003-08-04 21:15:17 +04:00
|
|
|
*) The process id which receives and process the mail must be the
|
2002-04-24 07:23:12 +04:00
|
|
|
same id which runs the tinderbox cron job to prepare the web pages. I
|
|
|
|
prefer to manage my webserver so that all CGI scripts do not run as
|
|
|
|
the same user. Using one user id can cause security problems which
|
|
|
|
are hard to detect. If you must run all web applications as a single
|
|
|
|
user it would be safer to ensure that this user is a specific web user
|
|
|
|
(apache, cgiuser, webuser) so that this is not mixed up with other
|
|
|
|
unix system users (daemon, nobody, bin) since this could cause
|
|
|
|
security interactions with other programs which use these ids.
|
|
|
|
|
|
|
|
It may take some thought as to how the user id will be configured to
|
2003-08-04 21:15:17 +04:00
|
|
|
run when receiving mail and when receiving web requests and not be a
|
2002-04-24 07:23:12 +04:00
|
|
|
user id which will cause security problems.
|
|
|
|
|
2003-08-04 21:15:17 +04:00
|
|
|
These products will help partition your web application to run as
|
2002-04-24 07:23:12 +04:00
|
|
|
different users. (See http://www.w3.org/Security/Faq/wwwsf4.html for
|
|
|
|
more info)
|
|
|
|
|
|
|
|
CGIWrap
|
|
|
|
http://cgiwrap.unixtools.org/
|
2002-04-26 05:57:59 +04:00
|
|
|
http://sourceforge.net/projects/cgiwrap/
|
2002-04-24 07:23:12 +04:00
|
|
|
|
|
|
|
sbox: Put CGI Scripts in a Box
|
|
|
|
http://stein.cshl.org/software/sbox/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The Apache Web server comes with its own wrapper script called suEXEC.
|
|
|
|
|
2001-12-14 23:14:25 +03:00
|
|
|
*) The src/default_conf directory contains perl libraries which are
|
2000-11-30 00:12:56 +03:00
|
|
|
specific to an individual users site configuration. No two users of
|
|
|
|
Tinderbox will have the identical sets of files.
|
|
|
|
|
2001-12-14 23:14:25 +03:00
|
|
|
The files found in default_conf are sample files which are used at
|
2001-12-31 21:39:20 +03:00
|
|
|
Mozilla.org. Other users are expected to customize these libraries and
|
2001-12-14 23:14:25 +03:00
|
|
|
install the modified libraries in local_conf. Files found in
|
|
|
|
local_conf will be used before any file found in default_conf.
|
2000-11-30 00:12:56 +03:00
|
|
|
The distribution of Tinderbox will never place any files in the
|
2001-12-14 23:14:25 +03:00
|
|
|
local_conf directory as this is assumed to be under local control.
|
2000-11-30 00:12:56 +03:00
|
|
|
|
|
|
|
A quick overview of the files:
|
|
|
|
|
|
|
|
TinderConfig.pm: general configuration settings
|
|
|
|
(HTML directories, Log files, implementations of libraries
|
|
|
|
to use, etc).
|
2000-11-30 00:47:14 +03:00
|
|
|
TreeData.pm: version control (CVS, Bonsai) configuration.
|
2000-11-30 00:12:56 +03:00
|
|
|
Error_Parse.pm: the regular expressions for identifying
|
|
|
|
errors in build logs.
|
2000-11-30 00:47:14 +03:00
|
|
|
BTData.pm: bug tracking configuration
|
2000-11-30 00:12:56 +03:00
|
|
|
FileStructure.pm: filesystem (storage) and global/per-project
|
|
|
|
settings. Most users will not have to change this.
|
|
|
|
|
2001-12-21 22:45:31 +03:00
|
|
|
|
|
|
|
In particular you will need a TinderConfig.pm and a TreeData.pm which
|
2001-12-31 21:39:20 +03:00
|
|
|
describes your local setup. You may need to make local versions of
|
2001-12-21 22:45:31 +03:00
|
|
|
the other files depending on how you wish to have Tinderbox configured.
|
|
|
|
|
2001-12-21 23:10:05 +03:00
|
|
|
I install Tinderbox via RPM. I have three RPMS. One tracks changes in
|
|
|
|
the Tinderbox server source code just as I get it from CVS. One RPM
|
|
|
|
contains my local_conf files. The clientbin files get put in their
|
|
|
|
own RPM which is installed on the buildmachine along with the
|
|
|
|
local_conf files. I do not currently have all the other configuration
|
|
|
|
details worked out (crontab files, /etc/rc.d/init.d, .cvspass,) but
|
|
|
|
most of the state of my machines is under RPM control.
|
2001-12-21 22:45:31 +03:00
|
|
|
|
2000-11-30 00:12:56 +03:00
|
|
|
*) Run ./configure. When configure is done you will have a Makefile
|
|
|
|
and a config.out. Although Tinderbox consists entirely of perl
|
|
|
|
scripts we must substitute some values into the source code to make it
|
2001-12-21 22:45:31 +03:00
|
|
|
executable. You may wish to change the default directories in
|
|
|
|
configure for some of the makefile variables. Please read config.out
|
|
|
|
and make any changes which need to be made for your system. Configure
|
2003-08-04 21:15:17 +04:00
|
|
|
also accepts command line options to change some default variables.
|
2001-12-21 22:45:31 +03:00
|
|
|
Please look at the configure source code for variable details, but the
|
|
|
|
most common changes are:
|
|
|
|
|
|
|
|
prefix: the directory for most of the tinderbox files,
|
|
|
|
defaults to /home/tinderbox2
|
|
|
|
|
|
|
|
cgibin_prefix: The directory where cgi scripts will be
|
|
|
|
run. This depends on how your webserver is configured.
|
|
|
|
For security you may wish to ensure that this
|
|
|
|
directory is disjoint from the prefix directory. This
|
|
|
|
defaults to /var/www/cgi-bin/tinderbox.
|
|
|
|
|
2002-04-24 07:23:12 +04:00
|
|
|
html_prefix: The directory where html files should be
|
2001-12-21 22:45:31 +03:00
|
|
|
written. This depends on how your webserver is configured.
|
|
|
|
This is where the webserver will pick up tinderbox2
|
|
|
|
output. This defaults to /home/httpd/html/tinderbox.
|
|
|
|
|
2000-11-30 00:12:56 +03:00
|
|
|
|
2001-01-04 03:22:37 +03:00
|
|
|
*) run 'make' to create executable versions of the source code in the
|
2000-11-30 00:12:56 +03:00
|
|
|
./build directory.
|
|
|
|
|
2002-04-24 07:23:12 +04:00
|
|
|
*) run 'make compile_bin_code' to ensure that the code will compile
|
|
|
|
when it is installed. This will not work if your target machine is
|
|
|
|
very different from the machine you are running make on.
|
2001-01-04 03:22:37 +03:00
|
|
|
|
2001-12-21 22:45:31 +03:00
|
|
|
*) If you wish run the test programs as described in
|
|
|
|
/build/test/ReadMe to ensure that you have configured the program
|
|
|
|
correctly. This will require a TinderConfig.pm file in your local_conf
|
2001-12-31 21:39:20 +03:00
|
|
|
directory. See the ReadMe file in the test directory for detailed
|
|
|
|
information on how the tests work.
|
2000-08-15 02:22:15 +04:00
|
|
|
|
2000-11-30 00:12:56 +03:00
|
|
|
*) run make install, to install Tinderbox on your system. You may
|
|
|
|
wish to run this with a different 'prefix'
|
|
|
|
|
|
|
|
make install prefix=/opt/tinderbox
|
2000-06-22 08:17:19 +04:00
|
|
|
|
2001-01-06 04:32:47 +03:00
|
|
|
It is currently assumed that the bin directory of your installation
|
|
|
|
will be where the webserver will run the tinderbox cgi's from. You
|
|
|
|
can copy the *.cgi files to another directory if this is not the case.
|
|
|
|
|
2002-05-10 02:40:42 +04:00
|
|
|
*) There are some gifs located in the gif directory which have
|
|
|
|
historically been used by tinderbox. The installation via 'make
|
|
|
|
install' does not install these images. Put them somewhere in your
|
2003-08-04 21:15:17 +04:00
|
|
|
webserver's html directory if you wish to use them. Samples of their
|
2002-05-10 02:40:42 +04:00
|
|
|
use are in the configuration files.
|
2001-01-06 04:32:47 +03:00
|
|
|
|
2002-04-24 07:23:12 +04:00
|
|
|
*) set up a cron job to run $cgi-bin/bin/tinder.cgi --daemon-mode
|
2001-12-21 22:45:31 +03:00
|
|
|
every five minutes. This generates the static tinderbox pages
|
|
|
|
which users see.
|
2001-12-14 23:14:25 +03:00
|
|
|
set up a cron job to run $prefix/bin/rmlogs at least once a day.
|
2000-10-18 03:47:08 +04:00
|
|
|
six am is a good time to run this as the machine load is usually light
|
2001-12-21 22:45:31 +03:00
|
|
|
and will avoids any day light savings problems. This keeps the
|
|
|
|
archive of compressed build logs from growing without limit.
|
2000-06-22 08:17:19 +04:00
|
|
|
|
2000-11-30 00:12:56 +03:00
|
|
|
*) set up the $prefix/bin/processmail* programs to receive the
|
2000-09-22 19:24:16 +04:00
|
|
|
incoming tinderbox mail. The process id which receives and process
|
2000-10-18 03:47:08 +04:00
|
|
|
the mail must be the the same id which runs the tinderbox cron job to
|
|
|
|
prepare the web pages. Usually this set up is accomplished by having
|
|
|
|
the MTA (Sendmail) pass mail for particular accounts into a script.
|
2003-08-04 21:15:17 +04:00
|
|
|
This can be configured via a global configuration file (Sendmail alias
|
2000-10-18 03:47:08 +04:00
|
|
|
file) or via a .forward file (each account gets the same user id but a
|
|
|
|
different home directory, each home directory gets a .forward to cause
|
2003-08-04 21:15:17 +04:00
|
|
|
incoming mail to be delivered through the correct tinderbox mail
|
2000-10-18 03:47:08 +04:00
|
|
|
processing program).
|
|
|
|
|
2001-12-21 22:45:31 +03:00
|
|
|
I have used the following configurations for the mail server Postfix.
|
|
|
|
The postfix aliases file /etc/postfix/aliases contains the following
|
|
|
|
lines. This file must be processed with a /usr/sbin/postalias command
|
|
|
|
which must be run by the same id which will run the tinderbox cgi scripts.
|
|
|
|
|
|
|
|
tinderbox_builds: |/home/tinderbox2/bin/processmail_builds
|
|
|
|
tinderbox_bugzilla: |/home/tinderbox2/bin/processmail_bugs
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-10-18 03:47:08 +04:00
|
|
|
If it is not possible to have mail delivery on your web machine and to
|
|
|
|
have your web machine deliver specific mail through a program then I
|
|
|
|
suggest you use fetchmail to simulate this delivery format. Download
|
|
|
|
fetchmail (from http://tuxedo.org/~esr/fetchmail) and install it on
|
|
|
|
your webserver. Have the mail sent to any pop/imap mail server which
|
|
|
|
is accessible from the webserver. Configure fetchmail to gather the
|
|
|
|
mail from the mail server and pass it through to the correct mail
|
2001-12-31 21:39:20 +03:00
|
|
|
processing program. You should keep the polling interval short (30-200
|
2000-10-18 03:47:08 +04:00
|
|
|
seconds) as long polling intervals will cause delays in the tinderbox
|
|
|
|
system and limit how quickly users see the new data. If the polling
|
|
|
|
interval is too short then you will overload your pop server with
|
|
|
|
needless queries. Fetchmail should run under the same id as the
|
|
|
|
tinderbox server. The fetchmail configuration file will look
|
|
|
|
something like:
|
|
|
|
|
|
|
|
poll mail.provider.net with proto pop3:
|
|
|
|
user "tinderbox_builds" there has password "u can't krak this"
|
|
|
|
is tinder here and wants mda "$prefix/bin/processmail_builds"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We use the mail address 'tinderbox_builds' for build information
|
|
|
|
destined for the webserver. Similarly the bug tracking system should
|
2001-01-06 04:32:47 +03:00
|
|
|
send mail to 'tinderbox_bugs'.
|
2000-10-18 03:47:08 +04:00
|
|
|
|
2000-06-22 08:17:19 +04:00
|
|
|
|
2001-01-06 04:32:47 +03:00
|
|
|
*) If you are using VC_CVS.pm then you will need to put a ~/.cvspass
|
2000-08-11 04:27:27 +04:00
|
|
|
for tinderbox to use. Log into the CVS repository yourself, once for
|
2000-10-18 03:47:08 +04:00
|
|
|
each tree you have defined. The login command must use the
|
2000-11-30 00:12:56 +03:00
|
|
|
hostname/modules exactly as you wrote it in VCData. Then copy your
|
2000-10-18 03:47:08 +04:00
|
|
|
~/.cvspass into the tinderbox server user id's home directory. This
|
|
|
|
must be the REAL home of the Tinderbox daemon, as listed in
|
2000-08-11 04:27:27 +04:00
|
|
|
/etc/passwd/ and set in the $HOME environmental variable for
|
2003-08-04 21:15:17 +04:00
|
|
|
tinder.cgi. The file must not be world readable or writable or
|
2003-08-17 04:36:57 +04:00
|
|
|
executable. It is recommended that VC_CVS.pm is only used as an
|
|
|
|
interim step in setting up VC_Bonsai. VC_Bonsai is not hard to setup
|
|
|
|
and provided many useful features which are absent in VC_CVS.pm.
|
2000-08-11 04:27:27 +04:00
|
|
|
|
2000-08-30 06:14:14 +04:00
|
|
|
|
2001-01-06 04:32:47 +03:00
|
|
|
*) Setup the build machines to mail their build logs (with tinderbox
|
2000-10-18 03:47:08 +04:00
|
|
|
variables on the top) to the web server machine. New builds must not
|
|
|
|
start earlier then 6 minutes after the last build started. Each build
|
|
|
|
machine mails the build log of each build and puts some build data at
|
|
|
|
the top of the log. Build information includes whether the build was
|
|
|
|
a success, which error parsers to use on the log file and what build
|
2001-01-06 04:32:47 +03:00
|
|
|
this is. Run 'processmail_builds --help' to learn about how the mail
|
|
|
|
processing system works and what the mail messages are expected to
|
|
|
|
look like. There is an example mail in the test directory called
|
2001-12-21 22:45:31 +03:00
|
|
|
samplelog. The clientbin directory contains code which can be used on
|
|
|
|
the buildmachine. See the README to help setup your buildmachine.
|
2000-10-18 03:47:08 +04:00
|
|
|
|
2003-08-17 04:36:57 +04:00
|
|
|
http://www.ntsendmail.com/ has a perl program which can be used to
|
|
|
|
send mail on systems where there is no sendmail installed.
|
|
|
|
|
|
|
|
There is nothing special about sending mail. Any data transport layer
|
|
|
|
would work including HTTP Post and SSH the only requirement is that
|
|
|
|
the data is sent to the STDIN of the mail processing programs upon
|
|
|
|
delivery and that the process which runs this is the same uid as the
|
|
|
|
tinderbox server. I have not thought too much about how to set up
|
|
|
|
these alternate delivery mechanisms so I have no practical advice but
|
2003-08-18 07:44:30 +04:00
|
|
|
It should not be too hard to setup. There is a set of instructions for
|
|
|
|
this in lwpcook.pod which suggest you will need to install
|
|
|
|
HTTP::Request::Common and LWP::UserAgent;
|
2000-10-18 03:47:08 +04:00
|
|
|
|
2000-11-30 00:12:56 +03:00
|
|
|
*) Set up the bug tracking system to send mail to 'tinderbox_bugs' on
|
2000-10-18 03:47:08 +04:00
|
|
|
the webserver machine whenever a Bug ticket changes state. It is not
|
|
|
|
interesting to see which tickets are being worked on, so restrict
|
|
|
|
mailing to changes in ticket state not updates (edit) of a ticket.
|
|
|
|
|
2000-11-30 00:12:56 +03:00
|
|
|
*) Check that the time on your webserver, your version control
|
2000-10-18 03:47:08 +04:00
|
|
|
machine, your bug tracking machine and your build machines are all in
|
2000-11-29 22:47:38 +03:00
|
|
|
sync. Check that mail if build mail bounces on any of the above
|
2003-08-04 21:15:17 +04:00
|
|
|
machines that it will be received by someone who can act on it.
|
2000-06-22 08:17:19 +04:00
|
|
|
|
2001-12-21 22:45:31 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
2003-08-17 04:36:57 +04:00
|
|
|
I keep my email up to date in the Contact file. If you have trouble
|
|
|
|
with these instructions please drop me a line.
|
2001-12-21 22:45:31 +03:00
|
|
|
|
|
|
|
Ken Estes.
|