Prior to rebuilding SRPMs create a seperate account for building RPMs and set up the environment for it:
# su - # useradd rpmbuild # su - rpmbuild # mkdir -p rpm/{BUILD,RPMS/$ARCH,RPMS/noarch,SOURCES,SRPMS,SPECS,tmp}
Replace "$ARCH" with the architecture(s) you plan to build packages.
Then create the minimal "~/.rpmmacros" file with the below contents:
%_topdir /home/rpmbuild/rpm %_tmppath /home/rpmbuild/rpm/tmp
Now we are ready to build RPMs from SRPMs.
-
Download the latest source rpm from dag.wieers.com to the "~/rpm/SRPMS" directory.
Install the source if you want to further customize the spec file for building the rpm.
$ rpm -ivh SRPMS/clamav-version-release.src.rpmElse, rebuild clamav RPM from the source RPM:
$ rpmbuild --rebuild --define '_without_milter 1' --define \ '_unpackaged_files_terminate_build 0' SRPMS/clamav-version-release.src.rpm
In my case, I use clamav with MailScanner... so I will not be using clamav-milter for sendmail, so it will build without it.
Once the packages are re-built, change to root user and install via:# rpm -Uvh /home/rpmbuild/rpm/RPMS/$ARCH/clam*.rpm
Which should install clamav, clamav-db, clamav-devel and clamd.
Test by updating the virus database and notify clamd if you have it running:# /usr/bin/freshclam -v -l /var/log/clamav/freshclam.log --daemon-notify
Customization Notes for MailScanner:
With MailScanner only clamav and clamav-db is required.
Merge the "/etc/freshclam.conf" file with the "freshclam.conf.rpmnew" .
Removed the daily freshclam cron as MailScanner takes care of updating the ".cvd" database hourly.
Pointed freshclam logs to go to "/var/log/clamav/freshclam.log" in "/usr/lib/MailScanner/clamav-autoupdate" instead of "/var/log/clamav.log".
Updated path to freshclam to "/usr/bin/freshclam" in "/usr/lib/MailScanner/clamav-autoupdate" instead of "/usr/local/bin/freshclam".
Backed up and deleted the old "/etc/clamav.conf" file. Clamav currently uses "clamd.conf" instead.
Further cleanups of files and folders, left behind from old installs:Deleted old log files "/var/log/{clamav.log,clamd.log}"
`service MailScanner restart`
Delete old folders "/var/{run/clamd,lib/clamav}"
Delete old folder and files in "/usr/share/clamav"
If you are being lazy... here are the downloads with md5sums built against RedHat EL 3 :
-
98e0a922c191dc087d98f843b9d2871e -- clamav-0.84-1.rf.i386.rpm
843f2d6fa41a5db8881ac0e59b3ff291 -- clamav-db-0.84-1.rf.i386.rpm
fd39dce7fbe28b19360f8ef457d0d18c -- clamav-devel-0.84-1.rf.i386.rpm
dd41858612cbcd8acf19e60c97a37321 -- clamd-0.84-1.rf.i386.rpm
Related Reading:
Upgrade to ClamAV 0.85 using dags spec file...
Download the 0.85 release and move it to the SOURCES directory:
http://prdownloads.sourceforge.net/clamav/clamav-0.85.tar.gz
Download the spec file from dags repository to the SPECS directory:Edit the spec file and change the version to 0.85 . Build the rpm using:
md5sums and RPMS built for RHEL3:
538db6cebe88fb8821e38e22eaf45408 -- clamav-0.85-1.ss.i386.rpm
c30e9ec48c30feda6c6fd4b0598a4a87 -- clamav-db-0.85-1.ss.i386.rpm
81182fd78caa0943fcf066bb7bca0d37 -- clamav-devel-0.85-1.ss.i386.rpm
06ec7fba19323eebf383b63c99c0ed69 -- clamd-0.85-1.ss.i386.rpm
MailScanner with Perl ClamAV Module
If you are on Ensim Pro, you probably already have this installed as an ensimized version of "perl-Mail-ClamAV". Skip to step 4 and 5.
Download and install ClamAV as usual.
Then do the following:
In MailScanner.conf, set 'Virus Scanners = clamavmodule'. In MailScanner.conf, check the setting of 'Monitors for ClamAV Updates' to ensure it matches the location of your ClamAV virus database files.