*** empty log message ***

This commit is contained in:
kestes%staff.mail.com 2000-08-11 00:27:27 +00:00
parent 72ad22a061
commit 737afa472d
26 changed files with 557 additions and 353 deletions

View File

@ -66,3 +66,6 @@ The source code should be able to run using the standard Perl
libraries, as it can be difficult for some users to add libraries onto
production machines.
Put CVS keywords into all the source files so that when the software
is deployed, there is no doubt what version was checked out and where
the files are stored in the local version control system.

View File

@ -14,6 +14,14 @@ To install
6) set up $prefix/bin/processmail to recieve the incoming tinderbox mail
7) setup the build machines to mail their build logs
7) if you are using VC_CVS.pm then you will need to put a ~/.cvspass
for tinderbox to use. Log into the CVS repository yourself, once for
each tree you have defined. This must be done exactly as you wrote it
in TreeData. Then copy your ~/.cvspass into tinderbox home directory.
This is the REAL home of the Tinderbox daemon, as listed in
/etc/passwd/ and set in the $HOME environmental variable for
tinder.cgi.
8) setup the build machines to mail their build logs
(with tinderbox variables on the top) to the web server machine.

View File

@ -31,7 +31,7 @@ builddir=./build
config_script=./config.out
tinder_version='0.06'
tinder_version='0.07'
# -------------------
# Build Makefile
@ -137,10 +137,11 @@ rm -rf $config_script
pwd=`/bin/pwd`
echo "#!perl - run from makefile with -n\n" >> $config_script
echo "while (<>) {" >> $config_script
echo "\ts!\#tinder_libdir\#!$destdir/lib',\n\t'$pwd/$builddir/lib!;" >> $config_script
echo "\ts!\#tinder_version\#!$tinder_version!;" >> $config_script
echo " s!\#tinder_libdir\#!$destdir/lib',\n '$pwd/$builddir/lib!;" >> $config_script
echo " s!\#tinder_version\#!$tinder_version!;" >> $config_script
for cmd in perl gzip uudecode
do
@ -149,11 +150,11 @@ do
echo "Could not find program: $cmd"
exit 9;
fi
echo "\ts!\#$cmd\#!$full_cmd!;" >> $config_script
echo " s!\#$cmd\#!$full_cmd!;" >> $config_script
done
echo "} continue {" >> $config_script
echo "\tprint or die \"-p destination: \$!\\\\n\";" >> $config_script
echo " print or die \"-p destination: \$!\\\\n\";" >> $config_script
echo "}" >> $config_script

View File

