Upgrading Clamav

From Kolab wiki

Jump to: navigation, search


Upgrading to clamav 0.88.3

This procedure should be useful for all openpkg packages which do not have "kolab" in the name (these are special patched versions and will be available from kolab mirrors):

You may get a warning when running freshclam like

 WARNING: Your ClamAV installation is OUTDATED!
 WARNING: Local version: 0.xx.x Recommended version 0.88.3

I could not find any rpms for clamav 0.88.3, so heres how to make them for openpkg: Get the latest sources from http://prdownloads.sourceforge.net/clamav/ (choose latest version) Get the spec and rc files from OpenPkg

 wget ftp://ftp.openpkg.org/sources/SRC/clamav/clamav.spec
 wget ftp://ftp.openpkg.org/sources/SRC/clamav/rc.clamav

Copy the clamav tarball and rc to /kolab/RPM/SRC/clamav/

 cp clamav-0.88.3.tar.gz /kolab/RPM/SRC/clamav/
 cp rc.clamav /kolab/RPM/SRC/clamav/

Edit the spec file to make sure version numbers match (change Version:) Now build an rpm

 /kolab/bin/openpkg rpmbuild -bb ./clamav.spec

Make sure it exits with 0, you should see something like "+ exit 0" right at the end. If so, just install it

 /kolab/bin/openpkg rpm -Uvh /kolab/RPM/PKG/clamav-0.88.4-20060702.xxxxxxxxx-kolab.rpm (xxxxxxxxx will be your distro)

Restart clamav:

 /kolab/bin/openpkg rc clamav restart

You may get an error like below. This is normal, when you upgrade, your old config files are saved to oldconfigfile.conf.rpmsave

 openpkg:rc:ERROR: package "clamav" has unresolved configuration file conflicts
 openpkg:rc:ERROR: indicated by "*.rpm(new|orig|save)" files in or below the
 openpkg:rc:ERROR: directory "/kolab/etc/clamav". Please resolve first!

Just go into /kolab/etc/clamav and remove all files ending in rpmsave or rpmnew or rpmorig

 rm /kolab/etc/clamav/*.rpm[save|orig|new]

Get the latest patterns:

 /kolab/bin/freshclam

Upgrading to clamav 0.88.6

When attempting to upgrade to 0.88.6 on Kolab 2.0.3, you may get an error similar to the following:

 error: Failed build dependencies:
       openpkg >= 20060823 is needed by clamav-0.88.6-20061106

I simply edited the clamav.spec file and changed the dependency, as follows (openpkg requirement edited from 20060823):

 BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc, bzip2
 PreReq:       OpenPKG, openpkg >= 20040130

Please note that while this seems to work fine, and I have not had any problems, this method may cause problems or even beat you up and steal your lunch.

Personal tools