Jamfile #1

  • //
  • guest/
  • tony_smith/
  • perforce/
  • p4u/
  • main/
  • Jamfile
  • View
  • Commits
  • Open Download .zip Download (2 KB)
#------------------------------------------------------------------------------
# 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.
#------------------------------------------------------------------------------
SubDir TOP ;
SubDirHdrs	$(P4) ;

LOCATE on $(CLIENTLIB) 	= $(P4) ;
LOCATE on $(RPCLIB)	= $(P4) ;
LOCATE on $(SUPPORTLIB) = $(P4) ;
DEFINES += __USE_MISC ;

Main p4u : 	adminmain.cc 
		adminclient.cc
		adminuser.cc 
		edituser.cc 
		filelist.cc
		revertuser.cc
		submituser.cc
		syncuser.cc 
		;

Identify	adminmain.cc ;

LinkLibraries p4u : $(CLIENTLIB) $(RPCLIB) $(SUPPORTLIB) ;
# 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.