README.WEBKEEP #2

  • //
  • guest/
  • paul_goffin/
  • apache1.3.6/
  • src/
  • modules/
  • perforce/
  • README.WEBKEEP
  • View
  • Commits
  • Open Download .zip Download (4 KB)
**************************************************************************
* Copyright 1995, 1998 Perforce Software.  
*
* This file is part of WebKeeper, a perforce client apache module.
*
* License is hereby granted to use this software and distribute it
* freely, as long as this copyright notice is retained and modifications
* are clearly marked.
*
* ALL WARRANTIES ARE HEREBY DISCLAIMED.
*
* Last updated: December 24, 1998
*
* $Id: //guest/paul_goffin/apache1.3.6/src/modules/perforce/README.WEBKEEP#2 $
*
**************************************************************************

PERFORCE SOFTWARE WEBKEEPER NOTES

    Warning:

	This is a demo, not a product.

WHAT YOU HAVE

    This directory contains the generic componentry to build an Apache
    Web Server with a Perforce WebKeeper module.  This directory includes:

	Jamfile		a description file for 'jam'
	README.WEBKEEP	this file
	mod_webkeep.c	the WebKeeper Apache module, C half
	mod_webkeep2.cc	the WebKeeper Apache module, C++ half
	mod_webkeep.h	glue between the C and C++ halves

    You will also need a Perforce header file and link libraries and
    for your platform.  They can be found at:

	ftp.perforce.com/pub/perforce/r??.?/bin.*/p4api.tar

    If you want to build the Apache server with jam, a make(1) alternative
    program, it is available from http://www.perforce.com/jam.html.  If
    you wish to use plain old make(1), you'll need to edit the Makefile
    and modules.c.

TO BUILD THE APACHE SERVER

    1) Unpack the Perforce libraries.

	% cd /path/to/apache/src
	% mkdir perforce
	% cd perforce
	% tar xvf /path/to/p4api.tar

       Note that there are source files in the p4api.tar ball
       that are not related to webkeeper.

    2) Move these files into the Apache directory

	% mv Jamfile mod_webkeep.* /path/to/apache/src


     pdg 2a)  Now edit the mod_webkeep.c file and set the
           "MAX_SERVERS" constant to the number of perforce
          servers you wish to browse from this one apace server.

          e.g.  "#define MAX_SERVERS 3"  allows this single
           apache server to browse 3 perforce servers.


    3a) If using make(1), fix up Makefile and config.c, then build.
	Include perforce/libclient.a, perforce/librcp.a, and 
	perforce/libsupp.a on the link line.

	% cd /path/to/apache/src
	% vi Makefile config.c
	% make

    3b) If using jam, just build.

	% jam

TO USE WEBKEEPER

    1)  Do the necessary steps to get a Perforce server running.  See
    	the admin section of the Perforce manual.

    2)	Edit the Apache hhtp.conf file.  These are the directives:

		WebKeepPort server_index host:port

		    Gives the address of the Perforce server.  
		    for a single perforce server system, use:
                                               WebKeepPort 0 perforce:1666 (or whatever your
                                               server name/port is.)

                                               The index number allows a particular perforce
                                               server to be associated with a particular WebKeepAlias.

                                               (You will need to set "MAX_SERVERS" in
                                               mod_webkeep.c to at least the same value
                                               as the number of WebKeepAlias lines you
                                               intend to implement.)

		WebKeepUser username

		    Gives the Perforce user name.  
		    Default is $P4USER or $USERNAME.

		WebKeepPasswd password

		    Gives the user's password.
		    No default.

		WebKeepClient clientname

		    Gives the Perforce client name.
		    Default is $P4CLIENT or hostname.

		WebKeepAlias uri perforcePath

		    If the URI begins with uri, strips the intial uri,
		    replaces it with perforcePath, and then treats the
		    URI as a WebKeeper request.

	For example:

		WebKeepAlias / //depot

	Maps the URI / to //depot/index.html and the rest of the web
	namespace into the corresponding Perforce namespace under //depot.
	The $ is necessary to distinguish between initial substring 
	mactches and exact matches.

	You can also use //client/ where client is the name of your
	client.  If you use //client/, it will map the name through your
	client view.  You don't have to map the whole namespace.  You
	could say:

		WebKeepAlias /foo/ //depot/

	To map only files under /foo/... to the Perforce namespace.

	You can have multiple alias lines.

Notes:

    Directory indexing is still not yet supported.  
# Change User Description Committed
#2 234 paul_goffin Extended mod_webkeep.c to support multiple perforce servers via
introducing an index mechanism for the WebKeepAlias line.

This works as follows:

  suppose there are two perforce servers:
    server1:1666 (serving depot-1) and
    server2:1666 (serving depot-2),

  Then set MAX_SERVERS to 2 (in mod_webkeep.c) and
  set up the httpd.conf file as follows:

  WebKeepPort 0 server1:1666
  WebKeepPort 1 server2:1666

  WebKeepAlias /depot-1 //depot-1
  WebKeepAlias /depot-2 //depot-2

  WebKeepUser <whatever>
  WebKeepClient <whatever>
  WebKeepIndex  index.html

The order of the "WebKeepAlias" lines is used to
associate depot-1 with server 0 - i.e. server1:1666
and depot-2 with server 1 - i.e. server2:1666

This has been tested with Apache 1.3.6 and 1.3.9
on Redhat Linux 5.2 and 6.0

(I admit the implementation could be a lot
more elegant, but it works...)
#1 169 paul_goffin Added the Apache directory structure to raymond wiker's webkeeper
update.  (So novices like me can find where to put the stuff!)
Inlcuded the mods to the Apache Configuration.tmpl and main
Makefile to actually make it build.

(The Makefile needs to use "CPP" instead of "CC" to do the final
link with the g++  libraries.)  This isn't put in by "configure",
so you need to edit Makefile (or replace it with the one
in this submission if you're building just a standard apache with
webkeeper) after the configure process.  (This Makefile includes
the change, so you can just "diff" it.)

Also had to change the include in mod_webkeeper2.cc to "" style
from <> style.

This version built (and running) on Redhat Linux 5.2 (x86).
//guest/raymond_wiker/webkeeper/README.WEBKEEP
#1 121 raymond_wiker Branched webkeeper files to own view.
//guest/perforce_software/webkeeper/README.WEBKEEP
#1 46 Perforce maintenance Add WebKeeper source.