LON-CAPA CVS Upgrade

Current CVS Upgrade Procedure

Scott Harrison, last updated 11/7/2001

CVS Upgrade

If you have not yet set yourself up for LON-CAPA CVS, please see the section "Setting yourself up for LON-CAPA CVS".

Before you do a file upgrade, you can always enter a "make statuspost" command to see what will be changing on your system. See the section Viewing the status of your machine.

Assuming that you have set yourself up for LON-CAPA CVS, periodically upgrading your system is a simple process.

StepsCommands
Make sure you are logged in for CVS export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs
cvs login
Go to your repository directorycd loncapa
Update your CVS sourcescvs update -d -r STABLE
Go to the build directorycd loncom/build
Become 'root'su
Install/update static filesmake install
Install/update dynamically configurable files
this preserves the current settings of your machine, don't worry :)
make configinstall
Restart your web server
Due to an apache bug, you should enter this command twice. Restarting the web server will
  • introduce changes made to /home/httpd/lib/perl/Apache/*.pm files;
  • update user and group permissions if /etc/passwd or /etc/group change.
/etc/rc.d/init.d/httpd restart
/etc/rc.d/init.d/httpd restart
Restart the lonc/lond processes
Be patient (this takes several minutes).
/etc/rc.d/init.d/loncontrol restart
After CVS logging in, you can always cut and paste this line below assuming you do everything as root :)
cd loncapa; cvs update -d -r STABLE; cd loncom/build; make install; make configinstall; /etc/rc.d/init.d/httpd restart; /etc/rc.d/init.d/httpd restart; /etc/rc.d/init.d/httpd restart; /etc/rc.d/init.d/loncontrol restart

It may be also advisable to test your system after an upgrade if there are critical tasks it is being used for.

The specification file which defines the CVS:source-to-system information is CVS:doc/loncapafiles/loncapafiles.html. Changes to this file directly translate into changes in the installation.

RPM Upgrade

BE CAREFUL. READ THIS STUFF.

WARNINGS:

There are four things involved in an RPM upgrade:

  1. Gaining information about the RPMs on your system.
  2. Upgrade existing RPMS from a trusted source
  3. Remove RPMs which do not belong
  4. Add new RPMs

Gaining information about the RPMs on your system: "make rpmstatuspost" (see Viewing the status of your machine) will tell you about RPMs which do not belong (are "external" to LON-CAPA). It will also tell you if you have "out-of-date" RPMs which should maybe be upgraded. Important specification files for RPM installation are CVS:doc/otherfiles/rpm_list.txt and CVS:doc/otherfiles/cd_rpms.txt.

Upgrade existing RPMS from a trusted source: RPMs are currently available at

http://install.lon-capa.org/3.1/latestRPMS/
For example, to upgrade your LON-CAPA-systemperl RPM, you would enter commands like
wget http://install.lon-capa.org/3.1/currentcdsource/RedHat/RPMS/LON-CAPA-systemperl-3.2-1.i386.rpm
(then as root) rpm -Uvh --force LON-CAPA-systemperl-3.1-1.i386.rpm

Remove RPMs which do not belong: If an RPM should NOT be on your system (like apmd), then you want to remove this RPM. Since RedHat is a little erroneous when it comes to dependencies, you may wish to use the --nodeps flag.

rpm -e --nodeps apmd-3.0final-2.i386.rpm

Add new RPMs: Use the same command as for upgrading.

(as root) rpm -Uvh --force icewm-1.0.5-gnome.i386.rpm
We often use icewm as our development machine window manager given the RedHat 6.2 bugs involving enlightenment and gnome.

Viewing the status of your machine

StepsCommands
Make sure you are logged in for CVS export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs
cvs login
Go to your repository directorycd loncapa
Update your CVS sourcescvs update -d -r STABLE
Go to the build directorycd loncom/build
Become 'root'su
View the CVS source->install status of your machinemake statuspost
then visit http://MACHINENAME/lon-status/filestatus.html
View the RPM status of your machine make rpmstatuspost
then visit http://MACHINENAME/lon-status/rpmstatus.html

Setting yourself up for CVS

These instructions assume bash (as opposed to tcsh).

You will also need an account on zaphod.lite.msu.edu. Please e-mail lon-capa@hobbes.lite.msu.edu and request that an account be created.

The straightforward way to enable CVS is to manually configure your environment and log in:

export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs
cvs login

You can also modify your shell environment (.bash_profile and .bash_logout).

The commands:
export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs
cvs login
can be appended to ~/.bash_profile.
"cvs logout" can be appended to ~/.bash_logout

To check out LON-CAPA, go to any writeable directory and type:

cvs co loncapa

This will create a directory tree similar to:

loncapa_________CAPA
          |
          |_____loncom
          |
          |_____doc
          |
          |_____rat
          |
          \_____packaging

Useful commands are:

CommandDescription
info cvsdoc's
cvs log FILENAMEsee what's happened with a file
cvs update -d -r STABLEupdate your CVS tree from the current directory location