README FOR 'AP4' --------------- (Active P4, Advanced P4 - as you lilke) Introduction ------------ AP4 is a Perforce command line client designed to facilitate the management of Unix machines using Perforce. There are some files on Unix machines (like /etc/shadow!) which must always have the correct access permissions. The standard Perforce Command Line Client (P4) simply uses the unix user's umask to decide what permissions the files it writes should have. This can make it difficult to manage permission-sensitive files in Perforce. Perforce 2004.2 allows you to define per-revision attributes on files and AP4 makes use of this functionality. When AP4 writes a file into your workspace, it checks to see if there are 'unixperms', 'unixuser', 'unixgroup' attributes on the revision and uses that to set the desired permissions/ownership. Furthermore ap4 supports now also the versioning of directories, with permissions and ownerships. Status ------ AP4 should be considered experimental software. The basic Perforce functionality is taken from the Perforce C++ API so that is well proven. The experimental part is the management of the file permissions using the file attributes and the versioning of directories. Since this requires individual handling for specific Perforce commands, support may not yet be complete. As the license says, you use it at your own risk. Building AP4 ------------ To build AP4 you'll need: a) The Perforce C++ API (2004.2 or later preferred) for your platform gcc2.95.x users please take care to choose an API build compiled with a gcc2 compiler. For Linux users, this means you should use the api tarballs from the bin.linux24x86 directories, NOT the bin.linux26x86. You may have a look in the Makefile, where you can adapt INCLUDES, LIBRARIES, C++, LINK to your environment. b) A C++ compiler like g++ on Linux / BSD systems. Step 1 Unpack the Perforce API in the subdir ./api NOTE: if you unpack the api in the current directory the tool wont compile! Step 2 Build AP4: make Should work for most people. Using AP4 --------- Since AP4 will try to set ownership on files it should only be run as "root". It runs transparently to the known p4 command. NOTE: When you submit files, the transfer of the files on the one hand and the setting of each attribute of each file on the other hand are separte transactions and so NOT atomic. When a submit command is interrupted you may have inconsistancies in your repository (according to permissions and ownership, not the files themself). Note, to prevent you from forgetting to type 'ap4' instead of 'p4', it's a good idea to alias p4=ap4 for the relevant user (root?). Bug reporting ---------- Since the tool is still under development I appreciate any bug reports to strack@fhm.edu. Good (!) ideas are also welcome. But no guarantee that I will do anything with them. License ------- Copyright (c) 2004, Perforce Software, Inc. All rights reserved. ****************************************************************************** * ------------------- * begin : 2005/04/20 * copyright : (C) 2005 by Harald K. Strack * copyright : (C) 2005 by Trymedia Inc. * email : hstrack@trymedia.com ****************************************************************************** Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PERFORCE SOFTWARE, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.