<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Generator" content="Emacs (text editor)"> <meta name="Author" content="fredric@mydata.se"> <meta name="Description" content="Information on how to install and maintain P4DB"> <title>Administrators README file for P4DB</title> <style TYPE="text/css"><!-- body { font-family: Arial, Helvetica, SanSerif, SansSerif, Sans-Serif ; font-size: 10pt ; background-color: #e0e0ff ; } body.p4dbreadme { font-family: Arial, Helvetica, Sans-Serif ; font-size: 10pt ; background-color: white ; } h3.p4dbreadme ,h4.p4dbreadme { margin-right: 20pt ; } h1.p4dbreadme { font-size: 16pt ; font-weight: bold ; text-align: center ; } h2.p4dbreadme { font-size: 14pt ; font-weight: bold ; margin-left: 0pt ; /* border-top: solid 2pt #e0e0e0;*/ /* border-left: solid 2pt #e0e0e0;*/ padding-top: 4pt ; padding-left: 4pt ; } h3.p4dbreadme { font-size: 12pt ; margin-left: 6pt ; font-weight: normal ; text-decoration: underline ; } h4.p4dbreadme { font-size: 10pt ; font-weight: normal ; margin-left: 16pt ; text-decoration: underline ; } ul.Norm, ol.Norm, dl.Norm { margin-left: 20pt ; margin-right: 20pt ; } dt.Norm { text-decoration: underline ; } P.Norm { margin-left: 20pt ; margin-right: 20pt ; } P.Note { margin-left: 30pt; margin-right: 30pt ; background-color: #FFE0E0 ; } .TOC { margin-left: 40pt ; } --></style> </head> <body class="p4dbreadme"> <!-- *************************************************************************** --> <h1 class="p4dbreadme">Administrators README for P4DB Version 4.0</h1> <!-- -------------------------------------------------------------------------- --> <h2 class="p4dbreadme">Introduction</h2> <P Class="Norm"> This is a README for P4DB, a CGI based p4 depot browser written by Fredric Fredricson (<a href="mailto:Fredric.Fredricson@bonetmail.com">fredric@mydata.se</a>) <P Class="Norm"> The graphic "Branch Relationships" page is written by <b>Todd Short</b> (see Todd's <A href="branchGraph.readme.txt">readme file</A>). <br> More credits <A href="#Credits">at the end</A>. </P> <P Class="Norm">The README is intended for administrators and others that want to install, maintain, and possibly contribute to, P4DB. </P> <!-- -------------------------------------------------------------------------- --> <h2 class="p4dbreadme">Table Of Contents</h2> <P Class=TOC> <ul class=TOC> <li> <a href="#About">About</a> <li> <a href="#Software">Software Requirements</a> <li> <a href="#Supported_platforms">Platforms and Compatibility</a> <li> <a href="#Installation">Installation and Configuration</a> <li> <a href="#Known">Known Bugs</a> <li> <a href="#Diffs">What's New</a> <li> <a href="#Licensing">Licensing</a> <li> <a href="#Warranty">Warranty</a> <li> <a href="#Contrib">Would You Like To Contribute?</a> <li> <a href="#Doc">Design Documentation</a> <li> <a href="#Credits">Credits</a> </ul> </P> <!-- -------------------------------------------------------------------------- --> <a NAME="About"></a> <h2 class="p4dbreadme">About</h2> <P Class="Norm"> P4DB is designed to provide a user friendly and intuitive interface to the p4 depot. Information is presented using a web browser and most pages combine output from two or more p4 commands. <br> The driving force behind the development has been my needs as a manager for a software team, the needs for our project leaders to document changes in the code line and the need for our programmers to analyze changes in the code line (and most important, of course, the need for me as a frustrated software engineer promoted to my level of incompetence to get my hands on a nice little programming project). <P Class="Norm"> The browser is written in perl and developed on a Linux/Apache system and has been tested mainly with Firefox although some of our users use MS Explorer and no problems has been reported. <h3 class="p4dbreadme">Why P4DB?</h3> <P Class="Norm"> P4DB is inspired by a depot browser, perfbrowse.perl, made available by <a href="http://www.perforce.com">Perforce</a> at <a href="http://www.perforce.com/perforce/loadsupp.html#browse"> http://www.perforce.com/perforce/loadsupp.html#browse</a> Perfbrowse.perl is written in perl and the author is unknown to me. <P Class="Norm"> The idea is also stolen so I can't claim that one. <P Class="Norm"> I liked perfbrowse.perl very much but wanted just a little more functionality. I started to add functionality and it quickly got out of hand. Soon I had a huuuge perl script that I could no longer maintain. Once I realized that I can write a perl script that is about 2-4 times the size of the script that I can maintain I decided to rewrite it all from the start as a set of small, maintainable, perl scripts. I leave to others to judge if I succeeded in my mission. <br> <i>(Maybe I should mention that it took much more time than I anticipated).</i> <!-- -------------------------------------------------------------------------- --> <a NAME="Software"></a> <h2 class="p4dbreadme">Software requirements</h2> <P Class="Norm"> P4DB version 4.0 requires: <UL Class="Norm"> <li> Perl 5.004 or newer with the CGI.pm and GD.pm modules installed. <br> The CGI.pm module can be downloaded from <a href="http://www.cpan.org/">http://www.cpan.org/</a> <A href="http://search.cpan.org/search?dist=CGI.pm">(link to CGI.pm)</A>. <br> The gd library is available at <A href="http://www.boutell.com/gd">http://www.boutell.com/gd</A> and the GD.pm module at <A href="http://stein.cshl.org/WWW/software/GD/GD.html"> http://stein.cshl.org/WWW/software/GD/GD.html</A> <hr> <li> A http server that supports CGI:s. Apache will do just fine. <hr> <li> P4 server 2004.2 or later. </UL> </P> <!-- -------------------------------------------------------------------------- --> <a NAME="Supported_platforms"></a> <h2 class="p4dbreadme">Supported platforms and compatibility</h2> <P Class="Norm"> There is no real "list of supported platforms" simply because there is no real support for P4DB. I just write it, test it a little, and release it. <P Class="Norm"> <b>Http server:</b> <br> P4DB is developed on a Linux box running Fedora Core 3 and Apache, runs in production on RedHat 7.2/Apache, and has been reported to run on SUN/Solaris and NT/IIS platforms as well. The NT platform require MKS toolkit or similar and some tweaking, though. <P Class="Norm"> <b>Browser:</b> <br> All development work is done using FireFox version 1.0 (preview) but I usually perform some basic testing with MS-Explorer and sometimes Netscape. P4DB should work with a recent browser with reasonable support for CSS (Cascaded Style Sheets) and javascript. <br> P4DB is <u>not</u> designed for character mode browsers such as Lynx. <br> And, by the way, the P4DB use cookies. Without cookies enabled you will not even be able to log in to P4DB. <!-- -------------------------------------------------------------------------- --> <a NAME="Installation"></a> <h2 class="p4dbreadme">Installation and configuration</h2> <P Class="Norm"> NOTE: This installation description assumes that the reader is familiar with http servers, cgi scripts and, to a small degree, perl. <h3 class="p4dbreadme">First: Where to install</h3> <P Class="Norm"> Other than the obvious, that is somewhere in a http servers CGI path, I recommend you to set up a http server on your p4 server and run P4DB on that server. The main reasons are that it improves response time and reduce network load. <h3 class="p4dbreadme">How to install</h3> <P Class="Norm"> If you use Linux and downloaded the tarball (that is, not the zip-file) you can follow the instructions below. If not, go to "Installation without <tt>install.pl</tt>" <ol Class="Norm"> <li> You obviously got to this README. Together with README.html file you got: <ul> <li><tt>install.pl</tt> <li><tt>cgi_files.tar</tt> <li><tt>P4CGI.html</tt> <li><tt>P4DB.conf.txt</tt> </ul> Move all these files together with <tt>README.html</tt> to the cgi-bin directory used by the web server or wherever you want P4DB installed. Or you could just move the original tarball or zip archive and unpack it. <li> Type "<tt>perl install.pl</tt>" To install all scripts. <br> Install.pl will unpack all cgi scripts and modifies the first line to contain the path to perl. <br>For details, see the <tt><a href="install.pl">install.pl</a></tt> script. <li> The file <tt>index.cgi</tt> is the start page for P4DB. Create your links to it.. </ol> <P Class="Norm"> This is the theory, at least. I have not tested it on many systems <h4 class="p4dbreadme">Installation without <tt>install.pl</tt></h4> <P Class="Norm"> If <tt>install.pl</tt> don't work for you here is what it does that you need to do manually: <ol Class="Norm"> <li> Verify that perl and the perl module CGI.pm is available <li> Unpack cgi_file.tar (<tt>tar -xf cgi_files.tar</tt>) or cgi_file.zip <li> Find path to perl <li> Change first line of every file with extension ".cgi", ".pl" or ".perl" to contain correct path to perl </ol> </blockquote> <h3 class="p4dbreadme">How to configure</h3> <h4 class="p4dbreadme">Basic configuration</h4> <P Class="Norm"> The basic configuration file is named P4DB.conf. The file is not included in the package but a sample configuration file called <tt><a href="P4DB.conf.txt">P4DB.conf.txt</a></tt> is. <p class=Norm> Copy the file P4DB.conf.txt to P4DB.conf and modify it. The instructions are included in the file. <p class=Norm> Each p4 user that should be able to use P4DB must have at least read access from the machine that P4DB runs on to the parts of the depot he/she should have access to through P4DB. P4 groups may come in handy here. <a NAME="SecurityNote1"></a> <P class=Note> <B>Security Note 1:</B><br> P4DB asks for a p4 user to access the depot. <b>It is wise to give users read priviliges only on the P4DB host.</b> This protects the depot from errors in P4DB that <u>might</u> affect the depot status. <P class=Note> <B>Security Note 2:</B><br> P4DB does not provide any strong access protection or other security. It is not possible to modify the depot using P4DB so poorly trained or inexperienced operators should not be able to damage the depot. <a NAME="SecurityNote3"></a> <P class=Note> <B>Security Note 3:</B><br> During the login procedure the p4 user name and password are transmitted unencrypted over the network. If this is not acceptable you should use the SSL (Secure Sockets Layer) and TLS (Transport Layer Security) protocols. Unfortunately I am not an expert in these matters and can not give you any help here other than point you to the <a href="http://httpd.apache.org/docs-2.0/mod/mod_ssl.html">mod_ssl module documentation</a> in Apache. <p class="Norm"> I also recommend that you read the <a href="#Warranty">Warranty</a>-paragraph. <h4 class="p4dbreadme">Configure file types (for viewers)</h4> <P Class="Norm"> P4DB will let users view some file types using applications like MS-Word for Word-file etc. This can be configured in a file <a href="viewConfig.pm">viewConfig.pm</a>. Default will let you view HTML, gif, jpeg, MS-Word, MS-Powerpoint, and Acrobat (PDF) formats. See file <a href="viewConfig.pm"> viewConfig.pm</a> for details. <!-- -------------------------------------------------------------------------- --> <a NAME="Known"></a> <h2 class="p4dbreadme">Known bugs</h2> <P Class="Norm"> <ul Class="Norm"> <li> A serious case of Feature Bloat. </ul> <!-- -------------------------------------------------------------------------- --> <a NAME="Diffs"></a> <h2 class="p4dbreadme">Diffs between versions</h2> <h4 class="p4dbreadme">New to P4DB 4.0:</h4> <dl class="Norm"> <dt class="Norm">Added a login page <dd>P4DB now requires the user to log in and supply a p4 user and a password. See also <a href="#SecurityNote3">Security Note 3</a> <dt class="Norm">Require 2004.2 <dd>P4DB require both the client and server to be of version 2004.2 or newer. The reason for this is that P4DB use the ticket based authentication introduced in this release. </dl> <h4 class="p4dbreadme">New to P4DB 3.1:</h4> <p class="Norm"> P4DB 3.1 is a frame-less version of 3.0. The frame stuff was not appreciated by the users at all. The main problem was that it made it difficult to take the URL and slap it in an email to another developer to point something out, something the users do frequently. <p class="Norm"> Another thing that really killed the frame based solution was the (wonderful!) tabs in Netscape 7 and other Mozilla-based browsers. No doubt the next version of MS-Explorer will have some similar feature if they have the slightest clue in Redmond. With frames the "open in new tab"-feature became somewhat awkward. <p class="Norm"> Apart from the above the follwing things have changed: <dl class="Norm"> <dt class="Norm"> The "p4 annotate" command is used to view files. <dd>The "annotate" command provides a nice view of a complete file history. Previous versions of P4DB did part of this using the p4pr.perl script written by Bob Sidebotham, but the "p4 annotate" provides more info. Thank you, Perforce. <dt class="Norm"> The header comes in two flavours, pulldown menues and buttons. <dd>The pulldown menues or buttons are used to select page. The pulldown menu use less space but Explorer does not display all menu options (you have to scroll) and this makes buttons more convenient. The user selects in the User Preferences page. <dt class="Norm"> The user can specify start page. <dd>The script "index.cgi" does not really display anything, it only forwards the user to the start page. Default is "intro.cgi" but the user can modify this using a button in the page header. <dt class="Norm"> A few other small improvements.. <dd>I have made some small improvements to the branch and label views and to quite a few other pages as well. </dl> <h4 class="p4dbreadme">New to P4DB 3.0:</h4> <p class="Norm"> P4DB is, again, completley rewritten (well.. almost) only this time I did not add much functionality other than a completley different user interface that I hope will be more efficient. <P class=Note> NOTE! Configuration file for 2.1 not compatible with 3.0. <p class="Norm"> Here are a few of the changes: <dl Class="Norm"> <dt class="Norm">User defined "shortcuts" <dd>A user can define her own personal "shortcuts". Pretty much like browser bookmarks/favorites only bookmarks can not really be used for a frame-based web applications. <dt class="Norm">Graphic "Branch Relationships" page. <dd>Displays branch relationships in a graph. Contributed by Todd Short. Requires the GD.pm perl module. <dt class="Norm">Next and previous keys in change view <dd>When you view a change there are next and previous links that displays next and previous changes. If you entered the page asking for changes for a specific path in the depot the next and previous links will follow this path. <dt class="Norm">(Almost) all formatting done in CSS <dd>Output formatting is specified in a CSS file (P4DB.css). <dt class="Norm">Full descriptions are always shown <dd>Change descriptions are never displayed in a truncated form (in 2.1 displaying a full change description was sometimes an option). <dt class="Norm">Removed "shortcut files" <dd>P4DB 2.1 had some optional "shortcut files" that the administrator could specify. They are gone. I never liked the idea myself (even though it was mine). <dt class="Norm">Java browswer no longer part of P4BD <dd>The Java browser was optional and never really well integrated with P4DB. </dl> <h4 class="p4dbreadme">New to P4DB 2.1:</h4> <dl Class="Norm"> <dt class="Norm">Better support for jobs and fixes <dd><ul> <li>The file log page contains a "Fixes" section that list closed jobs related to this file. <li>The Depot Tree Browser page contains a link to view jobs related to files below current position. <li>Improved the job list </ul> <dt class="Norm">Works for p4 2001.1 <dd>There is a nice feature in 2001.1 that P4DB use to make label cross reference in file log page much, much faster. <dt class="Norm">Warning levels for unused users and clients in P4 Users and groups page configurable <dd>The warning level are set in the configuration file <dt class="Norm">"#include" in c-files links to file search <dd>The colorC.pl script makes #includes links to file search cgi. (Silly feature that was easy to implement) <dt class="Norm">Warning level for unused users and clients configurable. <dd>The user and client lists will print a warning next to users and clients that has not been accessed for a number of weeks. This number is now configurable in <tt>P4DB.conf</tt>. </dl> <h4 class="p4dbreadme">New to P4DB 2.01:</h4> <dl Class="Norm"> <dt class="Norm">Works for p4 2000.2beta <dd>The jobspec command was changed and now P4DB understands both 2000.2beta as well as 2000.1 thru 98.2. <dt class="Norm">Works for p4 2000.1 <dd>The depot statistics did not work properly for p4 release 2000.1 <dt class="Norm">Made easier to port <dd>The configuration file now contains fields for command to redirect to null device and command to redirect to stdout. This makes it easier to port P4DB to NT that thinks /dev/null is called NUL:. <P class=Note> Configuration file for 2.0 not compatible with 2.01 <br> <br> <dt class="Norm">Java GUI browser improved <dd>Can now handle filenames containing spaces <dt class="Norm">Label diff view rewritten <dd>The old code was buggy and difficult to maintain <dt class="Norm">Made some code more maintainable <dd>Modified client view and label view code to make it more maintainable. </dl> <h4 class="p4dbreadme">Diff earlier version of P4DB to 2.0:</h4> <P Class="Norm"> The difference is so huge that I do not care to list it. P4DB 2.0 can simply do much more than earlier versions. <!-- -------------------------------------------------------------------------- --> <a NAME="Licensing"></a> <h2 class="p4dbreadme">Licensing</h2> <P Class="Norm"> There is no license for P4DB. You are free to use it for any purpose. <br> I might decide to apply GPL to it some time in the future but I doubt that I will bother.... <!-- -------------------------------------------------------------------------- --> <a NAME="Warranty"></a> <h2 class="p4dbreadme">Warranty</h2> <P Class="Norm"> If you get any problems because of these scripts I promise to feel sorry for you. Other than that you are on your own. <P Class=Note> Please note for the record that I do not even claim that P4DB can be used to browse the P4 depot. I will also inform you that even though the intention is that P4DB should not in any way modify the depot status I can make no promises that this is can not happen.<br><br> And please remember that it would be easy for someone to grab the P4DB code, insert a few malicious lines of code, and "release" it with this "Trojan Horse". <!-- -------------------------------------------------------------------------- --> <a NAME="Contrib"></a> <h2 class="p4dbreadme">Would you like to contribute?</h2> <P Class="Norm"> If you would like to contribute changes/improvements/new functions the best way is to become a registered user at the <a href="http://public.perforce.com/public/index.html" title="Link to Perforce Public Depot"> Perforce Public Depot</a>, branch from <tt>//guest/fredric_fredricson/P4DB/main/...</tt>, make the changes and send me a <a href="mailto:Fredric.Fredricson@bonetmail.com" title="Mailto-link to me"> email</a>.<br> I can of course not promise that I will like your changes and immediately integrate them to P4DB but if not you can always start you own competing version of P4DB, I do not mind. <p class="Norm"> If Perforce Public Depot does not work for you you can just send me an <a href="mailto:Fredric.Fredricson@bonetmail.com" title="Mailto-link to me"> email</a> and describe the changes. <h3 class="p4dbreadme">What would be a contribution?</h3> <P Class="Norm"> I will be glad for any kind of contributions ranging from corrections of my bad English to new interesting functionality. Nice letters are also welcome. <!-- -------------------------------------------------------------------------- --> <a NAME="Doc"></a> <h2 class="p4dbreadme">Design documentation</h2> <P Class="Norm"> The most important documentation is in the P4CGI.pm module. This modules is used by all scripts and contains a set of common functions that are useful or defines some common "look and feel" or both. <P Class="Norm"> The P4CGI.pm module is documented using perlpod (see perlpod man page). To get a HTML page containing documentation type: <br> <tt>pod2html P4CGI.pm ><a href="P4CGI.html">P4CGI.html</a></tt> (There is one distributed with P4DB, for convenience) <P Class="Norm"> For other files: more often than not the code is commented. <P Class="Norm"> There are three different files 'types' in the design: <dl COMPACT Class="Norm"> <dt class="Norm"> P4CGI.pm <dd> - A perl module containing functions that I find useful and all other scripts use <dt class="Norm"> *.cgi <dd> - A set of cgi scripts that are used as ...eh.. cgi-scripts. </dl> <P Class="Norm"> The code also uses the CGI.pm perl module. This module should be part of the "standard distribution" of perl (if there is such a thing). If you do not have the module it is available for download at <a href="http://www.cpan.org">www.cpan.org</a>. <P Class="Norm"> As a part of my personal religion the -w flag is always turned on and 'use strict' flag is also set. I have never had any reason to regret this particular peculiarity of mine but it might cause some warning messages that will be printed to the browsers error log. <P Class="Norm"> Performance has not been a great issue. I assume that these cgi's will not have thousands of hits each day and the design has focused on ease of development rather than speed. <!-- -------------------------------------------------------------------------- --> <a NAME="Credits"></a> <h2 class="p4dbreadme">Credits</h2> <P Class="Norm"> An incomplete list of people that has contributed to P4DB in different ways: <ul Class="Norm"> <li>Diane Holt - Diane has also released her own version of P4DB adapted to NT. I think it's available in Perforce Public Depot. <li>Lawrence You <li>Ron Shalhoup <li>Rob Chandhok <li>Carl Martinsson - A colleague of mine that use P4DB a lot and contributed a lot of ideas for new functions. <li>Eric Engberg - Provided valuable information on how to facilitate ports to NT/Apache. <li>Lee Marzke - For valuable bug reporting <li>Todd Short - For the graphic branch graphs <li>Scott Roland - For a suggestion on how to mark deleted directories in the depot tree view <li>Charles Hardin - For some bug fixes and XML view </ul> <P Class="Norm"> There are more but these are the only names I found in my records. </body> </html>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#13 | 4989 | Fredric Fredricson |
P4DB: Some small fixed in documentation and make shortcut icon configurable |
||
#12 | 4883 | Fredric Fredricson |
P4DB: * Added a warning in intro page for untested versions * Some CSS changes * Updated info in README file and on intro page |
||
#11 | 4834 | Fredric Fredricson | P4DB: Incremented version to 4.0beta1 | ||
#10 | 4237 | Fredric Fredricson | P4DB: Maybe the final submit for P4DB 3.1.0 | ||
#9 | 4216 | Fredric Fredricson | P4DB: Another partial submit on my way to P4DB 3.1... | ||
#8 | 4176 | Fredric Fredricson | P4DB: Still working my way to P4DB 3.1... | ||
#7 | 4069 | Fredric Fredricson | P4DB: More changes on the way to 3.1 | ||
#6 | 4046 | Fredric Fredricson |
P4DB: First submit for 3.1. * Removed frame-stuff and some related files * Added new page header * Started update of documentation * Changed a lot of CGI:s to conform to new "look and feel" Still a lot to do: - clean up stuff (especially the javascript) - Fix the file list to use new annotate-command - Clean up and document css-file - and more....... |
||
#5 | 2922 | Fredric Fredricson | P4DB: Started to update README for 3.0 | ||
#4 | 2875 | Fredric Fredricson | P4DB 3.0 first beta... | ||
#3 | 1922 | Fredric Fredricson | P4DB: Some updates of the README file | ||
#2 | 1913 | Fredric Fredricson |
P4DB: Updated file log view with a link to branch graph and the README with information about the branchGraph cgi |
||
#1 | 1638 | Fredric Fredricson | P4DB: Added all (I think) files for P4DB |