Clamav fails in rar v3 freesbd

tsiou

Verified User
Joined
Sep 15, 2006
Messages
236
Location
Larisa, Greece
This was a guide for freebsd for those who get the error below as a reply to a topic in how to's. I posted it here to make it easier for bsd users to locate it.

-----------------------------------------------

/var/log/exim/mainlog

malware acl condition: clamd: ClamAV returned /var/spool/exim/scan/1GSEhp-000JJA-RN/1GSEhp-000JJA-RN-00002: RAR module failure ERROR

-----------------------------------------------

If you dont have enabled by default rar3 support to your clamav setup freebsd follow these steps :

* I've noticed that with a cd /usr/ports/security/clamav/files there were some patches including libunrar fix. After a make configure in /usr/ports/security/clamav/ i 've noticed that the extra-patch-libclamav__unrarlib.h was included and not extra-patch-libunrar.

1. install libunrar
#pkg_add libunrar
2. if you have already installed clavav delete it
#pkg_delete clamav-0.88.4
3. #cd /usr/ports/security/clamav/
#vi Makefile
goto line 124. There is an : .if defined(WITH_LIBUNRAR)

replace the else statement contents to be the same with the if's :

.if defined(WITH_LIBUNRAR)
CFLAGS+= -DUNRAR3
LDFLAGS+= -lunrar
LIB_DEPENDS+= unrar.3:${PORTSDIR}/archivers/libunrar
EXTRA_PATCHES= ${FILESDIR}/extra-patch-libunrar
.else
CFLAGS+= -DUNRAR3
LDFLAGS+= -lunrar
LIB_DEPENDS+= unrar.3:${PORTSDIR}/archivers/libunrar
EXTRA_PATCHES= ${FILESDIR}/extra-patch-libunrar
.endif


save and exit.

4. install clamav
#make install clean

5. uncomment ScanRAR in /usr/local/etc/clamd.conf

6. start the service
#/usr/local/etc/rc.d/clamav-clamd start

test it... good luck works for me...

Portupgrades after this install kept the rar3 support enabled.
 
Back
Top