Closed Bug 273441 Opened 20 years ago Closed 19 years ago

Remove tinderbox dependency upon obsolete bonsai scripts

Categories

(Webtools Graveyard :: Tinderbox, defect)

defect
Not set
blocker

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cls, Assigned: cls)

References

Details

Attachments

(1 file, 2 obsolete files)

In bug 44642, we cleaned up bonsai to no longer install scripts that it doesn't
use.  Among these scripts were header.pl, lloydcgi.pl & utils.pl which are used
by tinderbox.  Tinderbox needs to be updated to contain its own copies of those
scripts so that they can be completely removed from bonsai.
I'd like to remove the 'use ../bonsai' calls at the same time but I don't have
a tinderbox server setup so I couldn't test those changes.  Besides these 3
scripts that all of the tinderbox scripts require, it looks like tinderbox also
relies upon cvsblame.pl & cvsquery.pl in warnings.pl & buildwho.pl,
respectively.
Attachment #168065 - Flags: review?(myk)
Comment on attachment 168065 [details] [diff] [review]
Add header.pl, lloydcgi.pl & utils.pl to tinderbox

I haven't tested this either, but it makes perfect sense.  I'd like to say
r=myk, but it seems like this should be tested first, and I don't have a
tinderbox test environment immediately available either.
Comment on attachment 168065 [details] [diff] [review]
Add header.pl, lloydcgi.pl & utils.pl to tinderbox

>+    if ($pmtime eq "" || $pmtime < $tmtime) {
>+        system "./perlifyconfig.tcl";
>+    }

I don't see any such tcl script.  what's this attempting to accomplish?

>+    open(CONFIGDATA, "<data/configdata.pl") || die "Can't open configdata.pl";

This file appears to belong to bonsai, how are we getting to it?

