Wednesday, May 20, 2009

Perforce Remote depot creation

The perforce remote depot allows to access files in depot created in another server instance. For example if you are connected to a server listening to port 1666 and want to access contents of a depot created in server listening at port 1667, remote depot assists in doing this. You can sync, diff and integrate remote depot with local depot.

Example:
Server1=1666 : Branch-name=//user/sguru/...
Server2=1888 : Remote-depot=//remote-sguru/... (this is the new depot which will be created)
I need to make //user/sguru/... in server1 as remote depot in server2

Step1: Create a new depot on Server2 and make following changes in depot spec
Depot: remote-sguru
Type: remote
Address: server1:1666
Map: //users/sguru/...

Step2: Open protection table on Server1 and add the following line
read user remote //users/sguru/…

Step3: Grant read access to //remote-sguru/... depot only to your build or integration managers. Open protection table on Server2 and add the following
list user * * -//remote-sguru/...
read user p4admin * //remote-sguru/...
We are avoiding rest of users other than admin accessing directly remote depot (server1) through //remote-sguru/... to minimize network traffic. Instead we create another branch as described in step4 and allow other users to access remote depot code from it.

Step4: Integrate //remote-sguru/... to location and allow rest of the users to access remote data from here. This will reduce network traffic. On server2 do following
p4 integ //remote-sguru/... //users/remote-sguru/...
Add following line to protect table
read user * * //users/remote-sguru/...

Tuesday, May 19, 2009

How to start sshd in AIX Machine?

- Login as root
- startsrc -s sshd #This will start sshd process
0513-059 The sshd Subsystem has been started. Subsystem PID is 27216.

- lssrc -s sshd #To check the status of sshd
Subsystem Group PID Status
sshd ssh 253954 active


We can set environment variables in the file /etc/environment. Variables set in this variables overrides variables defined in shell login scripts like .bashrc, when logged in using ssh

Monday, May 11, 2009

Perforce spec depot

No need to manage manually perforce specs like client spec, job spec, label spec, branch spec, protection table, etc. Perforce (from 2005.1 release) provides a special depot called specs depot which take care of managing these specs by automatically creating a new version under //spec for each spec modifications.
How to create spec depot?
- p4 depot spec (or any other name U wish)
- In type field change it to spec (by default it comes local)
- Save it. It creates //spec depot. From now on any modifications to specs are stored under //spec depot. For example client spec changes will be stored in //spec/client/client-name.p4s

How to populate spec depot with change details for specs already created?
Run command "p4 admin updatespecdepot -a" (This command available from 2007.3 release).
If you want to restrict population to specific type of spec, then modified command will be
p4 admin updatespecdepot -s spec
Ex: p4 admin updatespecdepot -s client