summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcegger <cegger>2008-08-07 20:26:56 +0000
committercegger <cegger>2008-08-07 20:26:56 +0000
commit93b1a2eabb21f289976693f088af627ed591f148 (patch)
tree221b9d8cd8bff870c5e8c976d025d27d8abe5246
parent602198990271a41f1a022200e2e799e1c5b3f431 (diff)
downloadpkgsrc-93b1a2eabb21f289976693f088af627ed591f148.tar.gz
Import Xen 3.3.0-rc3
The Xen virtual machine monitor allows running several virtual machines on a single physical machine. The xentools33 package contains the tools to create, destroy and control the virtual machines. The xentools33 package contains the tools for Xen 3.3.x
-rw-r--r--sysutils/xentools33/DESCR5
-rw-r--r--sysutils/xentools33/MESSAGE.NetBSD17
-rw-r--r--sysutils/xentools33/Makefile212
-rw-r--r--sysutils/xentools33/PLIST596
-rw-r--r--sysutils/xentools33/distinfo50
-rw-r--r--sysutils/xentools33/files/blk_netbsd.c39
-rw-r--r--sysutils/xentools33/files/blktapctrl_netbsd.c16
-rw-r--r--sysutils/xentools33/files/block-nbsd88
-rw-r--r--sysutils/xentools33/files/elf_machdep.h41
-rw-r--r--sysutils/xentools33/files/hvm-nbsd68
-rw-r--r--sysutils/xentools33/files/int_types.h73
-rw-r--r--sysutils/xentools33/files/netbsd1-nbsd48
-rwxr-xr-xsysutils/xentools33/files/qemu-ifup-nbsd3
-rw-r--r--sysutils/xentools33/files/vif-bridge-nbsd35
-rwxr-xr-xsysutils/xentools33/files/vif-ip-nbsd33
-rw-r--r--sysutils/xentools33/files/xenbackendd.c319
-rw-r--r--sysutils/xentools33/files/xenbackendd.sh17
-rw-r--r--sysutils/xentools33/files/xend.sh30
-rw-r--r--sysutils/xentools33/files/xendomains.sh134
-rw-r--r--sysutils/xentools33/patches/patch-aa22
-rw-r--r--sysutils/xentools33/patches/patch-ab13
-rw-r--r--sysutils/xentools33/patches/patch-ac23
-rw-r--r--sysutils/xentools33/patches/patch-ad16
-rw-r--r--sysutils/xentools33/patches/patch-ae32
-rw-r--r--sysutils/xentools33/patches/patch-af39
-rw-r--r--sysutils/xentools33/patches/patch-ag28
-rw-r--r--sysutils/xentools33/patches/patch-ah23
-rw-r--r--sysutils/xentools33/patches/patch-ai16
-rw-r--r--sysutils/xentools33/patches/patch-aj58
-rw-r--r--sysutils/xentools33/patches/patch-ba45
-rw-r--r--sysutils/xentools33/patches/patch-bb13
-rw-r--r--sysutils/xentools33/patches/patch-bc22
-rw-r--r--sysutils/xentools33/patches/patch-bd13
-rw-r--r--sysutils/xentools33/patches/patch-be13
-rw-r--r--sysutils/xentools33/patches/patch-bf13
-rw-r--r--sysutils/xentools33/patches/patch-bg15
-rw-r--r--sysutils/xentools33/patches/patch-bh19
-rw-r--r--sysutils/xentools33/patches/patch-bi43
-rw-r--r--sysutils/xentools33/patches/patch-bj56
-rw-r--r--sysutils/xentools33/patches/patch-ca17
-rw-r--r--sysutils/xentools33/patches/patch-cb90
-rw-r--r--sysutils/xentools33/patches/patch-cc47
-rw-r--r--sysutils/xentools33/patches/patch-cd36
-rw-r--r--sysutils/xentools33/patches/patch-ce31
-rw-r--r--sysutils/xentools33/patches/patch-cf12
-rw-r--r--sysutils/xentools33/patches/patch-cg15
-rw-r--r--sysutils/xentools33/patches/patch-da34
-rw-r--r--sysutils/xentools33/patches/patch-db22
-rw-r--r--sysutils/xentools33/patches/patch-dc23
-rw-r--r--sysutils/xentools33/patches/patch-dd15
-rw-r--r--sysutils/xentools33/patches/patch-de104
-rw-r--r--sysutils/xentools33/patches/patch-df51
-rw-r--r--sysutils/xentools33/patches/patch-ea13
-rw-r--r--sysutils/xentools33/patches/patch-eb13
-rw-r--r--sysutils/xentools33/patches/patch-ec13
-rw-r--r--sysutils/xentools33/patches/patch-ed24
-rw-r--r--sysutils/xentools33/patches/patch-ee22
-rw-r--r--sysutils/xentools33/patches/patch-ef17
-rw-r--r--sysutils/xentools33/patches/patch-eg16
-rw-r--r--sysutils/xentools33/patches/patch-fa24
-rw-r--r--sysutils/xentools33/patches/patch-fb36
-rw-r--r--sysutils/xentools33/patches/patch-fc22
-rw-r--r--sysutils/xentools33/patches/patch-fd55
-rw-r--r--sysutils/xentools33/patches/patch-fe29
64 files changed, 3127 insertions, 0 deletions
diff --git a/sysutils/xentools33/DESCR b/sysutils/xentools33/DESCR
new file mode 100644
index 00000000000..ad9eff33b35
--- /dev/null
+++ b/sysutils/xentools33/DESCR
@@ -0,0 +1,5 @@
+The Xen virtual machine monitor allows running several virtual machines
+on a single physical machine. The xentools33 package contains the
+tools to create, destroy and control the virtual machines.
+
+The xentools33 package contains the tools for Xen 3.3.x
diff --git a/sysutils/xentools33/MESSAGE.NetBSD b/sysutils/xentools33/MESSAGE.NetBSD
new file mode 100644
index 00000000000..7ab3a3f757d
--- /dev/null
+++ b/sysutils/xentools33/MESSAGE.NetBSD
@@ -0,0 +1,17 @@
+===========================================================================
+$NetBSD: MESSAGE.NetBSD,v 1.1.1.1 2008/08/07 20:26:56 cegger Exp $
+
+Please ensure that the Xen-specific devices needed by xend(8) exist:
+
+ cd /dev && sh MAKEDEV xen
+
+There are example configuration files for setting up a guest domain in:
+
+ ${EGDIR}/
+
+Please also refer to the the "NetBSD/xen How-To" for more information on
+creating a Xen setup:
+
+ http://www.NetBSD.org/ports/xen/howto.html
+
+===========================================================================
diff --git a/sysutils/xentools33/Makefile b/sysutils/xentools33/Makefile
new file mode 100644
index 00000000000..96cf2f4ec68
--- /dev/null
+++ b/sysutils/xentools33/Makefile
@@ -0,0 +1,212 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/08/07 20:26:56 cegger Exp $
+#
+
+VERSION= 3.3-18261
+DISTNAME= xen-${VERSION}
+PKGNAME= xentools33-${VERSION}
+CATEGORIES= sysutils
+#MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
+MASTER_SITES= http://www.netbsd.org/~cegger/
+EXTRACT_SUFX= .tar.gz
+
+MAINTAINER= cegger@NetBSD.org
+HOMEPAGE= http://xen.org/
+COMMENT= Userland Tools for Xen 3.3.x
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+#DEPENDS+= ${PYPKGPREFIX}-twisted-[0-9]*:../../net/py-twisted
+DEPENDS+= ${PYPKGPREFIX}-readline-[0-9]*:../../devel/py-readline
+
+BUILD_DEPENDS+= dev86-[0-9]*:../../devel/dev86 # needed to build firmware
+
+PKG_SYSCONFSUBDIR= xen
+
+ONLY_FOR_PLATFORM= Linux-2.6*-i386 Linux-2.6*-x86_64
+ONLY_FOR_PLATFORM+= NetBSD-4.99.*-x86_64 NetBSD-4.99.*-i386
+ONLY_FOR_PLATFORM+= NetBSD-[5-9].*-x86_64 NetBSD-[5-9].*-i386
+
+
+CONFLICTS+= libxen-[0-9]*
+CONFLICTS+= xentools20-[0-9]*
+CONFLICTS+= xentools30-* xentools3-* xentools32-*
+
+WRKSRC= ${WRKDIR}/xen-${VERSION}/tools
+CHECK_PORTABILITY_SKIP= examples/* xm-test/ramdisk/make-release.sh
+
+EGDIR= ${PREFIX}/share/examples/xen
+MESSAGE_SUBST= EGDIR=${EGDIR}
+
+USE_TOOLS+= perl #for pod2man
+USE_TOOLS+= gmake
+MAKE_ENV+= CONFIG_NetBSD=yes
+MAKE_ENV+= CONFIG_MBOOTPACK=no
+MAKE_ENV+= EGDIR=${EGDIR:Q}
+MAKE_ENV+= MV=${MV:Q} PYTHON=${PYTHONBIN:Q} SED=${SED:Q}
+.if ${MACHINE_ARCH} == "i386"
+MAKE_ENV+= XEN_TARGET_ARCH="x86_32" XEN_COMPILE_ARCH="x86_32"
+.elif ${MACHINE_ARCH} == "x86_64"
+MAKE_ENV+= XEN_TARGET_ARCH="x86_64" XEN_COMPILE_ARCH="x86_64"
+.else
+MAKE_ENV+= XEN_TARGET_ARCH="unsupported"
+.endif
+PY_PATCHPLIST= yes
+PYTHON_PATCH_SCRIPTS+= misc/xm
+PYTHON_PATCH_SCRIPTS+= misc/netfix
+PYTHON_PATCH_SCRIPTS+= misc/xen-bugtool
+PYTHON_PATCH_SCRIPTS+= misc/xencons
+PYTHON_PATCH_SCRIPTS+= misc/xend
+PYTHON_PATCH_SCRIPTS+= misc/xensymoops
+PYTHON_PATCH_SCRIPTS+= misc/xen-python-path
+PYTHON_PATCH_SCRIPTS+= pygrub/src/pygrub
+PYTHON_PATCH_SCRIPTS+= python/xen/util/*.py
+PYTHON_PATCH_SCRIPTS+= python/xen/xend/*.py
+PYTHON_PATCH_SCRIPTS+= python/xen/xm/*.py
+PYTHON_PATCH_SCRIPTS+= python/xen/util/*.py
+PYTHON_PATCH_SCRIPTS+= python/*.py
+PYTHON_PATCH_SCRIPTS+= security/python/xensec_gen/cgi-bin/policy.cgi
+PYTHON_PATCH_SCRIPTS+= security/python/xensec_gen/*.py
+PYTHON_PATCH_SCRIPTS+= security/python/*.py
+PYTHON_PATCH_SCRIPTS+= security/*.py
+PYTHON_PATCH_SCRIPTS+= xenmon/*.py
+PYTHON_PATCH_SCRIPTS+= xentrace/xentrace_format
+
+SUBST_CLASSES+= pathsvar
+SUBST_STAGE.pathsvar= pre-configure
+SUBST_FILES.pathsvar= examples/init.d/sysconfig.xendomains \
+ examples/xend-config.sxp \
+ python/xen/xend/server/relocate.py \
+ python/xen/xend/XendOptions.py \
+ security/Makefile security/python/xensec_gen/main.py \
+ xenstore/xs_lib.c
+SUBST_SED.pathsvar= -e "s|/var/lib|${VARBASE}/run|g"
+
+SUBST_CLASSES+= py
+SUBST_STAGE.py= pre-configure
+SUBST_FILES.py= check/check_python
+SUBST_FILES.py+= check/check_python_devel
+SUBST_FILES.py+= pygrub/Makefile
+SUBST_FILES.py+= python/Makefile
+SUBST_FILES.py+= security/Makefile
+SUBST_FILES.py+= include/xen-foreign/Makefile
+SUBST_FILES.py+= include/xen-foreign/mkheader.py
+SUBST_FILES.py+= ../xen/tools/get-fields.sh
+SUBST_SED.py= -e "s,python,${PYTHONBIN},g"
+
+SUBST_CLASSES+= conf
+SUBST_STAGE.conf= pre-configure
+SUBST_FILES.conf= python/xen/xend/XendOptions.py
+SUBST_FILES.conf+= python/xen/xend/osdep.py
+SUBST_FILES.conf+= python/xen/xm/create.py
+SUBST_FILES.conf+= python/xen/xm/addlabel.py
+SUBST_FILES.conf+= python/xen/xm/getlabel.py
+SUBST_FILES.conf+= python/xen/xm/rmlabel.py
+SUBST_FILES.conf+= ioemu/configure
+SUBST_FILES.conf+= ioemu/vl.c
+SUBST_SED.conf= -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g"
+
+SUBST_CLASSES+= prefix
+SUBST_STAGE.prefix= pre-configure
+SUBST_FILES.prefix= python/xen/util/auxbin.py
+SUBST_FILES.prefix+= python/xen/xend/osdep.py
+SUBST_FILES.prefix+= misc/xen-python-path
+SUBST_FILES.prefix+= ioemu/vl.c
+SUBST_SED.prefix= -e "s,@PREFIX@,${PREFIX},g"
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD"
+SUBST_CLASSES+= proc
+SUBST_STAGE.proc= pre-configure
+SUBST_FILES.proc= python/xen/xend/XendVnet.py
+SUBST_SED.proc= -e "s|/proc|/kern|g"
+PROCPATH= /kern
+.else
+PROCPATH= /proc
+.endif
+
+RCD_SCRIPTS= xend xenbackendd xendomains
+FILES_SUBST+= RCD_INTERPRETER=${PYTHONBIN:Q}
+FILES_SUBST+= PROCPATH=${PROCPATH:Q}
+FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
+
+BLKTAP_FILES= blk_netbsd.c blktapctrl_netbsd.c
+
+XEND_SCRIPTS= block vif-bridge vif-ip
+
+CONF_FILES= ${EGDIR}/xend-config.sxp \
+ ${PKG_SYSCONFDIR}/xend-config.sxp
+.for s in ${XEND_SCRIPTS}
+CONF_FILES_PERMS+= ${EGDIR}/${s} ${PKG_SYSCONFDIR}/scripts/${s} \
+ ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0755
+.endfor
+
+OWN_DIRS= ${PKG_SYSCONFDIR}/scripts /var/log/xen
+
+pre-build:
+ rm ${WRKSRC}/check/check_x11_devel
+.if ${MACHINE_ARCH} == "x86_64"
+ ${MKDIR} ${WRKSRC}/include/machine
+ ${TEST} -f ${WRKSRC}/include/machine/int_types.h || \
+ ${CP} ${FILESDIR}/int_types.h ${WRKSRC}/include/machine
+ ${TEST} -f ${WRKSRC}/libxc/include/elf_machdep.h || \
+ ${CP} ${FILESDIR}/elf_machdep.h ${WRKSRC}/include/machine
+.endif
+.for s in ${BLKTAP_FILES}
+ cp ${FILESDIR}/${s} ${WRKSRC}/blktap/drivers/
+.endfor
+ pod2man ${WRKSRC}/../docs/man/xend-config.sxp.pod.5 |\
+ sed -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
+ >${WRKDIR}/xend-config.sxp.5
+ pod2man ${WRKSRC}/../docs/man/xmdomain.cfg.pod.5 |\
+ sed -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
+ >${WRKDIR}/xmdomain.cfg.5
+ pod2man ${WRKSRC}/../docs/man/xm.pod.1 |\
+ sed -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
+ >${WRKDIR}/xm.1
+
+.if ${OPSYS} == "NetBSD"
+post-build:
+ cd ${FILESDIR}; for src in *-nbsd; do \
+ dst="$${src%-nbsd}"; \
+ ${SED} -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g" \
+ -e "s|@PREFIX@|${PREFIX}|g" \
+ $$src > ${WRKSRC}/examples/$$dst; \
+ done
+ ${CC} ${CFLAGS} ${LDFLAGS} \
+ -DVBD_SCRIPT=\"${PKG_SYSCONFDIR}/scripts/block\" \
+ -DLOG_FILE=\"${VARBASE}/log/xenbackendd.log\" \
+ -DPID_FILE=\"${VARBASE}/run/xenbackendd.pid\" \
+ -o ${WRKDIR}/xenbackendd.bin ${FILESDIR}/xenbackendd.c \
+ -I${WRKSRC}/libxc -I${WRKSRC}/include -L${WRKSRC}/libxc \
+ -I${WRKSRC}/xenstore -L${WRKSRC}/xenstore \
+ -lxenctrl -lxenstore
+
+.endif
+
+INSTALLATION_DIRS= ${EGDIR} ${PKGMANDIR}/man5
+
+post-install:
+ ${INSTALL_PROGRAM} ${WRKDIR}/xenbackendd.bin \
+ ${DESTDIR}${PREFIX}/sbin/xenbackendd
+ for f in xend-config.sxp xmexample1 xmexample2 xmexample3 netbsd1; do \
+ ${INSTALL_DATA} ${WRKSRC}/examples/$$f ${DESTDIR}${EGDIR}/$$f; \
+ done
+.for s in ${XEND_SCRIPTS}
+ ${INSTALL_SCRIPT} ${WRKSRC}/examples/${s} ${DESTDIR}${EGDIR}/${s}
+.endfor
+ ${INSTALL_DATA} ${WRKDIR}/xend-config.sxp.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
+ ${INSTALL_DATA} ${WRKDIR}/xmdomain.cfg.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
+ ${INSTALL_DATA} ${WRKDIR}/xm.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+ for f in hvm qemu-ifup; do \
+ ${INSTALL_DATA} ${WRKSRC}/examples/$$f ${DESTDIR}${EGDIR}/$$f; \
+ done
+
+.include "../../lang/python/application.mk"
+.include "../../lang/python/extension.mk"
+.include "../../textproc/py-xml/buildlink3.mk"
+.include "../../devel/py-curses/buildlink3.mk"
+.include "../../devel/ncurses/buildlink3.mk"
+#.include "../../devel/SDL/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/xentools33/PLIST b/sysutils/xentools33/PLIST
new file mode 100644
index 00000000000..4ba636057b9
--- /dev/null
+++ b/sysutils/xentools33/PLIST
@@ -0,0 +1,596 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $
+bin/lsevtchn
+bin/pygrub
+bin/readnotes
+bin/xc_restore
+bin/xc_save
+bin/xen-detect
+bin/xencons
+bin/xenconsole
+bin/xenctx
+bin/xenperf
+bin/xenstore
+bin/xenstore-chmod
+bin/xenstore-control
+bin/xenstore-exists
+bin/xenstore-list
+bin/xenstore-ls
+bin/xenstore-read
+bin/xenstore-rm
+bin/xenstore-write
+bin/xentrace
+bin/xentrace_format
+bin/xentrace_setsize
+etc/xen/qemu-ifup
+include/blktaplib.h
+include/flask.h
+include/fsimage.h
+include/fsimage_grub.h
+include/fsimage_plugin.h
+include/xen/COPYING
+include/xen/arch-ia64.h
+include/xen/arch-ia64/debug_op.h
+include/xen/arch-ia64/hvm/memmap.h
+include/xen/arch-ia64/hvm/save.h
+include/xen/arch-ia64/sioemu.h
+include/xen/arch-x86/cpuid.h
+include/xen/arch-x86/hvm/save.h
+include/xen/arch-x86/xen-mca.h
+include/xen/arch-x86/xen-x86_32.h
+include/xen/arch-x86/xen-${MACHINE_ARCH}.h
+include/xen/arch-x86/xen.h
+include/xen/arch-x86_32.h
+include/xen/arch-${MACHINE_ARCH}.h
+include/xen/callback.h
+include/xen/dom0_ops.h
+include/xen/domctl.h
+include/xen/elfnote.h
+include/xen/elfstructs.h
+include/xen/event_channel.h
+include/xen/features.h
+include/xen/foreign/ia64.h
+include/xen/foreign/x86_32.h
+include/xen/foreign/${MACHINE_ARCH}.h
+include/xen/grant_table.h
+include/xen/hvm/e820.h
+include/xen/hvm/hvm_info_table.h
+include/xen/hvm/hvm_op.h
+include/xen/hvm/ioreq.h
+include/xen/hvm/params.h
+include/xen/hvm/save.h
+include/xen/io/blkif.h
+include/xen/io/console.h
+include/xen/io/fbif.h
+include/xen/io/fsif.h
+include/xen/io/kbdif.h
+include/xen/io/netif.h
+include/xen/io/pciif.h
+include/xen/io/protocols.h
+include/xen/io/ring.h
+include/xen/io/tpmif.h
+include/xen/io/xenbus.h
+include/xen/io/xs_wire.h
+include/xen/kexec.h
+include/xen/libelf.h
+include/xen/memory.h
+include/xen/nmi.h
+include/xen/physdev.h
+include/xen/platform.h
+include/xen/sched.h
+include/xen/sys/evtchn.h
+include/xen/sys/privcmd.h
+include/xen/sysctl.h
+include/xen/trace.h
+include/xen/vcpu.h
+include/xen/version.h
+include/xen/xen-compat.h
+include/xen/xen.h
+include/xen/xencomm.h
+include/xen/xenoprof.h
+include/xen/xsm/acm.h
+include/xen/xsm/acm_ops.h
+include/xen/xsm/flask_op.h
+include/xenctrl.h
+include/xenguest.h
+include/xs.h
+include/xs_lib.h
+lib/fs/ext2fs/fsimage.so
+lib/fs/fat/fsimage.so
+lib/fs/iso9660/fsimage.so
+lib/fs/reiserfs/fsimage.so
+lib/fs/ufs/fsimage.so
+lib/fs/zfs/fsimage.so
+lib/libblktap.a
+lib/libblktap.so
+lib/libblktap.so.3.0
+lib/libblktap.so.3.0.0
+lib/libflask.a
+lib/libflask.so
+lib/libflask.so.1.0
+lib/libflask.so.1.0.0
+lib/libfsimage.so
+lib/libfsimage.so.1.0
+lib/libfsimage.so.1.0.0
+lib/libxenctrl.a
+lib/libxenctrl.so
+lib/libxenctrl.so.3.2
+lib/libxenctrl.so.3.2.0
+lib/libxenguest.a
+lib/libxenguest.so
+lib/libxenguest.so.3.2
+lib/libxenguest.so.3.2.0
+lib/libxenstore.a
+lib/libxenstore.so
+lib/libxenstore.so.3.0
+lib/libxenstore.so.3.0.0
+${PYSITELIB}/fsimage.so
+${PYSITELIB}/grub/GrubConf.py
+${PYSITELIB}/grub/GrubConf.pyc
+${PYSITELIB}/grub/LiloConf.py
+${PYSITELIB}/grub/LiloConf.pyc
+${PYSITELIB}/grub/__init__.py
+${PYSITELIB}/grub/__init__.pyc
+${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/flask.so
+${PYSITELIB}/xen/lowlevel/ptsname.so
+${PYSITELIB}/xen/lowlevel/xc.so
+${PYSITELIB}/xen/lowlevel/xs.so
+${PYSITELIB}/xen/sv/CreateDomain.py
+${PYSITELIB}/xen/sv/CreateDomain.pyc
+${PYSITELIB}/xen/sv/DomInfo.py
+${PYSITELIB}/xen/sv/DomInfo.pyc
+${PYSITELIB}/xen/sv/GenTabbed.py
+${PYSITELIB}/xen/sv/GenTabbed.pyc
+${PYSITELIB}/xen/sv/HTMLBase.py
+${PYSITELIB}/xen/sv/HTMLBase.pyc
+${PYSITELIB}/xen/sv/Main.py
+${PYSITELIB}/xen/sv/Main.pyc
+${PYSITELIB}/xen/sv/NodeInfo.py
+${PYSITELIB}/xen/sv/NodeInfo.pyc
+${PYSITELIB}/xen/sv/RestoreDomain.py
+${PYSITELIB}/xen/sv/RestoreDomain.pyc
+${PYSITELIB}/xen/sv/Wizard.py
+${PYSITELIB}/xen/sv/Wizard.pyc
+${PYSITELIB}/xen/sv/__init__.py
+${PYSITELIB}/xen/sv/__init__.pyc
+${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/acmpolicy.py
+${PYSITELIB}/xen/util/acmpolicy.pyc
+${PYSITELIB}/xen/util/asserts.py
+${PYSITELIB}/xen/util/asserts.pyc
+${PYSITELIB}/xen/util/auxbin.py
+${PYSITELIB}/xen/util/auxbin.pyc
+${PYSITELIB}/xen/util/blkif.py
+${PYSITELIB}/xen/util/blkif.pyc
+${PYSITELIB}/xen/util/bootloader.py
+${PYSITELIB}/xen/util/bootloader.pyc
+${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/mkdir.py
+${PYSITELIB}/xen/util/mkdir.pyc
+${PYSITELIB}/xen/util/oshelp.py
+${PYSITELIB}/xen/util/oshelp.pyc
+${PYSITELIB}/xen/util/pci.py
+${PYSITELIB}/xen/util/pci.pyc
+${PYSITELIB}/xen/util/utils.py
+${PYSITELIB}/xen/util/utils.pyc
+${PYSITELIB}/xen/util/vscsi_util.py
+${PYSITELIB}/xen/util/vscsi_util.pyc
+${PYSITELIB}/xen/util/xmlrpcclient.py
+${PYSITELIB}/xen/util/xmlrpcclient.pyc
+${PYSITELIB}/xen/util/xmlrpclib2.py
+${PYSITELIB}/xen/util/xmlrpclib2.pyc
+${PYSITELIB}/xen/util/xpopen.py
+${PYSITELIB}/xen/util/xpopen.pyc
+${PYSITELIB}/xen/util/xsconstants.py
+${PYSITELIB}/xen/util/xsconstants.pyc
+${PYSITELIB}/xen/util/xsm/__init__.py
+${PYSITELIB}/xen/util/xsm/__init__.pyc
+${PYSITELIB}/xen/util/xsm/acm/__init__.py
+${PYSITELIB}/xen/util/xsm/acm/__init__.pyc
+${PYSITELIB}/xen/util/xsm/acm/acm.py
+${PYSITELIB}/xen/util/xsm/acm/acm.pyc
+${PYSITELIB}/xen/util/xsm/dummy/__init__.py
+${PYSITELIB}/xen/util/xsm/dummy/__init__.pyc
+${PYSITELIB}/xen/util/xsm/dummy/dummy.py
+${PYSITELIB}/xen/util/xsm/dummy/dummy.pyc
+${PYSITELIB}/xen/util/xsm/flask/__init__.py
+${PYSITELIB}/xen/util/xsm/flask/__init__.pyc
+${PYSITELIB}/xen/util/xsm/flask/flask.py
+${PYSITELIB}/xen/util/xsm/flask/flask.pyc
+${PYSITELIB}/xen/util/xsm/xsm.py
+${PYSITELIB}/xen/util/xsm/xsm.pyc
+${PYSITELIB}/xen/util/xsm/xsm_core.py
+${PYSITELIB}/xen/util/xsm/xsm_core.pyc
+${PYSITELIB}/xen/util/xspolicy.py
+${PYSITELIB}/xen/util/xspolicy.pyc
+${PYSITELIB}/xen/web/SrvBase.py
+${PYSITELIB}/xen/web/SrvBase.pyc
+${PYSITELIB}/xen/web/SrvDir.py
+${PYSITELIB}/xen/web/SrvDir.pyc
+${PYSITELIB}/xen/web/__init__.py
+${PYSITELIB}/xen/web/__init__.pyc
+${PYSITELIB}/xen/web/connection.py
+${PYSITELIB}/xen/web/connection.pyc
+${PYSITELIB}/xen/web/http.py
+${PYSITELIB}/xen/web/http.pyc
+${PYSITELIB}/xen/web/httpserver.py
+${PYSITELIB}/xen/web/httpserver.pyc
+${PYSITELIB}/xen/web/protocol.py
+${PYSITELIB}/xen/web/protocol.pyc
+${PYSITELIB}/xen/web/resource.py
+${PYSITELIB}/xen/web/resource.pyc
+${PYSITELIB}/xen/web/static.py
+${PYSITELIB}/xen/web/static.pyc
+${PYSITELIB}/xen/web/tcp.py
+${PYSITELIB}/xen/web/tcp.pyc
+${PYSITELIB}/xen/web/unix.py
+${PYSITELIB}/xen/web/unix.pyc
+${PYSITELIB}/xen/xend/Args.py
+${PYSITELIB}/xen/xend/Args.pyc
+${PYSITELIB}/xen/xend/PrettyPrint.py
+${PYSITELIB}/xen/xend/PrettyPrint.pyc
+${PYSITELIB}/xen/xend/Vifctl.py
+${PYSITELIB}/xen/xend/Vifctl.pyc
+${PYSITELIB}/xen/xend/XendAPI.py
+${PYSITELIB}/xen/xend/XendAPI.pyc
+${PYSITELIB}/xen/xend/XendAPIConstants.py
+${PYSITELIB}/xen/xend/XendAPIConstants.pyc
+${PYSITELIB}/xen/xend/XendAPIStore.py
+${PYSITELIB}/xen/xend/XendAPIStore.pyc
+${PYSITELIB}/xen/xend/XendAPIVersion.py
+${PYSITELIB}/xen/xend/XendAPIVersion.pyc
+${PYSITELIB}/xen/xend/XendAuthSessions.py
+${PYSITELIB}/xen/xend/XendAuthSessions.pyc
+${PYSITELIB}/xen/xend/XendBase.py
+${PYSITELIB}/xen/xend/XendBase.pyc
+${PYSITELIB}/xen/xend/XendBootloader.py
+${PYSITELIB}/xen/xend/XendBootloader.pyc
+${PYSITELIB}/xen/xend/XendCheckpoint.py
+${PYSITELIB}/xen/xend/XendCheckpoint.pyc
+${PYSITELIB}/xen/xend/XendClient.py
+${PYSITELIB}/xen/xend/XendClient.pyc
+${PYSITELIB}/xen/xend/XendConfig.py
+${PYSITELIB}/xen/xend/XendConfig.pyc
+${PYSITELIB}/xen/xend/XendConstants.py
+${PYSITELIB}/xen/xend/XendConstants.pyc
+${PYSITELIB}/xen/xend/XendDPCI.py
+${PYSITELIB}/xen/xend/XendDPCI.pyc
+${PYSITELIB}/xen/xend/XendDevices.py
+${PYSITELIB}/xen/xend/XendDevices.pyc
+${PYSITELIB}/xen/xend/XendDmesg.py
+${PYSITELIB}/xen/xend/XendDmesg.pyc
+${PYSITELIB}/xen/xend/XendDomain.py
+${PYSITELIB}/xen/xend/XendDomain.pyc
+${PYSITELIB}/xen/xend/XendDomainInfo.py
+${PYSITELIB}/xen/xend/XendDomainInfo.pyc
+${PYSITELIB}/xen/xend/XendError.py
+${PYSITELIB}/xen/xend/XendError.pyc
+${PYSITELIB}/xen/xend/XendLocalStorageRepo.py
+${PYSITELIB}/xen/xend/XendLocalStorageRepo.pyc
+${PYSITELIB}/xen/xend/XendLogging.py
+${PYSITELIB}/xen/xend/XendLogging.pyc
+${PYSITELIB}/xen/xend/XendMonitor.py
+${PYSITELIB}/xen/xend/XendMonitor.pyc
+${PYSITELIB}/xen/xend/XendNetwork.py
+${PYSITELIB}/xen/xend/XendNetwork.pyc
+${PYSITELIB}/xen/xend/XendNode.py
+${PYSITELIB}/xen/xend/XendNode.pyc
+${PYSITELIB}/xen/xend/XendOptions.py
+${PYSITELIB}/xen/xend/XendOptions.pyc
+${PYSITELIB}/xen/xend/XendPBD.py
+${PYSITELIB}/xen/xend/XendPBD.pyc
+${PYSITELIB}/xen/xend/XendPIF.py
+${PYSITELIB}/xen/xend/XendPIF.pyc
+${PYSITELIB}/xen/xend/XendPIFMetrics.py
+${PYSITELIB}/xen/xend/XendPIFMetrics.pyc
+${PYSITELIB}/xen/xend/XendPPCI.py
+${PYSITELIB}/xen/xend/XendPPCI.pyc
+${PYSITELIB}/xen/xend/XendProtocol.py
+${PYSITELIB}/xen/xend/XendProtocol.pyc
+${PYSITELIB}/xen/xend/XendQCoWStorageRepo.py
+${PYSITELIB}/xen/xend/XendQCoWStorageRepo.pyc
+${PYSITELIB}/xen/xend/XendStateStore.py
+${PYSITELIB}/xen/xend/XendStateStore.pyc
+${PYSITELIB}/xen/xend/XendStorageRepository.py
+${PYSITELIB}/xen/xend/XendStorageRepository.pyc
+${PYSITELIB}/xen/xend/XendTask.py
+${PYSITELIB}/xen/xend/XendTask.pyc
+${PYSITELIB}/xen/xend/XendTaskManager.py
+${PYSITELIB}/xen/xend/XendTaskManager.pyc
+${PYSITELIB}/xen/xend/XendVDI.py
+${PYSITELIB}/xen/xend/XendVDI.pyc
+${PYSITELIB}/xen/xend/XendVMMetrics.py
+${PYSITELIB}/xen/xend/XendVMMetrics.pyc
+${PYSITELIB}/xen/xend/XendVnet.py
+${PYSITELIB}/xen/xend/XendVnet.pyc
+${PYSITELIB}/xen/xend/XendXSPolicy.py
+${PYSITELIB}/xen/xend/XendXSPolicy.pyc
+${PYSITELIB}/xen/xend/XendXSPolicyAdmin.py
+${PYSITELIB}/xen/xend/XendXSPolicyAdmin.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/osdep.py
+${PYSITELIB}/xen/xend/osdep.pyc
+${PYSITELIB}/xen/xend/server/BlktapController.py
+${PYSITELIB}/xen/xend/server/BlktapController.pyc
+${PYSITELIB}/xen/xend/server/ConsoleController.py
+${PYSITELIB}/xen/xend/server/ConsoleController.pyc
+${PYSITELIB}/xen/xend/server/DevController.py
+${PYSITELIB}/xen/xend/server/DevController.pyc
+${PYSITELIB}/xen/xend/server/SSLXMLRPCServer.py
+${PYSITELIB}/xen/xend/server/SSLXMLRPCServer.pyc
+${PYSITELIB}/xen/xend/server/SrvDaemon.py
+${PYSITELIB}/xen/xend/server/SrvDaemon.pyc
+${PYSITELIB}/xen/xend/server/SrvDmesg.py
+${PYSITELIB}/xen/xend/server/SrvDmesg.pyc
+${PYSITELIB}/xen/xend/server/SrvDomain.py
+${PYSITELIB}/xen/xend/server/SrvDomain.pyc
+${PYSITELIB}/xen/xend/server/SrvDomainDir.py
+${PYSITELIB}/xen/xend/server/SrvDomainDir.pyc
+${PYSITELIB}/xen/xend/server/SrvNode.py
+${PYSITELIB}/xen/xend/server/SrvNode.pyc
+${PYSITELIB}/xen/xend/server/SrvRoot.py
+${PYSITELIB}/xen/xend/server/SrvRoot.pyc
+${PYSITELIB}/xen/xend/server/SrvServer.py
+${PYSITELIB}/xen/xend/server/SrvServer.pyc
+${PYSITELIB}/xen/xend/server/SrvVnetDir.py
+${PYSITELIB}/xen/xend/server/SrvVnetDir.pyc
+${PYSITELIB}/xen/xend/server/SrvXendLog.py
+${PYSITELIB}/xen/xend/server/SrvXendLog.pyc
+${PYSITELIB}/xen/xend/server/XMLRPCServer.py
+${PYSITELIB}/xen/xend/server/XMLRPCServer.pyc
+${PYSITELIB}/xen/xend/server/__init__.py
+${PYSITELIB}/xen/xend/server/__init__.pyc
+${PYSITELIB}/xen/xend/server/blkif.py
+${PYSITELIB}/xen/xend/server/blkif.pyc
+${PYSITELIB}/xen/xend/server/iopif.py
+${PYSITELIB}/xen/xend/server/iopif.pyc
+${PYSITELIB}/xen/xend/server/irqif.py
+${PYSITELIB}/xen/xend/server/irqif.pyc
+${PYSITELIB}/xen/xend/server/netif.py
+${PYSITELIB}/xen/xend/server/netif.pyc
+${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
+${PYSITELIB}/xen/xend/server/tests/__init__.pyc
+${PYSITELIB}/xen/xend/server/tests/test_controllers.py
+${PYSITELIB}/xen/xend/server/tests/test_controllers.pyc
+${PYSITELIB}/xen/xend/server/tpmif.py
+${PYSITELIB}/xen/xend/server/tpmif.pyc
+${PYSITELIB}/xen/xend/server/vfbif.py
+${PYSITELIB}/xen/xend/server/vfbif.pyc
+${PYSITELIB}/xen/xend/server/vscsiif.py
+${PYSITELIB}/xen/xend/server/vscsiif.pyc
+${PYSITELIB}/xen/xend/sxp.py
+${PYSITELIB}/xen/xend/sxp.pyc
+${PYSITELIB}/xen/xend/tests/__init__.py
+${PYSITELIB}/xen/xend/tests/__init__.pyc
+${PYSITELIB}/xen/xend/tests/test_XendConfig.py
+${PYSITELIB}/xen/xend/tests/test_XendConfig.pyc
+${PYSITELIB}/xen/xend/tests/test_sxp.py
+${PYSITELIB}/xen/xend/tests/test_sxp.pyc
+${PYSITELIB}/xen/xend/tests/test_uuid.py
+${PYSITELIB}/xen/xend/tests/test_uuid.pyc
+${PYSITELIB}/xen/xend/uuid.py
+${PYSITELIB}/xen/xend/uuid.pyc
+${PYSITELIB}/xen/xend/xenstore/__init__.py
+${PYSITELIB}/xen/xend/xenstore/__init__.pyc
+${PYSITELIB}/xen/xend/xenstore/tests/__init__.py
+${PYSITELIB}/xen/xend/xenstore/tests/__init__.pyc
+${PYSITELIB}/xen/xend/xenstore/tests/stress_xs.py
+${PYSITELIB}/xen/xend/xenstore/tests/stress_xs.pyc
+${PYSITELIB}/xen/xend/xenstore/xstransact.py
+${PYSITELIB}/xen/xend/xenstore/xstransact.pyc
+${PYSITELIB}/xen/xend/xenstore/xsutil.py
+${PYSITELIB}/xen/xend/xenstore/xsutil.pyc
+${PYSITELIB}/xen/xend/xenstore/xswatch.py
+${PYSITELIB}/xen/xend/xenstore/xswatch.pyc
+${PYSITELIB}/xen/xm/XenAPI.py
+${PYSITELIB}/xen/xm/XenAPI.pyc
+${PYSITELIB}/xen/xm/__init__.py
+${PYSITELIB}/xen/xm/__init__.pyc
+${PYSITELIB}/xen/xm/addlabel.py
+${PYSITELIB}/xen/xm/addlabel.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/getpolicy.py
+${PYSITELIB}/xen/xm/getpolicy.pyc
+${PYSITELIB}/xen/xm/help.py
+${PYSITELIB}/xen/xm/help.pyc
+${PYSITELIB}/xen/xm/labels.py
+${PYSITELIB}/xen/xm/labels.pyc
+${PYSITELIB}/xen/xm/main.py
+${PYSITELIB}/xen/xm/main.pyc
+${PYSITELIB}/xen/xm/migrate.py
+${PYSITELIB}/xen/xm/migrate.pyc
+${PYSITELIB}/xen/xm/new.py
+${PYSITELIB}/xen/xm/new.pyc
+${PYSITELIB}/xen/xm/opts.py
+${PYSITELIB}/xen/xm/opts.pyc
+${PYSITELIB}/xen/xm/resetpolicy.py
+${PYSITELIB}/xen/xm/resetpolicy.pyc
+${PYSITELIB}/xen/xm/resources.py
+${PYSITELIB}/xen/xm/resources.pyc
+${PYSITELIB}/xen/xm/rmlabel.py
+${PYSITELIB}/xen/xm/rmlabel.pyc
+${PYSITELIB}/xen/xm/setpolicy.py
+${PYSITELIB}/xen/xm/setpolicy.pyc
+${PYSITELIB}/xen/xm/shutdown.py
+${PYSITELIB}/xen/xm/shutdown.pyc
+${PYSITELIB}/xen/xm/tests/__init__.py
+${PYSITELIB}/xen/xm/tests/__init__.pyc
+${PYSITELIB}/xen/xm/tests/test_create.py
+${PYSITELIB}/xen/xm/tests/test_create.pyc
+${PYSITELIB}/xen/xm/xenapi_create.py
+${PYSITELIB}/xen/xm/xenapi_create.pyc
+${PYSITELIB}/xen/xsview/__init__.py
+${PYSITELIB}/xen/xsview/__init__.pyc
+${PYSITELIB}/xen/xsview/main.py
+${PYSITELIB}/xen/xsview/main.pyc
+${PYSITELIB}/xen/xsview/xsviewer.py
+${PYSITELIB}/xen/xsview/xsviewer.pyc
+lib/xen/boot/hvmloader
+libexec/qemu-dm
+libexec/qemu-dm.debug
+man/man1/xentop.1
+man/man1/xentrace_format.1
+man/man1/xm.1
+man/man5/xend-config.sxp.5
+man/man5/xmdomain.cfg.5
+man/man8/xentrace.8
+sbin/blktapctrl
+sbin/flask-loadpolicy
+sbin/fs-backend
+sbin/img2qcow
+sbin/netfix
+sbin/qcow-create
+sbin/qcow2raw
+sbin/tapdisk
+sbin/tapdisk-ioemu
+sbin/xen-bugtool
+sbin/xen-python-path
+sbin/xenbackendd
+sbin/xenbaked
+sbin/xenconsoled
+sbin/xend
+sbin/xenmon.py
+sbin/xenperf
+sbin/xenstored
+sbin/xentop
+sbin/xentrace_setmask
+sbin/xm
+sbin/xsview
+share/examples/rc.d/xenbackendd
+share/examples/rc.d/xend
+share/examples/rc.d/xendomains
+share/examples/xen/block
+share/examples/xen/hvm
+share/examples/xen/${LOWER_OPSYS}1
+share/examples/xen/qemu-ifup
+share/examples/xen/vif-bridge
+share/examples/xen/vif-ip
+share/examples/xen/xend-config.sxp
+share/examples/xen/xmexample1
+share/examples/xen/xmexample2
+share/examples/xen/xmexample3
+share/xen/create.dtd
+share/xen/qemu/keymaps/ar
+share/xen/qemu/keymaps/common
+share/xen/qemu/keymaps/da
+share/xen/qemu/keymaps/de
+share/xen/qemu/keymaps/de-ch
+share/xen/qemu/keymaps/en-gb
+share/xen/qemu/keymaps/en-us
+share/xen/qemu/keymaps/es
+share/xen/qemu/keymaps/et
+share/xen/qemu/keymaps/fi
+share/xen/qemu/keymaps/fo
+share/xen/qemu/keymaps/fr
+share/xen/qemu/keymaps/fr-be
+share/xen/qemu/keymaps/fr-ca
+share/xen/qemu/keymaps/fr-ch
+share/xen/qemu/keymaps/hr
+share/xen/qemu/keymaps/hu
+share/xen/qemu/keymaps/is
+share/xen/qemu/keymaps/it
+share/xen/qemu/keymaps/ja
+share/xen/qemu/keymaps/lt
+share/xen/qemu/keymaps/lv
+share/xen/qemu/keymaps/mk
+share/xen/qemu/keymaps/modifiers
+share/xen/qemu/keymaps/nl
+share/xen/qemu/keymaps/nl-be
+share/xen/qemu/keymaps/no
+share/xen/qemu/keymaps/pl
+share/xen/qemu/keymaps/pt
+share/xen/qemu/keymaps/pt-br
+share/xen/qemu/keymaps/ru
+share/xen/qemu/keymaps/sl
+share/xen/qemu/keymaps/sv
+share/xen/qemu/keymaps/th
+share/xen/qemu/keymaps/tr
+@dirrm share/xen/qemu/keymaps
+@dirrm share/xen/qemu
+@dirrm share/xen
+@dirrm share/examples/xen
+@dirrm lib/xen/boot
+@dirrm lib/xen
+@dirrm ${PYSITELIB}/xen/xsview
+@dirrm ${PYSITELIB}/xen/xm/tests
+@dirrm ${PYSITELIB}/xen/xm
+@dirrm ${PYSITELIB}/xen/xend/xenstore/tests
+@dirrm ${PYSITELIB}/xen/xend/xenstore
+@dirrm ${PYSITELIB}/xen/xend/tests
+@dirrm ${PYSITELIB}/xen/xend/server/tests
+@dirrm ${PYSITELIB}/xen/xend/server
+@dirrm ${PYSITELIB}/xen/xend
+@dirrm ${PYSITELIB}/xen/web
+@dirrm ${PYSITELIB}/xen/util/xsm/flask
+@dirrm ${PYSITELIB}/xen/util/xsm/dummy
+@dirrm ${PYSITELIB}/xen/util/xsm/acm
+@dirrm ${PYSITELIB}/xen/util/xsm
+@dirrm ${PYSITELIB}/xen/util
+@dirrm ${PYSITELIB}/xen/sv
+@dirrm ${PYSITELIB}/xen/lowlevel
+@dirrm ${PYSITELIB}/xen
+@dirrm ${PYSITELIB}/grub
+@dirrm lib/fs/zfs
+@dirrm lib/fs/ufs
+@dirrm lib/fs/reiserfs
+@dirrm lib/fs/iso9660
+@dirrm lib/fs/fat
+@dirrm lib/fs/ext2fs
+@dirrm lib/fs
+@dirrm include/xen/xsm
+@dirrm include/xen/sys
+@dirrm include/xen/io
+@dirrm include/xen/hvm
+@dirrm include/xen/foreign
+@dirrm include/xen/arch-x86/hvm
+@dirrm include/xen/arch-x86
+@dirrm include/xen/arch-ia64/hvm
+@dirrm include/xen/arch-ia64
+@dirrm include/xen
+@dirrm etc/xen
diff --git a/sysutils/xentools33/distinfo b/sysutils/xentools33/distinfo
new file mode 100644
index 00000000000..ef0202f3281
--- /dev/null
+++ b/sysutils/xentools33/distinfo
@@ -0,0 +1,50 @@
+$NetBSD: distinfo,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $
+
+SHA1 (xen-3.3-18261.tar.gz) = 25c43a6aa69b8c0867268a77b5815f27852b2b13
+RMD160 (xen-3.3-18261.tar.gz) = 184b1df67a645cecfbff4307dfb02079235c4d03
+Size (xen-3.3-18261.tar.gz) = 8040616 bytes
+SHA1 (patch-aa) = 74c3023e39baf488f8bae060e93f6175b32df61a
+SHA1 (patch-ab) = a6244d421dc995c9bcbc9959de422972f9d46b6d
+SHA1 (patch-ac) = 8ad21b1a1213e7ffbb5ff407bb4ffdd86bf29c2e
+SHA1 (patch-ad) = 323e854e5872e770580068fa93a74bd0b1531025
+SHA1 (patch-ae) = bb7116a71bf6637591b639511f055836a13d9887
+SHA1 (patch-af) = 5995f0f8ee9cf40c8ac43d02568d942430993b3e
+SHA1 (patch-ag) = 9f1041f09ac8da77292c23ebcf2f86549fcbc7e8
+SHA1 (patch-ah) = cc8d95c73d7f4a08f311e8417d26f53ffd010549
+SHA1 (patch-ai) = 0906a5ec3a7450fc987b01289e2560e60966d00d
+SHA1 (patch-aj) = 64c87cd4d1d22af745043bc66b4fbab884920278
+SHA1 (patch-ba) = e1ac8768dd1676262309b422799adde7f151b3e2
+SHA1 (patch-bb) = dacb9f95908c07c066d5a7c3ceff8a3c10537d27
+SHA1 (patch-bc) = ea31de81114f52dd9d06f2510c1555d641570784
+SHA1 (patch-bd) = 15e87f1e15e92d15099c4d62123df36b6aa23b18
+SHA1 (patch-be) = 7567a4430b18399cd69f9088803567dfe7b20c9a
+SHA1 (patch-bf) = 51f4b08ccaa3e6c062a489d8e4a7a6a5ccdb221a
+SHA1 (patch-bg) = 0121c07ddc67b6801cdd15488bc681378a466949
+SHA1 (patch-bh) = a072c1e2dd21aa284303b5fcc7eae5ff841a5fbc
+SHA1 (patch-bi) = 6012614ffb424119d0219fd14085d97c2a9f5e26
+SHA1 (patch-bj) = 4c6b6a73d3ea5fb2c57b12dd4651f59024119276
+SHA1 (patch-ca) = b62ec8f0db5e65d737d1aaf3bd44580f5969328b
+SHA1 (patch-cb) = 9b7834e367a1820f28c0c1053d3f351751a12283
+SHA1 (patch-cc) = 598f7cda0e3137188f97605037b0b1c26ae8d0c0
+SHA1 (patch-cd) = 5563a72e203e789a86f4166c71ddb3fcff5215c6
+SHA1 (patch-ce) = 379774429d79724dbcd69d7c246d68d974d5ba89
+SHA1 (patch-cf) = 055af260b497cbfaa5732f05267526e9fb1d1536
+SHA1 (patch-cg) = 1f6ec716a101256274b6fff47b825271403a1ee0
+SHA1 (patch-da) = b775dc2ba49bd2d3e044f7393294e2194d8c6b60
+SHA1 (patch-db) = 6e9e9d0e06716990c1532968aed97fe8a3877869
+SHA1 (patch-dc) = fdbe8e8c5f4f00b6c5212d429e830af5dc51d92b
+SHA1 (patch-dd) = 343e7af31a0801ee71fb4943b61220bf52718a94
+SHA1 (patch-de) = 0f2b717b2ae14ce128c361e7b3fbb570615090c2
+SHA1 (patch-df) = 46b99d00c6562c41e5fd96df8dbcb0653c1baa46
+SHA1 (patch-ea) = 4c5cd6bd798488c13a264b567a67aa7cb5f8a2e4
+SHA1 (patch-eb) = cf63c43ccbc6b7b435be871e392f9729bd392ab4
+SHA1 (patch-ec) = ec7745d92a74a7101391e07508a4ede9a72fd1d1
+SHA1 (patch-ed) = 613f4c4605af860e5f88b68c49a0e7870ba6ecde
+SHA1 (patch-ee) = 119029fda1d4ecee90d0a108151596cb3ef0ec74
+SHA1 (patch-ef) = c8740b1c9cfac686f2e4e32c7613b5f02206459d
+SHA1 (patch-eg) = 84e816c95167828314ef901e324772249a407c41
+SHA1 (patch-fa) = b4a4b7334357ebcd1646886c18c9772e8b9ae765
+SHA1 (patch-fb) = 22a07628566b43aa786c410927d29a283e8cf141
+SHA1 (patch-fc) = 953be7fe89208be6740fe08e6e930643a30c46cb
+SHA1 (patch-fd) = 3592c62ab0f0e5375fc433ef426bc56b1603a8f4
+SHA1 (patch-fe) = 52f34678e5eb15b58576717be02086249909a187
diff --git a/sysutils/xentools33/files/blk_netbsd.c b/sysutils/xentools33/files/blk_netbsd.c
new file mode 100644
index 00000000000..81076a25a4d
--- /dev/null
+++ b/sysutils/xentools33/files/blk_netbsd.c
@@ -0,0 +1,39 @@
+#include <inttypes.h>
+#include <sys/ioctl.h>
+#include <sys/disklabel.h>
+#include "tapdisk.h"
+#include "blk.h"
+
+int blk_getimagesize(int fd, uint64_t *size)
+{
+ int rc;
+ struct disklabel dl;
+
+ *size = 0;
+ rc = ioctl(fd, DIOCGDINFO, &dl);
+ if (rc) {
+ DPRINTF("ERR: DIOCGDINFO failed, couldn't stat image");
+ return -EINVAL;
+ }
+
+ *size = dl.d_secsize * dl.d_secpercyl;
+
+ return 0;
+}
+
+int blk_getsectorsize(int fd, uint64_t *sector_size)
+{
+ int rc;
+ struct disklabel dl;
+
+ *sector_size = DEV_BSIZE;
+ rc = ioctl(fd, DIOCGDINFO, &dl);
+ if (rc) {
+ DPRINTF("ERR: DIOCGDINFO failed, couldn't stat image");
+ return 0; /* fallback to DEV_BSIZE */
+ }
+
+ *sector_size = dl.d_secsize;
+ return 0;
+}
+
diff --git a/sysutils/xentools33/files/blktapctrl_netbsd.c b/sysutils/xentools33/files/blktapctrl_netbsd.c
new file mode 100644
index 00000000000..02a1e9f3018
--- /dev/null
+++ b/sysutils/xentools33/files/blktapctrl_netbsd.c
@@ -0,0 +1,16 @@
+
+#include "blktaplib.h"
+#include "blktapctrl.h"
+
+
+int blktap_interface_open(void)
+{
+ /* not yet implemented */
+ return -1;
+}
+
+int blktap_interface_create(int ctlfd, int *major, int *minor, blkif_t *blkif)
+{
+ /* not yet implemented */
+ return -1;
+}
diff --git a/sysutils/xentools33/files/block-nbsd b/sysutils/xentools33/files/block-nbsd
new file mode 100644
index 00000000000..ba96e54dddf
--- /dev/null
+++ b/sysutils/xentools33/files/block-nbsd
@@ -0,0 +1,88 @@
+#!/bin/sh -e
+
+# $NetBSD: block-nbsd,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $
+# Called by xenbackendd
+# Usage: block xsdir_backend_path state
+
+PATH=/bin:/usr/bin:@PREFIX@/bin:/sbin:/usr/sbin:@PREFIX@/sbin
+export PATH
+
+error() {
+ echo "$@" >&2
+ xenstore_write $xpath/hotplug-status error
+ exit 1
+}
+
+
+xpath=$1
+xstatus=$2
+xtype=$(xenstore-read "$xpath/type")
+xparams=$(xenstore-read "$xpath/params")
+
+case $xstatus in
+6)
+ # device removed
+ case $xtype in
+ file)
+ vnd=$(xenstore-read "$xpath/vnd" || echo none)
+ if [ $vnd != none ]; then
+ vnconfig -u $vnd
+ fi
+ ;;
+ phy)
+ ;;
+ *)
+ echo "unknown type $xtype" >&2
+ ;;
+ esac
+ xenstore-rm $xpath
+ exit 0
+ ;;
+2)
+ case $xtype in
+ file)
+ # Store the list of available vnd(4) devices in
+ #``available_disks'', and mark them as ``free''.
+ list=`ls -1 /dev/vnd[0-9]*d | sed "s,/dev/vnd,,;s,d,," | sort -n`
+ for i in $list; do
+ disk="vnd$i"
+ available_disks="$available_disks $disk"
+ eval $disk=free
+ done
+ # Mark the used vnd(4) devices as ``used''.
+ for disk in `sysctl hw.disknames`; do
+ case $disk in
+ vnd[0-9]*) eval $disk=used ;;
+ esac
+ done
+ # Configure the first free vnd(4) device.
+ for disk in $available_disks; do
+ eval status=\$$disk
+ if [ "$status" = "free" ] && \
+ vnconfig /dev/${disk}d $xparams >/dev/null; then
+ device=/dev/${disk}d
+ echo vnconfig /dev/${disk}d $xparams
+ break
+ fi
+ done
+ if [ x$device = x ] ; then
+ error "no available vnd device"
+ fi
+ echo xenstore-write $xpath/vnd $device
+ xenstore-write $xpath/vnd $device
+ ;;
+ phy)
+ device=$xparams
+ ;;
+ esac
+ physical_device=$(stat -f '%r' "$device")
+ echo xenstore-write $xpath/physical-device $physical_device
+ xenstore-write $xpath/physical-device $physical_device
+ echo xenstore-write $xpath/hotplug-status connected
+ xenstore-write $xpath/hotplug-status connected
+ exit 0
+ ;;
+*)
+ exit 0
+ ;;
+esac
diff --git a/sysutils/xentools33/files/elf_machdep.h b/sysutils/xentools33/files/elf_machdep.h
new file mode 100644
index 00000000000..28c5e443c15
--- /dev/null
+++ b/sysutils/xentools33/files/elf_machdep.h
@@ -0,0 +1,41 @@
+/* $NetBSD: elf_machdep.h,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $ */
+
+#ifndef __i386__
+#include <amd64/elf_machdep.h>
+#else /* !__i386__ */
+/* i386 ELF definitions for gcc -m32 */
+
+#define ELF32_MACHDEP_ENDIANNESS ELFDATA2LSB
+#define ELF32_MACHDEP_ID_CASES \
+ case EM_386: \
+ case EM_486: \
+ break;
+
+#define ELF64_MACHDEP_ENDIANNESS XXX /* break compilation */
+#define ELF64_MACHDEP_ID_CASES \
+ /* no 64-bit ELF machine types supported */
+
+#define ELF32_MACHDEP_ID EM_386
+
+#define ARCH_ELFSIZE 32 /* MD native binary size */
+
+/* i386 relocations */
+#define R_386_NONE 0
+#define R_386_32 1
+#define R_386_PC32 2
+#define R_386_GOT32 3
+#define R_386_PLT32 4
+#define R_386_COPY 5
+#define R_386_GLOB_DAT 6
+#define R_386_JMP_SLOT 7
+#define R_386_RELATIVE 8
+#define R_386_GOTOFF 9
+#define R_386_GOTPC 10
+/* The following relocations are GNU extensions. */
+#define R_386_16 20
+#define R_386_PC16 21
+#define R_386_8 22
+#define R_386_PC8 23
+
+#define R_TYPE(name) __CONCAT(R_386_,name)
+#endif /* !__i386__ */
diff --git a/sysutils/xentools33/files/hvm-nbsd b/sysutils/xentools33/files/hvm-nbsd
new file mode 100644
index 00000000000..2ff8181f827
--- /dev/null
+++ b/sysutils/xentools33/files/hvm-nbsd
@@ -0,0 +1,68 @@
+#============================================================================
+# 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 = "@PREFIX@/lib/xen/boot/hvmloader"
+
+builder='hvm'
+
+# Initial memory allocation (in megabytes) for the new domain.
+memory = 256
+
+# A name for your domain. All domains must have different names.
+name = "hvm"
+
+#Network interface. By default emules a realtek 8139. For a NetBSD guest you
+# have to disable re(4) and let rtk attach to use it.
+# ne2k_pci emulates a pci ne2000 clone; this his cpu-hungry in dom0
+# pcnet emulates a AMD PCnet-PCI controller; but it corrupts packets with
+# pcn(4) under NetBSD.
+#vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu, model=ne2k_pci' ]
+#vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu, model=pcnet' ]
+vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu' ]
+
+#----------------------------------------------------------------------------
+# device model to use: only qemu-dm available for now
+device_model = '/usr/pkg/libexec/qemu-dm'
+
+# 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 hvm domains you can only use hda to hdd. You can set extra types
+# (e.g. cdrom)
+
+disk = [ 'file:/home/domains/vmx,ioemu:hda,w', 'file:/home/domains/i386cd.iso,ioemu:hdc:cdrom,r' ]
+
+# floppy images; this doesn't seem to work currently. Use a iso image instead.
+#fda = '/home/domains/boot1.fs'
+
+# boot device: a = floppy, c= hard drive, d= cdrom (with the disk entry
+# before)
+boot='d'
+
+# By default, 'xm create' will try to open an X window on the current display
+# for the virtal framebuffer. You can have the virtal framebuffer in vnc
+# instead, and connect using a vnc client (using localhost:$vncdisplay)
+# If vncunused is set to 1 (this is the default value), vncdisplay
+# will be set to the first unused port; so it's recommended to
+#vnc = 1
+#vncdisplay = 0
+#vncunused = 0
+
+#Xen emulates a PS/2 mouse, but the pointer in the guest has difficulties
+# tracking the absolute position. Xen can emulate a USB tablet in addition
+# to the mouse which will report the absolute position of the pointer,
+# and make the mouse much easier to use.
+#
+usb=1
+usbdevice='tablet'
+#usbdevice='mouse'
+
+#============================================================================
diff --git a/sysutils/xentools33/files/int_types.h b/sysutils/xentools33/files/int_types.h
new file mode 100644
index 00000000000..7f57d453888
--- /dev/null
+++ b/sysutils/xentools33/files/int_types.h
@@ -0,0 +1,73 @@
+/* $NetBSD: int_types.h,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $ */
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * from: @(#)types.h 7.5 (Berkeley) 3/9/91
+ */
+
+#ifndef __i386__
+#include <amd64/int_types.h>
+#else /* !__i386__ */
+/* i386 types definitions for gcc -m32 */
+#ifndef _I386_INT_TYPES_H_
+#define _I386_INT_TYPES_H_
+
+#include <sys/cdefs.h>
+
+/*
+ * 7.18.1 Integer types
+ */
+
+/* 7.18.1.1 Exact-width integer types */
+
+typedef signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef short int __int16_t;
+typedef unsigned short int __uint16_t;
+typedef int __int32_t;
+typedef unsigned int __uint32_t;
+#ifdef __COMPILER_INT64__
+typedef __COMPILER_INT64__ __int64_t;
+typedef __COMPILER_UINT64__ __uint64_t;
+#else
+/* LONGLONG */
+typedef long long int __int64_t;
+/* LONGLONG */
+typedef unsigned long long int __uint64_t;
+#endif
+
+#define __BIT_TYPES_DEFINED__
+
+/* 7.18.1.4 Integer types capable of holding object pointers */
+
+typedef int __intptr_t;
+typedef unsigned int __uintptr_t;
+
+#endif /* !_I386_INT_TYPES_H_ */
+#endif /* !__i386__ */
diff --git a/sysutils/xentools33/files/netbsd1-nbsd b/sysutils/xentools33/files/netbsd1-nbsd
new file mode 100644
index 00000000000..90883c018d1
--- /dev/null
+++ b/sysutils/xentools33/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/xentools33/files/qemu-ifup-nbsd b/sysutils/xentools33/files/qemu-ifup-nbsd
new file mode 100755
index 00000000000..eee78765d67
--- /dev/null
+++ b/sysutils/xentools33/files/qemu-ifup-nbsd
@@ -0,0 +1,3 @@
+#!/bin/sh
+ifconfig $1 up
+exec /sbin/brconfig $2 add $1
diff --git a/sysutils/xentools33/files/vif-bridge-nbsd b/sysutils/xentools33/files/vif-bridge-nbsd
new file mode 100644
index 00000000000..2c2b6d0ea37
--- /dev/null
+++ b/sysutils/xentools33/files/vif-bridge-nbsd
@@ -0,0 +1,35 @@
+#!/bin/sh -e
+
+# $NetBSD: vif-bridge-nbsd,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $
+# Called by xenbackendd
+# Usage: vif-bridge 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)
+ xbridge=$(xenstore-read "$xpath/bridge")
+ xfid=$(xenstore-read "$xpath/frontend-id")
+ xhandle=$(xenstore-read "$xpath/handle")
+ iface=xvif$xfid.$xhandle
+ echo ifconfig $iface up
+ ifconfig $iface up
+ brconfig $xbridge add $iface
+ echo brconfig $xbridge add $iface
+ xenstore-write $xpath/hotplug-status connected
+ echo xenstore-write $xpath/hotplug-status connected
+ exit 0
+ ;;
+*)
+ exit 0
+ ;;
+esac
diff --git a/sysutils/xentools33/files/vif-ip-nbsd b/sysutils/xentools33/files/vif-ip-nbsd
new file mode 100755
index 00000000000..b16de280ccc
--- /dev/null
+++ b/sysutils/xentools33/files/vif-ip-nbsd
@@ -0,0 +1,33 @@
+#!/bin/sh -e
+
+# $NetBSD: vif-ip-nbsd,v 1.1.1.1 2008/08/07 20:26:57 cegger 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/xentools33/files/xenbackendd.c b/sysutils/xentools33/files/xenbackendd.c
new file mode 100644
index 00000000000..3eee3c0592f
--- /dev/null
+++ b/sysutils/xentools33/files/xenbackendd.c
@@ -0,0 +1,319 @@
+/* $NetBSD: xenbackendd.c,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $ */
+/*
+ * Copyright (C) 2006 Manuel bouyer
+ *
+ * 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; under version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <err.h>
+#include <errno.h>
+#include <stdio.h>
+#include <getopt.h>
+#include <stdbool.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <string.h>
+#include <syslog.h>
+#include <stdarg.h>
+
+#include <xenctrl.h>
+#include <xs.h>
+
+#define DEVTYPE_UNKNOWN 0
+#define DEVTYPE_VIF 1
+#define DEVTYPE_VBD 2
+
+#define DOMAIN_PATH "/local/domain/0"
+
+#ifndef VBD_SCRIPT
+#define VBD_SCRIPT "/usr/pkg/etc/xen/scripts/block"
+#endif
+#ifndef LOG_FILE
+#define LOG_FILE "/var/log/xenbackendd.log"
+#endif
+#ifndef PID_FILE
+#define PID_FILE "/var/run/xenbackendd.pid"
+#endif
+
+
+struct xs_handle *xs;
+int xc;
+
+int xen_setup(void);
+void dolog(int, const char *, ...);
+void dodebug(const char *, ...);
+void doexec(const char *, const char *, const char *);
+void usage(void);
+
+int fflag = 0;
+int dflag = 0;
+
+const char *vbd_script = NULL;
+const char *log_file = NULL;
+const char *pidfile = NULL;
+int
+main(int argc, char * const argv[])
+{
+ char **vec;
+ unsigned int num;
+ int i;
+ char *s;
+ int state;
+ char *sstate;
+ char *p;
+ char buf[80];
+ int type = DEVTYPE_UNKNOWN;
+ extern char *optarg;
+ extern int optind;
+ int ch;
+ int debug_fd;
+ FILE *pidfile_f;
+
+ while ((ch = getopt(argc, argv, "dfl:p:s:")) != -1) {
+ switch (ch) {
+ case 'd':
+ dflag = 1;
+ break;
+ case 'f':
+ fflag = 1;
+ break;
+ case 'l':
+ log_file = optarg;
+ break;
+ case 'p':
+ pidfile = pidfile;
+ case 's':
+ vbd_script = optarg;
+ break;
+ default:
+ usage();
+ }
+ }
+
+ if (vbd_script == NULL)
+ vbd_script = VBD_SCRIPT;
+ if (pidfile == NULL)
+ pidfile = PID_FILE;
+ if (log_file == NULL)
+ log_file = LOG_FILE;
+
+ openlog("xenbackendd", LOG_PID | LOG_NDELAY, LOG_DAEMON);
+
+ if (fflag == 0) {
+ /* open log file */
+ debug_fd = open(log_file, O_RDWR | O_CREAT | O_TRUNC, 0644);
+ if (debug_fd == -1) {
+ dolog(LOG_ERR, "can't open %s: %s",
+ log_file, strerror(errno));
+ exit(1);
+ }
+ }
+
+ if (fflag == 0) {
+ /* daemonize */
+ pidfile_f = fopen(pidfile, "w");
+ if (pidfile_f == NULL) {
+ dolog(LOG_ERR, "can't open %s: %s",
+ pidfile, strerror(errno));
+ exit(1);
+ }
+ if (daemon(0, 0) < 0) {
+ dolog(LOG_ERR, "can't daemonize: %s",
+ strerror(errno));
+ exit(1);
+ }
+ fprintf(pidfile_f, "%d\n", (int)getpid());
+ fclose(pidfile_f);
+ /* retirect stderr to log file */
+ if (dup2(debug_fd, STDERR_FILENO) < 0) {
+ dolog(LOG_ERR, "can't redirect stderr to %s: %s\n",
+ log_file, strerror(errno));
+ exit(1);
+ }
+ /* also redirect stdout if we're in debug mode */
+ if (dflag) {
+ if (dup2(debug_fd, STDOUT_FILENO) < 0) {
+ dolog(LOG_ERR,
+ "can't redirect stdout to %s: %s\n",
+ log_file, strerror(errno));
+ exit(1);
+ }
+ }
+ close(debug_fd);
+ debug_fd = -1;
+ }
+
+ if (xen_setup() < 0) {
+ exit(1);
+ }
+
+ while (1) {
+ vec = xs_read_watch(xs, &num);
+ if (!vec) {
+ dolog(LOG_ERR, "xs_read_watch: NULL\n");
+ continue;
+ }
+ if (strlen(vec[XS_WATCH_PATH]) < sizeof("state"))
+ goto next1;
+ /* find last component of path, check if it's "state" */
+ p = &vec[XS_WATCH_PATH][
+ strlen(vec[XS_WATCH_PATH]) - sizeof("state")];
+ if (p[0] != '/')
+ goto next1;
+ p[0] = '\0';
+ p++;
+ if (strcmp(p, "state") != 0)
+ goto next1;
+ snprintf(buf, sizeof(buf), "%s/state", vec[XS_WATCH_PATH]);
+ sstate = xs_read(xs, XBT_NULL, buf, 0);
+ if (sstate == NULL) {
+ dolog(LOG_ERR,
+ "Failed to read %s (%s)", buf, strerror(errno));
+ goto next1;
+ }
+ state = atoi(sstate);
+ snprintf(buf, sizeof(buf), "%s/hotplug-status",
+ vec[XS_WATCH_PATH]);
+ s = xs_read(xs, XBT_NULL, buf, 0);
+ if (s != NULL && state != 6 /* XenbusStateClosed */)
+ goto next2;
+ if (strncmp(vec[XS_WATCH_PATH],
+ DOMAIN_PATH "/backend/vif",
+ strlen(DOMAIN_PATH "/backend/vif")) == 0)
+ type = DEVTYPE_VIF;
+ if (strncmp(vec[XS_WATCH_PATH],
+ DOMAIN_PATH "/backend/vbd",
+ strlen(DOMAIN_PATH "/backend/vbd")) == 0)
+ type = DEVTYPE_VBD;
+ switch(type) {
+ case DEVTYPE_VIF:
+ if (s)
+ free(s);
+ snprintf(buf, sizeof(buf), "%s/script",
+ vec[XS_WATCH_PATH]);
+ s = xs_read(xs, XBT_NULL, buf, 0);
+ if (s == NULL) {
+ dolog(LOG_ERR,
+ "Failed to read %s (%s)", buf,
+ strerror(errno));
+ goto next2;
+ }
+ doexec(s, vec[XS_WATCH_PATH], sstate);
+ break;
+ case DEVTYPE_VBD:
+ doexec(vbd_script, vec[XS_WATCH_PATH], sstate);
+ break;
+ default:
+ break;
+ }
+next2:
+ if (s)
+ free(s);
+ free(sstate);
+next1:
+ free(vec);
+ }
+}
+
+void
+dolog(int pri, const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ fprintf(stderr, "\n");
+ fflush(stderr);
+ va_start(ap, fmt);
+ vsyslog(pri, fmt, ap);
+ va_end(ap);
+}
+
+void
+dodebug(const char *fmt, ...)
+{
+ va_list ap;
+
+ if (dflag == 0)
+ return;
+ va_start(ap, fmt);
+ vfprintf(stdout, fmt, ap);
+ va_end(ap);
+ printf("\n");
+ fflush(stdout);
+}
+
+int
+xen_setup(void)
+{
+
+ xs = xs_daemon_open();
+ if (xs == NULL) {
+ dolog(LOG_ERR,
+ "Failed to contact xenstore (%s). Is it running?",
+ strerror(errno));
+ goto out;
+ }
+
+ xc = xc_interface_open();
+ if (xc == -1) {
+ dolog(LOG_ERR, "Failed to contact hypervisor (%s)",
+ strerror(errno));
+ goto out;
+ }
+ if (!xs_watch(xs, DOMAIN_PATH, "backend")) {
+ dolog(LOG_ERR, "xenstore watch on backend fails.");
+ goto out;
+ }
+ return 0;
+ out:
+ if (xs)
+ xs_daemon_close(xs);
+ if (xc != -1)
+ xc_interface_close(xc);
+ return -1;
+}
+
+void
+doexec(const char *cmd, const char *arg1, const char *arg2)
+{
+ dodebug("exec %s %s %s", cmd, arg1, arg2);
+ switch(vfork()) {
+ case -1:
+ dolog(LOG_ERR, "can't vfork: %s", strerror(errno));
+ break;
+ case 0:
+ execl(cmd, cmd, arg1, arg2, NULL);
+ dolog(LOG_ERR, "can't exec %s: %s", cmd, strerror(errno));
+ exit(1);
+ break;
+ default:
+ wait(NULL);
+ break;
+ }
+}
+
+void
+usage(void)
+{
+ fprintf(stderr, "usage: %s [-d] [-f] [-l log_file] [-p pif_file] [-s vbd_script]\n",
+ getprogname());
+ exit(1);
+}
diff --git a/sysutils/xentools33/files/xenbackendd.sh b/sysutils/xentools33/files/xenbackendd.sh
new file mode 100644
index 00000000000..f1256ec3c53
--- /dev/null
+++ b/sysutils/xentools33/files/xenbackendd.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# $NetBSD: xenbackendd.sh,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+#
+
+# PROVIDE: xenbackendd
+# REQUIRE: xend
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="xenbackendd"
+rcvar=$name
+command="@PREFIX@/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/sysutils/xentools33/files/xend.sh b/sysutils/xentools33/files/xend.sh
new file mode 100644
index 00000000000..6526f517bf8
--- /dev/null
+++ b/sysutils/xentools33/files/xend.sh
@@ -0,0 +1,30 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: xend.sh,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+#
+# PROVIDE: xend
+# REQUIRE: disks network
+
+. /etc/rc.subr
+
+name="xend"
+rcvar=$name
+command="@PREFIX@/sbin/xend"
+command_interpreter="@RCD_INTERPRETER@"
+start_cmd="@ECHO@ Starting ${name}. && PATH=${PATH}:@PREFIX@/sbin ${command} start"
+start_precmd="xen_precmd"
+privcmd_path="@PROCPATH@/xen/privcmd"
+
+xen_precmd()
+{
+ if [ ! -f ${privcmd_path} ]; then
+ @ECHO@ "${name}: Cannot find ${privcmd_path}!"
+ exit 1
+ fi
+ mkdir -p /var/run/xend || exit 1
+ mkdir -p /var/run/xend/boot || exit 1
+ mkdir -p /var/run/xenstored || exit 1
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/sysutils/xentools33/files/xendomains.sh b/sysutils/xentools33/files/xendomains.sh
new file mode 100644
index 00000000000..354c98be7da
--- /dev/null
+++ b/sysutils/xentools33/files/xendomains.sh
@@ -0,0 +1,134 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: xendomains.sh,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+#
+# PROVIDE: xendomains
+# REQUIRE: xenbackendd
+# KEYWORD: shutdown
+#
+# xendomains This required variable is a whitespace-separated
+# list of domains, e.g., xendomains="dom1 dom2 dom3".
+#
+# xendomains_config This optional variable is a format string that
+# represents the path to the configuration file for
+# each domain. "%s" is substituted with the name of
+# the domain. The default is "@PKG_SYSCONFDIR@/%s".
+#
+# xendomains_prehook This optional variable is a format string that
+# represents the command to run, if it exists, before
+# starting each domain. "%s" is substituted with the
+# name of the domain. The default is
+# "@PKG_SYSCONFDIR@/%s-pre".
+#
+# xendomains_posthook This optional variable is a format string that
+# represents the command to run, if it exists, after
+# stopping each domain. "%s" is substituted with the
+# name of the domain. The default is
+# "@PKG_SYSCONFDIR@/%s-post".
+#
+
+. /etc/rc.subr
+
+name="xendomains"
+ctl_command="@PREFIX@/sbin/xm"
+start_cmd="xendomains_start"
+stop_cmd="xendomains_stop"
+list_cmd="xendomains_list"
+extra_commands="list"
+privcmd_path="@PROCPATH@/xen/privcmd"
+
+xendomains_start()
+{
+ [ -n "$xendomains" ] || return
+
+ if [ ! -f ${privcmd_path} ]; then
+ echo "${name}: Cannot find ${privcmd_path}!"
+ exit 1
+ fi
+
+ echo "Starting xen domains."
+ for domain in $xendomains; do
+ case "$domain" in
+ "") continue ;;
+ esac
+
+ # Start off by running the pre-hook script if it's present.
+ if [ -n "${xendomains_prehook}" ]; then
+ cmdline=`printf "${xendomains_prehook}" $domain`
+ cmd="${cmdline%% *}"
+ if [ -x "$cmd" ]; then
+ $cmdline || echo "Pre-hook \`\`$cmdline'' failed... skipping $domain."
+ continue
+ fi
+ fi
+
+ # Ask xend to create the domain.
+ if [ -n "${xendomains_config}" ]; then
+ file=`printf "${xendomains_config}" $domain`
+ if [ -f "$file" ]; then
+ ${ctl_command} create "$file"
+ fi
+ fi
+ done
+}
+
+xendomains_list() {
+ # Output a whitespace-separated list of live guest domains.
+ ${ctl_command} list | awk '
+ (FNR <= 2) { next }
+ ($5 !~ /s/) { s = s " " $1 }
+ END { sub(" *", "", s); print s }'
+}
+
+xendomains_stop()
+{
+ # Determine an appropriate timeout waiting for all domains to
+ # stop -- always wait at least 60s, and add 5s per active domain.
+ #
+ numdomains=$(xendomains_list | awk '{ print NF }')
+ [ $numdomains -gt 0 ] || return
+ timeout=$((60 + numdomains * 5))
+
+ # Ask xend to stop every domain, and poll xend every 10s up to the
+ # timeout period to check if all the domains are stopped. We
+ # consider a domain in the "s" (shutdown) state to be stopped.
+ #
+ echo "Stopping xen domains."
+ for domain in $(xendomains_list); do
+ ${ctl_command} shutdown --halt $domain
+ done
+ while [ $timeout -gt 0 ]; do
+ livedomains=$(xendomains_list)
+ [ -n "$livedomains" ] || break
+ timeout=$((timeout - 10))
+ sleep 10
+ done
+ livedomains=$(xendomains_list)
+ if [ -n "$livedomains" ]; then
+ echo "Failed to stop: $livedomains"
+ else
+ echo "All domains stopped."
+ fi
+
+ # Finish off by running the post-hook script if it's present.
+ for domain in $xendomains; do
+ case "$domain" in
+ "") continue ;;
+ esac
+ if [ -n "${xendomains_posthook}" ]; then
+ cmdline=`printf "${xendomains_posthook}" $domain`
+ cmd="${cmdline%% *}"
+ if [ -x "$cmd" ]; then
+ $cmdline || echo "Post-hook \`\`$cmdline'' failed."
+ fi
+ fi
+ done
+}
+
+load_rc_config $name
+
+: ${xendomains_config="@PKG_SYSCONFDIR@/%s"}
+: ${xendomains_prehook="@PKG_SYSCONFDIR@/%s-pre"}
+: ${xendomains_posthook="@PKG_SYSCONFDIR@/%s-post"}
+
+run_rc_command "$1"
diff --git a/sysutils/xentools33/patches/patch-aa b/sysutils/xentools33/patches/patch-aa
new file mode 100644
index 00000000000..672f304df49
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-aa
@@ -0,0 +1,22 @@
+$NetBSD: patch-aa,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ Makefile
+@@ -8,7 +8,6 @@ SUBDIRS-y += libxc
+ SUBDIRS-y += flask
+ SUBDIRS-y += xenstore
+ SUBDIRS-y += misc
+-SUBDIRS-y += examples
+ SUBDIRS-y += xentrace
+ SUBDIRS-$(CONFIG_XCUTILS) += xcutils
+ SUBDIRS-$(CONFIG_X86) += firmware
+@@ -47,9 +46,6 @@ all: subdirs-all
+
+ .PHONY: install
+ install: subdirs-install
+- $(INSTALL_DIR) $(DESTDIR)/var/xen/dump
+- $(INSTALL_DIR) $(DESTDIR)/var/log/xen
+- $(INSTALL_DIR) $(DESTDIR)/var/lib/xen
+
+ .PHONY: clean distclean
+ clean distclean: subdirs-clean
diff --git a/sysutils/xentools33/patches/patch-ab b/sysutils/xentools33/patches/patch-ab
new file mode 100644
index 00000000000..583b395b08b
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- ../Config.mk.orig 2008-08-07 10:56:22.000000000 +0200
++++ ../Config.mk
+@@ -84,7 +84,7 @@ QEMU_REMOTE=http://xenbits.xensource.com
+
+ # Specify which qemu-dm to use. This may be `ioemu' to use the old
+ # Mercurial in-tree version, or a local directory, or a git URL.
+-# CONFIG_QEMU ?= ioemu
++CONFIG_QEMU ?= ioemu
+ # CONFIG_QEMU ?= ../qemu-xen.git
+ ifeq ($(XEN_TARGET_ARCH),ia64)
+ CONFIG_QEMU ?= ioemu
diff --git a/sysutils/xentools33/patches/patch-ac b/sysutils/xentools33/patches/patch-ac
new file mode 100644
index 00000000000..ef358b226b6
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ac
@@ -0,0 +1,23 @@
+$NetBSD: patch-ac,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- ../config/NetBSD.mk.orig 2008-08-01 14:38:07.000000000 +0000
++++ ../config/NetBSD.mk
+@@ -2,3 +2,18 @@ include $(XEN_ROOT)/config/StdGNU.mk
+
+ # Override settings for this OS
+ CURSES_LIBS = -lcurses
++
++DESTDIR ?= ""
++BINDIR = $(PREFIX)/bin
++INCLUDEDIR = $(PREFIX)/include
++LIBLEAFDIR = lib
++LIBLEAFDIR_x86_64 = lib
++LIBDIR = $(PREFIX)/$(LIBLEAFDIR)
++LIBDIR_x86_64 = $(PREFIX)/$(LIBLEAFDIR_x86_64)
++MANDIR = $(PREFIX)/man
++MAN1DIR = $(MANDIR)/man1
++MAN8DIR = $(MANDIR)/man8
++SBINDIR = $(PREFIX)/sbin
++
++PRIVATE_PREFIX = $(PREFIX)
++PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin
diff --git a/sysutils/xentools33/patches/patch-ad b/sysutils/xentools33/patches/patch-ad
new file mode 100644
index 00000000000..c4ddaabf9cf
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ad
@@ -0,0 +1,16 @@
+$NetBSD: patch-ad,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- console/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ console/Makefile
+@@ -29,7 +29,7 @@ xenconsole: $(patsubst %.c,%.o,$(wildcar
+
+ .PHONY: install
+ install: $(BIN)
+- $(INSTALL_DIR) $(DESTDIR)/$(SBINDIR)
+- $(INSTALL_PROG) xenconsoled $(DESTDIR)/$(SBINDIR)
+- $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
+- $(INSTALL_PROG) xenconsole $(DESTDIR)$(PRIVATE_BINDIR)
++ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)/$(SBINDIR)
++ $(BSD_INSTALL_PROGRAM) xenconsoled $(DESTDIR)/$(SBINDIR)
++ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
++ $(BSD_INSTALL_PROGRAM) xenconsole $(DESTDIR)$(PRIVATE_BINDIR)
diff --git a/sysutils/xentools33/patches/patch-ae b/sysutils/xentools33/patches/patch-ae
new file mode 100644
index 00000000000..833d3b9b868
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ae
@@ -0,0 +1,32 @@
+$NetBSD: patch-ae,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- libxc/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ libxc/Makefile
+@@ -94,19 +94,19 @@ libs: $(LIB)
+
+ .PHONY: install
+ install: build
+- $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
+- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
+- $(INSTALL_PROG) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
+- $(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(LIBDIR)
++ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(LIBDIR)
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)
++ $(BSD_INSTALL_LIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
++ $(BSD_INSTALL_LIB) libxenctrl.a $(DESTDIR)$(LIBDIR)
+ ln -sf libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so.$(MAJOR)
+ ln -sf libxenctrl.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so
+- $(INSTALL_DATA) xenctrl.h $(DESTDIR)$(INCLUDEDIR)
++ $(BSD_INSTALL_DATA) xenctrl.h $(DESTDIR)$(INCLUDEDIR)
+
+- $(INSTALL_PROG) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
+- $(INSTALL_DATA) libxenguest.a $(DESTDIR)$(LIBDIR)
++ $(BSD_INSTALL_LIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
++ $(BSD_INSTALL_LIB) libxenguest.a $(DESTDIR)$(LIBDIR)
+ ln -sf libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenguest.so.$(MAJOR)
+ ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenguest.so
+- $(INSTALL_DATA) xenguest.h $(DESTDIR)$(INCLUDEDIR)
++ $(BSD_INSTALL_DATA) xenguest.h $(DESTDIR)$(INCLUDEDIR)
+
+ .PHONY: TAGS
+ TAGS:
diff --git a/sysutils/xentools33/patches/patch-af b/sysutils/xentools33/patches/patch-af
new file mode 100644
index 00000000000..162457cee14
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-af
@@ -0,0 +1,39 @@
+$NetBSD: patch-af,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- misc/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ misc/Makefile
+@@ -14,12 +14,14 @@ TARGETS-y := xenperf
+ TARGETS-$(CONFIG_X86) += xen-detect
+ TARGETS := $(TARGETS-y)
+
+-SUBDIRS-$(CONFIG_LOMOUNT) += lomount
++#SUBDIRS-$(CONFIG_LOMOUNT) += lomount
+ SUBDIRS-$(CONFIG_MINITERM) += miniterm
+ SUBDIRS := $(SUBDIRS-y)
+
+-INSTALL_BIN = $(TARGETS) xencons
+-INSTALL_SBIN = netfix xm xen-bugtool xen-python-path xend xenperf xsview
++INSTALL_BIN = $(TARGETS)
++INSTALL_BIN_SCRIPT = xencons
++INSTALL_SBIN = xenperf
++INSTALL_SBIN_SCRIPT = netfix xm xen-bugtool xen-python-path xend xsview
+
+ DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path)
+ PYTHON_PATH ?= $(DEFAULT_PYTHON_PATH)
+@@ -35,10 +37,12 @@ build: $(TARGETS)
+
+ .PHONY: install
+ install: build
+- $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
+- $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
+- $(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(BINDIR)
+- $(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(SBINDIR)
++ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(BINDIR)
++ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(SBINDIR)
++ $(BSD_INSTALL_PROGRAM) $(INSTALL_BIN) $(DESTDIR)$(BINDIR)
++ $(BSD_INSTALL_SCRIPT) $(INSTALL_BIN_SCRIPT) $(DESTDIR)$(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(INSTALL_SBIN) $(DESTDIR)$(SBINDIR)
++ $(BSD_INSTALL_SCRIPT) $(INSTALL_SBIN_SCRIPT) $(DESTDIR)$(SBINDIR)
+ set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d install-recurse; done
+
+ .PHONY: clean
diff --git a/sysutils/xentools33/patches/patch-ag b/sysutils/xentools33/patches/patch-ag
new file mode 100644
index 00000000000..3b8cd0f5977
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ag
@@ -0,0 +1,28 @@
+$NetBSD: patch-ag,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- xentrace/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ xentrace/Makefile
+@@ -35,14 +35,15 @@ build: $(BIN) $(LIBBIN)
+
+ .PHONY: install
+ install: build
+- $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
+- [ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
+- $(INSTALL_DIR) $(DESTDIR)$(MAN1DIR)
+- $(INSTALL_DIR) $(DESTDIR)$(MAN8DIR)
+- $(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR)
+- [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(PRIVATE_BINDIR)
+- $(INSTALL_DATA) $(MAN1) $(DESTDIR)$(MAN1DIR)
+- $(INSTALL_DATA) $(MAN8) $(DESTDIR)$(MAN8DIR)
++ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(BINDIR)
++ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(MAN1DIR)
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(MAN8DIR)
++ $(BSD_INSTALL_PROGRAM) $(BIN) $(DESTDIR)$(BINDIR)
++ $(BSD_INSTALL_DATA) $(SCRIPTS) $(DESTDIR)$(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(LIBBIN) $(DESTDIR)$(PRIVATE_BINDIR)
++ $(BSD_INSTALL_DATA) $(MAN1) $(DESTDIR)$(MAN1DIR)
++ $(BSD_INSTALL_DATA) $(MAN8) $(DESTDIR)$(MAN8DIR)
+
+ .PHONY: clean
+ clean:
diff --git a/sysutils/xentools33/patches/patch-ah b/sysutils/xentools33/patches/patch-ah
new file mode 100644
index 00000000000..90e97460691
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ah
@@ -0,0 +1,23 @@
+$NetBSD: patch-ah,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- xenmon/Makefile.orig 2008-08-07 10:56:22.000000000 +0200
++++ xenmon/Makefile
+@@ -29,12 +29,12 @@ build: $(BIN)
+
+ .PHONY: install
+ install: build
+- $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
+- $(INSTALL_PROG) xenbaked $(DESTDIR)$(SBINDIR)/xenbaked
+- $(INSTALL_PROG) xentrace_setmask $(DESTDIR)$(SBINDIR)/xentrace_setmask
+- $(INSTALL_PROG) xenmon.py $(DESTDIR)$(SBINDIR)/xenmon.py
+- $(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
+- $(INSTALL_DATA) README $(DESTDIR)$(DOCDIR)/README.xenmon
++ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(SBINDIR)
++ $(BSD_INSTALL_PROGRAM) xenbaked $(DESTDIR)$(SBINDIR)/xenbaked
++ $(BSD_INSTALL_PROGRAM) xentrace_setmask $(DESTDIR)$(SBINDIR)/xentrace_setmask
++ $(BSD_INSTALL_DATA) xenmon.py $(DESTDIR)$(SBINDIR)/xenmon.py
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(DOCDIR)
++ $(BSD_INSTALL_DATA) README $(DESTDIR)$(DOCDIR)/README.xenmon
+
+ .PHONY: clean
+ clean:
diff --git a/sysutils/xentools33/patches/patch-ai b/sysutils/xentools33/patches/patch-ai
new file mode 100644
index 00000000000..b429650b69f
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ai
@@ -0,0 +1,16 @@
+$NetBSD: patch-ai,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- blktap/drivers/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ blktap/drivers/Makefile
+@@ -37,9 +37,11 @@ BLK-OBJS-y += block-qcow2.o
+ BLK-OBJS-y += aes.o
+ BLK-OBJS-y += tapaio.o
+ BLK-OBJS-$(CONFIG_Linux) += blk_linux.o
++BLK-OBJS-$(CONFIG_NetBSD) += blk_netbsd.o
+
+ BLKTAB-OBJS-y := blktapctrl.o
+ BLKTAB-OBJS-$(CONFIG_Linux) += blktapctrl_linux.o
++BLKTAB-OBJS-$(CONFIG_NetBSD) += blktapctrl_netbsd.o
+
+ all: $(IBIN) qcow-util
+
diff --git a/sysutils/xentools33/patches/patch-aj b/sysutils/xentools33/patches/patch-aj
new file mode 100644
index 00000000000..4c9077f9291
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-aj
@@ -0,0 +1,58 @@
+$NetBSD: patch-aj,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- libxc/xc_netbsd.c.orig 2008-08-01 16:38:07.000000000 +0200
++++ libxc/xc_netbsd.c
+@@ -263,6 +263,53 @@ void discard_file_cache(int fd, int flus
+ }
+ }
+
++int xc_gnttab_open(void)
++{
++ /* implement me */
++ return -1;
++}
++
++int xc_gnttab_close(int xcg_handle)
++{
++ /* implement me */
++ return -1;
++}
++
++void *xc_gnttab_map_grant_ref(int xcg_handle, uint32_t domid,
++ uint32_t ref, int prot)
++{
++ /* implement me */
++ return NULL;
++}
++
++void *xc_gnttab_map_grant_refs(int xcg_handle, uint32_t count,
++ uint32_t *domids, uint32_t *refs, int prot)
++{
++ /* implement me */
++ return NULL;
++}
++
++void *xc_gnttab_map_domain_grant_refs(int xcg_handle,
++ uint32_t count, uint32_t domid,
++ uint32_t *refs, int prot)
++{
++ /* implement me */
++ return NULL;
++}
++
++int xc_gnttab_munmap(int xcg_handle, void *start_address, uint32_t count)
++{
++ /* implement me */
++ errno = EINVAL;
++ return -1;
++}
++
++int xc_gnttab_set_max_grants(int xcg_handle, uint32_t count)
++{
++ /* implement me */
++ return -1;
++}
++
+ /*
+ * Local variables:
+ * mode: C
diff --git a/sysutils/xentools33/patches/patch-ba b/sysutils/xentools33/patches/patch-ba
new file mode 100644
index 00000000000..43e09fea1f5
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ba
@@ -0,0 +1,45 @@
+$NetBSD: patch-ba,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- python/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ python/Makefile
+@@ -20,7 +20,7 @@ PODIR := xen/xm/messages
+ POTFILE := $(PODIR)/xen-xm.pot
+ I18NSRCFILES = $(shell find xen/xm/ -name '*.py')
+ CATALOGS = $(patsubst %,xen/xm/messages/%.mo,$(LINGUAS))
+-NLSDIR = /usr/share/locale
++NLSDIR = $(PREFIX)/share/locale
+
+ .PHONY: build buildpy
+ buildpy: xsm.py
+@@ -77,23 +77,23 @@ xsm.py:
+ ifndef XEN_PYTHON_NATIVE_INSTALL
+ install: LIBPATH=$(shell PYTHONPATH=xen/util python -c "import auxbin; print auxbin.libpath()")
+ install: install-messages install-dtd
+- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force --install-lib="$(DESTDIR)$(LIBPATH)/python"
++ python setup.py install --root=${DESTDIR}
+ else
+ install: install-messages install-dtd
+- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
++ python setup.py install --root=${DESTDIR}
+ endif
+
+ install-dtd: all
+- $(INSTALL_DIR) $(DESTDIR)/usr/share/xen
+- $(INSTALL_DATA) xen/xm/create.dtd $(DESTDIR)/usr/share/xen
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(PREFIX)/share/xen
++ $(BSD_INSTALL_DATA) xen/xm/create.dtd $(DESTDIR)$(PREFIX)/share/xen
+
+ install-messages: all
+ set -e; if which $(MSGFMT) >/dev/null ; then \
+- mkdir -p $(DESTDIR)$(NLSDIR); \
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(NLSDIR); \
+ for l in $(LINGUAS); do \
+- $(INSTALL_DIR) $(DESTDIR)$(NLSDIR)/$$l; \
+- $(INSTALL_DIR) $(DESTDIR)$(NLSDIR)/$$l/LC_MESSAGES; \
+- $(INSTALL_DATA) $(PODIR)/$$l.mo \
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(NLSDIR)/$$l; \
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(NLSDIR)/$$l/LC_MESSAGES; \
++ $(BSD_INSTALL_DATA) $(PODIR)/$$l.mo \
+ $(DESTDIR)$(NLSDIR)/$$l/LC_MESSAGES/$(POPACKAGE).mo; \
+ done ; \
+ fi
diff --git a/sysutils/xentools33/patches/patch-bb b/sysutils/xentools33/patches/patch-bb
new file mode 100644
index 00000000000..a10755862fb
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-bb
@@ -0,0 +1,13 @@
+$NetBSD: patch-bb,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- python/xen/xend/XendOptions.py.orig 2008-08-01 16:38:07.000000000 +0200
++++ python/xen/xend/XendOptions.py
+@@ -362,7 +362,7 @@ class XendOptions:
+ class XendOptionsFile(XendOptions):
+
+ """Default path to the config file."""
+- config_default = "/etc/xen/xend-config.sxp"
++ config_default = "@XENDCONFDIR@/xend-config.sxp"
+
+ """Environment variable used to override config_default."""
+ config_var = "XEND_CONFIG"
diff --git a/sysutils/xentools33/patches/patch-bc b/sysutils/xentools33/patches/patch-bc
new file mode 100644
index 00000000000..8e273507047
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-bc
@@ -0,0 +1,22 @@
+$NetBSD: patch-bc,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- python/xen/xm/create.py.orig 2008-08-01 16:38:07.000000000 +0200
++++ python/xen/xm/create.py
+@@ -70,7 +70,7 @@ gopts.opt('quiet', short='q',
+ 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.")
+
+@@ -375,7 +375,7 @@ gopts.var('vtpm', val="instance=INSTANCE
+ preferred instance number. The hotplug script will determine
+ which instance number will actually be assigned to the domain.
+ The associtation between virtual machine and the TPM instance
+- number can be found in /etc/xen/vtpm.db. Use the backend in the
++ number can be found in @XENDCONFDIR@/vtpm.db. Use the backend in the
+ given domain.
+ The type parameter can be used to select a specific driver type
+ that the VM can use. To prevent a fully virtualized domain (HVM)
diff --git a/sysutils/xentools33/patches/patch-bd b/sysutils/xentools33/patches/patch-bd
new file mode 100644
index 00000000000..fbba10008b8
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-bd
@@ -0,0 +1,13 @@
+$NetBSD: patch-bd,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- python/xen/xm/addlabel.py.orig 2008-08-01 16:38:07.000000000 +0200
++++ python/xen/xm/addlabel.py
+@@ -220,7 +220,7 @@ def main(argv):
+ if argv[2].lower() == "dom":
+ configfile = argv[3]
+ if configfile[0] != '/':
+- for prefix in [os.path.realpath(os.path.curdir), "/etc/xen"]:
++ for prefix in [os.path.realpath(os.path.curdir), "@XENDCONFDIR@"]:
+ configfile = prefix + "/" + configfile
+ if os.path.isfile(configfile):
+ break
diff --git a/sysutils/xentools33/patches/patch-be b/sysutils/xentools33/patches/patch-be
new file mode 100644
index 00000000000..092480ff20c
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-be
@@ -0,0 +1,13 @@
+$NetBSD: patch-be,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- python/xen/xm/getlabel.py.orig 2008-08-01 16:38:07.000000000 +0200
++++ python/xen/xm/getlabel.py
+@@ -59,7 +59,7 @@ def get_domain_label(configfile):
+ 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/xentools33/patches/patch-bf b/sysutils/xentools33/patches/patch-bf
new file mode 100644
index 00000000000..bb3acc3a704
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-bf
@@ -0,0 +1,13 @@
+$NetBSD: patch-bf,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- python/xen/xm/rmlabel.py.orig 2008-08-01 16:38:07.000000000 +0200
++++ python/xen/xm/rmlabel.py
+@@ -81,7 +81,7 @@ def rm_domain_label(configfile):
+ fil = configfile
+ fd = open(fil, "rb")
+ else:
+- for prefix in [".", "/etc/xen"]:
++ for prefix in [".", "@XENDCONFDIR@"]:
+ fil = prefix + "/" + configfile
+ if os.path.isfile(fil):
+ fd = open(fil, "rb")
diff --git a/sysutils/xentools33/patches/patch-bg b/sysutils/xentools33/patches/patch-bg
new file mode 100644
index 00000000000..a612122b7b2
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-bg
@@ -0,0 +1,15 @@
+$NetBSD: patch-bg,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- xcutils/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ xcutils/Makefile
+@@ -33,8 +33,8 @@ $(PROGRAMS): %: %.o
+
+ .PHONY: install
+ install: build
+- $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
+- $(INSTALL_PROG) $(PROGRAMS) $(DESTDIR)$(PRIVATE_BINDIR)
++ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(PRIVATE_BINDIR)
+
+
+ .PHONY: clean
diff --git a/sysutils/xentools33/patches/patch-bh b/sysutils/xentools33/patches/patch-bh
new file mode 100644
index 00000000000..aa4f54238fe
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-bh
@@ -0,0 +1,19 @@
+$NetBSD: patch-bh,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- xenstat/xentop/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ xenstat/xentop/Makefile
+@@ -28,10 +28,10 @@ all: xentop
+
+ .PHONY: install
+ install: xentop xentop.1
+- $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
+- $(INSTALL_PROG) xentop $(DESTDIR)$(SBINDIR)/xentop
+- $(INSTALL_DIR) $(DESTDIR)$(MAN1DIR)
+- $(INSTALL_DATA) xentop.1 $(DESTDIR)$(MAN1DIR)/xentop.1
++ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(SBINDIR)
++ $(BSD_INSTALL_PROGRAM) xentop $(DESTDIR)$(SBINDIR)/xentop
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(MAN1DIR)
++ $(BSD_INSTALL_DATA) xentop.1 $(DESTDIR)$(MAN1DIR)/xentop.1
+
+ endif
+
diff --git a/sysutils/xentools33/patches/patch-bi b/sysutils/xentools33/patches/patch-bi
new file mode 100644
index 00000000000..3014c1b3ced
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-bi
@@ -0,0 +1,43 @@
+$NetBSD: patch-bi,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- xenstore/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ xenstore/Makefile
+@@ -94,24 +94,24 @@ tarball: clean
+
+ .PHONY: install
+ install: all
+- $(INSTALL_DIR) $(DESTDIR)/var/run/xenstored
+- $(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored
+- $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
+- $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
+- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
+- $(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR)
+- $(INSTALL_PROG) xenstore-control $(DESTDIR)$(BINDIR)
+- $(INSTALL_PROG) xenstore $(DESTDIR)/usr/bin
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)/var/run/xenstored
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)/var/lib/xenstored
++ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(BINDIR)
++ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(SBINDIR)
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)
++ $(BSD_INSTALL_PROGRAM) xenstored $(DESTDIR)$(SBINDIR)
++ $(BSD_INSTALL_PROGRAM) xenstore-control $(DESTDIR)$(BINDIR)
++ $(BSD_INSTALL_PROGRAM) xenstore $(DESTDIR)$(BINDIR)
+ set -e ; for c in $(CLIENTS) ; do \
+- ln -f $(DESTDIR)/usr/bin/xenstore $(DESTDIR)/usr/bin/$${c} ; \
++ ln -f $(DESTDIR)$(BINDIR)/xenstore $(DESTDIR)$(BINDIR)/$${c} ; \
+ done
+- $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
+- $(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
++ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(LIBDIR)
++ $(BSD_INSTALL_LIB) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
+ ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR)
+ ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenstore.so
+- $(INSTALL_DATA) libxenstore.a $(DESTDIR)$(LIBDIR)
+- $(INSTALL_DATA) xs.h $(DESTDIR)$(INCLUDEDIR)
+- $(INSTALL_DATA) xs_lib.h $(DESTDIR)$(INCLUDEDIR)
++ $(BSD_INSTALL_LIB) libxenstore.a $(DESTDIR)$(LIBDIR)
++ $(BSD_INSTALL_DATA) xs.h $(DESTDIR)$(INCLUDEDIR)
++ $(BSD_INSTALL_DATA) xs_lib.h $(DESTDIR)$(INCLUDEDIR)
+
+ -include $(DEP)
+
diff --git a/sysutils/xentools33/patches/patch-bj b/sysutils/xentools33/patches/patch-bj
new file mode 100644
index 00000000000..9d56e6da060
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-bj
@@ -0,0 +1,56 @@
+$NetBSD: patch-bj,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- python/xen/xend/XendNode.py.orig 2008-08-01 14:38:07.000000000 +0000
++++ python/xen/xend/XendNode.py
+@@ -245,28 +245,29 @@ class XendNode:
+ except KeyError:
+ pass
+
+- for pci_dev in PciUtil.get_all_pci_devices():
+- ppci_record = {
+- 'domain': pci_dev.domain,
+- 'bus': pci_dev.bus,
+- 'slot': pci_dev.slot,
+- 'func': pci_dev.func,
+- 'vendor_id': pci_dev.vendor,
+- 'vendor_name': pci_dev.vendorname,
+- 'device_id': pci_dev.device,
+- 'device_name': pci_dev.devicename,
+- 'revision_id': pci_dev.revision,
+- 'class_code': pci_dev.classcode,
+- 'class_name': pci_dev.classname,
+- 'subsystem_vendor_id': pci_dev.subvendor,
+- 'subsystem_vendor_name': pci_dev.subvendorname,
+- 'subsystem_id': pci_dev.subdevice,
+- 'subsystem_name': pci_dev.subdevicename,
+- 'driver': pci_dev.driver
+- }
+- # If saved uuid exists, use it. Otherwise create one.
+- ppci_uuid = saved_ppci_table.get(pci_dev.name, uuid.createString())
+- XendPPCI(ppci_uuid, ppci_record)
++ pass
++ #for pci_dev in PciUtil.get_all_pci_devices():
++ # ppci_record = {
++ # 'domain': pci_dev.domain,
++ # 'bus': pci_dev.bus,
++ # 'slot': pci_dev.slot,
++ # 'func': pci_dev.func,
++ # 'vendor_id': pci_dev.vendor,
++ # 'vendor_name': pci_dev.vendorname,
++ # 'device_id': pci_dev.device,
++ # 'device_name': pci_dev.devicename,
++ # 'revision_id': pci_dev.revision,
++ # 'class_code': pci_dev.classcode,
++ # 'class_name': pci_dev.classname,
++ # 'subsystem_vendor_id': pci_dev.subvendor,
++ # 'subsystem_vendor_name': pci_dev.subvendorname,
++ # 'subsystem_id': pci_dev.subdevice,
++ # 'subsystem_name': pci_dev.subdevicename,
++ # 'driver': pci_dev.driver
++ # }
++ # # If saved uuid exists, use it. Otherwise create one.
++ # ppci_uuid = saved_ppci_table.get(pci_dev.name, uuid.createString())
++ # XendPPCI(ppci_uuid, ppci_record)
+
+
+ ## def network_destroy(self, net_uuid):
diff --git a/sysutils/xentools33/patches/patch-ca b/sysutils/xentools33/patches/patch-ca
new file mode 100644
index 00000000000..e0df42e8b4a
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ca
@@ -0,0 +1,17 @@
+$NetBSD: patch-ca,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- python/xen/util/auxbin.py.orig 2008-08-01 16:38:07.000000000 +0200
++++ python/xen/util/auxbin.py
+@@ -16,9 +16,9 @@
+ #============================================================================
+
+
+-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_64 directory is used. This
+ # deliberately excludes ia64 and ppc64, and Solaris.
diff --git a/sysutils/xentools33/patches/patch-cb b/sysutils/xentools33/patches/patch-cb
new file mode 100644
index 00000000000..22bc52aa55c
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-cb
@@ -0,0 +1,90 @@
+$NetBSD: patch-cb,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- python/xen/xend/osdep.py.orig 2008-08-01 14:38:07.000000000 +0000
++++ python/xen/xend/osdep.py
+@@ -22,6 +22,7 @@ import os
+ _scripts_dir = {
+ "Linux": "/etc/xen/scripts",
+ "SunOS": "/usr/lib/xen/scripts",
++ "NetBSD": "@XENDCONFDIR@/scripts",
+ }
+
+ _xend_autorestart = {
+@@ -31,7 +32,8 @@ _xend_autorestart = {
+ }
+
+ _pygrub_path = {
+- "SunOS": "/usr/lib/xen/bin/pygrub"
++ "SunOS": "/usr/lib/xen/bin/pygrub",
++ "NetBSD": "@PREFIX@/bin/pygrub",
+ }
+
+ _vif_script = {
+@@ -62,6 +64,19 @@ def _linux_balloon_stat(label):
+ finally:
+ f.close()
+
++def _netbsd_balloon_stat(label):
++ """Returns the value for the named label, or None if an error occurs."""
++
++ import commands
++
++ if label != 'current':
++ return None
++ cmd = "/sbin/sysctl hw.physmem64"
++ sysctloutput = commands.getoutput(cmd)
++ (name, value) = sysctloutput.split('=')
++ """Return value in KB."""
++ return int(value) / 1024
++
+ def _solaris_balloon_stat(label):
+ """Returns the value for the named label, or None if an error occurs."""
+
+@@ -90,7 +105,8 @@ def _solaris_balloon_stat(label):
+ f.close()
+
+ _balloon_stat = {
+- "SunOS": _solaris_balloon_stat
++ "SunOS": _solaris_balloon_stat,
++ "NetBSD": _netbsd_balloon_stat,
+ }
+
+ def _linux_get_cpuinfo():
+@@ -117,13 +133,36 @@ def _linux_get_cpuinfo():
+ finally:
+ f.close()
+
++def _netbsd_get_cpuinfo():
++ import commands
++ cpuinfo = {}
++
++ cmd = "/sbin/sysctl hw.ncpu"
++ sysctloutput = commands.getoutput(cmd)
++ (name, ncpu) = sysctloutput.split('=')
++
++ for i in range(int(ncpu)):
++ if not cpuinfo.has_key(i):
++ cpuinfo[i] = {}
++
++ # Translate NetBSD tokens into what xend expects
++ for key in cpuinfo.keys():
++ cpuinfo[key]['flags'] = ""
++ cpuinfo[key]['vendor_id'] = ""
++ cpuinfo[key]['model name'] = ""
++ cpuinfo[key]['stepping'] = ""
++ cpuinfo[key]['cpu MHz'] = 0
++
++ return cpuinfo
++
+ _get_cpuinfo = {
++ "NetBSD": _netbsd_get_cpuinfo,
+ }
+
+ def _get(var, default=None):
+ return var.get(os.uname()[0], default)
+
+-scripts_dir = _get(_scripts_dir, "/etc/xen/scripts")
++scripts_dir = _get(_scripts_dir, "@XENDCONFDIR@/scripts")
+ xend_autorestart = _get(_xend_autorestart)
+ pygrub_path = _get(_pygrub_path, "/usr/bin/pygrub")
+ vif_script = _get(_vif_script, "vif-bridge")
diff --git a/sysutils/xentools33/patches/patch-cc b/sysutils/xentools33/patches/patch-cc
new file mode 100644
index 00000000000..95b74d9cf66
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-cc
@@ -0,0 +1,47 @@
+$NetBSD: patch-cc,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- ../docs/man/xend-config.sxp.pod.5.orig 2008-08-01 16:38:07.000000000 +0200
++++ ../docs/man/xend-config.sxp.pod.5
+@@ -4,7 +4,7 @@ xend-config.sxp - Xen daemon configurati
+
+ =head1 SYNOPSIS
+
+-/etc/xen/xend-config.sxp
++@XENDCONFDIR@/xend-config.sxp
+
+ =head1 DESCRIPTION
+
+@@ -12,7 +12,7 @@ The xend(1) program requires xend-config
+ parameters which determine the behavior of the daemon at runtime.
+
+ The parameters are specified in S-expression format. See the example
+-configuration file in I</etc/xen/xend-config.sxp> for details.
++configuration file in I<@XENDCONFDIR@/xend-config.sxp> for details.
+
+ =head1 OPTIONS
+
+@@ -82,13 +82,13 @@ Defaults to I<1024>.
+
+ =item I<network-script>
+
+-The name of the script in I</etc/xen/scripts> that will be run to
++The name of the script in I<@XENDCONFDIR@/scripts> that will be run to
+ setup the networking environment. This can be any name, but in
+ general is either I<network-bridge> or I<network-route>.
+
+ =item I<vif-script>
+
+-The name of the script in I</etc/xen/scripts> that will be run to
++The name of the script in I<@XENDCONFDIR@/scripts> that will be run to
+ setup a virtual interface when it is created or destroyed. This needs
+ to (in general) work in unison with the I<network-script>.
+
+@@ -113,7 +113,7 @@ domains should be saved when a crash occ
+
+ The name of an application or script that can handle external device
+ migration, such as for example virtual TPM migration. An example
+-script is I</etc/xen/scripts/external-device-migrate>.
++script is I<@XENDCONFDIR@/scripts/external-device-migrate>.
+
+ =back
+
diff --git a/sysutils/xentools33/patches/patch-cd b/sysutils/xentools33/patches/patch-cd
new file mode 100644
index 00000000000..d236276b8d3
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-cd
@@ -0,0 +1,36 @@
+$NetBSD: patch-cd,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- ../docs/man/xmdomain.cfg.pod.5.orig 2008-08-01 16:38:07.000000000 +0200
++++ ../docs/man/xmdomain.cfg.pod.5
+@@ -4,9 +4,9 @@ xmdomain.cfg - xm domain config file for
+
+ =head1 SYNOPSIS
+
+- /etc/xen/myxendomain
+- /etc/xen/myxendomain2
+- /etc/xen/auto/myxenautostarted
++ @XENDCONFDIR@/myxendomain
++ @XENDCONFDIR@/myxendomain2
++ @XENDCONFDIR@/auto/myxenautostarted
+
+ =head1 DESCRIPTION
+
+@@ -14,14 +14,14 @@ The B<xm>(1) program uses python executa
+ domains to create from scratch. Each of these config files needs to
+ contain a number of required options, and may specify many more.
+
+-Domain configuration files live in /etc/xen by default, if you store
++Domain configuration files live in @XENDCONFDIR@ by default, if you store
+ config files anywhere else the full path to the config file must be
+ specified in the I<xm create> command.
+
+-/etc/xen/auto is a special case. Domain config files in that
++@XENDCONFDIR@/auto is a special case. Domain config files in that
+ directory will be started automatically at system boot if the
+-xendomain init script is enabled. The contents of /etc/xen/auto
+-should be symlinks to files in /etc/xen to allow I<xm create> to be
++xendomain init script is enabled. The contents of @XENDCONFDIR@/auto
++should be symlinks to files in @XENDCONFDIR@ to allow I<xm create> to be
+ used without full paths.
+
+ Options are specified by I<name = value> statements in the
diff --git a/sysutils/xentools33/patches/patch-ce b/sysutils/xentools33/patches/patch-ce
new file mode 100644
index 00000000000..50e030ffc17
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ce
@@ -0,0 +1,31 @@
+$NetBSD: patch-ce,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- ../docs/man/xm.pod.1.orig 2008-08-01 16:38:07.000000000 +0200
++++ ../docs/man/xm.pod.1
+@@ -76,7 +76,7 @@ format, and possible options used in eit
+ I<name>=I<value> combinations.
+
+ I<configfile> can either be an absolute path to a file, or a relative
+-path to a file located in /etc/xen.
++path to a file located in @XENDCONFDIR@.
+
+ Create will return B<as soon> as the domain is started. This B<does
+ not> mean the guest OS in the domain has actually booted, or is
+@@ -101,7 +101,7 @@ B<EXAMPLES>
+
+ xm create Fedora4
+
+-This creates a domain with the file /etc/xen/Fedora4, and returns as
++This creates a domain with the file @XENDCONFDIR@/Fedora4, and returns as
+ soon as it is run.
+
+ =item I<without config file>
+@@ -842,7 +842,7 @@ I<policy> is a dot-separated list of nam
+ name pre-fix for the policy XML file. The preceding name parts are
+ translated into the local path pointing to the policy XML file
+ relative to the global policy root directory
+-(/etc/xen/acm-security/policies). For example,
++(@XENDCONFDIR@/acm-security/policies). For example,
+ example.chwall_ste.client_v1 denotes the policy file
+ example/chwall_ste/client_v1-security_policy.xml relative to the
+ global policy root directory.
diff --git a/sysutils/xentools33/patches/patch-cf b/sysutils/xentools33/patches/patch-cf
new file mode 100644
index 00000000000..2b3627ff621
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-cf
@@ -0,0 +1,12 @@
+$NetBSD: patch-cf,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- misc/xen-python-path.orig 2008-08-01 16:38:07.000000000 +0200
++++ misc/xen-python-path
+@@ -32,6 +32,7 @@ usr = os.path.dirname(os.path.dirname(
+ list = [ os.path.join(usr,'lib64') ]
+ list += [ os.path.join(usr,'lib') ]
+ list += ['/usr/lib64', '/usr/lib']
++list += ['@PREFIX@/lib']
+
+ for l in list:
+ for p in ['python%s' % sys.version[:3], 'python']:
diff --git a/sysutils/xentools33/patches/patch-cg b/sysutils/xentools33/patches/patch-cg
new file mode 100644
index 00000000000..c437de49af2
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-cg
@@ -0,0 +1,15 @@
+$NetBSD: patch-cg,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- libfsimage/Rules.mk.orig 2008-08-01 16:38:07.000000000 +0200
++++ libfsimage/Rules.mk
+@@ -21,8 +21,8 @@ fs-all: $(FSLIB)
+
+ .PHONY: fs-install
+ fs-install: fs-all
+- $(INSTALL_DIR) $(DESTDIR)$(FSDIR)
+- $(INSTALL_PROG) $(FSLIB) $(DESTDIR)$(FSDIR)
++ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(FSDIR)
++ $(BSD_INSTALL_LIB) $(FSLIB) $(DESTDIR)$(FSDIR)
+
+ $(FSLIB): $(PIC_OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS)
diff --git a/sysutils/xentools33/patches/patch-da b/sysutils/xentools33/patches/patch-da
new file mode 100644
index 00000000000..058b6dda183
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-da
@@ -0,0 +1,34 @@
+$NetBSD: patch-da,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- libfsimage/common/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ libfsimage/common/Makefile
+@@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk
+ MAJOR = 1.0
+ MINOR = 0
+
+-CFLAGS += -Werror -Wp,-MD,.$(@F).d
++CFLAGS += -Werror -Wp,-MD,.$(@F).d -DFSIMAGE_FSDIR=\"$(LIBDIR)/fs\"
+ DEPS = .*.d
+
+ LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
+@@ -22,14 +22,14 @@ all: $(LIB)
+
+ .PHONY: install
+ install: all
+- $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
+- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
+- $(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
++ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(LIBDIR)
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)
++ $(BSD_INSTALL_LIB) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
+ ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libfsimage.so.$(MAJOR)
+ ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libfsimage.so
+- $(INSTALL_DATA) fsimage.h $(DESTDIR)$(INCLUDEDIR)
+- $(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(INCLUDEDIR)
+- $(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(INCLUDEDIR)
++ $(BSD_INSTALL_DATA) fsimage.h $(DESTDIR)$(INCLUDEDIR)
++ $(BSD_INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(INCLUDEDIR)
++ $(BSD_INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(INCLUDEDIR)
+
+ clean distclean:
+ rm -f $(PIC_OBJS) $(LIB) $(DEPS)
diff --git a/sysutils/xentools33/patches/patch-db b/sysutils/xentools33/patches/patch-db
new file mode 100644
index 00000000000..0979bd1ac30
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-db
@@ -0,0 +1,22 @@
+$NetBSD: patch-db,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- pygrub/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ pygrub/Makefile
+@@ -10,14 +10,12 @@ build:
+
+ .PHONY: install
+ ifndef XEN_PYTHON_NATIVE_INSTALL
+-install: LIBPATH=$(shell PYTHONPATH=../python/xen/util python -c "import auxbin; print auxbin.libpath()")
++install: LIBPATH=$(shell PYTHONPATH=../py{}thon/xen/util python -c "import auxbin; print auxbin.libpath()")
+ install: all
+- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --install-lib="$(DESTDIR)$(LIBPATH)/python"
+- $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
++ python setup.py install --root=${DESTDIR}
+ else
+ install: all
+- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)"
+- $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
++ python setup.py install --root=${DESTDIR}
+ endif
+
+ .PHONY: clean
diff --git a/sysutils/xentools33/patches/patch-dc b/sysutils/xentools33/patches/patch-dc
new file mode 100644
index 00000000000..362389fac03
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-dc
@@ -0,0 +1,23 @@
+$NetBSD: patch-dc,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- flask/libflask/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ flask/libflask/Makefile
+@@ -33,13 +33,13 @@ build:
+
+ .PHONY: install
+ install: build
+- $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
+- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
+- $(INSTALL_PROG) libflask.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
+- $(INSTALL_DATA) libflask.a $(DESTDIR)$(LIBDIR)
++ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(LIBDIR)
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)
++ $(BSD_INSTALL_LIB) libflask.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
++ $(BSD_INSTALL_LIB) libflask.a $(DESTDIR)$(LIBDIR)
+ ln -sf libflask.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libflask.so.$(MAJOR)
+ ln -sf libflask.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libflask.so
+- $(INSTALL_DATA) include/flask.h $(DESTDIR)$(INCLUDEDIR)
++ $(BSD_INSTALL_DATA) include/flask.h $(DESTDIR)$(INCLUDEDIR)
+
+ .PHONY: TAGS
+ TAGS:
diff --git a/sysutils/xentools33/patches/patch-dd b/sysutils/xentools33/patches/patch-dd
new file mode 100644
index 00000000000..c44855cba01
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-dd
@@ -0,0 +1,15 @@
+$NetBSD: patch-dd,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- flask/loadpolicy/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ flask/loadpolicy/Makefile
+@@ -51,8 +51,8 @@ print-end:
+
+ .PHONY: install
+ install: all
+- $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
+- $(INSTALL_PROG) $(CLIENTS) $(DESTDIR)$(SBINDIR)
++ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(SBINDIR)
++ $(BSD_INSTALL_PROGRAM) $(CLIENTS) $(DESTDIR)$(SBINDIR)
+
+ -include $(PROG_DEP)
+
diff --git a/sysutils/xentools33/patches/patch-de b/sysutils/xentools33/patches/patch-de
new file mode 100644
index 00000000000..33f35716feb
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-de
@@ -0,0 +1,104 @@
+$NetBSD: patch-de,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- examples/Makefile.orig 2008-08-07 10:56:22.000000000 +0200
++++ examples/Makefile
+@@ -7,7 +7,7 @@ XENDOMAINS_INITD = init.d/xendomains
+ XENDOMAINS_SYSCONFIG = init.d/sysconfig.xendomains
+
+ # Xen configuration dir and configs to go there.
+-XEN_CONFIG_DIR = /etc/xen
++XEN_CONFIG_DIR = ${PKG_SYSCONFDIR}/xen
+ XEN_READMES = README
+ XEN_READMES += README.incompatibilities
+ XEN_CONFIGS = xend-config.sxp
+@@ -25,7 +25,7 @@ XEN_CONFIGS += xend-pci-quirks.sxp
+ XEN_CONFIGS += xend-pci-permissive.sxp
+
+ # Xen script dir and scripts to go there.
+-XEN_SCRIPT_DIR = /etc/xen/scripts
++XEN_SCRIPT_DIR = ${PKG_SYSCONFDIR}/xen/scripts
+ XEN_SCRIPTS = network-bridge vif-bridge
+ XEN_SCRIPTS += network-route vif-route
+ XEN_SCRIPTS += network-nat vif-nat
+@@ -41,10 +41,10 @@ XEN_SCRIPT_DATA += xen-hotplug-common.sh
+ XEN_SCRIPT_DATA += block-common.sh vtpm-common.sh vtpm-hotplug-common.sh
+ XEN_SCRIPT_DATA += vtpm-migration.sh vtpm-impl
+
+-XEN_HOTPLUG_DIR = /etc/hotplug
++XEN_HOTPLUG_DIR = ${PKG_SYSCONFDIR}/hotplug
+ XEN_HOTPLUG_SCRIPTS = xen-backend.agent
+
+-UDEV_RULES_DIR = /etc/udev
++UDEV_RULES_DIR = ${PKG_SYSCONFDIR}/udev
+ UDEV_RULES = xen-backend.rules
+
+ DI = $(if $(DISTDIR),$(shell readlink -f $(DISTDIR)),)
+@@ -79,52 +79,47 @@ install-readmes:
+
+ .PHONY: install-initd
+ install-initd:
+- [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
+- [ -d $(DESTDIR)/etc/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)/etc/sysconfig
+- $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
+- $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
+- $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)/etc/init.d
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)/etc/sysconfig
++ $(BSD_INSTALL_DATA) $(XEND_INITD) $(DESTDIR)/etc/init.d
++ $(BSD_INSTALL_DATA) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
++ $(BSD_INSTALL_DATA) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
+
+ .PHONY: install-configs
+ install-configs: $(XEN_CONFIGS)
+- [ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
+- $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
+- [ -d $(DESTDIR)$(XEN_CONFIG_DIR)/auto ] || \
+- $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto
+ set -e; for i in $(XEN_CONFIGS); \
+- do [ -e $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
+- $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
++ do \
++ $(BSD_INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
+ done
+
+ .PHONY: install-scripts
+ install-scripts:
+- [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
+- $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
+ set -e; for i in $(XEN_SCRIPTS); \
+ do \
+- $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
++ $(BSD_INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
+ done
+ set -e; for i in $(XEN_SCRIPT_DATA); \
+ do \
+- $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
++ $(BSD_INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
+ done
+
+ .PHONY: install-hotplug
+ install-hotplug:
+- [ -d $(DESTDIR)$(XEN_HOTPLUG_DIR) ] || \
+- $(INSTALL_DIR) $(DESTDIR)$(XEN_HOTPLUG_DIR)
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(XEN_HOTPLUG_DIR)
+ set -e; for i in $(XEN_HOTPLUG_SCRIPTS); \
+ do \
+- $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_HOTPLUG_DIR); \
++ $(BSD_INSTALL_DATA) $$i $(DESTDIR)$(XEN_HOTPLUG_DIR); \
+ done
+
+ .PHONY: install-udev
+ install-udev:
+- [ -d $(DESTDIR)$(UDEV_RULES_DIR) ] || \
+- $(INSTALL_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d
+ set -e; for i in $(UDEV_RULES); \
+ do \
+- $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR); \
++ $(BSD_INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR); \
+ ln -sf ../$$i $(DESTDIR)$(UDEV_RULES_DIR)/rules.d; \
+ done
+
diff --git a/sysutils/xentools33/patches/patch-df b/sysutils/xentools33/patches/patch-df
new file mode 100644
index 00000000000..ae375b9897b
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-df
@@ -0,0 +1,51 @@
+$NetBSD: patch-df,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- include/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ include/Makefile
+@@ -20,26 +20,26 @@ xen/.dir:
+
+ .PHONY: install
+ install: all
+- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64
+- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64/hvm
+- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86
+- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86/hvm
+- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/foreign
+- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/hvm
+- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/io
+- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/sys
+- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/xsm
+- $(INSTALL_DATA) xen/COPYING $(DESTDIR)$(INCLUDEDIR)/xen
+- $(INSTALL_DATA) xen/*.h $(DESTDIR)$(INCLUDEDIR)/xen
+- $(INSTALL_DATA) xen/arch-ia64/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64
+- $(INSTALL_DATA) xen/arch-ia64/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64/hvm
+- $(INSTALL_DATA) xen/arch-x86/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86
+- $(INSTALL_DATA) xen/arch-x86/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86/hvm
+- $(INSTALL_DATA) xen/foreign/*.h $(DESTDIR)$(INCLUDEDIR)/xen/foreign
+- $(INSTALL_DATA) xen/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/hvm
+- $(INSTALL_DATA) xen/io/*.h $(DESTDIR)$(INCLUDEDIR)/xen/io
+- $(INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(INCLUDEDIR)/xen/sys
+- $(INSTALL_DATA) xen/xsm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/xsm
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64/hvm
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86/hvm
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/foreign
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/hvm
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/io
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/sys
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/xsm
++ $(BSD_INSTALL_DATA) xen/COPYING $(DESTDIR)$(INCLUDEDIR)/xen
++ $(BSD_INSTALL_DATA) xen/*.h $(DESTDIR)$(INCLUDEDIR)/xen
++ $(BSD_INSTALL_DATA) xen/arch-ia64/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64
++ $(BSD_INSTALL_DATA) xen/arch-ia64/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64/hvm
++ $(BSD_INSTALL_DATA) xen/arch-x86/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86
++ $(BSD_INSTALL_DATA) xen/arch-x86/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86/hvm
++ $(BSD_INSTALL_DATA) xen/foreign/*.h $(DESTDIR)$(INCLUDEDIR)/xen/foreign
++ $(BSD_INSTALL_DATA) xen/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/hvm
++ $(BSD_INSTALL_DATA) xen/io/*.h $(DESTDIR)$(INCLUDEDIR)/xen/io
++ $(BSD_INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(INCLUDEDIR)/xen/sys
++ $(BSD_INSTALL_DATA) xen/xsm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/xsm
+
+ .PHONY: clean
+ clean:
diff --git a/sysutils/xentools33/patches/patch-ea b/sysutils/xentools33/patches/patch-ea
new file mode 100644
index 00000000000..bfbbbaefd6c
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ea
@@ -0,0 +1,13 @@
+$NetBSD: patch-ea,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- python/xen/util/xsm/acm/acm.py.orig 2008-08-01 16:38:07.000000000 +0200
++++ python/xen/util/xsm/acm/acm.py
+@@ -35,7 +35,7 @@ from xen.util import dictio, xsconstants
+ from xen.xend.XendConstants import *
+
+ #global directories and tools for security management
+-install_policy_dir_prefix = "/etc/xen/acm-security/policies"
++install_policy_dir_prefix = "@XENDCONFDIR@/acm-security/policies"
+ security_dir_prefix = XendOptions.instance().get_xend_security_path()
+ policy_dir_prefix = security_dir_prefix + "/policies"
+ res_label_filename = policy_dir_prefix + "/resource_labels"
diff --git a/sysutils/xentools33/patches/patch-eb b/sysutils/xentools33/patches/patch-eb
new file mode 100644
index 00000000000..511db77a7f1
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-eb
@@ -0,0 +1,13 @@
+$NetBSD: patch-eb,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- python/xen/xm/setpolicy.py.orig 2008-08-01 16:38:07.000000000 +0200
++++ python/xen/xm/setpolicy.py
+@@ -47,7 +47,7 @@ def help():
+
+ The filename of the policy is the policy name plus the suffic
+ '-security_policy.xml'. The location of the policy file is either
+- the the current directory or '/etc/xen/acm-security/policies'.
++ the the current directory or '@XENDCONFDIR@/acm-security/policies'.
+
+ """
+
diff --git a/sysutils/xentools33/patches/patch-ec b/sysutils/xentools33/patches/patch-ec
new file mode 100644
index 00000000000..8a135b85351
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ec
@@ -0,0 +1,13 @@
+$NetBSD: patch-ec,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- security/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
++++ security/Makefile
+@@ -21,7 +21,7 @@ ACM_EZPOLICY = xensec_ezpolicy
+ ACM_OBJS = $(OBJS_TOOL) $(OBJS_GETD)
+ ACM_SCRIPTS = python/xensec_tools/acm_getlabel
+
+-ACM_CONFIG_DIR = /etc/xen/acm-security
++ACM_CONFIG_DIR = @XENDCONFDIR@/acm-security
+ ACM_POLICY_DIR = $(ACM_CONFIG_DIR)/policies
+ ACM_SCRIPT_DIR = $(ACM_CONFIG_DIR)/scripts
+
diff --git a/sysutils/xentools33/patches/patch-ed b/sysutils/xentools33/patches/patch-ed
new file mode 100644
index 00000000000..70cfba7f9a4
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ed
@@ -0,0 +1,24 @@
+$NetBSD: patch-ed,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- security/policytools.txt.orig 2008-08-01 16:38:07.000000000 +0200
++++ security/policytools.txt
+@@ -16,10 +16,10 @@ XML. Read in the user manual about the n
+ name is used by the Xen management tools to identify existing
+ policies. Creating the security policy means creating a policy
+ description in XML:
+-/etc/xen/acm-security/policies/example/chwall_ste/test-security_policy.xml.
++@XENDCONFDIR@/acm-security/policies/example/chwall_ste/test-security_policy.xml.
+
+ The policy XML description must follow the XML schema definition in
+-/etc/xen/acm-security/policies/security_policy.xsd. The policy tools
++@XENDCONFDIR@/acm-security/policies/security_policy.xsd. The policy tools
+ are written against this schema; they will create and refine policies
+ that conform to this scheme.
+
+@@ -144,5 +144,5 @@ policy file naming conventions based on
+ choose to use.
+
+ To get a feel for the tool, you could use one of the example policy
+-definitions files from /etc/xen/acm-security/policies/example as
++definitions files from @XENDCONFDIR@/acm-security/policies/example as
+ input or a policy created by the xensec_ezpolicy tool.
diff --git a/sysutils/xentools33/patches/patch-ee b/sysutils/xentools33/patches/patch-ee
new file mode 100644
index 00000000000..64e409847ee
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ee
@@ -0,0 +1,22 @@
+$NetBSD: patch-ee,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- security/xensec_ezpolicy.orig 2008-08-01 16:38:07.000000000 +0200
++++ security/xensec_ezpolicy
+@@ -935,7 +935,7 @@ class ezFrame(wx.Frame):
+ policyname = transInfo()
+ if not policyname:
+ return
+- path="/etc/xen/acm-security/policies/"
++ path="@XENDCONFDIR@/acm-security/policies/"
+ nameparts=string.split(policyname, ".")
+ if len(nameparts) > 1:
+ path = path + "/".join(nameparts[0:len(nameparts)-1])
+@@ -1592,7 +1592,7 @@ where you merely replace &quot;NAME&quot
+ Save the policy under the name proposed by the tool in the proposed directory
+ if you are using this tool in your Xen environment. Otherwise, you need
+ to copy the resulting file into your Xen environment to the directory
+-&quot;/etc/xen/acm-security/policies/example/chwall_ste/&quot;.<BR>
++&quot;@XENDCONFDIR@/acm-security/policies/example/chwall_ste/&quot;.<BR>
+ <BR>
+ This tool creates policies for the Xen Chinese Wall and Simple Type Enforcement
+ policy. The Xen access control policy in general is more expressive and
diff --git a/sysutils/xentools33/patches/patch-ef b/sysutils/xentools33/patches/patch-ef
new file mode 100644
index 00000000000..3c4de3489b0
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-ef
@@ -0,0 +1,17 @@
+$NetBSD: patch-ef,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- xm-test/tests/security-acm/Makefile.am.orig 2008-08-01 16:38:07.000000000 +0200
++++ xm-test/tests/security-acm/Makefile.am
+@@ -19,10 +19,10 @@ TESTS_ENVIRONMENT=@TENV@
+ %.test: %.py
+ cp $< $@
+ chmod +x $@
+- @if [ -d /etc/xen/acm-security/policies ]; then \
++ @if [ -d @XENDCONFDIR@/acm-security/policies ]; then \
+ cp -f xm-test-security_policy.xml \
+ xm-test-update-security_policy.xml\
+- /etc/xen/acm-security/policies; \
++ @XENDCONFDIR@/acm-security/policies; \
+ fi;
+
+ clean-local: am_config_clean-local
diff --git a/sysutils/xentools33/patches/patch-eg b/sysutils/xentools33/patches/patch-eg
new file mode 100644
index 00000000000..5ec104b8d35
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-eg
@@ -0,0 +1,16 @@
+$NetBSD: patch-eg,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
+
+--- xm-test/runtest.sh.orig 2008-08-01 16:38:07.000000000 +0200
++++ xm-test/runtest.sh
+@@ -220,9 +220,9 @@ unsafe=no
+ GROUPENTERED=default
+
+ #Prepare for usage with ACM
+-if [ -d /etc/xen/acm-security/policies ]; then
++if [ -d @XENDCONFDIR@/acm-security/policies ]; then
+ cp -f tests/security-acm/xm-test-security_policy.xml \
+- /etc/xen/acm-security/policies
++ @XENDCONFDIR@/acm-security/policies
+ fi
+
+ unset XM_MANAGED_DOMAINS
diff --git a/sysutils/xentools33/patches/patch-fa b/sysutils/xentools33/patches/patch-fa
new file mode 100644
index 00000000000..77261a26209
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-fa
@@ -0,0 +1,24 @@
+$NetBSD: patch-fa,v 1.1.1.1 2008/08/07 20:26:59 cegger Exp $
+
+--- firmware/Makefile.orig 2008-08-01 14:38:07.000000000 +0000
++++ firmware/Makefile
+@@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk
+ # hvmloader is a 32-bit protected mode binary.
+ # It belongs in /usr/lib, not /usr/lib64.
+ TARGET := hvmloader/hvmloader
+-INST_DIR := $(DESTDIR)/usr/lib/xen/boot
++INST_DIR := $(DESTDIR)$(LIBDIR)/xen/boot
+
+ SUBDIRS :=
+ SUBDIRS += rombios
+@@ -27,8 +27,8 @@ all:
+
+ .PHONY: install
+ install: all
+- [ -d $(INST_DIR) ] || $(INSTALL_DIR) $(INST_DIR)
+- [ ! -e $(TARGET) ] || $(INSTALL_DATA) $(TARGET) $(INST_DIR)
++ $(BSD_INSTALL_LIB_DIR) $(INST_DIR)
++ $(BSD_INSTALL_LIB) $(TARGET) $(INST_DIR)
+
+ .PHONY: clean
+ clean: subdirs-clean
diff --git a/sysutils/xentools33/patches/patch-fb b/sysutils/xentools33/patches/patch-fb
new file mode 100644
index 00000000000..8b80b7cb024
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-fb
@@ -0,0 +1,36 @@
+$NetBSD: patch-fb,v 1.1.1.1 2008/08/07 20:26:59 cegger Exp $
+
+--- ioemu/configure.orig 2008-08-01 14:38:07.000000000 +0000
++++ ioemu/configure
+@@ -591,17 +591,17 @@ fi
+ mandir="$prefix"
+ datadir="$prefix"
+ docdir="$prefix"
+-bindir="$prefix"
+-configdir=""
++bindir="$prefix/libexec"
++configdir="@XENDCONFDIR@"
+ else
+ if test -z "$prefix" ; then
+ prefix="/usr/local"
+ fi
+-mandir="$prefix/share/man"
++mandir="$prefix/man"
+ datadir="$prefix/share/xen/qemu"
+ docdir="$prefix/share/doc/qemu"
+-bindir="$prefix/$libdir/xen/bin"
+-configdir="/etc/xen"
++bindir="$prefix/libexec"
++configdir="@XENDCONFDIR@"
+ fi
+
+ if test "$stubdom" = "yes"; then
+@@ -744,6 +744,8 @@ if test "$mingw32" = "yes" ; then
+ echo "#define CONFIG_WIN32 1" >> $config_h
+ elif test -f "/usr/include/byteswap.h" ; then
+ echo "#define HAVE_BYTESWAP_H 1" >> $config_h
++elif test -f "/usr/include/machine/bswap.h" ; then
++ echo "#define HAVE_MACHINE_BSWAP_H 1" >> $config_h
+ fi
+ if test "$darwin" = "yes" ; then
+ echo "CONFIG_DARWIN=yes" >> $config_mak
diff --git a/sysutils/xentools33/patches/patch-fc b/sysutils/xentools33/patches/patch-fc
new file mode 100644
index 00000000000..a1141428eea
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-fc
@@ -0,0 +1,22 @@
+$NetBSD: patch-fc,v 1.1.1.1 2008/08/07 20:26:59 cegger Exp $
+
+--- ioemu/vl.c.orig 2008-08-01 14:38:07.000000000 +0000
++++ ioemu/vl.c
+@@ -108,7 +108,7 @@
+
+ #include "exec-all.h"
+
+-#define DEFAULT_NETWORK_SCRIPT "/etc/xen/qemu-ifup"
++#define DEFAULT_NETWORK_SCRIPT "@XENDCONFDIR@/qemu-ifup"
+ #ifdef _BSD
+ #define DEFAULT_BRIDGE "bridge0"
+ #else
+@@ -117,7 +117,7 @@
+ #ifdef __sun__
+ #define SMBD_COMMAND "/usr/sfw/sbin/smbd"
+ #else
+-#define SMBD_COMMAND "/usr/sbin/smbd"
++#define SMBD_COMMAND "@PREFIX@/sbin/smbd"
+ #endif
+
+ //#define DEBUG_UNUSED_IOPORT
diff --git a/sysutils/xentools33/patches/patch-fd b/sysutils/xentools33/patches/patch-fd
new file mode 100644
index 00000000000..95e0f8db444
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-fd
@@ -0,0 +1,55 @@
+$NetBSD: patch-fd,v 1.1.1.1 2008/08/07 20:26:59 cegger Exp $
+
+--- ioemu/Makefile.orig 2008-08-01 14:38:07.000000000 +0000
++++ ioemu/Makefile
+@@ -44,10 +44,11 @@ subdir-%:
+
+ recurse-all: $(patsubst %,subdir-%, $(TARGET_DIRS))
+
+-tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/libxc
+-tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib
+-tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore
+-tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/include
++CPPFLAGS += -I$(XEN_ROOT)/tools/libxc
++CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib
++CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore
++CPPFLAGS += -I$(XEN_ROOT)/tools/include
++
+ tapdisk-ioemu: tapdisk-ioemu.c cutils.c block.c block-raw.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c block-qcow2.c hw/xen_blktap.c osdep.c
+ $(CC) -DQEMU_TOOL $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) $(LDFLAGS) $(BASE_LDFLAGS) -o $@ $^ -lz $(LIBS)
+
+@@ -78,16 +79,16 @@ ar de en-us fi fr-be hr
+ common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
+
+ install-doc: $(DOCS)
+- mkdir -p "$(DESTDIR)$(docdir)"
+- $(INSTALL_DATA) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
++ $(BSD_INSTALL_DATA_DIR) "$(DESTDIR)$(docdir)"
++ $(BSD_INSTALL_DATA) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
+ ifndef CONFIG_WIN32
+- mkdir -p "$(DESTDIR)$(mandir)/man1"
+- $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
++ $(BSD_INSTALL_DATA_DIR) "$(DESTDIR)$(mandir)/man1"
++ $(BSD_INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
+ endif
+
+ install: all $(if $(BUILD_DOCS),install-doc)
+- mkdir -p "$(DESTDIR)$(bindir)"
+- $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(SBINDIR)"
++ $(BSD_INSTALL_PROGRAM_DIR) "$(DESTDIR)$(bindir)"
++ $(BSD_INSTALL_PROGRAM) -m 755 $(TOOLS) "$(DESTDIR)$(SBINDIR)"
+ # mkdir -p "$(DESTDIR)$(datadir)"
+ # for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
+ # video.x openbios-sparc32 linux_boot.bin pxe-ne2k_pci.bin \
+@@ -95,9 +96,9 @@ install: all $(if $(BUILD_DOCS),install-
+ # $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
+ # done
+ ifndef CONFIG_WIN32
+- mkdir -p "$(DESTDIR)$(datadir)/keymaps"
++ $(BSD_INSTALL_DATA_DIR) "$(DESTDIR)$(datadir)/keymaps"
+ set -e; for x in $(KEYMAPS); do \
+- $(INSTALL_DATA) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
++ $(BSD_INSTALL_DATA) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
+ done
+ endif
+ for d in $(TARGET_DIRS); do \
diff --git a/sysutils/xentools33/patches/patch-fe b/sysutils/xentools33/patches/patch-fe
new file mode 100644
index 00000000000..2cb3bc31471
--- /dev/null
+++ b/sysutils/xentools33/patches/patch-fe
@@ -0,0 +1,29 @@
+$NetBSD: patch-fe,v 1.1.1.1 2008/08/07 20:26:59 cegger Exp $
+
+--- ioemu/Makefile.target.orig 2008-08-01 14:38:07.000000000 +0000
++++ ioemu/Makefile.target
+@@ -382,6 +382,7 @@ AUDIODRV += sdlaudio.o
+ endif
+ ifdef CONFIG_OSS
+ AUDIODRV += ossaudio.o
++LIBS += -lossaudio
+ endif
+ ifdef CONFIG_COREAUDIO
+ AUDIODRV += coreaudio.o
+@@ -660,12 +661,12 @@ distclean: clean
+ rm -rf config.mak config.h
+
+ install: all
+- mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(configdir)"
++ $(BSD_INSTALL_PROGRAM_DIR) "$(DESTDIR)$(bindir)" "$(DESTDIR)$(configdir)"
+ ifneq ($(PROGS),)
+- $(INSTALL_PROG) $(PROGS) "$(DESTDIR)$(bindir)"
++ $(BSD_INSTALL_PROGRAM) $(PROGS) "$(DESTDIR)$(bindir)"
+ endif
+- $(INSTALL_PROG) $(TARGET_PATH)/qemu-dm.debug "$(DESTDIR)$(bindir)"
+- $(INSTALL_PROG) $(TARGET_PATH)/qemu-ifup "$(DESTDIR)$(configdir)"
++ $(BSD_INSTALL_DATA) $(TARGET_PATH)/qemu-dm.debug "$(DESTDIR)$(bindir)"
++ $(BSD_INSTALL_DATA) $(TARGET_PATH)/qemu-ifup "$(DESTDIR)$(configdir)"
+
+ ifneq ($(wildcard .depend),)
+ include .depend