This page is intended to contain a few important tips
on how we use CVS. Especially in collaboration with
CMT.
A few general tips on CVS commands may be found
here.
Though the packages described on that page are now mostly obsolete.
Our main CVS repository is presently at CERN on the
CERN CVS server.
Our LVL1/l1calo area within that can be viewed via the
ViewCVS
interface.
For full details see the
HOWTO
on the CERN CVS server web pages.
Briefly, there are three access methods: Kerberos, SSH and anonymous
pserver of which only the first two seem to work. For the first two
you need an account on the LXPLUS system at CERN.
Access via Kerberos
- Ensure that your local machine has the necessary
Kerberos IV infrastructure set up. See the CERN web page.
export CVSROOT=:kserver:atdaq-sw.cern.ch:/local/reps/atlastdaq
- Authenticate to Kerberos. What works best may depend on your site
NB the point at which these commands may not work for you is when
you do a cvs checkout). Try one of the following three:
kinit yourusername@CERN.CH
klog -tmp yourusername@cern.ch
klog.krb -tmp yourusername@cern.ch
- Note will need to renew your Kerberos token every day.
Access via SSH
export CVSROOT=:ext:atdaq-sw.cern.ch:/local/reps/atlastdaq
export CVS_RSH=ssh # Add this to .bashrc
- Set up ssh keys on your local host and copy
the .pub file to the right place at CERN. Their website suggests
using keys without passphrases. If you already have keys with
passphrases you can still keep them and use a separate key file
just for CVS. This is what I show below.
- On your local host do:
ssh-keygen -t rsa1
NB to get a separate CVS only key file give another
name, eg identitycvs, at the filename prompt
then give no passphrase. If you use the default
"identity" as the filename replace "identitycvs"
with "identity" everywhere below.
- Then copy the public identify file to LXPLUS:
scp ~/.ssh/identitycvs.pub yourusername@lxplus.cern.ch:
- Then create (or modify)
~/.ssh/config containing:
Host atdaq-sw.cern.ch atdaq-sw isscvs.cern.ch isscvs
Protocol 1
ForwardX11 no
IdentityFile ~/.ssh/identitycvs
If you already have a "Host *" section in your .ssh/config
file, the specific section for isscvs should go above it.
NB the L1CaloRelease data/shell directory contains an example
config file you can move to your ~/.ssh directory
(but you can only get it after making a checkout of course!).
- On LXPLUS use set_ssh which moves some of your .ssh/* files
into ~/public and creates links to them:
/afs/cern.ch/project/cvs/dist/bin/set_ssh
- Finally authorise your new public key.
cat ~/identitycvs.pub >> ~/.ssh/authorized_keys
Assume you have created a new CMT package called myPackage with
the correct CMT package/version directories in your l1calo working
area. You can then use the cvs import command to store
it in CVS.
You can do this by hand as described below. But it is easier to use our
importpkg.pl script.
This script make some simple cleanups of files generated by CMT
and creates some suitable
.cvsignore files.
But after that it imports everything in all subdirectories below
the current directory, so you should first remove any files that you
dont want to appear in CVS. You may like to make a backup of your
package first.
cd workarea/LVL1/l1calo/myPackage
export CVSROOT=.... # ask for correct setup
importpkg.pl myPackage
You can then rename the pre-CVS directory out of the way and check
out the newly imported package, eg using our
getpkg script.
cd workarea/LVL1/l1calo
mv myPackage myPackage.preCVS
getpkg -h myPackage
Before running cvs import , it is best to ensure that
your package directories are completely clean and only contain files
that you really want stored. You should also remove, or tell CVS to
ignore, all CMT binary directories such as i686-slc3-gcc323-dbg
and the probably empty Visual directory.
Most of the files in your cmt directory, apart from
requirements and Makefile , are automatically
regenerated by CMT and should also not be stored in CVS.
To ensure that these files are ignored by CVS later (or by the import
command) it is best to add a suitable .cvsignore file to both
your top level package directory and your cmt directory.
Standard .cvsignore files tailored for each of those two
directories can be copied from our other packages. Or you can look at the
section below.
With a clean set of directories,
you can import your new package into CVS as follows:
cd workarea/LVL1/l1calo/myPackage
export CVSROOT=.... # ask for correct setup
cvs import -m "First CVS version" l1calo/myPackage start myPackage-00-00-00
This adds the package to directory l1calo/myPackage in
the CVS repository and tags it as version myPackage-00-00-00 .
Remember this will import all files in all subdirectories, except those
you have asked CVS to ignore.
The CERN CVS server doesnt report the initial tag properly to our
latest
script. To work around this bug, you need to tag the package again
after its first import.
cd workarea/LVL1/l1calo/myPackage
cvs tag myPackage-00-00-01
You can then rename the pre-CVS directory out of the way and check
out the newly imported package, eg using our
getpkg script.
cd workarea/LVL1/l1calo
mv myPackage myPackage.preCVS
getpkg -h myPackage
A file with the name .cvsignore tells CVS to ignore
certain files for all commands (update, commit, import, etc)
operating in that directory.
For working with CMT, a suitable .cvsignore in your
top package directory and another one in your cmt directory
will make like a little easier.
For the top level package directory, you want to ignore all the likely
CMT binary directories, plus a few other types of file. A typical set
might be as follows:
i386_*
i686-*
linux-*
powerpc-*
ppc-*
sparc-*
sungnu
sunpro
Visual
*.gz
*.tar
*.tgz
For your cmt directory, you want to ignore all the files
which CMT automically generates or updates. Although CMT creates a simple
Makefile when the cmt create command is executed, you may
want to edit this file, so it probably should be stored in CVS. However
many *.sh , *.csh and all *.make
should be ignored. A suitable .cvsignore file may be:
checkuses
cleanup.*sh
setup.*sh
uses.log
version.cmt
*.make
*.makesav
Last updated on 10-Feb-2006
by Murrough Landon
|