From vsevolod@highsecure.ru  Mon May 30 13:19:34 2005
Return-Path: <vsevolod@highsecure.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id CF91016A41C
	for <freebsd-gnats-submit@freebsd.org>; Mon, 30 May 2005 13:19:34 +0000 (GMT)
	(envelope-from vsevolod@highsecure.ru)
Received: from waterwall.inec.ru (waterwall.inec.ru [213.148.3.225])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2471B43D1D
	for <freebsd-gnats-submit@freebsd.org>; Mon, 30 May 2005 13:19:33 +0000 (GMT)
	(envelope-from vsevolod@highsecure.ru)
Received: from waterwall.inec.ru (root@localhost)
  by waterwall.inec.ru (8.13.1/8.12.6) with SMTP id j4UDLvkv017855
    for <freebsd-gnats-submit@freebsd.org>; Mon, 30 May 2005 17:21:57 +0400 (MSD)
Received: from waterwall.inec.ru (localhost.inec.ru [127.0.0.1])
  by localhost (8.13.1/8.12.6) with ESMTP id j4UDLsxj017808
    for <FreeBSD-gnats-submit@freebsd.org>; Mon, 30 May 2005 17:21:54 +0400 (MSD)
Received: from localhost (localhost.inec.ru [127.0.0.1])
	by localhost (Postfix) with SMTP id 8D6985A3E2
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 30 May 2005 17:21:54 +0400 (MSD)
Received: from core (postbox.inec.ru [213.148.3.226])
	by waterwall.inec.ru (Postfix) with ESMTP id AAPAE429B1370DEB
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 30 May 2005 17:21:52 +0400 (MSD)
Received: from [213.219.249.64] (helo=spray.anyhost.ru)
	by core with esmtp (Exim 4.51 (FreeBSD))
	id 1DckAZ-0003BA-8k
	for FreeBSD-gnats-submit@freebsd.org; Mon, 30 May 2005 17:19:03 +0400
Received: from cebka by spray.anyhost.ru with local (Exim 4.50 (FreeBSD))
	id 1DckAR-000Ku7-IA; Mon, 30 May 2005 17:18:55 +0400
Message-Id: <E1DckAR-000Ku7-IA@spray.anyhost.ru>
Date: Mon, 30 May 2005 17:18:55 +0400
From: Vsevolod Stakhov <vsevolod@highsecure.ru>
Sender: Vsevolod Stakhov <vsevolod@highsecure.ru>
Reply-To: Vsevolod Stakhov <vsevolod@highsecure.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc: jmelo@freebsdbrasil.com.br
Subject: Update port: security/samba-vscan to 0.3.6 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         81669
>Category:       ports
>Synopsis:       Update port: security/samba-vscan to 0.3.6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pav
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 30 13:20:02 GMT 2005
>Closed-Date:    Sun Jun 05 20:45:33 GMT 2005
>Last-Modified:  Sun Jun 05 20:45:33 GMT 2005
>Originator:     Vsevolod Stakhov
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
>Environment:
>Description:
This patch updates security/samba-vscan to version 0.3.6. This also contains
patch from pr: ports/75966. Btw, this port seemed to be broken on 5.4 and 5.3
before this patch, because it fails to detect samba version properly.
Another bug was that libmagic was not found by this port, that makes
it much more slow.

>How-To-Repeat:
>Fix:

diff -ruPN samba-vscan.orig/Makefile samba-vscan/Makefile
--- samba-vscan.orig/Makefile	Mon May 30 17:09:31 2005
+++ samba-vscan/Makefile	Mon May 30 17:08:46 2005
@@ -6,17 +6,18 @@
 #
 
 PORTNAME=	samba-vscan
-PORTVERSION=	0.3.5
-PORTREVISION=	1
+PORTVERSION=	0.3.6
 CATEGORIES=	security
-MASTER_SITES=	http://heanet.dl.sourceforge.net/sourceforge/openantivirus/ \
-		http://easynews.dl.sourceforge.net/sourceforge/openantivirus/ \
-		http://flow.dl.sourceforge.net/sourceforge/openantivirus/
+MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
+MASTER_SITE_SUBDIR=	openantivirus
 
 MAINTAINER=	jmelo@freebsdbrasil.com.br
 COMMENT=	On-access virus scanning with Samba
 
-BUILD_DEPENDS=	${NONEXISTENT}:${PORTSDIR}/net/${VSCAN_SAMBA_PORT}:build
+BUILD_DEPENDS=	${NONEXISTENT}:${PORTSDIR}/net/${VSCAN_SAMBA_PORT}:configure
+.if !defined(NOPORTDOCS)
+PORTDOCS=	AUTHORS COPYING ChangeLog FAQ INSTALL NEWS README
+.endif
 
 USE_BZIP2=	yes
 SAMBA_WRKSRC=	`cd ${PORTSDIR}/net/${VSCAN_SAMBA_PORT}; make -V WRKSRC`
@@ -25,7 +26,7 @@
 CONFIGURE_ARGS=	--with-samba-source=${SAMBA_WRKSRC}
 ETCDIR=		${PREFIX}/etc/samba-vscan
 PKGMESSAGE=	${WRKDIR}/pkg-message
-VSCAN_SAMBA_PORT?=samba
+VSCAN_SAMBA_PORT?=samba3
 
 .if ${VSCAN_SAMBA_PORT} == "samba3"
 PLIST_SUB=	VFSDIR=lib/samba/vfs
@@ -33,7 +34,18 @@
 PLIST_SUB=	VFSDIR=lib/samba
 .endif
 
+pre-configure:
+.if ${VSCAN_SAMBA_PORT} == "samba3"
+		@cd ${SAMBA_WRKSRC}; make proto 2>&1 > /dev/null
+.endif
+
 post-install:
