This section describes some sample configurations. For a list of all available options please refer to the man page or use autoupd --help to get a list of all command line options.
and# /etc/autoupdate.d/autoupdate.conf # This determines the default behavior. Not all options are listed here, # see the man page for a list of all options and further details. # How much output should we produce? Verbose=1 Quiet=0 Warnings=1 # Warn about improper rpm names RPMNameWarnings=1 # # Options concerning the update part # # Should the update part be done by default? # If set to 1, autodld will automatically upgrade all downloaded rpms DoUpdate=1 # The directory where we should look for updates (the download part will store # all new rpms in this directory by default) if none are given on the # command line. UpdateDir=/var/spool/autoupdate # The directory where we should look for new rpms to install (if invoked in # install mode) if none are given on the command line. Defaults to UpdateDir. #InstallDir= # If you maintain your own distribution, where can the distribution rpms be # found? If set, comparison during download will be made against these rpms # otherwise against the installed ones. RPMDir= # Are there any rpms autoupdate should ignore during update? E.g., suse users # will want to ignore packages starting with "k_". See the man page for details. # (This will by default not affect downloads.) #Exclude=^k_ #Include= # Should new kernels be installed DoKernel=0 # Which rpms should be considered as kernel rpms? # By default rpms whose name are kernel or kernel-xxx with xxx form the list # below will be considered as kernel rpms. KernelExt=smp,enterprise,bigmem,debug,BOOT # If a new kernel is installed, should it be added to the boot manager. # This will probably only work on redhat systems. DoBoot=0 # Which boot manager do you have (lilo and grub are supported) #BootManager=lilo # Should a tag "-new" added to the new kernel? Otherwise, the tag "-old" will # be added to your previous kernel and the new one will become your default # boot image. BootAddAsNew=0 # How many rpms should we keep? # If set to 1, all rpms will be removed after they have been upgraded. CleanUp=1 # If set to 1, old kernels will be uninstalled (your previous kernel # will always be kept) CleanUpKernel=1 # Remove bad rpms (e.g., incomplete downloads). It is off by default, # since autoupdate will resume incomplete downloads. RemoveBad=0 # If set to 1 (and CleanUp to 0), only the latest version of each rpm will # be kept. DoPurge=0 # If set to 1, rpm will be invoked with the repackage option. That is, backups # of all upgraded rpms will be made, so that you can easily roll back to your # previous version. Repackage=0 # Should rpm headers be looked at? I recommend to turn this on, but it requires # that you install the perl rpm binding first. #QueryHeaders=1 #QueryDatabase=1 # Should size, md5 or gpg signatures of packages be checked before update? # The size will always be checked during download, such that incomplete # downloads will be handled properly. CheckSize=0 CheckSig=0 CheckGPG=0 # Should dependency resolution be done? Resolve=1 # Should we descend local directories recursively by default. Recursive=0 # You can run a custom script, which will be invoked after new rpms have been # installed. #PostUpdateScript=/sbin/SuSEconfig # # Options for the download part. # # Only download the rpm which matches your system best. E.g., if both an i386 and # i686 version is available, download only the i686 version on an i686 computer. # If you run it on a server from which other clients should get their updates, # you should set this to 0. BestMatch=1 # Consider installed rpms during download. This will be done automatically if # no RPMDir is set. Otherwise you might not want this if you use a redhat 7.2 # box to download updates for your redhat 7.1 clients. DldAddInstalled=1 # If you run your own server, you can put up provides data bases for your # clients to download and use. If you don't use this feature, you can turn it # off. Leaving it on should however do no harm. DldUseDB=1 # Autoupdate has native http support. However, this support is limited (e.g., # no proxy support) and you might want to use the perl LWP module for http(s) # provided you have it installed. UseLWP=0 # For which protocols should the LWP module be used? #LWPProtocols=http,https # Should the include/exclude patterns for the upgrade part also be used during # download? Please note that you can set up include/exclude patterns for each # download site by putting them into the corresponding download configuration # file. So most likely you don't want this option. DldMatch=0 # Fix rpm names after downloading. That is, if the filename of a downloaded # rpm is not of the form "name-version-release.arch.rpm", it will be renamed. FixRPMNames=1 # You can run a custom script, which will be invoked after new rpms have been # downloaded. #PostDldScript= # Use passive ftp by default Passive=1 # Default user and password to use for ftp connections. DefaultUser=anonymous DefaultPass=`echo autoupdate@`hostname -f`` # The version of your distribution. The string "#DistVersion#" will be replaced # by the one given here in all paths. So you don't have to change all your # config files when you upgrade your distribution;-) DistVersion=`/etc/autoupdate.d/distversion.sh` #DistLang=en # # Options concerning the get part # # If you want to select rpms by section names from a comps file, you need to # fill in where the comps file is #Comps= # and maybe also which languages should be accepted when parsing the comps file #Languages=en,de_AT # Should we write a log file. If you set LogFile to "syslog" all logs will go # to syslogd. DoLog=1 #LogFile= # Disable shell escapes in config files from now on (in particular, it will be off for # all download configuration files) ShellEscapes=0
# /etc/autoupdate.d/redhat.dld # Download configuration file for redhat updates # *** Please choose a mirror close to you! *** Host=ftp.redhat.com # Protocol (defaults to ftp) Protocol=ftp #User= #Pass= # If you want to override the default from the config file #Passive=1 # Should we retry if our first login attempt fails? Useful for busy # mirrors. FTPRetry=2 # How long should we wait between two connection attempts? FTPWait=10 # In general, only updated rpms will be downloaded. However, if set to 1, # new rpms which are not in the provides data base are downloaded # so that their dependency information can be added to the provides data # base. This is needed for the dependency resolution and should be set to # 1 at least for your distribution updates. If set to 2, all new rpms will # be downloaded. DldAll=1 # Descend directories recursively at the remote site? DldRecursive=0 # Any number of directories can be given here (one "Dir=..." per line). # The two trailing slashes at the end will make autoupdate search in # subdirectories according to architecture (alternatively, you can omit # the trailing slashes and use DldRecursive=1, however, the syntax below # will not search directories corresponding to archs you do not need and # is hence faster) Dir=/pub/redhat/linux/updates/#DistVersion#/#DistLang#/os//
Now just type autodld. This will download all new updates from ftp.redhat.com and upgrade your system. 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. In this case you might also want to set Verbose=0 such that it only produces output if new rpms are found. Of course you can create addition *.dld configuration files for additional sites you want to check. For example here is one which will get you the latest Webmin package:
# /etc/autoupdate.d/webmin.dld # Download configuration file for webmin updates Host=belnet.dl.sourceforge.net Protocol=http # send the host name as part of the request HTTPSendHost=1 # older versions use some non-standard rpm names RPMNameWarnings=0 # plus some strange version numbers Exclude=^webmin-0.8 Dir=/sourceforge/webadmin/
If you want to use the get mode as well, you need to set up get configuration files for each site you want to search for new rpms like the one below.
# /etc/autoupdate.d/redhat.get # Get configuration file for redhat rpms. This file will only be used # during get mode. # *** Please choose a mirror close to you! *** Host=ftp.redhat.com # Descend directories recursively at the remote site? DldRecursive=0 # Any number of directories can be given here (one "Dir=..." per line). # The BaseDir will be added to all Dir's which do not start with # a "/". BaseDir=/pub/redhat/linux/#DistVersion#/#DistLang# Dir=os/#DistArch#/RedHat/RPMS #Dir=powertools/#DistArch#/RedHat/RPMS
In addition, I use DldAll=1 for the RedHat updates and DldAll=0 for all others (e.g, PowerTools).--- autoupdate.conf Mon May 6 12:45:24 2002 +++ autoupdate.conf.server Mon May 6 13:04:07 2002 @@ -20,14 +20,14 @@ # The directory where we should look for updates (the download part will store # all new rpms in this directory by default) if none are given on the # command line. -UpdateDir=/var/spool/autoupdate +UpdateDir=/usr/src/redhat-#DistVersion#/updates # The directory where we should look for new rpms to install (if invoked in # install mode) if none are given on the command line. Defaults to UpdateDir. -#InstallDir= +InstallDir=/usr/src/redhat-#DistVersion#/newrpms # If you maintain your own distribution, where can the distribution rpms be # found? If set, comparison during download will be made against these rpms # otherwise against the installed ones. -RPMDir= +RPMDir=/usr/src/redhat-#DistVersion#/RedHat/RPMS # Are there any rpms autoupdate should ignore during update? E.g., suse users # will want to ignore packages starting with "k_". See the man page for details. @@ -53,7 +53,7 @@ # How many rpms should we keep? # If set to 1, all rpms will be removed after they have been upgraded. -CleanUp=1 +CleanUp=0 # If set to 1, old kernels will be uninstalled (your previous kernel # will always be kept) CleanUpKernel=1 @@ -97,11 +97,11 @@ # i686 version is available, download only the i686 version on an i686 computer. # If you run it on a server from which other clients should get their updates, # you should set this to 0. -BestMatch=1 +BestMatch=0 # Consider installed rpms during download. This will be done automatically if # no RPMDir is set. Otherwise you might not want this if you use a redhat 7.2 # box to download updates for your redhat 7.1 clients. -DldAddInstalled=1 +DldAddInstalled=0 # If you run your own server, you can put up provides data bases for your # clients to download and use. If you don't use this feature, you can turn it # off. Leaving it on should however do no harm.
From /etc/cron.daily I run
on the server and#!/bin/sh # This gets the updates for the 7.1 clients autodld --noverbose --noupdate --distversion 7.1 # This gets the updates for the 7.2 clients and at the same time upgrades the server autodld --noverbose
on the clients, where /auto.mnt/redhat is the /usr/src/redhat-7.{1,2} directory (auto)mounted via nfs from the server. New rpms can be installed on all clients by copying them to the newrpms directory.#!/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/RPMS
Finally, you can use the --merge option to replace all rpms in your distribution with the updated ones. This is particularly usefull if you use the rpm directory for nfs installs or want to burn your own cds (you need to run genhdlist for the RedHat installer to work with the updated rpms). Similarly, --purge will remove old versions from the updates directory.