summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorbouyer <bouyer>2006-10-19 22:57:13 +0000
committerbouyer <bouyer>2006-10-19 22:57:13 +0000
commiteb2773cfe604cd6cdca0c37061bc87e160b452cd (patch)
tree5a4e7eb2ed86943cd1ac58952a5d42ee262c84e0 /sysutils
parent460d118587cda7ae21bb80201b231261a4ff7be8 (diff)
downloadpkgsrc-eb2773cfe604cd6cdca0c37061bc87e160b452cd.tar.gz
Update to 3.0.3. I don't have a comprehensive list of changes, only
"many new features". One looks promising: - a new easy-to-use CPU scheduler which includes weights, caps, and automatic SMP load-balancing; pkgsrc changes: - remove patches against unused files - add a netbsd-specific example with verbose comments - add a vif script for ip-routing based setups
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xentools30/MESSAGE.NetBSD4
-rw-r--r--sysutils/xentools30/Makefile34
-rw-r--r--sysutils/xentools30/PLIST48
-rw-r--r--sysutils/xentools30/buildlink3.mk19
-rw-r--r--sysutils/xentools30/distinfo99
-rw-r--r--sysutils/xentools30/files/netbsd1-nbsd48
-rwxr-xr-xsysutils/xentools30/files/vif-ip-nbsd33
-rw-r--r--sysutils/xentools30/files/xenio.h6
-rw-r--r--sysutils/xentools30/files/xenio3.h8
-rw-r--r--sysutils/xentools30/patches/patch-aa85
-rw-r--r--sysutils/xentools30/patches/patch-ab295
-rw-r--r--sysutils/xentools30/patches/patch-ac33
-rw-r--r--sysutils/xentools30/patches/patch-ad33
-rw-r--r--sysutils/xentools30/patches/patch-ae10
-rw-r--r--sysutils/xentools30/patches/patch-af10
-rw-r--r--sysutils/xentools30/patches/patch-ag10
-rw-r--r--sysutils/xentools30/patches/patch-ai10
-rw-r--r--sysutils/xentools30/patches/patch-aj17
-rw-r--r--sysutils/xentools30/patches/patch-ak10
-rw-r--r--sysutils/xentools30/patches/patch-al9
-rw-r--r--sysutils/xentools30/patches/patch-am44
-rw-r--r--sysutils/xentools30/patches/patch-an24
-rw-r--r--sysutils/xentools30/patches/patch-ao22
-rw-r--r--sysutils/xentools30/patches/patch-ap27
-rw-r--r--sysutils/xentools30/patches/patch-aq40
-rw-r--r--sysutils/xentools30/patches/patch-ar13
-rw-r--r--sysutils/xentools30/patches/patch-as32
-rw-r--r--sysutils/xentools30/patches/patch-at22
-rw-r--r--sysutils/xentools30/patches/patch-au26
-rw-r--r--sysutils/xentools30/patches/patch-av20
-rw-r--r--sysutils/xentools30/patches/patch-aw26
-rw-r--r--sysutils/xentools30/patches/patch-ax30
-rw-r--r--sysutils/xentools30/patches/patch-ay13
-rw-r--r--sysutils/xentools30/patches/patch-az14
-rw-r--r--sysutils/xentools30/patches/patch-ba14
-rw-r--r--sysutils/xentools30/patches/patch-bb10
-rw-r--r--sysutils/xentools30/patches/patch-bc16
-rw-r--r--sysutils/xentools30/patches/patch-bd49
-rw-r--r--sysutils/xentools30/patches/patch-be66
-rw-r--r--sysutils/xentools30/patches/patch-bf138
-rw-r--r--sysutils/xentools30/patches/patch-bg27
-rw-r--r--sysutils/xentools30/patches/patch-bh24
-rw-r--r--sysutils/xentools30/patches/patch-bi13
-rw-r--r--sysutils/xentools30/patches/patch-bj16
-rw-r--r--sysutils/xentools30/patches/patch-bk13
-rw-r--r--sysutils/xentools30/patches/patch-bl13
-rw-r--r--sysutils/xentools30/patches/patch-bm12
-rw-r--r--sysutils/xentools30/patches/patch-bn18
-rw-r--r--sysutils/xentools30/patches/patch-bo16
-rw-r--r--sysutils/xentools30/patches/patch-bp19
-rw-r--r--sysutils/xentools30/patches/patch-bq62
-rw-r--r--sysutils/xentools30/patches/patch-br10
-rw-r--r--sysutils/xentools30/patches/patch-bs53
-rw-r--r--sysutils/xentools30/patches/patch-bt163
-rw-r--r--sysutils/xentools30/patches/patch-bu32
-rw-r--r--sysutils/xentools30/patches/patch-bv29
-rw-r--r--sysutils/xentools30/patches/patch-bw6
-rw-r--r--sysutils/xentools30/patches/patch-bx16
-rw-r--r--sysutils/xentools30/patches/patch-by39
-rw-r--r--sysutils/xentools30/patches/patch-bz14
-rw-r--r--sysutils/xentools30/patches/patch-ca14
-rw-r--r--sysutils/xentools30/patches/patch-cb6
-rw-r--r--sysutils/xentools30/patches/patch-cc15
-rw-r--r--sysutils/xentools30/patches/patch-cd19
-rw-r--r--sysutils/xentools30/patches/patch-ce13
-rw-r--r--sysutils/xentools30/patches/patch-cf14
-rw-r--r--sysutils/xentools30/patches/patch-cg28
-rw-r--r--sysutils/xentools30/patches/patch-ch45
68 files changed, 937 insertions, 1279 deletions
diff --git a/sysutils/xentools30/MESSAGE.NetBSD b/sysutils/xentools30/MESSAGE.NetBSD
index 6bfd90aeccd..590781941e8 100644
--- a/sysutils/xentools30/MESSAGE.NetBSD
+++ b/sysutils/xentools30/MESSAGE.NetBSD
@@ -1,5 +1,5 @@
===========================================================================
-$NetBSD: MESSAGE.NetBSD,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: MESSAGE.NetBSD,v 1.2 2006/10/19 22:57:13 bouyer Exp $
Please ensure that the Xen-specific devices needed by xend(8) exist:
@@ -7,7 +7,7 @@ Please ensure that the Xen-specific devices needed by xend(8) exist:
There are example configuration files for setting up a guest domain in:
- ${EGDIR}/xmexample[0-9]*
+ ${EGDIR}/
Please also refer to the the "NetBSD/xen How-To" for more information on
creating a Xen setup:
diff --git a/sysutils/xentools30/Makefile b/sysutils/xentools30/Makefile
index 8c64afc7afe..225cd9bf44e 100644
--- a/sysutils/xentools30/Makefile
+++ b/sysutils/xentools30/Makefile
@@ -1,10 +1,11 @@
-# $NetBSD: Makefile,v 1.3 2006/10/15 16:08:08 xtraeme Exp $
+# $NetBSD: Makefile,v 1.4 2006/10/19 22:57:13 bouyer Exp $
#
-DISTNAME= xen-3.0.2-2-src
-PKGNAME= xentools30-3.0.2.2
+DISTNAME= xen-3.0.3_0-src
+PKGNAME= xentools30-3.0.3
CATEGORIES= sysutils
-MASTER_SITES= http://www.cl.cam.ac.uk/research/srg/netos/xen/downloads/
+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/
EXTRACT_SUFX= .tgz
MAINTAINER= bouyer@NetBSD.org
@@ -20,19 +21,19 @@ ONLY_FOR_PLATFORM= Linux-2.[46]*-i386 NetBSD-*-i386
CONFLICTS+= libxen-[0-9]*
CONFLICTS+= xentools20-[0-9]*
-WRKSRC= ${WRKDIR}/xen-3.0.2-2/tools
+WRKSRC= ${WRKDIR}/xen-3.0.3_0-src/tools
EGDIR= ${PREFIX}/share/examples/xen
MESSAGE_SUBST= EGDIR=${EGDIR}
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"
-MAKE_ENV+= XEN_NO_IOEMU=yes
PYTHON_VERSIONS_ACCEPTED= 24 23 22
PY_PATCHPLIST= yes
-PYTHON_PATCH_SCRIPTS= ioemu/keymaps/convert-map
PYTHON_PATCH_SCRIPTS+= misc/xm
PYTHON_PATCH_SCRIPTS+= misc/netfix
PYTHON_PATCH_SCRIPTS+= misc/xen-bugtool
@@ -43,9 +44,11 @@ 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
+PYTHON_PATCH_SCRIPTS+= python/xen/util/pci.py
+PYTHON_PATCH_SCRIPTS+= python/xen/xend/FlatDeviceTree.py
PYTHON_PATCH_SCRIPTS+= python/xen/xend/XendClient.py
+PYTHON_PATCH_SCRIPTS+= python/xen/xend/arch.py
PYTHON_PATCH_SCRIPTS+= python/test.py
-PYTHON_PATCH_SCRIPTS+= security/python/xensec_gen/cgi-bin/policylabel.cgi
PYTHON_PATCH_SCRIPTS+= security/python/xensec_gen/cgi-bin/policy.cgi
PYTHON_PATCH_SCRIPTS+= security/python/xensec_gen/main.py
PYTHON_PATCH_SCRIPTS+= security/python/setup.py
@@ -84,11 +87,11 @@ 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/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/getlabel.sh
-SUBST_FILES.conf+= security/labelfuncs.sh
SUBST_FILES.conf+= security/secpol_xml2bin.h
-SUBST_FILES.conf+= security/setlabel.sh
SUBST_SED.conf= -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g"
SUBST_CLASSES+= prefix
@@ -104,11 +107,8 @@ 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/balloon.py
-SUBST_FILES.proc+= security/get_decision.c
SUBST_FILES.proc+= security/secpol_tool.c
SUBST_FILES.proc+= xenmon/xenbaked.c
-SUBST_FILES.proc+= xenstat/libxenstat/src/xen-interface.c
-SUBST_FILES.proc+= xenstore/xenstored_proc.h
SUBST_FILES.proc+= xenstore/xs_lib.c
SUBST_FILES.proc+= xentrace/xentrace.c
SUBST_SED.proc= -e "s|/proc|/kern|g"
@@ -122,7 +122,7 @@ FILES_SUBST+= RCD_INTERPRETER=${PYTHONBIN:Q}
FILES_SUBST+= PROCPATH=${PROCPATH:Q}
FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
-XEND_SCRIPTS= block vif-bridge
+XEND_SCRIPTS= block vif-bridge vif-ip
CONF_FILES= ${EGDIR}/xend-config.sxp \
${PKG_SYSCONFDIR}/xend-config.sxp
@@ -131,7 +131,7 @@ CONF_FILES_PERMS+= ${EGDIR}/${s} ${PKG_SYSCONFDIR}/scripts/${s} \
${ROOT_USER} ${ROOT_GROUP} 0755
.endfor
-OWN_DIRS= ${PKG_SYSCONFDIR}/scripts
+OWN_DIRS= ${PKG_SYSCONFDIR}/scripts /var/log/xen
pre-build:
${MKDIR} ${WRKSRC}/libxc/xen/NetBSD
@@ -162,7 +162,7 @@ post-build:
post-install:
${INSTALL_PROGRAM} ${WRKDIR}/xenbackendd.bin ${PREFIX}/sbin/xenbackendd
${INSTALL_DATA_DIR} ${EGDIR}
- for f in xend-config.sxp xmexample1 xmexample2 xmexample3; do \
+ for f in xend-config.sxp xmexample1 xmexample2 xmexample3 netbsd1; do \
${INSTALL_DATA} ${WRKSRC}/examples/$$f ${EGDIR}/$$f; \
done
.for s in ${XEND_SCRIPTS}
diff --git a/sysutils/xentools30/PLIST b/sysutils/xentools30/PLIST
index 881ebf83737..6ed0b0a1e65 100644
--- a/sysutils/xentools30/PLIST
+++ b/sysutils/xentools30/PLIST
@@ -1,12 +1,12 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-bin/cpuperf-perfcntr
-bin/cpuperf-xen
+@comment $NetBSD: PLIST,v 1.2 2006/10/19 22:57:13 bouyer Exp $
+bin/readnotes
bin/xc_restore
bin/xc_save
bin/xc_shadow
bin/xencons
bin/xenconsole
bin/xenperf
+bin/xenstore-chmod
bin/xenstore-control
bin/xenstore-exists
bin/xenstore-list
@@ -26,12 +26,16 @@ lib/libxenguest.a
lib/libxenguest.so
lib/libxenguest.so.3.0
lib/libxenguest.so.3.0.0
+lib/libxenstore.a
lib/libxenstore.so
+lib/libxenstore.so.3.0
+lib/libxenstore.so.3.0.0
man/man1/xentop.1
${PYSITELIB}/xen/__init__.py
${PYSITELIB}/xen/__init__.pyc
${PYSITELIB}/xen/lowlevel/__init__.py
${PYSITELIB}/xen/lowlevel/__init__.pyc
+${PYSITELIB}/xen/lowlevel/acm.so
${PYSITELIB}/xen/lowlevel/xc.so
${PYSITELIB}/xen/lowlevel/xs.so
${PYSITELIB}/xen/sv/CreateDomain.py
@@ -56,6 +60,8 @@ ${PYSITELIB}/xen/sv/util.py
${PYSITELIB}/xen/sv/util.pyc
${PYSITELIB}/xen/util/Brctl.py
${PYSITELIB}/xen/util/Brctl.pyc
+${PYSITELIB}/xen/util/SSHTransport.py
+${PYSITELIB}/xen/util/SSHTransport.pyc
${PYSITELIB}/xen/util/__init__.py
${PYSITELIB}/xen/util/__init__.pyc
${PYSITELIB}/xen/util/asserts.py
@@ -68,12 +74,16 @@ ${PYSITELIB}/xen/util/bugtool.py
${PYSITELIB}/xen/util/bugtool.pyc
${PYSITELIB}/xen/util/diagnose.py
${PYSITELIB}/xen/util/diagnose.pyc
+${PYSITELIB}/xen/util/dictio.py
+${PYSITELIB}/xen/util/dictio.pyc
${PYSITELIB}/xen/util/ip.py
${PYSITELIB}/xen/util/ip.pyc
${PYSITELIB}/xen/util/mac.py
${PYSITELIB}/xen/util/mac.pyc
${PYSITELIB}/xen/util/pci.py
${PYSITELIB}/xen/util/pci.pyc
+${PYSITELIB}/xen/util/security.py
+${PYSITELIB}/xen/util/security.pyc
${PYSITELIB}/xen/util/xmlrpclib2.py
${PYSITELIB}/xen/util/xmlrpclib2.pyc
${PYSITELIB}/xen/util/xpopen.py
@@ -102,6 +112,8 @@ ${PYSITELIB}/xen/web/unix.py
${PYSITELIB}/xen/web/unix.pyc
${PYSITELIB}/xen/xend/Args.py
${PYSITELIB}/xen/xend/Args.pyc
+${PYSITELIB}/xen/xend/FlatDeviceTree.py
+${PYSITELIB}/xen/xend/FlatDeviceTree.pyc
${PYSITELIB}/xen/xend/PrettyPrint.py
${PYSITELIB}/xen/xend/PrettyPrint.pyc
${PYSITELIB}/xen/xend/Vifctl.py
@@ -132,12 +144,16 @@ ${PYSITELIB}/xen/xend/XendVnet.py
${PYSITELIB}/xen/xend/XendVnet.pyc
${PYSITELIB}/xen/xend/__init__.py
${PYSITELIB}/xen/xend/__init__.pyc
+${PYSITELIB}/xen/xend/arch.py
+${PYSITELIB}/xen/xend/arch.pyc
${PYSITELIB}/xen/xend/balloon.py
${PYSITELIB}/xen/xend/balloon.pyc
${PYSITELIB}/xen/xend/encode.py
${PYSITELIB}/xen/xend/encode.pyc
${PYSITELIB}/xen/xend/image.py
${PYSITELIB}/xen/xend/image.pyc
+${PYSITELIB}/xen/xend/server/BlktapController.py
+${PYSITELIB}/xen/xend/server/BlktapController.pyc
${PYSITELIB}/xen/xend/server/DevController.py
${PYSITELIB}/xen/xend/server/DevController.pyc
${PYSITELIB}/xen/xend/server/XMLRPCServer.py
@@ -174,6 +190,8 @@ ${PYSITELIB}/xen/xend/server/params.py
${PYSITELIB}/xen/xend/server/params.pyc
${PYSITELIB}/xen/xend/server/pciif.py
${PYSITELIB}/xen/xend/server/pciif.pyc
+${PYSITELIB}/xen/xend/server/pciquirk.py
+${PYSITELIB}/xen/xend/server/pciquirk.pyc
${PYSITELIB}/xen/xend/server/relocate.py
${PYSITELIB}/xen/xend/server/relocate.pyc
${PYSITELIB}/xen/xend/server/tests/__init__.py
@@ -208,22 +226,40 @@ ${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/addlabel.py
+${PYSITELIB}/xen/xm/addlabel.pyc
+${PYSITELIB}/xen/xm/cfgbootpolicy.py
+${PYSITELIB}/xen/xm/cfgbootpolicy.pyc
${PYSITELIB}/xen/xm/console.py
${PYSITELIB}/xen/xm/console.pyc
${PYSITELIB}/xen/xm/create.py
${PYSITELIB}/xen/xm/create.pyc
+${PYSITELIB}/xen/xm/dry-run.py
+${PYSITELIB}/xen/xm/dry-run.pyc
+${PYSITELIB}/xen/xm/dumppolicy.py
+${PYSITELIB}/xen/xm/dumppolicy.pyc
+${PYSITELIB}/xen/xm/getlabel.py
+${PYSITELIB}/xen/xm/getlabel.pyc
${PYSITELIB}/xen/xm/help.py
${PYSITELIB}/xen/xm/help.pyc
+${PYSITELIB}/xen/xm/labels.py
+${PYSITELIB}/xen/xm/labels.pyc
+${PYSITELIB}/xen/xm/loadpolicy.py
+${PYSITELIB}/xen/xm/loadpolicy.pyc
+${PYSITELIB}/xen/xm/makepolicy.py
+${PYSITELIB}/xen/xm/makepolicy.pyc
${PYSITELIB}/xen/xm/main.py
${PYSITELIB}/xen/xm/main.pyc
${PYSITELIB}/xen/xm/migrate.py
${PYSITELIB}/xen/xm/migrate.pyc
${PYSITELIB}/xen/xm/opts.py
${PYSITELIB}/xen/xm/opts.pyc
+${PYSITELIB}/xen/xm/resources.py
+${PYSITELIB}/xen/xm/resources.pyc
+${PYSITELIB}/xen/xm/rmlabel.py
+${PYSITELIB}/xen/xm/rmlabel.pyc
${PYSITELIB}/xen/xm/shutdown.py
${PYSITELIB}/xen/xm/shutdown.pyc
-${PYSITELIB}/xen/xm/sysrq.py
-${PYSITELIB}/xen/xm/sysrq.pyc
${PYSITELIB}/xen/xm/tests/__init__.py
${PYSITELIB}/xen/xm/tests/__init__.pyc
${PYSITELIB}/xen/xm/tests/test_create.py
@@ -242,7 +278,9 @@ share/examples/rc.d/xenbackendd
share/examples/rc.d/xendomains
share/examples/xen/block
share/examples/xen/vif-bridge
+share/examples/xen/vif-ip
share/examples/xen/xend-config.sxp
+share/examples/xen/netbsd1
share/examples/xen/xmexample1
share/examples/xen/xmexample2
share/examples/xen/xmexample3
diff --git a/sysutils/xentools30/buildlink3.mk b/sysutils/xentools30/buildlink3.mk
new file mode 100644
index 00000000000..cf9b6a055cc
--- /dev/null
+++ b/sysutils/xentools30/buildlink3.mk
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink3.mk,v 1.1 2006/10/19 22:57:13 bouyer Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+XENTOOLS30_BUILDLINK3_MK:= ${XENTOOLS30_BUILDLINK3_MK}+
+
+.if ${BUILDLINK_DEPTH} == "+"
+BUILDLINK_DEPENDS+= xentools30
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nxentools30}
+BUILDLINK_PACKAGES+= xentools30
+BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}xentools30
+
+.if ${XENTOOLS30_BUILDLINK3_MK} == "+"
+BUILDLINK_API_DEPENDS.xentools30+= xentools30>=3.0.2.2
+BUILDLINK_PKGSRCDIR.xentools30?= ../../sysutils/xentools30
+.endif # XENTOOLS30_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/sysutils/xentools30/distinfo b/sysutils/xentools30/distinfo
index f9804770692..f1e41dc2662 100644
--- a/sysutils/xentools30/distinfo
+++ b/sysutils/xentools30/distinfo
@@ -1,64 +1,37 @@
-$NetBSD: distinfo,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: distinfo,v 1.2 2006/10/19 22:57:13 bouyer Exp $
-SHA1 (xen-3.0.2-2-src.tgz) = 6042611bfc65ce30dc4c56485e9ddc0661d0639b
-RMD160 (xen-3.0.2-2-src.tgz) = 81be04ca7e235874ab099043ac5d924856ea3206
-Size (xen-3.0.2-2-src.tgz) = 4937486 bytes
-SHA1 (patch-aa) = aeb2d9f4b7a2e0c20f85b2a628c09347a03cd661
-SHA1 (patch-ab) = aa92cd8b2b4f4ca4e97241cf6b3e5ba6abdaefaa
-SHA1 (patch-ac) = 0991e75091e5ef85c1e26e6db0a40f6c462322d3
-SHA1 (patch-ad) = 5bcd9f360174bf0c79a64c5c0a9d25650f593591
-SHA1 (patch-ae) = b3c831640fad08ee73a0e63095c6ba2f65f8eed0
-SHA1 (patch-af) = e328cd97dfd01a17fd9b66b841287acb60d7d984
-SHA1 (patch-ag) = 8e11f49bb5c3ac65d5eafc60b9580ed81374d1d4
-SHA1 (patch-ai) = 70cf2681659832ec93d5e4bdb8cb3a94a0c21991
-SHA1 (patch-aj) = db206e84b9bd1d7cf0b4d724dafe3be836590a2c
-SHA1 (patch-ak) = fdbb19ea18399c565687cf7deeafcc351a9eb992
-SHA1 (patch-al) = 026efc19c922e7112182ba96d735df7b75d1134a
-SHA1 (patch-am) = e4678aa131d2971a6d807443347d512b73f77be8
-SHA1 (patch-an) = 71eff89959784370caea701e937f9b3267f26da5
-SHA1 (patch-ao) = c1697a6110d70fd120fd7bddfe8260ffb614fef9
-SHA1 (patch-ap) = fcd55f9e35517f3ba325e0d196bfa20a4007561b
-SHA1 (patch-aq) = 9f6a9ee40292661b2658435a849bc58bd0402d63
-SHA1 (patch-ar) = 43a4dae33a99132df3b1be1d91012d621b1a4170
-SHA1 (patch-as) = dd5ca155328e10cc565a852fec7db26ec157785a
-SHA1 (patch-at) = 19b1ea80068e1f543dc710a6006444029794a148
-SHA1 (patch-au) = a992f922bdd2966c42e71202bb0499b2fbaec5c9
-SHA1 (patch-av) = feb46154a7ff886a480f4089304c29189e4e5f15
-SHA1 (patch-aw) = 92107acf79bcd65330f279d409e8318f7f2f88c5
-SHA1 (patch-ax) = bba82ce8f8dcae534241525711ad24c7828cb64c
-SHA1 (patch-ay) = d731e9b53a4d4e47bf254d35578cf0267f124b8d
-SHA1 (patch-az) = 5bb357f715f1244b080929cd8bec3bd3b9993cc8
-SHA1 (patch-ba) = e82485eecbc1d7686193df960f136b7357f7a26a
-SHA1 (patch-bb) = 1ed5c183165683cb790da0011edaf80fa396496e
-SHA1 (patch-bc) = fbe49ba2f56c030ca4ebbb687ef6591d511651a1
-SHA1 (patch-bd) = af02f54fcade81d269e5ca57976309c9689e0964
-SHA1 (patch-be) = 6754b24adfebdea9c28389eb6a07fe3166515597
-SHA1 (patch-bf) = 56ae1ad68a97dde03485ea5fff22244836297941
-SHA1 (patch-bg) = 0d2e2685f4a087ed15ebd28b52dda72636358f7b
-SHA1 (patch-bh) = 17a94cff5b54c93c0f881a86b9776c88c4265cdd
-SHA1 (patch-bi) = 96f6e3ee65a1f5768586c2940896425044098bd6
-SHA1 (patch-bj) = 9df77974f9d036682ee579f4686686e6d83ee12f
-SHA1 (patch-bk) = 894cc935df346a10906b1a1595aa88084eb6c13f
-SHA1 (patch-bl) = 050f6a2c7c85c151156529aedaa4409c2ba9332f
-SHA1 (patch-bm) = a067747f79217200fb6e9b015371d66950067d20
-SHA1 (patch-bn) = c3a3e047183f3749c5c57d930ee9dd36d7e2c815
-SHA1 (patch-bo) = 97d2856032df83e2d42b8be020dd9573bf67eedf
-SHA1 (patch-bp) = 1d9791314f346a3503df82272e6ea3c5095c4ca7
-SHA1 (patch-bq) = 227429f42f75f38a6f210346f7690ddfcae55e0f
-SHA1 (patch-br) = 5027d715695623a7f50cad6cfac47850134cac77
-SHA1 (patch-bs) = a7834c8fb2ed1f3a8881574658436607d756c939
-SHA1 (patch-bt) = 69b74c8bc9e6ca936b9a72c6662696e6034f1ceb
-SHA1 (patch-bu) = 0e6bd9edf9cbc67d4b936a7661c71b47a8c792ec
-SHA1 (patch-bv) = 197887df84a0ac3d32f4de007da7b9d50339b97c
-SHA1 (patch-bw) = 551e5bcc4dd24c32f3ff717fe673e88f0bfc77e6
-SHA1 (patch-bx) = 2a6cdb8031cde2751a85fa80428f6844d9bbd25d
-SHA1 (patch-by) = 295d65fd562f6b73ea33134ab478c74a0c653e78
-SHA1 (patch-bz) = e633fcafd903f393ad4637910dba7cbaf544bdfb
-SHA1 (patch-ca) = 83b5b070feeeefa297231880387fc5791c4d7cea
-SHA1 (patch-cb) = 2b758bb5f0b6cc2d22bc2ef1f42e17e3a5909dc0
-SHA1 (patch-cc) = 3121541fb0cc2b881a04f75da8d27862f4290bbb
-SHA1 (patch-cd) = 16a673525f889d33e63f2fdc4e88a1419dddfe52
-SHA1 (patch-ce) = d4351bab7e2349565e9ffb55dc241fce652a2bf9
-SHA1 (patch-cf) = 7a28c13bb36877bdfc4c1212da968c165369769a
-SHA1 (patch-cg) = 93cc78ef8a075a3e9934bccd218681d289ce5c92
-SHA1 (patch-ch) = 23e553d0e4493d180d3974fe740326953f06a2b4
+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 (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-au) = beb2eaa8bf832e179e69b1758cfe0fafafdc496b
+SHA1 (patch-av) = be2a1440126908996410f92a04ad479f8a2ca373
+SHA1 (patch-aw) = ab1e65a2c06c43e24c151e2205fa9179796444f3
+SHA1 (patch-ax) = c2fd0f25ed00498039eececcfb467a236f608efa
+SHA1 (patch-ba) = 5255927d0ead10d7d04786fe4518ba391a2aeb8c
+SHA1 (patch-bb) = 4a12204946726236e76e785cc8188ba9ab1b7cb7
+SHA1 (patch-bc) = a7c6daf3cf2973d3fa228d0c96fa258b2cccc674
+SHA1 (patch-bd) = 625f8602cf86f262b9fa6f34d49641c9207c2590
+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) = 3214b83be47ea17d57470eb611214662fa35b6b5
+SHA1 (patch-bs) = beb628027379fa93825bef2b88ad7553c58b3e5e
+SHA1 (patch-bt) = acda7b259d229245a378d1b1d0ca4e04a076b90e
+SHA1 (patch-bv) = 4f3e34d75a073e55711ebbf6ddd805d5db097e42
+SHA1 (patch-bw) = d4bdb0dcc48cabefb568042d3b58822f8251b1bd
+SHA1 (patch-cb) = 0bf2513749e28ff955caabd76bf79dd8280b61ed
+SHA1 (patch-cc) = a8986fe54de5508a2e1372df415ab29b30a71ef1
+SHA1 (patch-cd) = 8fc057e9dc98e356ba46cdf183a8891c59c005b8
+SHA1 (patch-cf) = 2c1f83cfd1de238c81796762cf60560e64e0f630
+SHA1 (patch-cg) = 26aa623c34b8b0aebffd93451291264ad7d99c94
+SHA1 (patch-ch) = ae8b11cd22c2cf0c5f2c0a603e80dadad1012b59
diff --git a/sysutils/xentools30/files/netbsd1-nbsd b/sysutils/xentools30/files/netbsd1-nbsd
new file mode 100644
index 00000000000..90883c018d1
--- /dev/null
+++ b/sysutils/xentools30/files/netbsd1-nbsd
@@ -0,0 +1,48 @@
+# -*- mode: python; -*-
+#============================================================================
+# Python configuration setup for 'xm create'.
+# This script sets the parameters used when a domain is created using 'xm create'.
+# You use a separate script for each domain you want to create, or
+# you can set the parameters for the domain on the xm command line.
+#============================================================================
+
+#----------------------------------------------------------------------------
+# Kernel image file.
+kernel = "/usr/pkg/etc/xen/kernels/netbsd-XEN3_DOMU.gz"
+#kernel = "/usr/pkg/etc/xen/kernels/netbsd-INSTALL_XEN3_DOMU.gz"
+
+# Initial memory allocation (in megabytes) for the new domain.
+memory = 256
+
+# A name for your domain. All domains must have different names.
+name = "netbsd1"
+
+#----------------------------------------------------------------------------
+# network configuration.
+# The mac address is optionnal, it will use a random one if not specified.
+# By default we create a bridged configuration; when a vif is created
+# the script @PKG_SYSCONFDIR@/scripts/vif-bridge is called to connect
+# the bridge to the designated bridge (the bridge should already be up)
+vif = [ 'mac=00:16:3e:00:00:11, bridge=bridge0' ]
+
+#it's possible to use a different script when the vif is created;
+# for example to use a routed setup instead of bridged:
+# vif = [ 'mac=00:16:3e:00:00:11, ip=10.0.0.1 netmask 255.255.255.0, script=vif-ip' ]
+
+#----------------------------------------------------------------------------
+# Define the disk devices you want the domain to have access to, and
+# what you want them accessible as.
+# Each disk entry is of the form phy:UNAME,DEV,MODE
+# where UNAME is the device, DEV is the device name the domain will see,
+# and MODE is r for read-only, w for read-write.
+# For NetBSD guest DEV doesn't matter, so we can just use increasing numbers
+# here. For linux guests you have to use a linux device name (e.g. hda1)
+# or the corresponding device number (e.g 0x301 for hda1)
+
+disk = [ 'file:/home/domains/netbsd1,0x1,w' ]
+
+#----------------------------------------------------------------------------
+# Boot parameters (e.g. -s, -a, ...)
+extra = ""
+
+#============================================================================
diff --git a/sysutils/xentools30/files/vif-ip-nbsd b/sysutils/xentools30/files/vif-ip-nbsd
new file mode 100755
index 00000000000..26594100655
--- /dev/null
+++ b/sysutils/xentools30/files/vif-ip-nbsd
@@ -0,0 +1,33 @@
+#!/bin/sh -e
+
+# $NetBSD: vif-ip-nbsd,v 1.1 2006/10/19 22:57:13 bouyer Exp $
+# Called by xenbackendd
+# Usage: vif-ip xsdir_backend_path state
+
+PATH=/bin:/usr/bin:@PREFIX@/bin:/sbin:/usr/sbin:@PREFIX@/sbin
+export PATH
+
+xpath=$1
+xstatus=$2
+
+case $xstatus in
+6)
+ # device removed
+ xenstore-rm $xpath
+ exit 0
+ ;;
+2)
+ xip=$(xenstore-read "$xpath/ip")
+ xfid=$(xenstore-read "$xpath/frontend-id")
+ xhandle=$(xenstore-read "$xpath/handle")
+ iface=xvif$xfid.$xhandle
+ echo ifconfig $iface $xip up
+ ifconfig $iface $xip up
+ xenstore-write $xpath/hotplug-status connected
+ echo xenstore-write $xpath/hotplug-status connected
+ exit 0
+ ;;
+*)
+ exit 0
+ ;;
+esac
diff --git a/sysutils/xentools30/files/xenio.h b/sysutils/xentools30/files/xenio.h
index b4514a1831b..d670b414759 100644
--- a/sysutils/xentools30/files/xenio.h
+++ b/sysutils/xentools30/files/xenio.h
@@ -27,8 +27,8 @@
* IN THE SOFTWARE.
*/
-#ifndef __PRIVCMD_H__
-#define __PRIVCMD_H__
+#ifndef __NetBSD_PRIVCMD_H__
+#define __NetBSD_PRIVCMD_H__
/* Interface to /proc/xen/privcmd */
@@ -102,4 +102,4 @@ typedef struct privcmd_blkmsg
/* EVTCHN_UNBIND: Unbind from the specified event-channel port. */
#define EVTCHN_UNBIND _IOW('E', 3, unsigned long)
-#endif /* __PRIVCMD_H__ */
+#endif /* __NetBSD_PRIVCMD_H__ */
diff --git a/sysutils/xentools30/files/xenio3.h b/sysutils/xentools30/files/xenio3.h
index 2c74ae376e6..6a54e8b3790 100644
--- a/sysutils/xentools30/files/xenio3.h
+++ b/sysutils/xentools30/files/xenio3.h
@@ -1,4 +1,4 @@
-/* $NetBSD: xenio3.h,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $ */
+/* $NetBSD: xenio3.h,v 1.2 2006/10/19 22:57:13 bouyer Exp $ */
/******************************************************************************
* evtchn.h
*
@@ -28,8 +28,8 @@
* IN THE SOFTWARE.
*/
-#ifndef __LINUX_PUBLIC_EVTCHN_H__
-#define __LINUX_PUBLIC_EVTCHN_H__
+#ifndef __NetBSD_XENIO3_H__
+#define __NetBSD_XENIO3_H__
/*
* Bind a fresh port to VIRQ @virq.
@@ -86,4 +86,4 @@ struct ioctl_evtchn_notify {
#define IOCTL_EVTCHN_RESET \
_IO('E', 9)
-#endif /* __LINUX_PUBLIC_EVTCHN_H__ */
+#endif /* __NetBSD_XENIO3_H__ */
diff --git a/sysutils/xentools30/patches/patch-aa b/sysutils/xentools30/patches/patch-aa
index 23a901a32ee..5c185790fb6 100644
--- a/sysutils/xentools30/patches/patch-aa
+++ b/sysutils/xentools30/patches/patch-aa
@@ -1,45 +1,64 @@
-$NetBSD: patch-aa,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-aa,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- Makefile.orig 2006-01-31 17:09:20.000000000 +0100
-+++ Makefile
-@@ -5,23 +5,18 @@ SUBDIRS :=
- SUBDIRS += libxc
- SUBDIRS += xenstore
- SUBDIRS += misc
--SUBDIRS += examples
--SUBDIRS += xentrace
- SUBDIRS += xcutils
- SUBDIRS += firmware
- SUBDIRS += security
- SUBDIRS += console
--SUBDIRS += xenmon
--SUBDIRS += guest-headers
- ifeq ($(VTPM_TOOLS),y)
- SUBDIRS += vtpm_manager
- SUBDIRS += vtpm
- endif
- SUBDIRS += xenstat
+--- Makefile.orig 2006-10-04 04:27:58.000000000 +0200
++++ Makefile 2006-10-17 00:20:51.000000000 +0200
+@@ -5,24 +5,16 @@
+ SUBDIRS-y += libxc
+ SUBDIRS-y += xenstore
+ SUBDIRS-y += misc
+-SUBDIRS-y += examples
+-SUBDIRS-y += xentrace
+ SUBDIRS-$(CONFIG_XCUTILS) += xcutils
+-SUBDIRS-$(CONFIG_X86) += firmware
+ SUBDIRS-y += security
+ SUBDIRS-y += console
+-SUBDIRS-y += xenmon
+-SUBDIRS-y += guest-headers
+ SUBDIRS-$(VTPM_TOOLS) += vtpm_manager
+ SUBDIRS-$(VTPM_TOOLS) += vtpm
+ SUBDIRS-y += xenstat
+-SUBDIRS-y += libaio
+-SUBDIRS-y += blktap
+
# These don't cross-compile
ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
- SUBDIRS += python
--SUBDIRS += pygrub
+ SUBDIRS-y += python
+-SUBDIRS-y += pygrub
endif
- .PHONY: all install clean check check_clean ioemu eioemuinstall ioemuclean
-@@ -45,15 +39,13 @@ clean: check_clean
- $(MAKE) ioemuclean
+ .PHONY: all
+@@ -30,34 +22,27 @@
+ @set -e; for subdir in $(SUBDIRS-y); do \
+ $(MAKE) -C $$subdir $@; \
+ done
+- $(MAKE) ioemu
+
+ .PHONY: install
+ install: check
+ @set -e; for subdir in $(SUBDIRS-y); do \
+ $(MAKE) -C $$subdir $@; \
+ done
+- $(MAKE) ioemuinstall
+- $(INSTALL_DIR) -p $(DESTDIR)/var/xen/dump
+- $(INSTALL_DIR) -p $(DESTDIR)/var/log/xen
+
+ .PHONY: clean
+ clean: check_clean
+ @set -e; for subdir in $(SUBDIRS-y); do \
+ $(MAKE) -C $$subdir $@; \
+ done
+- $(MAKE) ioemuclean
+
+ .PHONY: distclean
+ distclean: clean
+ .PHONY: check
check:
- $(MAKE) -C check
+ .PHONY: check_clean
check_clean:
- $(MAKE) -C check clean
- ifndef XEN_NO_IOEMU
- ioemu ioemuinstall ioemuclean:
- [ -f ioemu/config-host.h ] || \
-- (cd ioemu; ./configure --prefix=usr)
-+ (cd ioemu; ./configure --prefix=$(PREFIX))
- $(MAKE) -C ioemu $(patsubst ioemu%,%,$@)
- else
- ioemu ioemuinstall ioemuclean:
+ .PHONY: ioemu ioemuinstall ioemuclean
+ ifdef CONFIG_IOEMU
diff --git a/sysutils/xentools30/patches/patch-ab b/sysutils/xentools30/patches/patch-ab
index 309cb61cc4a..471e266eb74 100644
--- a/sysutils/xentools30/patches/patch-ab
+++ b/sysutils/xentools30/patches/patch-ab
@@ -1,28 +1,269 @@
-$NetBSD: patch-ab,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-ab,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- blktap/Makefile.orig 2006-01-31 17:09:20.000000000 +0100
-+++ blktap/Makefile
-@@ -48,10 +48,10 @@ all: mk-symlinks libblktap.so #blkdump
- done
-
- install: all
-- $(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
-- $(INSTALL_DIR) -p $(DESTDIR)/usr/include
-- $(INSTALL_PROG) $(LIB) $(DESTDIR)/usr/$(LIBDIR)
-- $(INSTALL_PROG) blktaplib.h $(DESTDIR)/usr/include
-+ $(BSD_INSTALL_LIB_DIR) $(PREFIX)/lib
-+ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/include
-+ $(BSD_INSTALL_LIB) $(LIB) $(PREFIX)/lib
-+ $(BSD_INSTALL_DATA) blktaplib.h $(PREFIX)/include
- #$(INSTALL_PROG) $(IBINS) $(DESTDIR)$(BLKTAP_INSTALL_DIR)
- @set -e; for subdir in $(SUBDIRS); do \
- $(MAKE) -C $$subdir $@; \
-@@ -80,7 +80,7 @@ libblktap.so: $(OBJS)
- ln -sf libblktap.so.$(MAJOR) $@
-
- blkdump: libblktap.so
-- $(CC) $(CFLAGS) -o blkdump -L$(XEN_LIBXC) -L. \
-+ $(CC) $(CFLAGS) -o blkdump $(LDFLAGS) -L$(XEN_LIBXC) -L. \
- -l blktap blkdump.c
-
- .PHONY: TAGS clean install mk-symlinks rpm
+--- /dev/null 2006-10-17 00:01:34.000000000 +0200
++++ libxc/xc_netbsd.c 2006-10-17 00:05:12.000000000 +0200
+@@ -0,0 +1,264 @@
++/******************************************************************************
++ *
++ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation, version 2 of the
++ * License.
++ */
++
++#include "xc_private.h"
++
++#include <xen/memory.h>
++#include <xen/NetBSD/xenio3.h>
++#include <unistd.h>
++#include <fcntl.h>
++
++int xc_interface_open(void)
++{
++ int flags, saved_errno;
++ int fd = open("/kern/xen/privcmd", O_RDWR);
++
++ if ( fd == -1 )
++ {
++ PERROR("Could not obtain handle on privileged command interface");
++ return -1;
++ }
++
++ /* Although we return the file handle as the 'xc handle' the API
++ does not specify / guarentee that this integer is in fact
++ a file handle. Thus we must take responsiblity to ensure
++ it doesn't propagate (ie leak) outside the process */
++ if ( (flags = fcntl(fd, F_GETFD)) < 0 )
++ {
++ PERROR("Could not get file handle flags");
++ goto error;
++ }
++ flags |= FD_CLOEXEC;
++ if ( fcntl(fd, F_SETFD, flags) < 0 )
++ {
++ PERROR("Could not set file handle flags");
++ goto error;
++ }
++
++ return fd;
++
++ error:
++ saved_errno = errno;
++ close(fd);
++ errno = saved_errno;
++ return -1;
++}
++
++int xc_interface_close(int xc_handle)
++{
++ return close(xc_handle);
++}
++
++void *xc_map_foreign_batch(int xc_handle, uint32_t dom, int prot,
++ xen_pfn_t *arr, int num)
++{
++ privcmd_mmapbatch_t ioctlx;
++ void *addr;
++ addr = mmap(NULL, num*PAGE_SIZE, prot, MAP_ANON | MAP_SHARED, -1, 0);
++ if ( addr == MAP_FAILED )
++ return NULL;
++
++ ioctlx.num=num;
++ ioctlx.dom=dom;
++ ioctlx.addr=(unsigned long)addr;
++ ioctlx.arr=arr;
++ if ( ioctl(xc_handle, IOCTL_PRIVCMD_MMAPBATCH, &ioctlx) < 0 )
++ {
++ int saved_errno = errno;
++ perror("XXXXXXXX");
++ (void)munmap(addr, num*PAGE_SIZE);
++ errno = saved_errno;
++ return NULL;
++ }
++ return addr;
++
++}
++
++void *xc_map_foreign_range(int xc_handle, uint32_t dom,
++ int size, int prot,
++ unsigned long mfn)
++{
++ privcmd_mmap_t ioctlx;
++ privcmd_mmap_entry_t entry;
++ void *addr;
++ addr = mmap(NULL, size, prot, MAP_ANON | MAP_SHARED, -1, 0);
++ if ( addr == MAP_FAILED )
++ return NULL;
++
++ ioctlx.num=1;
++ ioctlx.dom=dom;
++ ioctlx.entry=&entry;
++ entry.va=(unsigned long) addr;
++ entry.mfn=mfn;
++ entry.npages=(size+PAGE_SIZE-1)>>PAGE_SHIFT;
++ if ( ioctl(xc_handle, IOCTL_PRIVCMD_MMAP, &ioctlx) < 0 )
++ {
++ int saved_errno = errno;
++ (void)munmap(addr, size);
++ errno = saved_errno;
++ return NULL;
++ }
++ return addr;
++}
++
++int xc_map_foreign_ranges(int xc_handle, uint32_t dom,
++ privcmd_mmap_entry_t *entries, int nr)
++{
++ privcmd_mmap_t ioctlx;
++ int err;
++
++ ioctlx.num = nr;
++ ioctlx.dom = dom;
++ ioctlx.entry = entries;
++
++ err = ioctl(xc_handle, IOCTL_PRIVCMD_MMAP, &ioctlx);
++ if (err == 0)
++ return 0;
++ else
++ return -errno;
++}
++
++static int do_privcmd(int xc_handle, unsigned int cmd, unsigned long data)
++{
++ int err = ioctl(xc_handle, cmd, data);
++ if (err == 0)
++ return 0;
++ else
++ return -errno;
++}
++
++int do_xen_hypercall(int xc_handle, privcmd_hypercall_t *hypercall)
++{
++ return do_privcmd(xc_handle,
++ IOCTL_PRIVCMD_HYPERCALL,
++ (unsigned long)hypercall);
++}
++
++#ifdef __NetBSD__
++#define EVTCHN_DEV_NAME "/dev/xenevt"
++#else
++#define EVTCHN_DEV_NAME "/dev/xen/evtchn"
++#define EVTCHN_DEV_MAJOR 10
++#define EVTCHN_DEV_MINOR 201
++#endif
++
++int xc_evtchn_open(void)
++{
++ return open(EVTCHN_DEV_NAME, O_NONBLOCK|O_RDWR);
++}
++
++int xc_evtchn_close(int xce_handle)
++{
++ return close(xce_handle);
++}
++
++int xc_evtchn_fd(int xce_handle)
++{
++ return xce_handle;
++}
++
++int xc_evtchn_notify(int xce_handle, evtchn_port_t port)
++{
++ struct ioctl_evtchn_notify notify;
++
++ notify.port = port;
++
++ return ioctl(xce_handle, IOCTL_EVTCHN_NOTIFY, &notify);
++}
++
++evtchn_port_t xc_evtchn_bind_interdomain(int xce_handle, int domid,
++ evtchn_port_t remote_port)
++{
++ struct ioctl_evtchn_bind_interdomain bind;
++ int ret;
++
++ bind.remote_domain = domid;
++ bind.remote_port = remote_port;
++
++ ret = ioctl(xce_handle, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind);
++ if (ret == 0)
++ return bind.port;
++ else
++ return -1;
++}
++
++int xc_evtchn_unbind(int xce_handle, evtchn_port_t port)
++{
++ struct ioctl_evtchn_unbind unbind;
++
++ unbind.port = port;
++
++ return ioctl(xce_handle, IOCTL_EVTCHN_UNBIND, &unbind);
++}
++
++evtchn_port_t xc_evtchn_bind_virq(int xce_handle, unsigned int virq)
++{
++ struct ioctl_evtchn_bind_virq bind;
++ int err;
++
++ bind.virq = virq;
++
++ err = ioctl(xce_handle, IOCTL_EVTCHN_BIND_VIRQ, &bind);
++ if (err)
++ return -1;
++ else
++ return bind.port;
++}
++
++static int dorw(int fd, char *data, size_t size, int do_write)
++{
++ size_t offset = 0;
++ ssize_t len;
++
++ while ( offset < size )
++ {
++ if (do_write)
++ len = write(fd, data + offset, size - offset);
++ else
++ len = read(fd, data + offset, size - offset);
++
++ if ( len == -1 )
++ {
++ if ( errno == EINTR )
++ continue;
++ return -1;
++ }
++
++ offset += len;
++ }
++
++ return 0;
++}
++
++evtchn_port_t xc_evtchn_pending(int xce_handle)
++{
++ evtchn_port_t port;
++
++ if ( dorw(xce_handle, (char *)&port, sizeof(port), 0) == -1 )
++ return -1;
++
++ return port;
++}
++
++int xc_evtchn_unmask(int xce_handle, evtchn_port_t port)
++{
++ return dorw(xce_handle, (char *)&port, sizeof(port), 1);
++}
++
++/*
++ * Local variables:
++ * mode: C
++ * c-set-style: "BSD"
++ * c-basic-offset: 4
++ * tab-width: 4
++ * indent-tabs-mode: nil
++ * End:
++ */
diff --git a/sysutils/xentools30/patches/patch-ac b/sysutils/xentools30/patches/patch-ac
index 93c9bf17e1d..0ec256f4ca0 100644
--- a/sysutils/xentools30/patches/patch-ac
+++ b/sysutils/xentools30/patches/patch-ac
@@ -1,22 +1,13 @@
-$NetBSD: patch-ac,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-ac,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- blktap/parallax/Makefile.orig 2006-04-10 00:05:52.000000000 +0200
-+++ blktap/parallax/Makefile 2006-05-05 21:42:19.000000000 +0200
-@@ -1,7 +1,7 @@
- XEN_ROOT = ../../..
- include $(XEN_ROOT)/tools/Rules.mk
-
--PARALLAX_INSTALL_DIR = /usr/sbin
-+PARALLAX_INSTALL_DIR = $(PREFIX)/sbin
-
- INSTALL = install
- INSTALL_PROG = $(INSTALL) -m0755
-@@ -46,7 +46,7 @@
- all: $(VDI_TOOLS) parallax blockstored
-
- install: all
-- $(INSTALL_PROG) $(IBINS) $(DESTDIR)$(PARALLAX_INSTALL_DIR)
-+ $(BSD_INSTALL_PROGRAM) $(IBINS) $(PARALLAX_INSTALL_DIR)
-
- clean:
- rm -rf *.o *~ $(DEPS) xen TAGS $(VDI_TOOLS) parallax vdi_unittest
+--- 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
+@@ -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");
+ return NULL;
+ }
diff --git a/sysutils/xentools30/patches/patch-ad b/sysutils/xentools30/patches/patch-ad
index 0a4c3412ce7..26b48f56205 100644
--- a/sysutils/xentools30/patches/patch-ad
+++ b/sysutils/xentools30/patches/patch-ad
@@ -1,13 +1,26 @@
-$NetBSD: patch-ad,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-ad,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- blktap/ublkback/Makefile.orig 2006-01-31 17:09:20.000000000 +0100
-+++ blktap/ublkback/Makefile
-@@ -29,7 +29,7 @@ all: $(IBIN)
- LINUX_ROOT := $(wildcard $(XEN_ROOT)/linux-2.6.*-xen-sparse)
+--- 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 @@
+ {
+ 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;
- install:
-- $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(INSTALL_DIR)
-+ $(BSD_INSTALL_PROGRAM) $(IBIN) $(PREFIX)/sbin
- clean:
- rm -rf *.o*~ $(DEPS) xen TAGS $(IBIN)
+- if ( mlock(info, max_domains*sizeof(xc_domaininfo_t)) != 0 )
++ if ( mlock(info_addr, len) != 0 )
+ return -1;
+ sysctl.cmd = XEN_SYSCTL_getdomaininfolist;
+@@ -226,8 +228,7 @@
+ else
+ ret = sysctl.u.getdomaininfolist.num_domains;
+
+- if ( munlock(info, max_domains*sizeof(xc_domaininfo_t)) != 0 )
+- ret = -1;
++ (void)munlock(info_addr, len); /* XXX munlock fails; why ? */
+
+ return ret;
+ }
diff --git a/sysutils/xentools30/patches/patch-ae b/sysutils/xentools30/patches/patch-ae
deleted file mode 100644
index e05fc4a68ee..00000000000
--- a/sysutils/xentools30/patches/patch-ae
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-ae,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- check/check_brctl.orig 2006-01-31 17:09:20.000000000 +0100
-+++ check/check_brctl
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/ksh
- # CHECK-INSTALL
-
- function error {
diff --git a/sysutils/xentools30/patches/patch-af b/sysutils/xentools30/patches/patch-af
deleted file mode 100644
index c8026c23eff..00000000000
--- a/sysutils/xentools30/patches/patch-af
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-af,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- check/check_hotplug.orig 2006-01-31 17:09:20.000000000 +0100
-+++ check/check_hotplug
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/ksh
- # CHECK-INSTALL
-
- function error {
diff --git a/sysutils/xentools30/patches/patch-ag b/sysutils/xentools30/patches/patch-ag
deleted file mode 100644
index c8ea2faca7e..00000000000
--- a/sysutils/xentools30/patches/patch-ag
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-ag,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- check/check_iproute.orig 2006-01-31 17:09:20.000000000 +0100
-+++ check/check_iproute
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/ksh
- # CHECK-INSTALL
-
- function error {
diff --git a/sysutils/xentools30/patches/patch-ai b/sysutils/xentools30/patches/patch-ai
deleted file mode 100644
index b71fcc4cce1..00000000000
--- a/sysutils/xentools30/patches/patch-ai
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-ai,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- check/check_zlib_devel.orig 2006-01-31 17:09:20.000000000 +0100
-+++ check/check_zlib_devel
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/ksh
- # CHECK-BUILD
-
- function error {
diff --git a/sysutils/xentools30/patches/patch-aj b/sysutils/xentools30/patches/patch-aj
deleted file mode 100644
index b4fd832f59a..00000000000
--- a/sysutils/xentools30/patches/patch-aj
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-aj,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- check/check_zlib_lib.orig 2006-01-31 17:09:20.000000000 +0100
-+++ check/check_zlib_lib
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/ksh
- # CHECK-BUILD CHECK-INSTALL
-
- function error {
-@@ -7,5 +7,6 @@ function error {
- exit 1
- }
-
-+exit 0
- set -e
- ldconfig -p | grep -q libz.so || error
diff --git a/sysutils/xentools30/patches/patch-ak b/sysutils/xentools30/patches/patch-ak
deleted file mode 100644
index eb8f82b3238..00000000000
--- a/sysutils/xentools30/patches/patch-ak
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-ak,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- check/chk.orig 2006-01-31 17:09:20.000000000 +0100
-+++ check/chk
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/ksh
-
- function usage {
- echo "Usage:"
diff --git a/sysutils/xentools30/patches/patch-al b/sysutils/xentools30/patches/patch-al
index 152170de457..75bccbb4ea5 100644
--- a/sysutils/xentools30/patches/patch-al
+++ b/sysutils/xentools30/patches/patch-al
@@ -1,8 +1,8 @@
-$NetBSD: patch-al,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-al,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- console/Makefile.orig 2006-01-31 17:09:20.000000000 +0100
-+++ console/Makefile
-@@ -23,15 +23,15 @@ clean:
+--- 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 @@
$(RM) client/*.o daemon/*.o
xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
@@ -15,6 +15,7 @@ $NetBSD: patch-al,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
-lxenctrl -lxenstore
+ .PHONY: install
install: $(BIN)
- $(INSTALL_DIR) -p $(DESTDIR)/$(DAEMON_INSTALL_DIR)
- $(INSTALL_PROG) xenconsoled $(DESTDIR)/$(DAEMON_INSTALL_DIR)
diff --git a/sysutils/xentools30/patches/patch-am b/sysutils/xentools30/patches/patch-am
index dffebf0a94c..b85083409a1 100644
--- a/sysutils/xentools30/patches/patch-am
+++ b/sysutils/xentools30/patches/patch-am
@@ -1,20 +1,8 @@
-$NetBSD: patch-am,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-am,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- console/daemon/io.c.orig 2006-04-13 19:48:38.000000000 +0200
-+++ console/daemon/io.c 2006-05-07 23:26:36.000000000 +0200
-@@ -24,7 +24,11 @@
- #include "io.h"
- #include <xenctrl.h>
- #include <xs.h>
-+#ifdef __NetBSD__
-+#include <xen/NetBSD/xenio3.h>
-+#else
- #include <xen/linux/evtchn.h>
-+#endif
- #include <xen/io/console.h>
-
- #include <malloc.h>
-@@ -155,22 +159,26 @@
+--- 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;
@@ -53,27 +41,3 @@ $NetBSD: patch-am,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
success = asprintf(&path, "%s/limit", dom->conspath) != -1;
if (!success)
goto out;
-@@ -263,7 +271,11 @@
-
- /* Opening evtchn independently for each console is a bit
- * wasteful, but that's how the code is structured... */
-+#ifdef __NetBSD__
-+ dom->evtchn_fd = open("/dev/xenevt", O_RDWR);
-+#else
- dom->evtchn_fd = open("/dev/xen/evtchn", O_RDWR);
-+#endif
- if (dom->evtchn_fd == -1) {
- err = errno;
- goto out;
-@@ -278,7 +290,11 @@
- dom->evtchn_fd = -1;
- goto out;
- }
-+#ifdef __NetBSD__
-+ dom->local_port = bind.port;
-+#else
- dom->local_port = rc;
-+#endif
-
- if (dom->tty_fd == -1) {
- dom->tty_fd = domain_create_tty(dom);
diff --git a/sysutils/xentools30/patches/patch-an b/sysutils/xentools30/patches/patch-an
deleted file mode 100644
index f7a54659cfc..00000000000
--- a/sysutils/xentools30/patches/patch-an
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-an,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- firmware/Makefile.orig 2006-04-10 00:05:53.000000000 +0200
-+++ firmware/Makefile 2006-05-05 21:45:41.000000000 +0200
-@@ -4,7 +4,7 @@
- # hvmloader is a 32-bit protected mode binary.
- # It belongs in /usr/lib, not /usr/lib64.
- TARGET := hvmloader/hvmloader
--INSTALL_DIR := $(DESTDIR)/usr/lib/xen/boot
-+INSTALL_DIR := $(PREFIX)/lib/xen/boot
-
- SUBDIRS :=
- SUBDIRS += rombios
-@@ -29,8 +29,8 @@
-
-
- install: all
-- [ -d $(INSTALL_DIR) ] || install -d -m0755 $(INSTALL_DIR)
-- [ ! -e $(TARGET) ] || install -m0644 $(TARGET) $(INSTALL_DIR)
-+# $(BSD_INSTALL_DATA_DIR) $(INSTALL_DIR)
-+# $(BSD_INSTALL_DATA) $(TARGET) $(INSTALL_DIR)
-
- clean:
- @set -e; for subdir in $(SUBDIRS); do \
diff --git a/sysutils/xentools30/patches/patch-ao b/sysutils/xentools30/patches/patch-ao
deleted file mode 100644
index 865023640e0..00000000000
--- a/sysutils/xentools30/patches/patch-ao
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-ao,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- ioemu/configure.orig 2006-01-31 17:09:20.000000000 +0100
-+++ ioemu/configure
-@@ -230,7 +230,7 @@ fi
-
- if test -z "$vnc"; then
-
--if libvncserver-config --version >& /dev/null; then
-+if libvncserver-config --version > /dev/null 2>&1; then
- vnc=yes
- else
- vnc=no
-@@ -341,7 +341,7 @@ mandir="$installroot/$prefix/share/man"
- datadir="$installroot/$prefix/share/xen/qemu"
- docdir="$installroot/$prefix/share/doc/qemu"
- bindir="$installroot/$prefix/bin"
--configdir="$installroot/etc/xen"
-+configdir="@XENDCONFDIR@"
- fi
-
- echo "Install prefix $prefix"
diff --git a/sysutils/xentools30/patches/patch-ap b/sysutils/xentools30/patches/patch-ap
deleted file mode 100644
index a809ec21c74..00000000000
--- a/sysutils/xentools30/patches/patch-ap
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-ap,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- ioemu/target-i386-dm/Makefile.orig 2006-04-10 00:05:53.000000000 +0200
-+++ ioemu/target-i386-dm/Makefile 2006-05-05 21:46:45.000000000 +0200
-@@ -4,7 +4,7 @@
- XEN_ROOT=../../..
- include $(XEN_ROOT)/tools/Rules.mk
-
--INSTALL_DIR := $(DESTDIR)/usr/$(LIBDIR)/xen/bin
-+INSTALL_DIR := $(PREFIX)/libexec
- TARGET_PATH=$(SRC_PATH)/target-$(TARGET_ARCH)
- VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
- DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH)
-@@ -389,11 +389,8 @@
- distclean: clean
-
- install: all
-- if [ ! -d $(INSTALL_DIR) ];then mkdir -p $(INSTALL_DIR);fi
-- if [ ! -d $(DESTDIR)$(configdir) ];then mkdir -p $(DESTDIR)$(configdir);fi
-- install -m 755 -s $(PROGS) "$(INSTALL_DIR)"
-- install -m 755 qemu-dm.debug "$(INSTALL_DIR)"
-- install -m 755 qemu-ifup "$(DESTDIR)$(configdir)"
-+ $(BSD_INSTALL_PROGRAM_DIR) $(INSTALL_DIR)
-+ $(BSD_INSTALL_PROGRAM) $(PROGS) $(INSTALL_DIR)
- ifneq ($(wildcard .depend),)
- include .depend
- endif
diff --git a/sysutils/xentools30/patches/patch-aq b/sysutils/xentools30/patches/patch-aq
deleted file mode 100644
index 2d4c1e45333..00000000000
--- a/sysutils/xentools30/patches/patch-aq
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD: patch-aq,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- ioemu/target-i386-dm/helper2.c.orig 2006-04-10 00:05:53.000000000 +0200
-+++ ioemu/target-i386-dm/helper2.c 2006-05-05 21:48:14.000000000 +0200
-@@ -51,7 +51,11 @@
-
- #include <xenctrl.h>
- #include <xen/hvm/ioreq.h>
-+#ifdef __NetBSD__
-+#include <xen/NetBSD/xenio3.h>
-+#else
- #include <xen/linux/evtchn.h>
-+#endif
-
- #include "cpu.h"
- #include "exec-all.h"
-@@ -508,7 +512,11 @@
- return NULL;
-
- //use nonblock reading not polling, may change in future.
-+#ifdef __NetBSD__
-+ evtchn_fd = open("/dev/xenevt", O_RDWR|O_NONBLOCK);
-+#else
- evtchn_fd = open("/dev/xen/evtchn", O_RDWR|O_NONBLOCK);
-+#endif
- if (evtchn_fd == -1) {
- fprintf(logfile, "open evtchn device error %d\n", errno);
- return NULL;
-@@ -523,7 +531,11 @@
- fprintf(logfile, "bind interdomain ioctl error %d\n", errno);
- return NULL;
- }
-+#ifdef __NetBSD__
-+ shared_page->vcpu_iodata[i].dm_eport = bind.port;
-+#else
- shared_page->vcpu_iodata[i].dm_eport = rc;
-+#endif
- }
-
- return env;
diff --git a/sysutils/xentools30/patches/patch-ar b/sysutils/xentools30/patches/patch-ar
deleted file mode 100644
index 9c6d70a1b71..00000000000
--- a/sysutils/xentools30/patches/patch-ar
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ar,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- ioemu/vl.c.orig 2006-01-31 17:09:21.000000000 +0100
-+++ ioemu/vl.c
-@@ -81,7 +81,7 @@
-
- //#define DO_TB_FLUSH
-
--#define DEFAULT_NETWORK_SCRIPT "/etc/xen/qemu-ifup"
-+#define DEFAULT_NETWORK_SCRIPT "@XENDCONFDIR@/qemu-ifup"
-
- #if !defined(CONFIG_SOFTMMU)
- #define PHYS_RAM_MAX_SIZE (256 * 1024 * 1024)
diff --git a/sysutils/xentools30/patches/patch-as b/sysutils/xentools30/patches/patch-as
index 303e5801d8c..896a9f6b648 100644
--- a/sysutils/xentools30/patches/patch-as
+++ b/sysutils/xentools30/patches/patch-as
@@ -1,19 +1,21 @@
-$NetBSD: patch-as,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-as,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- libxc/Makefile.orig 2006-04-10 00:05:53.000000000 +0200
-+++ libxc/Makefile 2006-05-05 21:49:12.000000000 +0200
-@@ -22,8 +22,6 @@
- SRCS += xc_tbuf.c
+--- 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
+ CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
++CTRL_SRCS-$(CONFIG_NetBSD) += xc_netbsd.c
- ifeq ($(patsubst x86%,x86,$(XEN_TARGET_ARCH)),x86)
--SRCS += xc_ptrace.c
--SRCS += xc_ptrace_core.c
- SRCS += xc_pagetab.c
- endif
-
-@@ -80,19 +78,19 @@
- fi
+ GUEST_SRCS-y :=
+ GUEST_SRCS-y += xc_load_bin.c
+@@ -78,19 +79,19 @@
+ .PHONY: install
install: build
- [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
- [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
@@ -42,5 +44,5 @@ $NetBSD: patch-as,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+ ln -sf libxenguest.so.$(MAJOR) $(PREFIX)/lib/libxenguest.so
+ $(BSD_INSTALL_DATA) xenguest.h $(PREFIX)/include
- .PHONY: TAGS clean rpm install all
-
+ .PHONY: TAGS
+ TAGS:
diff --git a/sysutils/xentools30/patches/patch-at b/sysutils/xentools30/patches/patch-at
deleted file mode 100644
index efcd921f67f..00000000000
--- a/sysutils/xentools30/patches/patch-at
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-at,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- libxc/xc_private.c.orig 2006-01-31 17:09:21.000000000 +0100
-+++ libxc/xc_private.c
-@@ -13,7 +13,7 @@ void *xc_map_foreign_batch(int xc_handle
- {
- privcmd_mmapbatch_t ioctlx;
- void *addr;
-- addr = mmap(NULL, num*PAGE_SIZE, prot, MAP_SHARED, xc_handle, 0);
-+ addr = mmap(NULL, num*PAGE_SIZE, prot, MAP_ANON | MAP_SHARED, -1, 0);
- if ( addr == MAP_FAILED )
- return NULL;
-
-@@ -42,7 +42,7 @@ void *xc_map_foreign_range(int xc_handle
- privcmd_mmap_t ioctlx;
- privcmd_mmap_entry_t entry;
- void *addr;
-- addr = mmap(NULL, size, prot, MAP_SHARED, xc_handle, 0);
-+ addr = mmap(NULL, size, prot, MAP_ANON | MAP_SHARED, -1, 0);
- if ( addr == MAP_FAILED )
- return NULL;
-
diff --git a/sysutils/xentools30/patches/patch-au b/sysutils/xentools30/patches/patch-au
index f437ffc93d1..7af66c73165 100644
--- a/sysutils/xentools30/patches/patch-au
+++ b/sysutils/xentools30/patches/patch-au
@@ -1,32 +1,16 @@
-$NetBSD: patch-au,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-au,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- libxc/xc_private.h.orig 2006-04-13 19:48:38.000000000 +0200
-+++ libxc/xc_private.h 2006-05-07 20:33:41.000000000 +0200
+--- libxc/xc_private.h.orig 2006-10-16 22:15:35.000000000 +0200
++++ libxc/xc_private.h 2006-10-16 22:16:09.000000000 +0200
@@ -15,7 +15,11 @@
#include "xenctrl.h"
--#include <xen/linux/privcmd.h>
+#ifdef __NetBSD__
+#include <xen/NetBSD/xenio.h>
+#else
-+include <xen/linux/privcmd.h>
+ #include <xen/sys/privcmd.h>
+#endif
/* valgrind cannot see when a hypercall has filled in some values. For this
- reason, we must zero the privcmd_hypercall_t or dom0_op_t instance before a
-@@ -66,9 +70,13 @@
- static inline int do_xen_hypercall(int xc_handle,
- privcmd_hypercall_t *hypercall)
- {
-- return do_privcmd(xc_handle,
-+ int err = do_privcmd(xc_handle,
- IOCTL_PRIVCMD_HYPERCALL,
- (unsigned long)hypercall);
-+ if (err == 0)
-+ return 0;
-+ else
-+ return -errno;
- }
-
- static inline int do_xen_version(int xc_handle, int cmd, void *dest)
+ reason, we must zero the privcmd_hypercall_t or domctl/sysctl instance
diff --git a/sysutils/xentools30/patches/patch-av b/sysutils/xentools30/patches/patch-av
index b1ec0102de0..531ff233701 100644
--- a/sysutils/xentools30/patches/patch-av
+++ b/sysutils/xentools30/patches/patch-av
@@ -1,16 +1,12 @@
-$NetBSD: patch-av,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-av,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- libxc/xg_private.h.orig 2006-01-31 17:09:21.000000000 +0100
-+++ libxc/xg_private.h
-@@ -13,7 +13,11 @@
- #include "xenctrl.h"
- #include "xenguest.h"
+--- libxc/xg_private.h.orig 2006-10-16 22:15:35.000000000 +0200
++++ libxc/xg_private.h 2006-10-16 22:16:19.000000000 +0200
+@@ -15,7 +15,6 @@
+ #include "xenguest.h"
+ #include "xc_private.h"
-+#ifdef __NetBSD__
-+#include <xen/NetBSD/xenio.h>
-+#else
- #include <xen/linux/privcmd.h>
-+#endif
+-#include <xen/sys/privcmd.h>
#include <xen/memory.h>
+ #include <xen/elfnote.h>
- /* valgrind cannot see when a hypercall has filled in some values. For this
diff --git a/sysutils/xentools30/patches/patch-aw b/sysutils/xentools30/patches/patch-aw
index aa03495f009..9d07482dc81 100644
--- a/sysutils/xentools30/patches/patch-aw
+++ b/sysutils/xentools30/patches/patch-aw
@@ -1,8 +1,8 @@
-$NetBSD: patch-aw,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-aw,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- misc/Makefile.orig 2006-04-10 00:05:53.000000000 +0200
-+++ misc/Makefile 2006-05-05 22:18:12.000000000 +0200
-@@ -15,25 +15,27 @@
+--- 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 @@
TARGETS = xenperf xc_shadow
@@ -13,33 +13,35 @@ $NetBSD: patch-aw,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+INSTALL_SBIN = xenperf
+INSTALL_SBIN_SCRIPT = netfix xm xen-bugtool xend
+ .PHONY: all
all: build
+
+ .PHONY: build
build: $(TARGETS)
- $(MAKE) -C miniterm
- $(MAKE) -C cpuperf
- ifneq ($(XEN_TARGET_ARCH),ia64)
+- $(MAKE) -C miniterm
+-ifeq ($(CONFIG_MBOOTPACK),y)
- $(MAKE) -C mbootpack
-+# $(MAKE) -C mbootpack
- endif
+-endif
- $(MAKE) -C lomount
+ .PHONY: install
install: build
- [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
- [ -d $(DESTDIR)/usr/sbin ] || $(INSTALL_DIR) $(DESTDIR)/usr/sbin
- $(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
- $(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin
+- $(MAKE) -C lomount install
+ $(BSD_INSTALL_PROGRAM_DIR) $(PREFIX)/bin
+ $(BSD_INSTALL_PROGRAM_DIR) $(PREFIX)/sbin
+ $(BSD_INSTALL_PROGRAM) $(INSTALL_BIN) $(PREFIX)/bin
+ $(BSD_INSTALL_SCRIPT) $(INSTALL_BIN_SCRIPT) $(PREFIX)/bin
+ $(BSD_INSTALL_PROGRAM) $(INSTALL_SBIN) $(PREFIX)/sbin
+ $(BSD_INSTALL_SCRIPT) $(INSTALL_SBIN_SCRIPT) $(PREFIX)/sbin
- $(MAKE) -C cpuperf install
-- $(MAKE) -C lomount install
++# $(MAKE) -C lomount install
# No sense in installing miniterm on the Xen box.
# $(MAKE) -C miniterm install
# Likewise mbootpack
-@@ -50,4 +52,4 @@
+@@ -52,4 +51,4 @@
$(CC) -c $(CFLAGS) -o $@ $<
$(TARGETS): %: %.o Makefile
diff --git a/sysutils/xentools30/patches/patch-ax b/sysutils/xentools30/patches/patch-ax
index 7a9705d6d3e..646d71533b2 100644
--- a/sysutils/xentools30/patches/patch-ax
+++ b/sysutils/xentools30/patches/patch-ax
@@ -1,18 +1,14 @@
-$NetBSD: patch-ax,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-ax,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- misc/cpuperf/Makefile.orig 2006-04-14 02:48:38.000000000 +0900
-+++ misc/cpuperf/Makefile
-@@ -36,5 +36,5 @@ clean:
-
- cpuperf-xen: cpuperf.c $(HDRS) Makefile
-- $(CC) $(CFLAGS) -I $(XEN_LIBXC) -L$(XEN_LIBXC) -lxenctrl -DXENO -o $@ $<
-+ $(CC) $(CFLAGS) $(LDFLAGS) -I$(XEN_LIBXC) -L$(XEN_LIBXC) -lxenctrl -DXENO -o $@ $<
-
- cpuperf-perfcntr: cpuperf.c $(HDRS) Makefile
-@@ -42,5 +42,5 @@ cpuperf-perfcntr: cpuperf.c $(HDRS) Make
-
- install: all
-- $(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
-+ $(BSD_INSTALL_PROGRAM) $(INSTALL_BIN) $(PREFIX)/bin
-
-
+--- misc/xend.orig 2006-10-17 15:33:55.000000000 +0200
++++ misc/xend 2006-10-17 15:38:47.000000000 +0200
+@@ -94,8 +94,7 @@
+ os.execvp('xenconsoled', ['xenconsoled'])
+
+ def start_blktapctrl():
+- if os.fork() == 0:
+- os.execvp('blktapctrl', ['blktapctrl'])
++ ''
+
+ def main():
+ try:
diff --git a/sysutils/xentools30/patches/patch-ay b/sysutils/xentools30/patches/patch-ay
deleted file mode 100644
index 3607e99bfdb..00000000000
--- a/sysutils/xentools30/patches/patch-ay
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ay,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- misc/mbootpack/Makefile.orig 2006-01-31 17:09:21.000000000 +0100
-+++ misc/mbootpack/Makefile
-@@ -12,7 +12,7 @@ all: build
- build: mbootpack
-
- install: build
-- $(INSTALL_PROG) mbootpack $(DESTDIR)/usr/bin
-+ $(BSD_INSTALL_PROGRAM) mbootpack $(PREFIX)/bin
-
- # Tools etc.
- RM := rm -f
diff --git a/sysutils/xentools30/patches/patch-az b/sysutils/xentools30/patches/patch-az
deleted file mode 100644
index 725eb411387..00000000000
--- a/sysutils/xentools30/patches/patch-az
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-az,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- misc/miniterm/Makefile.orig 2006-01-31 17:09:21.000000000 +0100
-+++ misc/miniterm/Makefile
-@@ -9,8 +9,7 @@ TARGET = miniterm
- all: $(TARGET)
-
- install: all
-- [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
-- $(INSTALL_PROG) $(TARGET) $(DESTDIR)/usr/bin
-+ $(BSD_INSTALL_PROGRAM) $(TARGET) $(PREFIX)/bin
-
- clean:
- $(RM) *.o $(TARGET) *~
diff --git a/sysutils/xentools30/patches/patch-ba b/sysutils/xentools30/patches/patch-ba
index 2d035e0681f..3b4b1806ad6 100644
--- a/sysutils/xentools30/patches/patch-ba
+++ b/sysutils/xentools30/patches/patch-ba
@@ -1,12 +1,12 @@
-$NetBSD: patch-ba,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-ba,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- python/Makefile.orig 2006-04-10 00:05:53.000000000 +0200
-+++ python/Makefile 2006-05-05 21:50:52.000000000 +0200
-@@ -9,10 +9,10 @@
-
+--- python/Makefile.orig 2006-10-16 22:26:18.000000000 +0200
++++ python/Makefile 2006-10-16 22:26:53.000000000 +0200
+@@ -11,10 +11,10 @@
+ .PHONY: install
ifndef XEN_PYTHON_NATIVE_INSTALL
install: all
-- CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --force
+- CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force
+ python setup.py install
else
install: all
@@ -14,4 +14,4 @@ $NetBSD: patch-ba,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+ python setup.py install
endif
- test:
+ .PHONY: test
diff --git a/sysutils/xentools30/patches/patch-bb b/sysutils/xentools30/patches/patch-bb
index 289ff787d70..8d792864eb3 100644
--- a/sysutils/xentools30/patches/patch-bb
+++ b/sysutils/xentools30/patches/patch-bb
@@ -1,8 +1,8 @@
-$NetBSD: patch-bb,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-bb,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- python/xen/xend/XendRoot.py.orig 2006-01-31 17:09:21.000000000 +0100
-+++ python/xen/xend/XendRoot.py
-@@ -40,16 +40,16 @@ class XendRoot:
+--- 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 @@
"""Root of the management classes."""
"""Default path to the config file."""
@@ -21,4 +21,4 @@ $NetBSD: patch-bb,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+ block_script_dir = "@XENDCONFDIR@/scripts"
"""Default path to the log file. """
- logfile_default = "/var/log/xend.log"
+ logfile_default = "/var/log/xen/xend.log"
diff --git a/sysutils/xentools30/patches/patch-bc b/sysutils/xentools30/patches/patch-bc
index 71b56a68251..e8188843c53 100644
--- a/sysutils/xentools30/patches/patch-bc
+++ b/sysutils/xentools30/patches/patch-bc
@@ -1,17 +1,17 @@
-$NetBSD: patch-bc,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-bc,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- python/xen/xm/create.py.orig 2006-01-31 17:09:21.000000000 +0100
-+++ python/xen/xm/create.py
-@@ -64,7 +64,7 @@ gopts.opt('quiet', short='q',
+--- 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
+@@ -64,7 +64,7 @@
use="Quiet.")
gopts.opt('path', val='PATH',
- fn=set_value, default='.:/etc/xen',
+ fn=set_value, default='.:@XENDCONFDIR@',
- use="""Search path for configuration scripts.
- The value of PATH is a colon-separated directory list.""")
+ use="Search path for configuration scripts. "
+ "The value of PATH is a colon-separated directory list.")
-@@ -279,7 +279,7 @@ gopts.var('vtpm', val="instance=INSTANCE
+@@ -298,7 +298,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
@@ -19,4 +19,4 @@ $NetBSD: patch-bc,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+ number can be found in @XENDCONFDIR@/vtpm.db. Use the backend in the
given domain.""")
- gopts.var('nics', val="NUM",
+ gopts.var('access_control', val="policy=POLICY,label=LABEL",
diff --git a/sysutils/xentools30/patches/patch-bd b/sysutils/xentools30/patches/patch-bd
index ab7c9ef894d..ffedd86fdf6 100644
--- a/sysutils/xentools30/patches/patch-bd
+++ b/sysutils/xentools30/patches/patch-bd
@@ -1,40 +1,13 @@
-$NetBSD: patch-bd,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-bd,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- python/xen/xm/tests/test_create.py.orig 2006-01-31 17:09:21.000000000 +0100
-+++ python/xen/xm/tests/test_create.py
-@@ -48,7 +48,7 @@ class test_create(unittest.TestCase):
- 'boot' : 'c',
- 'dhcp' : 'off',
- 'interface' : 'eth0',
-- 'path' : '.:/etc/xen',
-+ 'path' : '.:@XENDCONFDIR@',
- 'builder' : 'linux',
- 'nics' : -1,
- })
-@@ -97,7 +97,7 @@ on_crash = 'destroy'
- 'boot' : 'c',
- 'dhcp' : 'off',
- 'interface' : 'eth0',
-- 'path' : '.:/etc/xen',
-+ 'path' : '.:@XENDCONFDIR@',
- 'builder' : 'linux',
- })
-
-@@ -135,7 +135,7 @@ cpu_weight = 0.75
- 'boot' : 'c',
- 'dhcp' : 'off',
- 'interface' : 'eth0',
-- 'path' : '.:/etc/xen',
-+ 'path' : '.:@XENDCONFDIR@',
- 'builder' : 'linux',
- 'nics' : -1,
- })
-@@ -187,7 +187,7 @@ ne2000=0
- 'boot' : 'c',
- 'dhcp' : 'off',
- 'interface' : 'eth0',
-- 'path' : '.:/etc/xen',
-+ 'path' : '.:@XENDCONFDIR@',
- })
-
+--- 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-be b/sysutils/xentools30/patches/patch-be
index 74dca3efd0c..c7d1dd80427 100644
--- a/sysutils/xentools30/patches/patch-be
+++ b/sysutils/xentools30/patches/patch-be
@@ -1,56 +1,16 @@
-$NetBSD: patch-be,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-be,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- security/Makefile.orig 2006-01-31 17:09:21.000000000 +0100
-+++ security/Makefile
-@@ -40,7 +40,7 @@ ACM_NOINST_TOOLS = get_decision
- ACM_OBJS = $(OBJS_TOOL) $(OBJS_XML2BIN) $(OBJS_GETD)
- ACM_SCRIPTS = getlabel.sh setlabel.sh updategrub.sh labelfuncs.sh
+--- python/xen/lowlevel/acm/acm.c.orig 2006-10-17 00:18:15.000000000 +0200
++++ python/xen/lowlevel/acm/acm.c 2006-10-17 00:18:25.000000000 +0200
+@@ -26,10 +26,10 @@
+ #include <stdlib.h>
+ #include <sys/ioctl.h>
+ #include <netinet/in.h>
++#include <xenctrl.h>
+ #include <xen/acm.h>
+ #include <xen/acm_ops.h>
--ACM_CONFIG_DIR = /etc/xen/acm-security
-+ACM_CONFIG_DIR = $(PREFIX)/share/examples/xen/acm-security
- ACM_POLICY_DIR = $(ACM_CONFIG_DIR)/policies
- ACM_SCRIPT_DIR = $(ACM_CONFIG_DIR)/scripts
+-#include <xenctrl.h>
-@@ -59,26 +59,26 @@ ifeq ($(ACM_SECURITY),y)
- all: build
-
- install: all $(ACM_CONFIG_FILE)
-- $(INSTALL_DIR) -p $(DESTDIR)/usr/sbin
-- $(INSTALL_PROG) -p $(ACM_INST_TOOLS) $(DESTDIR)/usr/sbin
-- $(INSTALL_DIR) -p $(DESTDIR)$(ACM_CONFIG_DIR)
-- $(INSTALL_DIR) -p $(DESTDIR)$(ACM_POLICY_DIR)
-- $(INSTALL_DATA) -p policies/$(ACM_SCHEMA) $(DESTDIR)$(ACM_POLICY_DIR)
-+ $(BSD_INSTALL_PROGRAM_DIR) $(PREFIX)/sbin
-+ $(BSD_INSTALL_PROGRAM) $(ACM_INST_TOOLS) $(PREFIX)/sbin
-+ $(BSD_INSTALL_DATA_DIR) $(ACM_CONFIG_DIR)
-+ $(BSD_INSTALL_DATA_DIR) $(ACM_POLICY_DIR)
-+ $(BSD_INSTALL_DATA) policies/$(ACM_SCHEMA) $(ACM_POLICY_DIR)
- for i in $(ACM_EXAMPLES); do \
-- $(INSTALL_DIR) -p $(DESTDIR)$(ACM_POLICY_DIR)/$$i; \
-- $(INSTALL_DATA) -p policies/$$i/$$i-$(ACM_POLICY_SUFFIX) $(DESTDIR)$(ACM_POLICY_DIR)/$$i; \
-- $(INSTALL_DATA) -p policies/$$i/$$i-$(ACM_LABEL_SUFFIX) $(DESTDIR)$(ACM_POLICY_DIR)/$$i; \
-+ $(BSD_INSTALL_DATA_DIR) $(ACM_POLICY_DIR)/$$i; \
-+ $(BSD_INSTALL_DATA) policies/$$i/$$i-$(ACM_POLICY_SUFFIX) $(ACM_POLICY_DIR)/$$i; \
-+ $(BSD_INSTALL_DATA) policies/$$i/$$i-$(ACM_LABEL_SUFFIX) $(ACM_POLICY_DIR)/$$i; \
- done
-- $(INSTALL_DIR) -p $(DESTDIR)$(ACM_SCRIPT_DIR)
-- $(INSTALL_PROG) -p $(ACM_SCRIPTS) $(DESTDIR)$(ACM_SCRIPT_DIR)
-- $(INSTALL_DIR) -p $(DESTDIR)$(ACM_SECGEN_HTMLDIR)
-- $(INSTALL_DATA) -p $(ACM_INST_HTML) $(DESTDIR)$(ACM_SECGEN_HTMLDIR)
-- $(INSTALL_DIR) -p $(DESTDIR)$(ACM_SECGEN_CGIDIR)
-- $(INSTALL_PROG) -p $(ACM_INST_CGI) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
-+ $(BSD_INSTALL_SCRIPT_DIR) $(ACM_SCRIPT_DIR)
-+ $(BSD_INSTALL_SCRIPT) $(ACM_SCRIPTS) $(ACM_SCRIPT_DIR)
-+ $(BSD_INSTALL_DATA_DIR) $(ACM_SECGEN_HTMLDIR)
-+ $(BSD_INSTALL_DATA) $(ACM_INST_HTML) $(ACM_SECGEN_HTMLDIR)
-+ $(BSD_INSTALL_PROGRAM_DIR) $(ACM_SECGEN_CGIDIR)
-+ $(BSD_INSTALL_PROGRAM) $(ACM_INST_CGI) $(ACM_SECGEN_CGIDIR)
- ifndef XEN_PYTHON_NATIVE_INSTALL
-- python python/setup.py install --home="$(DESTDIR)/usr"
-+ python python/setup.py install --home="$(PREFIX)"
- else
-- python python/setup.py install --root="$(DESTDIR)"
-+ python python/setup.py install --root="$(PREFIX)"
- endif
- else
- all:
+ #define PERROR(_m, _a...) \
+ fprintf(stderr, "ERROR: " _m " (%d = %s)\n" , ## _a , \
diff --git a/sysutils/xentools30/patches/patch-bf b/sysutils/xentools30/patches/patch-bf
index ca811c04522..11fbe2a205b 100644
--- a/sysutils/xentools30/patches/patch-bf
+++ b/sysutils/xentools30/patches/patch-bf
@@ -1,127 +1,13 @@
-$NetBSD: patch-bf,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-bf,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- security/example.txt.orig 2006-01-31 17:09:21.000000000 +0100
-+++ security/example.txt
-@@ -22,10 +22,10 @@ Other policies work similarly. Feedback
- Successful execution should print:
-
- [root@laptopxn security]# xensec_xml2bin chwall_ste
-- Validating label file /etc/xen/acm-security/policies/chwall_ste/chwall_ste-security_label_template.xml...
-- XML Schema /etc/xen/acm-security/policies/security_policy.xsd valid.
-- Validating policy file /etc/xen/acm-security/policies/chwall_ste/chwall_ste-security_policy.xml...
-- XML Schema /etc/xen/acm-security/policies/security_policy.xsd valid.
-+ Validating label file @XENDCONFDIR@/acm-security/policies/chwall_ste/chwall_ste-security_label_template.xml...
-+ XML Schema @XENDCONFDIR@/acm-security/policies/security_policy.xsd valid.
-+ Validating policy file @XENDCONFDIR@/acm-security/policies/chwall_ste/chwall_ste-security_policy.xml...
-+ XML Schema @XENDCONFDIR@/acm-security/policies/security_policy.xsd valid.
- Creating ssid mappings ...
- Creating label mappings ...
- Max chwall labels: 7
-@@ -35,14 +35,14 @@ Successful execution should print:
- Max ste-types: 6
- Max ste-ssids: 10
-
--By default, the tool looks in directory /etc/xen/acm-security/policies
-+By default, the tool looks in directory @XENDCONFDIR@/acm-security/policies
- for a directory that matches the policy name (i.e. chwall_ste) to find
- the label and policy files.
--The '-d' option can be used to override the /etc/xen/acm-security/policies
-+The '-d' option can be used to override the @XENDCONFDIR@/acm-security/policies
- directory, for example if running the tool in the Xen security tool build
- directory.
-
--The default policy directory structure under /etc/xen/acm-security (and
-+The default policy directory structure under @XENDCONFDIR@/acm-security (and
- the Xen security tool build directory - tools/security) looks like:
-
- policies
-@@ -71,7 +71,7 @@ definitions that group types together an
- users.
-
- After executing the above xensec_xml2bin command, you will find 2 new
--files in the /etc/xen/acm-security/policies/chwall_ste sub-directory:
-+files in the @XENDCONFDIR@/acm-security/policies/chwall_ste sub-directory:
-
- chwall_ste.map ... this file includes the mapping
- of names from the xml files into their binary code representation.
-@@ -92,11 +92,11 @@ To activate the policy from the command
- currently established policy is the minimal boot-policy that is
- hard-coded into the hypervisor):
-
--# xensec_tool loadpolicy /etc/xen/acm-security/policies/chwall_ste/chwall_ste.bin
-+# xensec_tool loadpolicy @XENDCONFDIR@/acm-security/policies/chwall_ste/chwall_ste.bin
-
- To activate the policy at next reboot:
-
--# cp /etc/xen/acm-security/policies/chwall_ste/chwall_ste.bin /boot
-+# cp @XENDCONFDIR@/acm-security/policies/chwall_ste/chwall_ste.bin /boot
-
- Add a module line to your /boot/grub/grub.conf Xen entry.
- My boot entry with chwall_ste enabled looks like this:
-@@ -134,12 +134,12 @@ assign labels to user domains.
-
- To show available labels for the chwall_ste policy:
-
--# /etc/xen/acm-security/scripts/setlabel.sh -l
-+# @XENDCONFDIR@/acm-security/scripts/setlabel.sh -l
-
- lists all available labels. For the default chwall_ste it should print
- the following:
-
-- [root@laptopxn security]# /etc/xen/acm-security/scripts/setlabel.sh -l chwall_ste
-+ [root@laptopxn security]# @XENDCONFDIR@/acm-security/scripts/setlabel.sh -l chwall_ste
- The following labels are available:
- dom_SystemManagement
- dom_HomeBanking
-@@ -162,7 +162,7 @@ since only those are used at this time.
-
- If you would like to assign the dom_HomeBanking label to one of your
- user domains (which you hopefully keep clean), look at the hypothetical
--domain configuration contained in /etc/xen/homebanking.xm:
-+domain configuration contained in @XENDCONFDIR@/homebanking.xm:
-
- #------HOMEBANKING---------
- kernel = "/boot/vmlinuz-2.6.12-xenU"
-@@ -177,7 +177,7 @@ domain configuration contained in /etc/x
-
- Now we label this domain
-
--[root@laptopxn security]# /etc/xen/acm-securit/scripts/setlabel.sh /etc/xen/homebanking.xm dom_HomeBanking chwall_ste
-+[root@laptopxn security]# @XENDCONFDIR@/acm-securit/scripts/setlabel.sh @XENDCONFDIR@/homebanking.xm dom_HomeBanking chwall_ste
- Mapped label 'dom_HomeBanking' to ssidref '0x00020002'.
-
- The domain configuration my look now like:
-@@ -259,14 +259,14 @@ a) the policy definition (types etc.) fi
- b) the label template definition (labels etc.) file
-
- If your policy name is "mypolicy", you need to create a
--subdirectory mypolicy in /etc/xen/acm-security/policies.
-+subdirectory mypolicy in @XENDCONFDIR@/acm-security/policies.
-
- Then you create
--/etc/xen/acm-security/policies/mypolicy/mypolicy-security_policy.xml and
--/etc/xen/acm-security/policies/mypolicy/mypolicy-security_label_template.xml.
-+@XENDCONFDIR@/acm-security/policies/mypolicy/mypolicy-security_policy.xml and
-+@XENDCONFDIR@/acm-security/policies/mypolicy/mypolicy-security_label_template.xml.
-
- You need to keep to the schema as defined in
--/etc/xen/acm-security/security_policy.xsd since the translation tool
-+@XENDCONFDIR@/acm-security/security_policy.xsd since the translation tool
- xensec_xml2bin is written against this schema.
-
- If you keep to the security policy schema, then you can use all the
-@@ -333,7 +333,7 @@ files:
- the policy name that you choose to use.
-
- To get a feel for the tool, you could use one of the example policy definition
-- files from /etc/xen/acm-security/policies as input.
-+ files from @XENDCONFDIR@/acm-security/policies as input.
-
-
- Security Policy Labeling:
-@@ -379,4 +379,4 @@ files:
- naming conventions based on the policy name that you choose to use.
-
- To get a feel for the tool, you could use one of the example policy definition
-- and label template definition files from /etc/xen/acm-security/policies as input.
-+ and label template definition files from @XENDCONFDIR@/acm-security/policies as input.
+--- python/xen/xm/addlabel.py.orig 2006-10-15 14:22:03.000000000 +0200
++++ python/xen/xm/addlabel.py 2006-10-19 21:51:26.000000000 +0200
+@@ -133,7 +133,7 @@
+ if argv[2].lower() == "dom":
+ configfile = argv[3]
+ if configfile[0] != '/':
+- for prefix in [".", "/etc/xen"]:
++ for prefix in [".", "@XENDCONFDIR@"]:
+ configfile = prefix + "/" + configfile
+ if os.path.isfile(configfile):
+ break
diff --git a/sysutils/xentools30/patches/patch-bg b/sysutils/xentools30/patches/patch-bg
index ef122e42628..535c9af2c16 100644
--- a/sysutils/xentools30/patches/patch-bg
+++ b/sysutils/xentools30/patches/patch-bg
@@ -1,16 +1,13 @@
-$NetBSD: patch-bg,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-bg,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- security/get_decision.c.orig 2006-01-31 17:09:21.000000000 +0100
-+++ security/get_decision.c
-@@ -30,7 +30,11 @@
- #include <netinet/in.h>
- #include <xen/acm.h>
- #include <xen/acm_ops.h>
-+#ifdef __NetBSD__
-+#include <xen/NetBSD/xenio.h>
-+#else
- #include <xen/linux/privcmd.h>
-+#endif
-
- #define PERROR(_m, _a...) \
- fprintf(stderr, "ERROR: " _m " (%d = %s)\n" , ## _a , \
+--- python/xen/xm/getlabel.py.orig 2006-10-15 14:22:03.000000000 +0200
++++ python/xen/xm/getlabel.py 2006-10-19 21:52:18.000000000 +0200
+@@ -55,7 +55,7 @@
+ if configfile[0] == '/':
+ fd = open(configfile, "rb")
+ else:
+- for prefix in [".", "/etc/xen"]:
++ for prefix in [".", "@XENDCONFDIR@"]:
+ abs_file = prefix + "/" + configfile
+ if os.path.isfile(abs_file):
+ fd = open(abs_file, "rb")
diff --git a/sysutils/xentools30/patches/patch-bh b/sysutils/xentools30/patches/patch-bh
index f53e1f2d544..9918d9192d3 100644
--- a/sysutils/xentools30/patches/patch-bh
+++ b/sysutils/xentools30/patches/patch-bh
@@ -1,13 +1,13 @@
-$NetBSD: patch-bh,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-bh,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- security/getlabel.sh.orig 2006-01-31 17:09:21.000000000 +0100
-+++ security/getlabel.sh
-@@ -49,7 +49,7 @@ policy name : the name of the policy, i.
- entry of the running system is tried to be read
- and the policy name determined from there.
- policy dir : the directory where the <policy name> policy is located
-- The default location is '/etc/xen/acm-security/policies'
-+ The default location is '@XENDCONFDIR@/acm-security/policies'
- ssidref : an ssidref in hex or decimal format, i.e., '0x00010002'
- or '65538'
- domid : id of the domain, i.e., '1'; Use numbers from the 2nd
+--- python/xen/xm/rmlabel.py.orig 2006-10-15 14:22:03.000000000 +0200
++++ python/xen/xm/rmlabel.py 2006-10-19 21:52:58.000000000 +0200
+@@ -60,7 +60,7 @@
+ file = configfile
+ fd = open(file, "rb")
+ else:
+- for prefix in [".", "/etc/xen"]:
++ for prefix in [".", "@XENDCONFDIR@"]:
+ file = prefix + "/" + configfile
+ if os.path.isfile(file):
+ fd = open(file, "rb")
diff --git a/sysutils/xentools30/patches/patch-bi b/sysutils/xentools30/patches/patch-bi
deleted file mode 100644
index b68949baddc..00000000000
--- a/sysutils/xentools30/patches/patch-bi
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bi,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- security/labelfuncs.sh.orig 2006-01-31 17:09:21.000000000 +0100
-+++ security/labelfuncs.sh
-@@ -18,7 +18,7 @@
-
-
- #Some global variables for tools using this module
--ACM_DEFAULT_ROOT="/etc/xen/acm-security"
-+ACM_DEFAULT_ROOT="@XENDCONFDIR@/acm-security"
-
- # Set the policy and policydir variables
- # Parameters:
diff --git a/sysutils/xentools30/patches/patch-bj b/sysutils/xentools30/patches/patch-bj
deleted file mode 100644
index d8eaac41790..00000000000
--- a/sysutils/xentools30/patches/patch-bj
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-bj,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- security/secpol_tool.c.orig 2006-01-31 17:09:21.000000000 +0100
-+++ security/secpol_tool.c
-@@ -36,7 +36,11 @@
- #include <stdint.h>
- #include <xen/acm.h>
- #include <xen/acm_ops.h>
-+#ifdef __NetBSD__
-+#include <xen/NetBSD/xenio.h>
-+#else
- #include <xen/linux/privcmd.h>
-+#endif
-
- #define PERROR(_m, _a...) \
- fprintf(stderr, "ERROR: " _m " (%d = %s)\n" , ## _a , \
diff --git a/sysutils/xentools30/patches/patch-bk b/sysutils/xentools30/patches/patch-bk
deleted file mode 100644
index 2b191ef49fc..00000000000
--- a/sysutils/xentools30/patches/patch-bk
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bk,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- security/secpol_xml2bin.h.orig 2006-01-31 17:09:21.000000000 +0100
-+++ security/secpol_xml2bin.h
-@@ -12,7 +12,7 @@
- * License.
- *
- */
--#define POLICY_DIR "/etc/xen/acm-security/policies/"
-+#define POLICY_DIR "@XENDCONFDIR@/acm-security/policies/"
- #define POLICY_EXTENSION "-security_policy.xml"
- #define LABEL_EXTENSION "-security_label_template.xml"
- #define BINARY_EXTENSION ".bin"
diff --git a/sysutils/xentools30/patches/patch-bl b/sysutils/xentools30/patches/patch-bl
deleted file mode 100644
index 4b2a878b4c0..00000000000
--- a/sysutils/xentools30/patches/patch-bl
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bl,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- security/setlabel.sh.orig 2006-01-31 17:09:21.000000000 +0100
-+++ security/setlabel.sh
-@@ -55,7 +55,7 @@ policy name : the name of the policy, i.
- If the policy name is omitted, it is attempted
- to find the current policy's name in grub.conf.
- policy dir : the directory where the <policy name> policy is located
-- The default location is '/etc/xen/acm-security/policies'
-+ The default location is '@XENDCONFDIR@/acm-security/policies'
- "
- }
-
diff --git a/sysutils/xentools30/patches/patch-bm b/sysutils/xentools30/patches/patch-bm
index 9510ed1788d..58a951c1da4 100644
--- a/sysutils/xentools30/patches/patch-bm
+++ b/sysutils/xentools30/patches/patch-bm
@@ -1,10 +1,10 @@
-$NetBSD: patch-bm,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-bm,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- vnet/libxutil/Makefile.orig 2006-01-31 17:09:21.000000000 +0100
-+++ vnet/libxutil/Makefile
-@@ -69,11 +69,10 @@ check-for-zlib:
- fi
+--- vnet/libxutil/Makefile.orig 2006-10-16 22:30:53.000000000 +0200
++++ vnet/libxutil/Makefile 2006-10-16 22:31:48.000000000 +0200
+@@ -76,11 +76,10 @@
+ .PHONY: install
install: build
- [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
- $(INSTALL_PROG) libxutil.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
@@ -16,5 +16,5 @@ $NetBSD: patch-bm,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+ ln -sf libxutil.so.$(MAJOR).$(MINOR) $(PREFIX)/lib/libxutil.so.$(MAJOR)
+ ln -sf libxutil.so.$(MAJOR) $(PREFIX)/lib/libxutil.so
+ .PHONY: clean
clean:
- -@$(RM) *.a *.so* *.o *.opic *.rpm
diff --git a/sysutils/xentools30/patches/patch-bn b/sysutils/xentools30/patches/patch-bn
deleted file mode 100644
index 0b552f254d2..00000000000
--- a/sysutils/xentools30/patches/patch-bn
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-bn,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- vtpm_manager/manager/Makefile.orig 2006-01-31 17:09:22.000000000 +0100
-+++ vtpm_manager/manager/Makefile
-@@ -8,10 +8,10 @@ all: build
- build: $(BIN)
-
- install: build
-- if [ ! -d "$(DESTDIR)/var/vtpm/fifos" ]; \
-- then mkdir -p $(DESTDIR)/var/vtpm/fifos; \
-+ if [ ! -d "/var/vtpm/fifos" ]; \
-+ then mkdir -p /var/vtpm/fifos; \
- fi
-- $(INSTALL_PROG) $(BIN) $(TOOLS_INSTALL_DIR)
-+ $(BSD_INSTALL_PROGRAM) $(BIN) $(PREFIX)/bin
-
- clean:
- rm -f *.a *.so *.o *.rpm $(DEP_FILES)
diff --git a/sysutils/xentools30/patches/patch-bo b/sysutils/xentools30/patches/patch-bo
index 1566165e487..8db5f298cae 100644
--- a/sysutils/xentools30/patches/patch-bo
+++ b/sysutils/xentools30/patches/patch-bo
@@ -1,17 +1,17 @@
-$NetBSD: patch-bo,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-bo,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- xcutils/Makefile.orig 2006-01-31 17:09:22.000000000 +0100
-+++ xcutils/Makefile
-@@ -28,7 +28,7 @@ PROG_DEP = .*.d
+--- xcutils/Makefile.orig 2006-10-16 22:32:32.000000000 +0200
++++ xcutils/Makefile 2006-10-16 22:33:41.000000000 +0200
+@@ -28,7 +28,7 @@
- PROGRAMS = xc_restore xc_save
+ PROGRAMS = xc_restore xc_save readnotes
-LDLIBS = -L$(XEN_LIBXC) -lxenguest -lxenctrl
-+LDLIBS = $(LDFLAGS) -L$(XEN_LIBXC) -lxenguest -lxenctrl
++LDLIBS = $(LDFLAGS) -L$(XEN_LIBXC) -lxenguest -lxenctrl
.PHONY: all
all: build
-@@ -39,9 +39,8 @@ $(PROGRAMS): %: %.o
+@@ -41,9 +41,8 @@
.PHONY: install
install: build
@@ -22,4 +22,4 @@ $NetBSD: patch-bo,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+ $(BSD_INSTALL_PROGRAM) $(PROGRAMS) $(PREFIX)/bin
- clean:
+ .PHONY: clean
diff --git a/sysutils/xentools30/patches/patch-bp b/sysutils/xentools30/patches/patch-bp
deleted file mode 100644
index 648c7b61c96..00000000000
--- a/sysutils/xentools30/patches/patch-bp
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-bp,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- xenmon/Makefile.orig 2006-01-31 17:09:22.000000000 +0100
-+++ xenmon/Makefile
-@@ -33,10 +33,10 @@ all: build
- build: $(BIN)
-
- install: xenbaked setmask
-- [ -d $(DESTDIR)$(sbindir) ] || $(INSTALL_DIR) $(DESTDIR)$(sbindir)
-- $(INSTALL_PROG) xenbaked $(DESTDIR)$(sbindir)/xenbaked
-- $(INSTALL_PROG) setmask $(DESTDIR)$(sbindir)/setmask
-- $(INSTALL_PROG) xenmon.py $(DESTDIR)$(sbindir)/xenmon.py
-+ $(BSD_INSTALL_PROGRAM_DIR) $(PREFIX)/sbin
-+ $(BSD_INSTALL_PROGRAM) xenbaked $(PREFIX)/sbin
-+ $(BSD_INSTALL_PROGRAM) setmask $(PREFIX)/sbin
-+ $(BSD_INSTALL_PROGRAM) xenmon.py $(PREFIX)/sbin
-
- clean:
- rm -f $(BIN)
diff --git a/sysutils/xentools30/patches/patch-bq b/sysutils/xentools30/patches/patch-bq
deleted file mode 100644
index 8090336dcbf..00000000000
--- a/sysutils/xentools30/patches/patch-bq
+++ /dev/null
@@ -1,62 +0,0 @@
-$NetBSD: patch-bq,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- xenstat/libxenstat/src/xen-interface.c.orig 2006-04-13 19:48:39.000000000 +0200
-+++ xenstat/libxenstat/src/xen-interface.c 2006-07-01 23:17:50.000000000 +0200
-@@ -23,7 +23,13 @@
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
-+#include <errno.h>
-+#ifdef __NetBSD__
-+#include <xen/NetBSD/xenio.h>
-+#else
-+#error linux
- #include <xen/linux/privcmd.h>
-+#endif
-
- struct xi_handle {
- int fd;
-@@ -39,9 +45,9 @@
- if (handle == NULL)
- return NULL;
-
-- handle->fd = open("/proc/xen/privcmd", O_RDWR);
-+ handle->fd = open("/kern/xen/privcmd", O_RDWR);
- if (handle->fd < 0) {
-- perror("Couldn't open /proc/xen/privcmd");
-+ perror("Couldn't open /kern/xen/privcmd");
- free(handle);
- return NULL;
- }
-@@ -78,7 +84,10 @@
- privcmd.arg[0] = (unsigned long)XENVER_version;
- privcmd.arg[1] = 0;
-
-- *vnum = ioctl(handle->fd, IOCTL_PRIVCMD_HYPERCALL, &privcmd);
-+ if (ioctl(handle->fd, IOCTL_PRIVCMD_HYPERCALL, &privcmd) == 0)
-+ *vnum = 0;
-+ else
-+ *vnum = -errno;
- if (*vnum < 0) {
- perror("Hypercall failed");
- ret = -1;
-@@ -88,7 +97,8 @@
- privcmd.arg[0] = (unsigned long)XENVER_extraversion;
- privcmd.arg[1] = (unsigned long)ver;
-
-- if (ioctl(handle->fd, IOCTL_PRIVCMD_HYPERCALL, &privcmd) < 0) {
-+ if (ioctl(handle->fd, IOCTL_PRIVCMD_HYPERCALL, &privcmd) < 0 &&
-+ errno >= 0) {
- perror("Hypercall failed");
- ret = -1;
- }
-@@ -123,7 +133,8 @@
- return -1;
- }
-
-- if (ioctl( handle->fd, IOCTL_PRIVCMD_HYPERCALL, &privcmd) < 0) {
-+ if (ioctl( handle->fd, IOCTL_PRIVCMD_HYPERCALL, &privcmd) < 0 &&
-+ errno >= 0) {
- perror("Hypercall failed");
- ret = -1;
- }
diff --git a/sysutils/xentools30/patches/patch-br b/sysutils/xentools30/patches/patch-br
index c2de32eb78a..76fb9bcabad 100644
--- a/sysutils/xentools30/patches/patch-br
+++ b/sysutils/xentools30/patches/patch-br
@@ -1,10 +1,10 @@
-$NetBSD: patch-br,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-br,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- xenstat/xentop/Makefile.orig 2006-01-31 17:09:22.000000000 +0100
-+++ xenstat/xentop/Makefile
-@@ -35,8 +35,8 @@ all: xentop
- xentop: xentop.o
+--- 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 @@
+ .PHONY: install
install: xentop xentop.1
- $(INSTALL_PROG) xentop $(DESTDIR)$(sbindir)/xentop
- $(INSTALL_DATA) xentop.1 $(DESTDIR)$(man1dir)/xentop.1
diff --git a/sysutils/xentools30/patches/patch-bs b/sysutils/xentools30/patches/patch-bs
index 0c9cb2a3d99..201699c26a0 100644
--- a/sysutils/xentools30/patches/patch-bs
+++ b/sysutils/xentools30/patches/patch-bs
@@ -1,48 +1,57 @@
-$NetBSD: patch-bs,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-bs,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- xenstore/Makefile.orig 2006-04-10 00:05:54.000000000 +0200
-+++ xenstore/Makefile 2006-05-05 21:54:15.000000000 +0200
-@@ -30,30 +30,30 @@
- all: libxenstore.so xenstored $(CLIENTS) xs_tdb_dump xenstore-control xenstore-ls
+--- 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
+
+ XENSTORED_Linux = xenstored_linux.o
++XENSTORED_NetBSD = xenstored_netbsd.o
+
+ XENSTORED_OBJS += $(XENSTORED_$(OS))
+
+@@ -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 $@
++ $(LINK.o) $^ $(LOADLIBES) $(LDFLAGS) $(LDLIBS) -L. -lxenstore -o $@
+ .PHONY: testcode
testcode: xs_test xenstored_test xs_random
- xenstored: xenstored_core.o xenstored_watch.o xenstored_domain.o xenstored_transaction.o xs_lib.o talloc.o utils.o tdb.o hashtable.o
+ xenstored: $(XENSTORED_OBJS)
- $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -lxenctrl -o $@
-+ $(LINK.o) $^ $(LOADLIBES) $(LDFLAGS) $(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 $@
++ $(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 $@
++ $(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 $@
++ $(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 $@
++ $(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 $@
++ $(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
-@@ -137,19 +137,18 @@
- cd .. && tar -c -j -v -h -f xenstore.tar.bz2 xenstore/
+@@ -172,19 +173,17 @@
+ .PHONY: install
install: all
- $(INSTALL_DIR) -p $(DESTDIR)/var/run/xenstored
- $(INSTALL_DIR) -p $(DESTDIR)/var/lib/xenstored
@@ -54,7 +63,10 @@ $NetBSD: patch-bs,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
- $(INSTALL_PROG) xenstore-control $(DESTDIR)/usr/bin
- $(INSTALL_PROG) xenstore-ls $(DESTDIR)/usr/bin
- $(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
-- $(INSTALL_DATA) libxenstore.so $(DESTDIR)/usr/$(LIBDIR)
+- $(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
+- ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so.$(MAJOR)
+- ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so
+- $(INSTALL_DATA) libxenstore.a $(DESTDIR)/usr/$(LIBDIR)
- $(INSTALL_DATA) xs.h $(DESTDIR)/usr/include
- $(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include
+ $(BSD_INSTALL_PROGRAM_DIR) $(PREFIX)/bin
@@ -65,10 +77,9 @@ $NetBSD: patch-bs,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+ $(BSD_INSTALL_PROGRAM) xenstore-control $(PREFIX)/bin
+ $(BSD_INSTALL_PROGRAM) xenstore-ls $(PREFIX)/bin
+ $(BSD_INSTALL_LIB_DIR) $(PREFIX)/lib
-+ $(BSD_INSTALL_LIB) libxenstore.so $(PREFIX)/lib
++ $(BSD_INSTALL_LIB) libxenstore.so.$(MAJOR).$(MINOR) $(PREFIX)/lib
++ ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(PREFIX)/lib/libxenstore.so.$(MAJOR)
++ ln -sf libxenstore.so.$(MAJOR) $(PREFIX)/lib/libxenstore.so
++ $(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 d91582cde13..542cb9ede71 100644
--- a/sysutils/xentools30/patches/patch-bt
+++ b/sysutils/xentools30/patches/patch-bt
@@ -1,91 +1,74 @@
-$NetBSD: patch-bt,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-bt,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- xenstore/xenstored_domain.c.orig 2006-01-31 17:09:22.000000000 +0100
-+++ xenstore/xenstored_domain.c
-@@ -18,7 +18,9 @@
- */
-
- #include <stdio.h>
-+#ifndef __NetBSD__
- #include <linux/ioctl.h>
-+#endif
- #include <sys/ioctl.h>
- #include <sys/mman.h>
- #include <unistd.h>
-@@ -38,7 +40,11 @@
- #include "xenstored_test.h"
-
- #include <xenctrl.h>
-+#ifdef __NetBSD__
-+#include <xen/NetBSD/xenio3.h>
-+#else
- #include <xen/linux/evtchn.h>
-+#endif
-
- static int *xc_handle;
- static evtchn_port_t virq_port;
-@@ -283,7 +289,11 @@ static struct domain *new_domain(void *c
- rc = ioctl(eventchn_fd, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind);
- if (rc == -1)
- return NULL;
-+#ifdef __NetBSD__
-+ domain->port = bind.port;
-+#else
- domain->port = rc;
-+#endif
-
- domain->conn = new_connection(writechn, readchn);
- domain->conn->domain = domain;
-@@ -503,8 +513,11 @@ outfd:
- }
-
-
--
-+#ifdef __NetBSD__
-+#define EVTCHN_DEV_NAME "/dev/xenevt"
-+#else
- #define EVTCHN_DEV_NAME "/dev/xen/evtchn"
-+#endif
- #define EVTCHN_DEV_MAJOR 10
- #define EVTCHN_DEV_MINOR 201
-
-@@ -512,7 +525,9 @@ outfd:
- /* Returns the event channel handle. */
- int domain_init(void)
- {
-+#ifndef __NetBSD__
- struct stat st;
-+#endif
- struct ioctl_evtchn_bind_virq bind;
- int rc;
-
-@@ -530,6 +545,9 @@ int domain_init(void)
- eventchn_fd = fake_open_eventchn();
- (void)&st;
- #else
-+#ifdef __NetBSD__
-+ eventchn_fd = open(EVTCHN_DEV_NAME, O_NONBLOCK|O_RDWR);
-+#else
- /* Make sure any existing device file links to correct device. */
- if ((lstat(EVTCHN_DEV_NAME, &st) != 0) || !S_ISCHR(st.st_mode) ||
- (st.st_rdev != makedev(EVTCHN_DEV_MAJOR, EVTCHN_DEV_MINOR)))
-@@ -545,6 +563,7 @@ int domain_init(void)
- goto reopen;
- return -errno;
- }
-+#endif /* !__NetBSD__ */
- #endif
- if (eventchn_fd < 0)
- barf_perror("Failed to open evtchn device");
-@@ -556,7 +575,11 @@ int domain_init(void)
- rc = ioctl(eventchn_fd, IOCTL_EVTCHN_BIND_VIRQ, &bind);
- if (rc == -1)
- barf_perror("Failed to bind to domain exception virq port");
-+#ifdef __NetBSD__
-+ virq_port = bind.port;
-+#else
- virq_port = rc;
-+#endif
-
- return eventchn_fd;
- }
+--- /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 @@
++/******************************************************************************
++ *
++ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
++ *
++ * Copyright (C) 2005 Rusty Russell IBM Corporation
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation, version 2 of the
++ * License.
++ */
++
++#include <fcntl.h>
++#include <unistd.h>
++#include <stdlib.h>
++#include <sys/mman.h>
++
++#include "xenstored_core.h"
++
++#define XENSTORED_PROC_KVA "/dev/xsd_kva"
++#define XENSTORED_PROC_PORT "/kern/xen/xsd_port"
++
++evtchn_port_t xenbus_evtchn(void)
++{
++ int fd;
++ int rc;
++ evtchn_port_t port;
++ char str[20];
++
++ fd = open(XENSTORED_PROC_PORT, O_RDONLY);
++ if (fd == -1)
++ return -1;
++
++ rc = read(fd, str, sizeof(str));
++ if (rc == -1)
++ {
++ int err = errno;
++ close(fd);
++ errno = err;
++ return -1;
++ }
++
++ str[rc] = '\0';
++ port = strtoul(str, NULL, 0);
++
++ close(fd);
++ return port;
++}
++
++void *xenbus_map(void)
++{
++ int fd;
++ void *addr;
++
++ fd = open(XENSTORED_PROC_KVA, O_RDWR);
++ if (fd == -1)
++ return NULL;
++
++ addr = mmap(NULL, getpagesize(), PROT_READ|PROT_WRITE,
++ MAP_SHARED, fd, 0);
++
++ if (addr == MAP_FAILED)
++ addr = NULL;
++
++ close(fd);
++
++ return addr;
++}
diff --git a/sysutils/xentools30/patches/patch-bu b/sysutils/xentools30/patches/patch-bu
deleted file mode 100644
index 24a97a1d6a5..00000000000
--- a/sysutils/xentools30/patches/patch-bu
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-bu,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- xentrace/Makefile.orig 2006-01-31 17:09:22.000000000 +0100
-+++ xentrace/Makefile
-@@ -32,20 +32,15 @@ all: build
- build: $(BIN) $(LIBBIN)
-
- install: build
-- [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
-- [ -z "$(LIBBIN)" ] || [ -d $(DESTDIR)/usr/$(LIBDIR)/xen/bin ] || \
-- $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)/xen/bin
-- [ -d $(DESTDIR)/usr/share/man/man1 ] || \
-- $(INSTALL_DIR) $(DESTDIR)/usr/share/man/man1
-- [ -d $(DESTDIR)/usr/share/man/man8 ] || \
-- $(INSTALL_DIR) $(DESTDIR)/usr/share/man/man8
-- $(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)/usr/bin
-- [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)/usr/$(LIBDIR)/xen/bin
-- $(INSTALL_DATA) $(MAN1) $(DESTDIR)/usr/share/man/man1
-- $(INSTALL_DATA) $(MAN8) $(DESTDIR)/usr/share/man/man8
-+ $(BSD_INSTALL_PROGRAM_DIR) $(PREFIX)/bin
-+ $(BSD_INSTALL_PROGRAM_DIR) $(PREFIX)/libexec
-+ $(BSD_INSTALL_PROGRAM) $(BIN) $(SCRIPTS) $(PREFIX)/bin
-+ $(BSD_INSTALL_PROGRAM) $(LIBBIN) $(PREFIX)/libexec
-+ $(BSD_INSTALL_DATA) $(MAN1) $(DESTDIR)/man/man1
-+ $(BSD_INSTALL_DATA) $(MAN8) $(DESTDIR)/man/man8
-
- clean:
- $(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN)
-
- %: %.c $(HDRS) Makefile
-- $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxenctrl
-+ $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -L$(XEN_LIBXC) -lxenctrl
diff --git a/sysutils/xentools30/patches/patch-bv b/sysutils/xentools30/patches/patch-bv
index 6c1f8a27216..f246fe74834 100644
--- a/sysutils/xentools30/patches/patch-bv
+++ b/sysutils/xentools30/patches/patch-bv
@@ -1,30 +1,33 @@
-$NetBSD: patch-bv,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-bv,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- libxc/xenctrl.h.orig 2006-04-10 00:05:53.000000000 +0200
-+++ libxc/xenctrl.h 2006-05-05 21:55:22.000000000 +0200
-@@ -10,7 +10,9 @@
- #define XENCTRL_H
+--- 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/dom0_ops.h>
- #include <xen/version.h>
-@@ -94,6 +96,7 @@
+ #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,
-@@ -101,6 +104,7 @@
- long addr,
+ 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,
+ unsigned long domfd,
+ int cpu,
diff --git a/sysutils/xentools30/patches/patch-bw b/sysutils/xentools30/patches/patch-bw
index 4c2b8fcdb39..3881c749e77 100644
--- a/sysutils/xentools30/patches/patch-bw
+++ b/sysutils/xentools30/patches/patch-bw
@@ -1,7 +1,7 @@
-$NetBSD: patch-bw,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-bw,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- xenstore/list.h.orig 2006-01-31 17:09:22.000000000 +0100
-+++ xenstore/list.h
+--- xenstore/list.h.orig 2006-10-16 22:51:42.000000000 +0200
++++ xenstore/list.h 2006-10-16 22:51:57.000000000 +0200
@@ -3,6 +3,10 @@
/* Taken from Linux kernel code, but de-kernelized for userspace. */
#include <stddef.h>
diff --git a/sysutils/xentools30/patches/patch-bx b/sysutils/xentools30/patches/patch-bx
deleted file mode 100644
index 5bf846badeb..00000000000
--- a/sysutils/xentools30/patches/patch-bx
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-bx,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- xenstore/xenstored_proc.h.orig 2006-05-06 18:43:30.000000000 +0200
-+++ xenstore/xenstored_proc.h 2006-05-06 18:44:08.000000000 +0200
-@@ -20,7 +20,11 @@
- #ifndef _XENSTORED_PROC_H
- #define _XENSTORED_PROC_H
-
-+#ifdef __NetBSD__
-+#define XENSTORED_PROC_KVA "/dev/xsd_kva"
-+#else
- #define XENSTORED_PROC_KVA "/proc/xen/xsd_kva"
-+#endif
- #define XENSTORED_PROC_PORT "/proc/xen/xsd_port"
-
-
diff --git a/sysutils/xentools30/patches/patch-by b/sysutils/xentools30/patches/patch-by
deleted file mode 100644
index 8f4ecf9145c..00000000000
--- a/sysutils/xentools30/patches/patch-by
+++ /dev/null
@@ -1,39 +0,0 @@
-$NetBSD: patch-by,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- misc/mbootpack/mbootpack.h.orig 2006-01-31 17:09:21.000000000 +0100
-+++ misc/mbootpack/mbootpack.h
-@@ -32,7 +32,25 @@
- #undef NDEBUG
- #include <stdio.h>
-
--#include <endian.h>
-+#ifdef __NetBSD__
-+#include <sys/endian.h>
-+#if _BYTE_ORDER == _LITTLE_ENDIAN
-+#define eswap(x) (x)
-+#else
-+#define eswap(x) \
-+ ({ \
-+ typeof(x) y = (x); \
-+ switch(sizeof(y)) \
-+ { \
-+ case 2: y = bswap_16(y); break; \
-+ case 4: y = bswap_32(y); break; \
-+ case 8: y = bswap_64(y); break; \
-+ } \
-+ y; \
-+ })
-+#endif
-+#else /* __NetBSD__ */
-+#include </endian.h>
- #include <byteswap.h>
- #if __BYTE_ORDER == __LITTLE_ENDIAN
- #define eswap(x) (x)
-@@ -49,6 +67,7 @@
- y; \
- })
- #endif
-+#endif /* !__NetBSD */
-
- /* Flags */
- extern int quiet;
diff --git a/sysutils/xentools30/patches/patch-bz b/sysutils/xentools30/patches/patch-bz
deleted file mode 100644
index 2757ab69be2..00000000000
--- a/sysutils/xentools30/patches/patch-bz
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-bz,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- misc/mbootpack/mbootpack.c.orig 2006-01-31 17:09:21.000000000 +0100
-+++ misc/mbootpack/mbootpack.c
-@@ -42,7 +42,9 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/mman.h>
-+#ifndef __NetBSD__
- #include <asm/page.h>
-+#endif
-
- /* From GNU GRUB */
- #include "mb_header.h"
diff --git a/sysutils/xentools30/patches/patch-ca b/sysutils/xentools30/patches/patch-ca
deleted file mode 100644
index 87478dfa586..00000000000
--- a/sysutils/xentools30/patches/patch-ca
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ca,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- misc/mbootpack/buildimage.c.orig 2006-04-15 20:39:39.000000000 +0200
-+++ misc/mbootpack/buildimage.c
-@@ -38,7 +38,9 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/mman.h>
-+#ifndef __NetBSD__
- #include <asm/page.h>
-+#endif
-
- #include "mbootpack.h"
- #include "mb_header.h"
diff --git a/sysutils/xentools30/patches/patch-cb b/sysutils/xentools30/patches/patch-cb
index 311f33d64b4..53dc2090fc6 100644
--- a/sysutils/xentools30/patches/patch-cb
+++ b/sysutils/xentools30/patches/patch-cb
@@ -1,7 +1,7 @@
-$NetBSD: patch-cb,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-cb,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- console/daemon/utils.c.orig 2006-01-31 17:09:20.000000000 +0100
-+++ console/daemon/utils.c
+--- console/daemon/utils.c.orig 2006-10-16 22:55:37.000000000 +0200
++++ console/daemon/utils.c 2006-10-16 22:55:48.000000000 +0200
@@ -32,6 +32,7 @@
#include <sys/socket.h>
#include <sys/un.h>
diff --git a/sysutils/xentools30/patches/patch-cc b/sysutils/xentools30/patches/patch-cc
index 88f6a8f5cee..8d8991d9f6a 100644
--- a/sysutils/xentools30/patches/patch-cc
+++ b/sysutils/xentools30/patches/patch-cc
@@ -1,8 +1,8 @@
-$NetBSD: patch-cc,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-cc,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- console/client/main.c.orig 2006-04-13 19:48:38.000000000 +0200
-+++ console/client/main.c 2006-05-07 23:19:41.000000000 +0200
-@@ -34,7 +34,10 @@
+--- console/client/main.c.orig 2006-10-16 22:56:01.000000000 +0200
++++ console/client/main.c 2006-10-16 22:57:28.000000000 +0200
+@@ -34,7 +34,11 @@
#include <sys/select.h>
#include <err.h>
#include <errno.h>
@@ -10,14 +10,15 @@ $NetBSD: patch-cc,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
#include <pty.h>
+#endif
+#include <string.h>
++
- #include "xenctrl.h"
#include "xs.h"
-@@ -259,6 +262,7 @@
+
+@@ -253,6 +257,7 @@
free(str_pty);
free(path);
+ init_term(spty, &attr);
init_term(STDIN_FILENO, &attr);
- console_loop(xc_handle, domid, spty);
+ console_loop(spty);
restore_term(STDIN_FILENO, &attr);
diff --git a/sysutils/xentools30/patches/patch-cd b/sysutils/xentools30/patches/patch-cd
index d93c04db497..147205b2d97 100644
--- a/sysutils/xentools30/patches/patch-cd
+++ b/sysutils/xentools30/patches/patch-cd
@@ -1,15 +1,16 @@
-$NetBSD: patch-cd,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-cd,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- python/xen/util/auxbin.py.orig 2006-05-07 21:00:00.000000000 +0200
-+++ python/xen/util/auxbin.py 2006-05-07 21:01:06.000000000 +0200
+--- python/xen/util/auxbin.py.orig 2006-10-16 22:57:51.000000000 +0200
++++ python/xen/util/auxbin.py 2006-10-16 22:58:05.000000000 +0200
@@ -16,8 +16,8 @@
#============================================================================
--LIB_BIN_32 = "/usr/lib/xen/bin"
--LIB_BIN_64 = "/usr/lib64/xen/bin"
-+LIB_BIN_32 = "@PREFIX@/bin"
-+LIB_BIN_64 = "@PREFIX@/bin"
+-LIB_32 = "/usr/lib"
+-LIB_64 = "/usr/lib64"
+-LIB_BIN_SUFFIX = "xen/bin"
++LIB_32 = "@PREFIX@/bin"
++LIB_64 = "@PREFIX@/bin"
++LIB_BIN_SUFFIX = ""
- ## The architectures on which the LIB_BIN_64 directory is used. This
- # deliberately excludes ia64.
+ ## The architectures on which the LIB_64 directory is used. This
diff --git a/sysutils/xentools30/patches/patch-ce b/sysutils/xentools30/patches/patch-ce
deleted file mode 100644
index b5025368caa..00000000000
--- a/sysutils/xentools30/patches/patch-ce
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ce,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
-
---- python/xen/xend/XendBootloader.py.orig 2006-07-01 21:35:24.000000000 +0200
-+++ python/xen/xend/XendBootloader.py 2006-07-01 21:35:57.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-cf b/sysutils/xentools30/patches/patch-cf
index c3648667057..e9194358b29 100644
--- a/sysutils/xentools30/patches/patch-cf
+++ b/sysutils/xentools30/patches/patch-cf
@@ -1,13 +1,9 @@
-$NetBSD: patch-cf,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-cf,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- xenstat/libxenstat/Makefile.orig 2006-07-01 21:47:57.000000000 +0200
-+++ xenstat/libxenstat/Makefile 2006-07-01 21:48:21.000000000 +0200
-@@ -84,10 +84,10 @@
- BINDINGSRC=$(PYSRC) $(PERLSRC)
-
- # The all-bindings target builds all the language bindings
--all-bindings: perl-bindings python-bindings
-+all-bindings: python-bindings
+--- xenstat/libxenstat/Makefile.orig 2006-10-16 22:59:05.000000000 +0200
++++ xenstat/libxenstat/Makefile 2006-10-16 22:59:16.000000000 +0200
+@@ -88,7 +88,7 @@
+ all-bindings: perl-bindings python-bindings
# The install-bindings target installs all the language bindings
-install-bindings: install-perl-bindings install-python-bindings
diff --git a/sysutils/xentools30/patches/patch-cg b/sysutils/xentools30/patches/patch-cg
index 8354b8c3fea..073e5fae635 100644
--- a/sysutils/xentools30/patches/patch-cg
+++ b/sysutils/xentools30/patches/patch-cg
@@ -1,7 +1,7 @@
-$NetBSD: patch-cg,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-cg,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- xenstat/xentop/xentop.c.orig 2006-04-13 19:48:39.000000000 +0200
-+++ xenstat/xentop/xentop.c 2006-07-01 22:12:29.000000000 +0200
+--- xenstat/xentop/xentop.c.orig 2006-10-04 04:28:30.000000000 +0200
++++ xenstat/xentop/xentop.c 2006-10-17 00:16:10.000000000 +0200
@@ -18,7 +18,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -12,11 +12,31 @@ $NetBSD: patch-cg,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
-@@ -27,6 +28,7 @@
+@@ -27,7 +28,11 @@
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
++#ifndef __NetBSD__
+ #include <linux/kdev_t.h>
++#else
+#include <stdarg.h>
++#endif
#include <xenstat.h>
+@@ -895,6 +900,7 @@
+ /* Output all VBD information */
+ void do_vbd(xenstat_domain *domain)
+ {
++#ifdef notyet
+ int i = 0;
+ xenstat_vbd *vbd;
+ unsigned num_vbds = 0;
+@@ -911,6 +917,7 @@
+ xenstat_vbd_rd_reqs(vbd),
+ xenstat_vbd_wr_reqs(vbd));
+ }
++#endif
+ }
+
+ static void top(void)
diff --git a/sysutils/xentools30/patches/patch-ch b/sysutils/xentools30/patches/patch-ch
index aca6107f846..e7fb58617c6 100644
--- a/sysutils/xentools30/patches/patch-ch
+++ b/sysutils/xentools30/patches/patch-ch
@@ -1,8 +1,8 @@
-$NetBSD: patch-ch,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
+$NetBSD: patch-ch,v 1.2 2006/10/19 22:57:13 bouyer Exp $
---- xenstat/libxenstat/src/xenstat.c.orig 2006-04-13 19:48:39.000000000 +0200
-+++ xenstat/libxenstat/src/xenstat.c 2006-07-01 23:20:36.000000000 +0200
-@@ -517,6 +517,8 @@
+--- xenstat/libxenstat/src/xenstat.c.orig 2006-10-04 04:28:30.000000000 +0200
++++ xenstat/libxenstat/src/xenstat.c 2006-10-18 15:43:34.000000000 +0200
+@@ -596,6 +596,8 @@
/* Collect information about networks */
static int xenstat_collect_networks(xenstat_node * node)
{
@@ -11,11 +11,42 @@ $NetBSD: patch-ch,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $
/* Open and validate /proc/net/dev if we haven't already */
if (node->handle->procnetdev == NULL) {
char header[sizeof(PROCNETDEV_HEADER)];
-@@ -592,6 +594,7 @@
- domain->networks[domain->num_networks - 1] = net;
+@@ -675,6 +677,9 @@
}
-+#endif
return 1;
++#else
++ return 1;
++#endif
+ }
+
+ /* Free network information */
+@@ -786,6 +791,7 @@
+ {
+ }
+
++#ifndef __NetBSD__
+ /*
+ * VBD functions
+ */
+@@ -804,10 +810,12 @@
+ ret[num_read] = '\0';
+ return num_read;
+ }
++#endif
+
+ /* Collect information about VBDs */
+ static int xenstat_collect_vbds(xenstat_node * node)
+ {
++#ifndef __NetBSD__
+ struct dirent *dp;
+
+ if (node->handle->sysfsvbd == NULL) {
+@@ -877,6 +885,7 @@
+ domain->vbds[domain->num_vbds - 1] = vbd;
+ }
+
++#endif
+ return 1;
}