ports/63022: Unbreak security/clamav-devel

Rob Evers rob at debank.tv
Wed Feb 18 15:40:11 UTC 2004


>Number:         63022
>Category:       ports
>Synopsis:       Unbreak security/clamav-devel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 18 07:40:10 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Rob Evers
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD haha.debank.tv 4.9-STABLE FreeBSD 4.9-STABLE #0: Tue Jan 20 17:31:23 CET 2004 rob at slopuh.debank.tv:/usr/obj/usr/src/sys/HAHA i386


>Description:
Unbreak security/clamav-devel
 Fix threading issue

 pointed out by eik:
 Use fixStaleSocket by default
 Add clamav user to mail group (for exim users)
 clean up DOCSDIR variable

>How-To-Repeat:
>Fix:


--- clamav-devel.patch begins here ---
diff -ruN clamav-devel/Makefile clamav-devel.new/Makefile
--- clamav-devel/Makefile	Tue Feb 17 01:16:33 2004
+++ clamav-devel.new/Makefile	Wed Feb 18 16:23:42 2004
@@ -7,6 +7,7 @@
 
 PORTNAME=	clamav
 PORTVERSION=	20040210
+PORTREVISION=	1
 CATEGORIES=	security
 MASTER_SITES=	http://clamav.sourceforge.net/snapshot/
 PKGNAMESUFFIX=	-devel
@@ -47,6 +48,7 @@
 CLAMAVGROUP?=	clamav
 CLAMAV_CLAMD_SOCKET?=	/var/run/clamav/clamd
 CLAMAV_MILTER_SOCKET?=	/var/run/clamav/clmilter.sock
+DOCSDIR?=	${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
 
 PLIST_SUB+=	CLAMAVUSER="${CLAMAVUSER}"
 PLIST_SUB+=	CLAMAVGROUP="${CLAMAVGROUP}"
@@ -67,14 +69,11 @@
 		-e 's|^\#?(Checks)$$|\#\1|' \
 		-e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DATADIR}|' \
 		-e 's|^\#?(DatabaseOwner) .*$$|\1 ${CLAMAVUSER}|' \
-		-e 's|^\#?(UpdateLogFile) .*$$|\1 /var/log/clamav/freshclam.log|'
+		-e 's|^\#?(UpdateLogFile) .*$$|\1 /var/log/clamav/freshclam.log|' \
+		-e 's|^\#?(FixStaleSocket)$$|\1|'
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} >= 502102
-FORBIDDEN=	"Links against conflicting thread libraries"
-.endif
-
 USE_RC_SUBR=	yes
 RC_DIR=		${PREFIX}/etc/rc.d
 RC_SUFX=	.sh
@@ -98,7 +97,11 @@
 .endif
 
 post-patch:
+.if ${OSVERSION} >= 502102
+	@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
+.else
 	@${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
+.endif
 	@${REINPLACE_CMD} -e 's|/usr/lib/sendmail|/usr/sbin/sendmail|g' \
 		-e 's|<malloc.h>|<stdlib.h>|' \
 		${WRKSRC}/clamav-milter/clamav-milter.c
@@ -118,8 +121,8 @@
 	 ${SETENV} PKG_PREFIX=${PREFIX} \
 		${SH} ${PKGINSTALL} ${PREFIX} PRE-INSTALL
 .if !defined(NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}${PKGNAMESUFFIX}
-	@${INSTALL_DATA} ${WRKSRC}/docs/*pdf ${DOCSDIR}${PKGNAMESUFFIX}
+	@${MKDIR} ${DOCSDIR}
+	@${INSTALL_DATA} ${WRKSRC}/docs/*pdf ${DOCSDIR}
 .endif
 
 post-install:
diff -ruN clamav-devel/files/clamav-clamd.sh clamav-devel.new/files/clamav-clamd.sh
--- clamav-devel/files/clamav-clamd.sh	Fri Oct  3 15:31:26 2003
+++ clamav-devel.new/files/clamav-clamd.sh	Wed Feb 18 15:42:55 2004
@@ -26,16 +26,6 @@
 required_dirs=%%DATADIR%%
 required_files=%%PREFIX%%/etc/clamav.conf
 
-start_precmd=start_precmd
-
-start_precmd()
-{
-	if [ -S "$clamd_socket" ]; then
-		warn "Stale socket $clamd_socket removed."
-		rm "$clamd_socket"
-	fi
-}
-
 stop_postcmd=stop_postcmd
 
 stop_postcmd()
diff -ruN clamav-devel/pkg-descr clamav-devel.new/pkg-descr
--- clamav-devel/pkg-descr	Tue Jul 22 15:54:09 2003
+++ clamav-devel.new/pkg-descr	Wed Feb 18 15:43:46 2004
@@ -4,3 +4,5 @@
 viruses, scans compressed files and is supported by AMaViS.
 Optionally you can use the clamav-milter interface to connect
 clamav with sendmail.
+
+WWW: http://clamav.sourceforge.net/
diff -ruN clamav-devel/pkg-install clamav-devel.new/pkg-install
--- clamav-devel/pkg-install	Wed Feb 11 11:39:34 2004
+++ clamav-devel.new/pkg-install	Wed Feb 18 15:44:34 2004
@@ -29,6 +29,7 @@
 		-c "Clam Antivirus"; \
         then
                 echo "===> Added user \"${CLAMAVUSER}\"."
+		pw groupmod mail -m ${CLAMAVUSER}
         else
                 echo "===> Adding user \"${CLAMAVUSER}\" failed..."
                 exit 1
diff -ruN clamav-devel/pkg-plist clamav-devel.new/pkg-plist
--- clamav-devel/pkg-plist	Wed Feb 11 11:39:34 2004
+++ clamav-devel.new/pkg-plist	Wed Feb 18 15:45:01 2004
@@ -11,9 +11,9 @@
 lib/libclamav.so.1
 lib/libclamav.so
 lib/libclamav.a
-%%PORTDOCS%%%%DOCSDIR%%-devel/clamav-mirror-howto.pdf
-%%PORTDOCS%%%%DOCSDIR%%-devel/clamdoc.pdf
-%%PORTDOCS%%%%DOCSDIR%%-devel/signatures.pdf
+%%PORTDOCS%%%%DOCSDIR%%/clamav-mirror-howto.pdf
+%%PORTDOCS%%%%DOCSDIR%%/clamdoc.pdf
+%%PORTDOCS%%%%DOCSDIR%%/signatures.pdf
 @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
@@ -29,4 +29,4 @@
 @unexec rmdir %D/%%DATADIR%% 2>/dev/null || true
 @unexec rmdir /var/run/clamav 2>/dev/null || true
 @unexec rmdir /var/log/clamav 2>/dev/null || true
-%%PORTDOCS%%@dirrm %%DOCSDIR%%-devel
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
--- clamav-devel.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list