Recently I have successfully update ClamAV on OpenBSD 3.9 server. Yeah, it’s old OpenBSD version, I read there a security problem on ClamAV version 0.94 and below. I update this ClamAV to version 0.94.1 using OpenBSD ports, need some modification here to make this 3.9 work well.

On “Makefile”, remove “>” on LIB_DEPENDS section, so it will be like this

LIB_DEPENDS= gmp.6::devel/gmp \
bz2.10::archivers/bzip2 \
iconv.4::converters/libiconv

On “pkg/PLIST”, remove “@bin” and also “@sbin”, and then add “share” to “manual” path, the “manual” path will be like this

share/man/man1/clamconf.1
share/man/man1/clamdscan.1
share/man/man1/clamscan.1
share/man/man1/freshclam.1
share/man/man1/sigtool.1
share/man/man5/clamd.conf.5
share/man/man5/freshclam.conf.5
share/man/man8/clamav-milter.8
share/man/man8/clamd.8

If you finish with “make”, use “make update” on ClamAV ports to update your installed ClamAV

New version of ClamAV need “/dev/null”, so if you run ClamAV in chroot like I did, you need make /dev/null in our chroot path. For example, my chroot path for CLamAV is /var/clamav. Usually /var mounted with “nodev” so we must remove “nodev” mount option.

#mount -o dev -u /dev/wd0e
#mount
/dev/wd0a on / type ffs (local)
/dev/wd0d on /home type ffs (local, nodev, nosuid)
/dev/wd0e on /var type ffs (local, nosuid)

#mkdir /var/clamav/dev
#mknod /var/clamav/dev/null c 2 2

Make new “dev/null” belong to user that run ClamAV chroot, I use “_clamav” as my chroot user.

#chown _clamav:_clamav /var/clamav/dev/null

Just Like That … and don’t forget to update the virus database :)