gen_rpmlists
This script runs on a webserver machine, generating lists of available rpms for one or more Red Hat distributions, and places them in a web-accessible area. Only the "newest" RPM for a given name/architecture pair in the distribution is included in the list. Such lists are typically downloaded by clients so they can decide what RPMs they can install or need to upgrade.
The format for each list is plain text in the format:
url name version release architecture
For example:
http://tautology.unh.edu/linux/shrike/RPMS/bison-1.35-6.i386.rpm bison 1.35 6 i386
The script makes a number of hardwired assumptions about the directory setup on the webserver. In our case:
The currently on-line distribution names (e.g., shrike, psyche, and valhalla) are also hardwired into the script; the script is dinked when distributions are added or dropped.
The script traverses the subdirectories (with the Perl File::Find package) looking for *.rpm files. Version and release strings are compared through the traversal, and only the "newest" RPM for a given package name and architecture is "remembered.". When the traversal is complete, the list is dumped out into the corresponding file.
Last modified: June 29 2003 21:03 EDT
Paul A. Sand, pas@unh.edu