From 323a3affc3b2f2413e749b6f680d0c3ddfd86caa Mon Sep 17 00:00:00 2001 From: sthen Date: Sat, 11 Apr 2009 14:13:58 +0000 Subject: [PATCH] security update to 0.95.1. it doesn't build with ports-tree libtool, so use the bundled one and mark with XXX until it can be fixed better. commit requested by mbalmer (maintainer). --- security/clamav/Makefile | 29 ++++++++------- security/clamav/distinfo | 10 ++--- .../patch-clamav_milter-clamav_milter_c | 20 ---------- .../clamav/patches/patch-clamd_Makefile_in | 14 +++---- .../clamav/patches/patch-database_Makefile_in | 8 ++-- security/clamav/patches/patch-etc-clamd_conf | 10 ++--- security/clamav/patches/patch-etc_Makefile_in | 10 +++-- .../patches/patch-libclamav_Makefile_am | 12 ------ .../patches/patch-libclamav_Makefile_in | 37 ++++++++++++++----- .../clamav/patches/patch-libclamav_mbox_c | 8 ++-- security/clamav/patches/patch-libclamav_str_c | 12 +++--- security/clamav/pkg/PLIST | 19 +++++++--- 12 files changed, 93 insertions(+), 96 deletions(-) delete mode 100644 security/clamav/patches/patch-clamav_milter-clamav_milter_c delete mode 100644 security/clamav/patches/patch-libclamav_Makefile_am diff --git a/security/clamav/Makefile b/security/clamav/Makefile index b33943dae73..7322456f037 100644 --- a/security/clamav/Makefile +++ b/security/clamav/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.41 2008/12/13 10:19:09 mbalmer Exp $ +# $OpenBSD: Makefile,v 1.42 2009/04/11 14:13:58 sthen Exp $ COMMENT= virus scanner -DISTNAME= clamav-0.94.2 +DISTNAME= clamav-0.95.1 CATEGORIES= security -SHARED_LIBS= clamav 10.0 \ - clamunrar 1.0 \ - clamunrar_iface 1.0 +SHARED_LIBS= clamav 11.0 \ + clamunrar 2.0 \ + clamunrar_iface 2.0 HOMEPAGE= http://www.clamav.net/ @@ -17,12 +17,11 @@ PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WANTLIB= c milter pthread wrap z +WANTLIB= c milter ncurses pthread z BUILD_DEPENDS= ::devel/check -LIB_DEPENDS= gmp.>=6::devel/gmp \ - bz2.>=10::archivers/bzip2 \ +LIB_DEPENDS= bz2.>=10::archivers/bzip2 \ iconv.>=4::converters/libiconv RUN_DEPENDS= :lha-*:archivers/lha \ @@ -32,8 +31,12 @@ RUN_DEPENDS= :lha-*:archivers/lha \ USE_LIBTOOL= Yes -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=clamav/} \ - ${HOMEPAGE} +# XXX dlopen() of modules fails with the ports-tree libltdl. +# the bundled libltdl won't build with ports-tree libtool; +# use bundled versions of both for now. +LIBTOOL= ${WRKSRC}/libtool + +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=clamav/} CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= ${CONFIGURE_SHARED} @@ -49,7 +52,7 @@ CONFIGURE_ARGS+= --disable-clamav \ REGRESS_TARGET= check -CONFIGURE_ENV+= LDFLAGS="-pthread -L/usr/lib -L../libclamav/.libs -L${LOCALBASE}/lib" \ +CONFIGURE_ENV+= LDFLAGS="-pthread -L/usr/lib -L${WRKSRC}/libclamav/.libs -L${LOCALBASE}/lib" \ CPPFLAGS="-I/usr/include -I${LOCALBASE}/include" DOCS= clamav-mirror-howto.pdf clamdoc.pdf signatures.pdf @@ -58,8 +61,8 @@ post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/clamav \ ${PREFIX}/share/examples/clamav cd ${WRKSRC}/docs; ${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/clamav - cd ${WRKSRC}/etc; ${INSTALL_DATA} clamd.conf \ - freshclam.conf ${PREFIX}/share/examples/clamav + cd ${WRKSRC}/etc; ${INSTALL_DATA} clamd.conf freshclam.conf \ + clamav-milter.conf ${PREFIX}/share/examples/clamav cd ${WRKSRC}/examples; ${INSTALL_DATA} ex1.c \ ${PREFIX}/share/examples/clamav diff --git a/security/clamav/distinfo b/security/clamav/distinfo index 7bdffc3398f..cd2c82157e3 100644 --- a/security/clamav/distinfo +++ b/security/clamav/distinfo @@ -1,5 +1,5 @@ -MD5 (clamav-0.94.2.tar.gz) = EYHm1iNBuEcI8SbMNT9+vw== -RMD160 (clamav-0.94.2.tar.gz) = rnXl9Ub5a3/Q923Pn0l37JW6Tbo= -SHA1 (clamav-0.94.2.tar.gz) = gjc9JduLg2/YiyQU30O7DHGSzO0= -SHA256 (clamav-0.94.2.tar.gz) = Gux/7P83WVjQZ6zuuXgtP/C+fBO+0O7PYkD7CJ+NJow= -SIZE (clamav-0.94.2.tar.gz) = 22107637 +MD5 (clamav-0.95.1.tar.gz) = yALUs3LkVYSc/LDXdvxy2A== +RMD160 (clamav-0.95.1.tar.gz) = gHacCcoVyGSleCBv6r6cxKPZhbQ= +SHA1 (clamav-0.95.1.tar.gz) = pGmwEoz16dGDkqA4VBf8XkV1v8c= +SHA256 (clamav-0.95.1.tar.gz) = YWGg/6mIFmz+PCr7MFa3kfP3AoX8h/VHYSQnvVf2O30= +SIZE (clamav-0.95.1.tar.gz) = 24260964 diff --git a/security/clamav/patches/patch-clamav_milter-clamav_milter_c b/security/clamav/patches/patch-clamav_milter-clamav_milter_c deleted file mode 100644 index abdb0a2c8ac..00000000000 --- a/security/clamav/patches/patch-clamav_milter-clamav_milter_c +++ /dev/null @@ -1,20 +0,0 @@ ---- clamav-milter/clamav-milter.c.orig Thu Oct 16 09:29:55 2008 -+++ clamav-milter/clamav-milter.c Fri Nov 7 02:29:18 2008 -@@ -1204,7 +1204,7 @@ main(int argc, char **argv) - * uid == 0 for that - */ - on = 1; -- if(setsockopt(broadcastSock, SOL_SOCKET, SO_BROADCAST, (int *)&on, sizeof(on)) < 0) { -+ if(setsockopt(broadcastSock, SOL_SOCKET, 0, (int *)&on, sizeof(on)) < 0) { - perror("setsockopt"); - return EX_UNAVAILABLE; - } -@@ -1227,7 +1227,7 @@ main(int argc, char **argv) - memset(&ifr, '\0', sizeof(struct ifreq)); - strncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name) - 1); - ifr.ifr_name[sizeof(ifr.ifr_name)-1]='\0'; -- if(setsockopt(broadcastSock, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr)) < 0) { -+ if(setsockopt(broadcastSock, SOL_SOCKET, 0, &ifr, sizeof(ifr)) < 0) { - perror(iface); - return EX_CONFIG; - } diff --git a/security/clamav/patches/patch-clamd_Makefile_in b/security/clamav/patches/patch-clamd_Makefile_in index 2f5f27977ae..68a75431202 100644 --- a/security/clamav/patches/patch-clamd_Makefile_in +++ b/security/clamav/patches/patch-clamd_Makefile_in @@ -1,7 +1,7 @@ -$OpenBSD: patch-clamd_Makefile_in,v 1.9 2008/11/07 22:33:06 sthen Exp $ ---- clamd/Makefile.in.orig Thu Oct 30 16:13:30 2008 -+++ clamd/Makefile.in Fri Nov 7 02:30:10 2008 -@@ -157,7 +157,9 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ +$OpenBSD: patch-clamd_Makefile_in,v 1.10 2009/04/11 14:13:59 sthen Exp $ +--- clamd/Makefile.in.orig Tue Apr 7 18:56:25 2009 ++++ clamd/Makefile.in Fri Apr 10 14:58:49 2009 +@@ -160,7 +160,9 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCOV = @LCOV@ LD = @LD@ @@ -9,6 +9,6 @@ $OpenBSD: patch-clamd_Makefile_in,v 1.9 2008/11/07 22:33:06 sthen Exp $ +# Do not generate "LDFLAGS = -L/usr/local/lib" to build on systems that have +# have an older libclamav installed. +# LDFLAGS = @LDFLAGS@ - LIBBZ2 = @LIBBZ2@ - LIBBZ2_PREFIX = @LIBBZ2_PREFIX@ - LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@ + LIBADD_DL = @LIBADD_DL@ + LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ + LIBADD_DLOPEN = @LIBADD_DLOPEN@ diff --git a/security/clamav/patches/patch-database_Makefile_in b/security/clamav/patches/patch-database_Makefile_in index 61d4fc33910..c42af9ccb50 100644 --- a/security/clamav/patches/patch-database_Makefile_in +++ b/security/clamav/patches/patch-database_Makefile_in @@ -1,7 +1,7 @@ -$OpenBSD: patch-database_Makefile_in,v 1.4 2008/11/07 22:33:06 sthen Exp $ ---- database/Makefile.in.orig Thu Oct 30 16:13:31 2008 -+++ database/Makefile.in Fri Nov 7 02:29:18 2008 -@@ -382,21 +382,7 @@ uninstall-am: +$OpenBSD: patch-database_Makefile_in,v 1.5 2009/04/11 14:13:59 sthen Exp $ +--- database/Makefile.in.orig Tue Apr 7 18:56:26 2009 ++++ database/Makefile.in Fri Apr 10 14:58:49 2009 +@@ -397,21 +397,7 @@ uninstall-am: install-data-local: diff --git a/security/clamav/patches/patch-etc-clamd_conf b/security/clamav/patches/patch-etc-clamd_conf index 7e7e581271b..500a08a14e8 100644 --- a/security/clamav/patches/patch-etc-clamd_conf +++ b/security/clamav/patches/patch-etc-clamd_conf @@ -1,5 +1,5 @@ ---- etc/clamd.conf.orig Tue Sep 2 12:59:05 2008 -+++ etc/clamd.conf Fri Sep 5 02:32:34 2008 +--- etc/clamd.conf.orig Tue Apr 7 11:32:06 2009 ++++ etc/clamd.conf Fri Apr 10 14:58:49 2009 @@ -11,7 +11,7 @@ Example # LogFile must be writable for the user running daemon. # A full path is required. @@ -16,9 +16,9 @@ -#DatabaseDirectory /var/lib/clamav +#DatabaseDirectory /var/db/clamav - # The daemon works in a local OR a network mode. Due to security reasons we - # recommend the local mode. -@@ -147,7 +147,7 @@ LocalSocket /tmp/clamd.socket + # The daemon can work in local mode, network mode or both. + # Due to security reasons we recommend the local mode. +@@ -167,7 +167,7 @@ LocalSocket /tmp/clamd.socket # Run as another user (clamd must be started by root for this option to work) # Default: don't drop privileges diff --git a/security/clamav/patches/patch-etc_Makefile_in b/security/clamav/patches/patch-etc_Makefile_in index 986cea93864..0223f3ff302 100644 --- a/security/clamav/patches/patch-etc_Makefile_in +++ b/security/clamav/patches/patch-etc_Makefile_in @@ -1,7 +1,7 @@ -$OpenBSD: patch-etc_Makefile_in,v 1.4 2008/11/07 22:33:06 sthen Exp $ ---- etc/Makefile.in.orig Thu Oct 30 16:13:31 2008 -+++ etc/Makefile.in Fri Nov 7 02:29:18 2008 -@@ -381,11 +381,7 @@ uninstall-am: +$OpenBSD: patch-etc_Makefile_in,v 1.5 2009/04/11 14:13:59 sthen Exp $ +--- etc/Makefile.in.orig Tue Apr 7 18:56:26 2009 ++++ etc/Makefile.in Fri Apr 10 14:58:49 2009 +@@ -396,13 +396,7 @@ uninstall-am: install-data-local: @@ -10,6 +10,8 @@ $OpenBSD: patch-etc_Makefile_in,v 1.4 2008/11/07 22:33:06 sthen Exp $ - $(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST) - @test -f $(DESTDIR)$(CFGINST)/freshclam.conf || \ - $(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST) +-@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ @test -f $(DESTDIR)$(CFGINST)/clamav-milter.conf || \ +-@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@ $(INSTALL_DATA) $(srcdir)/clamav-milter.conf $(DESTDIR)$(CFGINST) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/security/clamav/patches/patch-libclamav_Makefile_am b/security/clamav/patches/patch-libclamav_Makefile_am deleted file mode 100644 index e7cbf22cdce..00000000000 --- a/security/clamav/patches/patch-libclamav_Makefile_am +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-libclamav_Makefile_am,v 1.8 2008/11/07 22:33:06 sthen Exp $ ---- libclamav/Makefile.am.orig Tue Oct 7 09:19:25 2008 -+++ libclamav/Makefile.am Fri Nov 7 02:29:18 2008 -@@ -22,7 +22,7 @@ AM_CPPFLAGS = -I$(top_srcdir) -I@srcdir@/nsis -I@srcdi - - libclamav_la_LIBADD = lzma/liblzma.la @CLAMAV_UNRAR_LIBS@ @LIBCLAMAV_LIBS@ @THREAD_LIBS@ - --libclamav_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ -no-undefined -+libclamav_la_LDFLAGS = @TH_SAFE@ $(LIBclamav_LTVERSION) -no-undefined - - if VERSIONSCRIPT - libclamav_la_LDFLAGS += -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamav/libclamav.map diff --git a/security/clamav/patches/patch-libclamav_Makefile_in b/security/clamav/patches/patch-libclamav_Makefile_in index ddbc9a6f2fe..fb45c31ad58 100644 --- a/security/clamav/patches/patch-libclamav_Makefile_in +++ b/security/clamav/patches/patch-libclamav_Makefile_in @@ -1,12 +1,29 @@ -$OpenBSD: patch-libclamav_Makefile_in,v 1.9 2008/11/07 22:33:06 sthen Exp $ ---- libclamav/Makefile.in.orig Thu Oct 30 16:13:31 2008 -+++ libclamav/Makefile.in Fri Nov 7 02:31:12 2008 -@@ -283,7 +283,7 @@ top_srcdir = @top_srcdir@ - SUBDIRS = lzma . - AM_CPPFLAGS = -I$(top_srcdir) -I@srcdir@/nsis -I@srcdir@/lzma - libclamav_la_LIBADD = lzma/liblzma.la @CLAMAV_UNRAR_LIBS@ @LIBCLAMAV_LIBS@ @THREAD_LIBS@ --libclamav_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ \ +$OpenBSD: patch-libclamav_Makefile_in,v 1.10 2009/04/11 14:13:59 sthen Exp $ +--- libclamav/Makefile.in.orig Tue Apr 7 18:56:26 2009 ++++ libclamav/Makefile.in Fri Apr 10 16:26:37 2009 +@@ -424,7 +424,7 @@ EXTRA_DIST = $(am__append_4) regex/engine.c libclamav. + jsparse/generated/operators.h jsparse/generated/keywords.h \ + jsparse/future_reserved_words.list jsparse/keywords.list \ + jsparse/special_keywords.list jsparse/operators.gperf +-@ENABLE_UNRAR_TRUE@libclamunrar_la_LDFLAGS = @TH_SAFE@ -version-info \ ++@ENABLE_UNRAR_TRUE@libclamunrar_la_LDFLAGS = @TH_SAFE@ $(LIBclamunrar_LTVERSION) \ + @ENABLE_UNRAR_TRUE@ @LIBCLAMAV_VERSION@ -no-undefined \ + @ENABLE_UNRAR_TRUE@ $(am__append_2) + @ENABLE_UNRAR_TRUE@libclamunrar_la_SOURCES = \ +@@ -448,7 +448,7 @@ EXTRA_DIST = $(am__append_4) regex/engine.c libclamav. + + @ENABLE_UNRAR_TRUE@libclamunrar_iface_la_LIBADD = libclamunrar.la + @ENABLE_UNRAR_TRUE@libclamunrar_iface_la_LDFLAGS = -module @TH_SAFE@ \ +-@ENABLE_UNRAR_TRUE@ -version-info @LIBCLAMAV_VERSION@ \ ++@ENABLE_UNRAR_TRUE@ $(LIBclamunrar_iface_LTVERSION) @LIBCLAMAV_VERSION@ \ + @ENABLE_UNRAR_TRUE@ -no-undefined $(am__append_5) + @ENABLE_UNRAR_TRUE@libclamunrar_iface_la_SOURCES = \ + @ENABLE_UNRAR_TRUE@ ../libclamunrar_iface/unrar_iface.c \ +@@ -498,6 +498,7 @@ libclamav_la_LIBADD = @LIBLTDL@ $(IFACELIBADD) lzma/li + libclamav_la_DEPENDENCIES = @LTDLDEPS@ $(IFACEDEP) libclamav_internal_utils.la + libclamav_la_CFLAGS = -DSEARCH_LIBDIR=\"$(libdir)\" + libclamav_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ \ +libclamav_la_LDFLAGS = @TH_SAFE@ $(LIBclamav_LTVERSION) @LIBCLAMAV_VERSION@ \ - -no-undefined $(am__append_1) + -no-undefined $(am__append_6) include_HEADERS = clamav.h - libclamav_la_SOURCES = \ + libclamav_la_SOURCES = clamav.h matcher-ac.c matcher-ac.h matcher-bm.c \ diff --git a/security/clamav/patches/patch-libclamav_mbox_c b/security/clamav/patches/patch-libclamav_mbox_c index d15c00f4375..ef7a1e506b9 100644 --- a/security/clamav/patches/patch-libclamav_mbox_c +++ b/security/clamav/patches/patch-libclamav_mbox_c @@ -1,7 +1,7 @@ ---- libclamav/mbox.c.orig Wed Apr 9 17:29:28 2008 -+++ libclamav/mbox.c Mon Apr 14 18:41:12 2008 -@@ -32,11 +32,6 @@ static char const rcsid[] = "$Id: mbox.c,v 1.381 2007/ - #define NDEBUG /* map CLAMAV debug onto standard */ +--- libclamav/mbox.c.orig Mon Mar 23 12:48:33 2009 ++++ libclamav/mbox.c Tue Mar 24 00:43:32 2009 +@@ -28,11 +28,6 @@ static char const rcsid[] = "$Id: mbox.c,v 1.381 2007/ + #include "clamav-config.h" #endif -#ifdef CL_THREAD_SAFE diff --git a/security/clamav/patches/patch-libclamav_str_c b/security/clamav/patches/patch-libclamav_str_c index 2aad9a4c1fb..dd82aac6672 100644 --- a/security/clamav/patches/patch-libclamav_str_c +++ b/security/clamav/patches/patch-libclamav_str_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-libclamav_str_c,v 1.5 2008/11/07 22:33:06 sthen Exp $ ---- libclamav/str.c.orig Thu Oct 16 09:29:55 2008 -+++ libclamav/str.c Fri Nov 7 02:29:18 2008 -@@ -152,9 +152,9 @@ char *cli_hex2str(const char *hex) +$OpenBSD: patch-libclamav_str_c,v 1.6 2009/04/11 14:13:59 sthen Exp $ +--- libclamav/str.c.orig Mon Mar 16 18:37:27 2009 ++++ libclamav/str.c Tue Mar 24 00:43:32 2009 +@@ -166,9 +166,9 @@ int cli_hex2str_to(const char *hex, unsigned char *ptr for(i = 0; i < len; i += 2) { if((c = cli_hex2int(hex[i])) >= 0) { @@ -11,5 +11,5 @@ $OpenBSD: patch-libclamav_str_c,v 1.5 2008/11/07 22:33:06 sthen Exp $ - val = (val << 4) + c; + val = (val << 4) + (char)c; } else { - free(str); - return NULL; + return -1; + } diff --git a/security/clamav/pkg/PLIST b/security/clamav/pkg/PLIST index 88426bc10a3..042a117b095 100644 --- a/security/clamav/pkg/PLIST +++ b/security/clamav/pkg/PLIST @@ -1,9 +1,10 @@ -@comment $OpenBSD: PLIST,v 1.11 2008/07/08 22:38:12 sthen Exp $ +@comment $OpenBSD: PLIST,v 1.12 2009/04/11 14:13:59 sthen Exp $ @newgroup _clamav:539 @newuser _clamav:539:539:daemon:Clam AntiVirus:/nonexistent:/sbin/nologin bin/clamav-config @bin bin/clamconf @bin bin/clamdscan +@bin bin/clamdtop @bin bin/clamscan @bin bin/freshclam @bin bin/sigtool @@ -18,6 +19,7 @@ lib/pkgconfig/ lib/pkgconfig/libclamav.pc @man man/man1/clamconf.1 @man man/man1/clamdscan.1 +@man man/man1/clamdtop.1 @man man/man1/clamscan.1 @man man/man1/freshclam.1 @man man/man1/sigtool.1 @@ -32,11 +34,8 @@ share/doc/clamav/clamav-mirror-howto.pdf share/doc/clamav/clamdoc.pdf share/doc/clamav/signatures.pdf share/examples/clamav/ -share/examples/clamav/clamd.conf -@sample ${SYSCONFDIR}/clamd.conf -share/examples/clamav/ex1.c -share/examples/clamav/freshclam.conf -@sample ${SYSCONFDIR}/freshclam.conf +share/examples/clamav/clamav-milter.conf +@sample ${SYSCONFDIR}/clamav-milter.conf %%SHARED%% @owner _clamav @group _clamav @@ -49,3 +48,11 @@ share/examples/clamav/freshclam.conf @extraunexec rm -fr /var/db/clamav/* @extraunexec rm -fr /var/spool/clamav/* @extraunexec rm -fr /var/clamav/* +@mode +@owner +@group +share/examples/clamav/clamd.conf +@sample ${SYSCONFDIR}/clamd.conf +share/examples/clamav/ex1.c +share/examples/clamav/freshclam.conf +@sample ${SYSCONFDIR}/freshclam.conf