Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Aug 2011 18:16:03 GMT
From:      Ruslan Mahmatkhanov <cvs-src@yandex.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/160071: [PATCH] security/zenmap: eliminate py-pysqlite2x dependency
Message-ID:  <201108241816.p7OIG395032181@red.freebsd.org>
Resent-Message-ID: <201108241820.p7OIKEsY083455@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         160071
>Category:       ports
>Synopsis:       [PATCH] security/zenmap: eliminate py-pysqlite2x dependency
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 24 18:20:14 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Ruslan Mahmatkhanov
>Release:        9.0-BETA1
>Organization:
>Environment:
9.0-BETA1 i386
>Description:
- bump USE_PYTHON to 2.5+ (the point is to not depend on python24)
- since it now requires 2.5+ use databases/py-sqlite3 
instead of databases/py-pysqlite2x
- bump portrevision cause of deps change

I checked the code. They use this pattern when dealing with sqlite binding:

"""
 99 try:
100     from pysqlite2 import dbapi2 as sqlite
101 except ImportError:
102     try:
103         # In case this script is been running under python2.5 with sqlite3
104         import sqlite3 as sqlite
105     except ImportError:
106         raise ImportError(_("No module named dbapi2.pysqlite2 or sqlite3"))
"""

So nothing will be broken with sqlite3.


>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruNa zenmap.orig/Makefile zenmap/Makefile
--- zenmap.orig/Makefile	2010-08-09 17:28:50.000000000 +0400
+++ zenmap/Makefile	2011-08-24 22:08:29.000000000 +0400
@@ -7,7 +7,7 @@
 
 PORTNAME=	zenmap
 PORTVERSION=	5.21
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	security ipv6
 MASTER_SITES=	http://nmap.org/dist/ \
 		http://nmap.ucsd.edu/dist/ \
@@ -21,11 +21,11 @@
 COMMENT=	GUI frontend for the nmap scanning utility
 
 RUN_DEPENDS=	${LOCALBASE}/bin/nmap:${PORTSDIR}/security/nmap \
-		${PYTHON_SITELIBDIR}/pysqlite2/__init__.py:${PORTSDIR}/databases/py-pysqlite23
+		${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3
 
 PYDISTUTILS_PKGVERSION=	${DISTVERSION}
 USE_BZIP2=	yes
-USE_PYTHON=	yes
+USE_PYTHON=	2.5+
 USE_GETTEXT=	yes
 USE_GNOME=	pygtk2
 INSTALLS_EGGINFO=	yes
@@ -35,7 +35,7 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${ARCH} != "i386"
+.if ${ARCH} != "i386" || ${PYTHON_REL} > 260
 WITHOUT_PSYCO=	yes
 .endif
 


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108241816.p7OIG395032181>