CMPE 401 - Laboratory #1 CVS instructions
Software Management with Concurrent Version System - CVS
-
Account Creation:
In order to create a CVS account for each member of your group I need a few pieces of information:
-
Your ECE ID (which you provided already).
-
Your preferred email if different from the above.
-
Your group name, which will be assigned once all other information has been received.
-
The public part of your ssh key. This is normally located in ~/.ssh. If you don't have one, you can create one.
-
Generating an SSH Key:
I am assuming that you are running Linux with openssh from (www.openssh.org). The following does work on the machines in the lab. If you are trying to use a different setup please read the documentation about setting up SSH access with keys.
If you need to create your own keys use the command:
ssh-keygen -t dsa
This script will try to create a directory (~/.ssh) if it does not exist and create a number of files in it. First you will be asked to choose a filename for your id_dsa.pub file. Press enter to accept the default. You will be asked for a passphrase. Press enter. You will be asked to confirm your passphrase. Press enter again.
Two files will be created in your account if you follow the instructions outlined above:
~/.ssh/id_dsa and ~/.ssh/id_dsa.pub
Please attach the id_dsa.pub to your e-mail to nem@ece.ualberta.ca. I'll need an id_dsa.pub for each member of the group. If you ever delete the private part of your key you will lose all access to the CVS repository. If that happens - contact me. Please remember that those files are now your "passwords". Do not share them with anyone!
-
Home Account Configuration:
Once your account has been created, accessing the repository can be made easier by setting the following variables in your ~/.bashrc file:
export CVS_RSH="ssh"
export CVSROOT=":ext:<<login>>@cvssrv.ece.ualberta.ca:/opt/cvs/<<groupname>>"
Replace <<login>> with your login and <<groupname>> with the name of your group.
Now you can either source the file (source ~/.bashrc) or log out and log back in for the changes to take effect.
All of the cvs commands should now work. If they do not - e-mail me with the error message and a description of the problem
-
CVS Commands:
We'll focus on a limited number of instructions in this first lab.
To import an existing project into you'll need to cd into that directory. The import always takes the files in the current directory. Needless to say, this will take a very long time if you forget to cd into your cmpe401 directory.
Once you're in the directory you want to import into CVS run:
cvs import -m "Comment v1.0" <<project_directory>> vendor start
Once your project file has been imported save your cmpe401 directory to a safe place if you want the checked out version of the directory to live in the same place as the project you just imported.
Once your imported project is somewhere safe, run:
cvs checkout <<project_directory>>
to create a sandbox for this project. This will pull the complete source tree for that project from the CVS repository.
-
CVS Demo Requirements for Lab #1:
The CVS requirements for this lab are as follows:
-
You must have a CVS account created for the members of your group. The instructions are above.
-
You must have imported your project into the repository according to the instructions above.
-
The lab instructor will test this by running cvs checkout in a junk directory inside your respective accounts to verify that the source tree can be checked out. Any version of the tree will be acceptable. You may wish to run
cvs commit -m "Comment for this commit"
to keep your project updated but this is not required in this lab.
This document is a summarized version of the CVS tutorial available here
Last modified September 19, 2005