rpm_verify_db

Automatically verify and repair the RPM database.

Download

Download rpm_verify_db RPM

rpm_verify_db Source RPM

rpm_verify_db tarball

GPG key

Description

rpm_verify_db uses RPM to automatically verify and rebuild the RPM database used on Redhat-type Linux systems, such as Fedora. It installs as a daily cron task, and also hooks into logwatch. It uses "rpm --verifydb" to check the database. If damage is found, it attempts repair with "rpm --rebuilddb", as long as the Packages file is OK. Errors are syslog'd and emailed to root. It keeps two last-known-good copies of the database.

RPM's developer, Jeff Johnson, says that such checks are inadequate and not needed and, by their use of RPM, can themselves lead to corruption of the RPM database. Every part of this viewpoint seems extreme to me.

Normally the RPM database is reliable, but, as it is normally never checked, if it starts to go bad there will be no warning until it completely falls over, usually when installing updates. At this writing, the new Fedora 6 appears to have some issues with corrupting the RPM database, making this sort of tool more immediately necessary.

I am not experienced with the internals of RPM. This tool follows the docs for RPM and also info gleaned from googling about (--verifydb is undocumented). I try to follow best practices for safely checking, repairing, replacing, and logging, but there may be problems. (RPM's developer, Jeff Johnson, says that the check I'm doing is inadequate and not needed and, by its use of RPM, can itself lead to corruption of the RPM database. Every part of this point of view seems extreme to me. See the thread at Redhat's rpm-list, "SUG: Automatic RPM database verification and repair".)

Installation

Download and install the RPM in the usual way. I don't expect that any configuration will be needed, so I haven't really allowed for any.

rpm -i rpm-verifydb-0.1.0-1.noarch.rpm

Usage

rpm_verify_db is run once a day by cron. If you do nothing, rpm_verify_db will have made a best-effort to keep the RPM database intact. Check the system log in /var/log/messages for reports from rpm_verify_db, or read root's email to see if any problems were found.

rpm_verify_db keeps two Last Known Good copies of the RPM database next to the RPM database, only updating them when the Packages file has changed, so there will be two good copies, not two bad copies after even many days of unfixable (by rpm_verify_db) errors. They will, however, keep getting more and more out of date if a broken RPM database could not be fixed but hasn't completely fallen over. It is easier to get a nearly up-to-date RPM database back up to date than having to start from just a list of installed packages.

 

Back to Tony NelsonJHC's R Pentomino's Home Page

Valid HTML 4.0!