mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-16 07:58:04 +00:00
- Update to 0.90.2
- Add a patch to increase performance of clamd in threaded systems [1] - Change clamav-milter rc.d script to use a var to determine seconds of timeout to wait clamd socket be started [2] - Add support to gethostbyname_r() on FreeBSD 6 and above [3] - Install clamav-config.h [3] - Fix all dependencies for klamav work fine [3] PR: ports/111130 [2], ports/111478 [3] Submitted by: Anton Yuzhaninov <citrin@rambler-co.ru> [1] Denis Eremenko <moonshade@pnhz.kz> [2] Anderson S. Ferreira <anderson@cnpm.embrapa.br> [3] Obtained from: https://wwws.clamav.net/bugzilla/show_bug.cgi?id=434 [1]
This commit is contained in:
parent
6a0c248a84
commit
661e726925
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=189917
@ -6,8 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= clamav
|
||||
PORTVERSION= 0.90.1
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 0.90.2
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= SF
|
||||
|
||||
@ -47,7 +46,6 @@ CONFIGURE_ARGS= --with-dbdir=${DBDIR} \
|
||||
--disable-clamuko \
|
||||
--disable-clamav \
|
||||
--enable-bigstack \
|
||||
--disable-gethostbyname_r \
|
||||
--enable-readdir_r \
|
||||
--disable-dependency-tracking
|
||||
CPPFLAGS+= -I${LOCALBASE}/include \
|
||||
@ -99,6 +97,12 @@ PLIST_SUB+= CLAMAVUSER=${CLAMAVUSER} \
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} < 600000
|
||||
CONFIGURE_ARGS+= --disable-gethostbyname_r
|
||||
.else
|
||||
CONFIGURE_ARGS+= --enable-gethostbyname_r
|
||||
.endif
|
||||
|
||||
# This port has a problem with -pthread,
|
||||
# force to use -lthr until it's not fixed.
|
||||
.if ${OSVERSION} >= 601000
|
||||
@ -159,6 +163,7 @@ pre-install:
|
||||
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
|
||||
post-install:
|
||||
@${INSTALL_DATA} ${WRKSRC}/clamav-config.h ${PREFIX}/include
|
||||
.for c in clamd freshclam
|
||||
@[ -f ${PREFIX}/etc/${c}.conf ] || \
|
||||
${CP} ${PREFIX}/etc/${c}.conf.default ${PREFIX}/etc/${c}.conf
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (clamav-0.90.1.tar.gz) = cd11c05b5476262eaea4fa3bd7dc25bf
|
||||
SHA256 (clamav-0.90.1.tar.gz) = 08a0255b4f6bdc4312eea6c118e79ecf684aed10640b45037d9dc5890c7687be
|
||||
SIZE (clamav-0.90.1.tar.gz) = 11643310
|
||||
MD5 (clamav-0.90.2.tar.gz) = 39d1f07a399b551b55096b6ec7325c33
|
||||
SHA256 (clamav-0.90.2.tar.gz) = 30df6a5d4a591dcd4acd7d4cce54dcfd260280fce6bbc9d19d240967bcdabbfa
|
||||
SIZE (clamav-0.90.2.tar.gz) = 12062886
|
||||
|
@ -35,11 +35,23 @@ start_precmd()
|
||||
rm "$clamav_milter_socket"
|
||||
fi
|
||||
rc_flags="--pidfile ${pidfile} ${flags:-$clamav_milter_flags} $clamav_milter_socket"
|
||||
for a in 1 2 3 4 5 6 7 8 9 10
|
||||
|
||||
echo -n "Waiting for clamd socket.. "
|
||||
i=${clamav_milter_socktimeout}
|
||||
while [ $i -ne 0 ]
|
||||
do
|
||||
[ -S "$clamav_clamd_socket" ] && break
|
||||
if [ `expr $i % 10` -eq 0 ]; then
|
||||
echo -n "${i}.. "
|
||||
fi
|
||||
sleep 1
|
||||
i=$(($i-1))
|
||||
done
|
||||
echo
|
||||
if [ $i -eq 0 ]; then
|
||||
echo "There is no clamd socket (${clamav_clamd_socket})!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# read settings, set default values
|
||||
@ -48,5 +60,6 @@ load_rc_config $name
|
||||
: ${clamav_milter_socket="%%CLAMAV_MILTER_SOCKET%%"}
|
||||
: ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
|
||||
: ${clamav_milter_flags="--postmaster-only --local --outgoing --timeout=0 --max-children=50"}
|
||||
: ${clamav_milter_socktimeout="60"}
|
||||
|
||||
run_rc_command "$1"
|
||||
|
65
security/clamav/files/patch-libclamav__matcher-ac.c
Normal file
65
security/clamav/files/patch-libclamav__matcher-ac.c
Normal file
@ -0,0 +1,65 @@
|
||||
--- libclamav/matcher-ac.c.orig Mon Apr 9 19:16:01 2007
|
||||
+++ libclamav/matcher-ac.c Mon Apr 9 19:25:18 2007
|
||||
@@ -301,7 +301,7 @@
|
||||
|
||||
int cli_ac_initdata(struct cli_ac_data *data, unsigned int partsigs, unsigned int tracklen)
|
||||
{
|
||||
- unsigned int i, j;
|
||||
+ unsigned int i;
|
||||
|
||||
|
||||
if(!data) {
|
||||
@@ -366,30 +366,26 @@
|
||||
* allocation in cli_ac_scanbuff()
|
||||
*/
|
||||
|
||||
- for(i = 0; i < partsigs; i++) {
|
||||
- data->partoff[i] = (unsigned int *) cli_calloc(tracklen, sizeof(unsigned int));
|
||||
+ data->partoff[0] = (unsigned int *) cli_calloc(partsigs * tracklen, sizeof(unsigned int));
|
||||
|
||||
- if(!data->partoff[i]) {
|
||||
- for(j = 0; j < i; j++)
|
||||
- free(data->partoff[j]);
|
||||
-
|
||||
- free(data->partoff);
|
||||
- free(data->partcnt);
|
||||
- free(data->offcnt);
|
||||
- free(data->offidx);
|
||||
- free(data->maxshift);
|
||||
- cli_errmsg("cli_ac_init(): unable to cli_calloc(%u, %u)\n", tracklen, sizeof(unsigned int));
|
||||
- return CL_EMEM;
|
||||
- }
|
||||
+ if(!data->partoff[0]) {
|
||||
+ free(data->partoff);
|
||||
+ free(data->partcnt);
|
||||
+ free(data->offcnt);
|
||||
+ free(data->offidx);
|
||||
+ free(data->maxshift);
|
||||
+ cli_errmsg("cli_ac_init(): unable to cli_calloc(%u, %u)\n", partsigs * tracklen, sizeof(unsigned int));
|
||||
+ return CL_EMEM;
|
||||
}
|
||||
|
||||
+ for(i = 0; i < partsigs; i++)
|
||||
+ data->partoff[i] = data->partoff[0] + tracklen * i;
|
||||
+
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
void cli_ac_freedata(struct cli_ac_data *data)
|
||||
{
|
||||
- unsigned int i;
|
||||
-
|
||||
|
||||
if(data && data->partsigs) {
|
||||
free(data->partcnt);
|
||||
@@ -397,9 +393,7 @@
|
||||
free(data->offidx);
|
||||
free(data->maxshift);
|
||||
|
||||
- for(i = 0; i < data->partsigs; i++)
|
||||
- free(data->partoff[i]);
|
||||
-
|
||||
+ free(data->partoff[0]);
|
||||
free(data->partoff);
|
||||
}
|
||||
}
|
@ -8,6 +8,7 @@ bin/sigtool
|
||||
%%CLAMAV-MILTER%%sbin/clamav-milter
|
||||
sbin/clamd
|
||||
include/clamav.h
|
||||
include/clamav-config.h
|
||||
lib/libclamav.so.2
|
||||
lib/libclamav.so
|
||||
lib/libclamav.a
|
||||
|
Loading…
Reference in New Issue
Block a user