@ -2,9 +2,9 @@
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# $Revision: 1.1 $
# $Date: 2000/06/22 04:10:42 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:23:38 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/bin/admintree.cgi,v $
# $Name: $
@ -38,6 +38,7 @@ use CGI ':standard';
use lib '#tinder_libdir#';
use TinderConfig;
use TreeData;
use FileStructure;
use Persistence;
@ -106,7 +107,7 @@ sub setup_environment {
sub encrypt_passwd {
my $passswd = @_;
my $passwd = @_;
# The man page for Crypt says:
@ -115,7 +116,7 @@ sub encrypt_passwd {
# rest are ignored.
my $salt = 'aa';
my $encoded = crypt($passd, $salt);
my $encoded = crypt($passwd, $salt);
return $encoded;
}
@ -129,12 +130,6 @@ sub get_passwd_table {
(-r $file) &&
require $file;
# supply a default passwd so we can use the system.
($PASSWD_TABLE{$TREE}) ||
( $PASSWD_TABLE{$TREE}{'tinderbox@mozilla.org'} =
encrypt_passwd('tinderbox') );
return ;
}
@ -198,6 +193,13 @@ sub format_input_page {
my ($title) = "Tinderbox Adminstration for Tree: $tree";
my (@out);
my $passwd_string = '';
if ( !(keys %{ $PASSWD_TABLE{$TREE} }) ) {
$passwd_string = h3(font({-color=>'red'},
"No administrators set, ".
"no passwords needed."));
}
push @out, (
start_html(-title=>$title),
h2({-align=>'CENTER'},
@ -216,6 +218,7 @@ sub format_input_page {
# passwd back in the form.
h3("Login",),
$passwd_string,
"Email address: ",
textfield(-name=>'mailaddr',
-default=>$MAILADDR,
@ -276,7 +279,7 @@ sub format_input_page {
push @out, (
h3("Message of the Day"),
"New Message of the Day",p(),
"New Message of the Day (must be valid HTML)",p(),
textarea(-name=>'motd', -default=>$CURRENT_MOTD,
-rows=>30, -cols=>75, -wrap=>'physical',),
p(),
@ -310,8 +313,7 @@ sub format_input_page {
sub save_passwd_table {
my ($file) = FileStructure::get_filename($TREE, 'passwd');
delete $PASSWD_TABLE{$TREE}{'tinderbox@mozilla.org'};
if ( keys %{ $PASSWD_TABLE{$TREE} } ) {
Persistence::save_structure(
[
$PASSWD_TABLE{$TREE},
@ -320,6 +322,8 @@ sub save_passwd_table {
"\$PASSWD_TABLE{'$TREE'}",
],
$file);
}
return ;
}
@ -328,16 +332,20 @@ sub save_passwd_table {
sub change_passwd {
my (@results) = ();
my ($encoded) = encrypt_passwd($PASSWD);
if (($NEW_PASSWD1) &&
($NEW_PASSWD1 ne $PASSWD ) ) {
if ( ($encoded eq $PASSWD_TABLE{$TREE}{$MAILADDR}) &&
($NEWPASSWD1) &&
($NEWPASSWD1 ne $PASSWD ) ) {
if ($NEW_PASSWD1 eq $NEW_PASSWD2) {
if ($NEWPASSWD1 eq $NEWPASSWD2) {
my ($newencoded1) = encrypt_passwd($NEWPASSWD1);
$PASSWD_TABLE{$TREE}{$MAILADDR} = $newencoded1;
# we need to reload the password table so that the check against
# existing administrators is nearly atomic.
get_passwd_table();
my ($new_encoded1) = encrypt_passwd($NEW_PASSWD1);
$PASSWD_TABLE{$TREE}{$MAILADDR} = $new_encoded1;
save_passwd_table();
push @results, "Password changed.\n";
} else {
push @results, ("New passwords do not match, ".
@ -438,19 +446,21 @@ sub change_motd {
sub security_problem {
my @out = ();
($PASSWD) ||
(push @out, "Error, No Password\n");
($MAILADDR) ||
(push @out, "Error, No Mail Address\n");
(!$MAILADDR) ||
($MAILADDR =~ m!\@!) ||
(push @out, "Error, Mail Address must have '\@' in it.\n");
(!$PASSWD) ||
($PASSWD ne $PASSWD_TABLE{$TREE}{$MAILADDR}) ||
if ( keys %{ $PASSWD_TABLE{$TREE}} ) {
($PASSWD) ||
(push @out, "Error, must enter Password\n");
my ($encoded) = encrypt_passwd($PASSWD);
($encoded eq $PASSWD_TABLE{$TREE}{$MAILADDR}) ||
(push @out, "Error, Password Not Valid\n");
}
return @out;
}

View File

@ -2,9 +2,9 @@
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# $Revision: 1.1 $
# $Date: 2000/06/22 04:10:43 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:23:50 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/bin/gunzip.cgi,v $
# $Name: $
@ -36,6 +36,7 @@
# Tinderbox libraries
use lib '#tinder_libdir#';
use TinderConfig;
use TreeData;
use FileStructure;
use HTMLPopUp;

View File

@ -11,9 +11,9 @@
# logs in compressed form for future reference.
# $Revision: 1.1 $
# $Date: 2000/06/22 04:11:37 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:24:04 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/bin/Attic/processmail,v $
# $Name: $
@ -49,6 +49,7 @@ use File::stat;
# Tinderbox libraries
use lib '#tinder_libdir#';
use TinderConfig;
use TreeData;
use HTMLPopUp;
use VCDisplay;
@ -271,8 +272,9 @@ sub set_filenames{
%FILE = (
'binaryfile' => (FileStructure::get_filename($tree, 'build_bin_dir')gzip.
"/$main::UID.html"),
# there is also a binaryfile created in assemble_files()
# which gets created using information from get_filename()
# and $TINDERBOX{}
'full-log' => (FileStructure::get_filename($tree, 'full-log').
"/$main::UID.html"),
@ -372,10 +374,10 @@ sub parse_tinderbox_vars {
while(defined($line = <>)) {
if ( $line =~ m/^\s*tinderbox\:\s*([^:]*)\:\s*(.*)\n$/ ) {
if ( $line =~ m/^\s*tinderbox\s*:\s*([a-zA-Z0-9-_]*)\s*:\s*(.*)\n$/ ) {
$TINDERBOX{$1} .= $2;
$found_vars= 1;
} elsif ( $line =~ m/^tinderbox\:\s*END\b/ ) {
} elsif ( $line =~ m/^tinderbox\s*:\s*END\b/ ) {
return ;
} elsif ($found_vars) {
return ;
@ -1026,7 +1028,7 @@ sub assemble_files {
$TINDERBOX{'brief-log'} = File::Basename::basename($FILE{'brief-log'});
if(
($TINDERBOX{binaryname}) &&
($TINDERBOX{'binaryname'}) &&
(!(-z $TMP_FILE{'binaryfile'}))
) {
my $bin_dir = FileStructure::get_filename($tree, 'build_bin_dir');
@ -1034,8 +1036,8 @@ sub assemble_files {
mkdir_R($bin_dir);
$TINDERBOX{binaryname} = File::Basename::basename($TINDERBOX{binaryname});
my $outfile = "$bin_dir/".$TINDERBOX{binaryname};
$TINDERBOX{'binaryname'} = File::Basename::basename($TINDERBOX{'binaryname'});
my $outfile = "$bin_dir/".$TINDERBOX{'binaryname'};
my (@cmd) = (
@UUDECODE,
@ -1085,7 +1087,7 @@ sub write_update_file {
Persistence::save_structure(
[\%TINDERBOX],
['build_record'],
['record'],
$tmp_update_file,
);

View File

@ -2,9 +2,9 @@
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# $Revision: 1.1 $
# $Date: 2000/06/22 04:10:43 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:24:32 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/bin/tinder.cgi,v $
# $Name: $
@ -58,6 +58,8 @@ use Time::Local;
# Tinderbox libraries
use lib '#tinder_libdir#';
use TinderConfig;
use Utils;
use TreeData;
use FileStructure;
@ -71,7 +73,7 @@ $VERSION = '#tinder_version#';
# the default number of hours shown on the status page
$DEFAULT_DISPLAY_HOURS = 6;
$DEFAULT_DISPLAY_HOURS = $TinderConfig::DEFAULT_DISPLAY_HOURS || (6);
# localtime(2000 * 1000 * 1000) = 'Tue May 17 23:33:20 2033'
@ -255,19 +257,34 @@ sub parse_args {
# check that we are given valid arguments
( ($start_time > 0) && ($start_time < $LARGEST_VALID_TIME) ) ||
die("Can not prepare web page with start time: $start_time. \n");
die("Can not prepare web page with start_time: $start_time. \n");
( ($end_time > 0) && ($end_time < $LARGEST_VALID_TIME) ) ||
die("Can not prepare web page with start time: $start_time. \n");
die("Can not prepare web page with end_time: $end_time. \n");
{
my ($display_hours) = ($start_time - $end_time) / (60 * 60);
($display_hours > 0) ||
die("start_time must be greater then end_time.".
" start_time: $start_time, end_time: $end_time. \n");
($display_hours < 1000) ||
die("Number of hours to display is too large. \n");
}
( ($daemon_mode) || ($tree) ) ||
die("If you are running in non daemon mode you must specify a tree\n");
die("If you are not running in daemon mode you must specify a tree\n");
if ($tree) {
(TreeData::tree_exists($tree)) ||
die("tree: $tree does not exist\n");
}
# This prevents us from 'loosing' builds between the spaces of the
# grid and would cause our rendering algorithm to get off by one
# build creating problems in the whole grid display.
($table_spacing >= $TinderDB::MIN_TABLE_SPACING ) ||
die("You may not specify a table spacing of less then ".
"min_table_spacing: $TinderDB::MIN_TABLE_SPACING \n");
@ -513,9 +530,10 @@ sub cgi_main {
sub write_stats {
my ($end_time) = time();
my ($run_time) = $end_time - $TIME;
my ($run_time) = sprintf ("%.2f", # round
($end_time - $TIME)/60);
# print "run_time: $run_time num_updates: $NUM_UPDATES\n";
print LOG "run_time: $run_time num_updates: $NUM_UPDATES\n";
return ;
}

View File

@ -6,9 +6,9 @@
# partitions and this will require making get_filename() less regular
# then we have defined it here.
# $Revision: 1.1 $
# $Date: 2000/06/22 04:13:58 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:25:22 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/Attic/FileStructure.pm,v $
# $Name: $
@ -66,11 +66,15 @@ $VERSION = '#tinder_version#';
# the url to the tinderbox server binary directory
$URL_BIN = "http://cvs-mirror.mozilla.org/webtools/tinderbox";
$URL_BIN = "http://raven.iname.com:10080/forms/tinderbox/bin";
$URL_BIN = ($TinderConfig::URL_BIN ||
"http://tinderbox.mozilla.org/cgibin");
# the url to the tinderbox server HTML directory
$URL_HTML = ($TinderConfig::URL_HTML ||
"http://tinderbox.mozilla.org/");
$URL_HTML = "http://cvs-mirror.mozilla.org/webtools/tinderbox";
$URL_HTML = "http://raven.iname.com:10080/build-group/tinderbox";
%URLS = (
@ -95,8 +99,8 @@ $URL_HTML = "http://raven.iname.com:10080/build-group/tinderbox";
# the full path name tinderbox will use to access the tinderbox
# servers root data directory
$TINDERBOX_DIR = "/usr/apache/cgibin/webtools/tinderbox";
$TINDERBOX_DIR = "/web/htdocs/gci/iname-raven/build-group/tinderbox";
$TINDERBOX_DIR = ($TinderConfig::TINDERBOX_DIR ||
"/usr/apache/cgibin/webtools/tinderbox");
# The lookup for where different file/directories are stored on the
# filesystem. Local system administrator may need to put different
@ -110,8 +114,6 @@ sub get_filename {
die("tree: $tree does not exist\n");
my ($tree_dir) = "$TINDERBOX_DIR/$tree";
my ($tinder_url) = "http://raven.iname.com:10080/build-group/tinderbox";
# all the file names this program uses appear below
@ -141,7 +143,7 @@ sub get_filename {
'tree_HTML' => $tree_dir,
'tree_URL' => "$tinder_url/$tree",
'tree_URL' => "$URL_HTML/$tree",
# where the database files are stored on disk
@ -149,7 +151,7 @@ sub get_filename {
# header data files
'TinderDB_headerDir'=> "$tree_dir/h",
'TinderHeader_Dir'=> "$tree_dir/h",
# the set of builds which are not displayed by default.

View File

@ -10,9 +10,9 @@
# the completed string before it is returned.
# $Revision: 1.1 $
# $Date: 2000/06/22 04:13:58 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:25:35 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/HTMLPopUp.pm,v $
# $Name: $
@ -43,12 +43,21 @@
package HTMLPopUp;
use Utils;
# Pick how you wish to the Tinderbox popup windows to be implemented:
# Uncomment only one HTMLPopUp implementation.
#use HTMLPopUp::MozillaLayers;
use HTMLPopUp::MajorCoolWindow;
#use HTMLPopUp::None;
$IMPLS = ( ($TinderConfig::PopUpImpl) ||
(
# 'HTMLPopUp::MozillaLayers',
'HTMLPopUp::MajorCoolWindow',
# 'HTMLPopUp::None',
)
);
main::require_modules($IMPLS);
$VERSION = '#tinder_version#';

View File

@ -12,9 +12,9 @@
# http://www.webreference.com/dhtml/hiermenus/
# $Revision: 1.1 $
# $Date: 2000/06/22 04:15:56 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:19:43 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/HTMLPopUp/MajorCoolWindow.pm,v $
# $Name: $
@ -79,7 +79,8 @@ $VERSION = '#tinder_version#';
sub page_header {
my (%args) = @_;
my ($html_time) = timeHTML($main::TIME);
my ($html_time) = $main::LOCALTIME;
$html_time =~ s/:[^:]+$//;
my ($header) = '';
@ -370,7 +371,7 @@ sub Link {
# set the defaults
$args{'windowtitle'} = $args{'windowtitle'} ||
$HTML::DEFAULT_POPUP_TITLE;
$DEFAULT_POPUP_TITLE;
# These characters inside the popupwindow will confuse my popup
@ -390,11 +391,11 @@ sub Link {
# number_of_lines2hight conversion factors, but it is hard to
# determine what a HTML row is.
$args{'windowheight'} = $args{'windowheight'} ||
$HTML::DEFAULT_POPUP_HEIGHT;
$args{'windowheight'} = ($args{'windowheight'} ||
$DEFAULT_POPUP_HEIGHT);
$args{'windowwidth'} = $args{'windowwidth'} ||
$HTML::DEFAULT_POPUP_WIDTH;
$args{'windowwidth'} = ($args{'windowwidth'} ||
$DEFAULT_POPUP_WIDTH);
#

View File

@ -15,9 +15,9 @@
# $Revision: 1.1 $
# $Date: 2000/06/22 04:15:56 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:19:57 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/HTMLPopUp/MozillaLayers.pm,v $
# $Name: $
@ -68,7 +68,8 @@ $VERSION = '#tinder_version#';
sub page_header {
my (%args) = @_;
my ($html_time) = timeHTML($main::TIME);
my ($html_time) = $main::LOCALTIME;
$html_time =~ s/:[^:]+$//;
my ($header) = '';

View File

@ -3,9 +3,9 @@
# HTMLPopUp::None.pm - the implementation of the header and link
# command which will be used if no popup menus are desired.
# $Revision: 1.1 $
# $Date: 2000/06/22 04:15:56 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:20:10 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/HTMLPopUp/None.pm,v $
# $Name: $
@ -61,7 +61,8 @@ $VERSION = '#tinder_version#';
sub page_header {
my (%args) = @_;
my ($html_time) = timeHTML($main::TIME);
my ($html_time) = $main::LOCALTIME;
$html_time =~ s/:[^:]+$//;
my ($header) = '';
my ($refresh) = '';

View File

@ -8,9 +8,9 @@
# The only external interface to this library is summary_pages() and
# create_global_index() these functions are only called by tinder.cgi.
# $Revision: 1.1 $
# $Date: 2000/06/22 04:13:58 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:26:05 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/Summaries.pm,v $
# $Name: $
@ -187,6 +187,11 @@ sub treegroup_func_page {
my ($group_func_summary_page) = $header.$body.$footer;
if ($group_func_summary_page) {
# if we do not have a build section then the page may be empty as
# there is no data for any function
my ($base_name) = "$groupname.$func.$extension";
my ($file_name) = "$FileStructure::TINDERBOX_DIR/$base_name";
@ -194,6 +199,7 @@ sub treegroup_func_page {
my ($link) = ("\t\t<LI><a href=\"$base_name\">".
"$func</a>\n");
}
return $link;
}
@ -257,7 +263,9 @@ sub create_global_index {
}
$out = <<EOF;
$out .= <<EOF;
<h3>Tinderbox Pages sorted by Project</h3>
Select one of the following trees:
<UL>
@ -272,10 +280,18 @@ Administer one of the following trees:
</UL>
EOF
if ( %{ $summary_ref } ) {
$out .= <<EOF;
<h3>Project Managements Summary Pages</h3>
@func_summary_links
EOF
}
my $global_index_file = "$FileStructure::TINDERBOX_DIR/index.html";

View File

@ -4,9 +4,9 @@
# $Revision: 1.1 $
# $Date: 2000/07/24 23:52:24 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:26:22 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/Attic/TinderConfig.pm,v $
# $Name: $
@ -41,16 +41,19 @@ package TinderConfig;
# the url to the tinderbox server binary directory
$URL_BIN = "http://tinderbox.mozilla.org/cgibin";
$URL_BIN = "http://raven.iname.com:10080/forms/tinderbox/bin";
# the url to the tinderbox server HTML directory
$URL_HTML = "http://tinderbox.mozilla.org/";
$URL_HTML = "http://raven.iname.com:10080/build-group/tinderbox";
# the full path name tinderbox will use to access the tinderbox
# servers root data directory
# servers root data directory where the html will be written.
$TINDERBOX_DIR = "/usr/apache/cgibin/webtools/tinderbox";
$TINDERBOX_DIR = "/web/htdocs/gci/iname-raven/build-group/tinderbox";
# where errors are loged
@ -59,6 +62,7 @@ $ERROR_LOG = "/var/log/tinderbox/log";
# where the daemon mode lock (for all trees) is placed
$LOCK_FILE = "/usr/apache/cgibin/webtools/tinderbox/tinderd.lock";
$LOCK_FILE = "/web/htdocs/gci/iname-raven/build-group/tinderbox/tinderd.lock";
# the time between auto refreshes for all pages in seconds.

View File

@ -19,9 +19,9 @@
# notice board display, build display (colored squares)
# $Revision: 1.1 $
# $Date: 2000/06/22 04:13:58 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:26:46 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/TinderDB.pm,v $
# $Name: $
@ -53,14 +53,19 @@
package TinderDB;
# Standard perl librariesq
# Standard perl libraries
use File::Basename;
# Use the DB implementations you wish to use. You may need to edit
# the names listed here to use the correct implementation.
# Tinderbox Specific Libraries
use Utils;
# Use the DB implementations you wish to use.
# These uses determine the columns of the build page and their
# include order is the order in which the columns are displayed.
@ -69,11 +74,23 @@ use File::Basename;
# about checkins. You can currently choose wether you are using
# bonsai or are using CVS raw.
use TinderDB::Time;
use TinderDB::VC_CVS;
use TinderDB::Notice;
use TinderDB::Build;
if ( defined(@TinderConfig::DBImpl) ) {
@IMPLS = @TinderConfig::DBImpl;
} else {
@IMPLS = (
'TinderDB::Time',
'TinderDB::VC_CVS',
'TinderDB::Notice',
'TinderDB::Build',
);
}
main::require_modules(@IMPLS);
# It would be nice if we had some kind of display of the bug tracking
# system as well.
$VERSION = '#tinder_version#';
@ -87,25 +104,34 @@ $DEBUG = 1;
# frame the parts of the legend without putting a border arround the
# individual cells.
#$LEGEND_BORDER = "border rules=none";
$LEGEND_BORDER = "";
if ( defined($TinderConfig::DB_LEGEND_BORDER) ) {
$LEGEND_BORDER = $TinderConfig::DB_LEGEND_BORDER
} else {
# finest spacing on html page (in minutes), this resticts the
# minimum time between builds (to this value plus 5 minutes).
# if configuring in this file uncomment one of the assignment
# lines below
$MIN_TABLE_SPACING = 5;
$TinderConfig::LEGEND_BORDER =
"";
# "border rules=none";
}
# number of times a database can be updated before its contents must
# be trimmed of old data. This scan of the database is used to
# collect data about average build time so we do not want it
# performed too infrequently.
# finest spacing on html page (in minutes), this resticts the
# minimum time between builds (to this value plus 5 minutes).
$MAX_UPDATES_SINCE_TRIM = 50;
$MIN_TABLE_SPACING = $TinderConfig::DB_MIN_TABLE_SPACING || (5);
# Number of seconds to keep in Database, older data will be trimmed
# away.
# number of times a database can be updated before its contents must
# be trimmed of old data. This scan of the database is used to
# collect data about average build time so we do not want it
# performed too infrequently.
$TRIM_SECONDS = 60 * 60 * 24 * 8;
$MAX_UPDATES_SINCE_TRIM = $TinderConfig::DB_MAX_UPDATES_SINCE_TRIM || (50);
# Number of seconds to keep in Database, older data will be trimmed
# away.
$TRIM_SECONDS = $TinderConfig::DB_TRIM_SECONDS || (60 * 60 * 24 * 8);
# The DB implemenations are sourced in TinderConfig.pm just before
# this wrapper class is sourced. It is expected that the

View File

@ -7,9 +7,9 @@
# the build was and display a link to the build log.
# $Revision: 1.1 $
# $Date: 2000/06/22 04:16:47 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:21:46 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/TinderDB/Build.pm,v $
# $Name: $
@ -50,7 +50,7 @@
# (including the hostname, and
# OS of the buildmachine)
# status => The final status of the build
# (success, buildfailed, testfailed, etc)
# (success, busted, testfailed, etc)
# info => A string to be displayed to users interested in this build.
#
# timenow => The time that the status was last reported
@ -103,9 +103,6 @@
# The list @BUILD_NAMES holds the name for each build column which we
# do not ignore
# The scalar $HTML_VALUE holds build information which should be
# displayed for the whole tree not just a single build column.
# Lets enumerate all the ways that the TinderDB abstraction is broken
# by the Build module:
@ -114,8 +111,6 @@
# @LATEST_STATUS
# @BUILD_NAMES
# *) The header function peeks at $HTML_VALUE;
# *) read file to load $IGNORE_BUILDS in addition
# to the regular DB updates
@ -255,17 +250,6 @@ sub get_all_status {
return @status;
}
# If the build is broken then we wish to place some additional info in
# the header. Use the header interface, the value is set in
# apply_db_updates.
sub gettree_header {
# $HTML_VALUE = buildinfo($tree);
$HTML_VALUE = '';
return $HTML_VALUE;
}
# find the name of each build
@ -287,9 +271,6 @@ sub build_names {
push @outrow, $buildname;
}
( scalar(@outrow) ) ||
die("Could not find any build names.");
return @outrow;
}
@ -302,9 +283,6 @@ sub all_build_names {
my (@outrow) = sort keys %{ $DATABASE{$tree} };
( scalar(@outrow) ) ||
die("Could not find any build names.");
return @outrow;
}
@ -353,9 +331,6 @@ sub latest_status {
} # foreach $buildname
( scalar(@outrow) ) ||
die("Could not find any build status.");
return @outrow;
}
@ -396,14 +371,18 @@ sub status2hdml_chars {
# link to bonsai giving the aproximate times that the build was
# broken.
sub buildinfo {
my ($tree) = (@_);
sub gettree_header {
my ($self, $tree) = (@_);
# this is not working the way I want it to. I will debug it later.
return '';
my ($out) = '';
(TreeData::tree_exists($tree)) ||
die("Tree: $tree, not defined.");
my @outrow = ();
# find our best guess as to when the tree broke.
my (@earliest_failure) = ();
@ -518,12 +497,13 @@ sub buildinfo {
# compute information which is relevant to the whole tree not a
# Compute information which is relevant to the whole tree not a
# particular build. This needs to be called each time the DATABASE is
# loaded. This data depends on the ignore_builds file so can not be
# stored in the DATABASE but must be recomputed each time we run.
# Perhaps the gobal variables should someday move into METADATA for
# eases of maintinance, but will still need to be recomputed at the same places in the code.
# eases of maintinance, but will still need to be recomputed at the
# same places in the code.
sub compute_metadata {
my ($self, $tree,) = @_;
@ -545,7 +525,6 @@ sub compute_metadata {
@LATEST_STATUS = latest_status($tree);
};
# $HTML_VALUE = buildinfo($tree);
return ;
}
@ -572,7 +551,6 @@ sub trim_db_history {
my ($last_time) = $main::TIME - $TinderDB::TRIM_SECONDS;
my @outrow = ();
foreach $buildname (sort keys %{ $DATABASE{$tree} } ){
my ($last_index) = undef;
@ -711,7 +689,7 @@ sub status_table_header {
my ($self, $tree, ) = @_;
( scalar(@BUILD_NAMES) ) ||
die("Could not find any build names.");
return ();
my (@outrow);
@ -992,7 +970,7 @@ sub status_table_row {
my ($self, $row_times, $row_index, $tree, ) = @_;
( scalar(@LATEST_STATUS) && scalar(@BUILD_NAMES) ) ||
die("Summary variables not defined.");
return ();
my @outrow = ();

View File

@ -73,7 +73,7 @@ use Utils;
use HTMLPopUp;
use TinderDB::BasicTxtDB;
$VERSION = ( qw $Revision: 1.1 $ )[1];
$VERSION = ( qw $Revision: 1.2 $ )[1];
@ISA = qw(TinderDB::BasicTxtDB);
@ -249,6 +249,7 @@ sub status_table_row {
my $new_notice = $DATABASE{$tree}{$time}{$author}{'rendered_notice'};
$rendered_notice .= "<p>".$new_notice."</p>";
push @authors, $author;
$num_notices++;
}
@ -256,6 +257,26 @@ sub status_table_row {
($NEXT_DB > $#DB_TIMES) && last;
}
my $href = '';
# create a url to a cgi script so that those who do not use pop up
# menus can view the notice.
$href = (
"$FileStructure::URLS{'shownotice'}".
"\?".
"tree=$tree".
"\&".
"time=$DB_TIMES[$NEXT_DB]"
);
# I do not have time to actually write the cgi script for above.
# Instead it would be useful to have a mailto so that users can mail
# the authors of the notice.
$href = 'mailto:'.join(', ', @authors);
if ($rendered_notice) {
# the popup window software is pretty sensitive to newlines and
@ -266,13 +287,7 @@ sub status_table_row {
"\t<td>".
HTMLPopUp::Link(
"linktxt" => $NOTICE_AVAILIBLE,
"href" => (
"$FileStructure::URLS{'shownotice'}".
"\?".
"tree=$tree".
"\&".
"time=$DB_TIMES[$NEXT_DB]"
),
"href" => $href,
"windowtxt" => $rendered_notice,
"windowtitle" => "Notice Board",
"windowheight" => (150 * $num_notices),

View File

@ -133,7 +133,7 @@ use TreeData;
use VCDisplay;
$VERSION = ( qw $Revision: 1.1 $ )[1];
$VERSION = ( qw $Revision: 1.2 $ )[1];
@ISA = qw(TinderDB::BasicTxtDB);
@ -463,7 +463,7 @@ sub status_table_row {
($LAST_TREESTATE) && ($color) &&
($color = "bgcolor=$color");
my $query_link = '';
my $query_links = '';
if ( scalar(%authors) ) {
# find the times which bound the cell so that we can set up a
@ -510,31 +510,59 @@ sub status_table_row {
}
$table .= "</table>";
$query_link .=
"\t\t".
VCDisplay::query(
'tree' => $tree,
'mindate' => $mindate,
'maxdate' => $maxdate,
'who' => $author,
'linktxt' => $author,
# we display the list of names in 'teletype font' so that the
# names do not bunch together. It seems to make a difference if
# there is a <cr> between each link or not, but it does make a
# difference if we close the <tt> for each author or only for
# the group of links.
my (%popup_args) = (
"linktxt" => "\t\t<tt>$author</tt>".
"windowtxt" => $table,
"windowtitle" => "VC Info",
"windowheight" => ($num_rows * 50) + 100,
"windowwidth" => ($max_length * 10) + 100,
)."\n";
);
# If you have a VCDisplay implementation you should make the
# link point to its query method otherwise you want a 'mailto:'
# link
my $query_link = "";
if (
($TinderConfig::VCDisplayImpl) &&
($TinderConfig::VCDisplayImpl =~ 'None')
) {
$query_link .=
HTMLPopUp::Link(
"href" => "mailto: $author",
%popup_args,
);
} else {
$query_link .=
VCDisplay::query(
'tree' => $tree,
'mindate' => $mindate,
'maxdate' => $maxdate,
'who' => $author,
%popup_args,
);
}
# we display the list of names in 'teletype font' so that the
# names do not bunch together. It seems to make a difference if
# there is a <cr> between each link or not.
# put each link on its own line so we can debug the HTML
$query_link = "\t\t".$query_link."\n";
$query_links .= $query_link;
}
@outrow = (
"\t<td align=center $color>\n".
"\t\t<tt>\n".
$query_link.
"\t\t</tt>\n".
$query_links.
"\t</td>\n".
"");

View File

@ -8,9 +8,9 @@
# TreeState, Build, IgnoreBuilds, MOTD, Images,
# $Revision: 1.1 $
# $Date: 2000/06/22 04:13:59 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:27:04 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/TinderHeader.pm,v $
# $Name: $
@ -43,33 +43,49 @@
package TinderHeader;
# Standard perl librariesq
# Standard perl libraries
use File::Basename;
# Tinderbox Specific Libraries
use Utils;
# These names are optional page header information the only method
# they contain is called: html_value. If you comment out any of these
# uses a default method will be provided. Usually this method is
# the null function.
use TinderHeader::Build;
use TinderHeader::IgnoreBuilds;
use TinderHeader::MOTD;
if ( defined(@TinderConfig::HeaderImpl) ) {
@IMPLS = @TinderConfig::HeaderImpl;
} else {
@IMPLS = (
'TinderHeader::Build',
'TinderHeader::IgnoreBuilds',
'TinderHeader::MOTD',
# TinderDB::VC_Bonsai provides a TinderHeader::TreeState
# implementation, so comment out the TreeSTate if using
# VC_Bonsai. Most VC implementations will not have a State file in
# the version control system.
# TinderDB::VC_Bonsai provides a
# TinderHeader::TreeState implementation,
# so comment out the TreeSTate if using
# VC_Bonsai. Most VC implementations will
# not have a State file in the version
# control system.
use TinderHeader::TreeState;
'TinderHeader::TreeState',
# this is not implemented yet
#use TinderHeader::Image;
# this is not implemented yet
#'TinderHeader::Image,
);
}
main::require_modules(@IMPLS);
$VERSION = '#tinder_version#';
@ -79,9 +95,11 @@ $VERSION = '#tinder_version#';
$DEBUG = 1;
# each of the TinderHeader methods gets a default value.
# each of the TinderHeader method appears on the left side of this
# hash and gets a default value.
%HEADER2DEFAULT_HTML = (
%HEADER2DEFAULT_HTML = (%HEADER2DEFAULT_HTML ||
(
# the build module has one piece of info
# which goes in the header, our best guess
# as to when the tree broke.
@ -92,6 +110,7 @@ $DEBUG = 1;
'MOTD' => "",
'TreeState' => "Open",
)
);
# As each implmentation is 'used' it will load a a null object in its

View File

@ -6,9 +6,9 @@
# gettree_header(), ).
# $Revision: 1.1 $
# $Date: 2000/06/22 04:17:18 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:20:31 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/TinderHeader/BasicTxtHeader.pm,v $
# $Name: $
@ -46,7 +46,7 @@ package TinderHeader::BasicTxtHeader;
use FileStructure;
use Persistence;
$VERSION = ( qw $Revision: 1.1 $ )[1];
$VERSION = ( qw $Revision: 1.2 $ )[1];
sub new {
@ -65,7 +65,7 @@ sub new {
sub db_file {
my ($self, $tree,) = @_;
my ($file) = (FileStructure::get_filename($tree, 'TinderDB_headerDir').
my ($file) = (FileStructure::get_filename($tree, 'TinderHeader_Dir').
"/".ref($self).".DBdat");
$file =~ s![^/:]+::!!;
return $file;

View File

@ -3,9 +3,9 @@
# General purpose utility functions. Every project needs a kludge
# bucket for common access.
# $Revision: 1.1 $
# $Date: 2000/06/22 04:13:59 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:27:17 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/Utils.pm,v $
# $Name: $
@ -40,6 +40,17 @@
package main;
# Standard perl libraries
use Sys::Hostname;
use File::Basename;
# Tinderbox libraries
sub set_static_vars {
# This functions sets all the static variables which are often
@ -54,30 +65,30 @@ sub set_static_vars {
# where errors are loged
$ERROR_LOG = "/var/log/tinderbox/log";
$ERROR_LOG = "/tmp/tinderbox/log";
$ERROR_LOG = ( $TinderConfig::ERROR_LOG ||
"/var/log/tinderbox/log");
# where the daemon mode lock (for all trees) is placed
$LOCK_FILE = "/web/htdocs/gci/iname-raven/build-group/tinderbox/tinderd.lock";
$LOCK_FILE = ( $TinderConfig::LOCK_FILE ||
"/usr/apache/cgibin/webtools/tinderbox/tinderd.lock");
# the time between auto refreshes for all pages in seconds.
$REFRESH_TIME = 60*15;
$REFRESH_TIME = ( $TinderConfig::REFRESH_TIME ||
(60 * 15)
);
@ORIG_ARGV = @ARGV;
$ENV{'PATH'}= (
':/usr/local/bin'.
'/bin'.
':/usr/bin'.
':/bin'.
':/usr/local/bin'.
':/opt/gnu/bin'.
':/usr/ucb'.
':/usr/ccs/bin'.
':/usr/openwin/bin'.
'');
# taint perl requires we clean up these bad environmental variables.
@ -131,9 +142,22 @@ sub get_env {
$HOSTNAME = Sys::Hostname::hostname();
my ($logdir) = File::Basename::dirname($ERROR_LOG);
mkdir_R($logdir);
my ($lockdir) = File::Basename::dirname($LOCK_FILE);
mkdir_R($lockdir);
my (@trees) = TreeData::get_all_trees();
foreach $tree (@trees) {
my ($dir) = FileStructure::get_filename($tree, 'TinderDB_Dir');
mkdir_R($dir, 0777);
my ($dir) = FileStructure::get_filename($tree, 'TinderHeader_Dir');
mkdir_R($dir, 0777);
}
open (LOG , ">>$ERROR_LOG") ||
die("Could not open logfile: $ERROR_LOG\n");
@ -145,6 +169,7 @@ sub get_env {
$UID = join('.', $TIME, $$);
$SIG{'__DIE__'} = \&fatal_error;
$SIG{'__WARN__'} = \&log_warning;
return ;
}
@ -184,6 +209,11 @@ sub max {
# make a directory (and all of its parents if need be).
# You can optionally specify the permssions for all the directories
# created.
sub mkdir_R {
my ($dir, $mode) = @_;
@ -213,8 +243,9 @@ sub mkdir_R {
sub fatal_error {
my @error = @_;
foreach $_ (@error) {
print LOG $_;
print LOG "[$LOCALTIME] $_";
}
print LOG "\n";
# do not check for errors, the lock file may not exits and even if
# we have trouble removing the file we we will be exiting anyway.
@ -240,7 +271,7 @@ sub log_warning {
my @error = @_;
foreach $_ (@error) {
print LOG $_;
print LOG "[$LOCALTIME] $_";
}
return ;
@ -276,6 +307,7 @@ sub overwrite_file {
}
# append data to the end of a file
sub append_file {
my ($filename, @out);
@ -306,5 +338,23 @@ sub uniq {
return @out;
}
# load a list of modules
sub require_modules {
my @impls = @_;
foreach $impl (@impls) {
# '$impl' is not a bare word so we must preform this data
# transformation which require normally does
$impl =~ s!::!/!g;
$impl .= ".pm";
require $impl;
}
return 1;
}
1;

View File

@ -8,9 +8,9 @@
# VCDisplay module for CVSWeb.
# $Revision: 1.1 $
# $Date: 2000/06/22 04:13:59 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:27:27 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/VCDisplay.pm,v $
# $Name: $
@ -41,11 +41,20 @@
package VCDisplay;
use Utils;
# pick the VCDisplay module that you wish to use.
#use VCDisplay::None;
use VCDisplay::Bonsai;
$IMPLS = ( ($TinderConfig::VCDisplayImpl) ||
(
#'VCDisplay::None',
'VCDisplay::Bonsai',
)
);
main::require_modules($IMPLS);
$DEBUG = 1;
1;

View File

@ -4,9 +4,9 @@
# installed bonsai and are using cvsblame cvsguess and cvsquery to let
# your webserver render html pages of your CVS repository.
# $Revision: 1.1 $
# $Date: 2000/06/22 04:15:23 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:19:08 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/VCDisplay/Bonsai.pm,v $
# $Name: $
@ -63,13 +63,17 @@ $VERSION = '#tinder_version#';
$DEBUG = 1;
# this is how we create a URL to the various CGI programs.
$CVSQUERY = "../bonsai/cvsquery.cgi";
$CVSBLAME = "../bonsai/cvsblame.cgi";
$CVSGUESS = "../bonsai/cvsguess.cgi";
# If you your using VCDisplay:Bonsai we need to know how to make HMTL
# to point o the bonsai CGI programs.
$BONSAI_URL = ( $TinderConfig::BONSAI_URL ||
"../bonsai");
$CVSQUERY = $BONSAI_URL."/cvsquery.cgi";
$CVSBLAME = $BONSAI_URL."/cvsblame.cgi";
$CVSGUESS = $BONSAI_URL."/cvsguess.cgi";
# create a Link to a VC file and its line number

View File

@ -6,9 +6,9 @@
# cvsquery an we may need to generalize the interfaces in the future
# to accomidate more VC systems.
# $Revision: 1.1 $
# $Date: 2000/06/22 04:15:24 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:19:13 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/lib/VCDisplay/None.pm,v $
# $Name: $
@ -52,9 +52,8 @@ package VCDisplay;
# Tinderbox libraries
use TreeData;
#use HTMLPopUp;
use HTMLPopUp;
$DEBUG = 1;
# create a Link to a VC file and its line number

View File

@ -6,9 +6,9 @@
# URL.
# $Revision: 1.1 $
# $Date: 2000/06/22 04:13:29 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:18:33 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/test/genbuilds.tst,v $
# $Name: $
#
@ -52,10 +52,8 @@ use HTMLPopUp;
# sufficent, we hardcode the test data here at the top of the file to
# make it easy to change.
$TINDERBOX_DIR="/tmp/tinderbox";
$TINDERBOX_DIR="/web/htdocs/gci/iname-raven/build-group/tinderbox";
$TINDERBOX_DIR = ( $TinderConfig::TINDERBOX_DIR ||
"/usr/apache/cgibin/webtools/tinderbox");
@TREES = ('Project_A', 'Project_B', 'Project_C');

View File

@ -5,9 +5,9 @@
# current time.
# $Revision: 1.1 $
# $Date: 2000/06/22 04:13:30 $
# $Author: mcafee%netscape.com $
# $Revision: 1.2 $
# $Date: 2000/08/11 00:18:41 $
# $Author: kestes%staff.mail.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/test/gennotices.tst,v $
# $Name: $
#
@ -53,8 +53,9 @@ use HTMLPopUp;
# make it easy to change.
$TINDERBOX_DIR="/tmp/tinderbox";
$TINDERBOX_DIR="/web/htdocs/gci/iname-raven/build-group/tinderbox";
$TINDERBOX_DIR = ( $TinderConfig::TINDERBOX_DIR ||
"/usr/apache/cgibin/webtools/tinderbox");
@TREES = ('Project_A', 'Project_B', 'Project_C');