Bug 72203 - [PATCH] security/clamav: update to version 0.80rc3
Summary: [PATCH] security/clamav: update to version 0.80rc3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Oliver Eikemeier
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-30 17:20 UTC by Oliver Eikemeier
Modified: 2004-10-18 11:12 UTC (History)
0 users

See Also:


Attachments
file.diff (10.66 KB, patch)
2004-09-30 17:20 UTC, Oliver Eikemeier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Eikemeier 2004-09-30 17:20:13 UTC
- update to version 0.80rc3:
    JPEG Exploit (MS04-028) Detection
- needs entry in UPDATING:
    config file changed fromclamav.conf to clamd.conf
Comment 1 Oliver Eikemeier freebsd_committer freebsd_triage 2004-09-30 18:16:40 UTC
State Changed
From-To: open->feedback

Asked maintainer for approval 


Comment 2 Oliver Eikemeier freebsd_committer freebsd_triage 2004-09-30 18:16:40 UTC
Responsible Changed
From-To: freebsd-ports-bugs->eik

Handle my own patches
Comment 3 Oliver Eikemeier 2004-09-30 18:22:27 UTC
Dear Maintainer,

could you please review the patch in PR 72203
   <http://www.freebsd.org/cgi/query-pr.cgi?pr=72203>
especially the milter stuff (untested) and approve or reject it?

Thanks
-Oliver
Comment 4 Oliver Eikemeier 2004-10-08 15:08:56 UTC
Rob Evers wrote:

> Hi Oliver,
> 
> The milter doesn't compile on:
> 
> FreeBSD flappie.debank.tv 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Sun Feb 29
> 20:35:15 CET 2004     rob@flappie.debank.tv:/usr/obj/usr/src/sys/FLAPPIE
> i386
> and
> FreeBSD dokus.debank.tv 4.10-PRERELEASE FreeBSD 4.10-PRERELEASE #0: Wed
> May 19 12:51:26 CEST 2004
> rob@dokus.debank.tv:/usr/obj/usr/src/sys/DOKUS  i386

Sorry. Try this patch:
-Oliver

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/security/clamav/Makefile,v
retrieving revision 1.39
diff -u -u -r1.39 Makefile
--- Makefile	8 Aug 2004 14:05:38 -0000	1.39
+++ Makefile	6 Oct 2004 23:41:29 -0000
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	clamav
-PORTVERSION=	${DISTVERSION:S/-rc//g:S/-/./g}
+PORTVERSION=	${DISTVERSION:C/([a-z])[a-z]*/.\1/g:S/-/./g}
 CATEGORIES=	security
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
 MASTER_SITE_SUBDIR=	clamav
@@ -23,7 +23,7 @@
 		arc:${PORTSDIR}/archivers/arc \
 		unzip:${PORTSDIR}/archivers/unzip
 
-DISTVERSION=	0.75.1
+DISTVERSION=	0.80rc3
 
 OPTIONS=	MILTER "Compile the milter interface" off
 USE_REINPLACE=	yes
@@ -41,6 +41,7 @@
 		--disable-clamuko \
 		--disable-clamav \
 		--enable-bigstack \
+		--disable-gethostbyname_r \
 		--disable-dependency-tracking
 CPPFLAGS+=	-I${LOCALBASE}/include \
 		${PTHREAD_CFLAGS}
@@ -49,7 +50,7 @@
 CONFIGURE_ENV+=	CPPFLAGS="${CPPFLAGS}" \
 		LDFLAGS="${LDFLAGS}"
 MAN1=		clamscan.1 freshclam.1 sigtool.1 clamdscan.1
-MAN5=		clamav.conf.5 freshclam.conf.5
+MAN5=		clamd.conf.5 freshclam.conf.5
 MAN8=		clamd.8 clamav-milter.8
 
 CONFLICTS=	clamav-devel-[0-9]*
@@ -67,16 +68,15 @@
 		-e 's|%%CLAMAV_MILTER_SOCKET%%|${CLAMAV_MILTER_SOCKET}|g'
 
 SED_CONF=	-E -e 's|^\#?(Example)$$|\#\1|' \
-		-e 's|^\#?(LogFile) .*$$|\1 /var/log/clamav/clamd.log|' \
-		-e 's|^\#?(PidFile) .*$$|\1 /var/run/clamav/clamd.pid|' \
+		-e 's|^\#?((Update)?LogFile) .*/([a-z]+\.log)$$|\1 /var/log/clamav/\3|' \
+		-e 's|^\#?(PidFile) .*/([a-z]+\.pid)$$|\1 /var/run/clamav/\2|' \
 		-e 's|^\#?(LocalSocket) .*$$|\1 ${CLAMAV_CLAMD_SOCKET}|' \
 		-e 's|^\#?(User) .*$$|\1 ${CLAMAVUSER}|' \
 		-e 's|^\#?(AllowSupplementaryGroups)$$|\1|' \
 		-e 's|^\#?(ScanMail)$$|\1|' \
-		-e 's|^\#?(Checks)$$|\#\1|' \
+		-e 's|^\#?(NotifyClamd)$$|\1|' \
 		-e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DATADIR}|' \
 		-e 's|^\#?(DatabaseOwner) .*$$|\1 ${CLAMAVUSER}|' \
