Change 10658

jason_gibson (Jason Gibson)
Jason Gibson committed this change into //guest/perforce_software/p4dctl
Request Review
Download .zip
Update P4DCTL from internal Perforce tree.

Note that this change does not bring the internal Jam files and deletes the
existing builds, leaving that as a future task.

Changes include:

################################################################################

       Added support for a -o option which allows command line arguments to be passed
       directly to the service being started.

################################################################################

       Support for P4DTG in P4DCTL.

       Example config:

       p4dtg test {
         Execute =  /usr/local/share/p4dtg-2010.2.452775/p4dtg-repl
         Owner   =  perforce

         Environment
         {
           P4DTGROOT    = /p4/dtg
           P4DTGMAPPING = local
         }
       }

################################################################################

Move p4dctl's default configuration file (and the only one that is considered
safe to use) to '/etc/perforce/p4dctl.conf', and also move the directory that
gets included by default to '/etc/perforce/p4dctl.conf.d'.

################################################################################

Make p4dctl provide LANG and LC_ALL environment variables to child processes.
These both default to 'C'. They can be overridden in either global or
server-specific environment blocks, but given that 2014.2 relies on LANG, it's
better if that is set than missing.

################################################################################

       Make p4dctl status exit with a code of 1 if any of the servers
       that it attempts to check are not running. For automation
       support

################################################################################

Change syntax of p4dctl config files so as to more clearly differentiate
between 'settings' that p4dctl understands and environment variables to be set
for the child processes.

       The old style syntax looked like this:

       p4d main
       {
           Owner       = perforce
           Execute     = /usr/local/bin/p4d

           P4ROOT      = /home/perforce/p4-main
           P4JOURNAL   = journal
           P4PORT      = 1666
           PATH        = /bin:/usr/bin:/usr/local/bin
       }

       Where the only thing that differentiated the two was a convention on the use of
case. Anything p4dctl didn't understand would be set as an environment variable.

       Now, we're separating the environment into a dedicated block, so p4dctl can
flag up early if it encounters settings it doesn't know about.

       The new syntax looks like this:

       p4d main
       {
           Owner       = perforce
           Execute     = /usr/local/bin/p4d

           Environment
           {
               P4ROOT      =   /home/perforce/p4-main
               P4JOURNAL   =   journal
               P4PORT      =   1666
               PATH        =   /bin:/usr/bin:/usr/local/bin
           }
       }

################################################################################

A new command in p4dctl that allows you to query the environment for any
configured server.

       For example: list all p4d's with their Name, port and root:

         $ p4dctl env -a -t p4d Name P4PORT P4ROOT
         Name=p4d-master P4PORT=ssl:1666 P4ROOT=/var/lib/perforce/p4d-master

       Find the P4ROOT of a known Perforce server and set P4ROOT in your
       environment:

         $ eval `p4dctl env -t p4d p4d-master P4ROOT`

################################################################################

Manpages for p4dctl and its config file.

################################################################################

       Add 'list' command to p4dctl. Lists configured servers
       visible to the current user.

       Lists useful information about all the standard Perforce
       Server types.
  • Files 28
  • Comments 0
15 edited 8 added 5 deleted
bin.darwin10u/p4dctl#2
Loading...
bin.linux26x86/p4dctl#2
Loading...
bin.linux26x86_64/p4dctl#2
Loading...
src/LICENSE#2
Loading...
src/README#2
Loading...
src/cmdline.cpp#2
Loading...
src/config.cpp#2
Loading...
src/config.h#2
Loading...
src/configlex.c#2
Loading...
src/configlex.l#2
Loading...
src/configparse.c#2
Loading...
src/configparse.h#2
Loading...
src/configparse.y#2
Loading...
src/p4d.conf.sample#2
Loading...
src/p4dctl.1#2
Loading...
src/p4dctl.8#1
Loading...
src/p4dctl.conf.5#1
Loading...
src/p4dctl.conf.sample#1
Loading...
src/p4dctl.cpp#2
Loading...
src/p4dctlerr.cpp#2
Loading...
src/p4dctlerr.h#2
Loading...
src/server.cpp#2
Loading...
src/server.h#2
Loading...
src/test.conf#1
Loading...
src/test.d/india.p4p.conf#1
Loading...
src/test.d/main.p4d.conf#1
Loading...
src/test.d/main.p4web.conf#1
Loading...
src/test.d/test.p4d.conf#1
Loading...
Tip: Use n and p to cycle through the changes.