[LON-CAPA-cvs] cvs: loncom /build readme.html
harris41
lon-capa-cvs@mail.lon-capa.org
Sat, 27 Apr 2002 16:23:40 -0000
This is a MIME encoded message
--harris411019924620
Content-Type: text/plain
harris41 Sat Apr 27 12:23:40 2002 EDT
Modified files:
/loncom/build readme.html
Log:
up to date
--harris411019924620
Content-Type: text/plain
Content-Disposition: attachment; filename="harris41-20020427122340.txt"
Index: loncom/build/readme.html
diff -u loncom/build/readme.html:1.16 loncom/build/readme.html:1.17
--- loncom/build/readme.html:1.16 Wed Jan 17 08:50:47 2001
+++ loncom/build/readme.html Sat Apr 27 12:23:40 2002
@@ -1,204 +1,409 @@
-<HTML>
-<HEAD>
-<META NAME="GENERATOR" CONTENT="Scott Harrison and Emacs Version 3.14159265358979">
-<TITLE>LON-CAPA Software Developer Instructions</TITLE>
-</HEAD>
-<BODY>
-<H1>LON-CAPA Software Developer Instructions</H1>
-<BR><I>Written by Scott Harrison, January 17, 2001</I>
-<BR><I>Last updated, January 17, 2001</I>
-<OL>
-<LI><A HREF="#Using_CVS">Using CVS</A>
-<UL>
-<LI><A HREF="#cvslog">Logging in and out (cvs login; cvs logout)</A>
-<LI><A HREF="#cvsget">Getting files (cvs update -d)</A>
-<LI><A HREF="#cvsupdate">Updating files (cvs update -d)</A>
-<LI><A HREF="#cvssave">Saving files (cvs commit)</A>
-<LI><A HREF="#cvsadd">Adding files (cvs add)</A>
-<LI><A HREF="#cvsadddir">Adding directories (cvs add/import)</A>
-<LI><A HREF="#cvsnotsure">What to do when you're not sure about your files (cvs update)</A>
-</UL>
-<LI><A HREF="#makeHTML">Viewing the software (make HTML)</A>
-<LI><A HREF="#makebuild">Compiling the software (make build)</A>
-<LI><A HREF="#loncapafiles">Adding/removing files from the LON-CAPA installation (doc/loncapafiles/loncapafiles.html)</A>
-<LI><A HREF="#configversusnonconfig">Configurable files versus non-configurable files</A>
-<LI><A HREF="#makeinstall">Updating the non-configurable files on your machine (make install)</A>
-<LI><A HREF="#makeconfiginstall">Updating the configurable files on your machine (make configinstall)</A>
-<LI><A HREF="#makeRPM">Building RPMs (make RPM)</A>
-</OL>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<!-- The LearningOnline Network with CAPA -->
+<!-- $Id: readme.html,v 1.17 2002/04/27 16:23:40 harris41 Exp $ -->
+<html>
+<head>
+<meta name="GENERATOR"
+ content="Scott Harrison and Emacs Version 3.14159265358979" />
+<title>LON-CAPA Software Developer Instructions</title>
+</head>
+<body>
+<h1>LON-CAPA Software Developer Instructions</h1>
+<p>
+<br /><i>Written by Scott Harrison, January 17, 2001</i>
+<br /><i>Last updated, April 27, 2002</i>
+</p>
+<ol>
+<li><a href="#Using_CVS">Using CVS</a></li>
+<ul>
+<li><a href="#cvslog">Logging in and out (cvs login; cvs logout)</a></li>
+<li><a href="#cvsupdate">Updating files (cvs update -d)</a></li>
+<li><a href="#cvssave">Saving files (cvs commit)</a></li>
+<li><a href="#cvsadd">Adding files (cvs add)</a></li>
+<li><a href="#cvsadddir">Adding directories (cvs add/import)</a></li>
+<li><a href="#cvsnotsure">What to do when you're not sure about your files
+(cvs update)</a></li>
+</ul>
+<li><a href="#makeHTML">Viewing the software (make HTML)</a></li>
+<li><a href="#makebuild">Compiling the software (make build)</a></li>
+<li><a href="#loncapafiles">Adding/removing files from the LON-CAPA
+installation (doc/loncapafiles/loncapafiles.lpml)</a></li>
+<li><a href="#configversusnonconfig">Configurable files versus
+non-configurable files</a></li>
+<li><a href="#makeinstall">Updating the non-configurable files on your
+machine (make install)</a></li>
+<li><a href="#makeconfiginstall">Updating the configurable files on your
+machine (make configinstall)</a></li>
+<li><a href="#makeRPM">Building RPMs (make RPM)</a></li>
+</ol>
-<OL>
-<A NAME="Using_CVS">
-<LI><H2>Using CVS</H2>
-<UL>
-<LI><A NAME="cvslog">
- <H3>Using CVS: Logging in and out (cvs login; cvs logout)</H3>
-<LI><A NAME="cvsget">
- <H3>Using CVS: Getting files (cvs update -d)</H3>
-<LI><A NAME="cvsupdate">
- <H3>Using CVS: Updating files (cvs update -d)</H3>
-<LI><A NAME="cvssave">
- <H3>Using CVS: Saving files (cvs commit)</H3>
-<LI><A NAME="cvsadd">
- <H3>Using CVS: Adding files (cvs add)</H3>
-<LI><A NAME="cvsadddir">
- <H3>Using CVS: Adding directories (cvs add/import)</H3>
-<LI><A NAME="cvsnotsure">
- <H3>Using CVS: What to do when you're not sure about your files (cvs update)</H3>
-</UL>
-<LI><A NAME="makeHTML">
- <H2>Viewing the software (make HTML)</H2>
-<STRONG>Commands</STRONG>
-<FONT COLOR="#008800">
-<PRE>
+<ol>
+<a name="Using_CVS" />
+<li><h2>Using CVS</h2></li>
+These instructions assume that you are using a Linux or UNIX based
+terminal.
+<ul>
+<li><a name="cvslog" />
+ <h3>Using CVS: Logging in and out (cvs login; cvs logout)</h3>
+<p>
+To log into CVS, CVS needs to be part of your system environment.
+You can accomplish this by:
+<font color="#008800">
+<pre>
+export CVSROOT=:pserver:USERNAME@install.lon-capa.org:/home/cvs
+</pre>
+</font>
+</p>
+<p>
+To actually login, you will need to execute the following command:
+<font color="#008800">
+<pre>
+cvs login
+</pre>
+</font>
+You will be prompted for a password.
+If you do not have a password, or the password is not working, you
+should contact <a href="mailto:helen@lon-capa.org">helen@lon-capa.org</a>
+</p>
+<p>
+If you have yet to check out the CVS repository, you can use the
+<tt>checkout</tt> command. (Otherwise, just enter your
+CVS repository, <tt>cd loncapa</tt>.)
+<font color="#008800">
+<pre>
+cvs checkout loncapa
+cd loncapa
+</pre>
+</font>
+</p>
+<p>After you have completed your work with the CVS repository, it
+is recommended that you log out:
+<font color="#008800">
+<pre>
+cvs logout
+</pre>
+</font>
+</p>
+</li>
+<li><a name="cvsupdate" />
+ <h3>Using CVS: Updating files (cvs update -d)</h3>
+<p>
+After entering your CVS source tree (<tt>cd loncapa</tt>),
+you should frequently update the software changes that
+programmers other than yourself have made. This is done
+with the <tt>update</tt> command.
+<font color="#008800">
+<pre>
+cvs update -d
+</pre>
+</font>
+</p>
+<p>
+The <tt>cvs update</tt> command will give you output
+as it updates your CVS source tree. Commonly you will
+see 'U' and 'P' which indicate that a file has been updated with
+changes another programmer has made.
+<font color="#880000">
+<pre>
+`U FILE'
+ The file was brought up to date with respect to the repository.
+ This is done for any file that exists in the repository but not in
+ your source, and for files that you haven't changed but are not
+ the most recent versions available in the repository.
+
+`P FILE'
+ Like `U', but the CVS server sends a patch instead of an entire
+ file. These two things accomplish the same thing.
+</pre>
+</font>
+</p>
+<p>
+Usually, when you do not <tt>cvs commit</tt> the code changes that you
+make, the <tt>update</tt> command will tell you that you have modified
+your file with the 'M' flag.
+<font color="#880000">
+<pre>
+`M FILE'
+ The file is modified in your working directory. This is probably
+ based on changes you made and have not yet "cvs commit"-ed.
+</pre>
+</font>
+Sometimes, it will occur that:
+<ul>
+<li>you have modified a file and not yet committed it</li>
+<li>someone else *has* modified a file and *has* committed it</li>
+</ul>
+Generally speaking, this is <strong>your</strong> fault. It is your
+responsibility to resolve conflicts. <tt>cvs update</tt> informs
+you of a conflict with the 'C' flag.
+<font color="#880000">
+<pre>
+`C FILE'
+ A conflict was detected while trying to merge your changes to FILE
+ with changes from the source repository.
+</pre>
+</font>
+You will need to open the file and examine it; CVS will have added in
+markup tags like "<<<<<<" to tell you about the merging
+conflicts. (Sometimes, CVS will intelligently merge in other changes and
+give you the 'M' flag, but many times you will have to manually edit
+the file as just described.)
+</p>
+</li>
+<li><a name="cvssave" />
+ <h3>Using CVS: Saving files (cvs commit)</h3>
+<p>
+<tt>cvs commit</tt> works to submit changes to an <strong>existing</strong>
+file within the repository. If a file does not currently exist, then you
+will first need to <tt>cvs add</tt> it as described in the following
+section.
+</p>
+Running the <tt>cvs commit</tt> command without passing it an argument will
+commit all changes that you have within the current directory and
+subdirectories.
+<font color="#008800">
+<pre>
+cvs commit
+</pre>
+</font>
+</p>
+<p>
+A more precise approach to using <tt>cvs commit</tt> is to pass it specific
+file names. (Usually you should do this.)
+<font color="#008800">
+<pre>
+cvs commit FILENAME
+</pre>
+</font>
+</p>
+<p>
+Note that CVS typically invokes the <tt>vi</tt> editor and solicits comments
+about your latest changes to the software. Your comments should be
+both short yet uniquely descriptive. For example:
+<ul>
+<li><strong>BAD</strong> - "made some changes and am drinking soda"</li>
+<li><strong>GOOD</strong> - "implemented syntax checking of perl scripts
+with -c flag"</li>
+</ul>
+</p>
+</li>
+<li><a name="cvsadd" />
+ <h3>Using CVS: Adding files (cvs add)</h3>
+<p>
+<font color="#008800">
+<pre>
+cvs add FILENAME
+</pre>
+</font>
+</p>
+<p>
+Then you can run <tt>cvs commit FILENAME</tt> and this file will
+become an "official" part of LON-CAPA.
+</p>
+</li>
+<li><a name="cvsadddir" />
+ <h3>Using CVS: Adding directories (cvs add/import)</h3>
+<p>
+<font color="#008800">
+<pre>
+cvs add DIRECTORYNAME
+</pre>
+</font>
+</p>
+<p>
+There is no need to run <tt>cvs commit</tt>. Directories immediately
+become part of the LON-CAPA CVS source tree by only using the <tt>cvs add</tt>
+command.
+</p>
+</li>
+<li><a name="cvsnotsure" />
+ <h3>Using CVS: What to do when you're not sure about your files
+ (cvs update -d)</h3>
+<p>
+Every once in a while, multiple programmers may be working on the
+same file. Most conflicts are avoidable if everybody regularly
+<strong>commits</strong> their changes AND if everybody
+regularly <strong>updates</strong> the CVS source tree they are working on.
+</p>
+<p>
+In other words, if you are absent from programming for a few days, and
+<strong>fail</strong> to run <tt>cvs update -d</tt> on your CVS source
+repository, you have only yourself to blame if you find yourself writing
+code in a file that is not up-to-date.
+</p>
+</li>
+</ul>
+<li><a name="makeHTML" />
+ <h2>Viewing the software (make HTML)</h2></li>
+<strong>Commands</strong>
+<font color="#008800">
+<pre>
cd loncom/build
rm -Rf HTML <I>(or alternatively, "make clean")</I>
make HTML
cd HTML
<I>(look at the index.html file with a web browser such as Netscape)</I>
-</PRE>
-</FONT>
-<STRONG>General description of what happens</STRONG>
-<P>
+</pre>
+</font>
+<strong>General description of what happens</strong>
+<p>
This is the actual make target code.
-<FONT COLOR="#880000">
-<PRE>
+<font color="#880000">
+<pre>
<!-- LONCAPA MAKETARGET=HTML START -->
HTML:
- install -d HTML
- cp ../../doc/loncapafiles/*.gif HTML
- perl parse.pl ../../doc/loncapafiles/loncapafiles.html HTML > HTML/index.html
+ install -d HTML
+ cp $(SOURCE)/doc/loncapafiles/*.gif HTML
+ cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
+ perl lpml_parse.pl html development default "$(SOURCE)" '$(TARGET)' \
+ > HTML/index.html
<!-- LONCAPA MAKETARGET=HTML END -->
-</PRE>
-</FONT>
+</pre>
+</font>
What basically happens is that specially marked-up data in the LON-CAPA
-cvs repository file <TT>doc/loncapafiles.html</TT> is parsed into a more
-viewable format by <TT>loncom/build/parse.pl</TT>. The resulting
+cvs repository file <tt>doc/loncapafiles.lpml</tt> is parsed into a more
+viewable format by <tt>loncom/build/lpml_parse.pl</tt>. The resulting
file gives a very well organized view of all the files, directories,
links, ownerships, permissions, and brief documentation of what each
file does.
-</P>
-<LI><A NAME="makebuild">
- <H2>Compiling the software (make build)</H2>
-<STRONG>Commands</STRONG>
-<FONT COLOR="#008800">
-<PRE>
+</p>
+<li><a name="makebuild" />
+ <h2>Compiling the software (make build)</h2>
+<strong>Commands</strong>
+<font color="#008800">
+<pre>
cd loncom/build
make build
-</PRE>
-</FONT>
-<STRONG>General description of what happens</STRONG>
-<P>
+</pre>
+</font>
+<p>
+<strong>General description of what happens</strong>
+</p>
+<p>
This is the actual make target code.
-<FONT COLOR="#880000">
-<PRE>
+<font color="#880000">
+<pre>
<!-- LONCAPA MAKETARGET=build START -->
-build:
- perl parse.pl ../../doc/loncapafiles/loncapafiles.html build > Makefile.build
- make -f Makefile.build all
+build: Makefile.build pod2html.sh pod2man.sh
+ echo -n "" > WARNINGS
+ make -f Makefile.build all
+ make warningnote
+
+Makefile.build: $(SOURCE)/doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
+ cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
+ perl lpml_parse.pl build $(CATEGORY) $(DIST) "$(SOURCE)" "$(TARGET)" \
+ > Makefile.build
<!-- LONCAPA MAKETARGET=build END -->
-</PRE>
-</FONT>
-<TT>loncom/build/parse.pl</TT> reads in all the build information out
-of <TT>doc/loncapafiles/loncapafiles.html</TT>. A new Makefile named
-<TT>loncom/build/Makefile.build</TT> is dynamically constructed.
+</pre>
+</font>
+<tt>loncom/build/lpml_parse.pl</tt> reads in all the build information out
+of <tt>doc/loncapafiles/loncapafiles.lpml</tt>. A new Makefile named
+<tt>loncom/build/Makefile.build</tt> is dynamically constructed.
This dynamically generated Makefile is then run to build/compile
all the software targets from source. This currently takes 10 minutes
(depends on the speed of the machine you compile with).
-</P>
-<STRONG>Example</STRONG>
-<P>
-Here is information for one file <TT>tth.so</TT> provided in
-<TT>doc/loncapafiles/loncapafiles.html</TT>.
-<FONT COLOR="#330066">
-<PRE>
-<BR><METAGROUP>
-<BR><LONCAPA TYPE=LOCATION DIST="redhat6.2" SOURCE="loncom/modules/TexConvert/tthperl/tth.so" TARGET="usr/lib/perl5/site_perl/5.005/tth.so" CATEGORY="system file">
-<BR><DESCRIPTION>
-<BR>shared library file for dynamic loading and unloading of TeX-to-HTML functionality
-<BR></DESCRIPTION>
-<BR><BUILD>
-<BR>loncom/modules/TexConvert/tthperl/commands
-<BR></BUILD>
-<BR><DEPENDENCIES>
-<BR>../tthdynamic/tthfunc.c
-<BR>../ttmdynamic/ttmfunc.c
-<BR></DEPENDENCIES>
-</PRE>
-</FONT>
-<TT>loncom/build/parse.pl</TT> sees the <B>BUILD</B> tags and sets up
-a dynamic file <TT>Makefile.build</TT> to run the command inside the
-<B>BUILD</B> tags (currently, <B>DEPENDENCIES</B> is not used for anything
-besides documentation).
-</P>
-<P>
-Here is an example of a dynamically generated <TT>Makefile.build</TT>
-that builds two LON-CAPA files (one of which is <TT>tth.so</TT>).
-<FONT COLOR="#330066">
-<PRE>
+</p>
+<strong>Example</strong>
+<p>
+Here is information for one file <tt>tth.so</tt> provided in
+<tt>doc/loncapafiles/loncapafiles.lpml</tt>.
+<font color="#330066">
+<pre>
+<file>
+<source>loncom/homework/caparesponse/capa.so</source>
+<target dist='default'>usr/lib/perl5/site_perl/5.005/capa.so</target>
+<target dist='redhat7 redhat7.1'>usr/lib/perl5/site_perl/5.6.0/capa.so</target>
+<categoryname>system file</categoryname>
+<description>
+shared library file for dynamic loading and unloading
+</description>
+<build trigger='always run'>
+loncom/homework/caparesponse/commands
+</build>
+<dependencies>
+caparesponse.c;
+caparesponse.pm;
+README;
+Makefile.PL;
+capa.i;
+commands
+</dependencies>
+</file>
+</pre>
+</font>
+<tt>loncom/build/lpml_parse.pl</tt> sees the <b>build</b> tags and sets up
+a dynamic file <tt>Makefile.build</tt> to run the command inside the
+<b>build</b> tags. The files listed inside the <b>dependencies</b> tags
+are included in the <tt>Makefile.build</tt> so as to determine whether
+or not there is a need to compile.
+</p>
+<p>
+Here is an example of a dynamically generated <tt>Makefile.build</tt>
+that builds two LON-CAPA files (one of which is <tt>tth.so</tt>).
+<font color="#330066">
+<pre>
all: ../homework/caparesponse/capa.so ../modules/TexConvert/tthperl/tth.so
-../homework/caparesponse/capa.so: ../homework/caparesponse/caparesponse.c ../ho
-mework/caparesponse/caparesponse.pm alwaysrun
+../homework/caparesponse/capa.so: ../homework/caparesponse/caparesponse.c ../homework/caparesponse/caparesponse.pm alwaysrun
cd ../homework/caparesponse/; sh ./commands
-../modules/TexConvert/tthperl/tth.so: ../modules/TexConvert/tthperl/../tthdynam
-ic/tthfunc.c ../modules/TexConvert/tthperl/../ttmdynamic/ttmfunc.c
+../modules/TexConvert/tthperl/tth.so: ../modules/TexConvert/tthperl/../tthdynamic/tthfunc.c ../modules/TexConvert/tthperl/../ttmdynamic/ttmfunc.c
cd ../modules/TexConvert/tthperl/; sh ./commands
alwaysrun:
-</PRE>
-</FONT>
-</P>
-<LI><A NAME="loncapafiles">
- <H2>Adding/removing files from the LON-CAPA installation (doc/loncapafiles/loncapafiles.html)</H2>
-<STRONG>To add and remove (and alter)</STRONG>
-<P>
+</pre>
+</font>
+</p>
+</li><li><a name="loncapafiles" />
+ <h2>Adding/removing files from the LON-CAPA installation (doc/loncapafiles/loncapafiles.html)</h2>
+<strong>To add and remove (and alter)</strong>
+<p>
All that you have to do to alter the behavior of the installation is
-edit a single file (<TT>doc/loncapafiles/loncapafiles.html</TT>).
+edit a single file (<tt>doc/loncapafiles/loncapafiles.lpml</tt>).
Adding, removing, and altering files requires proper attention
to the syntax of file format of course.
-</P>
-<STRONG>File Format</STRONG>
+</p>
+<strong>File Format</strong>
<P>
-The preceding <A HREF=#"makebuild">"make build"</A> documentation
-gives an example <B>METAGROUP</B> entry describing one particular file.
-All data within <TT>loncapafiles.html</TT> is specified according
-to markup tags. The format and syntax of <TT>loncapafiles.html</TT>
+The preceding <a href=#"makebuild">"make build"</a> documentation
+gives an example of a <b>file</b> entry describing one particular file.
+All data within <tt>loncapafiles.lpml</tt> is specified according
+to markup tags. The format and syntax of <tt>loncapafiles.lpml</tt>
is currently best described by the HTML documentation code at the beginning of
loncapafiles.html (as well as, by example, seeing how various
information is coded). All in all, the syntax is quite simple.
-</P>
-<STRONG>Philosophy and notes (the thing nobody reads)</STRONG>
-<P>
+</p>
+<strong>Philosophy and notes (the thing nobody reads)</strong>
+<p>
Packaging the software from CVS onto a machine file system requires many
things:
-<UL>
-<LI>documenting every component of the software,
-<LI>handling CVS <U>source</U> to file system <U>target</U> information
-<LI>handling (according to a hierarchical scheme of grouping) file
-ownership and permissions,
-<LI>handling (according to a hierarchical scheme of grouping) directory
-ownership and permissions,
-<LI>handling symbolic links
-<LI>providing for multiple options of installation targets
-(RedHat versus Debian for instance),
-<LI>providing for different file ownerships and permissions to apply
-to the same file,
-<LI>allowing system software documentation to be automatically generated
-(see information on <A HREF="#makeHTML">"make html"</A>),
-<LI>providing information in an easily adjustable form as new demands
-are made on the software packaging system,
-<LI>providing software package information (for RPM),
-<LI>having information in a format that allows for troubleshooting
-the current status of the machine file system,
-<LI>allow for changes to the structure of the CVS repository,
-<LI>and something that is simple enough for any one to immediately work with,
+<ul>
+<li>documenting every component of the software,</li>
+<li>handling CVS <u>source</u> to file system <u>target</u> information,</li>
+<li>handling (according to a hierarchical scheme of grouping) file
+ownership and permissions,</li>
+<li>handling (according to a hierarchical scheme of grouping) directory
+ownership and permissions,</li>
+<li>handling symbolic links,</li>
+<li>providing for multiple options of installation targets
+(RedHat versus Debian for instance),</li>
+<li>providing for different file ownerships and permissions to apply
+to the same file,</li>
+<li>allowing system software documentation to be automatically generated
+(see information on <a href="#makeHTML">"make html"</a>),</li>
+<li>providing information in an easily adjustable form as new demands
+are made on the software packaging system,</li>
+<li>providing software package information (for RPM),</li>
+<li>having information in a format that allows for troubleshooting
+the current status of the machine file system,</li>
+<li>allow for changes to the structure of the CVS repository,</li>
+<li>and something that is simple enough for any one to immediately work with,
without having to learn specifics (or hidden traps) of complicated Makefile's
-or a new macro language (m4?).
-</UL>
-</P>
-<P>
+or a new macro language (m4?).</li>
+</ul>
+</p>
+<p>
I looked into, and tried, different ways of accomplishing the above
including automake and recursive make. The automake system seemed quite
complicated (and needlessly so in terms of this project since, by and large,
@@ -209,50 +414,51 @@
between all the things that must be done to keep software packaging
up to date. A particularly convincing article I found when looking into
much of this was
-<A HREF="http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html">
-"Recursive Make Considered Harmful" by Peter Miller</A>. Complicating
+<a href="http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html">
+"Recursive Make Considered Harmful" by Peter Miller</a>. Complicating
matters was, at the time, it was unclear as to what categories
of software files we had, and whether or not the directory structure
of CVS would remain constant. With an ever-developing directory structure
to CVS, I preferred to organize the information on a per-file basis
as opposed to a per-directory basis (although there is a successful
-implementation of a standard big Makefile in <TT>loncom/Makefile</TT>).
+implementation of a standard big Makefile in <tt>loncom/Makefile</tt>).
Additionally, a standard big Makefile assumes certain "normalcy" to
the directory structure of different potential operating system directories
(RedHat vs. Debian).
-</P>
-<P>
-If you take time to look at loncapafiles.html
-(and perhaps run the <A HREF="#makeHTML">make HTML</A> command)
+</p>
+<p>
+If you take time to look at loncapafiles.lpml
+(and perhaps run the <a href="#makeHTML">make HTML</a> command)
you will find that the organizing information according to the markup
-syntax in <TT>loncapafiles.html</TT> is simple. Simple is good.
-</P>
-<P>
-<TT>loncom/build/parse.pl</TT> is the script (invoked automatically
-by the various targets in <TT>loncom/build/Makefile</TT>) that reads
-<TT>doc/loncapafiles/loncapafiles.html</TT>. <TT>parse.pl</TT>
+syntax in <tt>loncapafiles.lpml</tt> is simple. Simple is good.
+</p>
+<p>
+<tt>loncom/build/lpml_parse.pl</tt> is the script (invoked automatically
+by the various targets in <tt>loncom/build/Makefile</tt>) that reads
+<tt>doc/loncapafiles/loncapafiles.lpml</tt>. <tt>lpml_parse.pl</tt>
is capable of reading and returning different types of information
-from <TT>loncapafiles.html</TT> depending on how <TT>parse.pl</TT>
-is invoked. <TT>parse.pl</TT> has yet to have introduced new sources
+from <tt>loncapafiles.lpml</tt> depending on how <tt>lpml_parse.pl</tt>
+is invoked. <tt>lpml_parse.pl</tt> has yet to have introduced new sources
of error, and has been tested in quite a number of ways. As with
any parser however, I remain paranoid.
-</P>
-<P>
-My regrets with the current system is that <TT>parse.pl</TT> is
-slow (can take 1 minute to run) and includes a few tidbits of code,
-specific to the make process, that probably should be in
-<TT>loncom/build/Makefile</TT>. Additionally, <TT>loncapafiles.html</TT>
-should have a DTD and all those other good SGML-ish things (and parsing
-should be done with a real SGML-derived parser).
-</P>
-<P>
-On the plus side, the <TT>parse.pl</TT>-<TT>loncapafiles.html</TT>
+</p>
+<p>
+<tt>lpml_parse.pl</tt> is very fast and styled after a state-based SAX-like
+approach. Additionally, <tt>loncapafiles.lpml</tt> has a
+DTD (loncom/build/lpml.dtd) against which it is valid.
+I would like to use more ENTITY's inside <tt>lpml.dtd</tt> but currently
+Perl XML modules available at CPAN do not digest complex ENTITY's that well.
+</p>
+<p>
+The <tt>lpml_parse.pl</tt>-<tt>loncapafiles.lpml</tt>
combination has been working very efficiently and error-free.
-</P>
-<LI><A NAME="configversusnonconfig">
- <H2>Configurable files versus non-configurable files</H2>
-<STRONG>Machine-specific information is the difference</STRONG>
-<P>
+</p>
+</li><li><a name="configversusnonconfig" />
+ <h2>Configurable files versus non-configurable files</h2>
+<p>
+<strong>Machine-specific information is the difference</strong>
+</p>
+<p>
The current list of configurable files for the LON-CAPA system is
/etc/httpd/access.conf, /etc/smb.conf, /etc/ntp.conf, /etc/krb.conf,
/etc/atalk/config, /etc/ntp/step-tickers,
@@ -260,51 +466,64 @@
/home/httpd/html/res/adm/includes/un_keyword.tab,
/home/httpd/hosts.tab, and
/home/httpd/spare.tab.
-</P>
-<P>
+</p>
+<p>
All of these configurable files contain machine-specific information.
For instance, the LON-CAPA system relies on unique host IDs such
as msua3, s1, s2, msul1, and 103a1 (specified as a "PerlSetVar lonHostID"
field within /etc/httpd/access.conf).
Non-configurable files simply do NOT have machine-specific information.
-<STRONG>The impact on updating software</STRONG>
-<P>
+<strong>The impact on updating software</strong>
+<p>
What this means in terms of software updating is that
-<UL>
-<LI>non-configurable files can be simply overwritten with newer versions
-(without "anything" else to worry about),
-<LI>and configurable files must follow these steps to be safely overwritten
-<OL>
-<LI>have their machine specific information saved,
-<LI>be overwritten, and then
-<LI>have their machine specific information restored.
-</OL>
-</UL>
-</P>
-<LI><A NAME="makeinstall">
- <H2>Updating the non-configurable files on your machine (make install)</H2>
-<STRONG>Commands</STRONG>
-<FONT COLOR="#008800">
-<PRE>
+<ul>
+<li>non-configurable files can be simply overwritten with newer versions
+(without "anything" else to worry about),</li>
+<li>and configurable files must follow these steps to be safely
+overwritten</li>
+<ol>
+<li>have their machine specific information saved,</li>
+<li>be overwritten, and then</li>
+<li>have their machine specific information restored.</li>
+</ol>
+</ul>
+</p>
+<li><a name="makeinstall" />
+ <h2>Updating the non-configurable files on your machine (make install)</h2>
+<strong>Commands</strong>
+<font color="#008800">
+<pre>
cd loncom/build
make install
-</PRE>
-</FONT>
-<STRONG>General description of what happens</STRONG>
-<P>
+</pre>
+</font>
+<p>
+<strong>General description of what happens</strong>
+</p>
+<p>
This is the actual make target code.
-<FONT COLOR="#880000">
-<PRE>
+<font color="#880000">
+<pre>
<!-- LONCAPA MAKETARGET=install START -->
-install: build
- perl parse.pl ../../doc/loncapafiles/loncapafiles.html install > Makefil
-e.install
- make -f Makefile.install SOURCE="../.." TARGET="" directories
- make -f Makefile.install SOURCE="../.." TARGET="" files
- make -f Makefile.install SOURCE="../.." TARGET="" links
+install: TEST_hosts_tab Makefile.install Makefile
+ echo -n "" > WARNINGS
+ make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
+ directories
+ make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" files
+ make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" links
+ make SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
+ NORESTORECONF="$(NORESTORECONF)" configinstall
+ make postinstall
+ make warningnote
+ echo "You can run 'make test' to see if your system is ready to go!"
+
+Makefile.install: $(SOURCE)/doc/loncapafiles/loncapafiles.lpml lpml_parse.pl
+ cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
+ perl lpml_parse.pl install $(CATEGORY) $(DIST) "$(SOURCE)" \
+ "$(TARGET)" > Makefile.install
<!-- LONCAPA MAKETARGET=install END -->
-</PRE>
-</FONT>
+</pre>
+</font>
For safety reasons (so as to not mess up a machine's configuration),
configuration files are NOT installed during this step. This means
that files such as /etc/httpd/access.conf, /etc/smb.conf, /etc/atalk/config,
@@ -312,21 +531,21 @@
/home/httpd/spare.tab are not overwritten, but remain as old, non-updated
copies. (To automatically update these files and save/restore
their encoded machine configuration, you must run "make configinstall").
-</P>
-<LI><A NAME="makeconfiginstall">
- <H2>Updating the configurable files on your machine (make configinstall)</H2>
-<STRONG>Commands</STRONG>
-<FONT COLOR="#008800">
-<PRE>
+</p>
+<li><a name="makeconfiginstall" />
+ <h2>Updating the configurable files on your machine (make configinstall)</h2>
+<strong>Commands</strong>
+<font color="#008800">
+<pre>
cd loncom/build
make configinstall
-</PRE>
-</FONT>
-<STRONG>General description of what happens</STRONG>
-<P>
+</pre>
+</font>
+<strong>General description of what happens</strong>
+<p>
This is the actual make target code.
-<FONT COLOR="#880000">
-<PRE>
+<font color="#880000">
+<pre>
<!-- LONCAPA MAKETARGET=configinstall START -->
configinstall:
# there is a dependency on having directories in place, but oh well...
@@ -335,81 +554,94 @@
perl loncaparestoreconfigurations lasttimestamp
make -f Makefile.configinstall TARGET="" configpermissions
<!-- LONCAPA MAKETARGET=configinstall END -->
-</PRE>
-</FONT>
+</pre>
+</font>
Configuration files are installed during this step. This means
that files such as /etc/httpd/access.conf, /etc/smb.conf, /etc/atalk/config,
/home/httpd/html/res/adm/includes/copyright.tab, and
/home/httpd/spare.tab are overwritten. Before being overwritten,
a backup copy is made though. Information is read out of these
backup copies and restored to the new files by the
-<TT>loncaparestoreconfigurations</TT> script. To ensure that
+<tt>loncaparestoreconfigurations</tt> script. To ensure that
new file permissions and ownerships are installed, a final set of
-<TT>chown</TT> and <TT>chmod</TT> commands are called for each of
+<tt>chown</tt> and <tt>chmod</tt> commands are called for each of
the configuration files.
-</P>
-<STRONG>For the truly paranoid</STRONG>
-<P>
+</p>
+<p>
+<strong>For the truly paranoid</strong>
+</p>
+<p>
If you are truly paranoid, you can just make the
-<TT>Makefile.configinstall</TT> file and then save, copy,
+<tt>Makefile.configinstall</tt> file and then save, copy,
and restore all the configuration values yourself.
-<TT>loncaparestoreconfigurations</TT> is pretty smart though, has yet to
-fail, and besides, a backup copy is always made (time-stamped so that backup
-copies are not overwritten).
-</P>
-<LI><A NAME="makeRPM">
- <H2>Building RPMs (make RPM)</H2>
-<STRONG>Commands</STRONG>
-<FONT COLOR="#008800">
-<PRE>
+<tt>loncaparestoreconfigurations</tt> is pretty smart though, has yet to
+fail, and besides, when needed backup copies are made.
+</p>
+<li><a name="makeRPM" />
+ <h2>Building RPMs (make RPM)</h2>
+<strong>Commands</strong>
+<font color="#008800">
+<pre>
cd loncom/build
rm -Rf BinaryRoot <I>(or alternatively, "make clean")</I>
make RPM
<I>(to subsequently install, you can type commands like
"rpm -Uvh --force LON-CAPA-base-3.1-1.i386.rpm")</I>
-</PRE>
-</FONT>
-</P>
-<STRONG>WARNING!!!!!!!!!!!!!!</STRONG>
-<P>
+</pre>
+</font>
+</p>
+<strong>WARNING!!!!!!!!!!!!!!</strong>
+<p>
Never never never never never manually install the
LON-CAPA-setup-3.1-1.i386.rpm. This RPM is meant to only be
installed by the CD installation process (it wipes out
the existing /etc/passwd file).
-</P>
-<STRONG>Configuration files</STRONG>
-<P>
+</p>
+<p>
+<strong>Configuration files</strong>
+</p>
+<p>
Configuration files are automatically saved with the file suffix
-".rpmsave". So <TT>/etc/httpd/conf/access.conf</TT> is saved as
-<TT>/etc/httpd/conf/access.conf.rpmsave</TT>. You can restore
+".rpmsave". So <tt>/etc/httpd/conf/access.conf</tt> is saved as
+<tt>/etc/httpd/conf/access.conf.rpmsave</tt>. You can restore
the machine-specific configuration information by running
-the <TT>/usr/sbin/loncaparestoreconfigurations</TT>. However,
-a <B>warning</B> is important here. If you install an RPM twice
+the <tt>/usr/sbin/loncaparestoreconfigurations</tt>. However,
+a <b>warning</b> is important here. If you install an RPM twice
without restoring your configuration, you will overwrite the
".rpmsave" files.
-</P>
-<STRONG>General description of what happens</STRONG>
-<P>
+</p>
+<p>
+<strong>General description of what happens</strong>
+</p>
+<p>
This is the actual make target code.
-<FONT COLOR="#880000">
-<PRE>
+<font color="#880000">
+<pre>
<!-- LONCAPA MAKETARGET=RPM START -->
-RPM: BinaryRoot
- cat base_file_list.txt | perl make_rpm.pl base 3.1 '' '' BinaryRoot
- cat setup_file_list.txt | perl make_rpm.pl setup 3.1 '' '' BinaryRoot
+RPM: BinaryRoot base_rpm_file_list
+ cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
+ perl lpml_parse.pl make_rpm $(CATEGORY) $(DIST) $(SOURCE) $(TARGET) \
+ > base_customizerpm.xml
+ cat base_rpm_file_list.txt | perl make_rpm.pl base 3.2 '' '' \
+ BinaryRoot base_customizerpm.xml
+
+BinaryRoot: base_rpm_file_list
+ make TARGET='BinaryRoot' NORESTORECONF='1' install
-BinaryRoot:
- perl parse.pl ../../doc/loncapafiles/loncapafiles.html BinaryRoot
+base_rpm_file_list:
+ cat $(SOURCE)/doc/loncapafiles/loncapafiles.lpml | \
+ perl lpml_parse.pl rpm_file_list $(CATEGORY) $(DIST) $(SOURCE) \
+ 'BinaryRoot' | sort > base_rpm_file_list.txt
<!-- LONCAPA MAKETARGET=RPM END -->
-</PRE>
-</FONT>
-A <TT>BinaryRoot</TT> directory is generated that reflects the locations,
+</pre>
+</font>
+A <tt>BinaryRoot</tt> directory is generated that reflects the locations,
ownerships, permissions, and contents for all the CVS source
files, compiled binaries, directories, and links as they should eventually
occur on the '/' filesystem location.
-</P>
-<P>
-<TT>loncom/build/make_rpm.pl</TT> is robust (tested over the
+</p>
+<p>
+<tt>loncom/build/make_rpm.pl</tt> is robust (tested over the
span of months) and, unlike other automated RPM-builders, cleanly
builds new RPMs without any after-effect of temporary files left
on the system. (On the negative side, there are a number of
@@ -417,10 +649,10 @@
the sake of reusability, should eventually be removed). Two new RPMs
are generated: LON-CAPA-base-3.1-1.i386 and LON-CAPA-setup-3.1-1.i386.rpm
(again, never manually install LON-CAPA-setup-3.1-1.i386.rpm).
-</P>
-</OL>
-</BODY>
-</HTML>
+</p>
+</ol>
+</body>
+</html>
--harris411019924620--