-		-e 's|^\#?(UpdateLogFile) .*$$|\1 /var/log/clamav/freshclam.log|' \
 		-e 's|^\#?(FixStaleSocket)$$|\1|'
 
 PLIST_SUB+=	CLAMAVUSER=${CLAMAVUSER} \
@@ -111,7 +111,7 @@
 		${WRKSRC}/Makefile.in
 
 post-build:
-	@${REINPLACE_CMD} ${SED_CONF} ${BUILD_WRKSRC}/etc/clamav.conf
+	@${REINPLACE_CMD} ${SED_CONF} ${BUILD_WRKSRC}/etc/clamd.conf
 	@${REINPLACE_CMD} ${SED_CONF} ${BUILD_WRKSRC}/etc/freshclam.conf
 	@${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-install >${PKGINSTALL}
 	@${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-deinstall >${PKGDEINSTALL}
@@ -134,7 +134,7 @@
 	@${INSTALL_SCRIPT} ${WRKDIR}/clamav-freshclam.sh \
 		${RC_DIR}/clamav-freshclam${RC_SUFX}
 	@${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DATADIR}
-.for c in clamav freshclam
+.for c in clamd freshclam
 	@[ -f ${PREFIX}/etc/${c}.conf ] || \
 		${CP} ${PREFIX}/etc/${c}.conf.default ${PREFIX}/etc/${c}.conf
 .endfor
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/security/clamav/distinfo,v
retrieving revision 1.13
diff -u -u -r1.13 distinfo
--- distinfo	8 Aug 2004 14:05:38 -0000	1.13
+++ distinfo	29 Sep 2004 16:54:12 -0000
@@ -1,2 +1,2 @@
-MD5 (clamav-0.75.1.tar.gz) = 2c85b7957eba9fd9e9ff8c2537ae006f
-SIZE (clamav-0.75.1.tar.gz) = 2777319
+MD5 (clamav-0.80rc3.tar.gz) = 359d5bc28bdde382f01c308608b70b0b
+SIZE (clamav-0.80rc3.tar.gz) = 2625409
Index: pkg-install
===================================================================
RCS file: /home/ncvs/ports/security/clamav/pkg-install,v
retrieving revision 1.7
diff -u -u -r1.7 pkg-install
--- pkg-install	30 May 2004 08:01:22 -0000	1.7
+++ pkg-install	29 Sep 2004 18:36:42 -0000
@@ -48,11 +48,23 @@
 		chown "$CLAMAVUSER:$CLAMAVGROUP" "$CLAMLOG" || exit 1
 	fi
 
-	if [ ! -d "${DATADIR}" ]; then
+	if [ ! -d "$DATADIR" ]; then
 		mkdir -p "$DATADIR" || exit 1
 		chown "$CLAMAVUSER:$CLAMAVGROUP" "$DATADIR" || exit 1
 	fi
 
+	if [ -f "$PREFIX/etc/clamav.conf" ]; then
+		echo
+		echo "**************** WARNING ****************"
+		echo "*                                       *"
+		echo "*  The configuration file has changed:  *"
+		echo "* Please edit $PREFIX/etc/clamd.conf *"
+		echo "* and remove $PREFIX/etc/clamav.conf *"
+		echo "*                                       *"
+		echo "**************** WARNING ****************"
+		echo
+	fi
+
 fi
 
 exit 0
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/security/clamav/pkg-plist,v
retrieving revision 1.14
diff -u -u -r1.14 pkg-plist
--- pkg-plist	15 Jun 2004 10:04:48 -0000	1.14
+++ pkg-plist	29 Sep 2004 17:02:03 -0000
@@ -16,9 +16,9 @@
 lib/libclamav.so
 lib/libclamav.a
 libdata/pkgconfig/libclamav.pc
-@unexec if cmp -s %D/etc/clamav.conf %D/etc/clamav.conf.default; then rm -f %D/etc/clamav.conf; fi
-etc/clamav.conf.default
-@exec [ -f %B/clamav.conf ] || cp %B/%f %B/clamav.conf
+@unexec if cmp -s %D/etc/clamd.conf %D/etc/clamd.conf.default; then rm -f %D/etc/clamd.conf; fi
+etc/clamd.conf.default
+@exec [ -f %B/clamd.conf ] || cp %B/%f %B/clamd.conf
 @unexec if cmp -s %D/etc/freshclam.conf %D/etc/freshclam.conf.default; then rm -f %D/etc/freshclam.conf; fi
 etc/freshclam.conf.default
 @exec [ -f %B/freshclam.conf ] || cp %B/%f %B/freshclam.conf
Index: files/clamav-clamd.sh
===================================================================
RCS file: /home/ncvs/ports/security/clamav/files/clamav-clamd.sh,v
retrieving revision 1.3
diff -u -u -r1.3 clamav-clamd.sh
--- files/clamav-clamd.sh	19 Apr 2004 15:21:33 -0000	1.3
+++ files/clamav-clamd.sh	29 Sep 2004 18:13:35 -0000
@@ -24,20 +24,12 @@
 command=%%PREFIX%%/sbin/clamd
 pidfile=/var/run/clamav/clamd.pid
 required_dirs=%%DATADIR%%
-required_files=%%PREFIX%%/etc/clamav.conf
+required_files=%%PREFIX%%/etc/clamd.conf
 
-stop_postcmd=stop_postcmd
+# read settings, set default values
+load_rc_config "$name"
+: ${clamav_clamd_enable="NO"}
+: ${clamav_clamd_flags=""}
+: ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
 
-stop_postcmd()
-{
-  rm -f $pidfile
-}
-
-# set defaults
-
-clamav_clamd_enable=${clamav_clamd_enable:-"NO"}
-clamav_clamd_flags=${clamav_clamd_flags:-""}
-clamav_clamd_socket=${clamav_clamd_socket:-"%%CLAMAV_CLAMD_SOCKET%%"}
-
-load_rc_config $name
 run_rc_command "$1"
Index: files/clamav-freshclam.sh
===================================================================
RCS file: /home/ncvs/ports/security/clamav/files/clamav-freshclam.sh,v
retrieving revision 1.3
diff -u -u -r1.3 clamav-freshclam.sh
--- files/clamav-freshclam.sh	15 Jun 2004 10:04:48 -0000	1.3
+++ files/clamav-freshclam.sh	29 Sep 2004 18:14:38 -0000
@@ -9,7 +9,7 @@
 # KEYWORD: FreeBSD shutdown
 
 #
-# Add the following lines to /etc/rc.conf to enable freshclam daemon:
+# Add the following lines to /etc/rc.conf to enable the freshclam daemon:
 #
 #clamav_freshclam_enable="YES"
 #
@@ -22,16 +22,14 @@
 rcvar=`set_rcvar`
 
 command=%%PREFIX%%/bin/freshclam
+pidfile=/var/run/clamav/freshclam.pid
+command_args="--daemon"
 required_dirs=%%DATADIR%%
 required_files=%%PREFIX%%/etc/freshclam.conf
 
-# set defaults
+# read settings, set default values
+load_rc_config "$name"
+: ${clamav_freshclam_enable="NO"}
+: ${clamav_freshclam_flags=""}
 
-clamav_freshclam_enable=${clamav_freshclam_enable:-"NO"}
-clamav_freshclam_flags=${clamav_freshclam_flags:-"--pid=/var/run/clamav/freshclam.pid --daemon-notify=%%PREFIX%%/etc/clamav.conf"}
-
-load_rc_config $name
-
-# add --daemon to any given arguments
-clamav_freshclam_flags="${clamav_freshclam_flags} --daemon"
 run_rc_command "$1"
Index: files/clamav-milter.sh
===================================================================
RCS file: /home/ncvs/ports/security/clamav/files/clamav-milter.sh,v
retrieving revision 1.2
diff -u -u -r1.2 clamav-milter.sh
--- files/clamav-milter.sh	30 Jan 2004 15:19:22 -0000	1.2
+++ files/clamav-milter.sh	29 Sep 2004 17:29:12 -0000
@@ -23,7 +23,7 @@
 
 command=%%PREFIX%%/sbin/clamav-milter
 required_dirs=%%DATADIR%%
-required_files=%%PREFIX%%/etc/clamav.conf
+required_files=%%PREFIX%%/etc/clamd.conf
 
 start_precmd=start_precmd
 
@@ -33,16 +33,13 @@
 		warn "Stale socket $clamav_milter_socket removed."
 		rm "$clamav_milter_socket"
 	fi
+	rc_flags="${flags:-$clamav_milter_flags} $clamav_milter_socket"
 }
 
-# set defaults
-
-clamav_milter_enable=${clamav_milter_enable:-"NO"}
-clamav_milter_socket=${clamav_milter_socket:-"%%CLAMAV_MILTER_SOCKET%%"}
-clamav_milter_flags=${clamav_milter_flags:-"--postmaster-only --local --outgoing --max-children=50"}
-
+# read settings, set default values
 load_rc_config $name
+: ${clamav_milter_enable="NO"}
+: ${clamav_milter_socket="%%CLAMAV_MILTER_SOCKET%%"}
+: ${clamav_milter_flags="--postmaster-only --local --outgoing --max-children=50"}
 
-# add socket to any given argument
-clamav_milter_flags="${clamav_milter_flags} ${clamav_milter_socket}"
 run_rc_command "$1"
Index: files/patch-clamav-milter::clamav-milter.c
===================================================================
RCS file: files/patch-clamav-milter::clamav-milter.c
diff -N files/patch-clamav-milter::clamav-milter.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-clamav-milter::clamav-milter.c	6 Oct 2004 23:29:06 -0000
@@ -0,0 +1,20 @@
+--- clamav-milter/clamav-milter.c.orig	Thu Oct  7 01:24:33 2004
++++ clamav-milter/clamav-milter.c	Thu Oct  7 01:29:03 2004
+@@ -1124,6 +1124,7 @@
+ 	 */
+ 	if(getuid() == 0) {
+ 		if(iface) {
++#ifdef  SO_BINDTODEVICE
+ 			struct ifreq ifr;
+ 
+ 			memset(&ifr, '\0', sizeof(struct ifreq));
+@@ -1132,6 +1133,9 @@
+ 				perror(iface);
+ 				return EX_UNAVAILABLE;
+ 			}
++#else
++			fprintf(stderr, _("%s: The iface option to --broadcast is not supported on your operating system\n"), argv[0]);
++#endif
+ 		}
+ 		if((cpt = cfgopt(copt, "User")) != NULL) {
+ 			if((user = getpwnam(cpt->strarg)) == NULL) {
Index: files/patch-configure
===================================================================
RCS file: /home/ncvs/ports/security/clamav/files/patch-configure,v
retrieving revision 1.2
diff -u -u -r1.2 patch-configure
--- files/patch-configure	1 Apr 2004 16:36:29 -0000	1.2
+++ files/patch-configure	29 Sep 2004 16:59:30 -0000
@@ -1,15 +1,15 @@
---- configure.orig	Mon Mar 15 21:04:49 2004
-+++ configure	Thu Apr  1 14:56:36 2004
-@@ -9329,7 +9329,7 @@
+--- configure.orig	Wed Sep 29 18:58:49 2004
++++ configure	Wed Sep 29 18:59:29 2004
+@@ -11271,7 +11271,7 @@
  
  
  
--if test ! -r "$cfg_dir/clamav.conf"; then
+-if test ! -r "$cfg_dir/clamd.conf"; then
 +if true; then
-   INSTALL_CLAMAV_CONF_TRUE=
-   INSTALL_CLAMAV_CONF_FALSE='#'
+   INSTALL_CLAMD_CONF_TRUE=
+   INSTALL_CLAMD_CONF_FALSE='#'
  else
-@@ -9339,7 +9339,7 @@
+@@ -11281,7 +11281,7 @@
  
  
  
Index: files/patch-etc::Makefile.in
===================================================================
RCS file: /home/ncvs/ports/security/clamav/files/patch-etc::Makefile.in,v
retrieving revision 1.2
diff -u -u -r1.2 patch-etc::Makefile.in
--- files/patch-etc::Makefile.in	4 Jun 2004 12:51:29 -0000	1.2
+++ files/patch-etc::Makefile.in	29 Sep 2004 17:00:44 -0000
@@ -1,12 +1,12 @@
---- etc/Makefile.in.orig	Thu Feb 19 14:17:02 2004
-+++ etc/Makefile.in	Thu Feb 19 14:17:36 2004
-@@ -248,8 +248,8 @@
+--- etc/Makefile.in.orig	Wed Sep 29 19:00:15 2004
++++ etc/Makefile.in	Wed Sep 29 19:00:43 2004
+@@ -339,8 +339,8 @@
  
  install:
  	$(mkinstalldirs) $(DESTDIR)$(CFGINST)
--@INSTALL_CLAMAV_CONF_TRUE@	@$(INSTALL_DATA) $(srcdir)/clamav.conf $(DESTDIR)$(CFGINST)
+-@INSTALL_CLAMD_CONF_TRUE@	@$(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST)
 -@INSTALL_FRESHCLAM_CONF_TRUE@	@$(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST)
-+@INSTALL_CLAMAV_CONF_TRUE@	@$(INSTALL_DATA) $(srcdir)/clamav.conf $(DESTDIR)$(CFGINST)/clamav.conf.default
++@INSTALL_CLAMD_CONF_TRUE@	@$(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST)/clamd.conf.default
 +@INSTALL_FRESHCLAM_CONF_TRUE@	@$(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST)/freshclam.conf.default
  # 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.
Comment 5 Oliver Eikemeier 2004-10-13 15:05:21 UTC
- update to version 0.80rc4
- make libcurl support configurable
- use libtool from ports

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/security/clamav/Makefile,v
retrieving revision 1.39
diff -u -u -r1.39 Makefile
--- Makefile	8 Aug 2004 14:05:38 -0000	1.39
+++ Makefile	13 Oct 2004 13:37:36 -0000
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	clamav
-PORTVERSION=	${DISTVERSION:S/-rc//g:S/-/./g}
+PORTVERSION=	${DISTVERSION:C/([a-z])[a-z]*/.\1/g:S/-/./g}
 CATEGORIES=	security
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
 MASTER_SITE_SUBDIR=	clamav
@@ -23,11 +23,12 @@
 		arc:${PORTSDIR}/archivers/arc \
 		unzip:${PORTSDIR}/archivers/unzip
 
-DISTVERSION=	0.75.1
+DISTVERSION=	0.80rc4
 
-OPTIONS=	MILTER "Compile the milter interface" off
+OPTIONS=	MILTER "Compile the milter interface" Off \
+		CURL "Support URL downloading" Off
 USE_REINPLACE=	yes
-GNU_CONFIGURE=	yes
+USE_LIBTOOL_VER=15
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 INSTALLS_SHLIB=	yes
 USE_RC_SUBR=	yes
@@ -41,6 +42,8 @@
 		--disable-clamuko \
 		--disable-clamav \
 		--enable-bigstack \
+		--disable-gethostbyname_r \
+		--enable-readdir_r \
 		--disable-dependency-tracking
 CPPFLAGS+=	-I${LOCALBASE}/include \
 		${PTHREAD_CFLAGS}
@@ -49,7 +52,7 @@
 CONFIGURE_ENV+=	CPPFLAGS="${CPPFLAGS}" \
 		LDFLAGS="${LDFLAGS}"
 MAN1=		clamscan.1 freshclam.1 sigtool.1 clamdscan.1
-MAN5=		clamav.conf.5 freshclam.conf.5
+MAN5=		clamd.conf.5 freshclam.conf.5
 MAN8=		clamd.8 clamav-milter.8
 
 CONFLICTS=	clamav-devel-[0-9]*
@@ -67,16 +70,15 @@
 		-e 's|%%CLAMAV_MILTER_SOCKET%%|${CLAMAV_MILTER_SOCKET}|g'
 
 SED_CONF=	-E -e 's|^\#?(Example)$$|\#\1|' \
-		-e 's|^\#?(LogFile) .*$$|\1 /var/log/clamav/clamd.log|' \
-		-e 's|^\#?(PidFile) .*$$|\1 /var/run/clamav/clamd.pid|' \
+		-e 's|^\#?((Update)?LogFile) .*/([a-z]+\.log)$$|\1 /var/log/clamav/\3|' \
+		-e 's|^\#?(PidFile) .*/([a-z]+\.pid)$$|\1 /var/run/clamav/\2|' \
 		-e 's|^\#?(LocalSocket) .*$$|\1 ${CLAMAV_CLAMD_SOCKET}|' \
 		-e 's|^\#?(User) .*$$|\1 ${CLAMAVUSER}|' \
 		-e 's|^\#?(AllowSupplementaryGroups)$$|\1|' \
 		-e 's|^\#?(ScanMail)$$|\1|' \
-		-e 's|^\#?(Checks)$$|\#\1|' \
+		-e 's|^\#?(NotifyClamd)$$|\1|' \
 		-e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DATADIR}|' \
 		-e 's|^\#?(DatabaseOwner) .*$$|\1 ${CLAMAVUSER}|' \
-		-e 's|^\#?(UpdateLogFile) .*$$|\1 /var/log/clamav/freshclam.log|' \
 		-e 's|^\#?(FixStaleSocket)$$|\1|'
 
 PLIST_SUB+=	CLAMAVUSER=${CLAMAVUSER} \
@@ -95,6 +97,9 @@
 .if defined(WITH_MILTER)
 .if !exists(/usr/lib/libmilter.a)
 BUILD_DEPENDS+=	${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
+CONFIGURE_ENV+= SENDMAIL="${LOCALBASE}/sbin/sendmail"
+.else
+CONFIGURE_ENV+=	SENDMAIL="/usr/sbin/sendmail"
 .endif
 CONFIGURE_ARGS+=	--enable-milter
 PLIST_SUB+=	CLAMAV-MILTER=""
@@ -102,16 +107,26 @@
 PLIST_SUB+=	CLAMAV-MILTER="@comment "
 .endif
 
+.if defined(WITH_CURL)
+LIB_DEPENDS+=		curl.3:${PORTSDIR}/ftp/curl
+CONFIGURE_ARGS+=	--with-libcurl
+.else
+CONFIGURE_ARGS+=	--without-libcurl
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|-pthread -lc_r|${PTHREAD_LIBS}|g' \
 		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
-	@${REINPLACE_CMD} -e 's|/usr/lib/sendmail|/usr/sbin/sendmail|g' \
-		${WRKSRC}/clamav-milter/clamav-milter.c
-	@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \
-		${WRKSRC}/Makefile.in
+
+pre-build:
+	@if ${LDCONFIG} -r | ${GREP} -qw -e -lclamav; then \
+		${ECHO_MSG} "===>  *** WARNING ***"; \
+		${ECHO_MSG} "      Installed version of libclamav found."; \
+		${ECHO_MSG} "      This might cause build problems."; \
+	fi
 
 post-build:
-	@${REINPLACE_CMD} ${SED_CONF} ${BUILD_WRKSRC}/etc/clamav.conf
+	@${REINPLACE_CMD} ${SED_CONF} ${BUILD_WRKSRC}/etc/clamd.conf
 	@${REINPLACE_CMD} ${SED_CONF} ${BUILD_WRKSRC}/etc/freshclam.conf
 	@${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-install >${PKGINSTALL}
 	@${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-deinstall >${PKGDEINSTALL}
@@ -125,32 +140,32 @@
 .endif
 
 pre-install:
-	@${SETENV} PKG_PREFIX=${PREFIX} \
+	@${SETENV} PKG_PREFIX=${PREFIX} PKG_DESTDIR=${DESTDIR} \
 		${SH} ${PKGINSTALL} ${PREFIX} PRE-INSTALL
 
 post-install:
 	@${INSTALL_SCRIPT} ${WRKDIR}/clamav-clamd.sh \
-		${RC_DIR}/clamav-clamd${RC_SUFX}
+		${DESTDIR}${RC_DIR}/clamav-clamd${RC_SUFX}
 	@${INSTALL_SCRIPT} ${WRKDIR}/clamav-freshclam.sh \
-		${RC_DIR}/clamav-freshclam${RC_SUFX}
-	@${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DATADIR}
-.for c in clamav freshclam
-	@[ -f ${PREFIX}/etc/${c}.conf ] || \
-		${CP} ${PREFIX}/etc/${c}.conf.default ${PREFIX}/etc/${c}.conf
+		${DESTDIR}${RC_DIR}/clamav-freshclam${RC_SUFX}
+	@${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DESTDIR}${DATADIR}
+.for c in clamd freshclam
+	@[ -f ${DESTDIR}${PREFIX}/etc/${c}.conf ] || \
+		${CP} ${DESTDIR}${PREFIX}/etc/${c}.conf.default ${DESTDIR}${PREFIX}/etc/${c}.conf
 .endfor
 .if defined(WITH_MILTER)
 	@${INSTALL_SCRIPT} ${WRKDIR}/clamav-milter.sh \
-		${RC_DIR}/clamav-milter${RC_SUFX}
+		${DESTDIR}${RC_DIR}/clamav-milter${RC_SUFX}
 .endif
 .if !defined(NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}
+	@${MKDIR} ${DESTDIR}${DOCSDIR}
 	@${INSTALL_DATA} ${INSTALL_WRKSRC}/NEWS ${INSTALL_WRKSRC}/ChangeLog \
-		${DOCSDIR}
-	@${MKDIR} ${DOCSDIR}/html
+		${DESTDIR}${DOCSDIR}
+	@${MKDIR} ${DESTDIR}${DOCSDIR}/html
 	@${INSTALL_DATA} ${INSTALL_WRKSRC}/docs/html/*.* \
-		${DOCSDIR}/html
+		${DESTDIR}${DOCSDIR}/html
 .endif
-	@${SETENV} PKG_PREFIX=${PREFIX} \
+	@${SETENV} PKG_PREFIX=${PREFIX} PKG_DESTDIR=${DESTDIR} \
 		${SH} ${PKGINSTALL} ${PREFIX} POST-INSTALL
 
 .include <bsd.port.post.mk>
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/security/clamav/distinfo,v
retrieving revision 1.13
diff -u -u -r1.13 distinfo
--- distinfo	8 Aug 2004 14:05:38 -0000	1.13
+++ distinfo	13 Oct 2004 09:55:14 -0000
@@ -1,2 +1,2 @@
-MD5 (clamav-0.75.1.tar.gz) = 2c85b7957eba9fd9e9ff8c2537ae006f
-SIZE (clamav-0.75.1.tar.gz) = 2777319
+MD5 (clamav-0.80rc4.tar.gz) = 5c02d52c361f04098a9956478f8654a0
+SIZE (clamav-0.80rc4.tar.gz) = 2668125
Index: pkg-install
===================================================================
RCS file: /home/ncvs/ports/security/clamav/pkg-install,v
retrieving revision 1.7
diff -u -u -r1.7 pkg-install
--- pkg-install	30 May 2004 08:01:22 -0000	1.7
+++ pkg-install	13 Oct 2004 13:31:07 -0000
@@ -2,15 +2,16 @@
 # $FreeBSD: ports/security/clamav/pkg-install,v 1.7 2004/05/30 08:01:22 pav Exp $
 
 PREFIX=${PKG_PREFIX:-%%PREFIX%%}
+DESTDIR=${PKG_DESTDIR:-}
 
 CLAMAVUSER=%%CLAMAVUSER%%
 CLAMAVGROUP=%%CLAMAVGROUP%%
 UID=106
 GID=$UID
 
-CLAMRUN=/var/run/clamav
-CLAMLOG=/var/log/clamav
-DATADIR=%%DATADIR%%
+CLAMRUN=$DESTDIR/var/run/clamav
+CLAMLOG=$DESTDIR/var/log/clamav
+DATADIR=$DESTDIR%%DATADIR%%
 
 if [ "$2" = "PRE-INSTALL" ]; then
 
@@ -48,11 +49,23 @@
 		chown "$CLAMAVUSER:$CLAMAVGROUP" "$CLAMLOG" || exit 1
 	fi
 
-	if [ ! -d "${DATADIR}" ]; then
+	if [ ! -d "$DATADIR" ]; then
 		mkdir -p "$DATADIR" || exit 1
 		chown "$CLAMAVUSER:$CLAMAVGROUP" "$DATADIR" || exit 1
 	fi
 
+	if [ -f "$DESTDIR$PREFIX/etc/clamav.conf" ]; then
+		echo
+		echo "**************** WARNING ****************"
+		echo "*                                       *"
+		echo "*  The configuration file has changed:  *"
+		echo "* Please edit $PREFIX/etc/clamd.conf *"
+		echo "* and remove $PREFIX/etc/clamav.conf *"
+		echo "*                                       *"
+		echo "**************** WARNING ****************"
+		echo
+	fi
+
 fi
 
 exit 0
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/security/clamav/pkg-plist,v
retrieving revision 1.14
diff -u -u -r1.14 pkg-plist
--- pkg-plist	15 Jun 2004 10:04:48 -0000	1.14
+++ pkg-plist	29 Sep 2004 17:02:03 -0000
@@ -16,9 +16,9 @@
 lib/libclamav.so
 lib/libclamav.a
 libdata/pkgconfig/libclamav.pc
-@unexec if cmp -s %D/etc/clamav.conf %D/etc/clamav.conf.default; then rm -f %D/etc/clamav.conf; fi
-etc/clamav.conf.default
-@exec [ -f %B/clamav.conf ] || cp %B/%f %B/clamav.conf
+@unexec if cmp -s %D/etc/clamd.conf %D/etc/clamd.conf.default; then rm -f %D/etc/clamd.conf; fi
+etc/clamd.conf.default
+@exec [ -f %B/clamd.conf ] || cp %B/%f %B/clamd.conf
 @unexec if cmp -s %D/etc/freshclam.conf %D/etc/freshclam.conf.default; then rm -f %D/etc/freshclam.conf; fi
 etc/freshclam.conf.default
 @exec [ -f %B/freshclam.conf ] || cp %B/%f %B/freshclam.conf
Index: files/clamav-clamd.sh
===================================================================
RCS file: /home/ncvs/ports/security/clamav/files/clamav-clamd.sh,v
retrieving revision 1.3
diff -u -u -r1.3 clamav-clamd.sh
--- files/clamav-clamd.sh	19 Apr 2004 15:21:33 -0000	1.3
+++ files/clamav-clamd.sh	29 Sep 2004 18:13:35 -0000
@@ -24,20 +24,12 @@
 command=%%PREFIX%%/sbin/clamd
 pidfile=/var/run/clamav/clamd.pid
 required_dirs=%%DATADIR%%
-required_files=%%PREFIX%%/etc/clamav.conf
+required_files=%%PREFIX%%/etc/clamd.conf
 
-stop_postcmd=stop_postcmd
+# read settings, set default values
+load_rc_config "$name"
+: ${clamav_clamd_enable="NO"}
+: ${clamav_clamd_flags=""}
+: ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
 
-stop_postcmd()
-{
-  rm -f $pidfile
-}
-
-# set defaults
-
-clamav_clamd_enable=${clamav_clamd_enable:-"NO"}
-clamav_clamd_flags=${clamav_clamd_flags:-""}
-clamav_clamd_socket=${clamav_clamd_socket:-"%%CLAMAV_CLAMD_SOCKET%%"}
-
-load_rc_config $name
 run_rc_command "$1"
Index: files/clamav-freshclam.sh
===================================================================
RCS file: /home/ncvs/ports/security/clamav/files/clamav-freshclam.sh,v
retrieving revision 1.3
diff -u -u -r1.3 clamav-freshclam.sh
--- files/clamav-freshclam.sh	15 Jun 2004 10:04:48 -0000	1.3
+++ files/clamav-freshclam.sh	29 Sep 2004 18:14:38 -0000
@@ -9,7 +9,7 @@
 # KEYWORD: FreeBSD shutdown
 
 #
-# Add the following lines to /etc/rc.conf to enable freshclam daemon:
+# Add the following lines to /etc/rc.conf to enable the freshclam daemon:
 #
 #clamav_freshclam_enable="YES"
 #
@@ -22,16 +22,14 @@
 rcvar=`set_rcvar`
 
 command=%%PREFIX%%/bin/freshclam
+pidfile=/var/run/clamav/freshclam.pid
+command_args="--daemon"
 required_dirs=%%DATADIR%%
 required_files=%%PREFIX%%/etc/freshclam.conf
 
-# set defaults
+# read settings, set default values
+load_rc_config "$name"
+: ${clamav_freshclam_enable="NO"}
+: ${clamav_freshclam_flags=""}
 
-clamav_freshclam_enable=${clamav_freshclam_enable:-"NO"}
-clamav_freshclam_flags=${clamav_freshclam_flags:-"--pid=/var/run/clamav/freshclam.pid --daemon-notify=%%PREFIX%%/etc/clamav.conf"}
-
-load_rc_config $name
-
-# add --daemon to any given arguments
-clamav_freshclam_flags="${clamav_freshclam_flags} --daemon"
 run_rc_command "$1"
Index: files/clamav-milter.sh
===================================================================
RCS file: /home/ncvs/ports/security/clamav/files/clamav-milter.sh,v
retrieving revision 1.2
diff -u -u -r1.2 clamav-milter.sh
--- files/clamav-milter.sh	30 Jan 2004 15:19:22 -0000	1.2
+++ files/clamav-milter.sh	29 Sep 2004 17:29:12 -0000
@@ -23,7 +23,7 @@
 
 command=%%PREFIX%%/sbin/clamav-milter
 required_dirs=%%DATADIR%%
-required_files=%%PREFIX%%/etc/clamav.conf
+required_files=%%PREFIX%%/etc/clamd.conf
 
 start_precmd=start_precmd
 
@@ -33,16 +33,13 @@
 		warn "Stale socket $clamav_milter_socket removed."
 		rm "$clamav_milter_socket"
 	fi
+	rc_flags="${flags:-$clamav_milter_flags} $clamav_milter_socket"
 }
 
-# set defaults
-
-clamav_milter_enable=${clamav_milter_enable:-"NO"}
-clamav_milter_socket=${clamav_milter_socket:-"%%CLAMAV_MILTER_SOCKET%%"}
-clamav_milter_flags=${clamav_milter_flags:-"--postmaster-only --local --outgoing --max-children=50"}
-
+# read settings, set default values
 load_rc_config $name
+: ${clamav_milter_enable="NO"}
+: ${clamav_milter_socket="%%CLAMAV_MILTER_SOCKET%%"}
+: ${clamav_milter_flags="--postmaster-only --local --outgoing --max-children=50"}
 
-# add socket to any given argument
-clamav_milter_flags="${clamav_milter_flags} ${clamav_milter_socket}"
 run_rc_command "$1"
Index: files/patch-configure
===================================================================
RCS file: /home/ncvs/ports/security/clamav/files/patch-configure,v
retrieving revision 1.2
diff -u -u -r1.2 patch-configure
--- files/patch-configure	1 Apr 2004 16:36:29 -0000	1.2
+++ files/patch-configure	13 Oct 2004 12:01:25 -0000
@@ -1,20 +1,22 @@
 --- configure.orig	Mon Mar 15 21:04:49 2004
 +++ configure	Thu Apr  1 14:56:36 2004
-@@ -9329,7 +9329,7 @@
- 
- 
- 
--if test ! -r "$cfg_dir/clamav.conf"; then
-+if true; then
-   INSTALL_CLAMAV_CONF_TRUE=
-   INSTALL_CLAMAV_CONF_FALSE='#'
- else
-@@ -9339,7 +9339,7 @@
- 
- 
- 
--if test ! -r "$cfg_dir/freshclam.conf"; then
-+if true; then
-   INSTALL_FRESHCLAM_CONF_TRUE=
-   INSTALL_FRESHCLAM_CONF_FALSE='#'
- else
+@@ -10635,6 +10635,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ $ac_includes_default
++#include <sys/types.h>
++#include <netinet/in.h>
++#include <arpa/nameser.h>
+ #include <resolv.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+@@ -10678,6 +10681,9 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
++#include <sys/types.h>
++#include <netinet/in.h>
++#include <arpa/nameser.h>
+ #include <resolv.h>
+ _ACEOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
Index: files/patch-etc::Makefile.in
===================================================================
RCS file: /home/ncvs/ports/security/clamav/files/patch-etc::Makefile.in,v
retrieving revision 1.2
diff -u -u -r1.2 patch-etc::Makefile.in
--- files/patch-etc::Makefile.in	4 Jun 2004 12:51:29 -0000	1.2
+++ files/patch-etc::Makefile.in	13 Oct 2004 13:05:28 -0000
@@ -1,13 +1,15 @@
 --- etc/Makefile.in.orig	Thu Feb 19 14:17:02 2004
 +++ etc/Makefile.in	Thu Feb 19 14:17:36 2004
-@@ -248,8 +248,8 @@
+@@ -333,10 +333,8 @@
  
  install:
  	$(mkinstalldirs) $(DESTDIR)$(CFGINST)
--@INSTALL_CLAMAV_CONF_TRUE@	@$(INSTALL_DATA) $(srcdir)/clamav.conf $(DESTDIR)$(CFGINST)
--@INSTALL_FRESHCLAM_CONF_TRUE@	@$(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST)
-+@INSTALL_CLAMAV_CONF_TRUE@	@$(INSTALL_DATA) $(srcdir)/clamav.conf $(DESTDIR)$(CFGINST)/clamav.conf.default
-+@INSTALL_FRESHCLAM_CONF_TRUE@	@$(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST)/freshclam.conf.default
+-	@test -f $(DESTDIR)$(CFGINST)/clamd.conf || \
+-	$(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST)
+-	@test -f $(DESTDIR)$(CFGINST)/freshclam.conf || \
+-	$(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST)
++	$(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST)/clamd.conf.default
++	$(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST)/freshclam.conf.default
  # 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.
  .NOEXPORT:
Index: files/patch-ltmain.sh
===================================================================
RCS file: files/patch-ltmain.sh
diff -N files/patch-ltmain.sh
--- files/patch-ltmain.sh	25 Mar 2004 01:46:54 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,56 +0,0 @@
---- ltmain.sh.orig	Sun Feb 15 12:44:09 2004
-+++ ltmain.sh	Thu Mar 25 02:15:25 2004
-@@ -1050,25 +1050,18 @@
- 	    test "X$arg" = "X-lc" && continue
- 	    ;;
- 	  esac
--	 # This change is required for -lc_r under FreeBSD / Tomasz Kojm
--	 #elif test "X$arg" = "X-lc_r"; then
--	 # case $host in
--	 #*-*-openbsd* | *-*-freebsd*)
--	 #   # Do not include libc_r directly, use -pthread flag.
--	 #   continue
--	 #   ;;
--	 # esac
-+	 elif test "X$arg" = "X-lc_r"; then
-+	  case $host in
-+	 *-*-openbsd* | *-*-freebsd4*)
-+	    # Do not include libc_r directly, use -pthread flag.
-+	    continue
-+	    ;;
-+	  esac
- 	fi
- 	deplibs="$deplibs $arg"
- 	continue
- 	;;
- 
--      # We need this change for old -pthread *BSD style / Tomasz Kojm
--      -pthread)
--      	deplibs="$deplibs -pthread"
--      	continue
--      	;;
--
-       -module)
- 	module=yes
- 	continue
-@@ -4259,10 +4252,16 @@
- 	fi
- 
- 	# Install the pseudo-library for information purposes.
--	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
--	instname="$dir/$name"i
--	$show "$install_prog $instname $destdir/$name"
--	$run eval "$install_prog $instname $destdir/$name" || exit $?
-+	case $host in
-+	*-*-freebsd*)
-+	  # Do not install the useless pseudo-library
-+	;;
-+	*)
-+	  name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-+	  instname="$dir/$name"i
-+	  $show "$install_prog $instname $destdir/$name"
-+	  $run eval "$install_prog $instname $destdir/$name" || exit $?
-+	esac
- 
- 	# Maybe install the static library, too.
- 	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
Comment 6 Oliver Eikemeier freebsd_committer freebsd_triage 2004-10-18 11:11:37 UTC
State Changed
From-To: feedback->closed

Committed some time ago.