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.sElse, rebuild clamav RPM from the source RPM:rc.rpm
$ rpmbuild --rebuild --define '_without_milter 1' --define \ '_unpackaged_files_terminate_build 0' SRPMS/clamav-version-release.s rc.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-a utoupdate" 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.lo
`service MailScanner restart`g}"
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 :
-
98e0a922c191dc087d98f843b9d287
843f2d6fa41a5db8881ac0e59b3ff2
fd39dce7fbe28b19360f8ef457d0d1
dd41858612cbcd8acf19e60c97a373
Related Reading:
- sandip's blog
- Login or register to post comments
Comments
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:
538db6cebe88fb8821e38e22eaf454 08 -- clamav-0.85-1.ss.i386.rpm a87 -- clamav-db-0.85-1.ss.i386.rpm d37 -- clamav-devel-0.85-1.ss.i386.rp m d69 -- clamd-0.85-1.ss.i386.rpm
c30e9ec48c30feda6c6fd4b0598a4
81182fd78caa0943fcf066bb7bca0
06ec7fba19323eebf383b63c99c0e
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.