>+sub ConnectToDatabase {
>+    if ($dbh == "") {
>+        $dbh = DBI->connect("bonsai","$mysqluser","$mysqlpassword","mysql") || die "Can't connect to database server -- $DBD::mysql::db_errstr";
>+    }

Where do this username and password come from?	(the configdata.pl in the
production bonsai doesn't contain a username or password in it, and that's the
only file you've pulled from bonsai)

>+sub IsHidden {
>+    my ($name) = (@_);
>+    $name =~ s:///*:/:g;        # Remove any multiple slashes.
>+    if (!defined @hidelist) {
>+        if (open(HIDE, "<data/hidelist")) {

This file is also in the bonsai tree, not in tinderbox's
Attachment #168065 - Flags: review?(myk) → review-
Those files contain a bunch of cruft; that's for sure.  My production bonsai
install doesn't have configdata.pl anywhere.  hidelist does come from bonsai. 
No one uses those db routines from utils.pl anymore.  In fact, it looks like
utils.pl may be completely unused even by tinderbox but it needs to be tested.
(In reply to comment #4)
> Those files contain a bunch of cruft; that's for sure.  My production bonsai
> install doesn't have configdata.pl anywhere.

Ours has it, but I'm not sure if it's being used... it has a bunch of
netscape.com stuff in it.  So I hope it's not being used :)
Attached patch v2.0 (obsolete) — Splinter Review
Here's an updated patch that also removes the 'use lib ../bonsai' uses.  Only header.pl is copied to the tinderbox directory.  The useful bits of lloydcgi.pl have been moved to tbgloabls.pl and utils.pl is completely unused.  Various scripts were pulling in lloydcgi.pl to parse the cgi args and I made that explicit where necessary.

I also added some changes to tighten up permissions instead of making everything world-writable by default.  Our local tinderbox server has regular users on it so that mode 777 stuff had to go.
Attachment #168065 - Attachment is obsolete: true
Attachment #221715 - Flags: review?(justdave)
Blocks: 338047
Attachment #221715 - Flags: review?(justdave) → review?(bear)
I need to setup a "test tinderbox install" area and also install a un-mod'd bonsai to ensure I'm testing all the clean bits.

I'll do that tonight or this weekend - just wanted to give you a heads-up.
Comment on attachment 221715 [details] [diff] [review]
v2.0

The only reason I gave a r- is because of a small error in the Makefile changes - at the end of the install step you have:

  ifneq (,$(USER)$(GROUP))

and when I don't define USER or GROUP in the Makefile it fails on my Ubuntu system because the OS provides USER.

If you change it to read

  ifneq (,$(GROUP))

then I will r+ it
Attachment #221715 - Flags: review?(bear) → review-
Attached patch v2.1Splinter Review
Replaced USER & GROUP with TINDERBOX_USER & TINDERBOX_GROUP.
Attachment #221715 - Attachment is obsolete: true
Attachment #223484 - Flags: review?(bear)
Comment on attachment 223484 [details] [diff] [review]
v2.1

thanks for the update
Attachment #223484 - Flags: review?(bear) → review+
Checking in webtools/tinderbox/Makefile;
/cvsroot/mozilla/webtools/tinderbox/Makefile,v  <--  Makefile
new revision: 1.9; previous revision: 1.8
done
Checking in webtools/tinderbox/addimage.cgi;
/cvsroot/mozilla/webtools/tinderbox/addimage.cgi,v  <--  addimage.cgi
new revision: 1.6; previous revision: 1.5
done
Checking in webtools/tinderbox/addnote.cgi;
/cvsroot/mozilla/webtools/tinderbox/addnote.cgi,v  <--  addnote.cgi
new revision: 1.16; previous revision: 1.15
done
Checking in webtools/tinderbox/admintree.cgi;
/cvsroot/mozilla/webtools/tinderbox/admintree.cgi,v  <--  admintree.cgi
new revision: 1.21; previous revision: 1.20
done
Checking in webtools/tinderbox/buildwho.pl;
/cvsroot/mozilla/webtools/tinderbox/buildwho.pl,v  <--  buildwho.pl
new revision: 1.13; previous revision: 1.12
done
Checking in webtools/tinderbox/bustagestats.cgi;
/cvsroot/mozilla/webtools/tinderbox/bustagestats.cgi,v  <--  bustagestats.cgi
new revision: 1.6; previous revision: 1.5
done
Checking in webtools/tinderbox/doadmin.cgi;
/cvsroot/mozilla/webtools/tinderbox/doadmin.cgi,v  <--  doadmin.cgi
new revision: 1.15; previous revision: 1.14
done
RCS file: /cvsroot/mozilla/webtools/tinderbox/header.pl,v
done
Checking in webtools/tinderbox/header.pl;
/cvsroot/mozilla/webtools/tinderbox/header.pl,v  <--  header.pl
initial revision: 1.1
done
Checking in webtools/tinderbox/processbuild.pl;
/cvsroot/mozilla/webtools/tinderbox/processbuild.pl,v  <--  processbuild.pl
new revision: 1.49; previous revision: 1.48
done
Checking in webtools/tinderbox/showbuilds.cgi;
/cvsroot/mozilla/webtools/tinderbox/showbuilds.cgi,v  <--  showbuilds.cgi
new revision: 1.185; previous revision: 1.184
done
Checking in webtools/tinderbox/showimages.cgi;
/cvsroot/mozilla/webtools/tinderbox/showimages.cgi,v  <--  showimages.cgi
new revision: 1.5; previous revision: 1.4
done
Checking in webtools/tinderbox/showlog.cgi;
/cvsroot/mozilla/webtools/tinderbox/showlog.cgi,v  <--  showlog.cgi
new revision: 1.19; previous revision: 1.18
done
Checking in webtools/tinderbox/tbglobals.pl;
/cvsroot/mozilla/webtools/tinderbox/tbglobals.pl,v  <--  tbglobals.pl
new revision: 1.31; previous revision: 1.30
done
Checking in webtools/tinderbox/viewallnotes.cgi;
/cvsroot/mozilla/webtools/tinderbox/viewallnotes.cgi,v  <--  viewallnotes.cgi
new revision: 1.16; previous revision: 1.15
done
Checking in webtools/tinderbox/warnings.pl;
/cvsroot/mozilla/webtools/tinderbox/warnings.pl,v  <--  warnings.pl
new revision: 1.93; previous revision: 1.92
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: