You are here: TWiki> Online Web>UserCMT (2010-06-09, LoicBrarda)
Tags:
create new tag
, view all tags

Checking out CMT packages into user / group areas (accessing AFS)

Important

You should only checkout software if you need to change/modify/develop something. If you just want to use a package, please use what is installed in the /sw (Linux) or P disk (Windows). On Linux the standard environment will be setup such that CMTROOT and friends are correctly set. Try

SetupProject <NameOfProject>
like on lxplus. If the package / version you want is missing, please send a mail to the Online helpdesk asking for the package and version to be installed.

Setting up read access

To access the repository, set up the following environment variables in order to use ssh:
  • Linux and MacOS:
CVSROOT = :ext:isscvs.cern.ch:/local/reps/lhcb
CVS_RSH = ssh
  • Windows:
CVSROOT = :ext:isscvs.cern.ch:/local/reps/lhcb
CVS_RSH = C:\Program Files\PuTTY\plink

and follow the instructions for Linux/MacOS External link mark and Windows External link mark to create your private/public key pair. For windows, there is however a little change to be done when creating the isscvs.cern.ch session in Putty. When you create your session call it "isscvs.cern.ch" and the host name is the same "isscvs.cern.ch" (in the Session section) and in the Connection->Data section put your autologin name as the user name you want to use. Putty will then forward automatically your user to the isscvs.cern.ch session and then you can simply do a :

"C:\Program Files\PuTTY\putty" isscvs.cern.ch

Connecting with a different user name

For windows, it is quite simple. You just have to change the autologin name in the "isscvs.cern.ch" session. You can do it by loading the session in putty and change the username in the Connection->Data section as above.

For Linux/MacOSX, this is a little bit different because on these platform the username is always forwarded to the ssh connection. In order to change the username that ssh is using, you have to modify or create the ssh configuration file ~/.ssh/config. In that file, the entry for isscvs.cern.ch should look like:

Host isscvs.cern.ch isscvs svn.cern.ch svn  
   User myusername    
   Protocol 2
   ForwardX11 no
   IdentityFile ~/.ssh/id_rsa.myusername

where "myusername" is the name you want to use for the ssh authentication and "id_rsa.myusername" the private key of that user. The public key should added to that user .ssh/authorized_keys. It also work with dsa keys. See also http://svn.web.cern.ch/svn/howto.php#accessing-sshlinux .

Note that the entry for svn.cern.ch is needed since the latest getpack also queries this server.

To be noted that this procedure for the setting of the user name reproduces exactly the same behavior as the one with the former kserver method. It prevents the explicit embedding of the user name in the CVSROOT variable. This variable is reproduced in each and every CVS checked out directory (CVS/Root). There is a problem in the release areas and distribution kits if a given user name is hardcoded there. There should be no explicit user name.

Modifications in getpack

After these settings, you are able to do a plain CVS source code extraction
cvs co MyPackage
on Linux, MacOSX or Windows. This is not however the usual checkout tool used in LHCb. The getpack utility is used for a plain checkout but it is also able to do a recursive checkout according to the CMT dependency.

The former behavior of the getpack script with the "ext" (ssh) connection method was to embed the user name in the connection string (":ext:myusername@isscvs.cern.ch:/local/reps/lhcb"). As we have seen above this not a good idea and now getpack doesn't include by default the username in the connection string (":ext:isscvs.cern.ch:/local/reps/lhcb"). The user name has to be tuned in the ssh configuration (~/.ssh/config or Putty) as described above if needed.

For backward compatibility, getpack will add anyway the user name in the "ext" connection string in one case: if the GETPACK_USER variable is defined. This is not recommended and this variable should be unset.

-- NikoNeufeld - 27 Jun 2008

Edit | Attach | PDF version | Print version |  | Raw View | Raw edit | Backlinks | History: r5 < r4 < r3 < r2 < r1 | More topic actions
Topic revision: r5 - 2010-06-09 - LoicBrarda
 

TWIKI.NET
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback