#------------------------------------------------------------------------------ # Copyright (c) 2004, Perforce Software, Inc. All rights reserved. # # 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. #------------------------------------------------------------------------------ if ! $(P4) { Exit "Use 'jam -sP4=<path to Perforce API>' to build" ; } include Version.p4u ; include [ FDirName $(P4) Jamrules ] ; rule Identify { Ident $(<) ; ObjectDefines $(<) : [ Fconcat P4U_PATCH= [ FQuote $(P4U_PATCH) ] ] [ Fconcat P4U_VERSION= [ FQuote $(P4U_VERSION) ] ] ; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 4662 | Tony Smith |
Add the first release of my Perforce command line client for Unix sysadmins. On a Unix box, some of the files you really want under version control need to be protected. P4 uses the user's umask to control the permissions on the files it manages but when you're managing a unix box these permissions can vary on a per-file basis and that makes it tricky to manage unix boxes properly with Perforce. Enter P4U. It uses the 2004.2 server's ability to store per-revision attributes to store a permission-mask for each file that requires custom handling. The bits in the mask are removed from the permissions of the relevant files when normal Perforce commands are executed using 'p4u' instead of 'p4'. i.e. p4u add /etc/shadow p4u attribute -n unixMask -v 077 /etc/shadow p4u submit This will cause /etc/shadow to have the mode you would hope for (0400). The mode will be restricted whenever you: p4u submit p4u edit p4u revert p4u sync Currently that's it. |