From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Aug 24 17:20:04 2010 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 013F010656AD for ; Tue, 24 Aug 2010 17:20:03 +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 B38E28FC1F for ; Tue, 24 Aug 2010 17:20:03 +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 o7OHK34h005841 for ; Tue, 24 Aug 2010 17:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7OHK3es005840; Tue, 24 Aug 2010 17:20:03 GMT (envelope-from gnats) Resent-Date: Tue, 24 Aug 2010 17:20:03 GMT Resent-Message-Id: <201008241720.o7OHK3es005840@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, Jesse Kempf Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 695F110656AA for ; Tue, 24 Aug 2010 17:11:07 +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 582DF8FC1C for ; Tue, 24 Aug 2010 17:11:07 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o7OHB6QH061552 for ; Tue, 24 Aug 2010 17:11:06 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o7OHB66p061540; Tue, 24 Aug 2010 17:11:06 GMT (envelope-from nobody) Message-Id: <201008241711.o7OHB66p061540@www.freebsd.org> Date: Tue, 24 Aug 2010 17:11:06 GMT From: Jesse Kempf To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/149944: [maintainer update] devel/py-daemon fix API breakage caused by py-lockfile 0.8 -> 0.9 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: Tue, 24 Aug 2010 17:20:04 -0000 >Number: 149944 >Category: ports >Synopsis: [maintainer update] devel/py-daemon fix API breakage caused by py-lockfile 0.8 -> 0.9 >Confidential: no >Severity: critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Tue Aug 24 17:20:03 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Jesse Kempf >Release: 7.2-STABLE >Organization: >Environment: FreeBSD waffle.davisvision.com 7.2-STABLE FreeBSD 7.2-STABLE #1: Mon Nov 23 08:52:01 EST 2009 jkempf@waffle.davisvision.com:/usr/obj/usr/src/sys/GENERIC amd64 >Description: The author of lockfile made API-breaking changes in the 0.9 release. The attached patch fixes py-daemon to use the new API and sets a dependency on py-lockfile >= 0.9. Without the patch, py-daemon will not work. >How-To-Repeat: >Fix: Patch attached with submission follows: diff -r 7c4277bef47a -r 2ab0812e456a py-daemon/Makefile --- a/py-daemon/Makefile Tue Aug 24 15:39:31 2010 +0000 +++ b/py-daemon/Makefile Tue Aug 24 17:05:52 2010 +0000 @@ -16,7 +16,7 @@ COMMENT= Well-behaved daemon framework for Python BUILD_DEPENDS=\ - ${PYTHON_PKGNAMEPREFIX}lockfile>0:${PORTSDIR}/devel/py-lockfile + ${PYTHON_PKGNAMEPREFIX}lockfile>=0.9:${PORTSDIR}/devel/py-lockfile RUN_DEPENDS:= ${BUILD_DEPENDS} diff -r 7c4277bef47a -r 2ab0812e456a py-daemon/files/patch-daemon-pidlockfile.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/py-daemon/files/patch-daemon-pidlockfile.py Tue Aug 24 17:05:52 2010 +0000 @@ -0,0 +1,72 @@ +--- daemon/pidlockfile.py.orig 2010-08-24 16:57:37.753374406 +0000 ++++ daemon/pidlockfile.py 2010-08-24 16:58:57.825989360 +0000 +@@ -22,6 +22,7 @@ + NotLocked, NotMyLock, + ) + ++from lockfile.pidlockfile import PIDLockFile + + class PIDFileError(Exception): + """ Abstract base class for errors specific to PID files. """ +@@ -30,61 +31,6 @@ + """ Raised when parsing contents of PID file fails. """ + + +-class PIDLockFile(LinkFileLock, object): +- """ Lockfile implemented as a Unix PID file. +- +- The PID file is named by the attribute `path`. When locked, +- the file will be created with a single line of text, +- containing the process ID (PID) of the process that acquired +- the lock. +- +- The lock is acquired and maintained as per `LinkFileLock`. +- +- """ +- +- def read_pid(self): +- """ Get the PID from the lock file. +- """ +- result = read_pid_from_pidfile(self.path) +- return result +- +- def acquire(self, *args, **kwargs): +- """ Acquire the lock. +- +- Locks the PID file then creates the PID file for this +- lock. The `timeout` parameter is used as for the +- `LinkFileLock` class. +- +- """ +- super(PIDLockFile, self).acquire(*args, **kwargs) +- try: +- write_pid_to_pidfile(self.path) +- except OSError, exc: +- error = LockFailed("%(exc)s" % vars()) +- raise error +- +- def release(self): +- """ Release the lock. +- +- Removes the PID file then releases the lock, or raises an +- error if the current process does not hold the lock. +- +- """ +- if self.i_am_locking(): +- remove_existing_pidfile(self.path) +- super(PIDLockFile, self).release() +- +- def break_lock(self): +- """ Break an existing lock. +- +- If the lock is held, breaks the lock and removes the PID +- file. +- +- """ +- super(PIDLockFile, self).break_lock() +- remove_existing_pidfile(self.path) +- +- + class TimeoutPIDLockFile(PIDLockFile): + """ Lockfile with default timeout, implemented as a Unix PID file. + >Release-Note: >Audit-Trail: >Unformatted: