summaryrefslogtreecommitdiff
path: root/sysutils/xentools30
diff options
context:
space:
mode:
authorbouyer <bouyer@pkgsrc.org>2007-04-28 17:14:49 +0000
committerbouyer <bouyer@pkgsrc.org>2007-04-28 17:14:49 +0000
commit2d5bf0a665107a91f2093f126d57ffb03d8044e5 (patch)
tree3b3ab8c11eaf37a14b055f861ea49d81cff65c47 /sysutils/xentools30
parent05dfe3d477afd03c388b15a3321291afe2b8ffd8 (diff)
downloadpkgsrc-2d5bf0a665107a91f2093f126d57ffb03d8044e5.tar.gz
Update xen 3.0 packages to 3.0.4.
pksgrc changes: install man pages for xm, xend-config.sxp and xmdomain.cfg. Should fix pkg/36190. Main changes: This is largely an opportunistic stabilising release for HVM guests, due to the large amount of work in that area of the code since 3.0.3. These enhancements have in particular improved support for SMP and ACPI Linux and Windows operating systems.
Diffstat (limited to 'sysutils/xentools30')
-rw-r--r--sysutils/xentools30/Makefile43
-rw-r--r--sysutils/xentools30/PLIST31
-rw-r--r--sysutils/xentools30/distinfo39
-rw-r--r--sysutils/xentools30/files/NetBSD.mk2
-rw-r--r--sysutils/xentools30/patches/patch-aa15
-rw-r--r--sysutils/xentools30/patches/patch-ac10
-rw-r--r--sysutils/xentools30/patches/patch-ad173
-rw-r--r--sysutils/xentools30/patches/patch-al13
-rw-r--r--sysutils/xentools30/patches/patch-am43
-rw-r--r--sysutils/xentools30/patches/patch-as17
-rw-r--r--sysutils/xentools30/patches/patch-aw21
-rw-r--r--sysutils/xentools30/patches/patch-ba10
-rw-r--r--sysutils/xentools30/patches/patch-bb19
-rw-r--r--sysutils/xentools30/patches/patch-bc14
-rw-r--r--sysutils/xentools30/patches/patch-bd13
-rw-r--r--sysutils/xentools30/patches/patch-br9
-rw-r--r--sysutils/xentools30/patches/patch-bs60
-rw-r--r--sysutils/xentools30/patches/patch-bt12
-rw-r--r--sysutils/xentools30/patches/patch-bv33
-rw-r--r--sysutils/xentools30/patches/patch-ci16
-rw-r--r--sysutils/xentools30/patches/patch-cj23
-rw-r--r--sysutils/xentools30/patches/patch-ck16
-rw-r--r--sysutils/xentools30/patches/patch-cl12
23 files changed, 370 insertions, 274 deletions
diff --git a/sysutils/xentools30/Makefile b/sysutils/xentools30/Makefile
index ecfbafe130a..651b5f8ad1c 100644
--- a/sysutils/xentools30/Makefile
+++ b/sysutils/xentools30/Makefile
@@ -1,12 +1,11 @@
-# $NetBSD: Makefile,v 1.8 2007/02/22 19:27:12 wiz Exp $
+# $NetBSD: Makefile,v 1.9 2007/04/28 17:14:50 bouyer Exp $
#
-DISTNAME= xen-3.0.3_0-src
-PKGNAME= xentools30-3.0.3
-PKGREVISION= 2
+DISTNAME= xen-3.0.4_1-src
+PKGNAME= xentools30-3.0.4
CATEGORIES= sysutils
MASTER_SITES= http://www.cl.cam.ac.uk/research/srg/netos/xen/downloads/ \
- http://bits.xensource.com/oss-xen/release/3.0.3-0/src.tgz/
+ http://bits.xensource.com/oss-xen/release/3.0.4-1/src.tgz/
EXTRACT_SUFX= .tgz
MAINTAINER= bouyer@NetBSD.org
@@ -22,19 +21,20 @@ ONLY_FOR_PLATFORM= Linux-2.[46]*-i386 NetBSD-*-i386
CONFLICTS+= libxen-[0-9]*
CONFLICTS+= xentools20-[0-9]*
-WRKSRC= ${WRKDIR}/xen-3.0.3_0-src/tools
+WRKSRC= ${WRKDIR}/xen-3.0.4_1-src/tools
CHECK_PORTABILITY_SKIP= examples/*
EGDIR= ${PREFIX}/share/examples/xen
MESSAGE_SUBST= EGDIR=${EGDIR}
+USE_TOOLS+= perl #for pod2man
USE_TOOLS+= gmake
MAKE_ENV+= CONFIG_NetBSD=yes
MAKE_ENV+= CONFIG_MBOOTPACK=no
MAKE_ENV+= EGDIR=${EGDIR:Q}
MAKE_ENV+= MV=${MV:Q} PYTHON=${PYTHONBIN:Q} SED=${SED:Q}
MAKE_ENV+= XEN_TARGET_ARCH="x86_32"
-PYTHON_VERSIONS_ACCEPTED= 24 23 22
+PYTHON_VERSIONS_ACCEPTED= 24 23
PY_PATCHPLIST= yes
PYTHON_PATCH_SCRIPTS+= misc/xm
PYTHON_PATCH_SCRIPTS+= misc/netfix
@@ -42,7 +42,6 @@ PYTHON_PATCH_SCRIPTS+= misc/xen-bugtool
PYTHON_PATCH_SCRIPTS+= misc/xencons
PYTHON_PATCH_SCRIPTS+= misc/xend
PYTHON_PATCH_SCRIPTS+= misc/xensymoops
-PYTHON_PATCH_SCRIPTS+= pygrub/src/fsys/ext2/test.py
PYTHON_PATCH_SCRIPTS+= pygrub/src/pygrub
PYTHON_PATCH_SCRIPTS+= python/xen/util/bugtool.py
PYTHON_PATCH_SCRIPTS+= python/xen/xend/sxp.py
@@ -66,13 +65,12 @@ SUBST_MESSAGE.paths= Fixing hardcoded paths.
SUBST_CLASSES+= pathsvar
SUBST_STAGE.pathsvar= pre-configure
-SUBST_FILES.pathsvar= debugger/pdb/xcs.ml \
- examples/init.d/sysconfig.xendomains \
+SUBST_FILES.pathsvar= examples/init.d/sysconfig.xendomains \
examples/xend-config.sxp \
python/xen/xend/server/relocate.py \
python/xen/xend/XendRoot.py \
security/Makefile security/python/xensec_gen/main.py \
- xenstore/Makefile xenstore/xs_lib.c
+ xenstore/xs_lib.c
SUBST_SED.pathsvar= -e "s|/var/lib|${VARBASE}/run|g"
SUBST_CLASSES+= py
@@ -84,16 +82,12 @@ SUBST_SED.py= -e "s,python,${PYTHONBIN},g"
SUBST_CLASSES+= conf
SUBST_STAGE.conf= pre-configure
-SUBST_FILES.conf= ioemu/configure
-SUBST_FILES.conf+= ioemu/vl.c
-SUBST_FILES.conf+= python/xen/xend/XendRoot.py
-SUBST_FILES.conf+= python/xen/xm/tests/test_create.py
+SUBST_FILES.conf= python/xen/xend/XendRoot.py
+SUBST_FILES.conf+= python/xen/xend/osdep.py
SUBST_FILES.conf+= python/xen/xm/create.py
SUBST_FILES.conf+= python/xen/xm/addlabel.py
SUBST_FILES.conf+= python/xen/xm/getlabel.py
SUBST_FILES.conf+= python/xen/xm/rmlabel.py
-SUBST_FILES.conf+= security/example.txt
-SUBST_FILES.conf+= security/secpol_xml2bin.h
SUBST_SED.conf= -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g"
SUBST_CLASSES+= prefix
@@ -106,13 +100,9 @@ SUBST_SED.prefix= -e "s,@PREFIX@,${PREFIX},g"
.if ${OPSYS} == "NetBSD"
SUBST_CLASSES+= proc
SUBST_STAGE.proc= pre-configure
-SUBST_FILES.proc= libxc/xc_misc.c
-SUBST_FILES.proc+= python/xen/xend/XendVnet.py
+SUBST_FILES.proc= python/xen/xend/XendVnet.py
SUBST_FILES.proc+= python/xen/xend/balloon.py
-SUBST_FILES.proc+= security/secpol_tool.c
-SUBST_FILES.proc+= xenmon/xenbaked.c
SUBST_FILES.proc+= xenstore/xs_lib.c
-SUBST_FILES.proc+= xentrace/xentrace.c
SUBST_SED.proc= -e "s|/proc|/kern|g"
PROCPATH= /kern
.else
@@ -141,6 +131,12 @@ pre-build:
${CP} ${FILESDIR}/xenio.h ${WRKSRC}/libxc/xen/NetBSD
${TEST} -f ${WRKSRC}/libxc/xen/NetBSD/xenio3.h || \
${CP} ${FILESDIR}/xenio3.h ${WRKSRC}/libxc/xen/NetBSD
+ ${CP} ${FILESDIR}/NetBSD.mk ${WRKSRC}/../config/
+ pod2man ${WRKSRC}/../docs/man/xend-config.sxp.pod.5 \
+ ${WRKDIR}/xend-config.sxp.5
+ pod2man ${WRKSRC}/../docs/man/xmdomain.cfg.pod.5 \
+ ${WRKDIR}/xmdomain.cfg.5
+ pod2man ${WRKSRC}/../docs/man/xm.pod.1 ${WRKDIR}/xm.1
.if ${OPSYS} == "NetBSD"
post-build:
@@ -171,6 +167,9 @@ post-install:
${INSTALL_SCRIPT} ${WRKSRC}/examples/${s} ${EGDIR}/${s}
.endfor
${RM} -rf ${PREFIX}/lib/xen
+ ${INSTALL_DATA} ${WRKDIR}/xend-config.sxp.5 ${PREFIX}/man/man5
+ ${INSTALL_DATA} ${WRKDIR}/xmdomain.cfg.5 ${PREFIX}/man/man5
+ ${INSTALL_DATA} ${WRKDIR}/xm.1 ${PREFIX}/man/man1
.include "../../lang/python/application.mk"
.include "../../lang/python/extension.mk"
diff --git a/sysutils/xentools30/PLIST b/sysutils/xentools30/PLIST
index 6ed0b0a1e65..4aa5cfa7855 100644
--- a/sysutils/xentools30/PLIST
+++ b/sysutils/xentools30/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+@comment $NetBSD: PLIST,v 1.3 2007/04/28 17:14:50 bouyer Exp $
bin/readnotes
bin/xc_restore
bin/xc_save
@@ -31,6 +31,9 @@ lib/libxenstore.so
lib/libxenstore.so.3.0
lib/libxenstore.so.3.0.0
man/man1/xentop.1
+man/man1/xm.1
+man/man5/xend-config.sxp.5
+man/man5/xmdomain.cfg.5
${PYSITELIB}/xen/__init__.py
${PYSITELIB}/xen/__init__.pyc
${PYSITELIB}/xen/lowlevel/__init__.py
@@ -80,6 +83,8 @@ ${PYSITELIB}/xen/util/ip.py
${PYSITELIB}/xen/util/ip.pyc
${PYSITELIB}/xen/util/mac.py
${PYSITELIB}/xen/util/mac.pyc
+${PYSITELIB}/xen/util/mkdir.py
+${PYSITELIB}/xen/util/mkdir.pyc
${PYSITELIB}/xen/util/pci.py
${PYSITELIB}/xen/util/pci.pyc
${PYSITELIB}/xen/util/security.py
@@ -118,12 +123,28 @@ ${PYSITELIB}/xen/xend/PrettyPrint.py
${PYSITELIB}/xen/xend/PrettyPrint.pyc
${PYSITELIB}/xen/xend/Vifctl.py
${PYSITELIB}/xen/xend/Vifctl.pyc
+${PYSITELIB}/xen/xend/XendAPIConstants.py
+${PYSITELIB}/xen/xend/XendAPIConstants.pyc
+${PYSITELIB}/xen/xend/XendConfig.py
+${PYSITELIB}/xen/xend/XendConfig.pyc
+${PYSITELIB}/xen/xend/XendAPI.py
+${PYSITELIB}/xen/xend/XendAPI.pyc
+${PYSITELIB}/xen/xend/osdep.py
+${PYSITELIB}/xen/xend/osdep.pyc
+${PYSITELIB}/xen/xend/XendVDI.py
+${PYSITELIB}/xen/xend/XendVDI.pyc
+${PYSITELIB}/xen/xend/XendAuthSessions.py
+${PYSITELIB}/xen/xend/XendAuthSessions.pyc
${PYSITELIB}/xen/xend/XendBootloader.py
${PYSITELIB}/xen/xend/XendBootloader.pyc
${PYSITELIB}/xen/xend/XendCheckpoint.py
${PYSITELIB}/xen/xend/XendCheckpoint.pyc
${PYSITELIB}/xen/xend/XendClient.py
${PYSITELIB}/xen/xend/XendClient.pyc
+${PYSITELIB}/xen/xend/XendConstants.py
+${PYSITELIB}/xen/xend/XendConstants.pyc
+${PYSITELIB}/xen/xend/XendDevices.py
+${PYSITELIB}/xen/xend/XendDevices.pyc
${PYSITELIB}/xen/xend/XendDmesg.py
${PYSITELIB}/xen/xend/XendDmesg.pyc
${PYSITELIB}/xen/xend/XendDomain.py
@@ -140,6 +161,8 @@ ${PYSITELIB}/xen/xend/XendProtocol.py
${PYSITELIB}/xen/xend/XendProtocol.pyc
${PYSITELIB}/xen/xend/XendRoot.py
${PYSITELIB}/xen/xend/XendRoot.pyc
+${PYSITELIB}/xen/xend/XendStorageRepository.py
+${PYSITELIB}/xen/xend/XendStorageRepository.pyc
${PYSITELIB}/xen/xend/XendVnet.py
${PYSITELIB}/xen/xend/XendVnet.pyc
${PYSITELIB}/xen/xend/__init__.py
@@ -202,6 +225,8 @@ ${PYSITELIB}/xen/xend/server/tpmif.py
${PYSITELIB}/xen/xend/server/tpmif.pyc
${PYSITELIB}/xen/xend/server/usbif.py
${PYSITELIB}/xen/xend/server/usbif.pyc
+${PYSITELIB}/xen/xend/server/vfbif.py
+${PYSITELIB}/xen/xend/server/vfbif.pyc
${PYSITELIB}/xen/xend/sxp.py
${PYSITELIB}/xen/xend/sxp.pyc
${PYSITELIB}/xen/xend/tests/__init__.py
@@ -226,6 +251,8 @@ ${PYSITELIB}/xen/xend/xenstore/xswatch.py
${PYSITELIB}/xen/xend/xenstore/xswatch.pyc
${PYSITELIB}/xen/xm/__init__.py
${PYSITELIB}/xen/xm/__init__.pyc
+${PYSITELIB}/xen/xm/XenAPI.py
+${PYSITELIB}/xen/xm/XenAPI.pyc
${PYSITELIB}/xen/xm/addlabel.py
${PYSITELIB}/xen/xm/addlabel.pyc
${PYSITELIB}/xen/xm/cfgbootpolicy.py
@@ -252,6 +279,8 @@ ${PYSITELIB}/xen/xm/main.py
${PYSITELIB}/xen/xm/main.pyc
${PYSITELIB}/xen/xm/migrate.py
${PYSITELIB}/xen/xm/migrate.pyc
+${PYSITELIB}/xen/xm/new.py
+${PYSITELIB}/xen/xm/new.pyc
${PYSITELIB}/xen/xm/opts.py
${PYSITELIB}/xen/xm/opts.pyc
${PYSITELIB}/xen/xm/resources.py
diff --git a/sysutils/xentools30/distinfo b/sysutils/xentools30/distinfo
index df144c92fd3..a1799bda768 100644
--- a/sysutils/xentools30/distinfo
+++ b/sysutils/xentools30/distinfo
@@ -1,33 +1,30 @@
-$NetBSD: distinfo,v 1.4 2006/11/05 20:39:46 rillig Exp $
+$NetBSD: distinfo,v 1.5 2007/04/28 17:14:50 bouyer Exp $
-SHA1 (xen-3.0.3_0-src.tgz) = 9505ae3a5a42bc969836de81f501341409291f78
-RMD160 (xen-3.0.3_0-src.tgz) = 528020035ee32144b52bcdfccc8c44708b0196ea
-Size (xen-3.0.3_0-src.tgz) = 5465968 bytes
-SHA1 (patch-aa) = 017aff0f9e7bdec206d7756228e0bd7b1ef81304
+SHA1 (xen-3.0.4_1-src.tgz) = 7ca5af70996215229e143c7563e69b3719284a95
+RMD160 (xen-3.0.4_1-src.tgz) = f869eec35f6afe0bc9824ce2eb4a600f789d423b
+Size (xen-3.0.4_1-src.tgz) = 6473636 bytes
+SHA1 (patch-aa) = ec0d50bc37964925b6187bd8411b97610639fbff
SHA1 (patch-ab) = 6582707aadea19025ed1c60fbe04df5ab55bc9ef
-SHA1 (patch-ac) = 65172ac8160546b3b19f4ee1a8d418c9338dd1dc
-SHA1 (patch-ad) = b6a0b49dcd1d63bd598c67d26afbdcfcaf4372b9
-SHA1 (patch-al) = 9ad10f38eae4abe914a159f1b6c58e3358accf73
-SHA1 (patch-am) = 6aac308c2207932a47222aefb905fe167fb142e5
-SHA1 (patch-as) = b5ec1b01bd422b207a414de0e44fdb6836387f40
+SHA1 (patch-ac) = 4ab978d7966199d9968ad6c917e93118df37cf32
+SHA1 (patch-ad) = 455ebda50b25b5a1af8043b48ba55dc92f0594e1
+SHA1 (patch-al) = 4b3e40228e10b9d9076b501376edb74719af3459
+SHA1 (patch-as) = 2ad346d02a0657d49df15561366d5f34d6eca9fa
SHA1 (patch-au) = beb2eaa8bf832e179e69b1758cfe0fafafdc496b
SHA1 (patch-av) = be2a1440126908996410f92a04ad479f8a2ca373
-SHA1 (patch-aw) = ab1e65a2c06c43e24c151e2205fa9179796444f3
+SHA1 (patch-aw) = c49dc2c96398c178c190a4e3c911a8bb3517ff5d
SHA1 (patch-ax) = c2fd0f25ed00498039eececcfb467a236f608efa
-SHA1 (patch-ba) = 5255927d0ead10d7d04786fe4518ba391a2aeb8c
-SHA1 (patch-bb) = 4a12204946726236e76e785cc8188ba9ab1b7cb7
-SHA1 (patch-bc) = a7c6daf3cf2973d3fa228d0c96fa258b2cccc674
-SHA1 (patch-bd) = 625f8602cf86f262b9fa6f34d49641c9207c2590
+SHA1 (patch-ba) = 08578f0b605abf339ba1798110723d8da7117e01
+SHA1 (patch-bb) = 9cc5b605797b6efae7f2cab570d43205278ab881
+SHA1 (patch-bc) = c143c3c587f254af1552667a70e2fac1f0f9665e
SHA1 (patch-be) = dc8e2a96f39cb540eece35468e2e055201c80220
SHA1 (patch-bf) = 8b4ecb5cc6c92e3b52574f725f577df062c4f147
SHA1 (patch-bg) = 3d390a3155db6a1f9c910868b7f615c2f270dc4d
SHA1 (patch-bh) = c9719a85d84268fab81da989b06c7eca341bb6f9
SHA1 (patch-bm) = 76af5ab6caa1e59a486b2d06e50fae883e515e33
SHA1 (patch-bo) = 0fc2946c6e46b0ce2c2a62824b26edbc8c32cb61
-SHA1 (patch-br) = dd83334c4e1f197f5e99a37c9e238bfada98b68e
-SHA1 (patch-bs) = beb628027379fa93825bef2b88ad7553c58b3e5e
-SHA1 (patch-bt) = acda7b259d229245a378d1b1d0ca4e04a076b90e
-SHA1 (patch-bv) = 4f3e34d75a073e55711ebbf6ddd805d5db097e42
+SHA1 (patch-br) = 906ac9598808f7e9677a04bbe159d174ea6f8b9a
+SHA1 (patch-bs) = 3d9340587bf54f6cec5ab02a9c423ecb25661be8
+SHA1 (patch-bt) = d1cfab2ccf14d3df0fdda4c4699258997d2eb5d2
SHA1 (patch-bw) = d4bdb0dcc48cabefb568042d3b58822f8251b1bd
SHA1 (patch-cb) = 0bf2513749e28ff955caabd76bf79dd8280b61ed
SHA1 (patch-cc) = a8986fe54de5508a2e1372df415ab29b30a71ef1
@@ -35,3 +32,7 @@ SHA1 (patch-cd) = 8fc057e9dc98e356ba46cdf183a8891c59c005b8
SHA1 (patch-cf) = 2c1f83cfd1de238c81796762cf60560e64e0f630
SHA1 (patch-cg) = 26aa623c34b8b0aebffd93451291264ad7d99c94
SHA1 (patch-ch) = ae8b11cd22c2cf0c5f2c0a603e80dadad1012b59
+SHA1 (patch-ci) = 1338452d7994b3de40e80fb395175ddbe325b577
+SHA1 (patch-cj) = 166e2190a31bba842da1111310ba7b1ad35a5d81
+SHA1 (patch-ck) = 3783d9b4b9344670bae2f35e2ac7f11e2ec9ce7b
+SHA1 (patch-cl) = f7456d0692331a86d31e83b71bcb72d35979e0d1
diff --git a/sysutils/xentools30/files/NetBSD.mk b/sysutils/xentools30/files/NetBSD.mk
new file mode 100644
index 00000000000..b4af32ee5d0
--- /dev/null
+++ b/sysutils/xentools30/files/NetBSD.mk
@@ -0,0 +1,2 @@
+# $NetBSD: NetBSD.mk,v 1.1 2007/04/28 17:14:50 bouyer Exp $
+include $(XEN_ROOT)/config/StdGNU.mk
diff --git a/sysutils/xentools30/patches/patch-aa b/sysutils/xentools30/patches/patch-aa
index 5c185790fb6..71eabebab1d 100644
--- a/sysutils/xentools30/patches/patch-aa
+++ b/sysutils/xentools30/patches/patch-aa
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+$NetBSD: patch-aa,v 1.3 2007/04/28 17:14:50 bouyer Exp $
---- Makefile.orig 2006-10-04 04:27:58.000000000 +0200
-+++ Makefile 2006-10-17 00:20:51.000000000 +0200
-@@ -5,24 +5,16 @@
+--- Makefile.orig 2007-01-08 16:00:46.000000000 +0100
++++ Makefile 2007-04-25 18:22:10.000000000 +0200
+@@ -5,27 +5,18 @@
SUBDIRS-y += libxc
SUBDIRS-y += xenstore
SUBDIRS-y += misc
@@ -19,6 +19,9 @@ $NetBSD: patch-aa,v 1.2 2006/10/19 22:57:13 bouyer Exp $
SUBDIRS-y += xenstat
-SUBDIRS-y += libaio
-SUBDIRS-y += blktap
+-SUBDIRS-y += libfsimage
+ SUBDIRS-$(XENFB_TOOLS) += xenfb
+ SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
# These don't cross-compile
ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
@@ -27,7 +30,7 @@ $NetBSD: patch-aa,v 1.2 2006/10/19 22:57:13 bouyer Exp $
endif
.PHONY: all
-@@ -30,34 +22,27 @@
+@@ -33,34 +24,27 @@
@set -e; for subdir in $(SUBDIRS-y); do \
$(MAKE) -C $$subdir $@; \
done
@@ -61,4 +64,4 @@ $NetBSD: patch-aa,v 1.2 2006/10/19 22:57:13 bouyer Exp $
- $(MAKE) -C check clean
.PHONY: ioemu ioemuinstall ioemuclean
- ifdef CONFIG_IOEMU
+ ifeq ($(CONFIG_IOEMU),y)
diff --git a/sysutils/xentools30/patches/patch-ac b/sysutils/xentools30/patches/patch-ac
index 0ec256f4ca0..86c59477fb0 100644
--- a/sysutils/xentools30/patches/patch-ac
+++ b/sysutils/xentools30/patches/patch-ac
@@ -1,13 +1,13 @@
-$NetBSD: patch-ac,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+$NetBSD: patch-ac,v 1.3 2007/04/28 17:14:50 bouyer Exp $
---- libxc/xc_linux_save.c.orig 2006-10-16 22:13:53.000000000 +0200
-+++ libxc/xc_linux_save.c 2006-10-16 22:14:07.000000000 +0200
+--- libxc/xc_linux_save.c.orig 2007-01-08 16:00:49.000000000 +0100
++++ libxc/xc_linux_save.c 2007-04-25 18:23:32.000000000 +0200
@@ -528,7 +528,7 @@
}
if ((m2p = mmap(NULL, m2p_size, prot,
- MAP_SHARED, xc_handle, 0)) == MAP_FAILED) {
-+ MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED) {
- ERR("failed to mmap m2p");
++ MAP_ANON | MAP_SHARED, xc_handle, 0)) == MAP_FAILED) {
+ ERROR("failed to mmap m2p");
return NULL;
}
diff --git a/sysutils/xentools30/patches/patch-ad b/sysutils/xentools30/patches/patch-ad
index 26b48f56205..884bd714bbe 100644
--- a/sysutils/xentools30/patches/patch-ad
+++ b/sysutils/xentools30/patches/patch-ad
@@ -1,26 +1,161 @@
-$NetBSD: patch-ad,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+$NetBSD: patch-ad,v 1.3 2007/04/28 17:14:51 bouyer Exp $
---- libxc/xc_domain.c.orig 2006-10-04 04:28:15.000000000 +0200
-+++ libxc/xc_domain.c 2006-10-18 15:20:13.000000000 +0200
-@@ -212,8 +212,10 @@
+--- libxc/xc_private.c.orig 2007-01-08 16:00:49.000000000 +0100
++++ libxc/xc_private.c 2007-04-25 23:06:39.000000000 +0200
+@@ -10,7 +10,12 @@
+ #include <stdarg.h>
+ #include <pthread.h>
+
+-static __thread xc_error last_error = { XC_ERROR_NONE, ""};
++static pthread_key_t last_error_pkey;
++static pthread_once_t last_error_pkey_once = PTHREAD_ONCE_INIT;
++
++static pthread_key_t errbuf_pkey;
++static pthread_once_t errbuf_pkey_once = PTHREAD_ONCE_INIT;
++
+ #if DEBUG
+ static xc_error_handler error_handler = xc_default_error_handler;
+ #else
+@@ -23,15 +28,44 @@
+ fprintf(stderr, "ERROR %s: %s\n", desc, err->message);
+ }
+
++static void
++_xc_clean_last_error(void *m)
++{
++ if (m)
++ free(m);
++ pthread_setspecific(last_error_pkey, NULL);
++}
++
++static void
++_xc_init_last_error(void)
++{
++ pthread_key_create(&last_error_pkey, _xc_clean_last_error);
++}
++
++static xc_error *
++_xc_get_last_error(void) {
++ xc_error *last_error;
++
++ pthread_once(&last_error_pkey_once, _xc_init_last_error);
++
++ last_error = pthread_getspecific(last_error_pkey);
++ if (last_error == NULL) {
++ last_error = malloc(sizeof(xc_error));
++ pthread_setspecific(last_error_pkey, last_error);
++ }
++ return last_error;
++}
++
+ const xc_error const *xc_get_last_error(void)
+ {
+- return &last_error;
++ return _xc_get_last_error();
+ }
+
+ void xc_clear_last_error(void)
{
- int ret = 0;
- DECLARE_SYSCTL;
-+ caddr_t info_addr = (caddr_t)((u_long)info & ~0xfffUL);
-+ u_long len = (max_domains*sizeof(xc_domaininfo_t) + 0xfffUL) & ~0xfffUL;
+- last_error.code = XC_ERROR_NONE;
+- last_error.message[0] = '\0';
++ xc_error *last_error = _xc_get_last_error();
++ last_error->code = XC_ERROR_NONE;
++ last_error->message[0] = '\0';
+ }
+
+ const char *xc_error_code_to_desc(int code)
+@@ -60,9 +94,10 @@
+
+ static void _xc_set_error(int code, const char *msg)
+ {
+- last_error.code = code;
+- strncpy(last_error.message, msg, XC_MAX_ERROR_MSG_LEN - 1);
+- last_error.message[XC_MAX_ERROR_MSG_LEN-1] = '\0';
++ xc_error *last_error = _xc_get_last_error();
++ last_error->code = code;
++ strncpy(last_error->message, msg, XC_MAX_ERROR_MSG_LEN - 1);
++ last_error->message[XC_MAX_ERROR_MSG_LEN-1] = '\0';
+ }
-- if ( mlock(info, max_domains*sizeof(xc_domaininfo_t)) != 0 )
-+ if ( mlock(info_addr, len) != 0 )
- return -1;
+ void xc_set_error(int code, const char *fmt, ...)
+@@ -80,23 +115,29 @@
- sysctl.cmd = XEN_SYSCTL_getdomaininfolist;
-@@ -226,8 +228,7 @@
- else
- ret = sysctl.u.getdomaininfolist.num_domains;
+ errno = saved_errno;
-- if ( munlock(info, max_domains*sizeof(xc_domaininfo_t)) != 0 )
-- ret = -1;
-+ (void)munlock(info_addr, len); /* XXX munlock fails; why ? */
+- if ( error_handler != NULL )
+- error_handler(&last_error);
++ if ( error_handler != NULL ) {
++ xc_error *last_error = _xc_get_last_error();
++ error_handler(last_error);
++ }
+ }
+
+ int lock_pages(void *addr, size_t len)
+ {
+ int e = 0;
++ void *laddr = (void *)((u_long)addr & ~0xfffUL);
++ size_t llen = (len + 0xfffUL) & ~0xfffUL;
+ #ifndef __sun__
+- e = mlock(addr, len);
++ e = mlock(laddr, llen);
+ #endif
+ return (e);
+ }
- return ret;
+ void unlock_pages(void *addr, size_t len)
+ {
++ void *laddr = (void *)((u_long)addr & ~0xfffUL);
++ size_t llen = (len + 0xfffUL) & ~0xfffUL;
+ #ifndef __sun__
+- safe_munlock(addr, len);
++ safe_munlock(laddr, llen);
+ #endif
}
+
+@@ -483,20 +524,43 @@
+ return new_mfn;
+ }
+
++static void
++_xc_clean_errbuf(void * m)
++{
++ if (m)
++ free(m);
++ pthread_setspecific(errbuf_pkey, NULL);
++}
++
++static void
++_xc_init_errbuf(void)
++{
++ pthread_key_create(&errbuf_pkey, _xc_clean_errbuf);
++}
++
+ char *safe_strerror(int errcode)
+ {
+- static __thread char errbuf[32];
++#define XS_BUFSIZE 32
++ char *errbuf;
+ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+ char *strerror_str;
+
++ pthread_once(&errbuf_pkey_once, _xc_init_errbuf);
++
++ errbuf = pthread_getspecific(errbuf_pkey);
++ if (errbuf == NULL) {
++ errbuf = malloc(XS_BUFSIZE);
++ pthread_setspecific(errbuf_pkey, errbuf);
++ }
++
+ /*
+ * Thread-unsafe strerror() is protected by a local mutex. We copy
+ * the string to a thread-private buffer before releasing the mutex.
+ */
+ pthread_mutex_lock(&mutex);
+ strerror_str = strerror(errcode);
+- strncpy(errbuf, strerror_str, sizeof(errbuf));
+- errbuf[sizeof(errbuf)-1] = '\0';
++ strncpy(errbuf, strerror_str, XS_BUFSIZE);
++ errbuf[XS_BUFSIZE-1] = '\0';
+ pthread_mutex_unlock(&mutex);
+
+ return errbuf;
diff --git a/sysutils/xentools30/patches/patch-al b/sysutils/xentools30/patches/patch-al
index 75bccbb4ea5..a55a725aa70 100644
--- a/sysutils/xentools30/patches/patch-al
+++ b/sysutils/xentools30/patches/patch-al
@@ -1,19 +1,19 @@
-$NetBSD: patch-al,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+$NetBSD: patch-al,v 1.3 2007/04/28 17:14:51 bouyer Exp $
---- console/Makefile.orig 2006-10-16 21:52:18.000000000 +0200
-+++ console/Makefile 2006-10-16 21:53:33.000000000 +0200
-@@ -25,16 +25,16 @@
+--- console/Makefile.orig 2007-01-08 16:00:47.000000000 +0100
++++ console/Makefile 2007-04-25 22:09:45.000000000 +0200
+@@ -21,16 +21,17 @@
$(RM) client/*.o daemon/*.o
xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
- $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
+ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
- -lxenctrl -lxenstore
+ $(SOCKET_LIBS) -lxenctrl -lxenstore
xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
- $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
+ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
- -lxenctrl -lxenstore
+ $(SOCKET_LIBS) -lxenctrl -lxenstore
.PHONY: install
install: $(BIN)
@@ -25,3 +25,4 @@ $NetBSD: patch-al,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+ $(BSD_INSTALL_PROGRAM) xenconsoled $(PREFIX)/sbin
+ $(BSD_INSTALL_PROGRAM_DIR) $(PREFIX)/bin
+ $(BSD_INSTALL_PROGRAM) xenconsole $(PREFIX)/bin
++
diff --git a/sysutils/xentools30/patches/patch-am b/sysutils/xentools30/patches/patch-am
deleted file mode 100644
index b85083409a1..00000000000
--- a/sysutils/xentools30/patches/patch-am
+++ /dev/null
@@ -1,43 +0,0 @@
-$NetBSD: patch-am,v 1.2 2006/10/19 22:57:13 bouyer Exp $
-
---- console/daemon/io.c.orig 2006-10-04 04:28:00.000000000 +0200
-+++ console/daemon/io.c 2006-10-17 00:14:15.000000000 +0200
-@@ -147,22 +147,26 @@
- int master;
- bool success;
-
-- if ((master = getpt()) == -1 ||
-- grantpt(master) == -1 || unlockpt(master) == -1) {
-- dolog(LOG_ERR, "Failed to create tty for domain-%d",
-- dom->domid);
-- master = -1;
-- } else {
-+ if ((master = posix_openpt(O_RDWR)) == -1) {
-+ dolog(LOG_ERR, "Failed to create tty for domain-%d: %s",
-+ dom->domid, strerror(errno));
-+ return -1;
-+ }
-+ if (grantpt(master) == -1) {
-+ dolog(LOG_ERR, "Failed to grant tty for domain-%d: %s",
-+ dom->domid, strerror(errno));
-+ goto out;
-+ }
-+ if (unlockpt(master) == -1) {
-+ dolog(LOG_ERR, "Failed to unlock tty for domain-%d: %s",
-+ dom->domid, strerror(errno));
-+ goto out;
-+ }
-+ {
- const char *slave = ptsname(master);
-- struct termios term;
- char *data;
- unsigned int len;
-
-- if (tcgetattr(master, &term) != -1) {
-- cfmakeraw(&term);
-- tcsetattr(master, TCSAFLUSH, &term);
-- }
--
- success = asprintf(&path, "%s/limit", dom->conspath) != -1;
- if (!success)
- goto out;
diff --git a/sysutils/xentools30/patches/patch-as b/sysutils/xentools30/patches/patch-as
index 896a9f6b648..546672b5fcb 100644
--- a/sysutils/xentools30/patches/patch-as
+++ b/sysutils/xentools30/patches/patch-as
@@ -1,19 +1,16 @@
-$NetBSD: patch-as,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+$NetBSD: patch-as,v 1.3 2007/04/28 17:14:52 bouyer Exp $
---- libxc/Makefile.orig 2006-10-04 04:28:15.000000000 +0200
-+++ libxc/Makefile 2006-10-17 00:01:59.000000000 +0200
-@@ -21,8 +21,9 @@
- CTRL_SRCS-y += xc_sedf.c
- CTRL_SRCS-y += xc_csched.c
- CTRL_SRCS-y += xc_tbuf.c
--CTRL_SRCS-$(CONFIG_X86) += xc_ptrace.c xc_ptrace_core.c xc_pagetab.c
-+CTRL_SRCS-$(CONFIG_X86) += xc_pagetab.c
+--- libxc/Makefile.orig 2007-01-08 16:00:49.000000000 +0100
++++ libxc/Makefile 2007-04-25 18:35:04.000000000 +0200
+@@ -19,6 +19,7 @@
CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
+ CTRL_SRCS-$(CONFIG_SunOS) += xc_solaris.c
+ CTRL_SRCS-$(CONFIG_X86_Linux) += xc_ptrace.c xc_ptrace_core.c
+CTRL_SRCS-$(CONFIG_NetBSD) += xc_netbsd.c
GUEST_SRCS-y :=
GUEST_SRCS-y += xc_load_bin.c
-@@ -78,19 +79,19 @@
+@@ -74,19 +75,19 @@
.PHONY: install
install: build
diff --git a/sysutils/xentools30/patches/patch-aw b/sysutils/xentools30/patches/patch-aw
index 9d07482dc81..e706636667f 100644
--- a/sysutils/xentools30/patches/patch-aw
+++ b/sysutils/xentools30/patches/patch-aw
@@ -1,8 +1,8 @@
-$NetBSD: patch-aw,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+$NetBSD: patch-aw,v 1.3 2007/04/28 17:14:52 bouyer Exp $
---- misc/Makefile.orig 2006-10-04 04:28:16.000000000 +0200
-+++ misc/Makefile 2006-10-17 00:12:40.000000000 +0200
-@@ -15,27 +15,26 @@
+--- misc/Makefile.orig 2007-01-08 16:00:49.000000000 +0100
++++ misc/Makefile 2007-04-25 18:37:08.000000000 +0200
+@@ -11,8 +11,10 @@
TARGETS = xenperf xc_shadow
@@ -15,14 +15,7 @@ $NetBSD: patch-aw,v 1.2 2006/10/19 22:57:13 bouyer Exp $
.PHONY: all
all: build
-
- .PHONY: build
- build: $(TARGETS)
-- $(MAKE) -C miniterm
--ifeq ($(CONFIG_MBOOTPACK),y)
-- $(MAKE) -C mbootpack
--endif
-- $(MAKE) -C lomount
+@@ -24,11 +26,13 @@
.PHONY: install
install: build
@@ -40,8 +33,8 @@ $NetBSD: patch-aw,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+# $(MAKE) -C lomount install
# No sense in installing miniterm on the Xen box.
# $(MAKE) -C miniterm install
- # Likewise mbootpack
-@@ -52,4 +51,4 @@
+
+@@ -42,4 +46,4 @@
$(CC) -c $(CFLAGS) -o $@ $<
$(TARGETS): %: %.o Makefile
diff --git a/sysutils/xentools30/patches/patch-ba b/sysutils/xentools30/patches/patch-ba
index 3b4b1806ad6..f13bc49ac20 100644
--- a/sysutils/xentools30/patches/patch-ba
+++ b/sysutils/xentools30/patches/patch-ba
@@ -1,16 +1,16 @@
-$NetBSD: patch-ba,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+$NetBSD: patch-ba,v 1.3 2007/04/28 17:14:52 bouyer Exp $
---- python/Makefile.orig 2006-10-16 22:26:18.000000000 +0200
-+++ python/Makefile 2006-10-16 22:26:53.000000000 +0200
+--- python/Makefile.orig 2007-01-08 16:00:49.000000000 +0100
++++ python/Makefile 2007-04-25 18:39:08.000000000 +0200
@@ -11,10 +11,10 @@
.PHONY: install
ifndef XEN_PYTHON_NATIVE_INSTALL
install: all
-- CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force
+- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force
+ python setup.py install
else
install: all
-- CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
+- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
+ python setup.py install
endif
diff --git a/sysutils/xentools30/patches/patch-bb b/sysutils/xentools30/patches/patch-bb
index 8d792864eb3..f9229551ce4 100644
--- a/sysutils/xentools30/patches/patch-bb
+++ b/sysutils/xentools30/patches/patch-bb
@@ -1,8 +1,8 @@
-$NetBSD: patch-bb,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+$NetBSD: patch-bb,v 1.3 2007/04/28 17:14:52 bouyer Exp $
---- python/xen/xend/XendRoot.py.orig 2006-10-16 22:27:14.000000000 +0200
-+++ python/xen/xend/XendRoot.py 2006-10-16 22:27:58.000000000 +0200
-@@ -40,16 +40,16 @@
+--- python/xen/xend/XendRoot.py.orig 2007-04-25 22:26:04.000000000 +0200
++++ python/xen/xend/XendRoot.py 2007-04-25 22:26:18.000000000 +0200
+@@ -37,7 +37,7 @@
"""Root of the management classes."""
"""Default path to the config file."""
@@ -11,14 +11,3 @@ $NetBSD: patch-bb,v 1.2 2006/10/19 22:57:13 bouyer Exp $
"""Environment variable used to override config_default."""
config_var = "XEND_CONFIG"
-
- """Where network control scripts live."""
-- network_script_dir = "/etc/xen/scripts"
-+ network_script_dir = "@XENDCONFDIR@/scripts"
-
- """Where block control scripts live."""
-- block_script_dir = "/etc/xen/scripts"
-+ block_script_dir = "@XENDCONFDIR@/scripts"
-
- """Default path to the log file. """
- logfile_default = "/var/log/xen/xend.log"
diff --git a/sysutils/xentools30/patches/patch-bc b/sysutils/xentools30/patches/patch-bc
index e8188843c53..b5c5379a202 100644
--- a/sysutils/xentools30/patches/patch-bc
+++ b/sysutils/xentools30/patches/patch-bc
@@ -1,7 +1,7 @@
-$NetBSD: patch-bc,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+$NetBSD: patch-bc,v 1.3 2007/04/28 17:14:52 bouyer Exp $
---- python/xen/xm/create.py.orig 2006-10-16 22:28:16.000000000 +0200
-+++ python/xen/xm/create.py 2006-10-16 22:29:02.000000000 +0200
+--- python/xen/xm/create.py.orig 2007-04-25 22:19:55.000000000 +0200
++++ python/xen/xm/create.py 2007-04-25 22:20:12.000000000 +0200
@@ -64,7 +64,7 @@
use="Quiet.")
@@ -11,12 +11,12 @@ $NetBSD: patch-bc,v 1.2 2006/10/19 22:57:13 bouyer Exp $
use="Search path for configuration scripts. "
"The value of PATH is a colon-separated directory list.")
-@@ -298,7 +298,7 @@
+@@ -318,7 +318,7 @@
preferred instance number. The hotplug script will determine
which instance number will actually be assigned to the domain.
The associtation between virtual machine and the TPM instance
- number can be found in /etc/xen/vtpm.db. Use the backend in the
+ number can be found in @XENDCONFDIR@/vtpm.db. Use the backend in the
- given domain.""")
-
- gopts.var('access_control', val="policy=POLICY,label=LABEL",
+ given domain.
+ The type parameter can be used to select a specific driver type
+ that the VM can use. To prevent a fully virtualized domain (HVM)
diff --git a/sysutils/xentools30/patches/patch-bd b/sysutils/xentools30/patches/patch-bd
deleted file mode 100644
index ffedd86fdf6..00000000000
--- a/sysutils/xentools30/patches/patch-bd
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bd,v 1.2 2006/10/19 22:57:13 bouyer Exp $
-
---- python/xen/xend/XendBootloader.py.orig 2006-10-16 22:58:24.000000000 +0200
-+++ python/xen/xend/XendBootloader.py 2006-10-16 22:58:47.000000000 +0200
-@@ -38,7 +38,7 @@
- raise VmError(msg)
-
- while True:
-- fifo = "/var/lib/xen/xenbl.%s" %(random.randint(0, 32000),)
-+ fifo = "/var/run/xend/xenbl.%s" %(random.randint(0, 32000),)
- if not os.path.exists(fifo):
- break
- os.mkfifo(fifo, 0600)
diff --git a/sysutils/xentools30/patches/patch-br b/sysutils/xentools30/patches/patch-br
index c1922a7edc3..81ded9bf84e 100644
--- a/sysutils/xentools30/patches/patch-br
+++ b/sysutils/xentools30/patches/patch-br
@@ -1,12 +1,13 @@
-$NetBSD: patch-br,v 1.3 2006/11/05 20:39:46 rillig Exp $
+$NetBSD: patch-br,v 1.4 2007/04/28 17:14:52 bouyer Exp $
---- xenstat/xentop/Makefile.orig 2006-10-16 22:38:10.000000000 +0200
-+++ xenstat/xentop/Makefile 2006-10-16 22:38:38.000000000 +0200
-@@ -36,8 +36,8 @@
+--- xenstat/xentop/Makefile.orig 2007-01-08 16:00:52.000000000 +0100
++++ xenstat/xentop/Makefile 2007-04-25 18:43:18.000000000 +0200
+@@ -33,9 +33,8 @@
.PHONY: install
install: xentop xentop.1
- $(INSTALL_PROG) xentop $(DESTDIR)$(sbindir)/xentop
+- $(INSTALL_DIR) $(DESTDIR)$(man1dir)
- $(INSTALL_DATA) xentop.1 $(DESTDIR)$(man1dir)/xentop.1
+ $(BSD_INSTALL_PROGRAM) xentop $(PREFIX)/sbin
+ $(BSD_INSTALL_DATA) xentop.1 $(PREFIX)/$(PKGMANDIR)/man1
diff --git a/sysutils/xentools30/patches/patch-bs b/sysutils/xentools30/patches/patch-bs
index 201699c26a0..288fc89bed9 100644
--- a/sysutils/xentools30/patches/patch-bs
+++ b/sysutils/xentools30/patches/patch-bs
@@ -1,55 +1,16 @@
-$NetBSD: patch-bs,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+$NetBSD: patch-bs,v 1.3 2007/04/28 17:14:52 bouyer Exp $
---- xenstore/Makefile.orig 2006-10-04 04:28:30.000000000 +0200
-+++ xenstore/Makefile 2006-10-17 00:08:10.000000000 +0200
-@@ -33,6 +33,7 @@
- XENSTORED_OBJS = xenstored_core.o xenstored_watch.o xenstored_domain.o xenstored_transaction.o xs_lib.o talloc.o utils.o tdb.o hashtable.o
+--- xenstore/Makefile.orig 2007-01-08 16:00:52.000000000 +0100
++++ xenstore/Makefile 2007-04-25 18:45:31.000000000 +0200
+@@ -29,6 +29,7 @@
- XENSTORED_Linux = xenstored_linux.o
-+XENSTORED_NetBSD = xenstored_netbsd.o
+ XENSTORED_OBJS_$(CONFIG_Linux) = xenstored_linux.o
+ XENSTORED_OBJS_$(CONFIG_SunOS) = xenstored_solaris.o
++XENSTORED_OBJS_$(CONFIG_NetBSD) = xenstored_netbsd.o
- XENSTORED_OBJS += $(XENSTORED_$(OS))
+ XENSTORED_OBJS += $(XENSTORED_OBJS_y)
-@@ -40,31 +41,31 @@
- all: libxenstore.so libxenstore.a xenstored $(CLIENTS) xs_tdb_dump xenstore-control xenstore-ls
-
- test_interleaved_transactions: test_interleaved_transactions.o
-- $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -L. -lxenstore -o $@
-+ $(LINK.o) $^ $(LOADLIBES) $(LDFLAGS) $(LDLIBS) -L. -lxenstore -o $@
-
- .PHONY: testcode
- testcode: xs_test xenstored_test xs_random
-
- xenstored: $(XENSTORED_OBJS)
-- $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -lxenctrl -o $@
-+ $(LINK.o) $^ $(LOADLIBES) $(LDFLAGS) $(LDLIBS) -lxenctrl -o $@
-
- $(CLIENTS): xenstore-%: xenstore_%.o libxenstore.so
-- $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore -o $@
-+ $(LINK.o) $< $(LOADLIBES) $(LDFLAGS) $(LDLIBS) -L. -lxenstore -o $@
-
- $(CLIENTS_OBJS): xenstore_%.o: xenstore_client.c
- $(COMPILE.c) -DCLIENT_$(*F) -o $@ $<
-
- xenstore-control: xenstore_control.o libxenstore.so
-- $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore -o $@
-+ $(LINK.o) $< $(LOADLIBES) $(LDFLAGS) $(LDLIBS) -L. -lxenstore -o $@
-
- xenstore-ls: xsls.o libxenstore.so
-- $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore -o $@
-+ $(LINK.o) $< $(LOADLIBES) $(LDFLAGS) $(LDLIBS) -L. -lxenstore -o $@
-
- xenstored_test: xenstored_core_test.o xenstored_watch_test.o xenstored_domain_test.o xenstored_transaction_test.o xs_lib.o talloc_test.o fake_libxc.o utils.o tdb.o
-- $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
-+ $(LINK.o) $^ $(LOADLIBES) $(LDFLAGS) $(LDLIBS) -o $@
-
- xs_tdb_dump: xs_tdb_dump.o utils.o tdb.o talloc.o
-- $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
-+ $(LINK.o) $^ $(LOADLIBES) $(LDFLAGS) $(LDLIBS) -o $@
-
- xs_test xs_random xs_stress xs_crashme: LDFLAGS+=-lpthread
- xs_test: xs_test.o xs_lib.o utils.o
-@@ -172,19 +173,17 @@
+@@ -168,22 +169,20 @@
.PHONY: install
install: all
@@ -83,3 +44,6 @@ $NetBSD: patch-bs,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+ $(BSD_INSTALL_LIB) libxenstore.a $(PREFIX)/lib
+ $(BSD_INSTALL_DATA) xs.h $(PREFIX)/include
+ $(BSD_INSTALL_DATA) xs_lib.h $(PREFIX)/include
+
+ -include $(PROG_DEP)
+
diff --git a/sysutils/xentools30/patches/patch-bt b/sysutils/xentools30/patches/patch-bt
index 542cb9ede71..ed844a383ae 100644
--- a/sysutils/xentools30/patches/patch-bt
+++ b/sysutils/xentools30/patches/patch-bt
@@ -1,8 +1,8 @@
-$NetBSD: patch-bt,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+$NetBSD: patch-bt,v 1.3 2007/04/28 17:14:52 bouyer Exp $
---- /dev/null 2006-10-17 00:06:16.000000000 +0200
-+++ xenstore/xenstored_netbsd.c 2006-10-17 00:07:33.000000000 +0200
-@@ -0,0 +1,69 @@
+--- /dev/null 2007-04-25 19:26:24.000000000 +0200
++++ xenstore/xenstored_netbsd.c 2007-04-25 19:28:19.000000000 +0200
+@@ -0,0 +1,73 @@
+/******************************************************************************
+ *
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
@@ -72,3 +72,7 @@ $NetBSD: patch-bt,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+
+ return addr;
+}
++
++void xenbus_notify_running(void)
++{
++}
diff --git a/sysutils/xentools30/patches/patch-bv b/sysutils/xentools30/patches/patch-bv
deleted file mode 100644
index f246fe74834..00000000000
--- a/sysutils/xentools30/patches/patch-bv
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-bv,v 1.2 2006/10/19 22:57:13 bouyer Exp $
-
---- libxc/xenctrl.h.orig 2006-10-04 04:28:16.000000000 +0200
-+++ libxc/xenctrl.h 2006-10-16 23:54:46.000000000 +0200
-@@ -16,7 +16,12 @@
-
- #include <stddef.h>
- #include <stdint.h>
-+#ifndef __NetBSD__
- #include <sys/ptrace.h>
-+#endif
-+#undef uint8_t
-+#undef uint16_t
-+#undef uint32_t
- #include <xen/xen.h>
- #include <xen/domctl.h>
- #include <xen/sysctl.h>
-@@ -106,6 +111,7 @@
-
- #define XC_CORE_MAGIC 0xF00FEBED
-
-+#ifndef __NetBSD__
- long xc_ptrace_core(
- int xc_handle,
- enum __ptrace_request request,
-@@ -113,6 +119,7 @@
- long addr,
- long data,
- vcpu_guest_context_t *ctxt);
-+#endif
- void * map_domain_va_core(
- unsigned long domfd,
- int cpu,
diff --git a/sysutils/xentools30/patches/patch-ci b/sysutils/xentools30/patches/patch-ci
new file mode 100644
index 00000000000..3e6f252457a
--- /dev/null
+++ b/sysutils/xentools30/patches/patch-ci
@@ -0,0 +1,16 @@
+$NetBSD: patch-ci,v 1.1 2007/04/28 17:14:53 bouyer Exp $
+
+--- ../xen/include/public/arch-x86/xen.h.orig 2007-04-25 19:25:41.000000000 +0200
++++ ../xen/include/public/arch-x86/xen.h 2007-04-25 19:25:43.000000000 +0200
+@@ -35,9 +35,10 @@
+ #define __DEFINE_XEN_GUEST_HANDLE(name, type) \
+ typedef type * __guest_handle_ ## name
+ #endif
++#define __XEN_GUEST_HANDLE(name) __guest_handle_ ## name
+
+ #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
+-#define XEN_GUEST_HANDLE(name) __guest_handle_ ## name
++#define XEN_GUEST_HANDLE(name) __XEN_GUEST_HANDLE(name)
+ #define set_xen_guest_handle(hnd, val) do { (hnd).p = val; } while (0)
+ #ifdef __XEN_TOOLS__
+ #define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0)
diff --git a/sysutils/xentools30/patches/patch-cj b/sysutils/xentools30/patches/patch-cj
new file mode 100644
index 00000000000..fa5a99322a3
--- /dev/null
+++ b/sysutils/xentools30/patches/patch-cj
@@ -0,0 +1,23 @@
+$NetBSD: patch-cj,v 1.1 2007/04/28 17:14:53 bouyer Exp $
+
+--- python/xen/xend/osdep.py.orig 2007-04-25 22:22:18.000000000 +0200
++++ python/xen/xend/osdep.py 2007-04-25 22:23:03.000000000 +0200
+@@ -22,9 +22,11 @@
+ _scripts_dir = {
+ "Linux": "/etc/xen/scripts",
+ "SunOS": "/usr/lib/xen/scripts",
++ "NetBSD": "@XENDCONFDIR@/scripts",
+ }
+
+ _xend_autorestart = {
++ "NetBSD": True,
+ "Linux": True,
+ "SunOS": False,
+ }
+@@ -32,5 +34,5 @@
+ def _get(var, default=None):
+ return var.get(os.uname()[0], default)
+
+-scripts_dir = _get(_scripts_dir, "/etc/xen/scripts")
++scripts_dir = _get(_scripts_dir, "@XENDCONFDIR@/scripts")
+ xend_autorestart = _get(_xend_autorestart)
diff --git a/sysutils/xentools30/patches/patch-ck b/sysutils/xentools30/patches/patch-ck
new file mode 100644
index 00000000000..68105974938
--- /dev/null
+++ b/sysutils/xentools30/patches/patch-ck
@@ -0,0 +1,16 @@
+$NetBSD: patch-ck,v 1.1 2007/04/28 17:14:53 bouyer Exp $
+
+--- xenstore/xs_lib.c.orig 2007-01-08 16:00:53.000000000 +0100
++++ xenstore/xs_lib.c 2007-04-26 13:16:40.000000000 +0200
+@@ -79,8 +79,10 @@
+ if (s)
+ return s;
+
+-#ifdef __linux__
++#if defined(__linux__)
+ return "/proc/xen/xenbus";
++#elif defined(__NetBSD__)
++ return "/kern/xen/xenbus";
+ #else
+ return "/dev/xen/xenbus";
+ #endif
diff --git a/sysutils/xentools30/patches/patch-cl b/sysutils/xentools30/patches/patch-cl
new file mode 100644
index 00000000000..9dc8ea04ddf
--- /dev/null
+++ b/sysutils/xentools30/patches/patch-cl
@@ -0,0 +1,12 @@
+$NetBSD: patch-cl,v 1.1 2007/04/28 17:14:53 bouyer Exp $
+
+--- python/xen/xend/server/XMLRPCServer.py.orig 2007-04-26 19:26:44.000000000 +0200
++++ python/xen/xend/server/XMLRPCServer.py 2007-04-26 19:26:52.000000000 +0200
+@@ -177,6 +177,7 @@
+ # -----------------------------------------------------------------
+ try:
+ self.server.socket.settimeout(1.0)
++ self.server.socket.setblocking(True);
+ while self.running:
+ self.server.handle_request()
+ finally: