Main features/drawbacks:
In contradistinction to up2date, it can be used to upgrade both rpms
from RedHat and third party rpms. In addition, only the server will
download new rpms, the clients get them from the server (saves bandwidth).
In contradistinction to autorpm, it will try to handle dependencies (see below)
and choose the right architecture (if more than one is available). Moreover,
it will only download rpms for which an older version is present.
Version comparison is only done by looking at the file name and not by
looking at the entire rpm header.
It is designed to run from a cron job and to keep the output to a minimum (so that your root email is not cluttered up with useless information). In particular, there is no interactive mode or any kind of GUI.
ftp://ftp.mat.univie.ac.at/pub/teschl/autoupdate/
There are tar.gz, noarch.rpm versions available. In addition, some ftp configuration files are available as rpms as well: cfg-redhat, cfg-caldera, cfg-mandrake, cfg-suse, cfg-autoupdate. Note: These configuration files are just here to get you started. Please edit them to meet your needs, in particular, replace the ftp server by a mirror close to you!
All rpms are signed with my DSS key.
First all rpms (except kernel packages) will be upgraded. If there are unresolved dependencies, it will check if any other rpms in the update or rpm directory can be used to satisfy them and add all necessary ones.
Then it will install new kernel rpms (unless disabled) and, at your request, add the images to the boot manager.
As already noted, dependency resolution is only possible if AutoUpdate knows which rpm provides what capabilities. For this it maintains its own provides database autoprovides.db which can be in the updates directory or in the configuration directory. If this data base does not exist, it will be created automatically by querying the rpms in the updates and rpm directory. Moreover, whenever an rpm is downloaded, it will be added as well. You can even add additional rpms using the --addtodb option. So for example, you could add the information from all rpms on your installation CDs (autoprovides_rh7.1.db which contains this information for RedHat 7.1 (including PowerTools) is available). So even if the rpms are not available to AutoUpdate, it might at least be able to tell you what rpms are needed.
# /etc/autoupdate.d/autoupdate.conf Verbose=1 Quiet=0 Warnings=1 RPMNameWarnings=1 DoUpdate=1 DoInstall=0 DoKernel=0 DoInitRD=1 DoBoot=1 DoDld=1 DoMerge=0 DoPurge=0 CleanUp=1 CleanUpKernel=1 #BootManager=lilo BootAddAsNew=0 KernelExt=smp,enterprise,BOOT CheckSig=0 CheckGPG=0 Resolve=1 BestMatch=1 RemoveBad=1 Recurse=0 DoLog=1 #LogFile= #PostUpdateScript=/sbin/SuSEconfig #PostDldScript= DefaultUser=anonymous DefaultPass=`echo autoupdate@`hostname -f`` DistVersion=`/etc/autoupdate.d/distversion.sh` ShellEscapes=0 UpdateDir=/var/spool/autoupdate RPMDir= DldMatch=0 MergeMatch=0 #Exclude=^k_ #Include=and
# /etc/autoupdate.d/redhat.dld Host=ftp.redhat.com DldAll=1 FTPRetry=2 FTPWait=10 DldRecurse=0 Passive=1 Dir=/pub/redhat/linux/updates/#DistVersion#/en/os/Just type autodld. This will download all new updates from ftp.redhat.com and upgrade your system. The slash at the end of the ftp directory will make AutoUpdate check all sub directories corresponding to architectures suitable for your system (e.g., noarch, i386, i586 on a Pentium PC). Moreover, linking autodld to /etc/cron.daily will check for updates every day and you (root) will get a list of all rpms which have been upgraded via email.
Some remarks: CleanUp=1 will remove all rpms which have been upgraded. If you set it to CleanUp=0 and DoPurge=1 the latest version of each rpm will be kept. MatchBest=1 will ensure that only the rpm which matches your system best is fetched, that is, if you run it on an i686 it will only download the i686 kernel and not the i386 one. RemoveBad=1 will remove bad rpms (e.g., those from an incomplete download) before downloading any new ones. In addition, you can also use Exclude, Include patterns to control which packages should be considered during upgrade. Kernel packages will be handled separately, in particular, no exclude patterns are needed. Note, however, that excluded packages will still be downloaded (unless you use DldMatch=1), such that you know they are there. (Of course you can also set up patterns for each ftp site.)
Alternatively, if you already have the rpms (say on CD), you can use
autoupd /mnt/cdrom/*.rpmto upgrade your system. If you use autoins instead, all rpms will be installed even if no older versions are present. This is similar to rpm -F and rpm -U with the two differences that AutoUpdate will select the right rpm (architecture, latest version) and it will try to resolve dependencies.
Moreover, the command
autoget --url ftp://ftp.redhat.com/pub/redhat/linux/7.1/en/os/i386/RedHat/RPMS zipwill search the given url for an rpm named zip. If found, the rpm will be downloaded and installed. Of course, you can setup *.get config files for all sites you want to search.
In addition, it can be used to keep an entire site up to date. Here is my setup. I have a (customized) RedHat distributions on my server in /usr/src/redhat-7.{0,1} and I keep the updates in /usr/src/redhat-7.{0,1}/updates. Hence my configuration file looks like
# /etc/autoupdate.d/autoupdate.conf Verbose=0 Quiet=0 Warnings=1 DoUpdate=0 DoInstall=0 DoKernel=0 DoInitRD=1 DoBoot=1 DoDld=1 DoMerge=0 DoPurge=0 CleanUp=0 CleanUpKernel=1 BootAddAsNew=0 KernelExt=smp,enterprise CheckSig=1 CheckGPG=0 Resolve=1 BestMatch=0 RemoveBad=1 Recurse=0 #PostUpdateScript= #PostDldScript= DefaultUser=anonymous DefaultPass=`echo autoupdate@`hostname -f`` DistVersion=`cut -d" " -f5 /etc/redhat-release` ShellEscapes=0 UpdateDir=/usr/src/redhat-#DistVersion#/updates InstallDir=/usr/src/redhat-#DistVersion#/newrpms RPMDir=/usr/src/redhat-#DistVersion#/RedHat/RPMS DldMatch=0 MergeMatch=0In addition, I use DldAll=1 for the RedHat updates and DldAll=0 for all others (e.g, PowerTools).
From /etc/cron.daily I run
#!/bin/sh autodld --noverbose --distversion 7.0 autodld --noverbose --distversion 7.1on the server and
#!/bin/sh # Sleep some random time between 0 and 2 hours sleep $((RANDOM % 7200)) export HOME=/root RHDIR=/auto.mnt/redhat # Upgrade rpms autoupd --noverbose --kernel --updatedir $RHDIR/updates --rpmdir $RHDIR/RedHat/RPMS # Install new rpms autoins --noverbose --updatedir $RHDIR/newrpms --rpmdir $RHDIR/RedHat/RPMSon the clients, where /auto.mnt/redhat is the /usr/src/redhat-7.{0,1} directory (auto)mounted via nfs from the server. New rpms can be installed on all clients by copying them to the newrpms directory.
Finally, you can use the --merge option to replace all rpms in your distribution with the updated ones. Similarly, --purge will remove old versions from the updates directory.
For more information see autoupdate --help or man autoupdate.
Moreover, note that any other application/package can place an dld configuration file into the config dir. By default it will be included unless you explicitly specify the ftp configuration files to be included in the main configuration file. And don't forget to remove read permissions from all dld configuration files which store pass words.
Finally, installing packages implies that you trust the ftp site from which you download them. In addition, you can set CheckGPG to 1 in order to enforce a valid gpg signature on each package. This of course requires that the public key of the signer must be added to root's key ring first. Every package which is not signed will be rejected during upgrade in this case.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Please see the included file LICENSE for a copy of the GNU General Public License. If this file is missing, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.