+.if !defined(NOPORTDOCS)
+	@${MKDIR} ${DOCSDIR}
+.for i in ${PORTDOCS}
+	@${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
+.endfor
+.endif
 	@${MKDIR} ${PREFIX}/etc/samba-vscan
 	@${INSTALL_DATA} ${WRKSRC}/clamav/vscan-clamav.conf ${ETCDIR}
 	@${INSTALL_DATA} ${WRKSRC}/fprot/vscan-fprotd.conf ${ETCDIR}
diff -ruPN samba-vscan.orig/distinfo samba-vscan/distinfo
--- samba-vscan.orig/distinfo	Mon May 30 17:09:31 2005
+++ samba-vscan/distinfo	Mon May 30 17:08:46 2005
@@ -1,2 +1,2 @@
-MD5 (samba-vscan-0.3.5.tar.bz2) = 5f173d549014985d681478897135915b
-SIZE (samba-vscan-0.3.5.tar.bz2) = 161982
+MD5 (samba-vscan-0.3.6.tar.bz2) = 68c9d099d942d85e68d96804b26ac788
+SIZE (samba-vscan-0.3.6.tar.bz2) = 166733
diff -ruPN samba-vscan.orig/files/patch-configure samba-vscan/files/patch-configure
--- samba-vscan.orig/files/patch-configure	Thu Jan  1 03:00:00 1970
+++ samba-vscan/files/patch-configure	Mon May 30 17:08:46 2005
@@ -0,0 +1,95 @@
+--- configure.orig	Thu Mar 24 00:31:42 2005
++++ configure	Mon May 30 16:58:31 2005
+@@ -3902,7 +3902,7 @@
+ #
+ # Try to get the Samba Version for old releases
+ #
+-SAMBA_VERSION_H_STR=$(cat ${SAMBA_srcdir}/include/version.h |grep '#define VERSION'|cut -d ' ' -f3-)
++SAMBA_VERSION_H_STR=`cat ${SAMBA_srcdir}/include/version.h |grep '#define SAMBA_VERSION'|cut -d ' ' -f3-`
+ 
+ SAMBA_VERSION=
+ ####################################################
+@@ -3950,26 +3950,21 @@
+   esac
+ fi;
+ 
+-
+-if test -z "$SAMBA_VERSION_STRING";then
++if /usr/bin/true ;then
+ 
+  if test -z "$SAMBA_VERSION"; then
+ 	SAMBA_VERSION=$SAMBA_VERSION_H_STR
+  fi
+-
+  echo "$as_me:$LINENO: checking for Samba Version" >&5
+ echo $ECHO_N "checking for Samba Version... $ECHO_C" >&6
+ 
+-  SAMBA_VERSION_MAJOR=$(echo $SAMBA_VERSION | sed -e 's/"\([0-9]\)\.\([0-9]\)[\.]*\([0-9]*\)\([a-zA-Z]*\)\([0-9]*\)\([a-zA-Z]*\)\([-]*\)\(.*\)"/\1/')
+- SAMBA_VERSION_MINOR=$(echo $SAMBA_VERSION | sed -e 's/"\([0-9]\)\.\([0-9]\)[\.]*\([0-9]*\)\([a-zA-Z]*\)\([0-9]*\)\([a-zA-Z]*\)\([-]*\)\(.*\)"/\2/')
+- SAMBA_VERSION_RELEASE=$(echo $SAMBA_VERSION | sed -e 's/"\([0-9]\)\.\([0-9]\)[\.]*\([0-9]*\)\([a-zA-Z]*\)\([0-9]*\)\([a-zA-Z]*\)\([-]*\)\(.*\)"/\3/')
+- SAMBA_VERSION_SUFFIX=$(echo $SAMBA_VERSION | sed -e 's/"\([0-9]\)\.\([0-9]\)[\.]*\([0-9]*\)\([a-zA-Z]*\)\([0-9]*\)\([a-zA-Z]*\)\([-]*\)\(.*\)"/\4/')
+- SAMBA_VERSION_SUFFIX_RELEASE=$(echo $SAMBA_VERSION | sed -e 's/"\([0-9]\)\.\([0-9]\)[\.]*\([0-9]*\)\([a-zA-Z]*\)\([0-9]*\)\([a-zA-Z]*\)\([-]*\)\(.*\)"/\5/')
+- SAMBA_VERSION_SUFFIX_EXTRA1=$(echo $SAMBA_VERSION | sed -e 's/"\([0-9]\)\.\([0-9]\)[\.]*\([0-9]*\)\([a-zA-Z]*\)\([0-9]*\)\([a-zA-Z]*\)\([-]*\)\(.*\)"/\6/')
+- SAMBA_VERSION_SUFFIX_EXTRA2=$(echo $SAMBA_VERSION | sed -e 's/"\([0-9]\)\.\([0-9]\)[\.]*\([0-9]*\)\([a-zA-Z]*\)\([0-9]*\)\([a-zA-Z]*\)\([-]*\)\(.*\)"/\8/')
++  SAMBA_VERSION_MAJOR=$(echo $SAMBA_VERSION | awk '{print $1}')
++ SAMBA_VERSION_MINOR=$(echo $SAMBA_VERSION | awk '{print $2}')
++ SAMBA_VERSION_RELEASE=$(echo $SAMBA_VERSION | awk '{print $3}'| sed -e 's/\([0-9]*\)\([a-zA-Z]*\)\([0-9]*\)/\1/')
++ SAMBA_VERSION_SUFFIX=$(echo $SAMBA_VERSION | awk '{print $3}' | sed -e 's/\([0-9]*\)\([a-zA-Z]*\)\([0-9]*\)/\2/')
++ SAMBA_VERSION_SUFFIX_RELEASE=$(echo $SAMBA_VERSION | awk '{print $3}' | sed -e 's/\([0-9]*\)\([a-zA-Z]*\)\([0-9]*\)/\3/')
+ 
+  SAMBA_VERSION_STRING="${SAMBA_VERSION_MAJOR}.${SAMBA_VERSION_MINOR}"
+-
+  if test -n "$SAMBA_VERSION_RELEASE";then
+     SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}.${SAMBA_VERSION_RELEASE}"
+  fi
+@@ -4085,9 +4080,9 @@
+  fi
+ 
+ 
+-cat >>confdefs.h <<_ACEOF
++#cat >>confdefs.h <<_ACEOF
+ #define SAMBA_VERSION_OFFICIAL_STRING $SAMBA_VERSION_STRING
+-_ACEOF
++#_ACEOF
+ 
+ 
+  if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then
+@@ -4101,9 +4096,9 @@
+ 
+  SAMBA_VERSION_STRING="\"${SAMBA_VERSION_STRING}\""
+ 
+-cat >>confdefs.h <<_ACEOF
++#cat >>confdefs.h <<_ACEOF
+ #define SAMBA_VERSION_STRING $SAMBA_VERSION_STRING
+-_ACEOF
++#_ACEOF
+ 
+ 
+  echo "$as_me:$LINENO: result: $SAMBA_VERSION_STRING" >&5
+@@ -5128,7 +5123,7 @@
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lmagic  $LIBS"
++LIBS="-lmagic  -lz $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ #line $LINENO "configure"
+ #include "confdefs.h"
+@@ -5182,7 +5177,7 @@
+ #define HAVE_LIBMAGIC 1
+ _ACEOF
+ 
+-  LIBS="-lmagic $LIBS"
++  LIBS="-lmagic -lz $LIBS"
+ 
+ fi
+ 
+@@ -5190,7 +5185,7 @@
+  if test x"$ac_cv_header_magic_h" = x"yes"; then
+   if test x"$ac_cv_lib_magic_magic_load" = x"yes"; then
+      vscan_cv_filetype=yes
+-     MAGIC_LIB="-lmagic"
++     MAGIC_LIB="-lmagic -lz"
+   fi
+  fi
+ fi
diff -ruPN samba-vscan.orig/files/patch-vscan-clamav.h samba-vscan/files/patch-vscan-clamav.h
--- samba-vscan.orig/files/patch-vscan-clamav.h	Mon May 30 17:09:31 2005
+++ samba-vscan/files/patch-vscan-clamav.h	Mon May 30 17:08:46 2005
@@ -1,20 +1,16 @@
---- clamav/vscan-clamav.h.old	Fri Aug 13 13:42:37 2004
-+++ clamav/vscan-clamav.h	Fri Aug 13 13:43:24 2004
-@@ -7,7 +7,7 @@
- 
- /* Clam AntiVirus (clamd) stuff: 
-    socket name of Clam daemon */
--#define VSCAN_CLAMD_SOCKET_NAME      "/var/run/clamd"
-+#define VSCAN_CLAMD_SOCKET_NAME      "/var/run/clamav/clamd"
- 
- /* Clam AntiVirus (libclamav) stuff:
-    maximum number of files in archive */
-@@ -20,7 +20,7 @@
+--- clamav/vscan-clamav.h.orig	Wed Sep 29 20:36:09 2004
++++ clamav/vscan-clamav.h	Mon May 30 15:24:08 2005
+@@ -9,11 +9,11 @@
  /* default location of samba-style configuration file (needs Samba >= 2.2.4
   or Samba 3.0 */
  
 -#define PARAMCONF "/etc/samba/vscan-clamav.conf"
 +#define PARAMCONF "/usr/local/etc/samba-vscan/vscan-clamav.conf"
  
