From nobody@FreeBSD.org  Thu Jan  8 21:25:34 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1CC871065679
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  8 Jan 2009 21:25:34 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 09A738FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  8 Jan 2009 21:25:34 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n08LPX56044197
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 8 Jan 2009 21:25:33 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n08LPXEG044196;
	Thu, 8 Jan 2009 21:25:33 GMT
	(envelope-from nobody)
Message-Id: <200901082125.n08LPXEG044196@www.freebsd.org>
Date: Thu, 8 Jan 2009 21:25:33 GMT
From: Milan Obuch <bsd@dino.sk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [NEW PORT] security/py-pyclamd
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         130312
>Category:       ports
>Synopsis:       [NEW PORT] security/py-pyclamd
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 08 21:30:04 UTC 2009
>Closed-Date:    Fri Jan 09 23:23:56 UTC 2009
>Last-Modified:  Thu Jan 22 18:03:23 UTC 2009
>Originator:     Milan Obuch
>Release:        6.4, 7.1, 8
>Organization:
>Environment:
>Description:
pyclamd is alternative to pyclamav for accessing clamd from python code.
It works for me in courier-pythonfilter clamav module, whereas pyclamav did not (at least some time ago, not checked recently)
>How-To-Repeat:

>Fix:
New port includde in shar

Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	.
#	./files
#	./files/patch-pyclamd.py
#	./files/patch-setup.py
#	./pkg-plist
#	./Makefile
#	./distinfo
#	./pkg-descr
#
echo c - .
mkdir -p . > /dev/null 2>&1
echo c - ./files
mkdir -p ./files > /dev/null 2>&1
echo x - ./files/patch-pyclamd.py
sed 's/^X//' >./files/patch-pyclamd.py << '388cba0f80852ae68eab7868b56d8d26'
X--- pyclamd.py.orig	2007-04-11 18:10:26.000000000 +0200
X+++ pyclamd.py	2007-08-28 11:28:48.000000000 +0200
X@@ -14,7 +14,7 @@
X     # Network
X     pyclamd.init_network_socket('localhost', 3310)
X     # Unix local socket 
X-    #pyclamd.init_unix_socket('/var/run/clamd')
X+    #pyclamd.init_unix_socket('/var/run/clamav/clamd')
X 
X     # Get Clamscan version
X     print pyclamd.version()
X@@ -29,7 +29,7 @@
X Test strings :
X ^^^^^^^^^^^^
X >>> try:
X-...     init_unix_socket('/var/run/clamd')
X+...     init_unix_socket('/var/run/clamav/clamd')
X ... except ScanError:
X ...     init_network_socket('localhost', 3310)
X ... 
X@@ -68,7 +68,7 @@
X 
X # Default values for globals
X use_socket = None
X-clamd_SOCKET = "/var/run/clamd"
X+clamd_SOCKET = "/var/run/clamav/clamd"
X clamd_HOST='127.0.0.1'
X clamd_PORT=3310
X 
X@@ -85,7 +85,7 @@
X             
X ############################################################################
X 
X-def init_unix_socket(filename="/var/run/clamd"):
X+def init_unix_socket(filename="/var/run/clamav/clamd"):
X     """
X     Init pyclamd to use clamd unix local socket 
X     
388cba0f80852ae68eab7868b56d8d26
echo x - ./files/patch-setup.py
sed 's/^X//' >./files/patch-setup.py << '6a3a2d1daf69a038a35d278559b9cd59'
X--- setup.py.orig	2009-01-07 13:42:10.000000000 +0100
X+++ setup.py	2009-01-07 13:42:27.000000000 +0100
X@@ -0,0 +1,16 @@
X+#!/usr/bin/python
X+
X+import glob
X+import os
X+import sys
X+from distutils.core import setup
X+
X+setup(name="pyclamd",
X+      version="0.1.1",
X+      description="Python ClamD module.",
X+      author="Alexandre Norman",
X+      author_email="norman@xael.org",
X+      url="http://xael.org/norman/python/pyclamd/",
X+      license="GPL",
X+      packages=['']
X+     )
6a3a2d1daf69a038a35d278559b9cd59
echo x - ./pkg-plist
sed 's/^X//' >./pkg-plist << 'ef3e7f63841ae908ba397c2bef1fbad6'
X%%PYTHON_SITELIBDIR%%/pyclamd.py
X%%PYTHON_SITELIBDIR%%/pyclamd.pyc
X%%PYTHON_SITELIBDIR%%/pyclamd.pyo
ef3e7f63841ae908ba397c2bef1fbad6
echo x - ./Makefile
sed 's/^X//' >./Makefile << '464ef7c6571951809b23e262cbe26e19'
X# New ports collection makefile for:	pyClamd
X# Date created:				Jan 7, 2009
X# Whom:					Milan Obuch
X#
X# $FreeBSD: ports/security/py-pyclamd/Makefile,v$
X#
X
XPORTNAME=	pyclamd
XPORTVERSION=	0.1.1
XCATEGORIES=	mail python
XMASTER_SITES=	http://xael.org/norman/python/pyclamd/
XDISTFILES=	pyclamd.py
X
XMAINTAINER=	bsd@dino.sk
XCOMMENT=	Python ClamD interface module
X
XUSE_PYTHON=	yes
XUSE_PYDISTUTILS=yes
X
X.include <bsd.port.pre.mk>
X
Xdo-extract:
X	@${RM} -rf ${WRKDIR}
X	@${MKDIR} ${WRKDIR}
X	@${MKDIR} ${WRKDIR}/${PKGNAME}
X	if ! (cd ${WRKDIR} && ${CP} ${DISTDIR}/${DISTFILES} ${WRKDIR}/${PKGNAME}/); \
X	then \
X		exit 1; \
X	fi; \
X
X.include <bsd.port.post.mk>
464ef7c6571951809b23e262cbe26e19
echo x - ./distinfo
sed 's/^X//' >./distinfo << 'aec8793adfd5b7c3f00e62ae41a09ac2'
XMD5 (pyclamd.py) = fcdc195401e8c78a0d19ee6b8c23fdcb
XSHA256 (pyclamd.py) = 3542cc2271c8365a4205c563705a9f3090dca3f6242524119cb6560b7bbfcbaf
XSIZE (pyclamd.py) = 10498
aec8793adfd5b7c3f00e62ae41a09ac2
echo x - ./pkg-descr
sed 's/^X//' >./pkg-descr << '0e313719ff012ceaf97a028d51caa8f5'
XpyClamd is a python interface to Clamd (Clamav daemon).
XBy using pyClamd, you can add virus detection capabilities
Xto your python software in an efficient and easy way.
0e313719ff012ceaf97a028d51caa8f5
exit



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-python 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Jan 8 21:30:16 UTC 2009 
Responsible-Changed-Why:  
freebsd-python@ wants this port PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130312 
Responsible-Changed-From-To: freebsd-python->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Thu Jan 8 22:18:39 UTC 2009 
Responsible-Changed-Why:  
I'll take it. 

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

Date: Wed, 21 Jan 2009 15:16:10 GMT
From: Milan Obuch <bsd@dino.sk>
Subject: Fix for ports/130312: [NEW PORT] security/py-pyclamd
 
 In Makefile, there was an error in CATEGORIES, to be fixed by attached patch.
 This was, however, already mentioned in original PR. As a result, port was submitted as mail/py-pyclamd, which is plain wrong. This should really be under security/py-pyclamd.
 Please fix and move this port.
 >How-To-Repeat:
 
 >Fix:
 --- mail/py-pyclamd/Makefile    2009-01-10 00:24:06.000000000 +0100
 +++ security/py-pyclamd/Makefile        2009-01-21 16:12:44.000000000 +0100
 @@ -7,7 +7,7 @@
 
  PORTNAME=      pyclamd
  PORTVERSION=   0.1.1
 -CATEGORIES=    mail python
 +CATEGORIES=    security python
  MASTER_SITES=  http://xael.org/norman/python/pyclamd/
  DISTFILES=     pyclamd.py
 
From: Milan Obuch <bsd@dino.sk>
To: bug-followup@freebsd.org, bsd@dino.sk
Cc:  
Subject: Re: ports/130312: [NEW PORT] security/py-pyclamd
Date: Thu, 8 Jan 2009 23:02:33 +0100

 Small error slipped into Makefile - CATEGORIES line should read
 
 CATEGORIES=     security python
 
 Please adjust.
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Fri Jan 9 23:23:55 UTC 2009 
State-Changed-Why:  
New port added, with minor changes. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/130312: commit references a PR
Date: Fri,  9 Jan 2009 23:24:16 +0000 (UTC)

 miwi        2009-01-09 23:24:07 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail                 Makefile 
   Added files:
     mail/py-pyclamd      Makefile distinfo pkg-descr pkg-plist 
     mail/py-pyclamd/files patch-pyclamd.py patch-setup.py 
   Log:
   pyClamd is a python interface to Clamd (Clamav daemon).
   By using pyClamd, you can add virus detection capabilities
   to your python software in an efficient and easy way.
   
   PR:             ports/130312
   Submitted by:   Milan Obuch
   
   Revision  Changes    Path
   1.940     +1 -0      ports/mail/Makefile
   1.1       +31 -0     ports/mail/py-pyclamd/Makefile (new)
   1.1       +3 -0      ports/mail/py-pyclamd/distinfo (new)
   1.1       +38 -0     ports/mail/py-pyclamd/files/patch-pyclamd.py (new)
   1.1       +19 -0     ports/mail/py-pyclamd/files/patch-setup.py (new)
   1.1       +3 -0      ports/mail/py-pyclamd/pkg-descr (new)
   1.1       +3 -0      ports/mail/py-pyclamd/pkg-plist (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
