MAN page from Other freshrpms-0.7.3-1.noarch.rpm
freshrpms
Section: User Commands (1)
Updated: 31 Mar 1998
Index NAME
freshrpms - Fetch RPM packages from FTP servers which arenewer than the ones installed on your system (version 0.7.2)
SYNOPSIS
freshrpms{<option>}
DESCRIPTION
Freshrpms is a Perl5 script which fetches RPM packages from FTP servers whichversion numbers are higher than the ones installed on your system. freshrpmsdoes not install any RPMs by itself but makes use of the
rpmpackage manager program to determine which RPM packages are currentlyinstalled.
freshrpms requires Perl 5.004 and thelibnetpackage which does all the FTP work.
Freshrpms uses a configuration file to accomplish its taskwhich defines multiple FTP servers, directories to look for RPMs, localdownload directories and local archive directories for installedRPMs. It can also garbage collect local archived RPMs which are olderthan the currenly installed ones. freshrpms prints the names of thepackages which are newly retrieved. Exit status is non-zero if anysevere failures happen but not for FTP operation failures.
Freshrpms maybe used in either interactive mode (default) or inbatch mode (--batch). In interactive mode the user is asked for downloading. Then whiledownloading a progress indicator shows download percentage andspeed. In batch mode (or if freshrpms does not run in an interactiveshell) the user is not asked. No progress indicator is shown.
Freshrpms is able to reget an aborted download which means that ittakes up the download where it stopped on the last download.
After download Freshrpms check the package for a correct MD5 sum andpossibly a correct PGP signature. If something is wrong here thepackage is deleted to avoid corrupted downloads.
In order to run freshrpms you need to define a configuration file which is searched in this order from
*command line option-fconfig-file
* Environment variableFRESHRPMS
*$HOME/.freshrpms
*/usr/local/etc/freshrpms.conf
*/etc/freshrpms.conf
In addition to the config file freshrpms can also check for new RPMsby specifying FTP hosts and remote directories on the command line,eg.
- freshrpms ftp.redhat.com /pub/contrib/i386
checks if there are any newer RPMs in the RedHat contribdirectory compared against RPMs installed on your system andRPMs which exist in the current working directory.
By using the --not-installed or-Noption freshrpms checks for RPMs which arenotinstalled on your system, so freshrpms -N ftp.redhat.com /pub/contrib/i386will probably download you alot of new RPMs unless you use the--no-fetchor-noption which just shows what RPMs would be downloaded.
Now freshrpms can even do more :) It is your swiss army knife (borrowthat from perl :) in FTP upgrading your RPM system:
- freshrpms -M ftp.redhat.com /pub redhat-5.0
starts the "match mode" which will download you all newer RPMsinstalled on your system which can be found in any subdirectory calledredhat-5.0on the RedHat server. This would include eg.
- /pub/redhat/redhat-5.0/i386/RedHat/RPMSand
/pub/redhat/redhat-5.0/updates/i386
It does that by fetching thels-lRfile (possibly compressed) from the /pubdirectory on the FTP Server (caching it for oneday) and searches for directories which contain .rpmfiles for your local RPM machine architecture and the machineindependent noarcharchitecture. If you only like to listthe RPM directories found on stdout just enter freshrpms -M ftp.redhat.com and optionally pass the --list-rpmdirsor-Lflag to get all the RPM files found.
Now what's even more cool is that you can also make use of mirroredls-lR files on mirror sites. Consider you want to check for the newestKDE RPMs. Well, ftp.kde.org is always full so you want to check themirror host ftp.nvg.unit.no and the mirror directory /pub/linux/kde(which contains the original ls-lR file from ftp.kde.org) by saying:
- freshrpms -M ftp.nvg.unit.no /pub/linux/kde unstable
which looks for the ls-lR file in the /pub/linux/kdedirectory, finds all RPMs directories named unstable and downloads thenewest releases. Now, if that's too sophisticated sit back andrelax a while, you will use it ! :)
CONFIGURATION
freshrpms uses a simple line oriented configuration file where eachline starts with a statement followed by some arguments. Statementsare case insensitive, arguments are not. A line can becontinued using a backslash character (\) at the end of theline. Comments start with a # character. Empty lines areignored. Quoting characters in an argument you need to quote the space by a backslash instead.
The following statements are understood and may be given in any orderand may be repeated:
- HOST <ftp-host> [<arch> <username> <password>] <local-download-dir> {<remote-rpm-dir>}
- Optional. This defines an FTP host which is to check for new RPMpackages. The arguments have the following meaning:
<ftp-host>defines the IP adress or IP number of the remote FTP host. Eg. ftp.redhat.com
The following 3 arguments are optional as a sequence:
<arch>defines the architecture of the RPMs to look for. Eg.i386,sparc,alpha
If <arch> is not given the RPM machine architecture is derived from theresult from the `uname -m' command.
<username>defines the FTP login username. Defaults toanonymousif not given or given as an empty string ("").
<password>defines the FTP login password. Defaults to the users email addressif not given or given as an empty string ("").
<local-download-dir>defines the local directory (full path!) where RPMsare saved if newer ones than the installed ones (ie. they have ahigher version number) are found in the following <remote-rpm-dir>directories.
<remote-rpm-dir>defines a directory on the FTP server (full path!) where RPM packagesare to be found. It doesn't matter if that directory also holds otherfiles. freshrpms looks for files ending with<arch>.rpm
- EXCLUDE <rpm-package-basename>
- Optional. This defines an RPM package basename for which any versionsof this package will never be downloaded. Package basenames omit theversion spec and file type ending. Note that this is not a regex. Eg.kernel-headers,perl,xemacs-el
- INCLUDE <rpm-package-basename>
- Optional. This defines an RPM package basename which be exclusivelychecked. No other RPMs will be checked. Note that either EXCLUDE orINCLUDE statements may be specified.
- NOGC <rpm-package-basename>
- Optional. This defines an RPM package basename which will never begarbage collected if garbage collection is turned on by the -goption. Also if a package basename is specfied here then after downloadinga newer package version the older ones are never deleted.
- ARCHIVE <local-archive-dir>
- Optional. This defines a directory which is also to be garbagecollected. Normally only the <local-download-dir>'s are to begc'ed. But usually downloaded and installed RPMs are archived(manually) elsewhere. After garbage collection takes place no RPMwhich is older than the installed ones are left in this directory.
Note that newer RPMs are checked for every HOST statementie. <local-download-dir>. Thus several RPMs with the same basename maybe downloaded in different <local-download-dir>'s. - INSTALLEDRRPMS <local-archive-dir>
- Deprecated. Same as the ARCHIVE statement.
OPTIONS
- <ftp-host> {<remote-rpm-dir>}
- This specifies a host to check for new RPMs on the command line. Theconfig file is read though but all HOST statements are ignored. RPMs whichare found in <remote-rpm-dir> for the local RPM machine architecture(derived from `uname -m' command) are checked against the systeminstalled ones and RPMs which are found in the current workingdirectory. Newer RPMs are downloaded in the current working directory.
- (-M | --match-mode) <ftp-host> [<remote-lslR-dir> {<partial-remote-rpm-dir>}]
- Match mode. This specifies a host to check for new RPMson the command line. The config file is read though but all HOSTstatements are ignored. The recursive directory listings filels-lR.gzorls-lR.Zorls-lRis downloaded from the <remote-lslR-dir> directory. If<remote-lslR-dir> is not given the listings file is searched in the remote/puband/directory. After downloading the ls-lR file it is possiblyuncompressed and saved in the/var/lib/freshrpmsdirectory for one day. All subsequent match mode calls with the same<ftp-host-address> and <remote-lslR-dir> will not download the ls-lRfile again but read it from the /var/lib/freshrpms directory.
If <partial-remote-rpm-dir> is not given the ls-lR is searched fordirectories which contain RPM packages of the local RPM machinearchitecture. The directories found are shown on stdout. Use the--list-rpmdirsor-Lflag to list not only the RPM directories but also the RPM filesfound.
If possibly several <partial-remote-rpm-dir> are given the sameapplies as described in the previous paragraph but in addition a checkfor newer RPMs is made against all RPM files found in remote RPMdirectories which contain <partial-remote-rpm-dir> in itspath. Eg. consider the following remote RPM directories found:
- /pub/powertools-5.0/RPMS/i386
/pub/redhat/redhat-5.0/i386/RedHat/RPMS
/pub/redhat/redhat-5.0/updates/i386If <partial-remote-rpm-dir> equalsredhat-5.0the last two directories are checked. If <partial-remote-rpm-dir> equalsredhat-5.0/updatesonly the last directory is checked. If <partial-remote-rpm-dir> equals5.0no directories are checked becausecomplete subdirectory namesmust be given. A nice one is if <partial-remote-rpm-dir> equalsi386which will probably get you all the RPMs for your Intel based machine.
Remote RPM files are checked against the system installed ones andRPMs which are found in the current working directory. Newer RPMs aredownloaded in the current working directory.
- -L | --list-rpmdirs
- Only applies in match mode. List not only remote RPM directories butalso RPM package files found.
- -u | --update-lslR
- Only applies in match mode. Force the reload of a ls-lR file if it isalready cached in /var/lib/freshrpms and not older than one day.
- (-I | --include) {<rpm-package-basename>}
- This defines an RPM package basenames which will be checkedexclusively. No other RPMs will be checked. Packages specified by theINCLUDE statement also apply.
- (-X | --exclude) {<rpm-package-basename>}
- This defines an RPM package basenames which will never bechecked. Packages specified by the EXCLUDE statement also apply. Notethat either --include or --exclude may be given.
- -N | --not-installed
- This reverses the semantics of the check: only RPMs are downloaded ifthey arenotinstalled on the system and arenotfound in the <local-download-dir>. Only RPMs with the highest versionnumbers are downloaded.
- -n | --no-fetch
- Don't fetches or deletes any RPMs. This is used for testingto see which newer RPMs would be downloaded.
- (-a | --arch) <rpm-machine-architecture>
- Forces a RPM machine architecture (eg. i386, alpha, sparc, ppc, src,...)to check for new RPMs. Normally the RPM machine architecture isderived from the results of the `uname -m' command.
- (-r | --root) <rpm-root-directory>
- Sets the rpm command root directory for inquiring the systeminstalled rpms. This is useful for updating NFS mounted machines.
- -g | --garbage-collect
- Turns on garbage collection (default off). This deletes RPMs in the<local-download-dir>'s of the HOSTstatement which are older than the installed ones. Works also on the<local-archive-dir> of theARCHIVEstatement.
- -l | --log
- Turns on logging of remote directory listings (default off). Everytimefreshrpms checks <remote-rpm-dir>s for a specificHOSTcommand it saves the contents of this directory inin the directory <local-download-dir>/.freshrpms . It saves two files:
<hostname>-DIRcontains the listing of the FTPs DIR command.
<hostname>-OTHERcontains the names of RPMs which arenotinstalled on your local system.
This allows you to check manually what new kind ofsoftware has dropped in as RPM packages.
- -b | --batch
- Batch mode. Don't ask for downloading a file and don't show a downloadprogress indicator.
- (-f | --config-file) <config-file>
- Specifies another configuration file. Normally the configuration fileis searched in this order in$HOME/.freshrpms, Environment variableFRESHRPMS,/usr/local/etc/freshrpms.confand/etc/freshrpms.conf
- -c | --check-archive
- Prints all RPM packages which are installed on your system but whichare not archived in the directory specfied by the ARCHIVEstatement.
- -C | --compare-test
- Test mode for version string comparision. freshrpms reads two versionstrings from stdin and saiz which one is newer. Doesn't downloadanything.
- -P | --nopgp
- Don't check for a PGP signature after download. This maybe nescessaryif you don't have PGP installed on your system.
- -d | --debug
- Turns on debugging of the Net::FTP perl module. This traces all FTPoperations in detail.
- -v | --verbose
- Prints even more message messages than right now. Oh gosh...
- -q | --quiet
- Says nothing while working except for severe failures.
- -V | --version
- Prints out freshrpm's own version number.
DETECTION OF RPM PACKAGE VERSIONS
The RPM package filename format makes it quite easy to detect the versionstring from the filename. Usually an RPM filename is build by thefollowing syntax:
{<basenamepart>-}<version>-<release>.<arch>.rpm
<basenamepart>- must appear at least once. <basenamepart>, <version>and <release> do not contain any dashes. <version> and <release> is a sequence of<minor>'s possibly separated by dots. To detect if a package version is newer two<version>'s are compared from left to right for each <minor>, abortingwhen the one <minor> is greater. If both <minor>s are numbers,integers are compared otherwise strings are compared (casesensitive). If string <minor>'s have different length the package forthe longer string is always a newer version (eg. version 3.6a1 isnewer than version 3.6a but not then 3.6b). If the number of <minor>'sis not equal for a version string the version with the most <minor>'sis newer (eg. version 2.7.2.1 is newer than version 2.7.2 but 2.6.2.1is not). If all <minor>'s are equal the same procedure is applied for<release> to decide if a package isnewer. This scheme works quite well in 99% of the cases :).
FTP PROXY, FIREWALL, NETRC
freshrpms lets the Net::FTP perl module handle FTP proxies / firewalls. AnFTP proxy host can be set in the environment variable
FTP_FIREWALL .The semantics of this variable is the following according toNet::FTP's man page of libnet version 1.05: 'If specified, and thegiven host cannot be directly connected to, then the connection ismade to the firewall machine and the string @hostname is appended tothe login identifier. This kind of setup is also refered to as a ftpproxy.'
The Net::FTP module makes also use of the .netrcfile. Please refer to the manual page Net::Netrc(1) for more details.
LATEST VERSION
The latest version of freshrpms can be obtained via anon FTP from
ftp://ftp.cs.tu-berlin.de/pub/local/flp/lutzeb/software/freshrpms/freshrpms.tar.gz
or by entering the following line into your configration file
HOST ftp.cs.tu-berlin.de <your-local-download-dir> /pub/local/flp/lutzeb/software/freshrpms
or by entering the following command:
freshrpms ftp.cs.tu-berlin.de /pub/local/flp/lutzeb/software/freshrpms
You can get the required Perl5 modules IO,libnetandData-Dumperalso from this site. They are copied versions from the RedHat contribdirectory which are guaranteed to work with this version offreshrpms. You can get the modules from
ftp://ftp.cs.tu-berlin.de/pub/local/flp/lutzeb/software/contrib/i386
CAVEATS
RPM packages with the same basename may me loaded twice if they appearin different <local-download-dir> directories. This is not a bug but afeature :) Thus you can keep track of different remote directories eg. youalways want to mirror the official RedHat distribution directory withstable RPMs but also the RedHat contribution directory with possiblyunstable RPMs. So you will eg. download XFree-3.2 packages in the distdirectory although the contrib directory already has the newestXFree-3.3 but possibly unstable packages.
Freshrpms is quite verbose. This is for all the low bandwidth userswho pay for their ISP and want to know what is being downloaded. Use-q option to shut up freshrpms.
BUGS
Please help the author to write this manual page in better english!
AUTHOR
Copyright 1997-1998 Dirk Lutzebaeck <lutzebAATTcs.tu-berlin.de>
Feature suggestions by Rafal Maszkowski <rzmAATTtorun.pdi.net>, DaryllStrauss <daryllAATTharlot.rb.ca.us> and Fischmeister Sebastian<sfischmeAATTnexus.lzk.tuwien.ac.at>.
SEE ALSO
rpm(1),
Net::FTP(3),
Net::Netrc(3)
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- CONFIGURATION
- OPTIONS
- DETECTION OF RPM PACKAGE VERSIONS
- FTP PROXY, FIREWALL, NETRC
- LATEST VERSION
- CAVEATS
- BUGS
- AUTHOR
- SEE ALSO
This document was created byman2html,using the manual pages.