+ /* Clam AntiVirus (clamd) stuff:
+    socket name of Clam daemon */
+-#define VSCAN_CLAMD_SOCKET_NAME      "/var/run/clamd"
++#define VSCAN_CLAMD_SOCKET_NAME      "/var/run/clamav/clamd"
  
- /* False = log only infected file, True = log every file access */
+ /* Clam AntiVirus (libclamav) stuff:
+    maximum number of files in archive */
diff -ruPN samba-vscan.orig/files/patch-vscan-fsav.h samba-vscan/files/patch-vscan-fsav.h
--- samba-vscan.orig/files/patch-vscan-fsav.h	Mon May 30 17:09:31 2005
+++ samba-vscan/files/patch-vscan-fsav.h	Mon May 30 17:08:46 2005
@@ -1,15 +1,15 @@
---- f-secure/vscan-fsav.h.old	Fri Aug 13 13:49:40 2004
-+++ f-secure/vscan-fsav.h	Fri Aug 13 13:51:15 2004
-@@ -37,7 +37,7 @@
+--- f-secure/vscan-fsav.h.orig	Wed Sep 29 20:36:09 2004
++++ f-secure/vscan-fsav.h	Mon May 30 15:28:24 2005
+@@ -40,7 +40,7 @@
  
  /* default location of samba-style configuration file (needs Samba >= 2.2.4 or Samba 3.0 */
  
 -#define PARAMCONF "/etc/samba/vscan-fsav.conf"
 +#define PARAMCONF "/usr/local/etc/samba-vscan/vscan-fsav.conf"
- #define VSCAN_MODULE_STR "vscan-fsav"
  
+ /* FSAV-related settings */
  
-@@ -114,13 +114,13 @@
+@@ -52,13 +52,13 @@
  #define VSCAN_FSAV_CONNECT_ID 0
  
  /* fsav configuration file */
diff -ruPN samba-vscan.orig/files/patch-vscan-sophos.h samba-vscan/files/patch-vscan-sophos.h
--- samba-vscan.orig/files/patch-vscan-sophos.h	Mon May 30 17:09:31 2005
+++ samba-vscan/files/patch-vscan-sophos.h	Mon May 30 17:08:46 2005
@@ -1,17 +1,16 @@
---- sophos/vscan-sophos.h.old	Fri Aug 13 14:05:51 2004
-+++ sophos/vscan-sophos.h	Fri Aug 13 14:07:07 2004
-@@ -8,12 +8,12 @@
- 
- /* Sophie stuff: 
-    socket name of Sophie daemon */
--#define SOPHIE_SOCKET_NAME      "/var/run/sophie"
-+#define SOPHIE_SOCKET_NAME      "/var/run/sophie/sophie.sock"
- 
+--- sophos/vscan-sophos.h.orig	Tue Sep 28 20:42:51 2004
++++ sophos/vscan-sophos.h	Mon May 30 15:31:29 2005
+@@ -9,11 +9,11 @@
  /* default location of samba-style configuration file (needs Samba >= 2.2.4
   or Samba 3.0 */
  
 -#define PARAMCONF "/etc/samba/vscan-sophos.conf"
 +#define PARAMCONF "/usr/local/etc/samba-vscan/vscan-sophos.conf"
  
