			RPM Automatic Update Tool
			Frank Sweetser <rasmusin@blee.net>


1. What is it?

rpm-updates is a tool for system administrators who need to distribute
updates to a number of different machines, but don't have the time to sit
down and do each and every one by hand.  It is mean to be run from a cron
job nightly, or from the command line.  It's written entirely in perl to
make it easier to use in a heterogeneous environment.  Sure, it's not a
big or complex thing to write, but this is geared towards those who don't
have even that much free time :)

2. How does it do it's job?

When first launched, it reads it's config file either as it's first
argument from the command line (it currently does not accept any other
command line arguments) or from /etc/rpm-updates.conf  This is a simple
perl file which is require'ed from the script.  It then contacts the host 
$rpm_index_host, and grabs the file the index file, either $prefered_file 
(typically updatelist.default) or $default_file (typically 
updateslist.$HOSTNAME).  It then parses the file, and updates each rpm 
listing therein only if an older version of the rpm is already installed.
If the system does not have the rpm installed at all, it will not install
it, only if there's already a version installed.

Exactly how it grabs the config file and rpm files from the ftp servers
depends on how it's configured.  If you have the Net::FTP module,
uncomment the relevant two lines from near the top of the rpm-updates.conf
file.  It will use one ftp connection to grab the index file, and another
single connection to grab all of the rpm files.  This is done in the hopes
of minimizing the load on the ftp server, since there may be 30-40 (or
more!) machines hitting the ftp server at once potentially.  Because of
this, using the Net::FTP module is the reccomended method.

If, on the other hand, you don't have the Net::FTP module installed, you
may comment out the relevant lines, and define instead $ftp_cmd to a
command which will accept url's in the
ftp://username:passwd@hostname/path/file format, such as ncftp.  It will
use this command to retreive the index file, and retrieve all rpm files
using rpm's ability to understand the ftp://.... format.

3. The Index File

This is a simple file, one rpm per line, two parts per line.  The first
part is the name of the rpm package, without any version information.
This part is required so that we may determine if the rpm is installed
already on the system, as there is no guaranteed way to figure out the
name of an rpm package from the file name - ncurses-1... and
ncurses-devel-1... both parse out to the same, more or less, so we take
the easy way out and have the admin stick in the file for us :^)  The
name should be whatever is returned by 
	rpm -qp --queryformat "%{NAME}" ./rpm_package.blah.rpm

The second field is the path to the actual rpm file on $update_rpms_host,
relative to $update_rpms_dir as seen through the ftp connection.

4. The Conf File

Defaults to /etc/rpm-updates.conf, or it may be specified on the command
line when the script is run.  Simple perl code that is require'ed from the
main script.  For those who don't know perl, comments are done with a '#'
at the beginning of the line, and all variable assignments are of the form
$var_name = $var_value;

The variables and their meaning:

Uncomment these two lines to enable use of the Net::FTP module.  If these
are commented out, it will use the $ftp_cmd to get the config file, and
rpm to get the rpm files.
	use Net::FTP;
	$have_ftp = 1;

The hostname from which to download the rpm files from.
	$update_rpms_host = "localhost";
The directory to cd into before getting the rpm files.  This must end with
a forward slash('/')!
	$update_rpms_dir = "/pub/rpm-updates/rpms/";

The host from which to grab the index file from.
	$update_index_host = "localhost";
The directory to cd into before getting the index files. This must end
with a forward slash('/')!
	$update_index_path = "/pub/rpm-updates/index/";

The default file to use if the prefered file can't be found.
	$default_file = "updatelist.default" ;
The prefered file to use.  This one will be tried before using the default
file.
	$prefered_file = "updatelist." . $ENV{'HOSTNAME'};

ftp client - must accept full url's to grab from, such as ncftp or wget.
only need to define it if you're not using Net::FTP
	$ftp_cmd = "ncftp";
username and password for ftp connection
	$login = "anonymous";
	$password = "updates\@" . $ENV{'HOSTNAME'};

uncomment this line to get some fairly verbose debuging info
printed out to standard error.
	$DEBUG = 1;



5. Boilerplate Stuff

For any questions, comments, etc, on this program, send them to Frank
Sweetser (me) at rasmusin@blee.net  Feel free to suggest any new features
you'd like, especially if they're accomanpied by context diffs ;)  For
info on perl hacking, check out www.perl.org, www.perl.com, and the
several excellent perl books by O'Reilly Publishers (www.ora.com).
