Mu2e Home
Source Code Repository
Search
Mu2e@Work

  1. Introduction
  2. Setting Environment Variables
  3. Forwarding Kerberos Tickets
  4. The cvs User Areas
  5. CVS Cheat Sheet


Introduction

The Mu2e collaboration is using Concurrent Version System (CVS) as our source code management system. Actually we use this to manage most versioned files, not just source code. We have chosen cvs over other options, such as svn and git, because the Fermilab Computing Divison (CD) supports a cvs server for us. If CD starts supporting svn or git servers, we will evaluate if and when it makes sense to change.

There is a read-only interface to browse files in the repository http://cdcvs.fnal.gov/cgi-bin/public-cvs/cvsweb-public.cgi/mu2e/. This is not a fully functional code browser but it is a start.

Access to the repository, for both read and write, is restricted and is based on your Fermilab kerberos principal. To get authorization to use Mu2e's cvs, send an email, containing your kerberos principal, to kutschke@fnal.gov.

Setting Environment Variables

To access files in the repository you need to first get a kerberos ticket and set two enviroment variables. For csh flavor shells (csh, tcsh) the instructions are:

> setenv CVSROOT   mu2ecvs@cdcvs.fnal.gov:/cvs/mu2e
> setenv CVS_RSH   /usr/bin/ssh
> setenv CVSEDITOR /usr/bin/xemacs  # For example; see below.
For sh flavor shells ( sh, bash) the instructions are:
> export CVSROOT=mu2ecvs@cdcvs.fnal.gov:/cvs/mu2e
> export CVS_RSH=/usr/bin/ssh
> export CVSEDITOR=/usr/bin/xemacs  # For example; see below.
For a Mac using the ssh3a version of ssh the last line should read:
> export CVS_RSH=/usr/bin/ssh3a
In all cases the value of CVSROOT must be given exactly as shown. The example value of CVS_RSH is correct for Scientific Linux Fermi, versions 4.* and 5.*. On other machines it may be different; it should be the complete path of the name of a kerberos aware version of ssh that is compliant with Fermilab's use of kerberos.

Setting the CVSEDITOR environment variable is not necessary but most people will find it useful. This controls the editor that will be used when you are asked to supply a comment for a cvs commit operation. If you do not specify an editor then a system default, usually vi, will be chosen; if you are not familiar with vi you will then be trapped. This is discussed further in CVS Cheat Sheet section on cvs commit.

Forwarding Kerberos Tickets

If you kinit on your laptop ( or desktop ) you will be able to run cvs to check out and commit files. If you log in from your laptop to mu2egpvm* you should be able to run cvs on those machines. If you get a "permission denied" error from the cvs server, there are two things to check:

If the ssh defaults for your computer are set up correctly, the following step is not necessary. If the ssh defaults for your computer are incorrect, then you should override them for your own account by adding the following lines to your ~ssh/.config:

host cdcvs.fnal.gov
  ForwardX11 = no
  GSSAPIAuthentication yes
  GSSAPIDelegateCredentials yes

The cvs User Areas

In addition to the cvs repository for offical Mu2e code, we have provided a cvs area for people to keep side projects and code that is not yet ready to be in an official cvs release. At the cvs top level there is a subdirectory Users, in which people may create subdirectories for themselves. If a subdirectory has already been created for you, you can check out its contents with:
> cvs co Users/yourKerberosPrincipal

To create your own User cvs area:

> cvs co Users/nobody
> cd Users
> mkdir <yourKerberosPrincipal>
> cd <yourKerberosPrincipal>
> cp yourfiles .
> cd ..
> cvs add <yourKerberosPrincipal>
> cvs commit -m "Comment about what you did." <yourKerberosPrincipal>
where you should replace <yourKerberosPrincipal> with the name of your kerberos principal. A quirk of cvs is that when you cvs add a new directory there must already be at least one file in that directory; if not, cvs gets confused. See also the section on adding directories in the Mu2e CVS Cheat Sheet. There is no technical enforement that the directory name you create for yourself must match your kerberos principal but please follow that convention.

These areas are not protected. So if several people wish to collaborate on a project they can agree to set up their code base in the cvs space of one of the group.

In an earlier incarnation of this I called this cvs space "Personal" not "Users". Please use "Users" space. At some point "Personal" will go away.


Fermilab at Work ]  [ Mu2e Home ]  [ Mu2e @ Work ]  [ Mu2e DocDB ]  [ Mu2e Search ]

For web related questions: Mu2eWebMaster@fnal.gov.
For content related questions: kutschke@fnal.gov
This file last modified Friday, 22-Sep-2017 10:08:27 CDT
Security, Privacy, Legal Fermi National Accelerator Laboratory