+ /* Sophie stuff:
+    socket name of Sophie daemon */
+-#define SOPHIE_SOCKET_NAME      "/var/run/sophie"
++#define SOPHIE_SOCKET_NAME      "/var/run/sophie/sophie.sock"
+ 
+ /* End Configuration Section */
  
- /* False = log only infected file, True = log every file access */
diff -ruPN samba-vscan.orig/files/patch-vscan-trend.h samba-vscan/files/patch-vscan-trend.h
--- samba-vscan.orig/files/patch-vscan-trend.h	Mon May 30 17:09:31 2005
+++ samba-vscan/files/patch-vscan-trend.h	Mon May 30 17:08:46 2005
@@ -1,17 +1,16 @@
---- trend/vscan-trend.h.old	Fri Aug 13 14:12:27 2004
-+++ trend/vscan-trend.h	Fri Aug 13 14:13:09 2004
-@@ -8,12 +8,12 @@
- 
- /* Trophie stuff: 
-    socket name of Trophie daemon */
--#define TROPHIE_SOCKET_NAME      "/var/run/trophie"
-+#define TROPHIE_SOCKET_NAME      "/var/run/trophie/trophie.sock"
- 
+--- trend/vscan-trend.h.orig	Tue Sep 28 20:42:52 2004
++++ trend/vscan-trend.h	Mon May 30 15:33:12 2005
+@@ -9,11 +9,11 @@
  /* default location of samba-style configuration file (needs Samba >= 2.2.4
   or Samba 3.0 */
  
 -#define PARAMCONF "/etc/samba/vscan-trend.conf"
 +#define PARAMCONF "/usr/local/etc/samba-vscan/vscan-trend.conf"
  
+ /* Trophie stuff:
+    socket name of Trophie daemon */
+-#define TROPHIE_SOCKET_NAME      "/var/run/trophie"
++#define TROPHIE_SOCKET_NAME      "/var/run/trophie/trophie.sock"
+ 
+ /* End Configuration Section */
  
- /* False = log only infected file, True = log every file access */
diff -ruPN samba-vscan.orig/pkg-plist samba-vscan/pkg-plist
--- samba-vscan.orig/pkg-plist	Mon May 30 17:09:31 2005
+++ samba-vscan/pkg-plist	Mon May 30 17:08:46 2005
@@ -16,6 +16,7 @@
 %%VFSDIR%%/vscan-oav.so
 %%VFSDIR%%/vscan-sophos.so
 %%VFSDIR%%/vscan-trend.so
+%%VFSDIR%%/vscan-antivir.so
 @unexec rmdir %D/%%VFSDIR%% 2>/dev/null || true
 @unexec rmdir %D/lib/samba 2>/dev/null || true
 @dirrm etc/samba-vscan

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: pav 
State-Changed-When: Mon May 30 20:58:04 GMT 2005 
State-Changed-Why:  
Asked maintainer for approval 


Responsible-Changed-From-To: freebsd-ports-bugs->pav 
Responsible-Changed-By: pav 
Responsible-Changed-When: Mon May 30 20:58:04 GMT 2005 
Responsible-Changed-Why:  
Track 

http://www.freebsd.org/cgi/query-pr.cgi?pr=81669 

From: Pav Lucistnik <pav@FreeBSD.org>
To: jmelo@freebsdbrasil.com.br, bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/81669: Update port: security/samba-vscan to 0.3.6
Date: Mon, 30 May 2005 22:58:01 +0200

 Dear maintainer of FreeBSD port security/samba-vscan, please take a look
 at
 
 http://www.freebsd.org/cgi/query-pr.cgi?q=81669
 
 Do you approve this update?
 
 -- 
 Pav Lucistnik <pav@oook.cz>
               <pav@FreeBSD.org>
 
 In God we trust. All others must use the callback verifier.
State-Changed-From-To: feedback->closed 
State-Changed-By: pav 
State-Changed-When: Sun Jun 5 20:45:26 GMT 2005 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=81669 
>Unformatted:
