summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorcegger <cegger@pkgsrc.org>2010-05-05 06:12:35 +0000
committercegger <cegger@pkgsrc.org>2010-05-05 06:12:35 +0000
commitd6d27ba444b180fa756b135786a7207792d7648f (patch)
treef046ede9f5153e6b6c87b6bee9197cfc0b6da1ff /sysutils
parent763c0e3d4d60544be7fb2b6498835ab80187c4c8 (diff)
downloadpkgsrc-d6d27ba444b180fa756b135786a7207792d7648f.tar.gz
Apply c/s 19609 from upstream:
xend: Avoid deprecation warnings with Python 2.6. http://xenbits.xensource.com/xen-unstable.hg/rev/4d6029814742 Fixes PR pkg/43231 Add LICENSE Bump pkgversion
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xentools33/Makefile6
-rw-r--r--sysutils/xentools33/distinfo4
-rw-r--r--sysutils/xentools33/patches/patch-ff36
-rw-r--r--sysutils/xentools33/patches/patch-fg47
4 files changed, 90 insertions, 3 deletions
diff --git a/sysutils/xentools33/Makefile b/sysutils/xentools33/Makefile
index 8b043ab8464..7bbabcf1a9a 100644
--- a/sysutils/xentools33/Makefile
+++ b/sysutils/xentools33/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.20 2010/02/10 19:17:46 joerg Exp $
+# $NetBSD: Makefile,v 1.21 2010/05/05 06:12:35 cegger Exp $
#
VERSION= 3.3.2
DISTNAME= xen-${VERSION}
PKGNAME= xentools33-${VERSION}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= sysutils
MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
EXTRACT_SUFX= .tar.gz
@@ -13,6 +13,8 @@ MAINTAINER= cegger@NetBSD.org
HOMEPAGE= http://xen.org/
COMMENT= Userland Tools for Xen 3.3.x
+LICENSE= gnu-gpl-v2
+
PKG_DESTDIR_SUPPORT= user-destdir
#DEPENDS+= ${PYPKGPREFIX}-twisted-[0-9]*:../../net/py-twisted
diff --git a/sysutils/xentools33/distinfo b/sysutils/xentools33/distinfo
index 7c32dbb0b03..3411918b41c 100644
--- a/sysutils/xentools33/distinfo
+++ b/sysutils/xentools33/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.19 2010/01/01 00:34:53 ver Exp $
+$NetBSD: distinfo,v 1.20 2010/05/05 06:12:35 cegger Exp $
SHA1 (xen-3.3.2.tar.gz) = 7f438e73ac81b25cf5e1570709e87001066bafe4
RMD160 (xen-3.3.2.tar.gz) = 28faa56286f2a418e35dcba6079570ea871d6c7b
@@ -49,3 +49,5 @@ SHA1 (patch-fb) = 22a07628566b43aa786c410927d29a283e8cf141
SHA1 (patch-fc) = d5afc1a1e16f26203a5615142efda8fade48b371
SHA1 (patch-fd) = cb4741bf33050d72cfbcd2eff4a8632d976de643
SHA1 (patch-fe) = 85d42672766fe8ce2dc7f745938722710c6ee5a3
+SHA1 (patch-ff) = 6ff97fa4f34f29c276e4aaab4b4db9ccf7b09957
+SHA1 (patch-fg) = 913295d341c1dd5bf4d1ef78f27520920f138d4c
diff --git a/sysutils/xentools33/patches/patch-ff b/sysutils/xentools33/patches/patch-ff
new file mode 100644
index 00000000000..9bd163209b4
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ff
@@ -0,0 +1,36 @@
+$NetBSD: patch-ff,v 1.1 2010/05/05 06:12:36 cegger Exp $
+
+--- python/xen/util/acmpolicy.py.orig 2009-08-06 12:56:37.000000000 +0000
++++ python/xen/util/acmpolicy.py
+@@ -17,12 +17,19 @@
+ #============================================================================
+
+ import os
+-import sha
+ import stat
+ import array
+ import struct
+ import shutil
+ import commands
++
++# sha is deprecated as of python 2.6
++try:
++ from hashlib import sha1
++except ImportError:
++ # but hashlib was only added in python 2.5
++ from sha import new as sha1
++
+ from xml.dom import minidom, Node
+ from xen.xend.XendLogging import log
+ from xen.util import xsconstants, bootloader, mkdir
+@@ -1102,8 +1109,8 @@ class ACMPolicy(XSPolicy):
+ return None
+
+ def hash(self):
+- """ Calculate a SAH1 hash of the XML policy """
+- return sha.sha(self.toxml())
++ """ Calculate a SHA1 hash of the XML policy """
++ return sha1(self.toxml())
+
+ def save(self):
+ ### Save the XML policy into a file ###
diff --git a/sysutils/xentools33/patches/patch-fg b/sysutils/xentools33/patches/patch-fg
new file mode 100644
index 00000000000..2cc3dd19ae2
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-fg
@@ -0,0 +1,47 @@
+$NetBSD: patch-fg,v 1.1 2010/05/05 06:12:36 cegger Exp $
+
+--- python/xen/xend/XendAPI.py.orig 2009-08-06 12:56:37.000000000 +0000
++++ python/xen/xend/XendAPI.py
+@@ -18,7 +18,6 @@
+ import inspect
+ import os
+ import Queue
+-import sets
+ import string
+ import sys
+ import traceback
+@@ -26,6 +25,12 @@ import threading
+ import time
+ import xmlrpclib
+
++# sets is deprecated as of python 2.6, but set is unavailable in 2.3
++try:
++ set
++except NameError:
++ from sets import Set as set
++
+ import XendDomain, XendDomainInfo, XendNode, XendDmesg
+ import XendLogging, XendTaskManager, XendAPIStore
+
+@@ -117,16 +122,17 @@ event_registrations = {}
+ def event_register(session, reg_classes):
+ if session not in event_registrations:
+ event_registrations[session] = {
+- 'classes' : sets.Set(),
++ 'classes' : set(),
+ 'queue' : Queue.Queue(EVENT_QUEUE_LENGTH),
+ 'next-id' : 1
+ }
+ if not reg_classes:
+ reg_classes = classes
+- if hasattr(set, 'union_update'):
+- event_registrations[session]['classes'].union_update(reg_classes)
++ sessionclasses = event_registrations[session]['classes']
++ if hasattr(sessionclasses, 'union_update'):
++ sessionclasses.union_update(reg_classes)
+ else:
+- event_registrations[session]['classes'].update(reg_classes)
++ sessionclasses.update(reg_classes)
+
+
+