From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Aug 29 17:30:12 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC2A31065674 for ; Mon, 29 Aug 2011 17:30:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 83D3D8FC16 for ; Mon, 29 Aug 2011 17:30:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7THUCpR043391 for ; Mon, 29 Aug 2011 17:30:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7THUC7B043390; Mon, 29 Aug 2011 17:30:12 GMT (envelope-from gnats) Resent-Date: Mon, 29 Aug 2011 17:30:12 GMT Resent-Message-Id: <201108291730.p7THUC7B043390@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ruslan Mahmatkhanov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA4031065674 for ; Mon, 29 Aug 2011 17:20:34 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 9F3688FC08 for ; Mon, 29 Aug 2011 17:20:34 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p7THKYiI039251 for ; Mon, 29 Aug 2011 17:20:34 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p7THKYTq039250; Mon, 29 Aug 2011 17:20:34 GMT (envelope-from nobody) Message-Id: <201108291720.p7THKYTq039250@red.freebsd.org> Date: Mon, 29 Aug 2011 17:20:34 GMT From: Ruslan Mahmatkhanov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/160288: [PATCH] security/pwman3: eliminate py-pysqlite2x dependency X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2011 17:30:12 -0000 >Number: 160288 >Category: ports >Synopsis: [PATCH] security/pwman3: 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: Mon Aug 29 17:30:12 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Ruslan Mahmatkhanov >Release: 9.0-BETA1 >Organization: >Environment: 9.0-BETA1 i386 >Description: pwman3 is requires python 2.5+ (via USE_PYTHON) but it actually uses deprecated python24 API for accessing sqlite databases and when dealing with celementtree. So i added a couple of simple patches that make it work with sqlite3 and xml.etree.cElementTree. And all is working fine on python27 with this patches: """ [rm@smeshariki3 ~]> pwman3 Please enter your new password: Please enter your new password again: Pwman3 0.0.6 (c) Ivan Kelly pwman> help Documented commands (type help ): ======================================== EOF delete exit filter help list new print save tags clear edit export forget import ls passwd rm set pwman> help new Usage: new Creates a new node. pwman> new Username: popo Password (Blank to generate): Password length (default 7): 7 New password: YImvIoR Url: Notes: Tags: Password ID: 1 pwman> list Current tags: None 1. popo@ pwman> ls Current tags: None 1. popo@ pwman> passwd Please enter your current password: Please enter your new password: Please enter your new password again: """ This is the last consumer of databases/py-pysqlite23 and now it doesn't need python24 too. - while i'm here, fix whitespace issues in pkg-descr - bump portrevision >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruNa pwman3.orig/Makefile pwman3/Makefile --- pwman3.orig/Makefile 2008-05-06 07:09:35.000000000 +0400 +++ pwman3/Makefile 2011-08-29 21:13:44.000000000 +0400 @@ -7,6 +7,7 @@ PORTNAME= pwman3 PORTVERSION= 0.0.6 +PORTREVISION= 1 CATEGORIES= security python MASTER_SITES= http://pwman.bleurgh.com/~ivan/pwman3/source/ \ http://source.antisupport.com/pwman3/ @@ -16,8 +17,7 @@ COMMENT= Console password management application with sql storage RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycrypto>=2.0:${PORTSDIR}/security/py-pycrypto \ - ${PYTHON_PKGNAMEPREFIX}cElementTree>=1.0.5:${PORTSDIR}/devel/py-celementtree \ - ${PYTHON_PKGNAMEPREFIX}pysqlite>=2.0.5:${PORTSDIR}/databases/py-pysqlite23 + ${PYTHON_PKGNAMEPREFIX}sqlite3>=0:${PORTSDIR}/databases/py-sqlite3 USE_PYTHON= 2.5+ USE_PYDISTUTILS= yes diff -ruNa pwman3.orig/files/patch-pwman-data-drivers_sqlite.py pwman3/files/patch-pwman-data-drivers_sqlite.py --- pwman3.orig/files/patch-pwman-data-drivers_sqlite.py 1970-01-01 03:00:00.000000000 +0300 +++ pwman3/files/patch-pwman-data-drivers_sqlite.py 2011-08-29 21:05:06.000000000 +0400 @@ -0,0 +1,11 @@ +--- pwman/data/drivers/sqlite.py.orig 2007-02-04 21:44:43.000000000 +0300 ++++ pwman/data/drivers/sqlite.py 2011-08-29 21:02:34.000000000 +0400 +@@ -22,7 +22,7 @@ + from pwman.data.nodes import Node + from pwman.data.tags import Tag + +-from pysqlite2 import dbapi2 as sqlite ++from sqlite3 import dbapi2 as sqlite + import pwman.util.config as config + import cPickle + diff -ruNa pwman3.orig/files/patch-pwman-exchange_exporter.py pwman3/files/patch-pwman-exchange_exporter.py --- pwman3.orig/files/patch-pwman-exchange_exporter.py 1970-01-01 03:00:00.000000000 +0300 +++ pwman3/files/patch-pwman-exchange_exporter.py 2011-08-29 21:09:10.000000000 +0400 @@ -0,0 +1,11 @@ +--- pwman/exchange/exporter.py.orig 2007-02-04 21:44:43.000000000 +0300 ++++ pwman/exchange/exporter.py 2011-08-29 21:07:59.000000000 +0400 +@@ -17,7 +17,7 @@ + # Copyright (C) 2006 Ivan Kelly + #============================================================================ + +-from cElementTree import Element, SubElement, dump, ElementTree ++from xml.etree.cElementTree import Element, SubElement, dump, ElementTree + from pwman.data.nodes import Node + from pwman.data.tags import Tag + diff -ruNa pwman3.orig/files/patch-pwman-exchange_importer.py pwman3/files/patch-pwman-exchange_importer.py --- pwman3.orig/files/patch-pwman-exchange_importer.py 1970-01-01 03:00:00.000000000 +0300 +++ pwman3/files/patch-pwman-exchange_importer.py 2011-08-29 21:09:20.000000000 +0400 @@ -0,0 +1,11 @@ +--- pwman/exchange/importer.py.orig 2007-02-04 21:44:43.000000000 +0300 ++++ pwman/exchange/importer.py 2011-08-29 21:07:49.000000000 +0400 +@@ -17,7 +17,7 @@ + # Copyright (C) 2006 Ivan Kelly + #============================================================================ + +-import cElementTree as ET ++import xml.etree.cElementTree as ET + from pwman.data.nodes import Node + from pwman.data.tags import Tag + diff -ruNa pwman3.orig/pkg-descr pwman3/pkg-descr --- pwman3.orig/pkg-descr 2008-05-06 07:09:35.000000000 +0400 +++ pwman3/pkg-descr 2011-08-29 21:03:41.000000000 +0400 @@ -1,5 +1,5 @@ -Pwman3 is a console based password management application. -Pwman3 is written in python. It uses sql for storage +Pwman3 is a console based password management application. +Pwman3 is written in python. It uses sql for storage and all data is encrypted when it isn't being viewed on screen. WWW: http://pwman.bleurgh.com >Release-Note: >Audit-Trail: >Unformatted: