(Answer) (Category) LON-CAPA User Help : (Category) Server System Administration : (Category) CVS :
CVS info
(All examples below assume your cvs checkout is in /somewhere/loncapa)

Send an e-mail to helpdesk@lon-capa.org to request a username for the CVS repository, if you want to be able to checkout the LON-CAPA code, and do not already have a username assigned.

Accessing the repository

Note: LON-CAPA CVS location changed October 22, 2008 to: source.lon-capa.org:/home/cvs
Use the following commands to set-up access to CVS via ssh.
$ export CVS_RSH=ssh
$ export CVSROOT=:ext:USERNAME@source.lon-capa.org:/home/cvs
(replacing USERNAME with your username on the cvs server).
If you checked out your local copy of the repository from the old CVS server, (i.e., before October 22, 2008), you will need to change the contents of CVS/Root in each subdirectory. (You need only do this once, when you first switch from the old hostname to the new one). Change to the top level directory for the repository (i.e, the one which contains: loncom, rat, doc, capa, modules)
$ cd /somewhere/loncapa
then use the following (all on one line)
$ find . -name Root -exec perl -p -i -e "s/zaphod\.lite\.msu\.edu/source.lon-capa.org/" {} \;
to make the change recursively to use of the new location.

Prior to mid-May 2008, authentication with a cvs login to the LON-CAPA CVS repository on the old server was possible using the pserver command.
export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs 
cvs login
(replacing USERNAME with your username on the cvs server).

As of May 14, 2008, remote access to the CVS repository (i.e., from outside the MSU network) using pserver authentication was no longer available. Furthermore, pserver authentication is no longer available for access from anywhere following migration to the new server on October 28, 2008.

If you have a local copy of the cvs repository which you checked out prior to May 14, 2008 you will need to switch the method stored in CVS/Root in each directory in your local copy of the repository from :pserver to :ext (see below).

The "cvs login" command (which relies on pserver) is no longer supported for remote connections; instead ssh will be used to authenticate. Each time you use a CVS command, e.g., cvs update -d -A to update your repository, you will be prompted to enter your password (which will be communicated to the CVS server via ssh). As noted above, for a local repository created prior to May 2008, it is necessary to change the contents of CVS/Root in each subdirectory. (You need only do this once, when you first switch from using pserver to using ssh).
Change to the top level directory for the repository (i.e, the one which contains: loncom, rat, doc, capa, modules)
$ cd /somewhere/loncapa
then use the following:
$ find . -name Root -exec perl -p -i -e "s/pserver/ext/" {} \;
to make the change to use :ext recursively.


Updating the repository

To update a repository to have the files marked STABLE do this:
$ cd /somewhere/loncapa
$ cvs update -d -r STABLE
It is expected that all production machines will be using this.

To change a repository to have the latest (and maybe greatest versions) do this:
$ cd /somewhere/loncapa 
$ cvs update -d -A
It is expected that all developers to be using this.

If you have updated a repository to the Latest (and as it turns out not so great) version, doing:
$ cd /somewhere/loncapa 
$ cvs update -d -r STABLE 
Will take you back to the STABLE version.

A refresher on how to upgrade your machine:
export CVS_RSH=ssh
export CVSROOT=:ext:USERNAME@source.lon-capa.org:/home/cvs 
cd loncapa
cvs update -d -r STABLE
cd loncom/build
su
make install
make configinstall
/etc/rc.d/init.d/httpd restart
/etc/rc.d/init.d/loncontrol restart

Using a public key

The downside to using ssh for remote authentication in place of pserver is that you will be prompted to enter your password each time you issue a cvs command.

A solution to this is to use
$ ssh-keygen -t dsa
to generate public and private keys in ~/.ssh/

Send the public key (id_dsa.pub) to helpdesk@lon-capa.org so it can be added to the appropriate authorized_keys file on source.lon-capa.org

If you have any problems or questions please contact me.

--
Stuart Raeburn
helpdesk@lon-capa.org
[Append to This Answer]
This document is: http://help.loncapa.org/cgi-bin/fom?file=92
[Search] [Appearance] [Show This Answer As Text]
This is a Faq-O-Matic 2.719.
This FAQ administered by the LON-CAPA team at MSU. Submit a help request ticket to contact us.