зеркало из https://github.com/mozilla/gecko-dev.git
Patch by Pontus Lidman <pontus@mathcore.com> -- now uses autoconf,
works with tcl 8.x, more configuration stuff, etc.
This commit is contained in:
Родитель
8d208edba5
Коммит
bb4ae85d59
|
@ -11,6 +11,6 @@ will tell you what has been changed in the last week.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
4/9/99 Now uses DBI::mysql instead of the mysql perl module that came with
|
4/30/99 Now uses autoconf, and comes with a configure script. A few
|
||||||
mysql. One side effect of htis is that it now tries to log in as user
|
new variables can be defined in your configdata file, and probably
|
||||||
"bonsai"; I'm actually not sure what username it was trying before.
|
need to be. See the file configdata.in for a list of the new parameters.
|
||||||
|
|
|
@ -33,7 +33,7 @@ tree control (Bonsai - http://www.mozilla.org/bonsai.html).
|
||||||
While LXR formatting is not as pretty as LSN's one, it has a huge
|
While LXR formatting is not as pretty as LSN's one, it has a huge
|
||||||
advantage - it lets you see where the identifier is defined and used.
|
advantage - it lets you see where the identifier is defined and used.
|
||||||
And Bonsai brings nice and easy (though sometimes incompatible with
|
And Bonsai brings nice and easy (though sometimes incompatible with
|
||||||
browsers other but Netscape's own) intarface to the CVS history. This
|
browsers other but Netscape's own) interface to the CVS history. This
|
||||||
includes getting list of changes, giffs between revisions, etc.
|
includes getting list of changes, giffs between revisions, etc.
|
||||||
|
|
||||||
All in all LXR+Bonsai+other stuff beneath is a useful tool capable
|
All in all LXR+Bonsai+other stuff beneath is a useful tool capable
|
||||||
|
@ -68,6 +68,10 @@ The short list of the things you will need:
|
||||||
6) Date::Parse module for Perl
|
6) Date::Parse module for Perl
|
||||||
7) Some kind of HTTP server so you could use CGI scripts
|
7) Some kind of HTTP server so you could use CGI scripts
|
||||||
|
|
||||||
|
You could try running the ./configure script to see what tools it
|
||||||
|
complains about right now. Mind you, it won't check for the MySQL
|
||||||
|
database.
|
||||||
|
|
||||||
1.1 Getting and setting up MySQL database
|
1.1 Getting and setting up MySQL database
|
||||||
|
|
||||||
Visit MySQL homepage at http://www.tcx.se and grab the latest
|
Visit MySQL homepage at http://www.tcx.se and grab the latest
|
||||||
|
@ -82,19 +86,21 @@ writable by all users on your machine and change access level
|
||||||
later. This would save you a lot of time trying to guess whether it's
|
later. This would save you a lot of time trying to guess whether it's
|
||||||
permissions or a mistake in the script that make things fail.
|
permissions or a mistake in the script that make things fail.
|
||||||
|
|
||||||
1.2-3 Getting and building Tcl & TclX 7.6
|
1.2-3 Getting and building Tcl & TclX 8.0.4
|
||||||
|
|
||||||
Tcl homepage is at http://www.scriptics.com. You may get sources
|
Bonsai works with Tcl & TclX 7.6 too, but if you need to build,
|
||||||
for UNIX from ftp://ftp.scriptics.com/pub/tcl/tcl7_6/tcl7.6p2.tar.gz.
|
you might as well get the latest stable versions.
|
||||||
|
Tcl homepage is at http://www.scriptics.com. You may get sources
|
||||||
|
for UNIX from ftp://ftp.scriptics.com/pub/tcl/tcl8_0/tcl8.0.4.tar.gz.
|
||||||
TclX is an extension for Tcl that adds a lot of useful functions that
|
TclX is an extension for Tcl that adds a lot of useful functions that
|
||||||
are heavily used in Bonsai tool.
|
are heavily used in Bonsai tool.
|
||||||
TclX page is http://www.neosoft.com/tclx. Download sources from
|
TclX page is http://www.neosoft.com/tclx. Download sources from
|
||||||
ftp://ftp.neosoft.com/pub/tcl/TclX/tclX7.6.0.tar.gz. Watch out for the
|
ftp://ftp.neosoft.com/pub/tcl/TclX/tclX8.0.4.tar.gz. Watch out for the
|
||||||
case of the letters in URL. These guys are going to bring some fun
|
case of the letters in URL. These guys are going to bring some fun
|
||||||
into your life by spelling their program name in various ways.
|
into your life by spelling their program name in various ways.
|
||||||
|
|
||||||
Now you've probably got both Tcl and TclX 7.6. You may try to use
|
Now you've probably got both Tcl and TclX 8.0.4. You may try to use
|
||||||
version 8.X but I'm not sure about results. Unfortunately I'm not an
|
later versions but I'm not sure about results. Unfortunately I'm not an
|
||||||
expert in "Tcl&Co.".
|
expert in "Tcl&Co.".
|
||||||
|
|
||||||
Build and install Tcl first. Then build and install TclX. This
|
Build and install Tcl first. Then build and install TclX. This
|
||||||
|
@ -102,20 +108,13 @@ should go without serious problems
|
||||||
|
|
||||||
1.4 mysqltcl - the tricky part
|
1.4 mysqltcl - the tricky part
|
||||||
|
|
||||||
Grab msqltcl 1.50 (yes, "msqltcl" without 'y'. That's not a typo) from
|
Grab mysqltcl 1.53 from MySQL site's contributed software area
|
||||||
MySQL site's contributed software area (http://www.tcx.se/Contrib/) or
|
(http://www.tcx.se/Contrib/) I've used version 1.53 and it works for
|
||||||
from mSQL site (www.hughes.com.au). I've used version 1.50 and it
|
me, though you may try more recent version at your own risk. You're
|
||||||
works for me, though you may try more recent version at your own
|
risking anyway.
|
||||||
risk. You're risking anyway.
|
|
||||||
|
|
||||||
Then grab mysqltcl.c-patch from MySQL's contrib area and apply this
|
You will need to patch mysqltcl to include support for TclX. A
|
||||||
patch to msqltcl.c file from msqltcl-1.50 distribution.
|
patch is provided in Appendix A.
|
||||||
|
|
||||||
Try to make msqltcl binary which is in fact mYsqltcl already. Very
|
|
||||||
likely that you will not be able to compile it without modifications.
|
|
||||||
|
|
||||||
You can use the patch in APPENDIX 1 to see what changes I had to make
|
|
||||||
to compile mysqltcl. Your mileage may vary.
|
|
||||||
|
|
||||||
1.5 Perl + Mysql
|
1.5 Perl + Mysql
|
||||||
|
|
||||||
|
@ -161,13 +160,7 @@ id you're running the daemon with.
|
||||||
2. TWEAKING THE TOOLS
|
2. TWEAKING THE TOOLS
|
||||||
|
|
||||||
Now you should have all necessary tools to be able to run LXR and
|
Now you should have all necessary tools to be able to run LXR and
|
||||||
Bonsai scripts and see why the wouldn't work for you right now.
|
Bonsai scripts and see why the wouldn't work for you right now.
|
||||||
|
|
||||||
First of all you have to change "#!/usr/bonsaitools" to wherever
|
|
||||||
you've installed your binaries in all executable scripts in LXR and
|
|
||||||
Bonsai directories. There is now a Makefile with a "make install"
|
|
||||||
command that can make this easier. See the Makefile for details.
|
|
||||||
|
|
||||||
|
|
||||||
2.1 LXR
|
2.1 LXR
|
||||||
|
|
||||||
|
@ -217,24 +210,34 @@ Here is the short list of changes I had to make
|
||||||
setup. You have to make a lot of changes until more portable
|
setup. You have to make a lot of changes until more portable
|
||||||
configuration mechanism is introduced.
|
configuration mechanism is introduced.
|
||||||
|
|
||||||
First of all, create data/ directory in your Bonsai dir. Then edit
|
These steps should create a basic Bonsai install:
|
||||||
data/configdata file as described in README file. Create
|
|
||||||
appropriate data/XXX directory for each tree XXX you've configured in
|
./configure
|
||||||
'configdata'. Compile trapdoor program and place binary in the data/
|
make install
|
||||||
dir ('make install' will do this for you.).
|
|
||||||
run 'trapdoor <admin password here> >data/passwd' it will set up
|
You might want to give the option --prefix=<path> to configure to
|
||||||
admin's password. At least it should. It worked for me with empty
|
install Bonsai in another place than /usr/local, e.g. /var/www. It
|
||||||
password, but I still am unable to change it from the web.
|
will make a new directory named "bonsai" in the prefix directory you specify.
|
||||||
|
|
||||||
|
Edit data/configdata file as described in README file. Create
|
||||||
|
appropriate data/XXX directory for each tree XXX you've configured
|
||||||
|
in 'configdata'.
|
||||||
|
|
||||||
|
Go to the data directory and run
|
||||||
|
|
||||||
|
trapdoor <admin password here> >data/passwd
|
||||||
|
|
||||||
|
it will set up admin's password.
|
||||||
|
|
||||||
file: cvsblame.cgi
|
file: cvsblame.cgi
|
||||||
@line 120: you may add your own translation to help find
|
@line 202: you may add your own translation to help find
|
||||||
appropriate RCS file for the given source file.
|
appropriate RCS file for the given source file.
|
||||||
TODO: We'd better get this information from CVS/Repository
|
TODO: We'd better get this information from CVS/Repository
|
||||||
file. It's more generic than hardcoded tweaks.
|
file. It's more generic than hardcoded tweaks.
|
||||||
|
|
||||||
file: cvslog.cgi
|
file: cvslog.cgi
|
||||||
@line 90: the same tweaks to find RCS file for given source file
|
@line 154: the same tweaks to find RCS file for given source file
|
||||||
@ line 463: add translations to $lxr_path to help find source
|
@ line 475: add translations to $lxr_path to help find source
|
||||||
file for given RCS file.
|
file for given RCS file.
|
||||||
TODO: This should be done using information in
|
TODO: This should be done using information in
|
||||||
$CVSROOT/CVSROOT/modules file. Typical example is the
|
$CVSROOT/CVSROOT/modules file. Typical example is the
|
||||||
|
@ -245,25 +248,10 @@ password, but I still am unable to change it from the web.
|
||||||
|
|
||||||
|
|
||||||
file: cvsquery.cgi
|
file: cvsquery.cgi
|
||||||
@line 23: There are some cases when cvsrot is not passed as
|
@line 25: There are some cases when cvsroot is not passed as
|
||||||
parameter for cvsquery.cgi. You should better check for
|
parameter for cvsquery.cgi. You should better check for
|
||||||
empty CVS_ROOT and set it to your CVSROOT path.
|
empty CVS_ROOT and set it to your CVSROOT path.
|
||||||
|
|
||||||
@line 71: Here we should try to make backward translation for
|
|
||||||
directory name similar to one @line 463 in cvslog.cgi.
|
|
||||||
|
|
||||||
|
|
||||||
@line 151: you will probably want to send email somewhere else
|
|
||||||
but people @netscape.com 8-)
|
|
||||||
|
|
||||||
|
|
||||||
file: dolog.pl
|
|
||||||
@line 42: change path to rlog program
|
|
||||||
|
|
||||||
file: toplevel.cgi
|
|
||||||
@line 240: remove links that are not accessible to you anyway
|
|
||||||
|
|
||||||
|
|
||||||
That's basically it. With some luck and persistence you will have 90%
|
That's basically it. With some luck and persistence you will have 90%
|
||||||
working system at this point. A lot of these things are just asking to be
|
working system at this point. A lot of these things are just asking to be
|
||||||
fixed in near feature. And I hope they will be.
|
fixed in near feature. And I hope they will be.
|
||||||
|
@ -271,7 +259,9 @@ fixed in near feature. And I hope they will be.
|
||||||
3. Setting up database
|
3. Setting up database
|
||||||
|
|
||||||
This is quite simple but time consuming operation.
|
This is quite simple but time consuming operation.
|
||||||
First create database structure using maketable.sh csript.
|
First create database structure using maketable.sh script. You might
|
||||||
|
want to edit it to use the user and password you want for the bonsai
|
||||||
|
database.
|
||||||
Then go to Bonsai administration page and press "Rebuild CVS history"
|
Then go to Bonsai administration page and press "Rebuild CVS history"
|
||||||
button. Then you may go to the theater and watch a movie or two. It
|
button. Then you may go to the theater and watch a movie or two. It
|
||||||
will talke a lot of time. It takes several seconds to process one
|
will talke a lot of time. It takes several seconds to process one
|
||||||
|
@ -279,8 +269,22 @@ file. The more revisions in file the more time it will take. My SUN
|
||||||
workstation with 2x200Mhz UltraSPARC processors run about an hour to
|
workstation with 2x200Mhz UltraSPARC processors run about an hour to
|
||||||
process about 4K files with 20K+ revisions. Your mileage may vary.
|
process about 4K files with 20K+ revisions. Your mileage may vary.
|
||||||
|
|
||||||
Read the comments at the top of dolog.pl to see how to keep your
|
Copy "dolog.pl" to your CVSROOT directory, and check it in. Add
|
||||||
database updated when people make checkins.
|
"dolog.pl" to CVSROOT/checkoutlist, and check it in. Then, add a line
|
||||||
|
to your CVSROOT/loginfo file that says something like:
|
||||||
|
|
||||||
|
ALL $CVSROOT/CVSROOT/dolog.pl -r /cvsroot bonsai-checkin-daemon@my.bonsai.machine
|
||||||
|
|
||||||
|
Replace "/cvsroot" with the name of the CVS root directory, and
|
||||||
|
"my.bonsai.machine" with the name of the machine Bonsai runs on. Now,
|
||||||
|
on my.bonsai.machine, add a mail alias so that mail sent to
|
||||||
|
"bonsai-checkin-daemon" will get piped to handleCheckinMail.tcl. The
|
||||||
|
first argument to handleCheckinMail.tcl is the directory that bonsai
|
||||||
|
is installed in. E.g. in /etc/aliases, add
|
||||||
|
|
||||||
|
bonsai-checkin-daemon: "|/usr/local/bonsai/handleCheckinMail.tcl /usr/local/bonsai"
|
||||||
|
|
||||||
|
or whatever is appropriate for your mail transport agent.
|
||||||
|
|
||||||
4. Things to do
|
4. Things to do
|
||||||
|
|
||||||
|
@ -315,116 +319,79 @@ time trying. Or just reading.
|
||||||
APPENDIXES
|
APPENDIXES
|
||||||
*******************************************************
|
*******************************************************
|
||||||
|
|
||||||
|
APPENDIX 1. Patch to build mysqltcl with TclX
|
||||||
|
---------------------------------------------
|
||||||
|
|
||||||
APPENDIX 1. Patch to build mysqltcl.
|
diff -u -r mysqltcl-1.53/Makefile mysqltcl-1.53p/Makefile
|
||||||
--------------------------------------
|
--- mysqltcl-1.53/Makefile Mon Jul 6 18:11:55 1998
|
||||||
|
+++ mysqltcl-1.53p/Makefile Wed Apr 28 09:48:55 1999
|
||||||
diff -u -r msqltcl-1.50/Makefile mysqltcl-1.50/Makefile
|
@@ -10,7 +10,7 @@
|
||||||
--- msqltcl-1.50/Makefile Tue Jun 6 07:25:39 1995
|
TKHOME = /usr
|
||||||
+++ mysqltcl-1.50/Makefile Tue Jun 23 18:20:07 1998
|
MYSQLHOME = /usr/local/mysql
|
||||||
@@ -38,11 +38,11 @@
|
|
||||||
#
|
|
||||||
#----- Tcl/Tk libraries & such
|
|
||||||
# Path for Tcl include files.
|
|
||||||
-TCLINCL = -I/usr/local/include
|
|
||||||
+TCLINCL = -I../include
|
|
||||||
# Path for Tk include files, if different from the above.
|
|
||||||
TKINCL =
|
|
||||||
# Libraries required to link plain Tcl.
|
|
||||||
-TCLLIBS = -L/usr/local/lib -ltcl -lm
|
|
||||||
+TCLLIBS = -L../lib -ltclx7.6.0 -ltcl7.6 -lm -lnsl -lsocket
|
|
||||||
# Libraries required to link plain Tk.
|
|
||||||
TKLIBS = -L/usr/local/lib -ltk -ltcl -lX11 -lm
|
|
||||||
|
|
||||||
@@ -66,11 +66,11 @@
|
-SHARED = yes
|
||||||
#
|
+SHARED = no
|
||||||
#----- Tcl/Tk libraries & such
|
#PLATFORM=SunOS-5.5.1-sparc
|
||||||
# Path for Tcl include files.
|
#PLATFORM=SunOS-5.6-sparc
|
||||||
-NEWTCLINCL = -I/usr/local/new/include
|
PLATFORM=Linux-2.0-i586
|
||||||
+NEWTCLINCL = -I../include
|
@@ -59,7 +59,7 @@
|
||||||
# Path for Tk include files, if different from the above.
|
CPPFLAGS = -I$(XHOME)/include -I$(TCLHOME)/include -I$(TKHOME)/include \
|
||||||
NEWTKINCL =
|
-I$(MYSQLHOME)/include
|
||||||
# Libraries required to link plain Tcl.
|
LOADLIBES = -L$(XHOME)/lib -L$(TCLHOME)/lib -L$(TKHOME)/lib \
|
||||||
-NEWTCLLIBS = -L/usr/local/new/lib -ltcl -lm
|
- -L$(MYSQLHOME)/lib -lmysqlclient -ltk8.0 -ltcl8.0 -lX11 -lm -ldl $(LIBS)
|
||||||
+NEWTCLLIBS = -L../lib -ltclx7.6.0 -ltcl7.6 -lm -lnsl -lsocket
|
+ -L$(MYSQLHOME)/lib -lmysqlclient -ltclx8.0.4 -ltk8.0 -ltcl8.0 -lX11 -lm -ldl $(LIBS)
|
||||||
# Libraries required to link plain Tk.
|
|
||||||
NEWTKLIBS = -L/usr/local/new/lib -ltk -ltcl -lX11 -lm
|
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@
|
all: $(OUTPUT)
|
||||||
# Path for TclX/TkX include files, if different from plain Tcl.
|
|
||||||
NEWTCLXINCL =
|
|
||||||
# Extra libraries required to link TclX.
|
|
||||||
-NEWTCLXLIBS = -L/usr/local/new/lib -ltclx
|
|
||||||
+NEWTCLXLIBS = -L../mysql/lib -ltclx
|
|
||||||
# Extra libraries required to link TkX.
|
|
||||||
NEWTKXLIBS = -L/usr/local/new/lib -ltkx -ltclx
|
|
||||||
# TclX/TkX 'AppInit' files (base names).
|
|
||||||
@@ -94,16 +94,16 @@
|
|
||||||
#
|
|
||||||
#----- mSQL libraries & such
|
|
||||||
# Path for mSQL include files.
|
|
||||||
-MSQLINCL = -I/usr/local2/src/Minerva/include
|
|
||||||
+MSQLINCL = -I../mysql/include
|
|
||||||
# Libraries required to link an mSQL application.
|
|
||||||
-MSQLLIB = -L/usr/local2/src/Minerva/lib -lmsql
|
|
||||||
+MSQLLIB = -L../mysql/lib -lmysqlclient
|
|
||||||
|
|
||||||
#===== END OF CONFIGURATION DEFINITIONS =====
|
diff -u -r mysqltcl-1.53/mysqltcl.c mysqltcl-1.53p/mysqltcl.c
|
||||||
|
--- mysqltcl-1.53/mysqltcl.c Mon Jul 6 17:35:17 1998
|
||||||
|
+++ mysqltcl-1.53p/mysqltcl.c Mon Apr 26 11:21:10 1999
|
||||||
|
@@ -27,7 +27,7 @@
|
||||||
|
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
INCL = -I. ${MSQLINCL} ${TCLINCL} ${TKINCL}
|
-#include <tcl.h>
|
||||||
CFLAGS = ${OPTIM} -c
|
+#include <tclExtend.h>
|
||||||
LDFLAGS = ${OPTIM}
|
#include <mysql.h>
|
||||||
-PROGS = msqltcl msqlwish
|
|
||||||
+PROGS = msqltcl # msqlwish
|
|
||||||
TCLLINK = ${MSQLLIB} ${TCLLIBS}
|
|
||||||
TKLINK = ${MSQLLIB} ${TKLIBS}
|
|
||||||
|
|
||||||
diff -u -r msqltcl-1.50/new-tclAppInit.c mysqltcl-1.50/new-tclAppInit.c
|
#include <errno.h>
|
||||||
--- msqltcl-1.50/new-tclAppInit.c Tue Jun 6 07:25:38 1995
|
diff -u -r mysqltcl-1.53/mysqltclsh.c mysqltcl-1.53p/mysqltclsh.c
|
||||||
+++ mysqltcl-1.50/new-tclAppInit.c Tue Jun 23 18:28:14 1998
|
--- mysqltcl-1.53/mysqltclsh.c Wed Mar 18 13:44:55 1998
|
||||||
@@ -14,7 +14,7 @@
|
+++ mysqltcl-1.53p/mysqltclsh.c Mon Apr 26 11:26:26 1999
|
||||||
static char sccsid[] = "@(#) tclAppInit.c 1.11 94/12/17 16:14:03";
|
@@ -17,7 +17,7 @@
|
||||||
#endif /* not lint */
|
#include <X11/Intrinsic.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
-#include "tcl.h"
|
-#include "tcl.h"
|
||||||
+#include "tclExtend.h"
|
+#include "tclExtend.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following variable is a special hack that is needed in order for
|
* The following variable is a special hack that is needed in order for
|
||||||
@@ -48,7 +48,7 @@
|
@@ -61,7 +61,7 @@
|
||||||
int argc; /* Number of command-line arguments. */
|
#ifdef TCL_XT_TEST
|
||||||
char **argv; /* Values of command-line arguments. */
|
XtToolkitInitialize();
|
||||||
{
|
#endif
|
||||||
- Tcl_Main(argc, argv);
|
- Tcl_Main(argc, argv, Tcl_AppInit);
|
||||||
+ TclX_Main(argc, argv, Tcl_AppInit);
|
+ TclX_Main(argc, argv, Tcl_AppInit);
|
||||||
return 0; /* Needed only to prevent compiler warning. */
|
return 0; /* Needed only to prevent compiler warning. */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,6 +79,10 @@
|
@@ -92,6 +92,10 @@
|
||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if (Tclx_Init(interp) == TCL_ERROR) {
|
+ if (Tclx_Init(interp) == TCL_ERROR) {
|
||||||
+ return TCL_ERROR;
|
+ return TCL_ERROR;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
/*
|
#ifdef TCL_TEST
|
||||||
* Call the init procedures for included packages. Each call should
|
#ifdef TCL_XT_TEST
|
||||||
* look like this:
|
if (Tclxttest_Init(interp) == TCL_ERROR) {
|
||||||
@@ -90,7 +94,7 @@
|
@@ -135,6 +139,6 @@
|
||||||
* where "Mod" is the name of the module.
|
|
||||||
*/
|
|
||||||
|
|
||||||
- if (Msqltcl_Init(interp) == TCL_ERROR) {
|
|
||||||
+ if (Mysqltcl_Init(interp) == TCL_ERROR) {
|
|
||||||
return TCL_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -106,6 +110,6 @@
|
|
||||||
* then no user-specific startup file will be run under any conditions.
|
* then no user-specific startup file will be run under any conditions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
- tcl_RcFileName = "~/.tclshrc";
|
- Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclshrc", TCL_GLOBAL_ONLY);
|
||||||
+/* tcl_RcFileName = "~/.tclshrc"; */
|
+/* Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclshrc", TCL_GLOBAL_ONLY);*/
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Generated automatically from Makefile.in by configure.
|
||||||
#!gmake
|
#!gmake
|
||||||
#
|
#
|
||||||
# The contents of this file are subject to the Netscape Public License
|
# The contents of this file are subject to the Netscape Public License
|
||||||
|
@ -22,12 +23,21 @@
|
||||||
# to where you will install the running Bonsai. Then "make install" should
|
# to where you will install the running Bonsai. Then "make install" should
|
||||||
# copy things for you.
|
# copy things for you.
|
||||||
|
|
||||||
CC = cc
|
CC = gcc
|
||||||
CFLAGS = -g
|
CFLAGS = -g -O2
|
||||||
#LDFLAGS = -lcrypt
|
# -lcrypt
|
||||||
#PERL = /usr/bin/perl
|
LDFLAGS = -lcrypt
|
||||||
#MYSQLTCL = /bonsai/bin/mysqltcl
|
# /usr/bin/perl
|
||||||
#PREFIX = /home/httpd/html/bonsai
|
PERL = /usr/bonsaitools/bin/perl
|
||||||
|
# /usr/local/src/mysqltcl-1.53/mysqltclsh
|
||||||
|
MYSQLTCL = /usr/bonsaitools/bin/mysqltcl
|
||||||
|
# /var/www/bonsai
|
||||||
|
PREFIX = /usr/ns-home/docs/bonsai
|
||||||
|
|
||||||
|
CVS=/toollinks/cvs
|
||||||
|
RLOG=/toollinks/rlog
|
||||||
|
CO=/toollinks/co
|
||||||
|
RCSDIFF=/toollinks/rcsdiff
|
||||||
|
|
||||||
FILES = CGI.tcl \
|
FILES = CGI.tcl \
|
||||||
SourceChecker.cgi \
|
SourceChecker.cgi \
|
||||||
|
@ -94,27 +104,48 @@ FILES = CGI.tcl \
|
||||||
testlock.pl \
|
testlock.pl \
|
||||||
toplevel.cgi \
|
toplevel.cgi \
|
||||||
utils.pl \
|
utils.pl \
|
||||||
viewold.cgi
|
viewold.cgi
|
||||||
|
|
||||||
|
all: trapdoor configdata
|
||||||
|
|
||||||
trapdoor: trapdoor.o
|
trapdoor: trapdoor.o
|
||||||
$(CC) -o trapdoor trapdoor.o $(LDFLAGS)
|
$(CC) -o trapdoor trapdoor.o $(LDFLAGS)
|
||||||
|
|
||||||
install: trapdoor
|
configdata: configdata.in
|
||||||
mkdir -p $(PREFIX) && \
|
sed -e s#_CVS_#$(CVS)#g \
|
||||||
for I in $(FILES); do \
|
-e s#_RLOG_#$(RLOG)#g \
|
||||||
|
-e s#_CO_#$(CO)#g \
|
||||||
|
-e s#_RCSDIFF_#$(RCSDIFF)#g \
|
||||||
|
$< >$@
|
||||||
|
|
||||||
|
install: trapdoor configdata
|
||||||
|
-mkdir -p $(PREFIX)
|
||||||
|
@for I in $(FILES); do \
|
||||||
echo Installing $$I && \
|
echo Installing $$I && \
|
||||||
sed -e s#/usr/bonsaitools/bin/perl#$(PERL)#g \
|
sed -e s#/usr/bonsaitools/bin/perl#$(PERL)#g \
|
||||||
-e s#/usr/bonsaitools/bin/mysqltcl#$(MYSQLTCL)#g \
|
-e s#/usr/bonsaitools/bin/mysqltcl#$(MYSQLTCL)#g \
|
||||||
-e s#/tools/ns/bin/perl5#$(PERL)#g \
|
-e s#/tools/ns/bin/perl5#$(PERL)#g \
|
||||||
$$I > $(PREFIX)/$$I && \
|
$$I > $(PREFIX)/$$I && \
|
||||||
chmod 755 $(PREFIX)/$$I; done && \
|
chmod 755 $(PREFIX)/$$I; done
|
||||||
mkdir -p $(PREFIX)/data && \
|
-mkdir -p $(PREFIX)/data
|
||||||
cp -f trapdoor $(PREFIX)/data && \
|
cp trapdoor $(PREFIX)/data
|
||||||
chmod 755 $(PREFIX)/data && \
|
chmod 755 $(PREFIX)/data
|
||||||
cp -f bonsai.gif $(PREFIX) && \
|
cp bonsai.gif $(PREFIX)
|
||||||
chmod 755 $(PREFIX)/bonsai.gif
|
chmod 755 $(PREFIX)/bonsai.gif
|
||||||
|
@if test ! -r $(PREFIX)/data/configdata ; then \
|
||||||
|
echo "Installing configdata" && \
|
||||||
|
cp configdata $(PREFIX)/data ; \
|
||||||
|
else \
|
||||||
|
echo ; \
|
||||||
|
echo "Not replacing existing configdata" ; \
|
||||||
|
echo "Check configdata in build directory for new features" ; \
|
||||||
|
fi
|
||||||
|
@echo
|
||||||
|
@echo "If you are installing a new Bonsai (not upgrading), you should"
|
||||||
|
@echo "run maketables.sh to create database tables, then customize the"
|
||||||
|
@echo "Bonsai configuration in $(PREFIX)/data/configdata"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f trapdoor trapdoor.o
|
rm -f trapdoor trapdoor.o configdata
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,150 @@
|
||||||
|
#!gmake
|
||||||
|
#
|
||||||
|
# The contents of this file are subject to the Netscape Public License
|
||||||
|
# Version 1.0 (the "License"); you may not use this file except in
|
||||||
|
# compliance with the License. You may obtain a copy of the License at
|
||||||
|
# http://www.mozilla.org/NPL/
|
||||||
|
#
|
||||||
|
# Software distributed under the License is distributed on an "AS IS"
|
||||||
|
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing rights and limitations
|
||||||
|
# under the License.
|
||||||
|
#
|
||||||
|
# The Original Code is the Bonsai CVS tool.
|
||||||
|
#
|
||||||
|
# The Initial Developer of the Original Code is Netscape Communications
|
||||||
|
# Corporation. Portions created by Netscape are Copyright (C) 1998
|
||||||
|
# Netscape Communications Corporation. All Rights Reserved.
|
||||||
|
|
||||||
|
|
||||||
|
# This Makefile helps you install Bonsai. Define PERL and MYSQLTCL to
|
||||||
|
# the full pathnames of where you have these utilities. Define PREFIX
|
||||||
|
# to where you will install the running Bonsai. Then "make install" should
|
||||||
|
# copy things for you.
|
||||||
|
|
||||||
|
CC = @CC@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
# -lcrypt
|
||||||
|
LDFLAGS = @LIBS@
|
||||||
|
# /usr/bin/perl
|
||||||
|
PERL = @PERL@
|
||||||
|
# /usr/local/src/mysqltcl-1.53/mysqltclsh
|
||||||
|
MYSQLTCL = @MYSQLTCL@
|
||||||
|
# /var/www/bonsai
|
||||||
|
PREFIX = @prefix@/bonsai
|
||||||
|
|
||||||
|
CVS=@CVS@
|
||||||
|
RLOG=@RLOG@
|
||||||
|
CO=@CO@
|
||||||
|
RCSDIFF=@RCSDIFF@
|
||||||
|
|
||||||
|
FILES = CGI.tcl \
|
||||||
|
SourceChecker.cgi \
|
||||||
|
SourceChecker.pm \
|
||||||
|
addcheckin.tcl \
|
||||||
|
admin.cgi \
|
||||||
|
adminfuncs.tcl \
|
||||||
|
adminmail.tcl \
|
||||||
|
branchspam.cgi \
|
||||||
|
branchspammer.cgi \
|
||||||
|
changebar.tcl \
|
||||||
|
closemessage \
|
||||||
|
contacthelp.html \
|
||||||
|
countcheckins.cgi \
|
||||||
|
createlegaldirs.tcl \
|
||||||
|
cvsblame.cgi \
|
||||||
|
cvsblame.pl \
|
||||||
|
cvsguess.cgi \
|
||||||
|
cvsindex.pl \
|
||||||
|
cvslog.cgi \
|
||||||
|
cvsmenu.pl \
|
||||||
|
cvsquery.cgi \
|
||||||
|
cvsquery.pl \
|
||||||
|
cvsqueryform.cgi \
|
||||||
|
cvsregexp.html \
|
||||||
|
cvsview2.cgi \
|
||||||
|
doadmin.cgi \
|
||||||
|
doeditcheckin.cgi \
|
||||||
|
doeditmessage.cgi \
|
||||||
|
doeditprofile.cgi \
|
||||||
|
doeditwhiteboard.cgi \
|
||||||
|
dolog.pl \
|
||||||
|
dotweak.cgi \
|
||||||
|
editcheckin.cgi \
|
||||||
|
editmessage.cgi \
|
||||||
|
editprofile.cgi \
|
||||||
|
editwhiteboard.cgi \
|
||||||
|
globals.tcl \
|
||||||
|
handleAdminMail.tcl \
|
||||||
|
handleCheckinMail.tcl \
|
||||||
|
header.pl \
|
||||||
|
index.html \
|
||||||
|
indextest.pl \
|
||||||
|
lloydcgi.pl \
|
||||||
|
localprofile.cgi \
|
||||||
|
maketables.sh \
|
||||||
|
moduleanalyse.cgi \
|
||||||
|
modules.pl \
|
||||||
|
multidiff.cgi \
|
||||||
|
myglobrecur.tcl \
|
||||||
|
openmessage \
|
||||||
|
perlifyconfig.tcl \
|
||||||
|
processqueue.pl \
|
||||||
|
profile.cgi \
|
||||||
|
rebuildcvshistory.cgi \
|
||||||
|
rebuilddatabase.tcl \
|
||||||
|
rebuildtaginfo.cgi \
|
||||||
|
repophook.cgi \
|
||||||
|
reposfiles.pl \
|
||||||
|
rview.cgi \
|
||||||
|
show2.cgi \
|
||||||
|
showcheckins.cgi \
|
||||||
|
switchtree.cgi \
|
||||||
|
testlock.pl \
|
||||||
|
toplevel.cgi \
|
||||||
|
utils.pl \
|
||||||
|
viewold.cgi
|
||||||
|
|
||||||
|
all: trapdoor configdata
|
||||||
|
|
||||||
|
trapdoor: trapdoor.o
|
||||||
|
$(CC) -o trapdoor trapdoor.o $(LDFLAGS)
|
||||||
|
|
||||||
|
configdata: configdata.in
|
||||||
|
sed -e s#_CVS_#$(CVS)#g \
|
||||||
|
-e s#_RLOG_#$(RLOG)#g \
|
||||||
|
-e s#_CO_#$(CO)#g \
|
||||||
|
-e s#_RCSDIFF_#$(RCSDIFF)#g \
|
||||||
|
$< >$@
|
||||||
|
|
||||||
|
install: trapdoor configdata
|
||||||
|
-mkdir -p $(PREFIX)
|
||||||
|
@for I in $(FILES); do \
|
||||||
|
echo Installing $$I && \
|
||||||
|
sed -e s#/usr/bonsaitools/bin/perl#$(PERL)#g \
|
||||||
|
-e s#/usr/bonsaitools/bin/mysqltcl#$(MYSQLTCL)#g \
|
||||||
|
-e s#/tools/ns/bin/perl5#$(PERL)#g \
|
||||||
|
$$I > $(PREFIX)/$$I && \
|
||||||
|
chmod 755 $(PREFIX)/$$I; done
|
||||||
|
-mkdir -p $(PREFIX)/data
|
||||||
|
cp trapdoor $(PREFIX)/data
|
||||||
|
chmod 755 $(PREFIX)/data
|
||||||
|
cp bonsai.gif $(PREFIX)
|
||||||
|
chmod 755 $(PREFIX)/bonsai.gif
|
||||||
|
@if test ! -r $(PREFIX)/data/configdata ; then \
|
||||||
|
echo "Installing configdata" && \
|
||||||
|
cp configdata $(PREFIX)/data ; \
|
||||||
|
else \
|
||||||
|
echo ; \
|
||||||
|
echo "Not replacing existing configdata" ; \
|
||||||
|
echo "Check configdata in build directory for new features" ; \
|
||||||
|
fi
|
||||||
|
@echo
|
||||||
|
@echo "If you are installing a new Bonsai (not upgrading), you should"
|
||||||
|
@echo "run maketables.sh to create database tables, then customize the"
|
||||||
|
@echo "Bonsai configuration in $(PREFIX)/data/configdata"
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f trapdoor trapdoor.o configdata
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,75 @@
|
||||||
|
dnl autoconf tests for bonsai
|
||||||
|
dnl Pontus Lidman 99-04-27
|
||||||
|
dnl
|
||||||
|
dnl Check if mysqltclsh is compiled with tclX support
|
||||||
|
dnl
|
||||||
|
dnl AC_PROG_MYSQLTCL_TCLX([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||||
|
dnl Test for mysqltclsh compiled with tclX and define MYSQLTCL
|
||||||
|
dnl
|
||||||
|
AC_DEFUN(AC_PROG_MYSQLTCL_TCLX,
|
||||||
|
[dnl
|
||||||
|
dnl Get the cflags and libraries from the gtk-config script
|
||||||
|
dnl
|
||||||
|
AC_PATH_PROGS(MYSQLTCL, mysqltclsh mysqltcl, no)
|
||||||
|
AC_MSG_CHECKING(for tclX flock in mysqltclsh)
|
||||||
|
no_mysqltclsh=""
|
||||||
|
|
||||||
|
if test "$MYSQLTCL" = "no" ; then
|
||||||
|
no_mysqltclsh=yes
|
||||||
|
else
|
||||||
|
dnl
|
||||||
|
dnl Perform test
|
||||||
|
dnl
|
||||||
|
have_flock=`cat tclx_test.tcl | $MYSQLTCL`
|
||||||
|
if test "x$have_flock" = "x0" ; then
|
||||||
|
no_mysqltclsh=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x$no_mysqltclsh" = x ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$1], , :, [$1])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
if test "$MYSQLTCL" = "no" ; then
|
||||||
|
echo "*** mysqltclsh could not be found"
|
||||||
|
echo "*** make sure it is installed and in your PATH, then try again"
|
||||||
|
else
|
||||||
|
echo "*** mysqltclsh is not compiled with tclX support"
|
||||||
|
echo "*** see the file INSTALL for additional information"
|
||||||
|
fi
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
fi
|
||||||
|
AC_SUBST(MYSQLTCL)
|
||||||
|
])
|
||||||
|
dnl
|
||||||
|
dnl check if Perl::DB is installed
|
||||||
|
dnl
|
||||||
|
AC_DEFUN(AC_PERL_DB,
|
||||||
|
[
|
||||||
|
AC_MSG_CHECKING(for perl DBD::mysql module)
|
||||||
|
$PERL -w -c -e 'use DBD::mysql' 2>/dev/null; has_dbd=$?
|
||||||
|
if test "x$has_dbd" = "x0" ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$1], , :, [$1])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
echo "*** the perl MySQL module (DBD::mysql) could not be found"
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
dnl
|
||||||
|
dnl check if Date::Parse is installed
|
||||||
|
dnl
|
||||||
|
AC_DEFUN(AC_PERL_DATEPARSE,
|
||||||
|
[
|
||||||
|
AC_MSG_CHECKING(for perl Date::parse module)
|
||||||
|
$PERL -w -c -e 'use Date::Parse' 2>/dev/null; has_dateparse=$?
|
||||||
|
if test "x$has_dateparse" = "x0" ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$1], , :, [$1])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
echo "*** the perl Date::Parse module could not be found"
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
fi
|
||||||
|
])
|
|
@ -0,0 +1,46 @@
|
||||||
|
# Example configuration file for Bonsai
|
||||||
|
|
||||||
|
# The Bonsai modules and their relation to cvs
|
||||||
|
|
||||||
|
# treelist is a list of all configured Bonsai modules
|
||||||
|
# to add a module, add its name to the treelist
|
||||||
|
# then duplicate the treeinfo lines below and
|
||||||
|
# change the values appropriately
|
||||||
|
|
||||||
|
set treelist { default }
|
||||||
|
|
||||||
|
set treeinfo(default,module) mymodule
|
||||||
|
set treeinfo(default,branch) {}
|
||||||
|
set treeinfo(default,repository) {/usr/local/cvsroot}
|
||||||
|
set treeinfo(default,description) {MyModule long description}
|
||||||
|
set treeinfo(default,shortdesc) {MyModule short description}
|
||||||
|
|
||||||
|
# Where to find system commands
|
||||||
|
set cvscommand _CVS_
|
||||||
|
set rlogcommand _RLOG_
|
||||||
|
set rcsdiffcommand _RCSDIFF_
|
||||||
|
set cocommand _CO_
|
||||||
|
|
||||||
|
# URL to your copy of LXR
|
||||||
|
set lxr_base http://localhost/webtools/lxr/source
|
||||||
|
set mozilla_lxr_kludge TRUE
|
||||||
|
|
||||||
|
# URL to your copy of tinderbox
|
||||||
|
set tinderbox_base http://localhost/webtools/tinderbox
|
||||||
|
|
||||||
|
# how bug numbers are HTMLified
|
||||||
|
set BUGSYSTEMEXPR {<A HREF="http://localhost/bugzilla/show_bug.cgi?id=&">&</A>}
|
||||||
|
|
||||||
|
# Somebody responsible for the CVS repository
|
||||||
|
set cvsadmin somebody@somedomain
|
||||||
|
set userdomain somedomain
|
||||||
|
|
||||||
|
# User and password for access to the MySQL bonsai database
|
||||||
|
# use empty string ("") for password if you want to access the database
|
||||||
|
# without using a password (not recommended)
|
||||||
|
set mysqluser nobody
|
||||||
|
set mysqlpassword ""
|
||||||
|
|
||||||
|
# LDAP server if you have one
|
||||||
|
set ldapserver ldap.somedomain
|
||||||
|
set ldapport 389
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,29 @@
|
||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
AC_INIT(trapdoor.c)
|
||||||
|
|
||||||
|
dnl Checks for programs.
|
||||||
|
AC_PROG_CC
|
||||||
|
AC_PATH_PROG(PERL,perl)
|
||||||
|
AC_PROG_MYSQLTCL_TCLX
|
||||||
|
AC_PERL_DB
|
||||||
|
AC_PERL_DATEPARSE
|
||||||
|
|
||||||
|
AC_PATH_PROG(CO,co)
|
||||||
|
AC_PATH_PROG(CVS,cvs)
|
||||||
|
AC_PATH_PROG(RLOG,rlog)
|
||||||
|
AC_PATH_PROG(RCSDIFF,rcsdiff)
|
||||||
|
|
||||||
|
|
||||||
|
dnl Checks for libraries.
|
||||||
|
dnl Replace `main' with a function in -lcrypt:
|
||||||
|
AC_CHECK_LIB(crypt, crypt)
|
||||||
|
|
||||||
|
dnl Checks for header files.
|
||||||
|
|
||||||
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
|
||||||
|
dnl Checks for library functions.
|
||||||
|
|
||||||
|
AC_OUTPUT(Makefile)
|
||||||
|
AC_OUTPUT_COMMANDS([echo type 'make install' to install bonsai])
|
||||||
|
|
|
@ -198,10 +198,12 @@ print q(
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach $path (split('/',$rcs_path)) {
|
foreach $path (split('/',$rcs_path)) {
|
||||||
|
|
||||||
|
# Customize this translation
|
||||||
$link_path .= url_encode2($path).'/' if $path ne 'mozilla';
|
$link_path .= url_encode2($path).'/' if $path ne 'mozilla';
|
||||||
print "<A HREF='http://lxr.mozilla.org/mozilla/source/$link_path'>$path</a>/ ";
|
print "<A HREF='$lxr_base/$link_path'>$path</a>/ ";
|
||||||
}
|
}
|
||||||
print "<A HREF='http://lxr.mozilla.org/mozilla/source/$link_path$file_tail'>$file_tail</a> ";
|
print "<A HREF='$lxr_base/$link_path$file_tail'>$file_tail</a> ";
|
||||||
|
|
||||||
print " (<A HREF='cvsblame.cgi?file=$filename&rev=$revision&root=$root'";
|
print " (<A HREF='cvsblame.cgi?file=$filename&rev=$revision&root=$root'";
|
||||||
print " onmouseover='return log(event,\"$prev_revision{$revision}\",\"$revision\");'" if $useLayers;
|
print " onmouseover='return log(event,\"$prev_revision{$revision}\",\"$revision\");'" if $useLayers;
|
||||||
|
@ -220,7 +222,7 @@ print qq(
|
||||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
|
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
|
||||||
<TR>
|
<TR>
|
||||||
<TD NOWRAP>
|
<TD NOWRAP>
|
||||||
<A HREF="http://lxr.mozilla.org/mozilla/source/$link_path$file_tail">LXR: Cross Reference</A>
|
<A HREF="$lxr_base/$link_path$file_tail">LXR: Cross Reference</A>
|
||||||
</TD>
|
</TD>
|
||||||
</TR><TR>
|
</TR><TR>
|
||||||
<TD NOWRAP>
|
<TD NOWRAP>
|
||||||
|
|
|
@ -159,7 +159,7 @@ $query_debug = $form{'debug'};
|
||||||
$result= &query_checkins( $mod_map );
|
$result= &query_checkins( $mod_map );
|
||||||
|
|
||||||
for $i (@{$result}) {
|
for $i (@{$result}) {
|
||||||
$w{"$i->[$CI_WHO]\@netscape.com"} = 1;
|
$w{"$i->[$CI_WHO]\@$userdomain"} = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@p = sort keys %w;
|
@p = sort keys %w;
|
||||||
|
|
|
@ -42,6 +42,7 @@ $flag_tagcmd = 0;
|
||||||
$repository = '';
|
$repository = '';
|
||||||
$repository_tag = '';
|
$repository_tag = '';
|
||||||
$mailhost = 'localhost';
|
$mailhost = 'localhost';
|
||||||
|
$rlogcommand = '/usr/bin/rlog';
|
||||||
|
|
||||||
@mailto=();
|
@mailto=();
|
||||||
@changed_files = ();
|
@changed_files = ();
|
||||||
|
@ -183,7 +184,7 @@ sub process_cvs_info {
|
||||||
if( ! -r $rcsfile ){
|
if( ! -r $rcsfile ){
|
||||||
$rcsfile = "$envcvsroot/$repository/Attic/$fn,v";
|
$rcsfile = "$envcvsroot/$repository/Attic/$fn,v";
|
||||||
}
|
}
|
||||||
open(LOG, "/tools/ns/bin/rlog -N -r$rev $rcsfile |")
|
open(LOG, "$rlogcommand -N -r$rev $rcsfile |")
|
||||||
|| print STDERR "dolog.pl: Couldn't run rlog\n";
|
|| print STDERR "dolog.pl: Couldn't run rlog\n";
|
||||||
while(<LOG>){
|
while(<LOG>){
|
||||||
if (/^date:.* author: ([^;]*);.*/) {
|
if (/^date:.* author: ([^;]*);.*/) {
|
||||||
|
|
|
@ -28,8 +28,11 @@ set cocommand /tools/ns/bin/co
|
||||||
set lxr_base http://cvs-mirror.mozilla.org/webtools/lxr/source
|
set lxr_base http://cvs-mirror.mozilla.org/webtools/lxr/source
|
||||||
set mozilla_lxr_kludge TRUE
|
set mozilla_lxr_kludge TRUE
|
||||||
|
|
||||||
set ldapserver nsdirectory.mcom.com
|
set cvsadmin terry@mozilla.org
|
||||||
# set ldapserver hoth.mcom.com
|
set mysqluser nobody
|
||||||
|
set mysqlpassword ""
|
||||||
|
|
||||||
|
set ldapserver nsdirectory.netscape.com
|
||||||
set ldapport 389
|
set ldapport 389
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,8 +63,8 @@ if {[info exists tcl_version] && $tcl_version >= 8.0} {
|
||||||
}
|
}
|
||||||
return [clock scan $str]
|
return [clock scan $str]
|
||||||
}
|
}
|
||||||
proc fmtclock {date args} {
|
# proc fmtclock {date args} {
|
||||||
}
|
# }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,9 +73,13 @@ proc NOTDEF {foo} {
|
||||||
}
|
}
|
||||||
|
|
||||||
proc ConnectToDatabase {} {
|
proc ConnectToDatabase {} {
|
||||||
global mysqlhandle
|
global mysqlhandle mysqluser mysqlpassword
|
||||||
if {![info exists mysqlhandle]} {
|
if {![info exists mysqlhandle]} {
|
||||||
set mysqlhandle [mysqlconnect]
|
if { $mysqlpassword == "" } {
|
||||||
|
set mysqlhandle [mysqlconnect -user "$mysqluser"]
|
||||||
|
} else {
|
||||||
|
set mysqlhandle [mysqlconnect -user "$mysqluser" -password "$mysqlpassword"]
|
||||||
|
}
|
||||||
mysqluse $mysqlhandle "bonsai"
|
mysqluse $mysqlhandle "bonsai"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -175,6 +182,7 @@ proc AddToDatabase {lines desc} {
|
||||||
lassign [split $line "|"] chtype date name repository dir \
|
lassign [split $line "|"] chtype date name repository dir \
|
||||||
file version sticky branch addlines removelines
|
file version sticky branch addlines removelines
|
||||||
|
|
||||||
|
Log "line <$line> date <$date>"
|
||||||
regsub {^T} $branch {} branch
|
regsub {^T} $branch {} branch
|
||||||
regsub {/$} $dir {} dir
|
regsub {/$} $dir {} dir
|
||||||
if {[cequal $addlines ""]} {
|
if {[cequal $addlines ""]} {
|
||||||
|
|
|
@ -16,7 +16,25 @@
|
||||||
# Corporation. Portions created by Netscape are Copyright (C) 1998
|
# Corporation. Portions created by Netscape are Copyright (C) 1998
|
||||||
# Netscape Communications Corporation. All Rights Reserved.
|
# Netscape Communications Corporation. All Rights Reserved.
|
||||||
|
|
||||||
mysql > /dev/null 2>/dev/null << OK_ALL_DONE
|
USER=nobody
|
||||||
|
PASSWORD=
|
||||||
|
|
||||||
|
if test x$PASSWORD = x ; then
|
||||||
|
MYSQL="mysql -u $USER"
|
||||||
|
else
|
||||||
|
MYSQL="mysql -u $USER -p $PASSWORD"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Will use user=\"$USER\" and password=\"$PASSWORD\" for bonsai database."
|
||||||
|
echo "If you have a previous bonsai install, this script will drop all"
|
||||||
|
echo "bonsai tables. Press ctrl-c to bail out now or return to continue."
|
||||||
|
|
||||||
|
read
|
||||||
|
|
||||||
|
echo Dropping old tables
|
||||||
|
|
||||||
|
$MYSQL > /dev/null 2>/dev/null << OK_ALL_DONE
|
||||||
|
|
||||||
use bonsai;
|
use bonsai;
|
||||||
|
|
||||||
|
@ -30,9 +48,9 @@ drop table branches;
|
||||||
drop table tags;
|
drop table tags;
|
||||||
OK_ALL_DONE
|
OK_ALL_DONE
|
||||||
|
|
||||||
|
echo creating new tables
|
||||||
|
|
||||||
|
$MYSQL << OK_ALL_DONE
|
||||||
mysql << OK_ALL_DONE
|
|
||||||
use bonsai;
|
use bonsai;
|
||||||
create table descs (
|
create table descs (
|
||||||
id mediumint not null auto_increment primary key,
|
id mediumint not null auto_increment primary key,
|
||||||
|
|
|
@ -66,6 +66,12 @@ puts $fid "\$rcsdiffcommand = [PerlStringify $rcsdiffcommand];"
|
||||||
puts $fid "\$cocommand = [PerlStringify $cocommand];"
|
puts $fid "\$cocommand = [PerlStringify $cocommand];"
|
||||||
puts $fid "\$lxr_base = [PerlStringify $lxr_base];"
|
puts $fid "\$lxr_base = [PerlStringify $lxr_base];"
|
||||||
puts $fid "\$mozilla_lxr_kludge = [PerlStringify $mozilla_lxr_kludge];"
|
puts $fid "\$mozilla_lxr_kludge = [PerlStringify $mozilla_lxr_kludge];"
|
||||||
|
puts $fid "\$tinderbox_base = [PerlStringify $tinderbox_base];"
|
||||||
|
puts $fid "\$mysqluser = [PerlStringify $mysqluser];"
|
||||||
|
puts $fid "\$mysqlpassword = [PerlStringify $mysqlpassword];"
|
||||||
|
puts $fid "\$cvsadmin = [PerlStringify $cvsadmin];"
|
||||||
|
puts $fid "\$userdomain = [PerlStringify $userdomain];"
|
||||||
|
# perl scripts don't use the LDAP config variables
|
||||||
set list ""
|
set list ""
|
||||||
foreach i $treelist {
|
foreach i $treelist {
|
||||||
append list [PerlStringify $i]
|
append list [PerlStringify $i]
|
||||||
|
|
|
@ -254,7 +254,7 @@ puts "
|
||||||
<tr>
|
<tr>
|
||||||
<td valign=top>
|
<td valign=top>
|
||||||
<a href=$cvsqueryurl><b>CVS Query Tool</b></a><br>
|
<a href=$cvsqueryurl><b>CVS Query Tool</b></a><br>
|
||||||
<a href=http://cvs-mirror.mozilla.org/webtools/tinderbox/showbuilds.cgi>Tinderbox continuous builds</a><br>
|
<a href=$tinderbox_base/showbuilds.cgi>Tinderbox continuous builds</a><br>
|
||||||
<a href=\"switchtree.cgi[BatchIdPart ?]\">Switch to look at a different tree or branch</a><br>
|
<a href=\"switchtree.cgi[BatchIdPart ?]\">Switch to look at a different tree or branch</a><br>
|
||||||
<a href=viewold.cgi[BatchIdPart ?]>Time warp -- view a different day's hook.</a><br>
|
<a href=viewold.cgi[BatchIdPart ?]>Time warp -- view a different day's hook.</a><br>
|
||||||
<a href=countcheckins.cgi[BatchIdPart ?]>See some stupid statistics about recent checkins.</a><br>
|
<a href=countcheckins.cgi[BatchIdPart ?]>See some stupid statistics about recent checkins.</a><br>
|
||||||
|
|
|
@ -101,13 +101,13 @@ sub validateRepository {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "Invalid repository $root selected. Send mail to terry\@netscape.com if you think this should have worked.\n";
|
print "Invalid repository $root selected. Send mail to $cvsadmin if you think this should have worked.\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub ConnectToDatabase {
|
sub ConnectToDatabase {
|
||||||
if ($dbh == "") {
|
if ($dbh == "") {
|
||||||
$dbh = DBI->connect("bonsai","bonsai","","mysql") || die "Can't connect to database server -- $DBD::mysql::db_errstr";
|
$dbh = DBI->connect("bonsai","$mysqluser","","mysql") || die "Can't connect to database server -- $DBD::mysql::db_errstr";
|
||||||
}
|
}
|
||||||
return $dbh;
|
return $dbh;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче