<html>
<head>
<title>LON-CAPA CVS Upgrade</title>
</head>
<body>
<h1>LON-CAPA CVS Upgrade</h1>
<h3>Current CVS Upgrade Procedure</h3>
<p>
Scott Harrison, last updated 05/19/2001
</p>
<p>
Last updated: 4/18/2001
</p>
<ul>
<li><a href="#fileupgrade">CVS Upgrade</a></li>
<li><a href="#rpm">RPM Upgrade</a></li>
<li><a href="#status">Viewing the status of your machine</a></li>
<li><a href="#setting">Setting yourself up for CVS</a></li>
</ul>
<a name="fileupgrade">
<h3>CVS Upgrade</h3>
<p>
If you have not yet set yourself up for LON-CAPA CVS, please see the
section <a href="#setting">"Setting yourself up for LON-CAPA CVS"</a>.
</p>
<p>
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
<a href="#status">Viewing the status of your machine</a>.
</p>
<p>
Assuming that you have set yourself up for LON-CAPA CVS, periodically
upgrading your system is a simple process.
</p>
<table border>
<tr><td><b>Steps</b></td><td><b>Commands</b></td></tr>
<tr><td>Make sure you are logged in for CVS</td>
<td>export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs
<br />cvs login</td></tr>
<tr><td>Go to your repository directory</td><td>cd loncapa</td></tr>
<tr><td>Update your CVS sources</td><td>cvs update -d -r STABLE</td></tr>
<tr><td>Go to the build directory</td><td>cd loncom/build</td></tr>
<tr><td>Become 'root'</td><td>su</td></tr>
<tr><td>Install/update static files</td><td>make install</td></tr>
<tr><td>Install/update dynamically configurable files<br />
<i>this preserves the current settings of your machine, don't worry :)</i>
</td>
<td>make configinstall</td></tr>
<tr><td>Restart your web server<br />Due to an apache bug, you should
enter this command twice. Restarting the web server will
<ul>
<li>introduce changes made to /home/httpd/lib/perl/Apache/*.pm files;</li>
<li>update user and group permissions if /etc/passwd or /etc/group change.</li>
</ul>
</td>
<td>/etc/rc.d/init.d/httpd restart
<br />/etc/rc.d/init.d/httpd restart</td></tr>
<tr><td>Restart the lonc/lond processes<br />Be patient (this takes several minutes).</td>
<td>/etc/rc.d/init.d/loncontrol restart</td></tr>
<tr><td colspan=2>After CVS logging in, you can always cut and paste this line
below assuming you do everything as root :)<br />
<tt>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
</tt></td></tr>
</table>
<p>
It may be also advisable to test your system after an upgrade if there are
critical tasks it is being used for.
</p>
<p>
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.
</p>
<a name="rpm">
<h3>RPM Upgrade</h3>
<p>
BE CAREFUL. READ THIS STUFF.
</p>
<p>WARNINGS:
<ul>
<li>Do not ever install or upgrade an LON-CAPA-base RPM. You will
lose important configuration information on your machine. The CVS upgrade
is much safer and more effective in bringing you up to date.</li>
<li>Do not ever install or upgrade a LON-CAPA-setup RPM. You will lose
information from your /etc/group, /etc/passwd, and other important files.</li>
<li>Be careful about installing a LON-CAPA-mysql RPM. You need to run
/home/httpd/perl/searchcat.pl after this to re-seed your metadata database.
<li>Don't upgrade/install/delete your kernel RPM unless you have done
it before.
</li>
</ul>
<p>
There are four things involved in an RPM upgrade:
</p>
<ol>
<li>Gaining information about the RPMs on your system.</li>
<li>Upgrade existing RPMS from a trusted source</li>
<li>Remove RPMs which do not belong</li>
<li>Add new RPMs</li>
</ol>
<p>
<b>Gaining information about the RPMs on your system:</b>
"make rpmstatuspost"
(see <a href="#status">Viewing the status of your machine</a>)
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.
</p>
<p>
<b>Upgrade existing RPMS from a trusted source:</b>
RPMs are currently available at
<blockquote>
http://install.lon-capa.org/3.1/currentcdsource/RedHat/RPMS
</blockquote>
For example, to upgrade your LON-CAPA-systemperl RPM, you
would enter commands like
<blockquote>
wget http://install.lon-capa.org/3.1/currentcdsource/RedHat/RPMS/LON-CAPA-systemperl-3.1-1.i386.rpm<br />
(then as root) rpm -Uvh --force LON-CAPA-systemperl-3.1-1.i386.rpm
</blockquote>
</p>
<p>
<b>Remove RPMs which do not belong:</b>
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.
<blockquote>
rpm -e --nodeps apmd-3.0final-2.i386.rpm
</blockquote>
</p>
<p>
<b>Add new RPMs:</b>
Use the same command as for upgrading.
<blockquote>
(as root) rpm -Uvh --force icewm-1.0.5-gnome.i386.rpm
</blockquote>
We often use icewm as our development machine window manager given the
RedHat 6.2 bugs involving enlightenment and gnome.
</p>
<a name="status">
<h3>Viewing the status of your machine</h3>
<p>
</p>
<table border>
<tr><td><b>Steps</b></td><td><b>Commands</b></td></tr>
<tr><td>Make sure you are logged in for CVS</td>
<td>export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs
<br />cvs login</td></tr>
<tr><td>Go to your repository directory</td><td>cd loncapa</td></tr>
<tr><td>Update your CVS sources</td><td>cvs update -d -r STABLE</td></tr>
<tr><td>Go to the build directory</td><td>cd loncom/build</td></tr>
<tr><td>Become 'root'</td><td>su</td></tr>
<tr><td>View the CVS source->install status of your machine</td><td>make statuspost
<br /> then visit http://MACHINENAME/lon-status/filestatus.html</td></tr>
</td></tr>
<tr><td>View the RPM status of your machine
</td>
<td>make rpmstatuspost<br />
then visit http://MACHINENAME/lon-status/rpmstatus.html</td>
</table>
<a name="setting">
<h3>Setting yourself up for CVS</h3>
<p>
These instructions assume bash (as opposed to tcsh).
</p>
<p>
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.
</p>
<p>
The straightforward way to enable CVS is to manually configure your
environment and log in:
<blockquote>
export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs
<br />
cvs login
</blockquote>
</p>
<p>
You can also modify your shell environment (.bash_profile and .bash_logout).
<blockquote>
The commands:<br />
<b>export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs</b>
<br />
<b>cvs login</b>
<br />
can be appended to ~/.bash_profile.
<br />
"<b>cvs logout</b>" can be appended to ~/.bash_logout
</blockquote>
</p>
<p>
To check out LON-CAPA, go to any writeable directory and type:
<blockquote>cvs co loncapa</blockquote>
</p>
<p>
This will create a directory tree similar to:
<pre>
loncapa_________CAPA
|
|_____loncom
|
|_____doc
|
|_____rat
|
\_____packaging
</pre>
</p>
<p>
Useful commands are:
</p>
<table border=1>
<tr><td>Command</td></td><td>Description</td></tr>
<tr><td>info cvs</td></td><td>doc's</td></tr>
<tr><td>cvs log FILENAME</td></td><td>see what's happened with a file</td></tr>
<tr><td>cvs update -d -r STABLE</td></td><td>update your CVS tree from the
current directory location</td></tr>
</table>
</body>
</html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>