AutoUpdate

[ General | Quick Start Guide | Download and Installation | Configuration | FAQ ]

Note: Autoupdate is no longer maintained. These pages remain here only for historic reasons.

FAQ

Q: Does it work with RedHat 8.0 respectively 9?
Yes. However, there are a few issues: Since version 4.1, rpm insists on checking gpg signatures. Hence you need to add all neccessary public keys to rpm (rpm --import ....). If you use the perl-RPM2 bindings, please upgrade to at least version 0.62. Moroever, there are some known problems with rpm-4.1 and you should use at least version rpm-4.1.1 available from ftp.rpm.org.
Q: Can it resolve dependencies during upgrade? What do I need to do to enable this feature?
Yes. There should be no problems unless upgrading an rpm requires to install new rpms (for which no older version are installed). Moreover, it will even try to handle such situations if Resolve=1 is used. However, this will only work if all necessary rpms are in the updates or rpm directory. The download part will try to ensure this, but it will only succeed if it can be read off from the file name that a new rpm is needed or if the information is in its provides database (see below). In particular, it might not realize that libcrypto.so is provided by openssl. Hence Autoupdate will fail in such a case and you have two options. Either download the necessary rpms by hand or use DldUnknown=1 (at least for the RedHat updates).
Q: What is the provides database for?
As noted above, 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 by mounting each CD and using:
autoupd --noupdate --addtodb /mnt/cdrom/RedHat/RPMS/*.rpm
So even if the rpms are not available to AutoUpdate, it might at least be able to tell you what rpms are needed.

Some sample data bases are available from the download page. If a data base for your distribution is not available and you have created one, feel free to mail it to me.

Q: Why does it download package FOO? I don't have FOO installed on my system.
First of all, did you follow the instructions and install a provides database? It will download rpms it does not know about in order to query them for what they provide. You can control this with the DldUnknown=0|1|2 option. If you set it to 0, only packages you have installed (resp. which are in your rpmdir) will be downloaded. If you set it to 1, only packages it doesn't know about will be downloaded. If you set it to 2, all packages will be downloaded.
Q: Why doesn't it support ftp pools like autorpm?
Usually you know for yourself which mirror is best for you and there is no real need for it. Moreover, it might just be that one mirror is fast, but does not have the latest updates. So I'd rather leave the selection of the mirror to the user. Moreover, to make your update more reliable, you can set up two dld configuration files redhat1.dld and redhat2.dld. The first pointing to your local mirror and the second pointing to ftp.redhat.com. Since redhat1.dld is chekced first, it will download all updates from your local mirror and never find anything new at redhat2.dld as long as your mirror is in sync with redhat. If your mirror is out of sync (or not responding) it will get the updates from ftp.redhat.com as a fallback.
Q: Can I set up my own repository, or can it use existing apt/mandrake/up2date repositories?
Yes. See the configuration instructions. In addition, it can use Mandrake style synthesis files and header.info files. It cannot use apt repository files or the rpm header files used by up2date. (However, patches are welcome.)
Q: Can it upgrade kernels?
AutoUpdate will also try to update your kernel for you if DoUpdateKernel=1. In fact, this will only install new kernel rpms (without touching your existing kernels or altering your boot manager configuration). Hence this feature should be pretty safe. However, it can even reconfigure your boot manager if used with DoBoot=1. Currently lilo and grub are supported. Since this option might hose your entire system it is off by default and you should only turn it on if you are willing to take this risk! Moreover, it will probably only work if you are using a RedHat style system. In particular, the boot image (and the corresponding initrd - if any) needs to contain the full rpm version string. Please use --test and inspect the test configuration file to make sure it works. Use at your own risk! You have been warned! If it breaks your system, don't blame me.
Note: Newer kernel rpms from redhat (since 7.2) will automatically update grub.conf after installation (this is part of the post installation script). So even if you use DoBoot=0, your boot manager will be updated in this case.
Q: I have the updates on cdrom. What should I do?
Mount the cdrom and say
autoupd	--recursive --addtodb --updatedir /mnt/cdrom
respectively
autodld	--dldrecursive --url file:///mnt/cdrom
if you want to copy the files to your rpmdir.
Q: I want to burn my own RedHat CDs with the latest updates. How do I replace each package with the latest version?
Suppose you have the updates in updates/ and the rpms from CD in RedHat/RPMS/. Then just say
automrg --updatedir updates/ --rpmdir RedHat/RPMS/
This will replace all rpms in RedHat/RPMS/ with the latest version from updates/. Don't forget to recreate the hdlist using
/usr/lib/anaconda-runtime/genhdlist `pwd`
or the installer will fail. (/usr/lib/anaconda-runtime/genhdlist is part of the anaconda-runtime rpm.)
Q: I want to burn my own cdroms based on a custom comps file. Can autoupdate help me selecting all the neccessary rpms?
Yes. Suppose you have all rpms in /usr/src/redhat-7.3/RedHat/RPMS and you want to copy them to /tmp/mycd/RedHat/RPMS. Then you could use
autoget --noupdate --purge --nodldaddinstalled \
    --rpmdir /tmp/empty \
    --updatedir /tmp/mycd/RedHat/RPMS \
    --comps /tmp/mycd/RedHat/base/comps \
    --url file:///usr/src/redhat-7.3/RedHat/RPMS "@++"
The directory /tmp/empty must be empty and is needed since otherwise autoget would not get files which are already in your rpm directory.
Q: What is a comps file? Can Autoupdate use it?
Which rpms are selected during installation of a RedHat-type system is determined by the so called comps file. It is a plain text file and consists of lists of rpms grouped together in a number of sections for easy selection during installation. Autoupdate can parse such a file and install all rpms from any number of given sections. The comps file can be found on the installation media: RedHat/base/comps. Since RedHat 8.0 it is an xml file called comps.xml.
Q: Can I use it to generate the xml dependency for inclusion in comps.xml?
Yes. The command
autoupd --requiresxml *.rpm
will generate package sections for all given rpms which can then be included in your comps.xml file.
Q: Can I use more than one rpm directory.
In principal no. However, there is a trick: Create links to all rpm directories in one directory and use this directory together with the recursive option. Note that this will not work for the merge mode.
Q: Does it use the EPOCH (fka SERIAL) tag during version comparison?
Yes and no. It will query all local rpm headers and hence also use the EPOCH tag during version comparison. However, this cannot be used for remote rpms since in order to query the header one would need to download the package first. If you run your own server you can overcome this limitation by renaming your packages according to name-[epoch:]version-release.arch.rpm. There is a shell script renamerpms.sh which will do this for you.
Q: What is the EPOCH (fka SERIAL) tag?
This is a number stored in the rpm header which, if present, will be used instead of the version string in order to determine which package is newer. It is used to revert to an older version or for tricky version strings, where regular version comparison would give incorrect results.
Q: Can I use it to download ONLY RedHat security advisories?
Yes. (However, note that this is slow and, since redhat releases almost only security updates, probably not worth the effort). Use the following dld config file:

# /etc/autoupdate.d/rhsa.dld
# Download redhat security updates only
Host=rhn.redhat.com
# Protocol
Protocol=http

# This should be 1, such that new rpms which are not in the provides data base
# are downloaded to ensure dependency resolution works.
DldUnknown=1
# Descend directories recursively at the remote site?
DldRecursive=1

# Parse the errata site for our dist version
Dir=/errata/rh#DistVersionNoDot2#-errata.html
# Make sure we only descend listings containing RHNS
DldDirInclude=RHSA
# Make sure we only pick updates for our dist version
DldRpmInclude=updates.redhat.com\/#DistVersion#\/
and make sure you use LWP!
Q: Can it make secure connections via https?
Yes. Install and the LWP and Crypt::SSLeay modules (perl-liwbwww-perl, perl-Crypt-SSLeay).
Q: Can it make secure connections via sftp?
Yes. You need to install the Net::SFTP perl module plus all the modules it requires. Either you can install it from CPAN or you can download local copies of all required modules as rpms. These rpms are build on RedHat 7.3 so you might have to get the src rpms instead and recompile them.
Q: Does it have proxy support?
Yes. Both ftp and http support proxies.

If you have an ftp firewall, then set the FTPFirewall variable. Note that this host has to speak the ftp protocol and not http! In particular, Squid is no ftp firewall (see below). See the man pages for Net::FTP and Net::Config for further information.

If you have an http proxy (like Squid) your config file should contain something like

LWPProxy=http://proxy.my.org:3128/
LWPNoProxy=my.org
LWPProtocols=http,https,ftp
# If your proxy requires authentication
#LWPProxyUser=name
#LWPProxyPass=pass
In particular, adding ftp to the list of protocols for which LWP should be used will allow ftp connections over a http proxy. See the man page for LWP for further information.

[ General | Quick Start Guide | Download and Installation | Configuration | FAQ ]